@treasuredata/tdx 2026.4.15 → 2026.4.17
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.js +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.js +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.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.js +1 -1
- package/dist/sdk/workspace/templates.js +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_0x59c470=a31_0x21a0;(function(_0x5d6502,_0x77b816){const _0x133ba3=a31_0x21a0,_0xbeb156=_0x5d6502();while(!![]){try{const _0x51803a=-parseInt(_0x133ba3(0x363))/0x1*(-parseInt(_0x133ba3(0x37b))/0x2)+parseInt(_0x133ba3(0x385))/0x3*(parseInt(_0x133ba3(0x1f4))/0x4)+-parseInt(_0x133ba3(0x2fd))/0x5*(-parseInt(_0x133ba3(0x271))/0x6)+parseInt(_0x133ba3(0x324))/0x7+-parseInt(_0x133ba3(0x1d6))/0x8+-parseInt(_0x133ba3(0x2e2))/0x9*(-parseInt(_0x133ba3(0x30e))/0xa)+-parseInt(_0x133ba3(0x359))/0xb*(parseInt(_0x133ba3(0x3af))/0xc);if(_0x51803a===_0x77b816)break;else _0xbeb156['push'](_0xbeb156['shift']());}catch(_0x5a2e71){_0xbeb156['push'](_0xbeb156['shift']());}}}(a31_0x5e65,0x4f27f));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x2b29d0 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_0x388bb2 from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';function a31_0x21a0(_0x224209,_0x215e83){_0x224209=_0x224209-0x1a3;const _0x5e65cf=a31_0x5e65();let _0x21a0b2=_0x5e65cf[_0x224209];return _0x21a0b2;}import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR=a31_0x59c470(0x2dd),LEGACY_PARENT_SEGMENT_DIR=a31_0x59c470(0x202);function openBrowser(_0x367163){const _0x59b7dd=a31_0x59c470,_0x2da1f2=process[_0x59b7dd(0x1f0)],_0x479cbf=_0x2da1f2===_0x59b7dd(0x307)?_0x59b7dd(0x2bf):_0x2da1f2===_0x59b7dd(0x22f)?'start':_0x59b7dd(0x23e);spawn(_0x479cbf,[_0x367163],{'detached':!![],'stdio':_0x59b7dd(0x38e)})[_0x59b7dd(0x352)]();}function migrateLegacyDirectory(){const _0x48d2c9=a31_0x59c470;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x17b0ae=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x17b0ae['isDirectory']())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x48d2c9(0x2f0)](a31_0x388bb2[_0x48d2c9(0x361)](_0x48d2c9(0x2d6)+LEGACY_PARENT_SEGMENT_DIR+_0x48d2c9(0x3a0)+PARENT_SEGMENT_DIR+_0x48d2c9(0x3a5))),console[_0x48d2c9(0x2f0)](a31_0x388bb2[_0x48d2c9(0x396)](_0x48d2c9(0x2ef)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x48d2c9(0x2f0)](a31_0x388bb2['yellow'](_0x48d2c9(0x1fd)+LEGACY_PARENT_SEGMENT_DIR+_0x48d2c9(0x366)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a31_0x388bb2[_0x48d2c9(0x327)](_0x48d2c9(0x1e1)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x20de33){const _0x5281a5=_0x20de33 instanceof Error?_0x20de33['message']:String(_0x20de33);return console[_0x48d2c9(0x2f0)](a31_0x388bb2[_0x48d2c9(0x37a)]('✘\x20Failed\x20to\x20rename\x20directory:\x20'+_0x5281a5+'\x0a')),![];}}function a31_0x5e65(){const _0x5853b3=['personalizationServices','trim','Errors:','segment:parent:push','\x20stage','Master\x20+\x20Attributes','\x20Context\x20set:\x20','events','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','customersWithEvents','Default','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','localeCompare','test','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','\x20service(s)\x20configured','launched','payload','coveragePercent','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','audienceId','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','stop','updated:','List\x20personalization\x20services\x20for\x20a\x20parent\x20segment','listParents','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','identifier:\x20','status:\x20','\x0aNew\x20parent\x20segment\x20\x27','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','all','win32','workflowAttemptId','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','sampleData','keyEventCriteria','\x0aUsage:\x20tdx\x20ps\x20preview\x20','\x20(paused)','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','Attributes','identifier','ps:pz:service:delete','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','\x20true','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','xdg-open','validateParentYaml','Fetching\x20current\x20configuration\x20for\x20\x27','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','realtime_enabled','Show\x20parent\x20segment\x20schema\x20(column\x20types)','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','displayValidateResults','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x27\x20for\x20service\x20\x27','Listing\x20personalization\x20services\x20for\x20\x27','format','name','\x20\x20Database:\x20','pullParentYaml','payload:','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','replace','\x0a\x20\x20\x20\x20]','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','attribute','Error:\x20Token\x20name\x20is\x20required','some','Personalization\x20service\x20description','allowedIps','Error:\x20Token\x20ID\x20is\x20required','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','Master\x20Table','execute','Parent\x20segment:\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','displayBehaviorsStats','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','Site:\x20','✔\x20Created\x20parent\x20segment\x20\x27','behaviors','foreignKey','Error:\x20Service\x20name\x20is\x20required','\x20is\x20already\x20up\x20to\x20date','token:','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','Audience\x20ID:','getBehaviorNames','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','last_page_viewed','The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires','Updating\x20personalization\x20service\x20\x27','466674FpFjfB','schemaValid','Creating\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','any','\x20\x20Tables:\x201\x20customers\x20+\x20','Columns:','number','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','segment:parent:create','/{name}.yml\x0a','segment:parent:fields','Listing\x20RT\x20journeys\x20for\x20\x27','FINISHED','createParent','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','repeat','✔\x20Found\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','addBehaviorsFile','Fetching\x20customers\x20schema...','behavior','displayRealtimeInfo','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','Listing\x20parent\x20segments\x20matching\x20\x27','id:\x20','relationships','Join\x20on:','segment:parent:pull','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','reduce','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','status','SQL\x20query:\x0a','Creating\x20parent\x20segment\x20\x27','label','\x20personalization\x20service','timezone','Error:\x20--behavior\x20requires\x20a\x20name\x0a','verbose','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','column_type','/app/dw/parentSegments/','Validating\x20RT\x20configuration...','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','attributes','realtime','create','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Resume\x20activations\x20in\x20an\x20RT\x20journey','query','resolveParentId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','ID\x20Stitching:','yes','jsonl','Behaviors','entryCriteria:','\x27...','updatedAt','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','log','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','listPersonalizations','deletePersonalization','message','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','td_client_id','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','-1d','ps:pz:service:list','sourceTableError','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','No\x20personalization\x20services\x20configured','open','start','endsWith','filter','joinKey','Show\x20personalization\x20service\x20details','updateParent','segment:parent:show','List\x20available\x20fields\x20for\x20segmentation','Output\x20file:\x20','allValid','interval','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','no\x20tokens\x20configured','✔\x20Deleted\x20personalization\x20\x27','\x20field','description','text','getCurrentConfigVersion','paused','Source:','\x20to\x20configure\x20your\x20personalization\x20service','parentSegment','\x0a⚠️\x20\x20Both\x20','Deleting\x20personalization\x20\x27','single','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','No\x20personalizations\x20configured','Delete\x20a\x20personalization\x20service','parent_segments','segment:parent:update','displayAttributesStats','/attempt/','join','537237qdghWP','entryCriteria','setJobId','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','\x20\x20Note:\x20','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\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','toFixed','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','addAttributesFile','\x0a\x20\x20]\x0a}\x0a','split','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','error','Database:\x20','state','enriched','\x27\x20is\x20up\x20to\x20date','Listing\x20personalizations\x20for\x20\x27','Join:','getParentSQL','personalization','✔\x20Created\x20token\x20\x27','scheduleOption','.yaml','✔\x20Deleted\x20token\x20\x27','5REeVAb','Listing\x20fields\x20for\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','\x20--behavior\x20\x22','✔\x20Created\x20personalization\x20service\x20\x27','Created','.yml','keyEventId','Options:\x0a','segment:parent:run','darwin','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','web','List\x20parent\x20segments','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','\x20RT\x20journey','50lvLqgF','Analyzing\x20changes...','tdx\x20ps\x20preview\x20','\x27\x20with\x20ID:\x20','sections','site','stageCount','segment:parent:desc','\x0aChanges\x20to\x20\x27','Available\x20behaviors:','use','\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}','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','\x20\x202.\x20Run\x20','\x0a\x20\x20\x20\x20}','Listing\x20parent\x20segments...','population','Patching\x20personalization\x20\x27','customers','Coverage:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','\x20\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','3234861ElTlbN','list','output','green','Enriched:','totalEvents','createToken','\x20configured','Error:\x20Personalization\x20ID\x20is\x20required','Delete\x20a\x20realtime\x20personalization','`\x20to\x20download\x20the\x20configuration\x20first','\x20--attribute\x20\x22','data','\x20\x20\x20','attributesFile','\x20\x201.\x20Edit\x20','errors','/app/workflows/','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','ps:pz:show','type','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','customerGroup','\x20Opening\x20','\x20Added\x20RT\x202.0\x20template\x20section','Attempt:','pauseJourney','primaryKey','elapsedTimeMillis','Creating\x20personalization\x20\x27','Table:\x20','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','\x20--interval\x20','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','file','Behavior:','\x20to\x20push\x20the\x20configuration','Validating\x20configuration...','folder-segment','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','push','processedRows','cyan','unref','displayMasterInfo','⚡\x20Enabled','audienceId:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','Creating','preview','8800vGiwYZ','Error:\x20Parent\x20segment\x20name\x20is\x20required','Show\x20a\x20specific\x20realtime\x20personalization','\x20parent\x20segment\x20\x27','\x20behaviors','toLocaleString','ps:rt:jn:list','createPersonalization','yellow','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','341413Imuthi','\x22,\x20\x22type\x22:\x20\x22','page_view','/\x20→\x20','{\x0a\x20\x20\x22database\x22:\x20\x22','\x20\x20\x20\x20-\x20','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','includeSensitive:','parentFolder','\x20[Job\x20ID:\x20','toLowerCase','Resolving\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','YAML\x20file:\x20','collectSchema','Error:\x20Service\x20ID\x20is\x20required','ps:pz:service:token:create','workflowSessionId','behavior_','.customers)','customerPercent','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','red','2eQNlhI','Options:','rowCount','Fetching\x20behavior\x20list...','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','⚡\x20Not\x20enabled','columns','List\x20RT\x20journeys','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','ps:pz:patch','732nykqQh','Apply\x20changes\x20to\x20\x27','column_name','No\x20RT\x20journeys\x20found','\x20No\x20changes\x20-\x20','bold','/sessions/','addAttributes','\x5c$&','ignore','resumeJourney','scheduleType','\x20personalization','stitchingKeys','\x22\x20}','✔\x20Updated\x20personalization\x20\x27','\x20\x20Columns:\x20','dim','Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a','sections:','✔\x20No\x20changes\x20-\x20\x27','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','addBehaviors','\x20total','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x20rows\x20','/\x20and\x20','\x0aChanges\x20to\x20apply\x20to\x20\x27','column','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','segment:parent:view','/\x20directories\x20exist.','Get\x20SQL\x20query\x20for\x20parent\x20segment','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','created:','Creating\x20token\x20\x27','patch','List\x20realtime\x20personalizations\x20for\x20a\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','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','16476BxLufH','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Aborted.','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Error:\x20--database\x20and\x20--table\x20are\x20required','table','includeSensitive','eventKind:\x20','(id:\x20','ps:rt:list','session','keys','length','\x20RT-enabled\x20parent\x20segment','realtime:','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Fetching\x20parent\x20segment\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','utf-8','No\x20parent\x20segments\x20match\x20pattern:\x20','parent_id','pushParentYaml','patchPersonalization','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','Options\x20(one\x20required):\x0a','Update\x20a\x20realtime\x20personalization\x20entity','Updating','ps:pz:service:create','double','audienceId:','To\x20view\x20sample\x20data:','\x0aError:','Master:','Deleting\x20token\x20\x27','run','delete','\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','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Get\x20current\x20RT\x20configuration\x20version\x20status','map','Rows:','personalization_services','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','Getting\x20personalization\x20\x27','\x20Configuration\x20is\x20valid','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','\x20\x20\x20\x20\x20\x20','\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','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','string','Customers:','✔\x20Updated\x20personalization\x20service\x20\x27','✔\x20Query\x20completed:\x20Processed\x20','displayColumns','master','Fetching\x20SQL\x20for\x20\x27','json','\x20--enriched','public','Error:\x20--attribute\x20requires\x20a\x20name\x0a','apply','createdAt','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','keyEventId:','Error\x20parsing\x20YAML:\x20','\x20tdx\x20wf\x20attempt\x20','2306760rWSJDa','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','displayPreviewResults','✔\x20Found\x20personalization\x20\x27','\x20=\x20','✔\x20Deleted\x20personalization\x20service\x20\x27','displaySummary','Updated','folderId','formatSchemaJson','stringify','✔\x20Renamed\x20directory\x20to\x20','SELECT\x20*\x20FROM\x20','Preview:','public:','getParentFull','\x20\x20No\x20sample\x20data\x20available','Error\x20reading\x20file:\x20','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','ps:pz:service:update','segment:parent:sql','tokens','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','ps:rt:jn:pause','Error:','Found\x20YAML\x20file:\x20','platform','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x27\x20(id:\x20','previewParentYaml','8708qLATOj','matchedCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','idStitching','No\x20parent\x20segments\x20found','displayPreviewHints','schemaError','\x20\x20\x20\x20','allowed\x20IPs:','\x0a⚠️\x20\x20Migrating:\x20','database','match','Events:','displaySampleData','parent_segment','runParent','segment','Personalization:','\x27\x20and\x20run\x20workflow?','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','varchar','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','RT\x202.0:','Fetching\x20personalization\x20service\x20\x27','in\x20'];a31_0x5e65=function(){return _0x5853b3;};return a31_0x5e65();}class BaseParentSegmentCommand extends BaseCommand{async[a31_0x59c470(0x1b6)](_0x415a7b){const _0x1c4364=a31_0x59c470;return migrateLegacyDirectory(),super[_0x1c4364(0x1b6)](_0x415a7b);}}function resolveYamlFile(_0x19629c){const _0x2bb70a=a31_0x59c470;if(_0x19629c[_0x2bb70a(0x2c1)](_0x2bb70a(0x303))||_0x19629c[_0x2bb70a(0x2c1)](_0x2bb70a(0x2fb)))return _0x19629c;return a31_0x2b29d0['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x19629c)+'.yml');}function formatProgressMessage(_0x3bef51){const _0x252e37=a31_0x59c470,_0x2ab156=_0x3bef51[_0x252e37(0x1ff)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x2ab156){const [,_0x2f5e34,_0x43e7c7,_0x427fe0='']=_0x2ab156;return a31_0x388bb2[_0x252e37(0x396)](_0x2f5e34+':')+'\x20'+_0x43e7c7+a31_0x388bb2[_0x252e37(0x396)](_0x427fe0);}return a31_0x388bb2[_0x252e37(0x396)](_0x3bef51);}function showFileNotFoundError(_0x425ebe,_0x31c9a3){const _0x580e96=a31_0x59c470;console[_0x580e96(0x2f0)](a31_0x388bb2[_0x580e96(0x37a)]('Error:\x20File\x20not\x20found:\x20'+_0x425ebe+'\x0a')),console['error'](a31_0x388bb2[_0x580e96(0x351)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x31c9a3+_0x580e96(0x32e)));}function displayRealtimeValidation(_0x1c07c4){const _0x172552=a31_0x59c470;if(!_0x1c07c4['realtime'])return;const _0x3797e4=_0x1c07c4['realtime'],_0x239631=_0x3797e4['enabled']?a31_0x388bb2['green'](_0x172552(0x354)):a31_0x388bb2[_0x172552(0x361)](_0x172552(0x380));console['error']('\x0a'+a31_0x388bb2['dim'](_0x172552(0x20a))+'\x20'+_0x239631);if(_0x3797e4[_0x172552(0x214)]&&_0x3797e4[_0x172552(0x214)]['length']>0x0){console[_0x172552(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x172552(0x396)](_0x172552(0x200))+'\x20'+_0x3797e4['events']['length']+_0x172552(0x32b));for(const _0x3b23ba of _0x3797e4[_0x172552(0x214)]){const _0xf0f342=_0x3b23ba['sourceTableValid']===![]?a31_0x388bb2[_0x172552(0x37a)]('✘'):a31_0x388bb2['green']('✔');console['error']('\x20\x20\x20\x20'+_0xf0f342+'\x20'+_0x3b23ba[_0x172552(0x24c)]),_0x3b23ba[_0x172552(0x2bc)]&&console[_0x172552(0x2f0)]('\x20\x20\x20\x20\x20\x20'+a31_0x388bb2[_0x172552(0x37a)](_0x3b23ba[_0x172552(0x2bc)]));}}if(_0x3797e4['attributes']&&_0x3797e4[_0x172552(0x2a0)]['length']>0x0){console['error']('\x20\x20'+a31_0x388bb2[_0x172552(0x396)]('Attributes:')+'\x20'+_0x3797e4[_0x172552(0x2a0)][_0x172552(0x3bd)]+_0x172552(0x32b));for(const _0x4c9442 of _0x3797e4[_0x172552(0x2a0)]){const _0xe7882=_0x4c9442['valid']?a31_0x388bb2[_0x172552(0x327)]('✔'):a31_0x388bb2['red']('✘');console['error']('\x20\x20\x20\x20'+_0xe7882+'\x20'+_0x4c9442[_0x172552(0x24c)]+'\x20'+a31_0x388bb2['dim']('('+_0x4c9442[_0x172552(0x338)]+')'));}}if(_0x3797e4[_0x172552(0x1f7)]){const _0x5b13bd=_0x3797e4['idStitching']['stitchingKeys']?.[_0x172552(0x3bd)]?'\x20+\x20['+_0x3797e4['idStitching'][_0x172552(0x392)]['join'](',\x20')+']':'';console[_0x172552(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x172552(0x396)](_0x172552(0x2a9))+'\x20'+_0x3797e4[_0x172552(0x1f7)][_0x172552(0x342)]+_0x5b13bd);}if(_0x3797e4[_0x172552(0x20d)]&&_0x3797e4[_0x172552(0x20d)]['length']>0x0){console['error']('\x20\x20'+a31_0x388bb2[_0x172552(0x396)](_0x172552(0x205))+'\x20'+_0x3797e4['personalizationServices'][_0x172552(0x3bd)]+'\x20service'+(_0x3797e4[_0x172552(0x20d)][_0x172552(0x3bd)]!==0x1?'s':''));for(const _0x382f64 of _0x3797e4[_0x172552(0x20d)]){console[_0x172552(0x2f0)](_0x172552(0x368)+_0x382f64['name']);}}}function showParentSegmentNotSetError(_0x585313){const _0x219640=a31_0x59c470;console['error'](a31_0x388bb2[_0x219640(0x361)](_0x219640(0x2d9))),console[_0x219640(0x2f0)](_0x585313);}export class ParentSegmentListCommand extends BaseCommand{[a31_0x59c470(0x24c)]='segment:parent:list';['description']=a31_0x59c470(0x30a);async[a31_0x59c470(0x25d)](_0x4f26cd){const _0x41c18e=a31_0x59c470,{options:_0xca0a23,args:_0x40b77e,tdx:_0x17e9f0}=_0x4f26cd,_0x495d4a=_0x40b77e[0x0];_0xca0a23[_0x41c18e(0x29a)]&&(console['error'](_0x41c18e(0x262)+_0xca0a23['site']),_0x495d4a&&console[_0x41c18e(0x2f0)]('Pattern:\x20'+_0x495d4a));const _0x4ba081=await withSpinner(_0x495d4a?_0x41c18e(0x28b)+_0x495d4a+_0x41c18e(0x2ae):_0x41c18e(0x31d),()=>_0x17e9f0['segment'][_0x41c18e(0x227)](),{'verbose':_0xca0a23[_0x41c18e(0x29a)]});let _0x5db660=_0x4ba081[_0x41c18e(0x330)];if(_0x495d4a){const _0x1676be=_0x495d4a[_0x41c18e(0x251)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x41c18e(0x251)](/\?/g,'.'),_0xf48f1f=new RegExp('^'+_0x1676be+'$','i');_0x5db660=_0x5db660[_0x41c18e(0x2c2)](_0x38783a=>_0xf48f1f[_0x41c18e(0x21b)](_0x38783a[_0x41c18e(0x2a0)]['name']));}_0x5db660['sort']((_0x3981de,_0x44c3f8)=>_0x3981de['attributes'][_0x41c18e(0x24c)][_0x41c18e(0x21a)](_0x44c3f8[_0x41c18e(0x2a0)]['name'])),console[_0x41c18e(0x2f0)](_0x41c18e(0x283)+_0x5db660['length']+'\x20parent\x20segment'+(_0x5db660[_0x41c18e(0x3bd)]!==0x1?'s':''));const _0x4f67dc=_0x24f9cd=>{const _0x4a2ab7=_0x41c18e;return getConsoleNextUrl(_0xca0a23[_0x4a2ab7(0x313)],_0x4a2ab7(0x29d)+_0x24f9cd);};if(_0xca0a23['format']==='json'||_0xca0a23['format']===_0x41c18e(0x2ab)){const _0x1c9846=_0x5db660[_0x41c18e(0x1bb)](_0x399312=>({..._0x399312,'url':_0x4f67dc(_0x399312['id'])}));await handleSDKOutput(_0x1c9846,_0xca0a23);}else{if(_0x5db660[_0x41c18e(0x3bd)]===0x0)_0x495d4a?console['log'](_0x41c18e(0x1a6)+_0x495d4a):console[_0x41c18e(0x2b1)](_0x41c18e(0x1f8));else for(const _0x474f32 of _0x5db660){const _0x35a477=_0x474f32['attributes'][_0x41c18e(0x31e)]?a31_0x388bb2[_0x41c18e(0x396)]('\x20('+formatRows(_0x474f32[_0x41c18e(0x2a0)][_0x41c18e(0x31e)])+')'):'',_0x1ae949=hyperlink(_0x474f32['attributes']['name'],_0x4f67dc(_0x474f32['id']));console['log']('👥\x20'+_0x1ae949+_0x35a477);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a31_0x59c470(0x27a);['description']=a31_0x59c470(0x37f);async['execute'](_0x728c67){const _0x38da62=a31_0x59c470,{options:_0x150fe6,args:_0x2568a3,tdx:_0x551891}=_0x728c67;console['error'](_0x38da62(0x2da)+_0x38da62(0x39a)+_0x38da62(0x339));const _0x4da747=_0x150fe6;if(_0x2568a3[_0x38da62(0x3bd)]===0x0)return console[_0x38da62(0x2f0)](a31_0x388bb2[_0x38da62(0x37a)](_0x38da62(0x35a))),console[_0x38da62(0x2f0)](_0x38da62(0x292)),0x1;const _0x2c788b=_0x2568a3[0x0];if(!_0x4da747['database']||!_0x4da747['table'])return console[_0x38da62(0x2f0)](_0x38da62(0x3b5)),console['error'](_0x38da62(0x292)),0x1;_0x4da747[_0x38da62(0x29a)]&&(console[_0x38da62(0x2f0)](_0x38da62(0x262)+_0x4da747['site']),console['error']('Name:\x20'+_0x2c788b),console[_0x38da62(0x2f0)](_0x38da62(0x2f1)+_0x4da747['database']),console[_0x38da62(0x2f0)](_0x38da62(0x345)+_0x4da747[_0x38da62(0x3b6)]));const _0x1df9d9=await loadJSONFromOptions(_0x4da747[_0x38da62(0x2a0)],_0x4da747[_0x38da62(0x332)]),_0x15859a=await loadJSONFromOptions(_0x4da747[_0x38da62(0x264)],_0x4da747['behaviorsFile']),_0x133fec=await loadJSONFromOptions(_0x4da747[_0x38da62(0x33d)],_0x4da747['customerGroupFile']),_0x3ce0c9={'name':_0x2c788b,'description':_0x4da747[_0x38da62(0x2cf)],'scheduleType':_0x4da747['scheduleType'],'scheduleOption':_0x4da747[_0x38da62(0x2fa)],'timezone':_0x4da747['timezone'],'master':{'parentDatabaseName':_0x4da747[_0x38da62(0x1fe)],'parentTableName':_0x4da747['table']},'attributes':_0x1df9d9,'behaviors':_0x15859a,'customerGroup':_0x133fec},_0x21c5e1=await withSpinner(_0x38da62(0x295)+_0x2c788b+_0x38da62(0x2ae),()=>_0x551891[_0x38da62(0x204)][_0x38da62(0x27f)](_0x3ce0c9),{'verbose':_0x150fe6[_0x38da62(0x29a)]}),_0x39897b=_0x21c5e1['data'];return console[_0x38da62(0x2f0)](_0x38da62(0x263)+_0x39897b[_0x38da62(0x24c)]+_0x38da62(0x311)+_0x39897b['id']),await handleSDKOutput([_0x39897b],_0x150fe6),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a31_0x59c470(0x2de);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x1d7);async['execute'](_0x1dda1e){const _0x1420a0=a31_0x59c470,{options:_0x1c0d93,args:_0x35acc7,tdx:_0x133400}=_0x1dda1e;console[_0x1420a0(0x2f0)]('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x1420a0(0x39a)+_0x1420a0(0x339));const _0x1b3180=_0x1c0d93;if(_0x35acc7[_0x1420a0(0x3bd)]===0x0)return console[_0x1420a0(0x2f0)](a31_0x388bb2['red'](_0x1420a0(0x35a))),console[_0x1420a0(0x2f0)](_0x1420a0(0x3b0)),0x1;const _0x1cbe82=_0x35acc7[0x0];_0x1b3180['verbose']&&(console[_0x1420a0(0x2f0)](_0x1420a0(0x262)+_0x1b3180[_0x1420a0(0x313)]),console[_0x1420a0(0x2f0)](_0x1420a0(0x25e)+_0x1cbe82));const _0x2b3a74=await withSpinner(_0x1420a0(0x240)+_0x1cbe82+_0x1420a0(0x2ae),()=>_0x133400[_0x1420a0(0x204)]['getParentFull'](_0x1cbe82),{'verbose':_0x1b3180[_0x1420a0(0x29a)]}),_0x17000a=_0x2b3a74[_0x1420a0(0x330)],_0x55a90a=await loadJSONFromOptions(_0x1b3180[_0x1420a0(0x38c)],_0x1b3180[_0x1420a0(0x2eb)]),_0x3fa320=await loadJSONFromOptions(_0x1b3180[_0x1420a0(0x39b)],_0x1b3180[_0x1420a0(0x286)]),_0x5e97e1={'name':_0x17000a[_0x1420a0(0x24c)],'description':_0x1b3180['description']!==undefined?_0x1b3180['description']:_0x17000a[_0x1420a0(0x2cf)],'scheduleType':_0x1b3180[_0x1420a0(0x390)]!==undefined?_0x1b3180['scheduleType']:_0x17000a[_0x1420a0(0x390)],'scheduleOption':_0x1b3180['scheduleOption']!==undefined?_0x1b3180[_0x1420a0(0x2fa)]:_0x17000a[_0x1420a0(0x2fa)],'timezone':_0x1b3180[_0x1420a0(0x298)]!==undefined?_0x1b3180[_0x1420a0(0x298)]:_0x17000a[_0x1420a0(0x298)],'master':_0x17000a[_0x1420a0(0x1ca)],'attributes':_0x55a90a?[..._0x17000a[_0x1420a0(0x2a0)]||[],..._0x55a90a]:_0x17000a[_0x1420a0(0x2a0)],'behaviors':_0x3fa320?[..._0x17000a[_0x1420a0(0x264)]||[],..._0x3fa320]:_0x17000a[_0x1420a0(0x264)],'customerGroup':_0x17000a[_0x1420a0(0x33d)]},_0x4090ef=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x1cbe82+_0x1420a0(0x2ae),()=>_0x133400[_0x1420a0(0x204)][_0x1420a0(0x2c5)](_0x1cbe82,_0x5e97e1),{'verbose':_0x1b3180[_0x1420a0(0x29a)]}),_0x576196=_0x4090ef[_0x1420a0(0x330)];return console[_0x1420a0(0x2f0)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x576196['name']+'\x27'),await handleSDKOutput([_0x576196],_0x1b3180),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0x59c470(0x28f);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x346);async[a31_0x59c470(0x25d)](_0x3329d5){const _0x5a8ba5=a31_0x59c470,{options:_0xd11737,args:_0xb24a88,tdx:_0xf8fc3}=_0x3329d5,_0x24f864=_0xd11737,_0x8bd229=_0xb24a88[0x0]||_0xd11737['parentSegment'];if(!_0x8bd229)return showParentSegmentNotSetError(_0x5a8ba5(0x221)+_0x5a8ba5(0x2e5)),0x1;if(_0x24f864[_0x5a8ba5(0x318)]&&_0x24f864[_0x5a8ba5(0x326)])return console['error'](a31_0x388bb2[_0x5a8ba5(0x37a)](_0x5a8ba5(0x397))),console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x396)](_0x5a8ba5(0x26f))),console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x396)]('using\x20the\x20default\x20path:\x20'+PARENT_SEGMENT_DIR+_0x5a8ba5(0x27b))),console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x351)](_0x5a8ba5(0x3b3))),0x1;const _0x31f5c0=_0x24f864[_0x5a8ba5(0x326)]||a31_0x2b29d0[_0x5a8ba5(0x2e1)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x8bd229)+_0x5a8ba5(0x303));_0x24f864['verbose']&&(console[_0x5a8ba5(0x2f0)](_0x5a8ba5(0x262)+_0x24f864[_0x5a8ba5(0x313)]),console[_0x5a8ba5(0x2f0)](_0x5a8ba5(0x25e)+_0x8bd229),console[_0x5a8ba5(0x2f0)](_0x5a8ba5(0x2c8)+_0x31f5c0));const _0x5c940d=await withSpinner(_0x5a8ba5(0x3c1)+_0x8bd229+_0x5a8ba5(0x2ae),()=>_0xf8fc3['segment'][_0x5a8ba5(0x24e)](_0x8bd229),{'verbose':_0x24f864[_0x5a8ba5(0x29a)]}),_0x4c8e54=_0x5c940d[_0x5a8ba5(0x330)];if(existsSync(_0x31f5c0)){const _0x5247c8=readFileSync(_0x31f5c0,_0x5a8ba5(0x1a5)),_0x49212d=generateDiff(_0x5247c8,_0x4c8e54);if(!hasChanges(_0x49212d))console[_0x5a8ba5(0x2f0)](a31_0x388bb2['green']('✔')+_0x5a8ba5(0x389)+a31_0x388bb2[_0x5a8ba5(0x351)](_0x31f5c0)+_0x5a8ba5(0x267));else{console[_0x5a8ba5(0x2f0)](_0x5a8ba5(0x316)+_0x31f5c0+'\x27:'),console[_0x5a8ba5(0x2f0)]('─'['repeat'](0x3c)),console['error'](formatDiffWithColors(_0x49212d)),console['error']('─'[_0x5a8ba5(0x282)](0x3c));if(!_0x24f864[_0x5a8ba5(0x2aa)]){if(!isInteractive())return console['error'](a31_0x388bb2[_0x5a8ba5(0x37a)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x396)](_0x5a8ba5(0x3c0))),0x1;const _0x70a492=await confirmKey('Overwrite\x20\x27'+_0x31f5c0+'\x27?');if(!_0x70a492)return console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x361)](_0x5a8ba5(0x3b1))),0x1;}writeFileSync(_0x31f5c0,_0x4c8e54,'utf-8'),console['error'](a31_0x388bb2['green']('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x388bb2[_0x5a8ba5(0x351)](_0x31f5c0));}}else{const _0x56e242=a31_0x2b29d0['dirname'](_0x31f5c0);!existsSync(_0x56e242)&&mkdirSync(_0x56e242,{'recursive':!![]}),writeFileSync(_0x31f5c0,_0x4c8e54,_0x5a8ba5(0x1a5)),console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x327)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0x388bb2[_0x5a8ba5(0x351)](_0x31f5c0));}return saveSessionContext({'parent_segment':_0x8bd229},_0x24f864[_0x5a8ba5(0x3bb)]),console[_0x5a8ba5(0x2f0)](a31_0x388bb2[_0x5a8ba5(0x327)]('✔')+_0x5a8ba5(0x213)+a31_0x388bb2[_0x5a8ba5(0x396)](_0x5a8ba5(0x202))+_0x5a8ba5(0x1da)+a31_0x388bb2[_0x5a8ba5(0x351)](_0x8bd229)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x210);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x2e7);async[a31_0x59c470(0x25d)](_0x46ce09){const _0x40d03c=a31_0x59c470,{options:_0x214e76,args:_0x450df7,tdx:_0x2b10e9}=_0x46ce09,_0x3b07b7=_0x214e76,_0x3e1bba=_0x450df7[0x0]||_0x214e76[_0x40d03c(0x2d5)];if(!_0x3e1bba)return showParentSegmentNotSetError(_0x40d03c(0x362)+_0x40d03c(0x284)),0x1;const _0x2bb37e=resolveYamlFile(_0x3e1bba);if(!existsSync(_0x2bb37e))return showFileNotFoundError(_0x2bb37e,_0x3e1bba),0x1;_0x3b07b7['verbose']&&(console[_0x40d03c(0x2f0)](_0x40d03c(0x262)+_0x3b07b7[_0x40d03c(0x313)]),console['error']('YAML\x20file:\x20'+_0x2bb37e));let _0x4bbe1d;try{_0x4bbe1d=readFileSync(_0x2bb37e,'utf-8');}catch(_0x5685ae){const _0x405ade=_0x5685ae instanceof Error?_0x5685ae[_0x40d03c(0x2b6)]:String(_0x5685ae);return console[_0x40d03c(0x2f0)](_0x40d03c(0x1e7)+_0x405ade),0x1;}const _0x278605=await withSpinner(_0x40d03c(0x30f),()=>_0x2b10e9['segment'][_0x40d03c(0x1a8)](_0x4bbe1d),{'verbose':_0x3b07b7[_0x40d03c(0x29a)]}),_0x2c8da3=_0x278605[_0x40d03c(0x330)],{isNew:_0x471c21,name:_0x7dde9a,hasChanges:_0x21fd52,diffFormatted:_0x45a936}=_0x2c8da3;if(!_0x21fd52)return console[_0x40d03c(0x2f0)]('✔\x20No\x20changes\x20-\x20\x27'+_0x7dde9a+'\x27\x20is\x20already\x20up\x20to\x20date'),0x0;_0x471c21?console['error'](_0x40d03c(0x22b)+_0x7dde9a+'\x27:'):console[_0x40d03c(0x2f0)](_0x40d03c(0x3a1)+_0x7dde9a+'\x27:');console[_0x40d03c(0x2f0)]('─'[_0x40d03c(0x282)](0x3c)),console[_0x40d03c(0x2f0)](_0x45a936),console[_0x40d03c(0x2f0)]('─'[_0x40d03c(0x282)](0x3c));const _0x2d0567=_0x471c21?'Create\x20parent\x20segment\x20\x27'+_0x7dde9a+'\x27?':_0x40d03c(0x386)+_0x7dde9a+'\x27?';if(!_0x3b07b7[_0x40d03c(0x2aa)]){if(!isInteractive())return console['error'](a31_0x388bb2['red'](_0x40d03c(0x1b3)),_0x40d03c(0x280)),console[_0x40d03c(0x2f0)](a31_0x388bb2['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x287a36=await confirmKey(_0x2d0567);if(!_0x287a36)return console[_0x40d03c(0x2f0)](a31_0x388bb2['yellow'](_0x40d03c(0x3b1))),0x1;}const _0x1c726f=_0x471c21?_0x40d03c(0x357):_0x40d03c(0x1ae),_0x466802=await withSpinner(_0x1c726f+'\x20parent\x20segment\x20\x27'+_0x7dde9a+_0x40d03c(0x2ae),()=>_0x2c8da3[_0x40d03c(0x1d0)](),{'verbose':_0x3b07b7[_0x40d03c(0x29a)]}),_0x4d805a=_0x466802[_0x40d03c(0x330)],_0x485a1c=getConsoleNextUrl(_0x3b07b7[_0x40d03c(0x313)],_0x40d03c(0x29d)+_0x4d805a['id']),_0x28729f=_0x471c21?_0x40d03c(0x302):_0x40d03c(0x1dd);return console[_0x40d03c(0x2f0)]('✔\x20'+_0x28729f+_0x40d03c(0x35c)+_0x4d805a['name']+'\x27'),console[_0x40d03c(0x2f0)]('\x20\x20'+_0x485a1c),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a31_0x59c470(0x24c)]='segment:parent:validate';[a31_0x59c470(0x2cf)]=a31_0x59c470(0x3a8);async[a31_0x59c470(0x25d)](_0x842a4d){const _0x1428f7=a31_0x59c470,{options:_0x233d9f,args:_0x2c4371,tdx:_0x151546}=_0x842a4d,_0x138adc=_0x233d9f,_0x284c39=_0x2c4371[0x0]||_0x233d9f[_0x1428f7(0x2d5)];if(!_0x284c39)return showParentSegmentNotSetError(_0x1428f7(0x308)+_0x1428f7(0x322)+_0x1428f7(0x305)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x1428f7(0x236)+_0x1428f7(0x1f1)),0x1;const _0x18269b=resolveYamlFile(_0x284c39);if(!existsSync(_0x18269b))return showFileNotFoundError(_0x18269b,_0x284c39),0x1;_0x138adc[_0x1428f7(0x29a)]&&(console['error'](_0x1428f7(0x262)+_0x138adc[_0x1428f7(0x313)]),console[_0x1428f7(0x2f0)](_0x1428f7(0x371)+_0x18269b));let _0x2010c3;try{_0x2010c3=readFileSync(_0x18269b,'utf-8');}catch(_0x4268b7){const _0x1d3789=_0x4268b7 instanceof Error?_0x4268b7[_0x1428f7(0x2b6)]:String(_0x4268b7);return console[_0x1428f7(0x2f0)](_0x1428f7(0x1e7)+_0x1d3789),0x1;}const _0x3faa11=createCommandSpinner(a31_0x388bb2[_0x1428f7(0x396)](_0x1428f7(0x34c)),{'verbose':_0x138adc[_0x1428f7(0x29a)]});_0x3faa11[_0x1428f7(0x2c0)]();const _0x302874={'onProgress':_0x45da99=>{const _0x537c02=_0x1428f7;_0x3faa11[_0x537c02(0x2d0)]=formatProgressMessage(_0x45da99);}};if(_0x138adc[_0x1428f7(0x1ca)])_0x302874[_0x1428f7(0x1ca)]=!![];if(_0x138adc['enriched'])_0x302874['enriched']=!![];_0x138adc[_0x1428f7(0x255)]&&(_0x302874[_0x1428f7(0x255)]=_0x138adc[_0x1428f7(0x255)]);_0x138adc[_0x1428f7(0x288)]&&(_0x302874[_0x1428f7(0x288)]=_0x138adc[_0x1428f7(0x288)]);if(_0x138adc[_0x1428f7(0x2ca)])_0x302874[_0x1428f7(0x2ca)]=_0x138adc['interval'];let _0x53398b;try{_0x53398b=await _0x151546['segment'][_0x1428f7(0x23f)](_0x2010c3,_0x302874),_0x3faa11[_0x1428f7(0x224)]();}catch(_0xe81207){_0x3faa11['stop']();throw _0xe81207;}const _0x5e59f6=_0x138adc[_0x1428f7(0x2ca)]||_0x1428f7(0x2ba);return this[_0x1428f7(0x246)](_0x53398b,_0x302874,_0x18269b,_0x5e59f6),_0x53398b[_0x1428f7(0x2c9)]?0x0:0x1;}[a31_0x59c470(0x246)](_0x44082c,_0x252f55,_0xf303c9,_0x3f9317){const _0x4130ec=a31_0x59c470;console[_0x4130ec(0x2f0)]('\x0a'+a31_0x388bb2[_0x4130ec(0x38a)]('Validate:')+'\x20'+_0x44082c[_0x4130ec(0x24c)]),console['error']('═'[_0x4130ec(0x282)](0x3c)),this['displayMasterInfo'](_0x44082c);if(typeof _0x252f55[_0x4130ec(0x255)]==='string'){this[_0x4130ec(0x2df)](_0x44082c),this[_0x4130ec(0x1dc)](_0x44082c),this[_0x4130ec(0x1f9)](_0xf303c9,_0x3f9317,_0x4130ec(0x255),_0x252f55[_0x4130ec(0x255)]);return;}if(_0x252f55[_0x4130ec(0x255)]===!![]){this[_0x4130ec(0x2df)](_0x44082c),this[_0x4130ec(0x1dc)](_0x44082c),this[_0x4130ec(0x1f9)](_0xf303c9,_0x3f9317,_0x4130ec(0x2a0));return;}if(typeof _0x252f55[_0x4130ec(0x288)]===_0x4130ec(0x1c5)){this['displayBehaviorsStats'](_0x44082c,_0x3f9317),this[_0x4130ec(0x1dc)](_0x44082c),this[_0x4130ec(0x1f9)](_0xf303c9,_0x3f9317,_0x4130ec(0x288),_0x252f55[_0x4130ec(0x288)]);return;}if(_0x252f55[_0x4130ec(0x288)]===!![]){this[_0x4130ec(0x260)](_0x44082c,_0x3f9317),this['displaySummary'](_0x44082c),this['displayPreviewHints'](_0xf303c9,_0x3f9317,'behaviors');return;}this[_0x4130ec(0x2df)](_0x44082c),this[_0x4130ec(0x260)](_0x44082c,_0x3f9317),this[_0x4130ec(0x289)](_0x44082c),this[_0x4130ec(0x1dc)](_0x44082c),this[_0x4130ec(0x1f9)](_0xf303c9,_0x3f9317,_0x4130ec(0x22e));}[a31_0x59c470(0x289)](_0x4e5851){displayRealtimeValidation(_0x4e5851);}[a31_0x59c470(0x1f9)](_0x103a24,_0x3413c2,_0x112819,_0x834d95){const _0x3a37ad=a31_0x59c470;console[_0x3a37ad(0x2f0)]('\x0a'+a31_0x388bb2[_0x3a37ad(0x396)](_0x3a37ad(0x1b2)));const _0x4acc51=_0x3413c2!=='-1d'?_0x3a37ad(0x347)+_0x3413c2:'';if(_0x112819==='attribute'&&_0x834d95)console[_0x3a37ad(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3a37ad(0x396)](_0x3a37ad(0x310)+_0x103a24+'\x20--attribute\x20\x22'+_0x834d95+'\x22'+_0x4acc51));else{if(_0x112819===_0x3a37ad(0x288)&&_0x834d95)console[_0x3a37ad(0x2f0)]('\x20\x20'+a31_0x388bb2['dim'](_0x3a37ad(0x310)+_0x103a24+_0x3a37ad(0x300)+_0x834d95+'\x22'+_0x4acc51));else(_0x112819==='attributes'||_0x112819===_0x3a37ad(0x22e))&&console[_0x3a37ad(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3a37ad(0x396)](_0x3a37ad(0x310)+_0x103a24+'\x20--attribute\x20\x22<name>\x22'+_0x4acc51));}(_0x112819==='behaviors'||_0x112819==='all')&&console['error']('\x20\x20'+a31_0x388bb2[_0x3a37ad(0x396)](_0x3a37ad(0x310)+_0x103a24+'\x20--behavior\x20\x22<name>\x22'+_0x4acc51)),_0x112819===_0x3a37ad(0x22e)&&console['error']('\x20\x20'+a31_0x388bb2[_0x3a37ad(0x396)](_0x3a37ad(0x310)+_0x103a24+_0x3a37ad(0x1cd)+_0x4acc51));}[a31_0x59c470(0x353)](_0x279ad0){const _0x47040f=a31_0x59c470,{master:_0x45cd42}=_0x279ad0,_0x207fa4=_0x45cd42[_0x47040f(0x272)]?a31_0x388bb2[_0x47040f(0x327)]('✔'):a31_0x388bb2[_0x47040f(0x37a)]('✘');console[_0x47040f(0x2f0)]('\x0a'+a31_0x388bb2[_0x47040f(0x396)](_0x47040f(0x25c))),console[_0x47040f(0x2f0)](_0x207fa4+'\x20'+a31_0x388bb2[_0x47040f(0x38a)](_0x45cd42[_0x47040f(0x1fe)]+'.'+_0x45cd42[_0x47040f(0x3b6)])),_0x45cd42['schemaValid']?_0x45cd42[_0x47040f(0x37d)]!==undefined&&console[_0x47040f(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x47040f(0x396)](_0x47040f(0x1bc))+'\x20'+a31_0x388bb2['cyan'](formatRows(_0x45cd42[_0x47040f(0x37d)]))):console[_0x47040f(0x2f0)]('\x20\x20'+a31_0x388bb2['red'](_0x47040f(0x1ee))+'\x20'+_0x45cd42['schemaError']);}[a31_0x59c470(0x2df)](_0x4815e0){const _0x3aee49=a31_0x59c470;if(_0x4815e0[_0x3aee49(0x2a0)][_0x3aee49(0x3bd)]===0x0)return;console[_0x3aee49(0x2f0)]('\x0a'+a31_0x388bb2[_0x3aee49(0x396)](_0x3aee49(0x237)));for(const _0x5a52c3 of _0x4815e0[_0x3aee49(0x2a0)]){const _0x52c47e=_0x5a52c3[_0x3aee49(0x272)]?a31_0x388bb2[_0x3aee49(0x327)]('✔'):a31_0x388bb2[_0x3aee49(0x37a)]('✘');let _0x42031a='';if(_0x5a52c3[_0x3aee49(0x272)]&&_0x5a52c3[_0x3aee49(0x1f5)]!==undefined&&_0x5a52c3[_0x3aee49(0x220)]!==undefined){const _0x2f115d=_0x5a52c3[_0x3aee49(0x220)][_0x3aee49(0x2e9)](0x1),_0x21f8f2=_0x5a52c3[_0x3aee49(0x220)]>=0x50?a31_0x388bb2['green']:_0x5a52c3[_0x3aee49(0x220)]>=0x32?a31_0x388bb2['yellow']:a31_0x388bb2[_0x3aee49(0x37a)];_0x42031a='\x20'+a31_0x388bb2[_0x3aee49(0x396)](_0x3aee49(0x321))+'\x20'+_0x21f8f2(_0x2f115d+'%')+'\x20('+formatRows(_0x5a52c3[_0x3aee49(0x1f5)])+'\x20rows)';}console[_0x3aee49(0x2f0)](_0x52c47e+'\x20'+a31_0x388bb2['bold'](_0x5a52c3[_0x3aee49(0x24c)])+_0x42031a),console['error']('\x20\x20'+a31_0x388bb2['dim'](_0x3aee49(0x2d3))+'\x20'+a31_0x388bb2[_0x3aee49(0x38a)](_0x5a52c3[_0x3aee49(0x1fe)]+'.'+_0x5a52c3['table']));const _0x38fd8a=_0x5a52c3[_0x3aee49(0x2c3)]===_0x5a52c3[_0x3aee49(0x265)]?a31_0x388bb2[_0x3aee49(0x396)]('Join\x20on:')+'\x20'+_0x5a52c3[_0x3aee49(0x2c3)]:a31_0x388bb2['dim'](_0x3aee49(0x2f6))+'\x20'+_0x5a52c3[_0x3aee49(0x2c3)]+_0x3aee49(0x1da)+_0x5a52c3[_0x3aee49(0x265)];console[_0x3aee49(0x2f0)]('\x20\x20'+_0x38fd8a),console[_0x3aee49(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3aee49(0x396)](_0x3aee49(0x277))),this[_0x3aee49(0x1c9)](_0x5a52c3[_0x3aee49(0x381)]),!_0x5a52c3[_0x3aee49(0x272)]&&console[_0x3aee49(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3aee49(0x37a)]('Error:')+'\x20'+_0x5a52c3[_0x3aee49(0x1fa)]);}}[a31_0x59c470(0x260)](_0x1efecb,_0x3ceced){const _0x8ebf3f=a31_0x59c470;if(_0x1efecb[_0x8ebf3f(0x264)][_0x8ebf3f(0x3bd)]===0x0)return;console[_0x8ebf3f(0x2f0)]('\x0a'+a31_0x388bb2['dim'](_0x8ebf3f(0x2ac))+'\x20'+a31_0x388bb2[_0x8ebf3f(0x396)]('('+_0x3ceced+')'));for(const _0x3b6013 of _0x1efecb[_0x8ebf3f(0x264)]){const _0x434146=_0x3b6013['schemaValid']?a31_0x388bb2[_0x8ebf3f(0x327)]('✔'):a31_0x388bb2['red']('✘');let _0x568602='';if(_0x3b6013[_0x8ebf3f(0x272)]&&_0x3b6013[_0x8ebf3f(0x217)]!==undefined&&_0x3b6013[_0x8ebf3f(0x329)]!==undefined){const _0x114976=_0x3b6013['customerPercent']?.[_0x8ebf3f(0x2e9)](0x1)||'?',_0x50a270=(_0x3b6013[_0x8ebf3f(0x378)]??0x0)>=0x32?a31_0x388bb2[_0x8ebf3f(0x327)]:(_0x3b6013[_0x8ebf3f(0x378)]??0x0)>=0x14?a31_0x388bb2[_0x8ebf3f(0x361)]:a31_0x388bb2[_0x8ebf3f(0x37a)];_0x568602='\x20'+a31_0x388bb2[_0x8ebf3f(0x396)](_0x8ebf3f(0x1c6))+'\x20'+_0x50a270(formatRows(_0x3b6013[_0x8ebf3f(0x217)]))+'\x20('+_0x114976+'%)\x20'+a31_0x388bb2[_0x8ebf3f(0x396)](_0x8ebf3f(0x200))+'\x20'+a31_0x388bb2[_0x8ebf3f(0x351)](formatRows(_0x3b6013[_0x8ebf3f(0x329)]));}console[_0x8ebf3f(0x2f0)](_0x434146+'\x20'+a31_0x388bb2['bold'](_0x3b6013[_0x8ebf3f(0x24c)])+_0x568602),console[_0x8ebf3f(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x8ebf3f(0x396)]('Source:')+'\x20'+a31_0x388bb2[_0x8ebf3f(0x38a)](_0x3b6013[_0x8ebf3f(0x1fe)]+'.'+_0x3b6013[_0x8ebf3f(0x3b6)]));const _0x8adcad=_0x3b6013[_0x8ebf3f(0x2c3)]===_0x3b6013[_0x8ebf3f(0x265)]?a31_0x388bb2[_0x8ebf3f(0x396)](_0x8ebf3f(0x28e))+'\x20'+_0x3b6013[_0x8ebf3f(0x2c3)]:a31_0x388bb2['dim'](_0x8ebf3f(0x2f6))+'\x20'+_0x3b6013['joinKey']+_0x8ebf3f(0x1da)+_0x3b6013[_0x8ebf3f(0x265)];console[_0x8ebf3f(0x2f0)]('\x20\x20'+_0x8adcad),console[_0x8ebf3f(0x2f0)]('\x20\x20'+a31_0x388bb2['dim'](_0x8ebf3f(0x277))),this[_0x8ebf3f(0x1c9)](_0x3b6013[_0x8ebf3f(0x381)]),!_0x3b6013[_0x8ebf3f(0x272)]&&console[_0x8ebf3f(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x8ebf3f(0x37a)](_0x8ebf3f(0x1ee))+'\x20'+_0x3b6013[_0x8ebf3f(0x1fa)]);}}[a31_0x59c470(0x1c9)](_0x1cd843){const _0x14e4dd=a31_0x59c470;for(const _0x1fbb03 of _0x1cd843){_0x1fbb03['label']===_0x1fbb03[_0x14e4dd(0x3a2)]||_0x1fbb03[_0x14e4dd(0x3a2)]==='*'?console[_0x14e4dd(0x2f0)](_0x14e4dd(0x368)+_0x1fbb03[_0x14e4dd(0x296)]):console[_0x14e4dd(0x2f0)](_0x14e4dd(0x368)+_0x1fbb03[_0x14e4dd(0x296)]+'\x20'+a31_0x388bb2['dim']('('+_0x1fbb03[_0x14e4dd(0x3a2)]+')'));}}[a31_0x59c470(0x1dc)](_0x1f34a0){const _0xcd7bd4=a31_0x59c470;console[_0xcd7bd4(0x2f0)]('─'[_0xcd7bd4(0x282)](0x3c));if(_0x1f34a0[_0xcd7bd4(0x334)][_0xcd7bd4(0x3bd)]>0x0){console[_0xcd7bd4(0x2f0)]('\x0a'+a31_0x388bb2[_0xcd7bd4(0x37a)](_0xcd7bd4(0x20f)));for(const _0x3d491f of _0x1f34a0[_0xcd7bd4(0x334)]){console[_0xcd7bd4(0x2f0)]('\x20\x20'+a31_0x388bb2['red']('•')+'\x20'+_0x3d491f);}}_0x1f34a0[_0xcd7bd4(0x2c9)]&&console[_0xcd7bd4(0x2f0)]('\x0a'+a31_0x388bb2[_0xcd7bd4(0x327)]('✔')+_0xcd7bd4(0x1c0));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']='segment:parent:preview';[a31_0x59c470(0x2cf)]=a31_0x59c470(0x348);async[a31_0x59c470(0x25d)](_0xcdc57d){const _0x47ba67=a31_0x59c470,{options:_0x238b99,args:_0x1dfae2,tdx:_0x2ea181}=_0xcdc57d,_0x5b7590=_0x238b99,_0x20de22=_0x1dfae2[0x0]||_0x238b99['parentSegment'];if(!_0x20de22)return showParentSegmentNotSetError(_0x47ba67(0x3ad)+_0x47ba67(0x2a7)+_0x47ba67(0x1ac)+'\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a'+_0x47ba67(0x39d)+_0x47ba67(0x21c)+_0x47ba67(0x1d2)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x5b7590[_0x47ba67(0x1ca)]&&!_0x5b7590[_0x47ba67(0x255)]&&!_0x5b7590[_0x47ba67(0x288)]&&!_0x5b7590[_0x47ba67(0x2f3)])return console[_0x47ba67(0x2f0)](a31_0x388bb2['red'](_0x47ba67(0x244))),console[_0x47ba67(0x2f0)]('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console[_0x47ba67(0x2f0)](_0x47ba67(0x37c)),console[_0x47ba67(0x2f0)]('\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data'),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x47ba67(0x2f0)](_0x47ba67(0x3b4)),console[_0x47ba67(0x2f0)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x520171=resolveYamlFile(_0x20de22);if(!existsSync(_0x520171))return showFileNotFoundError(_0x520171,_0x20de22),0x1;_0x5b7590[_0x47ba67(0x29a)]&&(console[_0x47ba67(0x2f0)](_0x47ba67(0x262)+_0x5b7590[_0x47ba67(0x313)]),console[_0x47ba67(0x2f0)]('YAML\x20file:\x20'+_0x520171));let _0x2b71b6;try{_0x2b71b6=readFileSync(_0x520171,'utf-8');}catch(_0x34304a){const _0x46db65=_0x34304a instanceof Error?_0x34304a[_0x47ba67(0x2b6)]:String(_0x34304a);return console[_0x47ba67(0x2f0)](_0x47ba67(0x1e7)+_0x46db65),0x1;}let _0x45d288;try{_0x45d288=parseDef(_0x2b71b6);}catch(_0x40d47c){const _0x28a350=_0x40d47c instanceof Error?_0x40d47c['message']:String(_0x40d47c);return console[_0x47ba67(0x2f0)](a31_0x388bb2[_0x47ba67(0x37a)]('Error\x20parsing\x20YAML:\x20'+_0x28a350)),0x1;}if(_0x5b7590[_0x47ba67(0x255)]===!![]||_0x5b7590[_0x47ba67(0x255)]===''){const _0xf18aef=_0x45d288[_0x47ba67(0x2a0)]?.[_0x47ba67(0x1bb)](_0x57d709=>_0x57d709[_0x47ba67(0x24c)])||[];if(_0xf18aef[_0x47ba67(0x3bd)]===0x0)console[_0x47ba67(0x2f0)](a31_0x388bb2[_0x47ba67(0x37a)](_0x47ba67(0x3a3)));else{console[_0x47ba67(0x2f0)](a31_0x388bb2[_0x47ba67(0x37a)](_0x47ba67(0x1cf))),console[_0x47ba67(0x2f0)]('Available\x20attributes:');for(const _0x5bbc6c of _0xf18aef){console['error']('\x20\x20'+a31_0x388bb2[_0x47ba67(0x351)](_0x5bbc6c));}console['error']('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0x20de22+_0x47ba67(0x32f)+_0xf18aef[0x0]+'\x22');}return 0x1;}if(_0x5b7590[_0x47ba67(0x288)]===!![]||_0x5b7590['behavior']===''){const _0x165070=_0x45d288['behaviors']?.[_0x47ba67(0x1bb)](_0x29798e=>_0x29798e['name'])||[];if(_0x165070[_0x47ba67(0x3bd)]===0x0)console[_0x47ba67(0x2f0)](a31_0x388bb2[_0x47ba67(0x37a)]('Error:\x20No\x20behaviors\x20defined\x20in\x20configuration'));else{console['error'](a31_0x388bb2[_0x47ba67(0x37a)](_0x47ba67(0x299))),console[_0x47ba67(0x2f0)](_0x47ba67(0x317));for(const _0x478dc1 of _0x165070){console['error']('\x20\x20'+a31_0x388bb2[_0x47ba67(0x351)](_0x478dc1));}console[_0x47ba67(0x2f0)](_0x47ba67(0x234)+_0x20de22+_0x47ba67(0x300)+_0x165070[0x0]+'\x22');}return 0x1;}const _0x46e955=createCommandSpinner(a31_0x388bb2[_0x47ba67(0x396)]('Fetching\x20sample\x20data...'),{'verbose':_0x5b7590[_0x47ba67(0x29a)]});_0x46e955[_0x47ba67(0x2c0)]();const _0x525c99={'onProgress':_0x31401a=>{const _0x28bab2=_0x47ba67;_0x46e955[_0x28bab2(0x2d0)]=formatProgressMessage(_0x31401a);}};if(_0x5b7590[_0x47ba67(0x1ca)])_0x525c99[_0x47ba67(0x1ca)]=!![];if(_0x5b7590[_0x47ba67(0x255)]&&typeof _0x5b7590[_0x47ba67(0x255)]==='string')_0x525c99['attribute']=_0x5b7590['attribute'];if(_0x5b7590[_0x47ba67(0x288)]&&typeof _0x5b7590[_0x47ba67(0x288)]===_0x47ba67(0x1c5))_0x525c99[_0x47ba67(0x288)]=_0x5b7590[_0x47ba67(0x288)];if(_0x5b7590[_0x47ba67(0x2f3)])_0x525c99[_0x47ba67(0x2f3)]=!![];if(_0x5b7590[_0x47ba67(0x2ca)])_0x525c99[_0x47ba67(0x2ca)]=_0x5b7590[_0x47ba67(0x2ca)];let _0x157bbb;try{_0x157bbb=await _0x2ea181[_0x47ba67(0x204)][_0x47ba67(0x1f3)](_0x2b71b6,_0x525c99),_0x46e955['stop']();}catch(_0x1a821a){_0x46e955[_0x47ba67(0x224)]();throw _0x1a821a;}return await this[_0x47ba67(0x1d8)](_0x157bbb,{'master':_0x5b7590['master'],'attribute':typeof _0x5b7590[_0x47ba67(0x255)]===_0x47ba67(0x1c5)?_0x5b7590[_0x47ba67(0x255)]:undefined,'behavior':typeof _0x5b7590['behavior']===_0x47ba67(0x1c5)?_0x5b7590[_0x47ba67(0x288)]:undefined,'enriched':_0x5b7590[_0x47ba67(0x2f3)]}),_0x157bbb[_0x47ba67(0x2c9)]?0x0:0x1;}async[a31_0x59c470(0x1d8)](_0x425fd6,_0x4ab6f0){const _0x1ac5e0=a31_0x59c470;console['error']('\x0a'+a31_0x388bb2['bold'](_0x1ac5e0(0x1e3))+'\x20'+_0x425fd6[_0x1ac5e0(0x24c)]),console['error']('═'[_0x1ac5e0(0x282)](0x3c));if(_0x4ab6f0[_0x1ac5e0(0x1ca)]&&_0x425fd6['sampleData']){const _0x49d4d7=a31_0x388bb2[_0x1ac5e0(0x396)](_0x1ac5e0(0x1b4))+'\x20'+a31_0x388bb2[_0x1ac5e0(0x38a)](_0x425fd6['master'][_0x1ac5e0(0x1fe)]+'.'+_0x425fd6['master'][_0x1ac5e0(0x3b6)]);await this['displaySampleData'](_0x49d4d7,_0x425fd6[_0x1ac5e0(0x232)]);}else{if(_0x4ab6f0['attribute']&&_0x425fd6['sampleData']){const _0x314936=a31_0x388bb2['dim']('Attribute:')+'\x20'+a31_0x388bb2[_0x1ac5e0(0x38a)](_0x4ab6f0[_0x1ac5e0(0x255)]);await this[_0x1ac5e0(0x201)](_0x314936,_0x425fd6[_0x1ac5e0(0x232)]);}else{if(_0x4ab6f0[_0x1ac5e0(0x288)]&&_0x425fd6[_0x1ac5e0(0x232)]){const _0x5ad726=a31_0x388bb2['dim'](_0x1ac5e0(0x34a))+'\x20'+a31_0x388bb2[_0x1ac5e0(0x38a)](_0x4ab6f0['behavior']);await this['displaySampleData'](_0x5ad726,_0x425fd6['sampleData']);}else{if(_0x4ab6f0['enriched']&&_0x425fd6[_0x1ac5e0(0x232)]){const _0x1c23dd=a31_0x388bb2['dim'](_0x1ac5e0(0x328))+'\x20'+a31_0x388bb2['bold'](_0x1ac5e0(0x212));await this[_0x1ac5e0(0x201)](_0x1c23dd,_0x425fd6['sampleData']);}else!_0x425fd6[_0x1ac5e0(0x232)]&&console['error']('\x0aNo\x20sample\x20data\x20available');}}}if(_0x425fd6[_0x1ac5e0(0x334)]['length']>0x0){console[_0x1ac5e0(0x2f0)]('─'['repeat'](0x3c)),console[_0x1ac5e0(0x2f0)]('\x0a'+a31_0x388bb2['red'](_0x1ac5e0(0x20f)));for(const _0x4d27c0 of _0x425fd6[_0x1ac5e0(0x334)]){console['error']('\x20\x20'+a31_0x388bb2[_0x1ac5e0(0x37a)]('•')+'\x20'+_0x4d27c0);}}}async[a31_0x59c470(0x201)](_0x36d058,_0x21c5b8){const _0x2a3f5b=a31_0x59c470;if(_0x21c5b8[_0x2a3f5b(0x3bd)]===0x0){console[_0x2a3f5b(0x2f0)]('\x0a'+_0x36d058),console[_0x2a3f5b(0x2f0)](_0x2a3f5b(0x1e6));return;}console['error']('\x0a'+_0x36d058);const _0xcda6ac=Object[_0x2a3f5b(0x3bc)](_0x21c5b8[0x0])[_0x2a3f5b(0x1bb)](_0x3e25d0=>({'name':_0x3e25d0,'type':typeof _0x21c5b8[0x0][_0x3e25d0]===_0x2a3f5b(0x278)?_0x2a3f5b(0x1b0):_0x2a3f5b(0x208)})),_0x24b966={'queryId':_0x2a3f5b(0x358),'columns':_0xcda6ac,'data':_0x21c5b8,'stats':{'state':_0x2a3f5b(0x27e),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x21c5b8['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x20321c=formatAsTable(_0x24b966,_0x21c5b8[_0x2a3f5b(0x3bd)],!![]);await writeOutput(_0x20321c,undefined,'table');}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{['name']=a31_0x59c470(0x306);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x216);async[a31_0x59c470(0x25d)](_0x1d4c8a){const _0x3ec1b7=a31_0x59c470,{options:_0x50d1a0,args:_0xc00351,tdx:_0x2e7f2c}=_0x1d4c8a,_0x5d9e13=_0x50d1a0,_0x496047=_0xc00351[0x0]||_0x50d1a0['parentSegment'];if(!_0x496047)return showParentSegmentNotSetError(_0x3ec1b7(0x383)+_0x3ec1b7(0x285)),0x1;const _0x3dca26=resolveYamlFile(_0x496047);if(existsSync(_0x3dca26)){_0x5d9e13[_0x3ec1b7(0x29a)]&&console[_0x3ec1b7(0x2f0)](_0x3ec1b7(0x1ef)+_0x3dca26);let _0x2e9ad0;try{_0x2e9ad0=readFileSync(_0x3dca26,_0x3ec1b7(0x1a5));}catch(_0x5067a2){const _0x2c483e=_0x5067a2 instanceof Error?_0x5067a2[_0x3ec1b7(0x2b6)]:String(_0x5067a2);return console[_0x3ec1b7(0x2f0)]('Error\x20reading\x20file:\x20'+_0x2c483e),0x1;}const _0x4dddf7=await withSpinner(_0x3ec1b7(0x30f),()=>_0x2e7f2c[_0x3ec1b7(0x204)][_0x3ec1b7(0x1a8)](_0x2e9ad0),{'verbose':_0x5d9e13[_0x3ec1b7(0x29a)]}),_0x412bef=_0x4dddf7['data'],{isNew:_0x50c439,name:_0x2e1ebf,hasChanges:_0x1aee74,diffFormatted:_0x2f5d98}=_0x412bef;if(_0x1aee74){_0x50c439?console[_0x3ec1b7(0x2f0)](_0x3ec1b7(0x22b)+_0x2e1ebf+'\x27:'):console[_0x3ec1b7(0x2f0)](_0x3ec1b7(0x3a1)+_0x2e1ebf+'\x27:');console[_0x3ec1b7(0x2f0)]('─'[_0x3ec1b7(0x282)](0x3c)),console[_0x3ec1b7(0x2f0)](_0x2f5d98),console[_0x3ec1b7(0x2f0)]('─'['repeat'](0x3c));const _0x254f3e=_0x50c439?'Create\x20parent\x20segment\x20\x27'+_0x2e1ebf+_0x3ec1b7(0x206):'Apply\x20changes\x20to\x20\x27'+_0x2e1ebf+'\x27\x20and\x20run\x20workflow?';if(!_0x5d9e13[_0x3ec1b7(0x2aa)]){if(!isInteractive())return console[_0x3ec1b7(0x2f0)](a31_0x388bb2[_0x3ec1b7(0x37a)](_0x3ec1b7(0x1b3)),_0x3ec1b7(0x280)),console[_0x3ec1b7(0x2f0)](a31_0x388bb2['dim'](_0x3ec1b7(0x3c0))),0x1;const _0x4ebaba=await confirmKey(_0x254f3e);if(!_0x4ebaba)return console[_0x3ec1b7(0x2f0)](a31_0x388bb2[_0x3ec1b7(0x361)](_0x3ec1b7(0x3b1))),0x1;}const _0x4686a8=_0x50c439?'Creating':'Updating';await withSpinner(_0x4686a8+_0x3ec1b7(0x35c)+_0x2e1ebf+_0x3ec1b7(0x2ae),()=>_0x412bef[_0x3ec1b7(0x1d0)](),{'verbose':_0x5d9e13[_0x3ec1b7(0x29a)]});const _0xacc1a9=_0x50c439?_0x3ec1b7(0x302):'Updated';console[_0x3ec1b7(0x2f0)]('✔\x20'+_0xacc1a9+'\x20parent\x20segment\x20\x27'+_0x2e1ebf+'\x27');}else console[_0x3ec1b7(0x2f0)](_0x3ec1b7(0x399)+_0x2e1ebf+_0x3ec1b7(0x2f4));}const _0x55929a=await withSpinner(_0x3ec1b7(0x22c)+_0x496047+_0x3ec1b7(0x2ae),()=>_0x2e7f2c['segment'][_0x3ec1b7(0x203)](_0x496047),{'verbose':_0x5d9e13[_0x3ec1b7(0x29a)]}),_0x491cf0=_0x55929a[_0x3ec1b7(0x330)],_0x123ac9=getConsoleUrl(_0x5d9e13[_0x3ec1b7(0x313)],_0x3ec1b7(0x335)+_0x491cf0['workflowId']+_0x3ec1b7(0x38b)+_0x491cf0['workflowSessionId']+_0x3ec1b7(0x2e0)+_0x491cf0['workflowAttemptId']);return console['error']('\x0a✔\x20Workflow\x20started'),console[_0x3ec1b7(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3ec1b7(0x396)](_0x3ec1b7(0x26b))+'\x20'+_0x491cf0['audienceId']),console[_0x3ec1b7(0x2f0)]('\x20\x20'+a31_0x388bb2['dim']('Status:')+'\x20'+_0x491cf0[_0x3ec1b7(0x293)]),console[_0x3ec1b7(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3ec1b7(0x396)]('Session:')+'\x20'+_0x491cf0[_0x3ec1b7(0x375)]),console[_0x3ec1b7(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x3ec1b7(0x396)](_0x3ec1b7(0x340))+'\x20'+_0x491cf0['workflowAttemptId']),console[_0x3ec1b7(0x2f0)]('\x20\x20'+_0x123ac9),console[_0x3ec1b7(0x2f0)]('\x0a'+a31_0x388bb2[_0x3ec1b7(0x396)]('To\x20cancel:')+_0x3ec1b7(0x1d5)+_0x491cf0[_0x3ec1b7(0x230)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x27c);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x2c7);async[a31_0x59c470(0x25d)](_0x1e9fbd){const _0x3a3643=a31_0x59c470,{options:_0x5d31c3,args:_0x29b1e3,tdx:_0x36fdc9}=_0x1e9fbd,_0x5da550=_0x29b1e3[0x0]||_0x5d31c3[_0x3a3643(0x2d5)];if(!_0x5da550)return showParentSegmentNotSetError(_0x3a3643(0x29b)+_0x3a3643(0x1a3)),0x1;_0x5d31c3[_0x3a3643(0x29a)]&&(console[_0x3a3643(0x2f0)](_0x3a3643(0x262)+_0x5d31c3['site']),console[_0x3a3643(0x2f0)](_0x3a3643(0x25e)+_0x5da550));const _0x19de77=await withSpinner(_0x3a3643(0x2fe)+_0x5da550+_0x3a3643(0x2ae),()=>_0x36fdc9[_0x3a3643(0x204)]['listFields'](_0x5da550),{'verbose':_0x5d31c3[_0x3a3643(0x29a)]}),_0x5eeb9a=_0x19de77[_0x3a3643(0x330)];console['error']('✔\x20Found\x20'+_0x5eeb9a[_0x3a3643(0x3bd)]+_0x3a3643(0x2ce)+(_0x5eeb9a[_0x3a3643(0x3bd)]!==0x1?'s':''));if(_0x5d31c3[_0x3a3643(0x1cc)]||_0x5d31c3['jsonl'])return await handleSDKOutput(_0x5eeb9a,_0x5d31c3),0x0;return displayFieldsHumanReadable(_0x5eeb9a,_0x5da550),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{['name']=a31_0x59c470(0x3a4);[a31_0x59c470(0x2cf)]='Show\x20parent\x20segment\x20details';async['execute'](_0x47279c){const _0x24290c=a31_0x59c470,{options:_0x51e061,args:_0x9e4dc6,tdx:_0x4a345f}=_0x47279c,_0x31c760=_0x51e061,_0x57f47f=_0x9e4dc6[0x0]||_0x51e061[_0x24290c(0x2d5)];if(!_0x57f47f)return showParentSegmentNotSetError(_0x24290c(0x25f)+_0x24290c(0x31a)+_0x24290c(0x305)+_0x24290c(0x336)),0x1;_0x51e061[_0x24290c(0x29a)]&&(console['error']('Site:\x20'+_0x51e061[_0x24290c(0x313)]),console[_0x24290c(0x2f0)](_0x24290c(0x25e)+_0x57f47f));const _0x31e807=await withSpinner(_0x24290c(0x3c1)+_0x57f47f+_0x24290c(0x2ae),()=>_0x4a345f[_0x24290c(0x204)][_0x24290c(0x1e5)](_0x57f47f),{'verbose':_0x51e061[_0x24290c(0x29a)]}),_0x2169f0=_0x31e807['data'];if(_0x31c760[_0x24290c(0x309)]){const _0x1f7ac9=getConsoleNextUrl(_0x31c760[_0x24290c(0x313)],_0x24290c(0x29d)+_0x2169f0['id']);return console[_0x24290c(0x2f0)](a31_0x388bb2['green']('✔')+_0x24290c(0x33e)+a31_0x388bb2[_0x24290c(0x351)](_0x1f7ac9)),openBrowser(_0x1f7ac9),0x0;}return await handleSingleObjectOutput(_0x2169f0,_0x51e061),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x315);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x243);async[a31_0x59c470(0x25d)](_0x5b7ccd){const _0x42e6e2=a31_0x59c470,{options:_0x5629b6,args:_0x33e527,tdx:_0x3fec85}=_0x5b7ccd,_0x16631f=_0x5629b6,_0x19d7c3=_0x33e527[0x0]||_0x5629b6['parentSegment'];if(!_0x19d7c3)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20desc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20desc\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Describe\x20all\x20tables\x20for\x20parent\x20segment\x0a\x0a'+'Options:\x0a'+_0x42e6e2(0x2b2)),0x1;_0x5629b6[_0x42e6e2(0x29a)]&&(console['error'](_0x42e6e2(0x262)+_0x5629b6['site']),console[_0x42e6e2(0x2f0)](_0x42e6e2(0x25e)+_0x19d7c3));const _0xe5918d=await withSpinner(_0x42e6e2(0x36f)+_0x19d7c3+_0x42e6e2(0x2ae),()=>_0x3fec85['segment'][_0x42e6e2(0x2a6)](_0x19d7c3),{'verbose':_0x5629b6['verbose']}),_0x2e6a4d=_0xe5918d[_0x42e6e2(0x330)],_0x399e08=_0x3fec85[_0x42e6e2(0x204)]['getOutputDatabaseName'](_0x2e6a4d);if(_0x16631f['output']){const _0x419d3f=await this['collectSchema'](_0x5b7ccd,_0x19d7c3,_0x2e6a4d,_0x399e08),_0x500016=this[_0x42e6e2(0x1df)](_0x419d3f);writeFileSync(_0x16631f['output'],_0x500016);const _0x2b40cf=_0x419d3f[_0x42e6e2(0x320)][_0x42e6e2(0x381)]['length']+_0x419d3f[_0x42e6e2(0x264)][_0x42e6e2(0x291)]((_0x529b72,_0x13a957)=>_0x529b72+_0x13a957[_0x42e6e2(0x381)][_0x42e6e2(0x3bd)],0x0),_0x55079f=_0x419d3f[_0x42e6e2(0x264)][_0x42e6e2(0x2c2)](_0xa73785=>_0xa73785[_0x42e6e2(0x381)][_0x42e6e2(0x3bd)]===0x0)['length'];return console[_0x42e6e2(0x2b1)]('Schema\x20saved\x20to\x20'+_0x16631f[_0x42e6e2(0x326)]),console['log'](_0x42e6e2(0x24d)+_0x399e08),console['log'](_0x42e6e2(0x276)+_0x419d3f[_0x42e6e2(0x264)][_0x42e6e2(0x3bd)]+_0x42e6e2(0x35d)),console[_0x42e6e2(0x2b1)](_0x42e6e2(0x395)+_0x2b40cf+_0x42e6e2(0x39c)),_0x55079f>0x0&&console[_0x42e6e2(0x2b1)](_0x42e6e2(0x2e6)+_0x55079f+_0x42e6e2(0x1c1)),0x0;}console[_0x42e6e2(0x2f0)]('\x0a'+a31_0x388bb2[_0x42e6e2(0x38a)]('Output\x20Database:')+'\x20'+a31_0x388bb2[_0x42e6e2(0x351)](_0x399e08));const _0x450dde=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x3fec85['segment'][_0x42e6e2(0x2f7)](_0x2e6a4d),{'verbose':_0x5629b6['verbose']});console[_0x42e6e2(0x2f0)]('\x0a'+a31_0x388bb2[_0x42e6e2(0x38a)](_0x42e6e2(0x320))+'\x20'+a31_0x388bb2[_0x42e6e2(0x396)]('('+_0x399e08+_0x42e6e2(0x377)));const _0x55c771=await executeSchemaQuery(_0x450dde[_0x42e6e2(0x330)],_0x3fec85,_0x5629b6);await handleQueryOutput(_0x55c771,_0x5629b6);const _0x13ef73=await withSpinner(_0x42e6e2(0x37e),()=>_0x3fec85['segment']['getBehaviorNames'](_0x2e6a4d),{'verbose':_0x5629b6[_0x42e6e2(0x29a)]});for(const _0x9f1f92 of _0x13ef73[_0x42e6e2(0x330)]){const _0x48e011=_0x42e6e2(0x376)+_0x9f1f92['toLowerCase']()['replace'](/\s+/g,'_'),_0x4d612b=_0x42e6e2(0x1e2)+_0x399e08+'.'+_0x48e011;console[_0x42e6e2(0x2f0)]('\x0a'+a31_0x388bb2['bold'](_0x9f1f92)+'\x20'+a31_0x388bb2[_0x42e6e2(0x396)]('('+_0x399e08+'.'+_0x48e011+')'));try{const _0x381277=await executeSchemaQuery(_0x4d612b,_0x3fec85,_0x5629b6);await handleQueryOutput(_0x381277,_0x5629b6);}catch{console[_0x42e6e2(0x2f0)](a31_0x388bb2[_0x42e6e2(0x361)](_0x42e6e2(0x269)));}}return 0x0;}async[a31_0x59c470(0x372)](_0xf1e14c,_0x54754f,_0x1e252b,_0x55f708){const _0x33deb5=a31_0x59c470,{options:_0x1d8c94,tdx:_0xd15a30}=_0xf1e14c,_0x24e85c=await withSpinner(_0x33deb5(0x287),()=>_0xd15a30[_0x33deb5(0x204)]['getParentSQL'](_0x1e252b),{'verbose':_0x1d8c94[_0x33deb5(0x29a)]}),_0x2d91bd=await executeSchemaQuery(_0x24e85c['data'],_0xd15a30,_0x1d8c94),_0x27345a=_0x2d91bd[_0x33deb5(0x330)][_0x33deb5(0x1bb)](_0x34df59=>({'name':_0x34df59[_0x33deb5(0x387)],'type':_0x34df59[_0x33deb5(0x29c)]})),_0x2ab899=await withSpinner(_0x33deb5(0x37e),()=>_0xd15a30[_0x33deb5(0x204)][_0x33deb5(0x26c)](_0x1e252b),{'verbose':_0x1d8c94[_0x33deb5(0x29a)]}),_0x42a62e=[];for(const _0x95095b of _0x2ab899[_0x33deb5(0x330)]){const _0x3b6ce8=_0x33deb5(0x376)+_0x95095b[_0x33deb5(0x36e)]()[_0x33deb5(0x251)](/\s+/g,'_'),_0x214801=_0x33deb5(0x1e2)+_0x55f708+'.'+_0x3b6ce8;let _0x1e1947=[];try{const _0x33ef5c=await executeSchemaQuery(_0x214801,_0xd15a30,_0x1d8c94);_0x1e1947=_0x33ef5c[_0x33deb5(0x330)][_0x33deb5(0x1bb)](_0x4124bf=>({'name':_0x4124bf[_0x33deb5(0x387)],'type':_0x4124bf[_0x33deb5(0x29c)]}));}catch{}_0x42a62e[_0x33deb5(0x34f)]({'table':_0x3b6ce8,'columns':_0x1e1947});}return{'database':_0x55f708,'parent_segment':_0x54754f,'parent_id':_0x1e252b,'customers':{'table':_0x33deb5(0x320),'columns':_0x27345a},'behaviors':_0x42a62e};}[a31_0x59c470(0x1df)](_0x560b54){const _0x528ad8=a31_0x59c470,_0x3871c0=_0x2c6ef4=>{const _0x508b9b=a31_0x21a0;if(_0x2c6ef4['length']===0x0)return'[]';const _0x36664f=_0x2c6ef4[_0x508b9b(0x1bb)](_0x5b2e66=>_0x508b9b(0x36a)+_0x5b2e66['name']+_0x508b9b(0x364)+_0x5b2e66[_0x508b9b(0x338)]+_0x508b9b(0x393));return'[\x0a'+_0x36664f[_0x508b9b(0x2e1)](',\x0a')+_0x508b9b(0x252);},_0x440514=_0x560b54[_0x528ad8(0x264)][_0x528ad8(0x1bb)](_0x1f3cc1=>{const _0x4bd034=_0x528ad8;return _0x4bd034(0x3b2)+_0x1f3cc1[_0x4bd034(0x3b6)]+_0x4bd034(0x254)+_0x3871c0(_0x1f3cc1[_0x4bd034(0x381)])[_0x4bd034(0x251)](/^/gm,'\x20\x20')['trim']()+_0x4bd034(0x31c);})['join'](',\x0a');return _0x528ad8(0x367)+_0x560b54[_0x528ad8(0x1fe)]+_0x528ad8(0x23c)+_0x560b54['parent_segment']+_0x528ad8(0x25b)+_0x560b54[_0x528ad8(0x1a7)]+_0x528ad8(0x23a)+_0x560b54[_0x528ad8(0x320)][_0x528ad8(0x3b6)]+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x3871c0(_0x560b54[_0x528ad8(0x320)]['columns'])[_0x528ad8(0x251)](/^/gm,'\x20\x20')['trim']()+_0x528ad8(0x1ec)+_0x440514+_0x528ad8(0x2ec);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x1ea);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x3a6);async['execute'](_0x14a25d){const _0x28712e=a31_0x59c470,{options:_0x5b7e5d,args:_0x3d4323,tdx:_0x5384ea}=_0x14a25d,_0x973c84=_0x3d4323[0x0]||_0x5b7e5d[_0x28712e(0x2d5)];if(!_0x973c84)return showParentSegmentNotSetError(_0x28712e(0x33b)+_0x28712e(0x2b0)),0x1;_0x5b7e5d[_0x28712e(0x29a)]&&(console['error'](_0x28712e(0x262)+_0x5b7e5d[_0x28712e(0x313)]),console[_0x28712e(0x2f0)](_0x28712e(0x25e)+_0x973c84));const _0x477793=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x973c84+'\x27...',()=>_0x5384ea['segment'][_0x28712e(0x2a6)](_0x973c84),{'verbose':_0x5b7e5d[_0x28712e(0x29a)]}),_0x1cb405=_0x477793[_0x28712e(0x330)],_0x52f754=await withSpinner(_0x28712e(0x1cb)+_0x973c84+_0x28712e(0x2ae),()=>_0x5384ea['segment'][_0x28712e(0x2f7)](_0x1cb405),{'verbose':_0x5b7e5d[_0x28712e(0x29a)]}),_0x40ddd7=_0x52f754[_0x28712e(0x330)];return _0x5b7e5d['format']===_0x28712e(0x1cc)||_0x5b7e5d[_0x28712e(0x24b)]===_0x28712e(0x2ab)?await handleSDKOutput([{'sql':_0x40ddd7}],_0x5b7e5d):console[_0x28712e(0x2b1)](_0x40ddd7),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x2c6);['description']=a31_0x59c470(0x34e);async[a31_0x59c470(0x25d)](_0x3187ec){const _0x5570cf=a31_0x59c470,{options:_0x192e64,args:_0x16838d,tdx:_0x201574}=_0x3187ec,_0x20bf9f=_0x16838d[0x0]||_0x192e64[_0x5570cf(0x2d5)];if(!_0x20bf9f)return showParentSegmentNotSetError(_0x5570cf(0x39e)+_0x5570cf(0x1f6)),0x1;_0x192e64[_0x5570cf(0x29a)]&&(console[_0x5570cf(0x2f0)](_0x5570cf(0x262)+_0x192e64[_0x5570cf(0x313)]),console[_0x5570cf(0x2f0)]('Parent\x20segment:\x20'+_0x20bf9f));const _0x2395c0=await withSpinner(_0x5570cf(0x36f)+_0x20bf9f+_0x5570cf(0x2ae),()=>_0x201574['segment'][_0x5570cf(0x2a6)](_0x20bf9f),{'verbose':_0x192e64[_0x5570cf(0x29a)]}),_0x4a1185=_0x2395c0[_0x5570cf(0x330)],_0x4b25c0=await withSpinner('Fetching\x20SQL\x20for\x20\x27'+_0x20bf9f+'\x27...',()=>_0x201574[_0x5570cf(0x204)]['getParentSQL'](_0x4a1185),{'verbose':_0x192e64[_0x5570cf(0x29a)]});let _0x4cefdd=_0x4b25c0[_0x5570cf(0x330)];const _0x3c122a=resolveLimit(_0x192e64['limit'],DEFAULT_DISPLAY_LIMIT),_0x9882d9=/\bLIMIT\s+\d+/i[_0x5570cf(0x21b)](_0x4cefdd);!_0x9882d9&&(_0x4cefdd=_0x4cefdd[_0x5570cf(0x20e)]()[_0x5570cf(0x251)](/;+$/,''),_0x4cefdd='SELECT\x20*\x20FROM\x20(\x0a'+_0x4cefdd+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x3c122a);_0x192e64[_0x5570cf(0x29a)]&&console[_0x5570cf(0x2f0)](_0x5570cf(0x294)+_0x4cefdd);const _0x20a196=await withProgressSpinner('Executing\x20parent\x20segment\x20query...',async _0xb4e061=>{const _0x358670=_0x5570cf,_0x25ea64=await _0x201574[_0x358670(0x2a5)][_0x358670(0x25d)](_0x4cefdd,{'catalog':'td','schema':'information_schema','onJobId':_0x5be5a4=>{const _0x57a3ac=_0x358670;_0xb4e061[_0x57a3ac(0x2e4)](_0x5be5a4);}});return _0x25ea64;},{'verbose':_0x192e64[_0x5570cf(0x29a)]}),_0x5e82db=_0x20a196[_0x5570cf(0x330)],_0x190b77=_0x5e82db['jobId']?_0x5570cf(0x36d)+_0x5e82db['jobId']+']':'';return console[_0x5570cf(0x2f0)](_0x5570cf(0x1c8)+_0x5e82db['stats'][_0x5570cf(0x350)][_0x5570cf(0x35e)]()+_0x5570cf(0x39f)+(_0x5570cf(0x20c)+formatElapsed(_0x5e82db['stats'][_0x5570cf(0x343)])+_0x190b77)),await handleQueryOutput(_0x5e82db,_0x192e64),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x3ba);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x209);async[a31_0x59c470(0x25d)](_0x23a3d6){const _0x9f99e3=a31_0x59c470,{options:_0x207e25,args:_0x86fc4c,tdx:_0x3cd26f}=_0x23a3d6,_0x3a828b=_0x86fc4c[0x0],_0x4f3a5f=await withSpinner(_0x3a828b?_0x9f99e3(0x2cb)+_0x3a828b+_0x9f99e3(0x2ae):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x3cd26f[_0x9f99e3(0x2a1)][_0x9f99e3(0x325)](),{'verbose':_0x207e25[_0x9f99e3(0x29a)]});let _0x41e46e=_0x4f3a5f[_0x9f99e3(0x330)]['filter'](_0x17bbb3=>_0x17bbb3[_0x9f99e3(0x242)]);if(_0x3a828b){const _0x5e90ab=_0x3a828b[_0x9f99e3(0x251)](/[.+^${}()|[\]\\]/g,_0x9f99e3(0x38d))[_0x9f99e3(0x251)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x5385e6=new RegExp('^'+_0x5e90ab+'$','i');_0x41e46e=_0x41e46e[_0x9f99e3(0x2c2)](_0x516652=>_0x5385e6[_0x9f99e3(0x21b)](_0x516652[_0x9f99e3(0x24c)]));}_0x41e46e['sort']((_0x34da14,_0x31b837)=>_0x34da14[_0x9f99e3(0x24c)][_0x9f99e3(0x21a)](_0x31b837[_0x9f99e3(0x24c)])),console[_0x9f99e3(0x2f0)](_0x9f99e3(0x283)+_0x41e46e['length']+_0x9f99e3(0x3be)+(_0x41e46e['length']!==0x1?'s':''));const _0x579f30=_0x33f203=>{const _0x4eab1a=_0x9f99e3;return getConsoleNextUrl(_0x207e25[_0x4eab1a(0x313)],'/app/dw/parentSegments/'+_0x33f203);};if(_0x207e25[_0x9f99e3(0x24b)]===_0x9f99e3(0x1cc)||_0x207e25['format']===_0x9f99e3(0x2ab)){const _0x3f3315=_0x41e46e[_0x9f99e3(0x1bb)](_0x3c7a49=>({..._0x3c7a49,'url':_0x579f30(_0x3c7a49['id'])}));await handleSDKOutput(_0x3f3315,_0x207e25);}else{if(_0x41e46e[_0x9f99e3(0x3bd)]===0x0)console[_0x9f99e3(0x2b1)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x236560 of _0x41e46e){const _0x2f5ae2=_0x236560['population']?a31_0x388bb2[_0x9f99e3(0x396)]('\x20('+formatRows(_0x236560[_0x9f99e3(0x31e)])+')'):'',_0x135667=hyperlink(_0x236560[_0x9f99e3(0x24c)],_0x579f30(_0x236560['id']));console['log']('⚡\x20'+_0x135667+_0x2f5ae2);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']='ps:rt:validate';['description']=a31_0x59c470(0x215);async['execute'](_0x4b8104){const _0x4cece7=a31_0x59c470,{options:_0x5b08f2,args:_0x6b58ab,tdx:_0x27e9ca}=_0x4b8104,_0x33a687=_0x6b58ab[0x0]||_0x5b08f2['parentSegment'];if(!_0x33a687)return showParentSegmentNotSetError('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'+_0x4cece7(0x1b8)),0x1;const _0x18a2cf=resolveYamlFile(_0x33a687);if(!existsSync(_0x18a2cf))return showFileNotFoundError(_0x18a2cf,_0x33a687),0x1;let _0xca1f8a;try{_0xca1f8a=readFileSync(_0x18a2cf,_0x4cece7(0x1a5));}catch(_0x330f79){const _0xaa4a3e=_0x330f79 instanceof Error?_0x330f79[_0x4cece7(0x2b6)]:String(_0x330f79);return console[_0x4cece7(0x2f0)]('Error\x20reading\x20file:\x20'+_0xaa4a3e),0x1;}const _0x123e90=createCommandSpinner(a31_0x388bb2[_0x4cece7(0x396)](_0x4cece7(0x29e)),{'verbose':_0x5b08f2[_0x4cece7(0x29a)]});_0x123e90['start']();const _0x580384={'realtime':!![],'onProgress':_0x39917a=>{const _0x10f8df=_0x4cece7;_0x123e90[_0x10f8df(0x2d0)]=formatProgressMessage(_0x39917a);}};let _0x2e86d1;try{_0x2e86d1=await _0x27e9ca[_0x4cece7(0x204)][_0x4cece7(0x23f)](_0xca1f8a,_0x580384),_0x123e90[_0x4cece7(0x224)]();}catch(_0x18fd1a){_0x123e90['stop']();throw _0x18fd1a;}console[_0x4cece7(0x2f0)]('\x0a'+a31_0x388bb2['bold']('RT\x202.0\x20Validate:')+'\x20'+_0x2e86d1[_0x4cece7(0x24c)]),console[_0x4cece7(0x2f0)]('═'[_0x4cece7(0x282)](0x3c)),displayRealtimeValidation(_0x2e86d1),console[_0x4cece7(0x2f0)]('─'[_0x4cece7(0x282)](0x3c));if(_0x2e86d1[_0x4cece7(0x334)][_0x4cece7(0x3bd)]>0x0){console[_0x4cece7(0x2f0)]('\x0a'+a31_0x388bb2[_0x4cece7(0x37a)](_0x4cece7(0x20f)));for(const _0x537baa of _0x2e86d1[_0x4cece7(0x334)]){console[_0x4cece7(0x2f0)]('\x20\x20'+a31_0x388bb2[_0x4cece7(0x37a)]('•')+'\x20'+_0x537baa);}}return _0x2e86d1[_0x4cece7(0x2c9)]&&console[_0x4cece7(0x2f0)]('\x0a'+a31_0x388bb2[_0x4cece7(0x327)]('✔')+'\x20RT\x20configuration\x20is\x20valid'),_0x2e86d1['allValid']?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x35f);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x382);async[a31_0x59c470(0x25d)](_0x54e0a1){const _0x4c887b=a31_0x59c470,{options:_0x1e68f3,args:_0x4aff78,tdx:_0x1435c5}=_0x54e0a1,_0x5c92c7=_0x4aff78[0x0]||_0x1e68f3[_0x4c887b(0x2d5)];if(!_0x5c92c7)return showParentSegmentNotSetError(_0x4c887b(0x28a)+'\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;_0x1e68f3[_0x4c887b(0x29a)]&&(console[_0x4c887b(0x2f0)](_0x4c887b(0x262)+_0x1e68f3['site']),console[_0x4c887b(0x2f0)](_0x4c887b(0x25e)+_0x5c92c7));const _0x196da6=await withSpinner(_0x4c887b(0x36f)+_0x5c92c7+_0x4c887b(0x2ae),()=>_0x1435c5[_0x4c887b(0x204)]['resolveParentId'](_0x5c92c7),{'verbose':_0x1e68f3['verbose']}),_0x5c4ce9=_0x196da6[_0x4c887b(0x330)],_0x44b6d8=await withSpinner(_0x4c887b(0x27d)+_0x5c92c7+_0x4c887b(0x2ae),()=>_0x1435c5[_0x4c887b(0x2a1)]['listJourneys'](_0x5c4ce9),{'verbose':_0x1e68f3[_0x4c887b(0x29a)]}),_0x581ebd=_0x44b6d8[_0x4c887b(0x330)];console['error'](_0x4c887b(0x283)+_0x581ebd['length']+_0x4c887b(0x30d)+(_0x581ebd[_0x4c887b(0x3bd)]!==0x1?'s':''));if(_0x1e68f3[_0x4c887b(0x24b)]===_0x4c887b(0x1cc)||_0x1e68f3[_0x4c887b(0x24b)]==='jsonl')await handleSDKOutput(_0x581ebd,_0x1e68f3);else{if(_0x581ebd[_0x4c887b(0x3bd)]===0x0)console['log'](_0x4c887b(0x388));else for(const _0x1dc90f of _0x581ebd){const _0x70147d=_0x1dc90f[_0x4c887b(0x2f2)]===_0x4c887b(0x21e)?'🚀':'📝',_0x4db47d=_0x1dc90f[_0x4c887b(0x2d2)]?a31_0x388bb2[_0x4c887b(0x361)](_0x4c887b(0x235)):'',_0x51ff05=a31_0x388bb2[_0x4c887b(0x396)]('\x20('+_0x1dc90f[_0x4c887b(0x314)]+_0x4c887b(0x211)+(_0x1dc90f[_0x4c887b(0x314)]!==0x1?'s':'')+')');console['log'](_0x70147d+'\x20'+_0x1dc90f['name']+_0x4db47d+_0x51ff05);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x1ed);['description']='Pause\x20activations\x20in\x20an\x20RT\x20journey';async[a31_0x59c470(0x25d)](_0x8b0fcc){const _0x160af9=a31_0x59c470,{options:_0x35b240,args:_0x5269f0,tdx:_0x2e7a24}=_0x8b0fcc,_0x112cdd=_0x5269f0[0x0];if(!_0x112cdd)return console[_0x160af9(0x2f0)](a31_0x388bb2[_0x160af9(0x37a)](_0x160af9(0x2a8))),console[_0x160af9(0x2f0)](_0x160af9(0x1e8)),console[_0x160af9(0x2f0)](a31_0x388bb2['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x35b240[_0x160af9(0x29a)]&&(console[_0x160af9(0x2f0)]('Site:\x20'+_0x35b240[_0x160af9(0x313)]),console[_0x160af9(0x2f0)]('RT\x20Journey\x20ID:\x20'+_0x112cdd));const _0x159e01=await withSpinner(_0x160af9(0x2b7)+_0x112cdd+_0x160af9(0x2ae),()=>_0x2e7a24[_0x160af9(0x2a1)][_0x160af9(0x341)](_0x112cdd),{'verbose':_0x35b240[_0x160af9(0x29a)]}),_0x3da1f4=_0x159e01['data'];console[_0x160af9(0x2f0)](_0x160af9(0x26a)+_0x3da1f4['name']+'\x27');if(_0x35b240[_0x160af9(0x24b)]===_0x160af9(0x1cc)||_0x35b240[_0x160af9(0x24b)]===_0x160af9(0x2ab))await handleSDKOutput([_0x3da1f4],_0x35b240);else{const _0x23791e=_0x3da1f4[_0x160af9(0x2f2)]===_0x160af9(0x21e)?'🚀':'📝',_0x565250=_0x3da1f4[_0x160af9(0x2d2)]?a31_0x388bb2[_0x160af9(0x361)]('\x20(paused)'):'';console[_0x160af9(0x2b1)](_0x23791e+'\x20'+_0x3da1f4[_0x160af9(0x24c)]+_0x565250);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0x59c470(0x24c)]='ps:rt:jn:resume';[a31_0x59c470(0x2cf)]=a31_0x59c470(0x2a4);async[a31_0x59c470(0x25d)](_0x20c449){const _0x17e438=a31_0x59c470,{options:_0x5124a0,args:_0x1ec41a,tdx:_0x4bb306}=_0x20c449,_0x50803a=_0x1ec41a[0x0];if(!_0x50803a)return console[_0x17e438(0x2f0)](a31_0x388bb2['red'](_0x17e438(0x2a8))),console[_0x17e438(0x2f0)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console[_0x17e438(0x2f0)](a31_0x388bb2[_0x17e438(0x396)](_0x17e438(0x279))),0x1;_0x5124a0[_0x17e438(0x29a)]&&(console[_0x17e438(0x2f0)](_0x17e438(0x262)+_0x5124a0[_0x17e438(0x313)]),console[_0x17e438(0x2f0)]('RT\x20Journey\x20ID:\x20'+_0x50803a));const _0x7855a6=await withSpinner(_0x17e438(0x1ab)+_0x50803a+_0x17e438(0x2ae),()=>_0x4bb306[_0x17e438(0x2a1)][_0x17e438(0x38f)](_0x50803a),{'verbose':_0x5124a0['verbose']}),_0x47ad78=_0x7855a6['data'];console[_0x17e438(0x2f0)](_0x17e438(0x223)+_0x47ad78['name']+'\x27');if(_0x5124a0['format']===_0x17e438(0x1cc)||_0x5124a0['format']==='jsonl')await handleSDKOutput([_0x47ad78],_0x5124a0);else{const _0x3165e5=_0x47ad78['state']==='launched'?'🚀':'📝',_0x4f4faf=_0x47ad78['paused']?a31_0x388bb2['yellow'](_0x17e438(0x235)):'';console['log'](_0x3165e5+'\x20'+_0x47ad78[_0x17e438(0x24c)]+_0x4f4faf);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']='ps:rt:configuration_versions';['description']=a31_0x59c470(0x1ba);async[a31_0x59c470(0x25d)](_0x5d81c3){const _0x2c5ba0=a31_0x59c470,{options:_0x380f29,args:_0x386d1b,tdx:_0x5788b2}=_0x5d81c3,_0x273fa1=_0x386d1b[0x0]||_0x380f29[_0x2c5ba0(0x2d5)];if(!_0x273fa1)return showParentSegmentNotSetError('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'+_0x2c5ba0(0x274)),0x1;_0x380f29[_0x2c5ba0(0x29a)]&&(console['error']('Site:\x20'+_0x380f29['site']),console[_0x2c5ba0(0x2f0)](_0x2c5ba0(0x25e)+_0x273fa1));const _0x1ddbf8=await withSpinner(_0x2c5ba0(0x36f)+_0x273fa1+_0x2c5ba0(0x2ae),()=>_0x5788b2['segment'][_0x2c5ba0(0x2a6)](_0x273fa1),{'verbose':_0x380f29[_0x2c5ba0(0x29a)]}),_0x515071=_0x1ddbf8['data'],_0x65e1d2=await withSpinner(_0x2c5ba0(0x250)+_0x273fa1+_0x2c5ba0(0x2ae),()=>_0x5788b2[_0x2c5ba0(0x2a1)][_0x2c5ba0(0x2d1)](_0x515071),{'verbose':_0x380f29['verbose']}),_0x20f982=_0x65e1d2['data'];return console['error']('✔\x20Retrieved\x20RT\x20configuration\x20version'),_0x380f29['format']===_0x2c5ba0(0x1cc)||_0x380f29[_0x2c5ba0(0x24b)]===_0x2c5ba0(0x2ab)?await handleSDKOutput([_0x20f982],_0x380f29):(console[_0x2c5ba0(0x2b1)](_0x2c5ba0(0x28c)+_0x20f982['id']),console[_0x2c5ba0(0x2b1)](_0x2c5ba0(0x355)+_0x20f982['audienceId']),console[_0x2c5ba0(0x2b1)](_0x2c5ba0(0x229)+_0x20f982[_0x2c5ba0(0x238)]),console[_0x2c5ba0(0x2b1)](_0x2c5ba0(0x3b8)+_0x20f982['eventKind']),console['log'](_0x2c5ba0(0x22a)+_0x20f982[_0x2c5ba0(0x293)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x2bb);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x226);async[a31_0x59c470(0x25d)](_0x341a73){const _0x4cf122=a31_0x59c470,{options:_0x457c5f,args:_0x39d1a7,tdx:_0x1a1a24}=_0x341a73,_0x3203d0=_0x39d1a7[0x0]||_0x457c5f[_0x4cf122(0x2d5)];if(!_0x3203d0)return showParentSegmentNotSetError(_0x4cf122(0x29f)+_0x4cf122(0x323)),0x1;const _0x2a82ae=await withSpinner(_0x4cf122(0x36f)+_0x3203d0+_0x4cf122(0x2ae),()=>_0x1a1a24[_0x4cf122(0x204)][_0x4cf122(0x2a6)](_0x3203d0),{'verbose':_0x457c5f[_0x4cf122(0x29a)]}),_0x45d6e9=_0x2a82ae[_0x4cf122(0x330)],_0xe8223b=await withSpinner(_0x4cf122(0x24a)+_0x3203d0+_0x4cf122(0x2ae),()=>_0x1a1a24['personalization'][_0x4cf122(0x325)](_0x45d6e9),{'verbose':_0x457c5f[_0x4cf122(0x29a)]}),_0x32317c=_0xe8223b[_0x4cf122(0x330)];console[_0x4cf122(0x2f0)](_0x4cf122(0x283)+_0x32317c[_0x4cf122(0x3bd)]+_0x4cf122(0x297)+(_0x32317c[_0x4cf122(0x3bd)]!==0x1?'s':''));if(_0x457c5f[_0x4cf122(0x24b)]===_0x4cf122(0x1cc)||_0x457c5f[_0x4cf122(0x24b)]===_0x4cf122(0x2ab))await handleSDKOutput(_0x32317c,_0x457c5f);else{if(_0x32317c['length']===0x0)console['log'](_0x4cf122(0x2be)),console[_0x4cf122(0x2f0)](a31_0x388bb2[_0x4cf122(0x351)](_0x4cf122(0x1a4)));else for(const _0x3fa04f of _0x32317c){console[_0x4cf122(0x2b1)](a31_0x388bb2[_0x4cf122(0x38a)](_0x3fa04f[_0x4cf122(0x24c)])+'\x20'+a31_0x388bb2[_0x4cf122(0x396)](_0x4cf122(0x3b9)+_0x3fa04f['id']+')'));_0x3fa04f['description']&&console['log']('\x20\x20'+a31_0x388bb2[_0x4cf122(0x396)](_0x3fa04f[_0x4cf122(0x2cf)]));if(_0x3fa04f[_0x4cf122(0x1eb)]&&_0x3fa04f['tokens']['length']>0x0)for(const _0x2f37c4 of _0x3fa04f[_0x4cf122(0x1eb)]){const _0x4a4a25=_0x2f37c4[_0x4cf122(0x259)]?.[_0x4cf122(0x3bd)]?_0x2f37c4[_0x4cf122(0x259)][_0x4cf122(0x2e1)](',\x20'):_0x4cf122(0x275);console[_0x4cf122(0x2b1)]('\x20\x20'+a31_0x388bb2['cyan'](_0x4cf122(0x268))+'\x20'+_0x2f37c4[_0x4cf122(0x24c)]+'\x20'+a31_0x388bb2['dim'](_0x4cf122(0x3b9)+_0x2f37c4['id']+')')),console[_0x4cf122(0x2b1)](_0x4cf122(0x1fb)+a31_0x388bb2[_0x4cf122(0x396)](_0x4cf122(0x1fc))+'\x20'+_0x4a4a25);}else console[_0x4cf122(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x4cf122(0x396)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a31_0x59c470(0x1af);['description']=a31_0x59c470(0x369);async['execute'](_0x2c3174){const _0x4de92f=a31_0x59c470,{options:_0x5b300c,args:_0x379c9e,tdx:_0x144589}=_0x2c3174,_0x321fff=_0x5b300c,_0xd9025d=_0x379c9e[0x0],_0x3cfb13=_0x379c9e[0x1]||_0x5b300c['parentSegment'];if(!_0xd9025d)return console['error'](_0x4de92f(0x266)),console['error'](_0x4de92f(0x1aa)),console[_0x4de92f(0x2f0)](_0x4de92f(0x23d)),0x1;if(!_0x3cfb13)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+_0x4de92f(0x23d)),0x1;const _0x587fad=await withSpinner(_0x4de92f(0x36f)+_0x3cfb13+_0x4de92f(0x2ae),()=>_0x144589['segment'][_0x4de92f(0x2a6)](_0x3cfb13),{'verbose':_0x5b300c[_0x4de92f(0x29a)]}),_0x2b98d6=_0x587fad[_0x4de92f(0x330)],_0x4d248e={'name':_0xd9025d,'description':_0x321fff[_0x4de92f(0x2cf)],'public':_0x321fff[_0x4de92f(0x1ce)]},_0x2285ff=await withSpinner(_0x4de92f(0x273)+_0xd9025d+_0x4de92f(0x2ae),()=>_0x144589[_0x4de92f(0x2f8)][_0x4de92f(0x2a2)](_0x2b98d6,_0x4d248e),{'verbose':_0x5b300c['verbose']}),_0x31fcbf=_0x2285ff['data'];return console[_0x4de92f(0x2f0)](_0x4de92f(0x301)+_0x31fcbf[_0x4de92f(0x24c)]+_0x4de92f(0x311)+_0x31fcbf['id']),await handleSDKOutput([_0x31fcbf],_0x5b300c),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{['name']='ps:pz:service:show';['description']=a31_0x59c470(0x2c4);async[a31_0x59c470(0x25d)](_0x414da8){const _0x230a3d=a31_0x59c470,{options:_0xaec453,args:_0x2163b8,tdx:_0x354b1c}=_0x414da8,_0x524adc=_0x2163b8[0x0],_0x162a22=_0x2163b8[0x1]||_0xaec453['parentSegment'];if(!_0x524adc)return console[_0x230a3d(0x2f0)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x230a3d(0x2f0)](_0x230a3d(0x2ee)),console[_0x230a3d(0x2f0)](_0x230a3d(0x2a3)),0x1;if(!_0x162a22)return showParentSegmentNotSetError(_0x230a3d(0x26d)+_0x230a3d(0x2a3)),0x1;const _0x3c6aaa=await withSpinner(_0x230a3d(0x36f)+_0x162a22+_0x230a3d(0x2ae),()=>_0x354b1c[_0x230a3d(0x204)]['resolveParentId'](_0x162a22),{'verbose':_0xaec453[_0x230a3d(0x29a)]}),_0x5171a5=_0x3c6aaa['data'],_0x36e6c5=await withSpinner(_0x230a3d(0x20b)+_0x524adc+_0x230a3d(0x2ae),()=>_0x354b1c[_0x230a3d(0x2f8)]['get'](_0x5171a5,_0x524adc),{'verbose':_0xaec453[_0x230a3d(0x29a)]}),_0x5f3639=_0x36e6c5[_0x230a3d(0x330)];if(_0xaec453[_0x230a3d(0x1cc)]||_0xaec453[_0x230a3d(0x2ab)])await handleSDKOutput([_0x5f3639],_0xaec453);else{console[_0x230a3d(0x2b1)](a31_0x388bb2[_0x230a3d(0x38a)](_0x5f3639[_0x230a3d(0x24c)])+'\x20'+a31_0x388bb2[_0x230a3d(0x396)](_0x230a3d(0x3b9)+_0x5f3639['id']+')'));_0x5f3639[_0x230a3d(0x2cf)]&&console[_0x230a3d(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x230a3d(0x396)](_0x5f3639[_0x230a3d(0x2cf)]));console[_0x230a3d(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x230a3d(0x351)](_0x230a3d(0x1e4))+'\x20'+(_0x5f3639[_0x230a3d(0x1ce)]?'yes':'no'));if(_0x5f3639[_0x230a3d(0x1eb)]&&_0x5f3639['tokens']['length']>0x0)for(const _0x4fb4dd of _0x5f3639['tokens']){const _0x3872ba=_0x4fb4dd[_0x230a3d(0x259)]?.[_0x230a3d(0x3bd)]?_0x4fb4dd[_0x230a3d(0x259)]['join'](',\x20'):'any';console[_0x230a3d(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x230a3d(0x351)](_0x230a3d(0x268))+'\x20'+_0x4fb4dd[_0x230a3d(0x24c)]+'\x20'+a31_0x388bb2[_0x230a3d(0x396)]('(id:\x20'+_0x4fb4dd['id']+')')),console['log'](_0x230a3d(0x1fb)+a31_0x388bb2[_0x230a3d(0x396)](_0x230a3d(0x1fc))+'\x20'+_0x3872ba);}else console['log']('\x20\x20'+a31_0x388bb2[_0x230a3d(0x396)](_0x230a3d(0x2cc)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{['name']=a31_0x59c470(0x239);['description']=a31_0x59c470(0x2dc);async['execute'](_0x56c884){const _0x3d6251=a31_0x59c470,{options:_0x49c6b8,args:_0x1453f8,tdx:_0x29b0d8}=_0x56c884,_0x15addb=_0x1453f8[0x0],_0x6a440a=_0x1453f8[0x1]||_0x49c6b8[_0x3d6251(0x2d5)];if(!_0x15addb)return console[_0x3d6251(0x2f0)](_0x3d6251(0x373)),console['error'](_0x3d6251(0x2bd)),console[_0x3d6251(0x2f0)](_0x3d6251(0x248)),0x1;if(!_0x6a440a)return showParentSegmentNotSetError(_0x3d6251(0x228)+_0x3d6251(0x248)),0x1;const _0x57d497=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x6a440a+_0x3d6251(0x2ae),()=>_0x29b0d8[_0x3d6251(0x204)][_0x3d6251(0x2a6)](_0x6a440a),{'verbose':_0x49c6b8[_0x3d6251(0x29a)]}),_0x430ef6=_0x57d497[_0x3d6251(0x330)];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x15addb+'\x27...',()=>_0x29b0d8[_0x3d6251(0x2f8)][_0x3d6251(0x1b7)](_0x430ef6,_0x15addb),{'verbose':_0x49c6b8[_0x3d6251(0x29a)]}),console['error'](_0x3d6251(0x1db)+_0x15addb+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x1e9);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x33c);async['execute'](_0x37ff39){const _0x103d43=a31_0x59c470,{options:_0x805536,args:_0x3293de,tdx:_0x23aa22}=_0x37ff39,_0x16432d=_0x805536,_0x5b573d=_0x3293de[0x0],_0x49ae28=_0x3293de[0x1]||_0x805536[_0x103d43(0x2d5)];if(!_0x5b573d)return console[_0x103d43(0x2f0)](_0x103d43(0x373)),console[_0x103d43(0x2f0)](_0x103d43(0x1b9)),console[_0x103d43(0x2f0)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x16432d['name'])return console[_0x103d43(0x2f0)]('Error:\x20--name\x20is\x20required'),console[_0x103d43(0x2f0)](_0x103d43(0x1b9)),0x1;if(!_0x49ae28)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a'+_0x103d43(0x30c)),0x1;const _0x10cbcb=await withSpinner(_0x103d43(0x36f)+_0x49ae28+_0x103d43(0x2ae),()=>_0x23aa22[_0x103d43(0x204)][_0x103d43(0x2a6)](_0x49ae28),{'verbose':_0x805536[_0x103d43(0x29a)]}),_0x1d18d4=_0x10cbcb[_0x103d43(0x330)],_0x1e9ab3={'name':_0x16432d[_0x103d43(0x24c)]};_0x16432d['description']!==undefined&&(_0x1e9ab3[_0x103d43(0x2cf)]=_0x16432d[_0x103d43(0x2cf)]);const _0xfe1397=await withSpinner(_0x103d43(0x270)+_0x5b573d+_0x103d43(0x2ae),()=>_0x23aa22['personalization'][_0x103d43(0x3ab)](_0x1d18d4,_0x5b573d,_0x1e9ab3),{'verbose':_0x805536['verbose']}),_0x49f2ea=_0xfe1397[_0x103d43(0x330)];return console[_0x103d43(0x2f0)](_0x103d43(0x1c7)+_0x49f2ea['name']+'\x27'),await handleSDKOutput([_0x49f2ea],_0x805536),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x374);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x3ae);async[a31_0x59c470(0x25d)](_0x2c3522){const _0x4e2a69=a31_0x59c470,{options:_0x3e9d11,args:_0x1a2c68,tdx:_0x1ef876}=_0x2c3522,_0xde2ae1=_0x3e9d11,_0xdbebb=_0x1a2c68[0x0],_0x29f7f9=_0x1a2c68[0x1],_0x369a2d=_0x1a2c68[0x2]||_0x3e9d11['parentSegment'];if(!_0xdbebb)return console[_0x4e2a69(0x2f0)](_0x4e2a69(0x256)),console[_0x4e2a69(0x2f0)](_0x4e2a69(0x2ea)),console[_0x4e2a69(0x2f0)](_0x4e2a69(0x281)),0x1;if(!_0x29f7f9)return console[_0x4e2a69(0x2f0)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0x4e2a69(0x2f0)](_0x4e2a69(0x2ea)),console[_0x4e2a69(0x2f0)](_0x4e2a69(0x281)),0x1;if(!_0x369a2d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a'+_0x4e2a69(0x281)),0x1;const _0x42aebb=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x369a2d+_0x4e2a69(0x2ae),()=>_0x1ef876[_0x4e2a69(0x204)]['resolveParentId'](_0x369a2d),{'verbose':_0x3e9d11[_0x4e2a69(0x29a)]}),_0x55b7f0=_0x42aebb['data'],_0x4b804d={'name':_0xdbebb};_0xde2ae1['allowedIps']&&(_0x4b804d[_0x4e2a69(0x259)]=_0xde2ae1['allowedIps'][_0x4e2a69(0x2ed)](',')[_0x4e2a69(0x1bb)](_0x32f799=>_0x32f799[_0x4e2a69(0x20e)]()));_0xde2ae1[_0x4e2a69(0x2cf)]&&(_0x4b804d['description']=_0xde2ae1['description']);const _0x5e7f8f=await withSpinner(_0x4e2a69(0x3aa)+_0xdbebb+_0x4e2a69(0x249)+_0x29f7f9+'\x27...',()=>_0x1ef876['personalization'][_0x4e2a69(0x32a)](_0x55b7f0,_0x29f7f9,_0x4b804d),{'verbose':_0x3e9d11[_0x4e2a69(0x29a)]}),_0x105b5b=_0x5e7f8f[_0x4e2a69(0x330)];return console[_0x4e2a69(0x2f0)](_0x4e2a69(0x2f9)+_0x105b5b['name']+_0x4e2a69(0x311)+_0x105b5b['id']),_0x105b5b['value']&&(console[_0x4e2a69(0x2f0)](a31_0x388bb2['yellow'](_0x4e2a69(0x2b9))),console[_0x4e2a69(0x2f0)](a31_0x388bb2[_0x4e2a69(0x351)](_0x105b5b['value'])),console[_0x4e2a69(0x2f0)]('')),await handleSDKOutput([_0x105b5b],_0x3e9d11),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0x59c470(0x24c)]='ps:pz:service:token:delete';['description']=a31_0x59c470(0x3a7);async[a31_0x59c470(0x25d)](_0x336dd2){const _0x4429c8=a31_0x59c470,{options:_0xeb4a99,args:_0x25c7d9,tdx:_0x56c149}=_0x336dd2,_0x5952e6=_0x25c7d9[0x0],_0x4dde80=_0x25c7d9[0x1]||_0xeb4a99[_0x4429c8(0x2d5)];if(!_0x5952e6)return console[_0x4429c8(0x2f0)](_0x4429c8(0x25a)),console[_0x4429c8(0x2f0)](_0x4429c8(0x2ff)),console[_0x4429c8(0x2f0)](_0x4429c8(0x370)),0x1;if(!_0x4dde80)return showParentSegmentNotSetError(_0x4429c8(0x30b)+_0x4429c8(0x370)),0x1;const _0x48fbc2=await withSpinner(_0x4429c8(0x36f)+_0x4dde80+'\x27...',()=>_0x56c149[_0x4429c8(0x204)][_0x4429c8(0x2a6)](_0x4dde80),{'verbose':_0xeb4a99[_0x4429c8(0x29a)]}),_0x209bd9=_0x48fbc2[_0x4429c8(0x330)],_0x2676b9=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x56c149[_0x4429c8(0x2f8)][_0x4429c8(0x325)](_0x209bd9),{'verbose':_0xeb4a99[_0x4429c8(0x29a)]}),_0x41e809=_0x2676b9[_0x4429c8(0x330)];let _0x621f9a;for(const _0x57b287 of _0x41e809){if(_0x57b287[_0x4429c8(0x1eb)]?.[_0x4429c8(0x257)](_0x51f0e2=>_0x51f0e2['id']===_0x5952e6)){_0x621f9a=_0x57b287['id'];break;}}if(!_0x621f9a)return console[_0x4429c8(0x2f0)]('Error:\x20Token\x20\x27'+_0x5952e6+_0x4429c8(0x245)),0x1;const _0x1c6324=await withSpinner(_0x4429c8(0x1b5)+_0x5952e6+'\x27...',()=>_0x56c149[_0x4429c8(0x2f8)]['deleteToken'](_0x209bd9,_0x621f9a,_0x5952e6),{'verbose':_0xeb4a99[_0x4429c8(0x29a)]}),_0x5639b3=_0x1c6324[_0x4429c8(0x330)];return console[_0x4429c8(0x2f0)](_0x4429c8(0x2fc)+(_0x5639b3['name']||_0x5952e6)+'\x27'),await handleSDKOutput([_0x5639b3],_0xeb4a99),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0x59c470(0x24c)]='ps:pz:list';[a31_0x59c470(0x2cf)]=a31_0x59c470(0x3ac);async['execute'](_0x314ef7){const _0x57838b=a31_0x59c470,{options:_0x56b8bc,args:_0x312663,tdx:_0x12dc07}=_0x314ef7,_0x4c84b4=_0x312663[0x0]||_0x56b8bc[_0x57838b(0x2d5)];if(!_0x4c84b4)return showParentSegmentNotSetError(_0x57838b(0x379)+_0x57838b(0x2e8)),0x1;const _0xcb86e0=await withSpinner(_0x57838b(0x36f)+_0x4c84b4+'\x27...',()=>_0x12dc07['segment'][_0x57838b(0x2a6)](_0x4c84b4),{'verbose':_0x56b8bc[_0x57838b(0x29a)]}),_0x2472ef=_0xcb86e0[_0x57838b(0x330)],_0x5b696a=await withSpinner(_0x57838b(0x2f5)+_0x4c84b4+_0x57838b(0x2ae),()=>_0x12dc07[_0x57838b(0x2f8)][_0x57838b(0x2b4)](_0x2472ef),{'verbose':_0x56b8bc[_0x57838b(0x29a)]}),_0x55a820=_0x5b696a[_0x57838b(0x330)];console[_0x57838b(0x2f0)](_0x57838b(0x283)+_0x55a820[_0x57838b(0x3bd)]+_0x57838b(0x391)+(_0x55a820['length']!==0x1?'s':''));if(_0x56b8bc['format']==='json'||_0x56b8bc['format']===_0x57838b(0x2ab))await handleSDKOutput(_0x55a820,_0x56b8bc);else{if(_0x55a820[_0x57838b(0x3bd)]===0x0)console[_0x57838b(0x2b1)](_0x57838b(0x2db));else for(const _0x4c79e9 of _0x55a820){console[_0x57838b(0x2b1)](a31_0x388bb2[_0x57838b(0x38a)](_0x4c79e9[_0x57838b(0x24c)])+'\x20'+a31_0x388bb2[_0x57838b(0x396)]('(id:\x20'+_0x4c79e9['id']+')'));_0x4c79e9['description']&&console[_0x57838b(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x57838b(0x396)](_0x4c79e9['description']));const _0x2f2769=_0x4c79e9['sections']?.[_0x57838b(0x3bd)]||0x0;console[_0x57838b(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x57838b(0x351)](_0x57838b(0x398))+'\x20'+_0x2f2769);if(_0x4c79e9['sections']&&_0x4c79e9[_0x57838b(0x312)]['length']>0x0)for(const _0x1a5957 of _0x4c79e9[_0x57838b(0x312)]){console[_0x57838b(0x2b1)](_0x57838b(0x368)+_0x1a5957[_0x57838b(0x24c)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{['name']=a31_0x59c470(0x337);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x35b);async[a31_0x59c470(0x25d)](_0x3801d5){const _0x5608a9=a31_0x59c470,{options:_0xd0bd7d,args:_0x1dfd27,tdx:_0x29a428}=_0x3801d5,_0x17c80c=_0x1dfd27[0x0];if(!_0x17c80c)return console[_0x5608a9(0x2f0)](_0x5608a9(0x32c)),console[_0x5608a9(0x2f0)](_0x5608a9(0x290)),0x1;const _0x2d277d=await withSpinner(_0x5608a9(0x1bf)+_0x17c80c+_0x5608a9(0x2ae),()=>_0x29a428[_0x5608a9(0x2f8)]['getPersonalization'](_0x17c80c),{'verbose':_0xd0bd7d[_0x5608a9(0x29a)]}),_0x3574fa=_0x2d277d[_0x5608a9(0x330)];console[_0x5608a9(0x2f0)](_0x5608a9(0x1d9)+_0x3574fa['name']+'\x27');if(_0xd0bd7d['format']===_0x5608a9(0x1cc)||_0xd0bd7d[_0x5608a9(0x24b)]===_0x5608a9(0x2ab))await handleSDKOutput([_0x3574fa],_0xd0bd7d);else{console[_0x5608a9(0x2b1)](a31_0x388bb2[_0x5608a9(0x38a)](_0x3574fa['name'])+'\x20'+a31_0x388bb2[_0x5608a9(0x396)](_0x5608a9(0x3b9)+_0x3574fa['id']+')'));_0x3574fa['description']&&console['log']('\x20\x20'+a31_0x388bb2[_0x5608a9(0x396)](_0x3574fa[_0x5608a9(0x2cf)]));_0x3574fa[_0x5608a9(0x222)]&&console[_0x5608a9(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x5608a9(0x351)](_0x5608a9(0x1b1))+'\x20'+_0x3574fa['audienceId']);console[_0x5608a9(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x5608a9(0x351)](_0x5608a9(0x3a9))+'\x20'+_0x3574fa[_0x5608a9(0x1d1)]),console[_0x5608a9(0x2b1)]('\x20\x20'+a31_0x388bb2[_0x5608a9(0x351)](_0x5608a9(0x225))+'\x20'+_0x3574fa[_0x5608a9(0x2af)]);const _0x7b0605=_0x3574fa[_0x5608a9(0x312)]?.[_0x5608a9(0x3bd)]||0x0;console['log']('\x20\x20'+a31_0x388bb2['cyan'](_0x5608a9(0x398))+'\x20'+_0x7b0605);if(_0x3574fa[_0x5608a9(0x312)]&&_0x3574fa[_0x5608a9(0x312)]['length']>0x0)for(const _0x4bd9d3 of _0x3574fa[_0x5608a9(0x312)]){console[_0x5608a9(0x2b1)](_0x5608a9(0x1fb)+a31_0x388bb2[_0x5608a9(0x38a)](_0x4bd9d3[_0x5608a9(0x24c)])+'\x20'+a31_0x388bb2['dim'](_0x5608a9(0x3b9)+_0x4bd9d3['id']+')')),_0x4bd9d3[_0x5608a9(0x2e3)]&&(console[_0x5608a9(0x2b1)](_0x5608a9(0x1c2)+a31_0x388bb2['cyan'](_0x5608a9(0x2ad))+'\x20'+_0x4bd9d3[_0x5608a9(0x2e3)]['name']),_0x4bd9d3[_0x5608a9(0x2e3)][_0x5608a9(0x233)]?.[_0x5608a9(0x304)]&&console['log']('\x20\x20\x20\x20\x20\x20\x20\x20'+a31_0x388bb2[_0x5608a9(0x351)](_0x5608a9(0x1d3))+'\x20'+_0x4bd9d3[_0x5608a9(0x2e3)]['keyEventCriteria'][_0x5608a9(0x304)])),_0x4bd9d3[_0x5608a9(0x21f)]&&console['log'](_0x5608a9(0x1c2)+a31_0x388bb2[_0x5608a9(0x351)](_0x5608a9(0x24f))+'\x20'+JSON[_0x5608a9(0x1e0)](_0x4bd9d3[_0x5608a9(0x21f)])),_0x4bd9d3[_0x5608a9(0x3b7)]&&console[_0x5608a9(0x2b1)](_0x5608a9(0x1c2)+a31_0x388bb2['cyan'](_0x5608a9(0x36b))+_0x5608a9(0x23b));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{['name']='ps:pz:delete';['description']=a31_0x59c470(0x32d);async[a31_0x59c470(0x25d)](_0x240153){const _0x4b26cc=a31_0x59c470,{options:_0x8126bc,args:_0x38fd61,tdx:_0x25a8fa}=_0x240153,_0x191d67=_0x38fd61[0x0];if(!_0x191d67)return console['error'](_0x4b26cc(0x32c)),console[_0x4b26cc(0x2f0)](_0x4b26cc(0x219)),0x1;return await withSpinner(_0x4b26cc(0x2d7)+_0x191d67+_0x4b26cc(0x2ae),()=>_0x25a8fa['personalization'][_0x4b26cc(0x2b5)](_0x191d67),{'verbose':_0x8126bc[_0x4b26cc(0x29a)]}),console[_0x4b26cc(0x2f0)](_0x4b26cc(0x2cd)+_0x191d67+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0x59c470(0x24c)]='ps:pz:create';[a31_0x59c470(0x2cf)]='Create\x20a\x20realtime\x20personalization\x20entity';async[a31_0x59c470(0x25d)](_0x8b2748){const _0x4c571f=a31_0x59c470,{options:_0xfaddef,tdx:_0x19089c}=_0x8b2748,_0x3311d2=_0xfaddef;let _0x279a4e;if(_0x3311d2[_0x4c571f(0x349)]){_0x279a4e=await loadJSON(_0x3311d2[_0x4c571f(0x349)],!![]);if(!_0x279a4e[_0x4c571f(0x28d)]?.[_0x4c571f(0x36c)])return console[_0x4c571f(0x2f0)](_0x4c571f(0x261)),console['error'](_0x4c571f(0x2b3)),console[_0x4c571f(0x2f0)](_0x4c571f(0x319)),0x1;}else{if(!_0x3311d2['name'])return console[_0x4c571f(0x2f0)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x4c571f(0x2f0)](_0x4c571f(0x253)),console[_0x4c571f(0x2f0)](_0x4c571f(0x356)),0x1;if(_0x3311d2['description']===undefined)return console[_0x4c571f(0x2f0)]('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0x4c571f(0x253)),console['error'](_0x4c571f(0x356)),0x1;if(_0x3311d2['folderId']===undefined)return console[_0x4c571f(0x2f0)](_0x4c571f(0x231)),console[_0x4c571f(0x2f0)](_0x4c571f(0x241)),0x1;let _0x40f317=_0x3311d2[_0x4c571f(0x222)];if(!_0x40f317&&_0xfaddef[_0x4c571f(0x2d5)]){const _0x4c3876=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0xfaddef[_0x4c571f(0x2d5)]+'\x27...',()=>_0x19089c[_0x4c571f(0x204)]['resolveParentId'](_0xfaddef[_0x4c571f(0x2d5)]),{'verbose':_0xfaddef[_0x4c571f(0x29a)]});_0x40f317=_0x4c3876[_0x4c571f(0x330)];}let _0x4cba9f;_0x3311d2[_0x4c571f(0x312)]&&(_0x4cba9f=await loadJSON(_0x3311d2[_0x4c571f(0x312)],![]));const _0x325394=_0x3311d2[_0x4c571f(0x1de)]==='null'?null:{'id':_0x3311d2[_0x4c571f(0x1de)],'type':_0x4c571f(0x34d)};_0x279a4e={'attributes':{'name':_0x3311d2[_0x4c571f(0x24c)],'description':_0x3311d2['description']||null,..._0x40f317!==undefined&&{'audienceId':_0x40f317},..._0x4cba9f!==undefined&&{'sections':_0x4cba9f}},'relationships':{'parentFolder':{'data':_0x325394}}};}const _0x357d03=await withSpinner(_0x4c571f(0x344)+(_0x279a4e[_0x4c571f(0x2a0)]?.[_0x4c571f(0x24c)]??'')+_0x4c571f(0x2ae),()=>_0x19089c[_0x4c571f(0x2f8)][_0x4c571f(0x360)](_0x279a4e),{'verbose':_0xfaddef[_0x4c571f(0x29a)]}),_0x3a2e0d=_0x357d03['data'];return console[_0x4c571f(0x2f0)]('✔\x20Created\x20personalization\x20\x27'+_0x3a2e0d[_0x4c571f(0x24c)]+'\x27\x20with\x20ID:\x20'+_0x3a2e0d['id']),await handleSDKOutput([_0x3a2e0d],_0xfaddef),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0x59c470(0x24c)]=a31_0x59c470(0x384);[a31_0x59c470(0x2cf)]=a31_0x59c470(0x1ad);async[a31_0x59c470(0x25d)](_0x5a4795){const _0x1c0a99=a31_0x59c470,{options:_0x39a725,args:_0x268410}=_0x5a4795,_0x7a63f9=_0x39a725,_0x1f91ef=_0x268410[0x0];if(!_0x1f91ef)return console[_0x1c0a99(0x2f0)](_0x1c0a99(0x32c)),console[_0x1c0a99(0x2f0)](_0x1c0a99(0x22d)),console[_0x1c0a99(0x2f0)](_0x1c0a99(0x33a)),0x1;let _0x4fdf4f;if(_0x7a63f9[_0x1c0a99(0x349)])_0x4fdf4f=await loadJSON(_0x7a63f9[_0x1c0a99(0x349)],!![]);else{if(!_0x7a63f9[_0x1c0a99(0x24c)])return console[_0x1c0a99(0x2f0)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x1c0a99(0x2f0)](_0x1c0a99(0x22d)),0x1;if(_0x7a63f9['description']===undefined)return console['error'](_0x1c0a99(0x247)),console['error'](_0x1c0a99(0x22d)),0x1;let _0x324230;_0x7a63f9[_0x1c0a99(0x312)]&&(_0x324230=await loadJSON(_0x7a63f9[_0x1c0a99(0x312)],![])),_0x4fdf4f={'attributes':{'name':_0x7a63f9[_0x1c0a99(0x24c)],'description':_0x7a63f9[_0x1c0a99(0x2cf)]||null,..._0x324230!==undefined&&{'sections':_0x324230}}};}const {tdx:_0xb57b54}=_0x5a4795,_0x3247e6=await withSpinner(_0x1c0a99(0x31f)+_0x1f91ef+'\x27...',()=>_0xb57b54[_0x1c0a99(0x2f8)][_0x1c0a99(0x1a9)](_0x1f91ef,_0x4fdf4f),{'verbose':_0x39a725[_0x1c0a99(0x29a)]}),_0x1e4e55=_0x3247e6[_0x1c0a99(0x330)];return console[_0x1c0a99(0x2f0)](_0x1c0a99(0x394)+_0x1e4e55['name']+_0x1c0a99(0x1f2)+_0x1e4e55['id']+')'),await handleSDKOutput([_0x1e4e55],_0x39a725),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0x59c470(0x24c)]='ps:pz:init';[a31_0x59c470(0x2cf)]=a31_0x59c470(0x1be);async[a31_0x59c470(0x25d)](_0x33b1b7){const _0x14982c=a31_0x59c470,{options:_0x30cb27,args:_0x3f607a}=_0x33b1b7,_0xb66cbd=_0x3f607a[0x0]||_0x30cb27[_0x14982c(0x2d5)];if(!_0xb66cbd)return showParentSegmentNotSetError(_0x14982c(0x1c4)+_0x14982c(0x1c3)),0x1;const _0x5f10f4=resolveYamlFile(_0xb66cbd);if(!existsSync(_0x5f10f4))return showFileNotFoundError(_0x5f10f4,_0xb66cbd),0x1;let _0x1c936f;try{_0x1c936f=readFileSync(_0x5f10f4,_0x14982c(0x1a5));}catch(_0x42b43f){const _0x596f80=_0x42b43f instanceof Error?_0x42b43f[_0x14982c(0x2b6)]:String(_0x42b43f);return console['error'](_0x14982c(0x1e7)+_0x596f80),0x1;}let _0x516e06;try{_0x516e06=parseDef(_0x1c936f);}catch(_0x32b1f5){const _0x3c2987=_0x32b1f5 instanceof Error?_0x32b1f5['message']:String(_0x32b1f5);return console[_0x14982c(0x2f0)](a31_0x388bb2['red'](_0x14982c(0x1d4)+_0x3c2987)),0x1;}if(_0x516e06['personalization_services']&&_0x516e06['personalization_services'][_0x14982c(0x3bd)]>0x0)return console['error'](a31_0x388bb2[_0x14982c(0x361)](_0x14982c(0x207)+_0x5f10f4)),console['error'](a31_0x388bb2[_0x14982c(0x396)](_0x14982c(0x331)+_0x516e06[_0x14982c(0x1bd)][_0x14982c(0x3bd)]+_0x14982c(0x21d))),0x1;!_0x516e06[_0x14982c(0x2a1)]&&(_0x516e06[_0x14982c(0x2a1)]={'events':[{'name':_0x14982c(0x365),'source_table':'<database>.<table>'}],'attributes':[{'name':'last_page_viewed','type':_0x14982c(0x2d8)}],'id_stitching':{'primary_key':_0x516e06[_0x14982c(0x1ca)][_0x14982c(0x3b6)]===_0x14982c(0x320)?_0x14982c(0x2b8):'user_id'}});_0x516e06[_0x14982c(0x1bd)]=[{'name':'My\x20Service','description':_0x14982c(0x258),'trigger_event':_0x14982c(0x365),'sections':[{'name':_0x14982c(0x218),'criteria':'true','attributes':[_0x14982c(0x26e)]}]}];const _0x55373b=serializeDef(_0x516e06);return writeFileSync(_0x5f10f4,_0x55373b,'utf-8'),console[_0x14982c(0x2f0)](a31_0x388bb2['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a31_0x388bb2['cyan'](_0x5f10f4)),(!_0x516e06[_0x14982c(0x2a1)]||_0x1c936f['indexOf'](_0x14982c(0x3bf))===-0x1)&&console[_0x14982c(0x2f0)](a31_0x388bb2[_0x14982c(0x327)]('✔')+_0x14982c(0x33f)),console[_0x14982c(0x2f0)]('\x0a'+a31_0x388bb2['dim']('Next\x20steps:')),console[_0x14982c(0x2f0)](_0x14982c(0x333)+_0x5f10f4+_0x14982c(0x2d4)),console[_0x14982c(0x2f0)](_0x14982c(0x31b)+a31_0x388bb2[_0x14982c(0x396)]('tdx\x20ps\x20push\x20'+_0xb66cbd)+_0x14982c(0x34b)),0x0;}}
|
|
1
|
+
const a31_0xdea3fe=a31_0x4b02;(function(_0x1e0d9e,_0x4c3ba1){const _0x37ee22=a31_0x4b02,_0x3cbd02=_0x1e0d9e();while(!![]){try{const _0x1c92ef=-parseInt(_0x37ee22(0x28e))/0x1*(parseInt(_0x37ee22(0x288))/0x2)+parseInt(_0x37ee22(0x216))/0x3+-parseInt(_0x37ee22(0x29c))/0x4*(-parseInt(_0x37ee22(0x293))/0x5)+-parseInt(_0x37ee22(0x31a))/0x6+-parseInt(_0x37ee22(0x336))/0x7+parseInt(_0x37ee22(0x1e6))/0x8+parseInt(_0x37ee22(0x36f))/0x9;if(_0x1c92ef===_0x4c3ba1)break;else _0x3cbd02['push'](_0x3cbd02['shift']());}catch(_0xeeb545){_0x3cbd02['push'](_0x3cbd02['shift']());}}}(a31_0x5df8,0x4f236));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a31_0x3c8cc9 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_0xd5335b from'chalk';import{displayFieldsHumanReadable,executeSchemaQuery}from'../sdk/segment/fields-display.js';import{saveSessionContext}from'../core/session.js';import{sanitizeFileName}from'../utils/string-utils.js';const PARENT_SEGMENT_DIR='parent_segments',LEGACY_PARENT_SEGMENT_DIR=a31_0xdea3fe(0x213);function openBrowser(_0x4bfc3b){const _0x46bc4a=a31_0xdea3fe,_0x55e64a=process[_0x46bc4a(0x229)],_0x213284=_0x55e64a==='darwin'?_0x46bc4a(0x392):_0x55e64a===_0x46bc4a(0x22d)?_0x46bc4a(0x302):'xdg-open';spawn(_0x213284,[_0x4bfc3b],{'detached':!![],'stdio':_0x46bc4a(0x20a)})[_0x46bc4a(0x1fa)]();}function migrateLegacyDirectory(){const _0x4d943d=a31_0xdea3fe;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x585236=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x585236[_0x4d943d(0x1ee)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x4d943d(0x3bb)](a31_0xd5335b['yellow'](_0x4d943d(0x3b8)+LEGACY_PARENT_SEGMENT_DIR+_0x4d943d(0x3a5)+PARENT_SEGMENT_DIR+_0x4d943d(0x25b))),console['error'](a31_0xd5335b['dim'](_0x4d943d(0x227)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x4d943d(0x3bb)](a31_0xd5335b['yellow'](_0x4d943d(0x2a2)+LEGACY_PARENT_SEGMENT_DIR+_0x4d943d(0x31d)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a31_0xd5335b[_0x4d943d(0x208)](_0x4d943d(0x35d)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x32aa06){const _0x136dda=_0x32aa06 instanceof Error?_0x32aa06['message']:String(_0x32aa06);return console[_0x4d943d(0x3bb)](a31_0xd5335b[_0x4d943d(0x1c5)](_0x4d943d(0x1f6)+_0x136dda+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a31_0xdea3fe(0x1cc)](_0x4ea709){const _0x3686ec=a31_0xdea3fe;return migrateLegacyDirectory(),super[_0x3686ec(0x1cc)](_0x4ea709);}}function resolveYamlFile(_0x2c42c8){const _0x2632d1=a31_0xdea3fe;if(_0x2c42c8['endsWith'](_0x2632d1(0x3d0))||_0x2c42c8['endsWith']('.yaml'))return _0x2c42c8;return a31_0x3c8cc9['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x2c42c8)+'.yml');}function formatProgressMessage(_0x517dfe){const _0x2d617f=a31_0xdea3fe,_0x5f2ae5=_0x517dfe[_0x2d617f(0x27e)](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x5f2ae5){const [,_0x57c079,_0x3e5529,_0x5df218='']=_0x5f2ae5;return a31_0xd5335b[_0x2d617f(0x297)](_0x57c079+':')+'\x20'+_0x3e5529+a31_0xd5335b['dim'](_0x5df218);}return a31_0xd5335b[_0x2d617f(0x297)](_0x517dfe);}function showFileNotFoundError(_0x30f7e8,_0x21c90a){const _0x1ba7a4=a31_0xdea3fe;console['error'](a31_0xd5335b['red'](_0x1ba7a4(0x384)+_0x30f7e8+'\x0a')),console[_0x1ba7a4(0x3bb)](a31_0xd5335b[_0x1ba7a4(0x325)](_0x1ba7a4(0x2b4)+_0x21c90a+_0x1ba7a4(0x3af)));}function a31_0x4b02(_0x1ed195,_0x534b36){_0x1ed195=_0x1ed195-0x1b9;const _0x5df85a=a31_0x5df8();let _0x4b0212=_0x5df85a[_0x1ed195];return _0x4b0212;}function displayRealtimeValidation(_0xf8c857){const _0x5a4c04=a31_0xdea3fe;if(!_0xf8c857[_0x5a4c04(0x339)])return;const _0xf36168=_0xf8c857['realtime'],_0x476e75=_0xf36168[_0x5a4c04(0x352)]?a31_0xd5335b[_0x5a4c04(0x208)](_0x5a4c04(0x27b)):a31_0xd5335b[_0x5a4c04(0x2e5)](_0x5a4c04(0x2ed));console[_0x5a4c04(0x3bb)]('\x0a'+a31_0xd5335b[_0x5a4c04(0x297)](_0x5a4c04(0x3a6))+'\x20'+_0x476e75);if(_0xf36168[_0x5a4c04(0x3a8)]&&_0xf36168[_0x5a4c04(0x3a8)][_0x5a4c04(0x2dd)]>0x0){console[_0x5a4c04(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x5a4c04(0x297)](_0x5a4c04(0x272))+'\x20'+_0xf36168['events'][_0x5a4c04(0x2dd)]+'\x20configured');for(const _0x3f1afd of _0xf36168[_0x5a4c04(0x3a8)]){const _0x5969c0=_0x3f1afd[_0x5a4c04(0x277)]===![]?a31_0xd5335b['red']('✘'):a31_0xd5335b[_0x5a4c04(0x208)]('✔');console[_0x5a4c04(0x3bb)](_0x5a4c04(0x233)+_0x5969c0+'\x20'+_0x3f1afd[_0x5a4c04(0x358)]),_0x3f1afd[_0x5a4c04(0x255)]&&console[_0x5a4c04(0x3bb)](_0x5a4c04(0x26d)+a31_0xd5335b['red'](_0x3f1afd['sourceTableError']));}}if(_0xf36168[_0x5a4c04(0x35c)]&&_0xf36168[_0x5a4c04(0x35c)]['length']>0x0){console[_0x5a4c04(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x5a4c04(0x297)](_0x5a4c04(0x2b9))+'\x20'+_0xf36168[_0x5a4c04(0x35c)][_0x5a4c04(0x2dd)]+_0x5a4c04(0x33a));for(const _0x346c14 of _0xf36168[_0x5a4c04(0x35c)]){const _0x3e10b5=_0x346c14[_0x5a4c04(0x2a5)]?a31_0xd5335b['green']('✔'):a31_0xd5335b[_0x5a4c04(0x1c5)]('✘');console[_0x5a4c04(0x3bb)](_0x5a4c04(0x233)+_0x3e10b5+'\x20'+_0x346c14[_0x5a4c04(0x358)]+'\x20'+a31_0xd5335b[_0x5a4c04(0x297)]('('+_0x346c14[_0x5a4c04(0x1ed)]+')'));}}if(_0xf36168[_0x5a4c04(0x234)]){const _0x12702a=_0xf36168['idStitching'][_0x5a4c04(0x1ca)]?.[_0x5a4c04(0x2dd)]?'\x20+\x20['+_0xf36168[_0x5a4c04(0x234)][_0x5a4c04(0x1ca)]['join'](',\x20')+']':'';console[_0x5a4c04(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x5a4c04(0x297)](_0x5a4c04(0x2a0))+'\x20'+_0xf36168[_0x5a4c04(0x234)][_0x5a4c04(0x2ff)]+_0x12702a);}if(_0xf36168[_0x5a4c04(0x329)]&&_0xf36168[_0x5a4c04(0x329)][_0x5a4c04(0x2dd)]>0x0){console[_0x5a4c04(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x5a4c04(0x297)](_0x5a4c04(0x2c9))+'\x20'+_0xf36168[_0x5a4c04(0x329)][_0x5a4c04(0x2dd)]+_0x5a4c04(0x331)+(_0xf36168[_0x5a4c04(0x329)]['length']!==0x1?'s':''));for(const _0x37a70f of _0xf36168[_0x5a4c04(0x329)]){console[_0x5a4c04(0x3bb)](_0x5a4c04(0x242)+_0x37a70f[_0x5a4c04(0x358)]);}}}function showParentSegmentNotSetError(_0x12a78d){const _0x284277=a31_0xdea3fe;console[_0x284277(0x3bb)](a31_0xd5335b['yellow'](_0x284277(0x22c))),console[_0x284277(0x3bb)](_0x12a78d);}export class ParentSegmentListCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x363);[a31_0xdea3fe(0x1f4)]='List\x20parent\x20segments';async[a31_0xdea3fe(0x2dc)](_0x4154f8){const _0x1f834e=a31_0xdea3fe,{options:_0xff977d,args:_0x4aedb5,tdx:_0x2ddc07}=_0x4154f8,_0x5611c9=_0x4aedb5[0x0];_0xff977d[_0x1f834e(0x2cf)]&&(console[_0x1f834e(0x3bb)](_0x1f834e(0x2cd)+_0xff977d[_0x1f834e(0x349)]),_0x5611c9&&console['error'](_0x1f834e(0x34f)+_0x5611c9));const _0x5a6fe5=await withSpinner(_0x5611c9?'Listing\x20parent\x20segments\x20matching\x20\x27'+_0x5611c9+_0x1f834e(0x23b):_0x1f834e(0x39d),()=>_0x2ddc07['segment']['listParents'](),{'verbose':_0xff977d[_0x1f834e(0x2cf)]});let _0x42b40c=_0x5a6fe5[_0x1f834e(0x2b6)];if(_0x5611c9){const _0x5b141b=_0x5611c9[_0x1f834e(0x25a)](/[.+^${}()|[\]\\]/g,_0x1f834e(0x2c4))[_0x1f834e(0x25a)](/\*/g,'.*')[_0x1f834e(0x25a)](/\?/g,'.'),_0x1f8b64=new RegExp('^'+_0x5b141b+'$','i');_0x42b40c=_0x42b40c[_0x1f834e(0x31c)](_0x5e35e3=>_0x1f8b64[_0x1f834e(0x1d5)](_0x5e35e3['attributes'][_0x1f834e(0x358)]));}_0x42b40c[_0x1f834e(0x219)]((_0x33377a,_0x277836)=>_0x33377a[_0x1f834e(0x35c)][_0x1f834e(0x358)]['localeCompare'](_0x277836[_0x1f834e(0x35c)]['name'])),console[_0x1f834e(0x3bb)](_0x1f834e(0x220)+_0x42b40c[_0x1f834e(0x2dd)]+'\x20parent\x20segment'+(_0x42b40c[_0x1f834e(0x2dd)]!==0x1?'s':''));const _0x5218ef=_0x4cd5e7=>{const _0x23e0a1=_0x1f834e;return getConsoleNextUrl(_0xff977d[_0x23e0a1(0x349)],_0x23e0a1(0x3be)+_0x4cd5e7);};if(_0xff977d[_0x1f834e(0x322)]===_0x1f834e(0x2b8)||_0xff977d[_0x1f834e(0x322)]===_0x1f834e(0x39c)){const _0x43f6c8=_0x42b40c[_0x1f834e(0x267)](_0x537baf=>({..._0x537baf,'url':_0x5218ef(_0x537baf['id'])}));await handleSDKOutput(_0x43f6c8,_0xff977d);}else{if(_0x42b40c['length']===0x0)_0x5611c9?console[_0x1f834e(0x231)](_0x1f834e(0x24a)+_0x5611c9):console[_0x1f834e(0x231)](_0x1f834e(0x370));else for(const _0x202ca5 of _0x42b40c){const _0x4edbf5=_0x202ca5[_0x1f834e(0x35c)][_0x1f834e(0x356)]?a31_0xd5335b[_0x1f834e(0x297)]('\x20('+formatRows(_0x202ca5[_0x1f834e(0x35c)][_0x1f834e(0x356)])+')'):'',_0x5111f1=hyperlink(_0x202ca5[_0x1f834e(0x35c)][_0x1f834e(0x358)],_0x5218ef(_0x202ca5['id']));console[_0x1f834e(0x231)](_0x1f834e(0x1e9)+_0x5111f1+_0x4edbf5);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a31_0xdea3fe(0x37b);[a31_0xdea3fe(0x1f4)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async[a31_0xdea3fe(0x2dc)](_0x3251d2){const _0x2061ac=a31_0xdea3fe,{options:_0x34fd6e,args:_0x128fc7,tdx:_0x25b7a1}=_0x3251d2;console[_0x2061ac(0x3bb)](_0x2061ac(0x3ca)+_0x2061ac(0x327)+_0x2061ac(0x3b3));const _0x4f1d24=_0x34fd6e;if(_0x128fc7[_0x2061ac(0x2dd)]===0x0)return console[_0x2061ac(0x3bb)](a31_0xd5335b[_0x2061ac(0x1c5)](_0x2061ac(0x248))),console[_0x2061ac(0x3bb)](_0x2061ac(0x25d)),0x1;const _0x3770e6=_0x128fc7[0x0];if(!_0x4f1d24['database']||!_0x4f1d24['table'])return console[_0x2061ac(0x3bb)](_0x2061ac(0x218)),console['error'](_0x2061ac(0x25d)),0x1;_0x4f1d24[_0x2061ac(0x2cf)]&&(console['error'](_0x2061ac(0x2cd)+_0x4f1d24[_0x2061ac(0x349)]),console['error']('Name:\x20'+_0x3770e6),console[_0x2061ac(0x3bb)](_0x2061ac(0x232)+_0x4f1d24['database']),console['error'](_0x2061ac(0x334)+_0x4f1d24[_0x2061ac(0x3cb)]));const _0x51e9fd=await loadJSONFromOptions(_0x4f1d24[_0x2061ac(0x35c)],_0x4f1d24['attributesFile']),_0xcf1fc9=await loadJSONFromOptions(_0x4f1d24[_0x2061ac(0x24c)],_0x4f1d24[_0x2061ac(0x1b9)]),_0x201656=await loadJSONFromOptions(_0x4f1d24[_0x2061ac(0x3cd)],_0x4f1d24[_0x2061ac(0x38f)]),_0x18bf19={'name':_0x3770e6,'description':_0x4f1d24[_0x2061ac(0x1f4)],'scheduleType':_0x4f1d24[_0x2061ac(0x252)],'scheduleOption':_0x4f1d24[_0x2061ac(0x31b)],'timezone':_0x4f1d24['timezone'],'master':{'parentDatabaseName':_0x4f1d24[_0x2061ac(0x247)],'parentTableName':_0x4f1d24[_0x2061ac(0x3cb)]},'attributes':_0x51e9fd,'behaviors':_0xcf1fc9,'customerGroup':_0x201656},_0x5e6cdd=await withSpinner(_0x2061ac(0x1da)+_0x3770e6+_0x2061ac(0x23b),()=>_0x25b7a1[_0x2061ac(0x2fe)][_0x2061ac(0x32e)](_0x18bf19),{'verbose':_0x34fd6e[_0x2061ac(0x2cf)]}),_0x3ee820=_0x5e6cdd[_0x2061ac(0x2b6)];return console[_0x2061ac(0x3bb)](_0x2061ac(0x1cd)+_0x3ee820['name']+'\x27\x20with\x20ID:\x20'+_0x3ee820['id']),await handleSDKOutput([_0x3ee820],_0x34fd6e),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2f2);['description']=a31_0xdea3fe(0x237);async[a31_0xdea3fe(0x2dc)](_0x4419f4){const _0x2af2f4=a31_0xdea3fe,{options:_0x6b49f3,args:_0x10a71c,tdx:_0xde4c21}=_0x4419f4;console['error']('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x2af2f4(0x327)+_0x2af2f4(0x3b3));const _0x1ff7d1=_0x6b49f3;if(_0x10a71c['length']===0x0)return console[_0x2af2f4(0x3bb)](a31_0xd5335b[_0x2af2f4(0x1c5)](_0x2af2f4(0x248))),console[_0x2af2f4(0x3bb)](_0x2af2f4(0x205)),0x1;const _0x848088=_0x10a71c[0x0];_0x1ff7d1[_0x2af2f4(0x2cf)]&&(console[_0x2af2f4(0x3bb)]('Site:\x20'+_0x1ff7d1[_0x2af2f4(0x349)]),console['error'](_0x2af2f4(0x3c9)+_0x848088));const _0x136950=await withSpinner(_0x2af2f4(0x262)+_0x848088+_0x2af2f4(0x23b),()=>_0xde4c21['segment'][_0x2af2f4(0x30d)](_0x848088),{'verbose':_0x1ff7d1[_0x2af2f4(0x2cf)]}),_0x367522=_0x136950['data'],_0x416b95=await loadJSONFromOptions(_0x1ff7d1[_0x2af2f4(0x268)],_0x1ff7d1[_0x2af2f4(0x3b2)]),_0x5a8e49=await loadJSONFromOptions(_0x1ff7d1[_0x2af2f4(0x2f7)],_0x1ff7d1['addBehaviorsFile']),_0x3f0eb9={'name':_0x367522[_0x2af2f4(0x358)],'description':_0x1ff7d1[_0x2af2f4(0x1f4)]!==undefined?_0x1ff7d1[_0x2af2f4(0x1f4)]:_0x367522[_0x2af2f4(0x1f4)],'scheduleType':_0x1ff7d1[_0x2af2f4(0x252)]!==undefined?_0x1ff7d1[_0x2af2f4(0x252)]:_0x367522[_0x2af2f4(0x252)],'scheduleOption':_0x1ff7d1[_0x2af2f4(0x31b)]!==undefined?_0x1ff7d1[_0x2af2f4(0x31b)]:_0x367522[_0x2af2f4(0x31b)],'timezone':_0x1ff7d1['timezone']!==undefined?_0x1ff7d1[_0x2af2f4(0x2be)]:_0x367522['timezone'],'master':_0x367522[_0x2af2f4(0x26a)],'attributes':_0x416b95?[..._0x367522[_0x2af2f4(0x35c)]||[],..._0x416b95]:_0x367522[_0x2af2f4(0x35c)],'behaviors':_0x5a8e49?[..._0x367522[_0x2af2f4(0x24c)]||[],..._0x5a8e49]:_0x367522[_0x2af2f4(0x24c)],'customerGroup':_0x367522[_0x2af2f4(0x3cd)]},_0x4201ae=await withSpinner(_0x2af2f4(0x261)+_0x848088+_0x2af2f4(0x23b),()=>_0xde4c21[_0x2af2f4(0x2fe)][_0x2af2f4(0x36d)](_0x848088,_0x3f0eb9),{'verbose':_0x1ff7d1[_0x2af2f4(0x2cf)]}),_0x1f8547=_0x4201ae[_0x2af2f4(0x2b6)];return console[_0x2af2f4(0x3bb)](_0x2af2f4(0x228)+_0x1f8547[_0x2af2f4(0x358)]+'\x27'),await handleSDKOutput([_0x1f8547],_0x1ff7d1),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']=a31_0xdea3fe(0x372);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x26e);async[a31_0xdea3fe(0x2dc)](_0x1d69ff){const _0x90740e=a31_0xdea3fe,{options:_0x483bdc,args:_0x443af7,tdx:_0x311398}=_0x1d69ff,_0x24d6e6=_0x483bdc,_0x45b6b2=_0x443af7[0x0]||_0x483bdc[_0x90740e(0x256)];if(!_0x45b6b2)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x24d6e6[_0x90740e(0x3a3)]&&_0x24d6e6[_0x90740e(0x346)])return console[_0x90740e(0x3bb)](a31_0xd5335b[_0x90740e(0x1c5)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console['error'](a31_0xd5335b[_0x90740e(0x297)]('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console[_0x90740e(0x3bb)](a31_0xd5335b[_0x90740e(0x297)](_0x90740e(0x3cc)+PARENT_SEGMENT_DIR+_0x90740e(0x23c))),console[_0x90740e(0x3bb)](a31_0xd5335b[_0x90740e(0x325)](_0x90740e(0x393))),0x1;const _0x1fd122=_0x24d6e6[_0x90740e(0x346)]||a31_0x3c8cc9[_0x90740e(0x23f)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x45b6b2)+_0x90740e(0x3d0));_0x24d6e6['verbose']&&(console[_0x90740e(0x3bb)](_0x90740e(0x2cd)+_0x24d6e6[_0x90740e(0x349)]),console[_0x90740e(0x3bb)](_0x90740e(0x3c9)+_0x45b6b2),console[_0x90740e(0x3bb)](_0x90740e(0x28a)+_0x1fd122));const _0xe86671=await withSpinner(_0x90740e(0x32f)+_0x45b6b2+_0x90740e(0x23b),()=>_0x311398[_0x90740e(0x2fe)][_0x90740e(0x37d)](_0x45b6b2),{'verbose':_0x24d6e6[_0x90740e(0x2cf)]}),_0x214132=_0xe86671[_0x90740e(0x2b6)];if(existsSync(_0x1fd122)){const _0x10a846=readFileSync(_0x1fd122,_0x90740e(0x281)),_0x2f3e3e=generateDiff(_0x10a846,_0x214132);if(!hasChanges(_0x2f3e3e))console[_0x90740e(0x3bb)](a31_0xd5335b[_0x90740e(0x208)]('✔')+_0x90740e(0x345)+a31_0xd5335b[_0x90740e(0x325)](_0x1fd122)+_0x90740e(0x3b0));else{console[_0x90740e(0x3bb)](_0x90740e(0x3c8)+_0x1fd122+'\x27:'),console['error']('─'['repeat'](0x3c)),console[_0x90740e(0x3bb)](formatDiffWithColors(_0x2f3e3e)),console[_0x90740e(0x3bb)]('─'[_0x90740e(0x2d6)](0x3c));if(!_0x24d6e6[_0x90740e(0x312)]){if(!isInteractive())return console['error'](a31_0xd5335b[_0x90740e(0x1c5)](_0x90740e(0x2f3)),_0x90740e(0x340)),console['error'](a31_0xd5335b['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2568bd=await confirmKey('Overwrite\x20\x27'+_0x1fd122+'\x27?');if(!_0x2568bd)return console[_0x90740e(0x3bb)](a31_0xd5335b[_0x90740e(0x2e5)](_0x90740e(0x32b))),0x1;}writeFileSync(_0x1fd122,_0x214132,_0x90740e(0x281)),console['error'](a31_0xd5335b[_0x90740e(0x208)]('✔')+_0x90740e(0x2d7)+a31_0xd5335b['cyan'](_0x1fd122));}}else{const _0x542cb8=a31_0x3c8cc9[_0x90740e(0x354)](_0x1fd122);!existsSync(_0x542cb8)&&mkdirSync(_0x542cb8,{'recursive':!![]}),writeFileSync(_0x1fd122,_0x214132,_0x90740e(0x281)),console[_0x90740e(0x3bb)](a31_0xd5335b[_0x90740e(0x208)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a31_0xd5335b['cyan'](_0x1fd122));}return saveSessionContext({'parent_segment':_0x45b6b2},_0x24d6e6['session']),console['error'](a31_0xd5335b[_0x90740e(0x208)]('✔')+_0x90740e(0x2f8)+a31_0xd5335b[_0x90740e(0x297)](_0x90740e(0x213))+_0x90740e(0x396)+a31_0xd5335b[_0x90740e(0x325)](_0x45b6b2)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x25c);['description']=a31_0xdea3fe(0x1bd);async[a31_0xdea3fe(0x2dc)](_0x1c65af){const _0x3010f7=a31_0xdea3fe,{options:_0x421ccc,args:_0x2091a9,tdx:_0x3ea36b}=_0x1c65af,_0x576490=_0x421ccc,_0xf40a6d=_0x2091a9[0x0]||_0x421ccc[_0x3010f7(0x256)];if(!_0xf40a6d)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a'+_0x3010f7(0x36a)),0x1;const _0x506229=resolveYamlFile(_0xf40a6d);if(!existsSync(_0x506229))return showFileNotFoundError(_0x506229,_0xf40a6d),0x1;_0x576490[_0x3010f7(0x2cf)]&&(console[_0x3010f7(0x3bb)]('Site:\x20'+_0x576490[_0x3010f7(0x349)]),console[_0x3010f7(0x3bb)](_0x3010f7(0x379)+_0x506229));let _0x27583e;try{_0x27583e=readFileSync(_0x506229,_0x3010f7(0x281));}catch(_0x21aac8){const _0x181092=_0x21aac8 instanceof Error?_0x21aac8[_0x3010f7(0x2ee)]:String(_0x21aac8);return console[_0x3010f7(0x3bb)](_0x3010f7(0x3ae)+_0x181092),0x1;}const _0x23e7b8=await withSpinner(_0x3010f7(0x22b),()=>_0x3ea36b[_0x3010f7(0x2fe)][_0x3010f7(0x2d9)](_0x27583e),{'verbose':_0x576490[_0x3010f7(0x2cf)]}),_0x147918=_0x23e7b8[_0x3010f7(0x2b6)],{isNew:_0x3029a9,name:_0x2541b0,hasChanges:_0xf17a2c,diffFormatted:_0x3671dd}=_0x147918;if(!_0xf17a2c)return console[_0x3010f7(0x3bb)]('✔\x20No\x20changes\x20-\x20\x27'+_0x2541b0+_0x3010f7(0x338)),0x0;_0x3029a9?console[_0x3010f7(0x3bb)](_0x3010f7(0x235)+_0x2541b0+'\x27:'):console[_0x3010f7(0x3bb)](_0x3010f7(0x283)+_0x2541b0+'\x27:');console[_0x3010f7(0x3bb)]('─'[_0x3010f7(0x2d6)](0x3c)),console[_0x3010f7(0x3bb)](_0x3671dd),console[_0x3010f7(0x3bb)]('─'[_0x3010f7(0x2d6)](0x3c));const _0x1bab67=_0x3029a9?_0x3010f7(0x2da)+_0x2541b0+'\x27?':_0x3010f7(0x2b7)+_0x2541b0+'\x27?';if(!_0x576490['yes']){if(!isInteractive())return console[_0x3010f7(0x3bb)](a31_0xd5335b[_0x3010f7(0x1c5)](_0x3010f7(0x2f3)),_0x3010f7(0x340)),console[_0x3010f7(0x3bb)](a31_0xd5335b[_0x3010f7(0x297)](_0x3010f7(0x324))),0x1;const _0xc54a4b=await confirmKey(_0x1bab67);if(!_0xc54a4b)return console[_0x3010f7(0x3bb)](a31_0xd5335b[_0x3010f7(0x2e5)](_0x3010f7(0x32b))),0x1;}const _0x4f7a43=_0x3029a9?'Creating':'Updating',_0x42de42=await withSpinner(_0x4f7a43+_0x3010f7(0x289)+_0x2541b0+_0x3010f7(0x23b),()=>_0x147918['apply'](),{'verbose':_0x576490[_0x3010f7(0x2cf)]}),_0x1df956=_0x42de42['data'],_0x2ef8ef=getConsoleNextUrl(_0x576490['site'],_0x3010f7(0x3be)+_0x1df956['id']),_0x31626c=_0x3029a9?'Created':_0x3010f7(0x1f7);return console[_0x3010f7(0x3bb)]('✔\x20'+_0x31626c+_0x3010f7(0x289)+_0x1df956['name']+'\x27'),console[_0x3010f7(0x3bb)]('\x20\x20'+_0x2ef8ef),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']=a31_0xdea3fe(0x1f1);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x37e);async[a31_0xdea3fe(0x2dc)](_0x1a20fe){const _0x5598d9=a31_0xdea3fe,{options:_0x195779,args:_0x2455a3,tdx:_0x18481b}=_0x1a20fe,_0x39dd1f=_0x195779,_0x1332bf=_0x2455a3[0x0]||_0x195779['parentSegment'];if(!_0x1332bf)return showParentSegmentNotSetError(_0x5598d9(0x24f)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a'+'Options:\x0a'+_0x5598d9(0x225)+_0x5598d9(0x3c0)+_0x5598d9(0x200)),0x1;const _0x596e3d=resolveYamlFile(_0x1332bf);if(!existsSync(_0x596e3d))return showFileNotFoundError(_0x596e3d,_0x1332bf),0x1;_0x39dd1f[_0x5598d9(0x2cf)]&&(console[_0x5598d9(0x3bb)](_0x5598d9(0x2cd)+_0x39dd1f[_0x5598d9(0x349)]),console[_0x5598d9(0x3bb)](_0x5598d9(0x379)+_0x596e3d));let _0x3e304e;try{_0x3e304e=readFileSync(_0x596e3d,_0x5598d9(0x281));}catch(_0x485821){const _0x431401=_0x485821 instanceof Error?_0x485821[_0x5598d9(0x2ee)]:String(_0x485821);return console[_0x5598d9(0x3bb)](_0x5598d9(0x3ae)+_0x431401),0x1;}const _0x9e497b=createCommandSpinner(a31_0xd5335b[_0x5598d9(0x297)]('Validating\x20configuration...'),{'verbose':_0x39dd1f[_0x5598d9(0x2cf)]});_0x9e497b['start']();const _0x53aa7f={'onProgress':_0x2e5ccc=>{_0x9e497b['text']=formatProgressMessage(_0x2e5ccc);}};if(_0x39dd1f['master'])_0x53aa7f[_0x5598d9(0x26a)]=!![];if(_0x39dd1f[_0x5598d9(0x2b2)])_0x53aa7f[_0x5598d9(0x2b2)]=!![];_0x39dd1f[_0x5598d9(0x1e5)]&&(_0x53aa7f[_0x5598d9(0x1e5)]=_0x39dd1f['attribute']);_0x39dd1f['behavior']&&(_0x53aa7f[_0x5598d9(0x3c3)]=_0x39dd1f['behavior']);if(_0x39dd1f['interval'])_0x53aa7f['interval']=_0x39dd1f[_0x5598d9(0x21e)];let _0x5e9975;try{_0x5e9975=await _0x18481b[_0x5598d9(0x2fe)][_0x5598d9(0x27c)](_0x3e304e,_0x53aa7f),_0x9e497b['stop']();}catch(_0x11d7b6){_0x9e497b['stop']();throw _0x11d7b6;}const _0x3a41bc=_0x39dd1f[_0x5598d9(0x21e)]||_0x5598d9(0x39f);return this[_0x5598d9(0x2b1)](_0x5e9975,_0x53aa7f,_0x596e3d,_0x3a41bc),_0x5e9975[_0x5598d9(0x3a2)]?0x0:0x1;}[a31_0xdea3fe(0x2b1)](_0x27cdd9,_0x35405b,_0x85fa1d,_0x524894){const _0x3530ad=a31_0xdea3fe;console[_0x3530ad(0x3bb)]('\x0a'+a31_0xd5335b[_0x3530ad(0x3a4)](_0x3530ad(0x204))+'\x20'+_0x27cdd9[_0x3530ad(0x358)]),console[_0x3530ad(0x3bb)]('═'[_0x3530ad(0x2d6)](0x3c)),this[_0x3530ad(0x306)](_0x27cdd9);if(typeof _0x35405b[_0x3530ad(0x1e5)]===_0x3530ad(0x222)){this[_0x3530ad(0x22f)](_0x27cdd9),this[_0x3530ad(0x2f0)](_0x27cdd9),this[_0x3530ad(0x284)](_0x85fa1d,_0x524894,'attribute',_0x35405b['attribute']);return;}if(_0x35405b[_0x3530ad(0x1e5)]===!![]){this['displayAttributesStats'](_0x27cdd9),this[_0x3530ad(0x2f0)](_0x27cdd9),this[_0x3530ad(0x284)](_0x85fa1d,_0x524894,_0x3530ad(0x35c));return;}if(typeof _0x35405b[_0x3530ad(0x3c3)]===_0x3530ad(0x222)){this[_0x3530ad(0x2b3)](_0x27cdd9,_0x524894),this[_0x3530ad(0x2f0)](_0x27cdd9),this[_0x3530ad(0x284)](_0x85fa1d,_0x524894,_0x3530ad(0x3c3),_0x35405b[_0x3530ad(0x3c3)]);return;}if(_0x35405b[_0x3530ad(0x3c3)]===!![]){this[_0x3530ad(0x2b3)](_0x27cdd9,_0x524894),this['displaySummary'](_0x27cdd9),this[_0x3530ad(0x284)](_0x85fa1d,_0x524894,_0x3530ad(0x24c));return;}this[_0x3530ad(0x22f)](_0x27cdd9),this[_0x3530ad(0x2b3)](_0x27cdd9,_0x524894),this['displayRealtimeInfo'](_0x27cdd9),this[_0x3530ad(0x2f0)](_0x27cdd9),this[_0x3530ad(0x284)](_0x85fa1d,_0x524894,_0x3530ad(0x21b));}[a31_0xdea3fe(0x1db)](_0xd31734){displayRealtimeValidation(_0xd31734);}[a31_0xdea3fe(0x284)](_0x4379ad,_0x5f3e53,_0x3a5f9f,_0x4614e3){const _0xf45975=a31_0xdea3fe;console[_0xf45975(0x3bb)]('\x0a'+a31_0xd5335b[_0xf45975(0x297)](_0xf45975(0x238)));const _0x501368=_0x5f3e53!==_0xf45975(0x39f)?'\x20--interval\x20'+_0x5f3e53:'';if(_0x3a5f9f===_0xf45975(0x1e5)&&_0x4614e3)console[_0xf45975(0x3bb)]('\x20\x20'+a31_0xd5335b[_0xf45975(0x297)](_0xf45975(0x348)+_0x4379ad+_0xf45975(0x309)+_0x4614e3+'\x22'+_0x501368));else{if(_0x3a5f9f===_0xf45975(0x3c3)&&_0x4614e3)console[_0xf45975(0x3bb)]('\x20\x20'+a31_0xd5335b[_0xf45975(0x297)](_0xf45975(0x348)+_0x4379ad+_0xf45975(0x2ab)+_0x4614e3+'\x22'+_0x501368));else(_0x3a5f9f===_0xf45975(0x35c)||_0x3a5f9f===_0xf45975(0x21b))&&console[_0xf45975(0x3bb)]('\x20\x20'+a31_0xd5335b[_0xf45975(0x297)](_0xf45975(0x348)+_0x4379ad+_0xf45975(0x3cf)+_0x501368));}(_0x3a5f9f===_0xf45975(0x24c)||_0x3a5f9f===_0xf45975(0x21b))&&console[_0xf45975(0x3bb)]('\x20\x20'+a31_0xd5335b['dim'](_0xf45975(0x348)+_0x4379ad+_0xf45975(0x1d4)+_0x501368)),_0x3a5f9f===_0xf45975(0x21b)&&console[_0xf45975(0x3bb)]('\x20\x20'+a31_0xd5335b[_0xf45975(0x297)](_0xf45975(0x348)+_0x4379ad+'\x20--enriched'+_0x501368));}[a31_0xdea3fe(0x306)](_0xdd1cca){const _0x5e6b35=a31_0xdea3fe,{master:_0x3d7db1}=_0xdd1cca,_0x36bf0b=_0x3d7db1[_0x5e6b35(0x299)]?a31_0xd5335b[_0x5e6b35(0x208)]('✔'):a31_0xd5335b['red']('✘');console[_0x5e6b35(0x3bb)]('\x0a'+a31_0xd5335b[_0x5e6b35(0x297)](_0x5e6b35(0x221))),console[_0x5e6b35(0x3bb)](_0x36bf0b+'\x20'+a31_0xd5335b['bold'](_0x3d7db1[_0x5e6b35(0x247)]+'.'+_0x3d7db1['table'])),_0x3d7db1[_0x5e6b35(0x299)]?_0x3d7db1['rowCount']!==undefined&&console[_0x5e6b35(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x5e6b35(0x297)](_0x5e6b35(0x371))+'\x20'+a31_0xd5335b[_0x5e6b35(0x325)](formatRows(_0x3d7db1[_0x5e6b35(0x316)]))):console[_0x5e6b35(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x5e6b35(0x1c5)]('Error:')+'\x20'+_0x3d7db1[_0x5e6b35(0x298)]);}['displayAttributesStats'](_0x3f4ce5){const _0x53bd3a=a31_0xdea3fe;if(_0x3f4ce5[_0x53bd3a(0x35c)]['length']===0x0)return;console['error']('\x0a'+a31_0xd5335b[_0x53bd3a(0x297)](_0x53bd3a(0x364)));for(const _0x77a4e9 of _0x3f4ce5[_0x53bd3a(0x35c)]){const _0x2e6305=_0x77a4e9[_0x53bd3a(0x299)]?a31_0xd5335b['green']('✔'):a31_0xd5335b['red']('✘');let _0x42e024='';if(_0x77a4e9['schemaValid']&&_0x77a4e9[_0x53bd3a(0x37c)]!==undefined&&_0x77a4e9[_0x53bd3a(0x20e)]!==undefined){const _0x5c8280=_0x77a4e9[_0x53bd3a(0x20e)]['toFixed'](0x1),_0x3f5c2e=_0x77a4e9[_0x53bd3a(0x20e)]>=0x50?a31_0xd5335b['green']:_0x77a4e9[_0x53bd3a(0x20e)]>=0x32?a31_0xd5335b[_0x53bd3a(0x2e5)]:a31_0xd5335b['red'];_0x42e024='\x20'+a31_0xd5335b['dim'](_0x53bd3a(0x24e))+'\x20'+_0x3f5c2e(_0x5c8280+'%')+'\x20('+formatRows(_0x77a4e9['matchedCount'])+_0x53bd3a(0x366);}console[_0x53bd3a(0x3bb)](_0x2e6305+'\x20'+a31_0xd5335b[_0x53bd3a(0x3a4)](_0x77a4e9['name'])+_0x42e024),console[_0x53bd3a(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x53bd3a(0x297)](_0x53bd3a(0x307))+'\x20'+a31_0xd5335b[_0x53bd3a(0x3a4)](_0x77a4e9[_0x53bd3a(0x247)]+'.'+_0x77a4e9[_0x53bd3a(0x3cb)]));const _0x35b265=_0x77a4e9[_0x53bd3a(0x30f)]===_0x77a4e9[_0x53bd3a(0x291)]?a31_0xd5335b[_0x53bd3a(0x297)](_0x53bd3a(0x2c3))+'\x20'+_0x77a4e9[_0x53bd3a(0x30f)]:a31_0xd5335b[_0x53bd3a(0x297)](_0x53bd3a(0x1bc))+'\x20'+_0x77a4e9[_0x53bd3a(0x30f)]+_0x53bd3a(0x396)+_0x77a4e9['foreignKey'];console[_0x53bd3a(0x3bb)]('\x20\x20'+_0x35b265),console[_0x53bd3a(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x53bd3a(0x297)](_0x53bd3a(0x1e1))),this[_0x53bd3a(0x3b7)](_0x77a4e9['columns']),!_0x77a4e9[_0x53bd3a(0x299)]&&console[_0x53bd3a(0x3bb)]('\x20\x20'+a31_0xd5335b['red'](_0x53bd3a(0x27f))+'\x20'+_0x77a4e9[_0x53bd3a(0x298)]);}}['displayBehaviorsStats'](_0x386aa7,_0x3c4225){const _0x31c6e=a31_0xdea3fe;if(_0x386aa7[_0x31c6e(0x24c)]['length']===0x0)return;console[_0x31c6e(0x3bb)]('\x0a'+a31_0xd5335b['dim']('Behaviors')+'\x20'+a31_0xd5335b['dim']('('+_0x3c4225+')'));for(const _0x20b1bb of _0x386aa7[_0x31c6e(0x24c)]){const _0x2cb94a=_0x20b1bb[_0x31c6e(0x299)]?a31_0xd5335b['green']('✔'):a31_0xd5335b['red']('✘');let _0x59a2cf='';if(_0x20b1bb['schemaValid']&&_0x20b1bb['customersWithEvents']!==undefined&&_0x20b1bb[_0x31c6e(0x1be)]!==undefined){const _0x53b9be=_0x20b1bb['customerPercent']?.['toFixed'](0x1)||'?',_0x1b1356=(_0x20b1bb[_0x31c6e(0x303)]??0x0)>=0x32?a31_0xd5335b['green']:(_0x20b1bb[_0x31c6e(0x303)]??0x0)>=0x14?a31_0xd5335b[_0x31c6e(0x2e5)]:a31_0xd5335b['red'];_0x59a2cf='\x20'+a31_0xd5335b[_0x31c6e(0x297)](_0x31c6e(0x2e3))+'\x20'+_0x1b1356(formatRows(_0x20b1bb[_0x31c6e(0x38c)]))+'\x20('+_0x53b9be+'%)\x20'+a31_0xd5335b['dim'](_0x31c6e(0x272))+'\x20'+a31_0xd5335b['cyan'](formatRows(_0x20b1bb['totalEvents']));}console['error'](_0x2cb94a+'\x20'+a31_0xd5335b[_0x31c6e(0x3a4)](_0x20b1bb[_0x31c6e(0x358)])+_0x59a2cf),console[_0x31c6e(0x3bb)]('\x20\x20'+a31_0xd5335b['dim'](_0x31c6e(0x307))+'\x20'+a31_0xd5335b[_0x31c6e(0x3a4)](_0x20b1bb[_0x31c6e(0x247)]+'.'+_0x20b1bb['table']));const _0x4e675f=_0x20b1bb['joinKey']===_0x20b1bb[_0x31c6e(0x291)]?a31_0xd5335b[_0x31c6e(0x297)](_0x31c6e(0x2c3))+'\x20'+_0x20b1bb[_0x31c6e(0x30f)]:a31_0xd5335b[_0x31c6e(0x297)](_0x31c6e(0x1bc))+'\x20'+_0x20b1bb['joinKey']+_0x31c6e(0x396)+_0x20b1bb['foreignKey'];console['error']('\x20\x20'+_0x4e675f),console[_0x31c6e(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x31c6e(0x297)](_0x31c6e(0x1e1))),this[_0x31c6e(0x3b7)](_0x20b1bb[_0x31c6e(0x275)]),!_0x20b1bb[_0x31c6e(0x299)]&&console[_0x31c6e(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x31c6e(0x1c5)](_0x31c6e(0x27f))+'\x20'+_0x20b1bb['schemaError']);}}[a31_0xdea3fe(0x3b7)](_0x538cc6){const _0x36d3cb=a31_0xdea3fe;for(const _0x5b2f40 of _0x538cc6){_0x5b2f40['label']===_0x5b2f40[_0x36d3cb(0x300)]||_0x5b2f40[_0x36d3cb(0x300)]==='*'?console['error'](_0x36d3cb(0x242)+_0x5b2f40[_0x36d3cb(0x3b6)]):console[_0x36d3cb(0x3bb)]('\x20\x20\x20\x20-\x20'+_0x5b2f40['label']+'\x20'+a31_0xd5335b[_0x36d3cb(0x297)]('('+_0x5b2f40[_0x36d3cb(0x300)]+')'));}}[a31_0xdea3fe(0x2f0)](_0x4d1901){const _0x226815=a31_0xdea3fe;console['error']('─'[_0x226815(0x2d6)](0x3c));if(_0x4d1901[_0x226815(0x2ad)][_0x226815(0x2dd)]>0x0){console['error']('\x0a'+a31_0xd5335b[_0x226815(0x1c5)](_0x226815(0x27d)));for(const _0x15f62b of _0x4d1901[_0x226815(0x2ad)]){console[_0x226815(0x3bb)]('\x20\x20'+a31_0xd5335b['red']('•')+'\x20'+_0x15f62b);}}_0x4d1901[_0x226815(0x3a2)]&&console[_0x226815(0x3bb)]('\x0a'+a31_0xd5335b[_0x226815(0x208)]('✔')+_0x226815(0x245));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x317);[a31_0xdea3fe(0x1f4)]='Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration';async[a31_0xdea3fe(0x2dc)](_0x327425){const _0x48b29b=a31_0xdea3fe,{options:_0x309b7e,args:_0x22fe3e,tdx:_0x50b76d}=_0x327425,_0x2e1b67=_0x309b7e,_0x52d397=_0x22fe3e[0x0]||_0x309b7e[_0x48b29b(0x256)];if(!_0x52d397)return showParentSegmentNotSetError(_0x48b29b(0x274)+_0x48b29b(0x1c0)+'Options\x20(one\x20required):\x0a'+_0x48b29b(0x1c6)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0x48b29b(0x378)+_0x48b29b(0x30e)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x2e1b67[_0x48b29b(0x26a)]&&!_0x2e1b67[_0x48b29b(0x1e5)]&&!_0x2e1b67[_0x48b29b(0x3c3)]&&!_0x2e1b67['enriched'])return console[_0x48b29b(0x3bb)](a31_0xd5335b[_0x48b29b(0x1c5)]('Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a')),console['error']('Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a'),console[_0x48b29b(0x3bb)](_0x48b29b(0x223)),console[_0x48b29b(0x3bb)](_0x48b29b(0x1bf)),console[_0x48b29b(0x3bb)](_0x48b29b(0x399)),console[_0x48b29b(0x3bb)]('\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior'),console[_0x48b29b(0x3bb)](_0x48b29b(0x31e)),0x1;const _0x4544b=resolveYamlFile(_0x52d397);if(!existsSync(_0x4544b))return showFileNotFoundError(_0x4544b,_0x52d397),0x1;_0x2e1b67[_0x48b29b(0x2cf)]&&(console[_0x48b29b(0x3bb)]('Site:\x20'+_0x2e1b67[_0x48b29b(0x349)]),console['error'](_0x48b29b(0x379)+_0x4544b));let _0x5d1cbe;try{_0x5d1cbe=readFileSync(_0x4544b,_0x48b29b(0x281));}catch(_0x386098){const _0x1c68ec=_0x386098 instanceof Error?_0x386098['message']:String(_0x386098);return console[_0x48b29b(0x3bb)]('Error\x20reading\x20file:\x20'+_0x1c68ec),0x1;}let _0x4ae463;try{_0x4ae463=parseDef(_0x5d1cbe);}catch(_0x166b6d){const _0x21bb3f=_0x166b6d instanceof Error?_0x166b6d[_0x48b29b(0x2ee)]:String(_0x166b6d);return console[_0x48b29b(0x3bb)](a31_0xd5335b['red'](_0x48b29b(0x1ff)+_0x21bb3f)),0x1;}if(_0x2e1b67[_0x48b29b(0x1e5)]===!![]||_0x2e1b67[_0x48b29b(0x1e5)]===''){const _0x207a21=_0x4ae463['attributes']?.[_0x48b29b(0x267)](_0x3d6c26=>_0x3d6c26['name'])||[];if(_0x207a21[_0x48b29b(0x2dd)]===0x0)console['error'](a31_0xd5335b[_0x48b29b(0x1c5)]('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console[_0x48b29b(0x3bb)](a31_0xd5335b['red'](_0x48b29b(0x301))),console['error'](_0x48b29b(0x1e8));for(const _0x45faf5 of _0x207a21){console[_0x48b29b(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x48b29b(0x325)](_0x45faf5));}console[_0x48b29b(0x3bb)](_0x48b29b(0x2ba)+_0x52d397+_0x48b29b(0x309)+_0x207a21[0x0]+'\x22');}return 0x1;}if(_0x2e1b67[_0x48b29b(0x3c3)]===!![]||_0x2e1b67[_0x48b29b(0x3c3)]===''){const _0x1b158b=_0x4ae463['behaviors']?.[_0x48b29b(0x267)](_0x5d06a9=>_0x5d06a9['name'])||[];if(_0x1b158b[_0x48b29b(0x2dd)]===0x0)console[_0x48b29b(0x3bb)](a31_0xd5335b[_0x48b29b(0x1c5)](_0x48b29b(0x377)));else{console['error'](a31_0xd5335b['red'](_0x48b29b(0x212))),console[_0x48b29b(0x3bb)]('Available\x20behaviors:');for(const _0x5499a5 of _0x1b158b){console['error']('\x20\x20'+a31_0xd5335b['cyan'](_0x5499a5));}console['error'](_0x48b29b(0x2ba)+_0x52d397+_0x48b29b(0x2ab)+_0x1b158b[0x0]+'\x22');}return 0x1;}const _0x429992=createCommandSpinner(a31_0xd5335b[_0x48b29b(0x297)](_0x48b29b(0x2d8)),{'verbose':_0x2e1b67['verbose']});_0x429992[_0x48b29b(0x302)]();const _0x3d0f3b={'onProgress':_0x3e7b02=>{const _0x15860f=_0x48b29b;_0x429992[_0x15860f(0x3ac)]=formatProgressMessage(_0x3e7b02);}};if(_0x2e1b67[_0x48b29b(0x26a)])_0x3d0f3b[_0x48b29b(0x26a)]=!![];if(_0x2e1b67[_0x48b29b(0x1e5)]&&typeof _0x2e1b67[_0x48b29b(0x1e5)]===_0x48b29b(0x222))_0x3d0f3b[_0x48b29b(0x1e5)]=_0x2e1b67['attribute'];if(_0x2e1b67['behavior']&&typeof _0x2e1b67[_0x48b29b(0x3c3)]===_0x48b29b(0x222))_0x3d0f3b[_0x48b29b(0x3c3)]=_0x2e1b67['behavior'];if(_0x2e1b67['enriched'])_0x3d0f3b[_0x48b29b(0x2b2)]=!![];if(_0x2e1b67[_0x48b29b(0x21e)])_0x3d0f3b[_0x48b29b(0x21e)]=_0x2e1b67[_0x48b29b(0x21e)];let _0x52e040;try{_0x52e040=await _0x50b76d[_0x48b29b(0x2fe)][_0x48b29b(0x1e2)](_0x5d1cbe,_0x3d0f3b),_0x429992['stop']();}catch(_0x57a6cd){_0x429992[_0x48b29b(0x292)]();throw _0x57a6cd;}return await this['displayPreviewResults'](_0x52e040,{'master':_0x2e1b67['master'],'attribute':typeof _0x2e1b67['attribute']==='string'?_0x2e1b67[_0x48b29b(0x1e5)]:undefined,'behavior':typeof _0x2e1b67[_0x48b29b(0x3c3)]===_0x48b29b(0x222)?_0x2e1b67['behavior']:undefined,'enriched':_0x2e1b67[_0x48b29b(0x2b2)]}),_0x52e040[_0x48b29b(0x3a2)]?0x0:0x1;}async[a31_0xdea3fe(0x23a)](_0x23918d,_0x28c6fc){const _0x5007be=a31_0xdea3fe;console[_0x5007be(0x3bb)]('\x0a'+a31_0xd5335b[_0x5007be(0x3a4)](_0x5007be(0x3c4))+'\x20'+_0x23918d['name']),console[_0x5007be(0x3bb)]('═'['repeat'](0x3c));if(_0x28c6fc[_0x5007be(0x26a)]&&_0x23918d[_0x5007be(0x3a1)]){const _0x3211e1=a31_0xd5335b[_0x5007be(0x297)](_0x5007be(0x305))+'\x20'+a31_0xd5335b[_0x5007be(0x3a4)](_0x23918d[_0x5007be(0x26a)][_0x5007be(0x247)]+'.'+_0x23918d['master'][_0x5007be(0x3cb)]);await this['displaySampleData'](_0x3211e1,_0x23918d['sampleData']);}else{if(_0x28c6fc[_0x5007be(0x1e5)]&&_0x23918d[_0x5007be(0x3a1)]){const _0xcf2c00=a31_0xd5335b[_0x5007be(0x297)](_0x5007be(0x287))+'\x20'+a31_0xd5335b[_0x5007be(0x3a4)](_0x28c6fc[_0x5007be(0x1e5)]);await this[_0x5007be(0x2ea)](_0xcf2c00,_0x23918d['sampleData']);}else{if(_0x28c6fc[_0x5007be(0x3c3)]&&_0x23918d[_0x5007be(0x3a1)]){const _0x19ac03=a31_0xd5335b[_0x5007be(0x297)](_0x5007be(0x35f))+'\x20'+a31_0xd5335b[_0x5007be(0x3a4)](_0x28c6fc[_0x5007be(0x3c3)]);await this[_0x5007be(0x2ea)](_0x19ac03,_0x23918d['sampleData']);}else{if(_0x28c6fc[_0x5007be(0x2b2)]&&_0x23918d[_0x5007be(0x3a1)]){const _0x3288db=a31_0xd5335b['dim'](_0x5007be(0x257))+'\x20'+a31_0xd5335b[_0x5007be(0x3a4)](_0x5007be(0x36e));await this[_0x5007be(0x2ea)](_0x3288db,_0x23918d[_0x5007be(0x3a1)]);}else!_0x23918d[_0x5007be(0x3a1)]&&console['error'](_0x5007be(0x2d4));}}}if(_0x23918d[_0x5007be(0x2ad)][_0x5007be(0x2dd)]>0x0){console[_0x5007be(0x3bb)]('─'[_0x5007be(0x2d6)](0x3c)),console[_0x5007be(0x3bb)]('\x0a'+a31_0xd5335b[_0x5007be(0x1c5)]('Errors:'));for(const _0x58d510 of _0x23918d[_0x5007be(0x2ad)]){console['error']('\x20\x20'+a31_0xd5335b[_0x5007be(0x1c5)]('•')+'\x20'+_0x58d510);}}}async[a31_0xdea3fe(0x2ea)](_0x54a4c8,_0x161ac8){const _0x1cd85e=a31_0xdea3fe;if(_0x161ac8[_0x1cd85e(0x2dd)]===0x0){console[_0x1cd85e(0x3bb)]('\x0a'+_0x54a4c8),console[_0x1cd85e(0x3bb)](_0x1cd85e(0x319));return;}console[_0x1cd85e(0x3bb)]('\x0a'+_0x54a4c8);const _0x857feb=Object[_0x1cd85e(0x35a)](_0x161ac8[0x0])[_0x1cd85e(0x267)](_0xa459de=>({'name':_0xa459de,'type':typeof _0x161ac8[0x0][_0xa459de]===_0x1cd85e(0x3ab)?_0x1cd85e(0x332):_0x1cd85e(0x2aa)})),_0x5ea218={'queryId':_0x1cd85e(0x360),'columns':_0x857feb,'data':_0x161ac8,'stats':{'state':'FINISHED','queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x161ac8[_0x1cd85e(0x2dd)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x4e3e52=formatAsTable(_0x5ea218,_0x161ac8[_0x1cd85e(0x2dd)],!![]);await writeOutput(_0x4e3e52,undefined,_0x1cd85e(0x3cb));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a31_0xdea3fe(0x358)]='segment:parent:run';[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x240);async['execute'](_0x402a47){const _0x974166=a31_0xdea3fe,{options:_0x3b5ddc,args:_0x390755,tdx:_0x3e199a}=_0x402a47,_0x59df4e=_0x3b5ddc,_0xcfdaf0=_0x390755[0x0]||_0x3b5ddc['parentSegment'];if(!_0xcfdaf0)return showParentSegmentNotSetError(_0x974166(0x29d)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment'),0x1;const _0x3a8e68=resolveYamlFile(_0xcfdaf0);if(existsSync(_0x3a8e68)){_0x59df4e[_0x974166(0x2cf)]&&console[_0x974166(0x3bb)](_0x974166(0x280)+_0x3a8e68);let _0x15b2ba;try{_0x15b2ba=readFileSync(_0x3a8e68,_0x974166(0x281));}catch(_0x423e35){const _0x7eef24=_0x423e35 instanceof Error?_0x423e35[_0x974166(0x2ee)]:String(_0x423e35);return console[_0x974166(0x3bb)](_0x974166(0x3ae)+_0x7eef24),0x1;}const _0x54e855=await withSpinner(_0x974166(0x22b),()=>_0x3e199a[_0x974166(0x2fe)]['pushParentYaml'](_0x15b2ba),{'verbose':_0x59df4e[_0x974166(0x2cf)]}),_0x408aa2=_0x54e855[_0x974166(0x2b6)],{isNew:_0x5b51e4,name:_0x1b5938,hasChanges:_0x5c3704,diffFormatted:_0x1ed382}=_0x408aa2;if(_0x5c3704){_0x5b51e4?console[_0x974166(0x3bb)](_0x974166(0x235)+_0x1b5938+'\x27:'):console['error'](_0x974166(0x283)+_0x1b5938+'\x27:');console[_0x974166(0x3bb)]('─'[_0x974166(0x2d6)](0x3c)),console['error'](_0x1ed382),console[_0x974166(0x3bb)]('─'['repeat'](0x3c));const _0xd2d1f=_0x5b51e4?'Create\x20parent\x20segment\x20\x27'+_0x1b5938+_0x974166(0x381):_0x974166(0x2b7)+_0x1b5938+_0x974166(0x381);if(!_0x59df4e[_0x974166(0x312)]){if(!isInteractive())return console[_0x974166(0x3bb)](a31_0xd5335b[_0x974166(0x1c5)](_0x974166(0x2f3)),_0x974166(0x340)),console[_0x974166(0x3bb)](a31_0xd5335b['dim'](_0x974166(0x324))),0x1;const _0x277fe4=await confirmKey(_0xd2d1f);if(!_0x277fe4)return console[_0x974166(0x3bb)](a31_0xd5335b[_0x974166(0x2e5)]('Aborted.')),0x1;}const _0x5d7cc7=_0x5b51e4?_0x974166(0x311):'Updating';await withSpinner(_0x5d7cc7+_0x974166(0x289)+_0x1b5938+'\x27...',()=>_0x408aa2[_0x974166(0x2d3)](),{'verbose':_0x59df4e['verbose']});const _0x1218a2=_0x5b51e4?_0x974166(0x243):_0x974166(0x1f7);console['error']('✔\x20'+_0x1218a2+_0x974166(0x289)+_0x1b5938+'\x27');}else console[_0x974166(0x3bb)](_0x974166(0x1e7)+_0x1b5938+_0x974166(0x33c));}const _0x205be0=await withSpinner(_0x974166(0x335)+_0xcfdaf0+'\x27...',()=>_0x3e199a[_0x974166(0x2fe)]['runParent'](_0xcfdaf0),{'verbose':_0x59df4e[_0x974166(0x2cf)]}),_0x58f4fd=_0x205be0[_0x974166(0x2b6)],_0x4cae45=getConsoleUrl(_0x59df4e['site'],_0x974166(0x365)+_0x58f4fd[_0x974166(0x1c3)]+_0x974166(0x2d2)+_0x58f4fd[_0x974166(0x2df)]+_0x974166(0x1f8)+_0x58f4fd[_0x974166(0x286)]);return console[_0x974166(0x3bb)](_0x974166(0x1d0)),console[_0x974166(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x974166(0x297)](_0x974166(0x315))+'\x20'+_0x58f4fd['audienceId']),console[_0x974166(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x974166(0x297)](_0x974166(0x373))+'\x20'+_0x58f4fd[_0x974166(0x33d)]),console['error']('\x20\x20'+a31_0xd5335b['dim']('Session:')+'\x20'+_0x58f4fd[_0x974166(0x2df)]),console[_0x974166(0x3bb)]('\x20\x20'+a31_0xd5335b[_0x974166(0x297)](_0x974166(0x29f))+'\x20'+_0x58f4fd[_0x974166(0x286)]),console[_0x974166(0x3bb)]('\x20\x20'+_0x4cae45),console[_0x974166(0x3bb)]('\x0a'+a31_0xd5335b[_0x974166(0x297)](_0x974166(0x2f9))+_0x974166(0x282)+_0x58f4fd[_0x974166(0x286)]+_0x974166(0x347)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2c2);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x265);async[a31_0xdea3fe(0x2dc)](_0x2f8c38){const _0x50980c=a31_0xdea3fe,{options:_0x535e69,args:_0x544374,tdx:_0x2ebb20}=_0x2f8c38,_0x79ed86=_0x544374[0x0]||_0x535e69['parentSegment'];if(!_0x79ed86)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a'+_0x50980c(0x202)),0x1;_0x535e69[_0x50980c(0x2cf)]&&(console[_0x50980c(0x3bb)](_0x50980c(0x2cd)+_0x535e69['site']),console[_0x50980c(0x3bb)](_0x50980c(0x3c9)+_0x79ed86));const _0x36fbf4=await withSpinner(_0x50980c(0x1c7)+_0x79ed86+_0x50980c(0x23b),()=>_0x2ebb20[_0x50980c(0x2fe)][_0x50980c(0x2b5)](_0x79ed86),{'verbose':_0x535e69[_0x50980c(0x2cf)]}),_0x3df165=_0x36fbf4[_0x50980c(0x2b6)];console[_0x50980c(0x3bb)](_0x50980c(0x220)+_0x3df165[_0x50980c(0x2dd)]+_0x50980c(0x314)+(_0x3df165[_0x50980c(0x2dd)]!==0x1?'s':''));if(_0x535e69[_0x50980c(0x2b8)]||_0x535e69[_0x50980c(0x39c)])return await handleSDKOutput(_0x3df165,_0x535e69),0x0;return displayFieldsHumanReadable(_0x3df165,_0x79ed86),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x3bd);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x350);async[a31_0xdea3fe(0x2dc)](_0x1a6c6a){const _0x5c462e=a31_0xdea3fe,{options:_0x3c76c1,args:_0x3bf536,tdx:_0xbc6a50}=_0x1a6c6a,_0x24968d=_0x3c76c1,_0x47b1bd=_0x3bf536[0x0]||_0x3c76c1[_0x5c462e(0x256)];if(!_0x47b1bd)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'+_0x5c462e(0x1f9)+_0x5c462e(0x25e)+_0x5c462e(0x2c8)),0x1;_0x3c76c1[_0x5c462e(0x2cf)]&&(console[_0x5c462e(0x3bb)](_0x5c462e(0x2cd)+_0x3c76c1[_0x5c462e(0x349)]),console[_0x5c462e(0x3bb)](_0x5c462e(0x3c9)+_0x47b1bd));const _0x886c52=await withSpinner(_0x5c462e(0x32f)+_0x47b1bd+_0x5c462e(0x23b),()=>_0xbc6a50[_0x5c462e(0x2fe)]['getParentFull'](_0x47b1bd),{'verbose':_0x3c76c1[_0x5c462e(0x2cf)]}),_0x4d6e26=_0x886c52[_0x5c462e(0x2b6)];if(_0x24968d[_0x5c462e(0x270)]){const _0x2fc714=getConsoleNextUrl(_0x24968d[_0x5c462e(0x349)],'/app/dw/parentSegments/'+_0x4d6e26['id']);return console[_0x5c462e(0x3bb)](a31_0xd5335b[_0x5c462e(0x208)]('✔')+_0x5c462e(0x32a)+a31_0xd5335b[_0x5c462e(0x325)](_0x2fc714)),openBrowser(_0x2fc714),0x0;}return await handleSingleObjectOutput(_0x4d6e26,_0x3c76c1),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2e6);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x313);async['execute'](_0x57e267){const _0x548b71=a31_0xdea3fe,{options:_0x24c746,args:_0x2caea5,tdx:_0x12dddc}=_0x57e267,_0x240b4d=_0x24c746,_0xb29879=_0x2caea5[0x0]||_0x24c746[_0x548b71(0x256)];if(!_0xb29879)return showParentSegmentNotSetError(_0x548b71(0x2ec)+'\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'+_0x548b71(0x25e)+_0x548b71(0x353)),0x1;_0x24c746[_0x548b71(0x2cf)]&&(console[_0x548b71(0x3bb)](_0x548b71(0x2cd)+_0x24c746[_0x548b71(0x349)]),console[_0x548b71(0x3bb)](_0x548b71(0x3c9)+_0xb29879));const _0x3c96b6=await withSpinner(_0x548b71(0x203)+_0xb29879+_0x548b71(0x23b),()=>_0x12dddc[_0x548b71(0x2fe)][_0x548b71(0x3d1)](_0xb29879),{'verbose':_0x24c746[_0x548b71(0x2cf)]}),_0x335c6=_0x3c96b6[_0x548b71(0x2b6)],_0x445da2=_0x12dddc['segment'][_0x548b71(0x244)](_0x335c6);if(_0x240b4d[_0x548b71(0x346)]){const _0x3ec9d6=await this[_0x548b71(0x1fe)](_0x57e267,_0xb29879,_0x335c6,_0x445da2),_0x161469=this[_0x548b71(0x1c1)](_0x3ec9d6);writeFileSync(_0x240b4d[_0x548b71(0x346)],_0x161469);const _0x34380f=_0x3ec9d6[_0x548b71(0x33b)][_0x548b71(0x275)][_0x548b71(0x2dd)]+_0x3ec9d6['behaviors'][_0x548b71(0x3ba)]((_0x534f9b,_0x3109d1)=>_0x534f9b+_0x3109d1['columns'][_0x548b71(0x2dd)],0x0),_0x35dc49=_0x3ec9d6[_0x548b71(0x24c)][_0x548b71(0x31c)](_0x314a33=>_0x314a33[_0x548b71(0x275)]['length']===0x0)[_0x548b71(0x2dd)];return console[_0x548b71(0x231)](_0x548b71(0x1d6)+_0x240b4d[_0x548b71(0x346)]),console[_0x548b71(0x231)]('\x20\x20Database:\x20'+_0x445da2),console[_0x548b71(0x231)](_0x548b71(0x2fa)+_0x3ec9d6['behaviors']['length']+_0x548b71(0x2e0)),console['log'](_0x548b71(0x21a)+_0x34380f+'\x20total'),_0x35dc49>0x0&&console['log']('\x20\x20Note:\x20'+_0x35dc49+'\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)'),0x0;}console['error']('\x0a'+a31_0xd5335b[_0x548b71(0x3a4)](_0x548b71(0x38d))+'\x20'+a31_0xd5335b[_0x548b71(0x325)](_0x445da2));const _0x309133=await withSpinner(_0x548b71(0x361),()=>_0x12dddc[_0x548b71(0x2fe)][_0x548b71(0x2e7)](_0x335c6),{'verbose':_0x24c746[_0x548b71(0x2cf)]});console[_0x548b71(0x3bb)]('\x0a'+a31_0xd5335b[_0x548b71(0x3a4)](_0x548b71(0x33b))+'\x20'+a31_0xd5335b[_0x548b71(0x297)]('('+_0x445da2+_0x548b71(0x279)));const _0x596d7b=await executeSchemaQuery(_0x309133[_0x548b71(0x2b6)],_0x12dddc,_0x24c746);await handleQueryOutput(_0x596d7b,_0x24c746);const _0x320430=await withSpinner(_0x548b71(0x375),()=>_0x12dddc[_0x548b71(0x2fe)][_0x548b71(0x333)](_0x335c6),{'verbose':_0x24c746[_0x548b71(0x2cf)]});for(const _0x2388b9 of _0x320430[_0x548b71(0x2b6)]){const _0x5aecea=_0x548b71(0x3c6)+_0x2388b9['toLowerCase']()[_0x548b71(0x25a)](/\s+/g,'_'),_0xf52e1c=_0x548b71(0x285)+_0x445da2+'.'+_0x5aecea;console[_0x548b71(0x3bb)]('\x0a'+a31_0xd5335b[_0x548b71(0x3a4)](_0x2388b9)+'\x20'+a31_0xd5335b[_0x548b71(0x297)]('('+_0x445da2+'.'+_0x5aecea+')'));try{const _0x5dd843=await executeSchemaQuery(_0xf52e1c,_0x12dddc,_0x24c746);await handleQueryOutput(_0x5dd843,_0x24c746);}catch{console[_0x548b71(0x3bb)](a31_0xd5335b['yellow'](_0x548b71(0x3a7)));}}return 0x0;}async[a31_0xdea3fe(0x1fe)](_0x2c75ce,_0x308d42,_0x20804c,_0x38b349){const _0x49f756=a31_0xdea3fe,{options:_0x365043,tdx:_0x2e793a}=_0x2c75ce,_0x3c4cd8=await withSpinner(_0x49f756(0x361),()=>_0x2e793a['segment'][_0x49f756(0x2e7)](_0x20804c),{'verbose':_0x365043[_0x49f756(0x2cf)]}),_0x3a8bc3=await executeSchemaQuery(_0x3c4cd8[_0x49f756(0x2b6)],_0x2e793a,_0x365043),_0x67d0dc=_0x3a8bc3[_0x49f756(0x2b6)]['map'](_0x57a917=>({'name':_0x57a917['column_name'],'type':_0x57a917['column_type']})),_0x5d760b=await withSpinner(_0x49f756(0x375),()=>_0x2e793a[_0x49f756(0x2fe)]['getBehaviorNames'](_0x20804c),{'verbose':_0x365043[_0x49f756(0x2cf)]}),_0x34b96f=[];for(const _0x2bdc0b of _0x5d760b['data']){const _0x171543=_0x49f756(0x3c6)+_0x2bdc0b[_0x49f756(0x226)]()[_0x49f756(0x25a)](/\s+/g,'_'),_0x2b4b35='SELECT\x20*\x20FROM\x20'+_0x38b349+'.'+_0x171543;let _0x266828=[];try{const _0x39f630=await executeSchemaQuery(_0x2b4b35,_0x2e793a,_0x365043);_0x266828=_0x39f630[_0x49f756(0x2b6)][_0x49f756(0x267)](_0x13cfe8=>({'name':_0x13cfe8['column_name'],'type':_0x13cfe8[_0x49f756(0x21f)]}));}catch{}_0x34b96f['push']({'table':_0x171543,'columns':_0x266828});}return{'database':_0x38b349,'parent_segment':_0x308d42,'parent_id':_0x20804c,'customers':{'table':_0x49f756(0x33b),'columns':_0x67d0dc},'behaviors':_0x34b96f};}[a31_0xdea3fe(0x1c1)](_0x1ad3fd){const _0x14f416=a31_0xdea3fe,_0x3b3bd8=_0x4625ba=>{const _0x5dd882=a31_0x4b02;if(_0x4625ba[_0x5dd882(0x2dd)]===0x0)return'[]';const _0x5b8639=_0x4625ba[_0x5dd882(0x267)](_0x586587=>_0x5dd882(0x1eb)+_0x586587[_0x5dd882(0x358)]+_0x5dd882(0x217)+_0x586587[_0x5dd882(0x1ed)]+'\x22\x20}');return'[\x0a'+_0x5b8639[_0x5dd882(0x23f)](',\x0a')+_0x5dd882(0x1dd);},_0x4dc6ab=_0x1ad3fd[_0x14f416(0x24c)][_0x14f416(0x267)](_0xd6396d=>{const _0x47c324=_0x14f416;return _0x47c324(0x1f0)+_0xd6396d[_0x47c324(0x3cb)]+_0x47c324(0x2ef)+_0x3b3bd8(_0xd6396d[_0x47c324(0x275)])[_0x47c324(0x25a)](/^/gm,'\x20\x20')['trim']()+_0x47c324(0x1ea);})[_0x14f416(0x23f)](',\x0a');return _0x14f416(0x2a4)+_0x1ad3fd[_0x14f416(0x247)]+_0x14f416(0x201)+_0x1ad3fd[_0x14f416(0x213)]+_0x14f416(0x3b4)+_0x1ad3fd[_0x14f416(0x2f5)]+_0x14f416(0x28d)+_0x1ad3fd[_0x14f416(0x33b)][_0x14f416(0x3cb)]+_0x14f416(0x2c7)+_0x3b3bd8(_0x1ad3fd['customers'][_0x14f416(0x275)])[_0x14f416(0x25a)](/^/gm,'\x20\x20')['trim']()+_0x14f416(0x3c5)+_0x4dc6ab+_0x14f416(0x37a);}}export class ParentSegmentSQLCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2bb);['description']=a31_0xdea3fe(0x2f6);async[a31_0xdea3fe(0x2dc)](_0x42ad2f){const _0x175894=a31_0xdea3fe,{options:_0x1e6068,args:_0xa873b0,tdx:_0x3c56e5}=_0x42ad2f,_0x2d4c1f=_0xa873b0[0x0]||_0x1e6068[_0x175894(0x256)];if(!_0x2d4c1f)return showParentSegmentNotSetError(_0x175894(0x394)+_0x175894(0x304)),0x1;_0x1e6068[_0x175894(0x2cf)]&&(console[_0x175894(0x3bb)](_0x175894(0x2cd)+_0x1e6068[_0x175894(0x349)]),console[_0x175894(0x3bb)]('Parent\x20segment:\x20'+_0x2d4c1f));const _0x1b0ad3=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2d4c1f+_0x175894(0x23b),()=>_0x3c56e5['segment'][_0x175894(0x3d1)](_0x2d4c1f),{'verbose':_0x1e6068[_0x175894(0x2cf)]}),_0x4808f3=_0x1b0ad3[_0x175894(0x2b6)],_0x42854f=await withSpinner(_0x175894(0x2e4)+_0x2d4c1f+_0x175894(0x23b),()=>_0x3c56e5['segment'][_0x175894(0x2e7)](_0x4808f3),{'verbose':_0x1e6068[_0x175894(0x2cf)]}),_0x2c7a4b=_0x42854f[_0x175894(0x2b6)];return _0x1e6068[_0x175894(0x322)]===_0x175894(0x2b8)||_0x1e6068[_0x175894(0x322)]==='jsonl'?await handleSDKOutput([{'sql':_0x2c7a4b}],_0x1e6068):console[_0x175894(0x231)](_0x2c7a4b),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']='segment:parent:show';[a31_0xdea3fe(0x1f4)]='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async['execute'](_0x209a76){const _0x3ab3a9=a31_0xdea3fe,{options:_0xc1e2ef,args:_0x4329ee,tdx:_0x545bdb}=_0x209a76,_0x4895f4=_0x4329ee[0x0]||_0xc1e2ef[_0x3ab3a9(0x256)];if(!_0x4895f4)return showParentSegmentNotSetError(_0x3ab3a9(0x39b)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment'),0x1;_0xc1e2ef[_0x3ab3a9(0x2cf)]&&(console['error'](_0x3ab3a9(0x2cd)+_0xc1e2ef[_0x3ab3a9(0x349)]),console['error'](_0x3ab3a9(0x3c9)+_0x4895f4));const _0x3825de=await withSpinner(_0x3ab3a9(0x203)+_0x4895f4+_0x3ab3a9(0x23b),()=>_0x545bdb['segment'][_0x3ab3a9(0x3d1)](_0x4895f4),{'verbose':_0xc1e2ef[_0x3ab3a9(0x2cf)]}),_0x463e3d=_0x3825de[_0x3ab3a9(0x2b6)],_0x1b1c40=await withSpinner(_0x3ab3a9(0x2e4)+_0x4895f4+_0x3ab3a9(0x23b),()=>_0x545bdb['segment'][_0x3ab3a9(0x2e7)](_0x463e3d),{'verbose':_0xc1e2ef[_0x3ab3a9(0x2cf)]});let _0x33d60d=_0x1b1c40[_0x3ab3a9(0x2b6)];const _0x5a156a=resolveLimit(_0xc1e2ef[_0x3ab3a9(0x30b)],DEFAULT_DISPLAY_LIMIT),_0x571ffd=/\bLIMIT\s+\d+/i[_0x3ab3a9(0x1d5)](_0x33d60d);!_0x571ffd&&(_0x33d60d=_0x33d60d['trim']()['replace'](/;+$/,''),_0x33d60d=_0x3ab3a9(0x3bc)+_0x33d60d+_0x3ab3a9(0x382)+_0x5a156a);_0xc1e2ef[_0x3ab3a9(0x2cf)]&&console[_0x3ab3a9(0x3bb)](_0x3ab3a9(0x2fc)+_0x33d60d);const _0x223c73=await withProgressSpinner(_0x3ab3a9(0x22a),async _0x5edec8=>{const _0xab8ee3=_0x3ab3a9,_0x2ec09c=await _0x545bdb[_0xab8ee3(0x34a)]['execute'](_0x33d60d,{'catalog':'td','schema':_0xab8ee3(0x38e),'onJobId':_0x54771b=>{const _0x486b3e=_0xab8ee3;_0x5edec8[_0x486b3e(0x3a9)](_0x54771b);}});return _0x2ec09c;},{'verbose':_0xc1e2ef[_0x3ab3a9(0x2cf)]}),_0x56c29f=_0x223c73[_0x3ab3a9(0x2b6)],_0x34e9f3=_0x56c29f[_0x3ab3a9(0x32d)]?_0x3ab3a9(0x26f)+_0x56c29f[_0x3ab3a9(0x32d)]+']':'';return console[_0x3ab3a9(0x3bb)]('✔\x20Query\x20completed:\x20Processed\x20'+_0x56c29f[_0x3ab3a9(0x376)][_0x3ab3a9(0x20f)][_0x3ab3a9(0x386)]()+'\x20rows\x20'+(_0x3ab3a9(0x23d)+formatElapsed(_0x56c29f[_0x3ab3a9(0x376)][_0x3ab3a9(0x1d1)])+_0x34e9f3)),await handleQueryOutput(_0x56c29f,_0xc1e2ef),0x0;}}export class PSRtListCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2c5);[a31_0xdea3fe(0x1f4)]='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async['execute'](_0x3cde45){const _0x1ada44=a31_0xdea3fe,{options:_0x39f65c,args:_0x141cd7,tdx:_0x56499b}=_0x3cde45,_0x517a82=_0x141cd7[0x0],_0x5bb458=await withSpinner(_0x517a82?_0x1ada44(0x2a6)+_0x517a82+_0x1ada44(0x23b):'Listing\x20RT-enabled\x20parent\x20segments...',()=>_0x56499b[_0x1ada44(0x339)][_0x1ada44(0x3ce)](),{'verbose':_0x39f65c[_0x1ada44(0x2cf)]});let _0x22be43=_0x5bb458[_0x1ada44(0x2b6)][_0x1ada44(0x31c)](_0x54a16f=>_0x54a16f[_0x1ada44(0x24b)]);if(_0x517a82){const _0x393839=_0x517a82[_0x1ada44(0x25a)](/[.+^${}()|[\]\\]/g,_0x1ada44(0x2c4))[_0x1ada44(0x25a)](/\*/g,'.*')[_0x1ada44(0x25a)](/\?/g,'.'),_0x4c1d1f=new RegExp('^'+_0x393839+'$','i');_0x22be43=_0x22be43[_0x1ada44(0x31c)](_0x1e5c8c=>_0x4c1d1f['test'](_0x1e5c8c['name']));}_0x22be43['sort']((_0x3782c5,_0x3636f0)=>_0x3782c5[_0x1ada44(0x358)][_0x1ada44(0x263)](_0x3636f0[_0x1ada44(0x358)])),console['error'](_0x1ada44(0x220)+_0x22be43[_0x1ada44(0x2dd)]+_0x1ada44(0x2fb)+(_0x22be43['length']!==0x1?'s':''));const _0x56e888=_0x4ce363=>{const _0x4eb356=_0x1ada44;return getConsoleNextUrl(_0x39f65c[_0x4eb356(0x349)],_0x4eb356(0x3be)+_0x4ce363);};if(_0x39f65c[_0x1ada44(0x322)]===_0x1ada44(0x2b8)||_0x39f65c[_0x1ada44(0x322)]===_0x1ada44(0x39c)){const _0x185522=_0x22be43[_0x1ada44(0x267)](_0x4fa615=>({..._0x4fa615,'url':_0x56e888(_0x4fa615['id'])}));await handleSDKOutput(_0x185522,_0x39f65c);}else{if(_0x22be43[_0x1ada44(0x2dd)]===0x0)console[_0x1ada44(0x231)]('No\x20RT-enabled\x20parent\x20segments\x20found');else for(const _0x450669 of _0x22be43){const _0x2bfc98=_0x450669['population']?a31_0xd5335b['dim']('\x20('+formatRows(_0x450669[_0x1ada44(0x356)])+')'):'',_0x533c8a=hyperlink(_0x450669[_0x1ada44(0x358)],_0x56e888(_0x450669['id']));console['log']('⚡\x20'+_0x533c8a+_0x2bfc98);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2d1);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x2a7);async[a31_0xdea3fe(0x2dc)](_0x5cf279){const _0xec16b=a31_0xdea3fe,{options:_0x34bf2a,args:_0x1c7fb6,tdx:_0x29d93f}=_0x5cf279,_0x209a80=_0x1c7fb6[0x0]||_0x34bf2a[_0xec16b(0x256)];if(!_0x209a80)return showParentSegmentNotSetError(_0xec16b(0x33e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20for\x20specific\x20parent\x20segment'),0x1;const _0x53006b=resolveYamlFile(_0x209a80);if(!existsSync(_0x53006b))return showFileNotFoundError(_0x53006b,_0x209a80),0x1;let _0x1443b3;try{_0x1443b3=readFileSync(_0x53006b,_0xec16b(0x281));}catch(_0x488f56){const _0xefab08=_0x488f56 instanceof Error?_0x488f56['message']:String(_0x488f56);return console[_0xec16b(0x3bb)](_0xec16b(0x3ae)+_0xefab08),0x1;}const _0x3d2df5=createCommandSpinner(a31_0xd5335b[_0xec16b(0x297)](_0xec16b(0x30a)),{'verbose':_0x34bf2a[_0xec16b(0x2cf)]});_0x3d2df5['start']();const _0x259cb6={'realtime':!![],'onProgress':_0x2e4ae4=>{const _0x108a23=_0xec16b;_0x3d2df5[_0x108a23(0x3ac)]=formatProgressMessage(_0x2e4ae4);}};let _0x352c13;try{_0x352c13=await _0x29d93f['segment'][_0xec16b(0x27c)](_0x1443b3,_0x259cb6),_0x3d2df5[_0xec16b(0x292)]();}catch(_0x3fa023){_0x3d2df5['stop']();throw _0x3fa023;}console[_0xec16b(0x3bb)]('\x0a'+a31_0xd5335b['bold'](_0xec16b(0x3c7))+'\x20'+_0x352c13[_0xec16b(0x358)]),console[_0xec16b(0x3bb)]('═'[_0xec16b(0x2d6)](0x3c)),displayRealtimeValidation(_0x352c13),console[_0xec16b(0x3bb)]('─'[_0xec16b(0x2d6)](0x3c));if(_0x352c13[_0xec16b(0x2ad)][_0xec16b(0x2dd)]>0x0){console[_0xec16b(0x3bb)]('\x0a'+a31_0xd5335b['red'](_0xec16b(0x27d)));for(const _0x1967a6 of _0x352c13[_0xec16b(0x2ad)]){console[_0xec16b(0x3bb)]('\x20\x20'+a31_0xd5335b[_0xec16b(0x1c5)]('•')+'\x20'+_0x1967a6);}}return _0x352c13[_0xec16b(0x3a2)]&&console['error']('\x0a'+a31_0xd5335b['green']('✔')+_0xec16b(0x326)),_0x352c13[_0xec16b(0x3a2)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{['name']=a31_0xdea3fe(0x367);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x34c);async['execute'](_0x3dae97){const _0xec3f39=a31_0xdea3fe,{options:_0x2d934a,args:_0x1facb4,tdx:_0x4f2373}=_0x3dae97,_0x5b3eef=_0x1facb4[0x0]||_0x2d934a['parentSegment'];if(!_0x5b3eef)return showParentSegmentNotSetError(_0xec3f39(0x241)+'\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;_0x2d934a[_0xec3f39(0x2cf)]&&(console[_0xec3f39(0x3bb)](_0xec3f39(0x2cd)+_0x2d934a[_0xec3f39(0x349)]),console[_0xec3f39(0x3bb)]('Parent\x20segment:\x20'+_0x5b3eef));const _0x51d4f8=await withSpinner(_0xec3f39(0x203)+_0x5b3eef+_0xec3f39(0x23b),()=>_0x4f2373[_0xec3f39(0x2fe)][_0xec3f39(0x3d1)](_0x5b3eef),{'verbose':_0x2d934a[_0xec3f39(0x2cf)]}),_0x196b4d=_0x51d4f8[_0xec3f39(0x2b6)],_0x12932a=await withSpinner(_0xec3f39(0x259)+_0x5b3eef+'\x27...',()=>_0x4f2373[_0xec3f39(0x339)][_0xec3f39(0x357)](_0x196b4d),{'verbose':_0x2d934a[_0xec3f39(0x2cf)]}),_0x5c73c6=_0x12932a['data'];console[_0xec3f39(0x3bb)](_0xec3f39(0x220)+_0x5c73c6['length']+_0xec3f39(0x210)+(_0x5c73c6[_0xec3f39(0x2dd)]!==0x1?'s':''));if(_0x2d934a['format']==='json'||_0x2d934a[_0xec3f39(0x322)]===_0xec3f39(0x39c))await handleSDKOutput(_0x5c73c6,_0x2d934a);else{if(_0x5c73c6[_0xec3f39(0x2dd)]===0x0)console[_0xec3f39(0x231)]('No\x20RT\x20journeys\x20found');else for(const _0x2b78da of _0x5c73c6){const _0x268cf7=_0x2b78da[_0xec3f39(0x385)]===_0xec3f39(0x24d)?'🚀':'📝',_0x363c02=_0x2b78da[_0xec3f39(0x2af)]?a31_0xd5335b[_0xec3f39(0x2e5)](_0xec3f39(0x38a)):'',_0x35ea81=a31_0xd5335b['dim']('\x20('+_0x2b78da[_0xec3f39(0x25f)]+'\x20stage'+(_0x2b78da[_0xec3f39(0x25f)]!==0x1?'s':'')+')');console[_0xec3f39(0x231)](_0x268cf7+'\x20'+_0x2b78da['name']+_0x363c02+_0x35ea81);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{['name']='ps:rt:jn:pause';[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x398);async[a31_0xdea3fe(0x2dc)](_0x34e220){const _0x599a9b=a31_0xdea3fe,{options:_0x2e454e,args:_0x24eb46,tdx:_0x5691a3}=_0x34e220,_0x1eea8f=_0x24eb46[0x0];if(!_0x1eea8f)return console['error'](a31_0xd5335b[_0x599a9b(0x1c5)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x599a9b(0x3bb)](_0x599a9b(0x323)),console[_0x599a9b(0x3bb)](a31_0xd5335b['dim']('Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs')),0x1;_0x2e454e[_0x599a9b(0x2cf)]&&(console['error'](_0x599a9b(0x2cd)+_0x2e454e['site']),console['error']('RT\x20Journey\x20ID:\x20'+_0x1eea8f));const _0x4edc32=await withSpinner(_0x599a9b(0x3b9)+_0x1eea8f+'\x27...',()=>_0x5691a3['realtime'][_0x599a9b(0x29b)](_0x1eea8f),{'verbose':_0x2e454e[_0x599a9b(0x2cf)]}),_0x3b2719=_0x4edc32[_0x599a9b(0x2b6)];console[_0x599a9b(0x3bb)](_0x599a9b(0x2bd)+_0x3b2719[_0x599a9b(0x358)]+'\x27');if(_0x2e454e[_0x599a9b(0x322)]===_0x599a9b(0x2b8)||_0x2e454e[_0x599a9b(0x322)]===_0x599a9b(0x39c))await handleSDKOutput([_0x3b2719],_0x2e454e);else{const _0x16641d=_0x3b2719[_0x599a9b(0x385)]===_0x599a9b(0x24d)?'🚀':'📝',_0x52f261=_0x3b2719[_0x599a9b(0x2af)]?a31_0xd5335b[_0x599a9b(0x2e5)](_0x599a9b(0x38a)):'';console['log'](_0x16641d+'\x20'+_0x3b2719['name']+_0x52f261);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x246);['description']=a31_0xdea3fe(0x2d0);async[a31_0xdea3fe(0x2dc)](_0x33192d){const _0xbb54c6=a31_0xdea3fe,{options:_0x128a05,args:_0x46df06,tdx:_0x17389b}=_0x33192d,_0x3a37be=_0x46df06[0x0];if(!_0x3a37be)return console['error'](a31_0xd5335b[_0xbb54c6(0x1c5)](_0xbb54c6(0x29a))),console[_0xbb54c6(0x3bb)](_0xbb54c6(0x3c2)),console[_0xbb54c6(0x3bb)](a31_0xd5335b[_0xbb54c6(0x297)](_0xbb54c6(0x1d8))),0x1;_0x128a05[_0xbb54c6(0x2cf)]&&(console[_0xbb54c6(0x3bb)](_0xbb54c6(0x2cd)+_0x128a05[_0xbb54c6(0x349)]),console[_0xbb54c6(0x3bb)]('RT\x20Journey\x20ID:\x20'+_0x3a37be));const _0x4a05f0=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x3a37be+'\x27...',()=>_0x17389b[_0xbb54c6(0x339)][_0xbb54c6(0x368)](_0x3a37be),{'verbose':_0x128a05[_0xbb54c6(0x2cf)]}),_0x40ac23=_0x4a05f0[_0xbb54c6(0x2b6)];console[_0xbb54c6(0x3bb)]('✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x40ac23['name']+'\x27');if(_0x128a05[_0xbb54c6(0x322)]===_0xbb54c6(0x2b8)||_0x128a05[_0xbb54c6(0x322)]===_0xbb54c6(0x39c))await handleSDKOutput([_0x40ac23],_0x128a05);else{const _0x4c9bc3=_0x40ac23['state']===_0xbb54c6(0x24d)?'🚀':'📝',_0x13a864=_0x40ac23[_0xbb54c6(0x2af)]?a31_0xd5335b[_0xbb54c6(0x2e5)](_0xbb54c6(0x38a)):'';console[_0xbb54c6(0x231)](_0x4c9bc3+'\x20'+_0x40ac23[_0xbb54c6(0x358)]+_0x13a864);}return 0x0;}}function a31_0x5df8(){const _0x58195c=['Next\x20steps:','td_client_id','green','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','ignore','folder-segment','listPersonalizations','entryCriteria','coveragePercent','processedRows','\x20RT\x20journey','\x20\x20\x20','Error:\x20--behavior\x20requires\x20a\x20name\x0a','parent_segment','Personalization\x20service\x20description','keyEventId:','1190535EHuMYe','\x22,\x20\x22type\x22:\x20\x22','Error:\x20--database\x20and\x20--table\x20are\x20required','sort','\x20\x20Columns:\x20','all','Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','interval','column_type','✔\x20Found\x20','Master\x20Table','string','Options:','eventKind','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','toLowerCase','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','✔\x20Updated\x20parent\x20segment\x20\x27','platform','Executing\x20parent\x20segment\x20query...','Analyzing\x20changes...','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','win32','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','displayAttributesStats','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','log','Database:\x20','\x20\x20\x20\x20','idStitching','\x0aNew\x20parent\x20segment\x20\x27','No\x20personalizations\x20configured','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','To\x20view\x20sample\x20data:','entryCriteria:','displayPreviewResults','\x27...','/{name}.yml\x0a','in\x20','\x20true','join','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','Usage:\x20tdx\x20ps\x20rt\x20jn\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20RT\x20journeys\x20(requires\x20context)\x0a','\x20\x20\x20\x20-\x20','Created','getOutputDatabaseName','\x20Configuration\x20is\x20valid','ps:rt:jn:resume','database','Error:\x20Parent\x20segment\x20name\x20is\x20required','sections:','No\x20parent\x20segments\x20match\x20pattern:\x20','realtime_enabled','behaviors','launched','Coverage:','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','sections','some','scheduleType','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','ps:pz:service:create','sourceTableError','parentSegment','Enriched:','audienceId:\x20','Listing\x20RT\x20journeys\x20for\x20\x27','replace','/\x20directories\x20exist.','segment:parent:push','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Options:\x0a','stageCount','✔\x20Created\x20personalization\x20service\x20\x27','Updating\x20parent\x20segment\x20\x27','Fetching\x20current\x20configuration\x20for\x20\x27','localeCompare','<database>.<table>','List\x20available\x20fields\x20for\x20segmentation','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','map','addAttributes','ps:pz:init','master','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20\x20\x20\x20\x20','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','\x20[Job\x20ID:\x20','web','value','Events:','public:','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','columns','audienceId:','sourceTableValid','Error:\x20--name\x20is\x20required','.customers)','✔\x20Created\x20personalization\x20\x27','⚡\x20Enabled','validateParentYaml','Errors:','match','Error:','Found\x20YAML\x20file:\x20','utf-8','\x20tdx\x20wf\x20attempt\x20','\x0aChanges\x20to\x20apply\x20to\x20\x27','displayPreviewHints','SELECT\x20*\x20FROM\x20','workflowAttemptId','Attribute:','2mrlqcD','\x20parent\x20segment\x20\x27','Output\x20file:\x20','\x27\x20(id:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','265945tciSve','\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','audienceId','foreignKey','stop','5KtxwbM','\x20Added\x20personalization\x20template\x20to\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]','Deleting\x20personalization\x20service\x20\x27','dim','schemaError','schemaValid','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','pauseJourney','860424BNDNAx','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','Attempt:','ID\x20Stitching:','✔\x20Found\x20personalization\x20\x27','\x0a⚠️\x20\x20Migrating:\x20','getCurrentConfigVersion','{\x0a\x20\x20\x22database\x22:\x20\x22','valid','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','No\x20personalization\x20services\x20configured','delete','varchar','\x20--behavior\x20\x22','Patching\x20personalization\x20\x27','errors','\x20service(s)\x20configured','paused','ps:pz:service:delete','displayValidateResults','enriched','displayBehaviorsStats','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','listFields','data','Apply\x20changes\x20to\x20\x27','json','Attributes:','\x0aUsage:\x20tdx\x20ps\x20preview\x20','segment:parent:sql','Deleting\x20personalization\x20\x27','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','timezone','allowedIps','Get\x20current\x20RT\x20configuration\x20version\x20status','\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','segment:parent:fields','Join\x20on:','\x5c$&','ps:rt:list','identifier:\x20','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','Personalization:','realtime:','\x20\x202.\x20Run\x20','ps:pz:delete','Site:\x20','includeSensitive:','verbose','Resume\x20activations\x20in\x20an\x20RT\x20journey','ps:rt:validate','/sessions/','apply','\x0aNo\x20sample\x20data\x20available','Updating\x20personalization\x20service\x20\x27','repeat','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','Fetching\x20sample\x20data...','pushParentYaml','Create\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','execute','length','Delete\x20a\x20realtime\x20personalization','workflowSessionId','\x20behaviors','last_page_viewed','\x20personalization','Customers:','Fetching\x20SQL\x20for\x20\x27','yellow','segment:parent:desc','getParentSQL','Default','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','displaySampleData','patch','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','⚡\x20Not\x20enabled','message','\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20','displaySummary','tokens','segment:parent:update','\x0aError:','page_view','parent_id','Get\x20SQL\x20query\x20for\x20parent\x20segment','addBehaviors','\x20Context\x20set:\x20','To\x20cancel:','\x20\x20Tables:\x201\x20customers\x20+\x20','\x20RT-enabled\x20parent\x20segment','SQL\x20query:\x0a','Fetching\x20personalization\x20service\x20\x27','segment','primaryKey','column','Error:\x20--attribute\x20requires\x20a\x20name\x0a','start','customerPercent','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Master:','displayMasterInfo','Source:','Error:\x20Service\x20ID\x20is\x20required','\x20--attribute\x20\x22','Validating\x20RT\x20configuration...','limit','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','getParentFull','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','joinKey','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','Creating','yes','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x20field','Audience\x20ID:','rowCount','segment:parent:preview','Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:','\x20\x20No\x20sample\x20data\x20available','2514612sQIkbD','scheduleOption','filter','/\x20→\x20','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','ps:pz:service:token:create','\x27\x20for\x20service\x20\x27','ps:pz:service:show','format','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','cyan','\x20RT\x20configuration\x20is\x20valid','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','folderId','personalizationServices','\x20Opening\x20','Aborted.','relationships','jobId','createParent','Fetching\x20parent\x20segment\x20\x27','getPersonalization','\x20service','double','getBehaviorNames','Table:\x20','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','2002763hHhrYO','Error:\x20Service\x20name\x20is\x20required','\x27\x20is\x20already\x20up\x20to\x20date','realtime','\x20configured','customers','\x27\x20is\x20up\x20to\x20date','status','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','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','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','Usage:\x20tdx\x20ps\x20pz\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Add\x20PZ\x20template\x20(requires\x20context)\x0a','ps:pz:service:list','\x20No\x20changes\x20-\x20','output','\x20kill','tdx\x20ps\x20preview\x20','site','query','true','List\x20RT\x20journeys','keyEventId','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','Pattern:\x20','Show\x20parent\x20segment\x20details','createdAt','enabled','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','dirname','✔\x20Deleted\x20token\x20\x27','population','listJourneys','name','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','keys','Show\x20personalization\x20service\x20details','attributes','✔\x20Renamed\x20directory\x20to\x20','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Behavior:','preview','Fetching\x20customers\x20schema...','identifier','segment:parent:list','Attributes','/app/workflows/','\x20rows)','ps:rt:jn:list','resumeJourney','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Error:\x20Personalization\x20ID\x20is\x20required','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','updateParent','Master\x20+\x20Attributes','6000894nyJJSn','No\x20parent\x20segments\x20found','Rows:','segment:parent:pull','Status:','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Fetching\x20behavior\x20list...','stats','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','YAML\x20file:\x20','\x0a\x20\x20]\x0a}\x0a','segment:parent:create','matchedCount','pullParentYaml','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','payload','Creating\x20personalization\x20\x27','\x27\x20and\x20run\x20workflow?','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','parentFolder','Error:\x20File\x20not\x20found:\x20','state','toLocaleString','allowed\x20IPs:','\x20\x20\x20\x20\x20\x20\x20\x20','ps:rt:configuration_versions','\x20(paused)','any','customersWithEvents','Output\x20Database:','information_schema','customerGroupFile','no\x20tokens\x20configured','ps:pz:service:token:delete','open','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20=\x20','ps:pz:service:update','Pause\x20activations\x20in\x20an\x20RT\x20journey','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','single','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','jsonl','Listing\x20parent\x20segments...','Listing\x20personalizations\x20for\x20\x27','-1d','Update\x20a\x20realtime\x20personalization\x20entity','sampleData','allValid','use','bold','/\x20and\x20','RT\x202.0:','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','events','setJobId','Error:\x20Token\x20ID\x20is\x20required','number','text','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Error\x20reading\x20file:\x20','`\x20to\x20download\x20the\x20configuration\x20first','\x20is\x20already\x20up\x20to\x20date','tdx\x20ps\x20push\x20','addAttributesFile','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','label','displayColumns','\x0a⚠️\x20\x20Both\x20','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','reduce','error','SELECT\x20*\x20FROM\x20(\x0a','segment:parent:view','/app/dw/parentSegments/','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','keyEventCriteria','Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','behavior','Preview:','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','behavior_','RT\x202.0\x20Validate:','\x0aChanges\x20to\x20\x27','Parent\x20segment:\x20','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','table','using\x20the\x20default\x20path:\x20','customerGroup','list','\x20--attribute\x20\x22<name>\x22','.yml','resolveParentId','behaviorsFile','\x27\x20with\x20ID:\x20','null','Join:','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','totalEvents','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','formatSchemaJson','Creating\x20personalization\x20service\x20\x27','workflowId','✔\x20Retrieved\x20RT\x20configuration\x20version','red','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','Listing\x20fields\x20for\x20\x27','user_id','trim','stitchingKeys','createPersonalization','run','✔\x20Created\x20parent\x20segment\x20\x27','public','includeSensitive','\x0a✔\x20Workflow\x20started','elapsedTimeMillis','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','\x20personalization\x20service','\x20--behavior\x20\x22<name>\x22','test','Schema\x20saved\x20to\x20','Creating\x20token\x20\x27','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Error:\x20Token\x20\x27','Creating\x20parent\x20segment\x20\x27','displayRealtimeInfo','\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','\x0a\x20\x20\x20\x20]','(id:\x20','personalization_services','Getting\x20personalization\x20\x27','Columns:','previewParentYaml','personalization','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','attribute','132712TgSpNd','✔\x20No\x20changes\x20-\x20\x27','Available\x20attributes:','👥\x20','\x0a\x20\x20\x20\x20}','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','My\x20Service','type','isDirectory','updated:','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','segment:parent:validate','\x20to\x20push\x20the\x20configuration','file','description','split','✘\x20Failed\x20to\x20rename\x20directory:\x20','Updated','/attempt/','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','unref','token:','Delete\x20a\x20personalization\x20service','patchPersonalization','collectSchema','Error\x20parsing\x20YAML:\x20','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Resolving\x20parent\x20segment\x20\x27','Validate:','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'];a31_0x5df8=function(){return _0x58195c;};return a31_0x5df8();}export class PSRtConfigVersionCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x389);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x2c0);async['execute'](_0x5009e1){const _0x2f02f9=a31_0xdea3fe,{options:_0x17054d,args:_0x379f48,tdx:_0x5567f8}=_0x5009e1,_0x43ad2f=_0x379f48[0x0]||_0x17054d['parentSegment'];if(!_0x43ad2f)return showParentSegmentNotSetError(_0x2f02f9(0x33f)+_0x2f02f9(0x28f)),0x1;_0x17054d[_0x2f02f9(0x2cf)]&&(console[_0x2f02f9(0x3bb)](_0x2f02f9(0x2cd)+_0x17054d[_0x2f02f9(0x349)]),console['error'](_0x2f02f9(0x3c9)+_0x43ad2f));const _0x366e1c=await withSpinner(_0x2f02f9(0x203)+_0x43ad2f+_0x2f02f9(0x23b),()=>_0x5567f8['segment'][_0x2f02f9(0x3d1)](_0x43ad2f),{'verbose':_0x17054d[_0x2f02f9(0x2cf)]}),_0x4eaf82=_0x366e1c[_0x2f02f9(0x2b6)],_0x552ad5=await withSpinner(_0x2f02f9(0x21d)+_0x43ad2f+_0x2f02f9(0x23b),()=>_0x5567f8[_0x2f02f9(0x339)][_0x2f02f9(0x2a3)](_0x4eaf82),{'verbose':_0x17054d[_0x2f02f9(0x2cf)]}),_0x1dc177=_0x552ad5[_0x2f02f9(0x2b6)];return console[_0x2f02f9(0x3bb)](_0x2f02f9(0x1c4)),_0x17054d[_0x2f02f9(0x322)]===_0x2f02f9(0x2b8)||_0x17054d[_0x2f02f9(0x322)]===_0x2f02f9(0x39c)?await handleSDKOutput([_0x1dc177],_0x17054d):(console[_0x2f02f9(0x231)]('id:\x20'+_0x1dc177['id']),console[_0x2f02f9(0x231)](_0x2f02f9(0x258)+_0x1dc177['audienceId']),console['log'](_0x2f02f9(0x2c6)+_0x1dc177[_0x2f02f9(0x362)]),console['log']('eventKind:\x20'+_0x1dc177[_0x2f02f9(0x224)]),console['log']('status:\x20'+_0x1dc177[_0x2f02f9(0x33d)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x344);[a31_0xdea3fe(0x1f4)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async[a31_0xdea3fe(0x2dc)](_0x280d69){const _0x4b08b1=a31_0xdea3fe,{options:_0x2e78ff,args:_0x29bbc5,tdx:_0x1c8bc1}=_0x280d69,_0x157a25=_0x29bbc5[0x0]||_0x2e78ff[_0x4b08b1(0x256)];if(!_0x157a25)return showParentSegmentNotSetError(_0x4b08b1(0x230)+_0x4b08b1(0x1dc)),0x1;const _0x4ee170=await withSpinner(_0x4b08b1(0x203)+_0x157a25+'\x27...',()=>_0x1c8bc1[_0x4b08b1(0x2fe)]['resolveParentId'](_0x157a25),{'verbose':_0x2e78ff['verbose']}),_0x3d1dae=_0x4ee170[_0x4b08b1(0x2b6)],_0x1ec7aa=await withSpinner('Listing\x20personalization\x20services\x20for\x20\x27'+_0x157a25+_0x4b08b1(0x23b),()=>_0x1c8bc1[_0x4b08b1(0x1e3)][_0x4b08b1(0x3ce)](_0x3d1dae),{'verbose':_0x2e78ff[_0x4b08b1(0x2cf)]}),_0x947d7e=_0x1ec7aa[_0x4b08b1(0x2b6)];console[_0x4b08b1(0x3bb)]('✔\x20Found\x20'+_0x947d7e[_0x4b08b1(0x2dd)]+_0x4b08b1(0x1d3)+(_0x947d7e['length']!==0x1?'s':''));if(_0x2e78ff[_0x4b08b1(0x322)]==='json'||_0x2e78ff[_0x4b08b1(0x322)]===_0x4b08b1(0x39c))await handleSDKOutput(_0x947d7e,_0x2e78ff);else{if(_0x947d7e[_0x4b08b1(0x2dd)]===0x0)console[_0x4b08b1(0x231)](_0x4b08b1(0x2a8)),console['error'](a31_0xd5335b[_0x4b08b1(0x325)](_0x4b08b1(0x35e)));else for(const _0x4f95ee of _0x947d7e){console[_0x4b08b1(0x231)](a31_0xd5335b[_0x4b08b1(0x3a4)](_0x4f95ee['name'])+'\x20'+a31_0xd5335b['dim'](_0x4b08b1(0x1de)+_0x4f95ee['id']+')'));_0x4f95ee[_0x4b08b1(0x1f4)]&&console['log']('\x20\x20'+a31_0xd5335b[_0x4b08b1(0x297)](_0x4f95ee['description']));if(_0x4f95ee[_0x4b08b1(0x2f1)]&&_0x4f95ee[_0x4b08b1(0x2f1)]['length']>0x0)for(const _0x4d0d0f of _0x4f95ee[_0x4b08b1(0x2f1)]){const _0x15fb89=_0x4d0d0f[_0x4b08b1(0x2bf)]?.[_0x4b08b1(0x2dd)]?_0x4d0d0f[_0x4b08b1(0x2bf)][_0x4b08b1(0x23f)](',\x20'):_0x4b08b1(0x38b);console['log']('\x20\x20'+a31_0xd5335b[_0x4b08b1(0x325)](_0x4b08b1(0x1fb))+'\x20'+_0x4d0d0f[_0x4b08b1(0x358)]+'\x20'+a31_0xd5335b[_0x4b08b1(0x297)](_0x4b08b1(0x1de)+_0x4d0d0f['id']+')')),console[_0x4b08b1(0x231)](_0x4b08b1(0x233)+a31_0xd5335b[_0x4b08b1(0x297)](_0x4b08b1(0x387))+'\x20'+_0x15fb89);}else console[_0x4b08b1(0x231)]('\x20\x20'+a31_0xd5335b[_0x4b08b1(0x297)]('no\x20tokens\x20configured'));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a31_0xdea3fe(0x254);[a31_0xdea3fe(0x1f4)]='Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment';async[a31_0xdea3fe(0x2dc)](_0x4f8c21){const _0x200acd=a31_0xdea3fe,{options:_0x27a2b2,args:_0x739174,tdx:_0x501213}=_0x4f8c21,_0x28fe39=_0x27a2b2,_0x196ae6=_0x739174[0x0],_0x1e9223=_0x739174[0x1]||_0x27a2b2[_0x200acd(0x256)];if(!_0x196ae6)return console[_0x200acd(0x3bb)](_0x200acd(0x337)),console['error'](_0x200acd(0x310)),console[_0x200acd(0x3bb)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x1e9223)return showParentSegmentNotSetError(_0x200acd(0x22e)+_0x200acd(0x36c)),0x1;const _0x19ccf1=await withSpinner(_0x200acd(0x203)+_0x1e9223+_0x200acd(0x23b),()=>_0x501213[_0x200acd(0x2fe)][_0x200acd(0x3d1)](_0x1e9223),{'verbose':_0x27a2b2[_0x200acd(0x2cf)]}),_0x1f911f=_0x19ccf1['data'],_0x47ae25={'name':_0x196ae6,'description':_0x28fe39[_0x200acd(0x1f4)],'public':_0x28fe39['public']},_0x453d4d=await withSpinner(_0x200acd(0x1c2)+_0x196ae6+_0x200acd(0x23b),()=>_0x501213[_0x200acd(0x1e3)]['create'](_0x1f911f,_0x47ae25),{'verbose':_0x27a2b2['verbose']}),_0x12043c=_0x453d4d['data'];return console['error'](_0x200acd(0x260)+_0x12043c[_0x200acd(0x358)]+_0x200acd(0x1ba)+_0x12043c['id']),await handleSDKOutput([_0x12043c],_0x27a2b2),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x321);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x35b);async[a31_0xdea3fe(0x2dc)](_0x48bb37){const _0x3a24f3=a31_0xdea3fe,{options:_0x241cad,args:_0x5d9086,tdx:_0x4fb277}=_0x48bb37,_0x7ce294=_0x5d9086[0x0],_0x17fa57=_0x5d9086[0x1]||_0x241cad['parentSegment'];if(!_0x7ce294)return console[_0x3a24f3(0x3bb)](_0x3a24f3(0x308)),console[_0x3a24f3(0x3bb)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]'),console['error'](_0x3a24f3(0x253)),0x1;if(!_0x17fa57)return showParentSegmentNotSetError(_0x3a24f3(0x26b)+_0x3a24f3(0x253)),0x1;const _0x1226e4=await withSpinner(_0x3a24f3(0x203)+_0x17fa57+_0x3a24f3(0x23b),()=>_0x4fb277[_0x3a24f3(0x2fe)][_0x3a24f3(0x3d1)](_0x17fa57),{'verbose':_0x241cad['verbose']}),_0x1ac3b2=_0x1226e4[_0x3a24f3(0x2b6)],_0x5ae011=await withSpinner(_0x3a24f3(0x2fd)+_0x7ce294+_0x3a24f3(0x23b),()=>_0x4fb277[_0x3a24f3(0x1e3)]['get'](_0x1ac3b2,_0x7ce294),{'verbose':_0x241cad[_0x3a24f3(0x2cf)]}),_0x5baf05=_0x5ae011['data'];if(_0x241cad['json']||_0x241cad[_0x3a24f3(0x39c)])await handleSDKOutput([_0x5baf05],_0x241cad);else{console[_0x3a24f3(0x231)](a31_0xd5335b[_0x3a24f3(0x3a4)](_0x5baf05[_0x3a24f3(0x358)])+'\x20'+a31_0xd5335b[_0x3a24f3(0x297)](_0x3a24f3(0x1de)+_0x5baf05['id']+')'));_0x5baf05['description']&&console[_0x3a24f3(0x231)]('\x20\x20'+a31_0xd5335b[_0x3a24f3(0x297)](_0x5baf05[_0x3a24f3(0x1f4)]));console['log']('\x20\x20'+a31_0xd5335b[_0x3a24f3(0x325)](_0x3a24f3(0x273))+'\x20'+(_0x5baf05[_0x3a24f3(0x1ce)]?_0x3a24f3(0x312):'no'));if(_0x5baf05[_0x3a24f3(0x2f1)]&&_0x5baf05['tokens'][_0x3a24f3(0x2dd)]>0x0)for(const _0x30b190 of _0x5baf05[_0x3a24f3(0x2f1)]){const _0x4e8797=_0x30b190[_0x3a24f3(0x2bf)]?.[_0x3a24f3(0x2dd)]?_0x30b190[_0x3a24f3(0x2bf)][_0x3a24f3(0x23f)](',\x20'):_0x3a24f3(0x38b);console[_0x3a24f3(0x231)]('\x20\x20'+a31_0xd5335b[_0x3a24f3(0x325)](_0x3a24f3(0x1fb))+'\x20'+_0x30b190[_0x3a24f3(0x358)]+'\x20'+a31_0xd5335b[_0x3a24f3(0x297)](_0x3a24f3(0x1de)+_0x30b190['id']+')')),console[_0x3a24f3(0x231)](_0x3a24f3(0x233)+a31_0xd5335b['dim'](_0x3a24f3(0x387))+'\x20'+_0x4e8797);}else console[_0x3a24f3(0x231)]('\x20\x20'+a31_0xd5335b[_0x3a24f3(0x297)](_0x3a24f3(0x390)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2b0);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x1fc);async[a31_0xdea3fe(0x2dc)](_0x4446a6){const _0xa45d31=a31_0xdea3fe,{options:_0x1864b0,args:_0x526c1c,tdx:_0x319e47}=_0x4446a6,_0x42ac04=_0x526c1c[0x0],_0x57bfc4=_0x526c1c[0x1]||_0x1864b0[_0xa45d31(0x256)];if(!_0x42ac04)return console[_0xa45d31(0x3bb)](_0xa45d31(0x308)),console[_0xa45d31(0x3bb)](_0xa45d31(0x295)),console['error'](_0xa45d31(0x26c)),0x1;if(!_0x57bfc4)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x26e6b1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x57bfc4+_0xa45d31(0x23b),()=>_0x319e47[_0xa45d31(0x2fe)][_0xa45d31(0x3d1)](_0x57bfc4),{'verbose':_0x1864b0[_0xa45d31(0x2cf)]}),_0xb15adb=_0x26e6b1[_0xa45d31(0x2b6)];return await withSpinner(_0xa45d31(0x296)+_0x42ac04+_0xa45d31(0x23b),()=>_0x319e47[_0xa45d31(0x1e3)][_0xa45d31(0x2a9)](_0xb15adb,_0x42ac04),{'verbose':_0x1864b0['verbose']}),console[_0xa45d31(0x3bb)]('✔\x20Deleted\x20personalization\x20service\x20\x27'+_0x42ac04+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x397);[a31_0xdea3fe(0x1f4)]='Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description';async[a31_0xdea3fe(0x2dc)](_0x510a58){const _0x2df5de=a31_0xdea3fe,{options:_0x408170,args:_0x40f9fd,tdx:_0x360581}=_0x510a58,_0x3daf7d=_0x408170,_0x17c501=_0x40f9fd[0x0],_0x5d6581=_0x40f9fd[0x1]||_0x408170[_0x2df5de(0x256)];if(!_0x17c501)return console['error']('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0x2df5de(0x34e)),console[_0x2df5de(0x3bb)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x3daf7d[_0x2df5de(0x358)])return console[_0x2df5de(0x3bb)](_0x2df5de(0x278)),console[_0x2df5de(0x3bb)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x5d6581)return showParentSegmentNotSetError(_0x2df5de(0x2db)+_0x2df5de(0x29e)),0x1;const _0x4ad73b=await withSpinner(_0x2df5de(0x203)+_0x5d6581+_0x2df5de(0x23b),()=>_0x360581['segment'][_0x2df5de(0x3d1)](_0x5d6581),{'verbose':_0x408170[_0x2df5de(0x2cf)]}),_0x5ece2a=_0x4ad73b['data'],_0x1994bd={'name':_0x3daf7d['name']};_0x3daf7d['description']!==undefined&&(_0x1994bd[_0x2df5de(0x1f4)]=_0x3daf7d[_0x2df5de(0x1f4)]);const _0xc848eb=await withSpinner(_0x2df5de(0x2d5)+_0x17c501+_0x2df5de(0x23b),()=>_0x360581[_0x2df5de(0x1e3)][_0x2df5de(0x2eb)](_0x5ece2a,_0x17c501,_0x1994bd),{'verbose':_0x408170[_0x2df5de(0x2cf)]}),_0x3f688b=_0xc848eb[_0x2df5de(0x2b6)];return console[_0x2df5de(0x3bb)]('✔\x20Updated\x20personalization\x20service\x20\x27'+_0x3f688b['name']+'\x27'),await handleSDKOutput([_0x3f688b],_0x408170),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{['name']=a31_0xdea3fe(0x31f);[a31_0xdea3fe(0x1f4)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a31_0xdea3fe(0x2dc)](_0x34d2ab){const _0x32668a=a31_0xdea3fe,{options:_0x96a0c,args:_0x4816fc,tdx:_0x4fdbe9}=_0x34d2ab,_0x6af00f=_0x96a0c,_0x1924b1=_0x4816fc[0x0],_0x48bab1=_0x4816fc[0x1],_0x5896d9=_0x4816fc[0x2]||_0x96a0c[_0x32668a(0x256)];if(!_0x1924b1)return console[_0x32668a(0x3bb)]('Error:\x20Token\x20name\x20is\x20required'),console[_0x32668a(0x3bb)](_0x32668a(0x341)),console[_0x32668a(0x3bb)](_0x32668a(0x3b5)),0x1;if(!_0x48bab1)return console['error'](_0x32668a(0x308)),console['error'](_0x32668a(0x341)),console[_0x32668a(0x3bb)](_0x32668a(0x3b5)),0x1;if(!_0x5896d9)return showParentSegmentNotSetError(_0x32668a(0x374)+_0x32668a(0x3b5)),0x1;const _0x10e70d=await withSpinner(_0x32668a(0x203)+_0x5896d9+_0x32668a(0x23b),()=>_0x4fdbe9[_0x32668a(0x2fe)][_0x32668a(0x3d1)](_0x5896d9),{'verbose':_0x96a0c['verbose']}),_0x44fdce=_0x10e70d[_0x32668a(0x2b6)],_0x3ad82f={'name':_0x1924b1};_0x6af00f[_0x32668a(0x2bf)]&&(_0x3ad82f[_0x32668a(0x2bf)]=_0x6af00f[_0x32668a(0x2bf)][_0x32668a(0x1f5)](',')[_0x32668a(0x267)](_0x33c29a=>_0x33c29a[_0x32668a(0x1c9)]()));_0x6af00f[_0x32668a(0x1f4)]&&(_0x3ad82f[_0x32668a(0x1f4)]=_0x6af00f[_0x32668a(0x1f4)]);const _0x1c7133=await withSpinner(_0x32668a(0x1d7)+_0x1924b1+_0x32668a(0x320)+_0x48bab1+'\x27...',()=>_0x4fdbe9[_0x32668a(0x1e3)]['createToken'](_0x44fdce,_0x48bab1,_0x3ad82f),{'verbose':_0x96a0c[_0x32668a(0x2cf)]}),_0x7d8867=_0x1c7133[_0x32668a(0x2b6)];return console[_0x32668a(0x3bb)]('✔\x20Created\x20token\x20\x27'+_0x7d8867['name']+'\x27\x20with\x20ID:\x20'+_0x7d8867['id']),_0x7d8867[_0x32668a(0x271)]&&(console['error'](a31_0xd5335b['yellow']('\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:')),console[_0x32668a(0x3bb)](a31_0xd5335b[_0x32668a(0x325)](_0x7d8867['value'])),console[_0x32668a(0x3bb)]('')),await handleSDKOutput([_0x7d8867],_0x96a0c),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x391);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x209);async[a31_0xdea3fe(0x2dc)](_0x5e62c2){const _0x1336ad=a31_0xdea3fe,{options:_0x359a3c,args:_0x351673,tdx:_0x502ae0}=_0x5e62c2,_0x32da3b=_0x351673[0x0],_0x113ec7=_0x351673[0x1]||_0x359a3c['parentSegment'];if(!_0x32da3b)return console[_0x1336ad(0x3bb)](_0x1336ad(0x3aa)),console[_0x1336ad(0x3bb)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console[_0x1336ad(0x3bb)](_0x1336ad(0x28c)),0x1;if(!_0x113ec7)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a'+_0x1336ad(0x28c)),0x1;const _0x4a0501=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x113ec7+_0x1336ad(0x23b),()=>_0x502ae0[_0x1336ad(0x2fe)][_0x1336ad(0x3d1)](_0x113ec7),{'verbose':_0x359a3c[_0x1336ad(0x2cf)]}),_0x30ac4f=_0x4a0501[_0x1336ad(0x2b6)],_0x2c179b=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x502ae0[_0x1336ad(0x1e3)][_0x1336ad(0x3ce)](_0x30ac4f),{'verbose':_0x359a3c[_0x1336ad(0x2cf)]}),_0x515d86=_0x2c179b[_0x1336ad(0x2b6)];let _0x45c10e;for(const _0x32a06d of _0x515d86){if(_0x32a06d[_0x1336ad(0x2f1)]?.[_0x1336ad(0x251)](_0x402217=>_0x402217['id']===_0x32da3b)){_0x45c10e=_0x32a06d['id'];break;}}if(!_0x45c10e)return console[_0x1336ad(0x3bb)](_0x1336ad(0x1d9)+_0x32da3b+_0x1336ad(0x266)),0x1;const _0x2b5a4a=await withSpinner('Deleting\x20token\x20\x27'+_0x32da3b+_0x1336ad(0x23b),()=>_0x502ae0[_0x1336ad(0x1e3)]['deleteToken'](_0x30ac4f,_0x45c10e,_0x32da3b),{'verbose':_0x359a3c[_0x1336ad(0x2cf)]}),_0x5b6cc0=_0x2b5a4a['data'];return console['error'](_0x1336ad(0x355)+(_0x5b6cc0[_0x1336ad(0x358)]||_0x32da3b)+'\x27'),await handleSDKOutput([_0x5b6cc0],_0x359a3c),0x0;}}export class PSPzListCommand extends BaseCommand{[a31_0xdea3fe(0x358)]='ps:pz:list';[a31_0xdea3fe(0x1f4)]='List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment';async[a31_0xdea3fe(0x2dc)](_0x1d9a17){const _0x34a576=a31_0xdea3fe,{options:_0x2a320e,args:_0x1daac5,tdx:_0x12ae37}=_0x1d9a17,_0x148fb6=_0x1daac5[0x0]||_0x2a320e[_0x34a576(0x256)];if(!_0x148fb6)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20personalizations\x20(requires\x20context)\x0a'+_0x34a576(0x2c1)),0x1;const _0x426b89=await withSpinner(_0x34a576(0x203)+_0x148fb6+_0x34a576(0x23b),()=>_0x12ae37[_0x34a576(0x2fe)]['resolveParentId'](_0x148fb6),{'verbose':_0x2a320e['verbose']}),_0x4f2790=_0x426b89[_0x34a576(0x2b6)],_0x2bb362=await withSpinner(_0x34a576(0x39e)+_0x148fb6+_0x34a576(0x23b),()=>_0x12ae37['personalization'][_0x34a576(0x20c)](_0x4f2790),{'verbose':_0x2a320e[_0x34a576(0x2cf)]}),_0x31aad6=_0x2bb362[_0x34a576(0x2b6)];console[_0x34a576(0x3bb)](_0x34a576(0x220)+_0x31aad6['length']+_0x34a576(0x2e2)+(_0x31aad6['length']!==0x1?'s':''));if(_0x2a320e[_0x34a576(0x322)]==='json'||_0x2a320e[_0x34a576(0x322)]==='jsonl')await handleSDKOutput(_0x31aad6,_0x2a320e);else{if(_0x31aad6['length']===0x0)console[_0x34a576(0x231)](_0x34a576(0x236));else for(const _0x547494 of _0x31aad6){console[_0x34a576(0x231)](a31_0xd5335b[_0x34a576(0x3a4)](_0x547494[_0x34a576(0x358)])+'\x20'+a31_0xd5335b['dim']('(id:\x20'+_0x547494['id']+')'));_0x547494[_0x34a576(0x1f4)]&&console[_0x34a576(0x231)]('\x20\x20'+a31_0xd5335b[_0x34a576(0x297)](_0x547494['description']));const _0x233a7c=_0x547494[_0x34a576(0x250)]?.[_0x34a576(0x2dd)]||0x0;console[_0x34a576(0x231)]('\x20\x20'+a31_0xd5335b[_0x34a576(0x325)](_0x34a576(0x249))+'\x20'+_0x233a7c);if(_0x547494[_0x34a576(0x250)]&&_0x547494[_0x34a576(0x250)][_0x34a576(0x2dd)]>0x0)for(const _0x1dcd49 of _0x547494[_0x34a576(0x250)]){console[_0x34a576(0x231)]('\x20\x20\x20\x20-\x20'+_0x1dcd49[_0x34a576(0x358)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a31_0xdea3fe(0x358)]='ps:pz:show';[a31_0xdea3fe(0x1f4)]='Show\x20a\x20specific\x20realtime\x20personalization';async['execute'](_0x4c35f7){const _0x4901d9=a31_0xdea3fe,{options:_0x5ceb29,args:_0x33b238,tdx:_0x26e1be}=_0x4c35f7,_0x5b8137=_0x33b238[0x0];if(!_0x5b8137)return console[_0x4901d9(0x3bb)](_0x4901d9(0x36b)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>'),0x1;const _0x2d8fe1=await withSpinner(_0x4901d9(0x1e0)+_0x5b8137+_0x4901d9(0x23b),()=>_0x26e1be[_0x4901d9(0x1e3)][_0x4901d9(0x330)](_0x5b8137),{'verbose':_0x5ceb29[_0x4901d9(0x2cf)]}),_0x277bff=_0x2d8fe1['data'];console[_0x4901d9(0x3bb)](_0x4901d9(0x2a1)+_0x277bff[_0x4901d9(0x358)]+'\x27');if(_0x5ceb29[_0x4901d9(0x322)]===_0x4901d9(0x2b8)||_0x5ceb29['format']==='jsonl')await handleSDKOutput([_0x277bff],_0x5ceb29);else{console[_0x4901d9(0x231)](a31_0xd5335b[_0x4901d9(0x3a4)](_0x277bff[_0x4901d9(0x358)])+'\x20'+a31_0xd5335b[_0x4901d9(0x297)](_0x4901d9(0x1de)+_0x277bff['id']+')'));_0x277bff[_0x4901d9(0x1f4)]&&console['log']('\x20\x20'+a31_0xd5335b[_0x4901d9(0x297)](_0x277bff[_0x4901d9(0x1f4)]));_0x277bff[_0x4901d9(0x290)]&&console[_0x4901d9(0x231)]('\x20\x20'+a31_0xd5335b[_0x4901d9(0x325)](_0x4901d9(0x276))+'\x20'+_0x277bff[_0x4901d9(0x290)]);console[_0x4901d9(0x231)]('\x20\x20'+a31_0xd5335b[_0x4901d9(0x325)]('created:')+'\x20'+_0x277bff[_0x4901d9(0x351)]),console[_0x4901d9(0x231)]('\x20\x20'+a31_0xd5335b['cyan'](_0x4901d9(0x1ef))+'\x20'+_0x277bff['updatedAt']);const _0x471ee6=_0x277bff['sections']?.[_0x4901d9(0x2dd)]||0x0;console[_0x4901d9(0x231)]('\x20\x20'+a31_0xd5335b['cyan']('sections:')+'\x20'+_0x471ee6);if(_0x277bff[_0x4901d9(0x250)]&&_0x277bff['sections'][_0x4901d9(0x2dd)]>0x0)for(const _0x41574e of _0x277bff[_0x4901d9(0x250)]){console[_0x4901d9(0x231)](_0x4901d9(0x233)+a31_0xd5335b[_0x4901d9(0x3a4)](_0x41574e[_0x4901d9(0x358)])+'\x20'+a31_0xd5335b[_0x4901d9(0x297)](_0x4901d9(0x1de)+_0x41574e['id']+')')),_0x41574e['entryCriteria']&&(console[_0x4901d9(0x231)](_0x4901d9(0x26d)+a31_0xd5335b[_0x4901d9(0x325)](_0x4901d9(0x239))+'\x20'+_0x41574e['entryCriteria'][_0x4901d9(0x358)]),_0x41574e['entryCriteria']['keyEventCriteria']?.[_0x4901d9(0x34d)]&&console[_0x4901d9(0x231)](_0x4901d9(0x388)+a31_0xd5335b[_0x4901d9(0x325)](_0x4901d9(0x215))+'\x20'+_0x41574e[_0x4901d9(0x20d)][_0x4901d9(0x3c1)][_0x4901d9(0x34d)])),_0x41574e['payload']&&console[_0x4901d9(0x231)]('\x20\x20\x20\x20\x20\x20'+a31_0xd5335b[_0x4901d9(0x325)]('payload:')+'\x20'+JSON['stringify'](_0x41574e[_0x4901d9(0x37f)])),_0x41574e[_0x4901d9(0x1cf)]&&console[_0x4901d9(0x231)](_0x4901d9(0x26d)+a31_0xd5335b[_0x4901d9(0x325)](_0x4901d9(0x2ce))+_0x4901d9(0x23e));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x2cc);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x2de);async[a31_0xdea3fe(0x2dc)](_0x4cb2de){const _0x57df52=a31_0xdea3fe,{options:_0x25f7b0,args:_0x3000aa,tdx:_0x50fea1}=_0x4cb2de,_0x4b4776=_0x3000aa[0x0];if(!_0x4b4776)return console[_0x57df52(0x3bb)](_0x57df52(0x36b)),console['error'](_0x57df52(0x342)),0x1;return await withSpinner(_0x57df52(0x2bc)+_0x4b4776+'\x27...',()=>_0x50fea1[_0x57df52(0x1e3)]['deletePersonalization'](_0x4b4776),{'verbose':_0x25f7b0[_0x57df52(0x2cf)]}),console[_0x57df52(0x3bb)]('✔\x20Deleted\x20personalization\x20\x27'+_0x4b4776+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a31_0xdea3fe(0x358)]='ps:pz:create';['description']='Create\x20a\x20realtime\x20personalization\x20entity';async['execute'](_0x509fae){const _0x107480=a31_0xdea3fe,{options:_0x4021e8,tdx:_0x2486e7}=_0x509fae,_0x5de9db=_0x4021e8;let _0x58c400;if(_0x5de9db['file']){_0x58c400=await loadJSON(_0x5de9db[_0x107480(0x1f3)],!![]);if(!_0x58c400[_0x107480(0x32c)]?.[_0x107480(0x383)])return console[_0x107480(0x3bb)](_0x107480(0x2e9)),console[_0x107480(0x3bb)](_0x107480(0x318)),console[_0x107480(0x3bb)]('\x20\x20\x22relationships\x22:\x20{\x20\x22parentFolder\x22:\x20{\x20\x22data\x22:\x20{\x20\x22id\x22:\x20\x22<id>\x22,\x20\x22type\x22:\x20\x22folder-segment\x22\x20}\x20}\x20}'),0x1;}else{if(!_0x5de9db[_0x107480(0x358)])return console[_0x107480(0x3bb)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x107480(0x3bb)](_0x107480(0x1e4)),console[_0x107480(0x3bb)](_0x107480(0x369)),0x1;if(_0x5de9db[_0x107480(0x1f4)]===undefined)return console[_0x107480(0x3bb)](_0x107480(0x395)),console['error'](_0x107480(0x1e4)),console['error'](_0x107480(0x369)),0x1;if(_0x5de9db['folderId']===undefined)return console[_0x107480(0x3bb)](_0x107480(0x21c)),console[_0x107480(0x3bb)]('\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.'),0x1;let _0x3b9533=_0x5de9db[_0x107480(0x290)];if(!_0x3b9533&&_0x4021e8[_0x107480(0x256)]){const _0x1cd91b=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4021e8[_0x107480(0x256)]+'\x27...',()=>_0x2486e7[_0x107480(0x2fe)]['resolveParentId'](_0x4021e8[_0x107480(0x256)]),{'verbose':_0x4021e8[_0x107480(0x2cf)]});_0x3b9533=_0x1cd91b['data'];}let _0x3117b3;_0x5de9db[_0x107480(0x250)]&&(_0x3117b3=await loadJSON(_0x5de9db[_0x107480(0x250)],![]));const _0x45b9fa=_0x5de9db[_0x107480(0x328)]===_0x107480(0x1bb)?null:{'id':_0x5de9db[_0x107480(0x328)],'type':_0x107480(0x20b)};_0x58c400={'attributes':{'name':_0x5de9db[_0x107480(0x358)],'description':_0x5de9db[_0x107480(0x1f4)]||null,..._0x3b9533!==undefined&&{'audienceId':_0x3b9533},..._0x3117b3!==undefined&&{'sections':_0x3117b3}},'relationships':{'parentFolder':{'data':_0x45b9fa}}};}const _0x4d1dd9=await withSpinner(_0x107480(0x380)+(_0x58c400[_0x107480(0x35c)]?.['name']??'')+_0x107480(0x23b),()=>_0x2486e7[_0x107480(0x1e3)][_0x107480(0x1cb)](_0x58c400),{'verbose':_0x4021e8[_0x107480(0x2cf)]}),_0x4c9ebd=_0x4d1dd9['data'];return console[_0x107480(0x3bb)](_0x107480(0x27a)+_0x4c9ebd[_0x107480(0x358)]+_0x107480(0x1ba)+_0x4c9ebd['id']),await handleSDKOutput([_0x4c9ebd],_0x4021e8),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a31_0xdea3fe(0x358)]='ps:pz:patch';[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x3a0);async[a31_0xdea3fe(0x2dc)](_0x9fea91){const _0x44ef9d=a31_0xdea3fe,{options:_0xf43a4f,args:_0x1140ca}=_0x9fea91,_0x42b33c=_0xf43a4f,_0x7e4f94=_0x1140ca[0x0];if(!_0x7e4f94)return console[_0x44ef9d(0x3bb)](_0x44ef9d(0x36b)),console[_0x44ef9d(0x3bb)](_0x44ef9d(0x3bf)),console[_0x44ef9d(0x3bb)](_0x44ef9d(0x3ad)),0x1;let _0x5360a2;if(_0x42b33c[_0x44ef9d(0x1f3)])_0x5360a2=await loadJSON(_0x42b33c['file'],!![]);else{if(!_0x42b33c[_0x44ef9d(0x358)])return console[_0x44ef9d(0x3bb)](_0x44ef9d(0x1d2)),console[_0x44ef9d(0x3bb)](_0x44ef9d(0x3bf)),0x1;if(_0x42b33c[_0x44ef9d(0x1f4)]===undefined)return console[_0x44ef9d(0x3bb)](_0x44ef9d(0x395)),console[_0x44ef9d(0x3bb)](_0x44ef9d(0x3bf)),0x1;let _0x58108e;_0x42b33c[_0x44ef9d(0x250)]&&(_0x58108e=await loadJSON(_0x42b33c['sections'],![])),_0x5360a2={'attributes':{'name':_0x42b33c[_0x44ef9d(0x358)],'description':_0x42b33c['description']||null,..._0x58108e!==undefined&&{'sections':_0x58108e}}};}const {tdx:_0x9c4f88}=_0x9fea91,_0x2bfd94=await withSpinner(_0x44ef9d(0x2ac)+_0x7e4f94+_0x44ef9d(0x23b),()=>_0x9c4f88['personalization'][_0x44ef9d(0x1fd)](_0x7e4f94,_0x5360a2),{'verbose':_0xf43a4f['verbose']}),_0x3ab148=_0x2bfd94[_0x44ef9d(0x2b6)];return console[_0x44ef9d(0x3bb)]('✔\x20Updated\x20personalization\x20\x27'+_0x3ab148[_0x44ef9d(0x358)]+_0x44ef9d(0x28b)+_0x3ab148['id']+')'),await handleSDKOutput([_0x3ab148],_0xf43a4f),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a31_0xdea3fe(0x358)]=a31_0xdea3fe(0x269);[a31_0xdea3fe(0x1f4)]=a31_0xdea3fe(0x359);async[a31_0xdea3fe(0x2dc)](_0x1a2238){const _0x1b9f6d=a31_0xdea3fe,{options:_0xbc91ef,args:_0x553f1d}=_0x1a2238,_0x5f4f54=_0x553f1d[0x0]||_0xbc91ef[_0x1b9f6d(0x256)];if(!_0x5f4f54)return showParentSegmentNotSetError(_0x1b9f6d(0x343)+'\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'),0x1;const _0x40b96f=resolveYamlFile(_0x5f4f54);if(!existsSync(_0x40b96f))return showFileNotFoundError(_0x40b96f,_0x5f4f54),0x1;let _0x1c5056;try{_0x1c5056=readFileSync(_0x40b96f,'utf-8');}catch(_0x57d804){const _0x76f485=_0x57d804 instanceof Error?_0x57d804[_0x1b9f6d(0x2ee)]:String(_0x57d804);return console['error']('Error\x20reading\x20file:\x20'+_0x76f485),0x1;}let _0x2a3558;try{_0x2a3558=parseDef(_0x1c5056);}catch(_0x54a40d){const _0x4ed8cd=_0x54a40d instanceof Error?_0x54a40d['message']:String(_0x54a40d);return console[_0x1b9f6d(0x3bb)](a31_0xd5335b[_0x1b9f6d(0x1c5)](_0x1b9f6d(0x1ff)+_0x4ed8cd)),0x1;}if(_0x2a3558['personalization_services']&&_0x2a3558[_0x1b9f6d(0x1df)][_0x1b9f6d(0x2dd)]>0x0)return console['error'](a31_0xd5335b['yellow'](_0x1b9f6d(0x30c)+_0x40b96f)),console[_0x1b9f6d(0x3bb)](a31_0xd5335b[_0x1b9f6d(0x297)](_0x1b9f6d(0x211)+_0x2a3558['personalization_services'][_0x1b9f6d(0x2dd)]+_0x1b9f6d(0x2ae))),0x1;!_0x2a3558[_0x1b9f6d(0x339)]&&(_0x2a3558[_0x1b9f6d(0x339)]={'events':[{'name':_0x1b9f6d(0x2f4),'source_table':_0x1b9f6d(0x264)}],'attributes':[{'name':_0x1b9f6d(0x2e1),'type':_0x1b9f6d(0x39a)}],'id_stitching':{'primary_key':_0x2a3558[_0x1b9f6d(0x26a)][_0x1b9f6d(0x3cb)]===_0x1b9f6d(0x33b)?_0x1b9f6d(0x207):_0x1b9f6d(0x1c8)}});_0x2a3558[_0x1b9f6d(0x1df)]=[{'name':_0x1b9f6d(0x1ec),'description':_0x1b9f6d(0x214),'trigger_event':_0x1b9f6d(0x2f4),'sections':[{'name':_0x1b9f6d(0x2e8),'criteria':_0x1b9f6d(0x34b),'attributes':[_0x1b9f6d(0x2e1)]}]}];const _0x4a090a=serializeDef(_0x2a3558);return writeFileSync(_0x40b96f,_0x4a090a,_0x1b9f6d(0x281)),console[_0x1b9f6d(0x3bb)](a31_0xd5335b[_0x1b9f6d(0x208)]('✔')+_0x1b9f6d(0x294)+a31_0xd5335b['cyan'](_0x40b96f)),(!_0x2a3558['realtime']||_0x1c5056['indexOf'](_0x1b9f6d(0x2ca))===-0x1)&&console[_0x1b9f6d(0x3bb)](a31_0xd5335b['green']('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x1b9f6d(0x3bb)]('\x0a'+a31_0xd5335b[_0x1b9f6d(0x297)](_0x1b9f6d(0x206))),console[_0x1b9f6d(0x3bb)]('\x20\x201.\x20Edit\x20'+_0x40b96f+'\x20to\x20configure\x20your\x20personalization\x20service'),console[_0x1b9f6d(0x3bb)](_0x1b9f6d(0x2cb)+a31_0xd5335b['dim'](_0x1b9f6d(0x3b1)+_0x5f4f54)+_0x1b9f6d(0x1f2)),0x0;}}
|