@treasuredata/tdx 2026.3.44 → 2026.3.46
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/auth-login-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/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.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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/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 a32_0x4b25d6=a32_0x3fa1;(function(_0x14a9be,_0x411f61){const _0x11c0b4=a32_0x3fa1,_0xe73401=_0x14a9be();while(!![]){try{const _0xd74dc7=-parseInt(_0x11c0b4(0x293))/0x1*(-parseInt(_0x11c0b4(0x244))/0x2)+parseInt(_0x11c0b4(0x26f))/0x3+-parseInt(_0x11c0b4(0x139))/0x4+-parseInt(_0x11c0b4(0x135))/0x5*(parseInt(_0x11c0b4(0x184))/0x6)+parseInt(_0x11c0b4(0x1bb))/0x7+-parseInt(_0x11c0b4(0x254))/0x8+-parseInt(_0x11c0b4(0x197))/0x9*(-parseInt(_0x11c0b4(0x1cf))/0xa);if(_0xd74dc7===_0x411f61)break;else _0xe73401['push'](_0xe73401['shift']());}catch(_0x3b3747){_0xe73401['push'](_0xe73401['shift']());}}}(a32_0x48b6,0x70b02));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';function a32_0x48b6(){const _0x569b28=['sections','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','win32','folderId','pullParentYaml','\x27\x20and\x20run\x20workflow?','\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','Fetching\x20sample\x20data...','\x22\x20}','Attributes','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','\x20\x201.\x20Edit\x20','ps:rt:configuration_versions','Deleting\x20personalization\x20service\x20\x27','some','schemaValid','Behaviors','file','customersWithEvents','parent_segment','\x20\x20\x20\x20','tdx\x20ps\x20push\x20','rowCount','error','/{name}.yml\x0a','allowed\x20IPs:','ps:pz:show','ID\x20Stitching:','getBehaviorNames','created:','Error:','trim','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','✔\x20Created\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','jsonl','Executing\x20parent\x20segment\x20query...','\x20--behavior\x20\x22<name>\x22','Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics','RT\x202.0:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','idStitching','map','/app/dw/parentSegments/','realtime','\x20Opening\x20','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','Error:\x20Service\x20ID\x20is\x20required','/\x20directory.\x0a','\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22','darwin','No\x20parent\x20segments\x20match\x20pattern:\x20','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','✔\x20Query\x20completed:\x20Processed\x20','\x20--attribute\x20\x22<name>\x22','Creating\x20personalization\x20\x27','enriched','Options\x20(one\x20required):\x0a','status','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\x20RT\x20journey','output','master','\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path','session','ps:pz:service:delete','Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a','ps:pz:list','Listing\x20parent\x20segments\x20matching\x20\x27','public','\x27\x20for\x20service\x20\x27','listParents','SQL\x20query:\x0a','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','public:','\x20=\x20','Updating','last_page_viewed','bold','includeSensitive','✔\x20Updated\x20personalization\x20service\x20\x27','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','parent_segments','column_type','any','Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file','segment:parent:desc','label','\x20RT\x20configuration\x20is\x20valid','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','segment:parent:run','stringify','resolveParentId','Getting\x20personalization\x20\x27','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','List\x20available\x20fields\x20for\x20segmentation','elapsedTimeMillis','timezone','Master\x20+\x20Attributes','Errors:','stitchingKeys','ps:pz:init','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','\x20to\x20push\x20the\x20configuration','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','createdAt','\x20Configuration\x20is\x20valid','personalization_services','isDirectory','884878mkXuYB','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','jobId','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','segment:parent:view','customerGroup','\x20--interval\x20','Found\x20YAML\x20file:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','✔\x20Retrieved\x20RT\x20configuration\x20version','green','repeat','segment','ps:pz:create','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Database:\x20','1014048bOdnDv','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','formatSchemaJson','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Aborted.','entryCriteria:','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','displayAttributesStats','length','database','customerGroupFile','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','reduce','\x27\x20with\x20ID:\x20','table','{\x0a\x20\x20\x22database\x22:\x20\x22','listPersonalizations','platform','personalizationServices','Listing\x20RT-enabled\x20parent\x20segments...','updateParent','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','List\x20parent\x20segments','✔\x20Deleted\x20token\x20\x27','\x0a\x20\x20\x20\x20]','Updated','Fetching\x20customers\x20schema...','187257pecBrn','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a','\x20\x20\x20','Create\x20parent\x20segment\x20\x27','To\x20cancel:','setJobId','resumeJourney','\x0aNew\x20parent\x20segment\x20\x27','use','limit','Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a','attribute','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x0a\x20\x20]\x0a}\x0a','eventKind:\x20','text','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','Usage:\x20tdx\x20ps\x20rt\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20RT\x20config\x20(requires\x20context)\x0a','message','replace','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','\x0aUsage:\x20tdx\x20ps\x20preview\x20','web','\x20\x20\x20\x20\x20\x20','yellow','✔\x20No\x20changes\x20-\x20\x27','\x20parent\x20segment','stop','getOutputDatabaseName','\x0aNo\x20sample\x20data\x20available','\x20parent\x20segment\x20\x27','\x20true','addBehaviors','description','ps:pz:service:update','1mmxevR','folder-segment','Running\x20parent\x20segment\x20workflow\x20for\x20\x27','Schema\x20saved\x20to\x20','\x27\x20is\x20already\x20up\x20to\x20date','behaviors','displaySummary','displayPreviewResults','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','value','run','errors','primaryKey','\x20rows)','Updating\x20parent\x20segment\x20\x27','%)\x20','<database>.<table>','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','information_schema','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','red','segment:parent:show','scheduleType','sections:','Session:','✔\x20Deleted\x20personalization\x20service\x20\x27','Error:\x20Token\x20\x27','segment:parent:pull','Error:\x20Parent\x20segment\x20name\x20is\x20required','Source:','column','Delete\x20a\x20token\x20from\x20a\x20personalization\x20service','sourceTableError','runParent','endsWith','pauseJourney','Show\x20parent\x20segment\x20schema\x20(column\x20types)','string','\x0aChanges\x20to\x20apply\x20to\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','\x20to\x20configure\x20your\x20personalization\x20service','\x20\x20\x20\x20-\x20','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','Behavior:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','customerPercent','patchPersonalization','Parent\x20segment:\x20','List\x20RT\x20journeys','parentSegment','Enriched:','format','Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>','\x20\x20Tables:\x201\x20customers\x20+\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data','segment:parent:fields','previewParentYaml','tokens','\x0aChanges\x20to\x20\x27','interval','\x20tdx\x20wf\x20attempt\x20','\x20--enriched','getParentSQL','collectSchema','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]','behavior','tdx\x20ps\x20preview\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','audienceId','audienceId:\x20','null','getParentFull','Validating\x20configuration...','Error:\x20No\x20attributes\x20defined\x20in\x20configuration','indexOf','column_name','\x20service','\x0aError:','segment:parent:sql','Creating\x20personalization\x20service\x20\x27','ps:pz:delete','deletePersonalization','segment:parent:preview','ps:rt:validate','Available\x20attributes:','createPersonalization','✔\x20Updated\x20parent\x20segment\x20\x27','filter','paused','Output\x20Database:','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','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','all','\x20--behavior\x20\x22','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a','verbose','No\x20RT-enabled\x20parent\x20segments\x20found','dim','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','launched','\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute','segment:parent:update','No\x20personalizations\x20configured','Attempt:','keyEventCriteria','workflowAttemptId','`\x20to\x20download\x20the\x20configuration\x20first','user_id','\x27\x20is\x20up\x20to\x20date','Validating\x20RT\x20configuration...','displaySampleData','Validate:','Create\x20a\x20token\x20for\x20a\x20personalization\x20service','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a','Resolving\x20parent\x20segment\x20\x27','\x20is\x20already\x20up\x20to\x20date','Next\x20steps:','start','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','⚡\x20Not\x20enabled','cyan','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','number','\x27...','id:\x20','\x20personalization\x20service','Error:\x20File\x20not\x20found:\x20','stageCount','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','Coverage:','personalization','entryCriteria','Error\x20reading\x20file:\x20','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Columns:','(id:\x20','Master:','\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a','split','/attempt/','population','toLowerCase','Site:\x20','\x20\x20No\x20sample\x20data\x20available','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','processedRows','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','toLocaleString','customers','FINISHED','Master\x20Table','toFixed','\x20configured','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','SELECT\x20*\x20FROM\x20(\x0a','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','workflowSessionId','attributesFile','Resuming\x20activations\x20for\x20RT\x20journey\x20\x27','addAttributes','page_view','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','displayValidateResults','Listing\x20fields\x20for\x20\x27','-1d','displayBehaviorsStats','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','Updating\x20personalization\x20service\x20\x27','attributes','eventKind','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','segment:parent:create','events','no\x20tokens\x20configured','Error:\x20Personalization\x20ID\x20is\x20required','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','15rngogV','keyEventId:','utf-8','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','1284632hNaNCk','Options:','/\x20→\x20','identifier','data','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','payload:','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Error:\x20--attribute\x20requires\x20a\x20name\x0a','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','\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','Error:\x20--behavior\x20requires\x20a\x20name\x0a','type','Creating\x20parent\x20segment\x20\x27','sort','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','ps:rt:jn:pause','listJourneys','Available\x20behaviors:','totalEvents','parent_id','To\x20view\x20sample\x20data:','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','✔\x20Created\x20token\x20\x27','displayPreviewHints','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Error:\x20Token\x20ID\x20is\x20required','Customers:','\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22','My\x20Service','createToken','yes','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','ignore','\x22,\x20\x22type\x22:\x20\x22','Get\x20SQL\x20query\x20for\x20parent\x20segment','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','/app/workflows/','/\x20and\x20','join','.yml','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','Listing\x20personalization\x20services\x20for\x20\x27','✔\x20Created\x20personalization\x20service\x20\x27','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','.customers)','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','Listing\x20personalizations\x20for\x20\x27','displayColumns','state','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Apply\x20changes\x20to\x20\x27','segment:parent:validate','Error\x20parsing\x20YAML:\x20','localeCompare','\x0a⚠️\x20\x20Both\x20','Fetching\x20current\x20configuration\x20for\x20\x27','apply','create','\x20[Job\x20ID:\x20','Fetching\x20SQL\x20for\x20\x27','Get\x20current\x20RT\x20configuration\x20version\x20status','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','Patching\x20personalization\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','columns','token:','name','\x20total','Join\x20on:','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','✘\x20Failed\x20to\x20rename\x20directory:\x20','behavior_','Table:\x20','displayMasterInfo','1284378GBftul','site','\x20behaviors','✔\x20Created\x20parent\x20segment\x20\x27','foreignKey','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a','\x20\x20Note:\x20','.yaml','\x20\x202.\x20Run\x20','pushParentYaml','Listing\x20RT\x20journeys\x20for\x20\x27','json','td_client_id','Creating','Error:\x20Token\x20name\x20is\x20required','test','ps:rt:jn:resume','stats','sampleData','1395fggobM','payload','No\x20RT\x20journeys\x20found','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','\x20--attribute\x20\x22','ps:pz:service:token:create','log','Created','ps:pz:patch','schemaError','Analyzing\x20changes...','\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}','coveragePercent','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','list','\x20RT-enabled\x20parent\x20segment','Update\x20a\x20realtime\x20personalization\x20entity','enabled','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','displayRealtimeInfo','joinKey','scheduleOption','\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a','✔\x20Found\x20personalization\x20\x27','execute','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','allowedIps','Personalization:','allValid','RT\x20Journey\x20ID:\x20','⚡\x20Enabled','\x5c$&','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Audience\x20ID:','2007950rhTHUr','\x20Added\x20personalization\x20template\x20to\x20','xdg-open','Fetching\x20personalization\x20service\x20\x27','YAML\x20file:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','identifier:\x20','Personalization\x20service\x20description','using\x20the\x20default\x20path:\x20','Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)','addAttributesFile','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','get','✔\x20Found\x20','\x20service(s)\x20configured','ps:pz:service:create','patch','Delete\x20a\x20realtime\x20personalization','\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','Fetching\x20behavior\x20list...','49030VkTMrw','Pause\x20activations\x20in\x20an\x20RT\x20journey','matchedCount','delete'];a32_0x48b6=function(){return _0x569b28;};return a32_0x48b6();}import{spawn}from'child_process';import a32_0x14c59b 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 a32_0x4ae168 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=a32_0x4b25d6(0x229),LEGACY_PARENT_SEGMENT_DIR=a32_0x4b25d6(0x1e6);function openBrowser(_0x432f53){const _0x41962c=a32_0x4b25d6,_0x13ad3e=process[_0x41962c(0x265)],_0x4af08f=_0x13ad3e===_0x41962c(0x206)?'open':_0x13ad3e===_0x41962c(0x1d5)?_0x41962c(0x309):_0x41962c(0x1bd);spawn(_0x4af08f,[_0x432f53],{'detached':!![],'stdio':_0x41962c(0x15a)})['unref']();}function migrateLegacyDirectory(){const _0x191916=a32_0x4b25d6;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x127009=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x127009[_0x191916(0x243)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x191916(0x1ea)](a32_0x4ae168[_0x191916(0x288)](_0x191916(0x170)+LEGACY_PARENT_SEGMENT_DIR+_0x191916(0x15f)+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console['error'](a32_0x4ae168[_0x191916(0x2f5)](_0x191916(0x167)+LEGACY_PARENT_SEGMENT_DIR+_0x191916(0x204))),![];console['error'](a32_0x4ae168[_0x191916(0x288)]('\x0a⚠️\x20\x20Migrating:\x20'+LEGACY_PARENT_SEGMENT_DIR+_0x191916(0x13b)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console[_0x191916(0x1ea)](a32_0x4ae168['green']('✔\x20Renamed\x20directory\x20to\x20'+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x435f44){const _0x5f1ae3=_0x435f44 instanceof Error?_0x435f44[_0x191916(0x282)]:String(_0x435f44);return console['error'](a32_0x4ae168['red'](_0x191916(0x180)+_0x5f1ae3+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async['run'](_0x37e730){const _0x47bf57=a32_0x4b25d6;return migrateLegacyDirectory(),super[_0x47bf57(0x29d)](_0x37e730);}}function resolveYamlFile(_0x482867){const _0x67ecc3=a32_0x4b25d6;if(_0x482867[_0x67ecc3(0x2b5)](_0x67ecc3(0x161))||_0x482867[_0x67ecc3(0x2b5)](_0x67ecc3(0x18b)))return _0x482867;return a32_0x14c59b[_0x67ecc3(0x160)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x482867)+'.yml');}function formatProgressMessage(_0x369495){const _0x64a38c=a32_0x4b25d6,_0x1ee4bf=_0x369495['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x1ee4bf){const [,_0x46bb7b,_0x4afa46,_0x234b1d='']=_0x1ee4bf;return a32_0x4ae168[_0x64a38c(0x2f5)](_0x46bb7b+':')+'\x20'+_0x4afa46+a32_0x4ae168[_0x64a38c(0x2f5)](_0x234b1d);}return a32_0x4ae168[_0x64a38c(0x2f5)](_0x369495);}function showFileNotFoundError(_0x253bdb,_0x177b79){const _0x38fcdd=a32_0x4b25d6;console['error'](a32_0x4ae168[_0x38fcdd(0x2a7)](_0x38fcdd(0x312)+_0x253bdb+'\x0a')),console[_0x38fcdd(0x1ea)](a32_0x4ae168[_0x38fcdd(0x30c)]('Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20'+_0x177b79+_0x38fcdd(0x2fe)));}function displayRealtimeValidation(_0xd3af74){const _0x4528be=a32_0x4b25d6;if(!_0xd3af74[_0x4528be(0x1ff)])return;const _0x3b0438=_0xd3af74[_0x4528be(0x1ff)],_0x2e9ac4=_0x3b0438[_0x4528be(0x1a9)]?a32_0x4ae168[_0x4528be(0x24e)](_0x4528be(0x1b6)):a32_0x4ae168[_0x4528be(0x288)](_0x4528be(0x30b));console[_0x4528be(0x1ea)]('\x0a'+a32_0x4ae168['dim'](_0x4528be(0x1fa))+'\x20'+_0x2e9ac4);if(_0x3b0438[_0x4528be(0x131)]&&_0x3b0438[_0x4528be(0x131)][_0x4528be(0x25c)]>0x0){console['error']('\x20\x20'+a32_0x4ae168[_0x4528be(0x2f5)]('Events:')+'\x20'+_0x3b0438['events'][_0x4528be(0x25c)]+_0x4528be(0x32e));for(const _0x1d9608 of _0x3b0438[_0x4528be(0x131)]){const _0x522471=_0x1d9608['sourceTableValid']===![]?a32_0x4ae168[_0x4528be(0x2a7)]('✘'):a32_0x4ae168[_0x4528be(0x24e)]('✔');console['error'](_0x4528be(0x1e7)+_0x522471+'\x20'+_0x1d9608['name']),_0x1d9608[_0x4528be(0x2b3)]&&console['error'](_0x4528be(0x287)+a32_0x4ae168['red'](_0x1d9608[_0x4528be(0x2b3)]));}}if(_0x3b0438['attributes']&&_0x3b0438[_0x4528be(0x12d)][_0x4528be(0x25c)]>0x0){console['error']('\x20\x20'+a32_0x4ae168[_0x4528be(0x2f5)]('Attributes:')+'\x20'+_0x3b0438[_0x4528be(0x12d)][_0x4528be(0x25c)]+_0x4528be(0x32e));for(const _0x4cbd54 of _0x3b0438['attributes']){const _0x464256=_0x4cbd54['valid']?a32_0x4ae168[_0x4528be(0x24e)]('✔'):a32_0x4ae168['red']('✘');console[_0x4528be(0x1ea)](_0x4528be(0x1e7)+_0x464256+'\x20'+_0x4cbd54[_0x4528be(0x17c)]+'\x20'+a32_0x4ae168[_0x4528be(0x2f5)]('('+_0x4cbd54[_0x4528be(0x145)]+')'));}}if(_0x3b0438[_0x4528be(0x1fc)]){const _0x2aed85=_0x3b0438[_0x4528be(0x1fc)][_0x4528be(0x23b)]?.[_0x4528be(0x25c)]?'\x20+\x20['+_0x3b0438[_0x4528be(0x1fc)][_0x4528be(0x23b)][_0x4528be(0x160)](',\x20')+']':'';console['error']('\x20\x20'+a32_0x4ae168[_0x4528be(0x2f5)](_0x4528be(0x1ee))+'\x20'+_0x3b0438[_0x4528be(0x1fc)][_0x4528be(0x29f)]+_0x2aed85);}if(_0x3b0438[_0x4528be(0x266)]&&_0x3b0438[_0x4528be(0x266)]['length']>0x0){console[_0x4528be(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x4528be(0x2f5)](_0x4528be(0x1b3))+'\x20'+_0x3b0438['personalizationServices'][_0x4528be(0x25c)]+_0x4528be(0x2e0)+(_0x3b0438['personalizationServices'][_0x4528be(0x25c)]!==0x1?'s':''));for(const _0x55dc4f of _0x3b0438[_0x4528be(0x266)]){console[_0x4528be(0x1ea)](_0x4528be(0x2bc)+_0x55dc4f['name']);}}}function showParentSegmentNotSetError(_0x3fcbb6){const _0x71c2a=a32_0x4b25d6;console[_0x71c2a(0x1ea)](a32_0x4ae168[_0x71c2a(0x288)](_0x71c2a(0x189))),console['error'](_0x3fcbb6);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]='segment:parent:list';[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x26a);async[a32_0x4b25d6(0x1b0)](_0x139d4e){const _0x2412f3=a32_0x4b25d6,{options:_0x3de5e1,args:_0x358d80,tdx:_0x3d33c1}=_0x139d4e,_0x19d152=_0x358d80[0x0];_0x3de5e1[_0x2412f3(0x2f3)]&&(console[_0x2412f3(0x1ea)](_0x2412f3(0x322)+_0x3de5e1[_0x2412f3(0x185)]),_0x19d152&&console[_0x2412f3(0x1ea)]('Pattern:\x20'+_0x19d152));const _0x506c86=await withSpinner(_0x19d152?_0x2412f3(0x219)+_0x19d152+_0x2412f3(0x30f):'Listing\x20parent\x20segments...',()=>_0x3d33c1[_0x2412f3(0x250)][_0x2412f3(0x21c)](),{'verbose':_0x3de5e1['verbose']});let _0x1739d2=_0x506c86[_0x2412f3(0x13d)];if(_0x19d152){const _0x376ab5=_0x19d152[_0x2412f3(0x283)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x2412f3(0x283)](/\*/g,'.*')[_0x2412f3(0x283)](/\?/g,'.'),_0x2adf04=new RegExp('^'+_0x376ab5+'$','i');_0x1739d2=_0x1739d2[_0x2412f3(0x2eb)](_0x45d503=>_0x2adf04['test'](_0x45d503['attributes'][_0x2412f3(0x17c)]));}_0x1739d2['sort']((_0x24b37e,_0x1059ab)=>_0x24b37e[_0x2412f3(0x12d)]['name'][_0x2412f3(0x16f)](_0x1059ab[_0x2412f3(0x12d)][_0x2412f3(0x17c)])),console[_0x2412f3(0x1ea)](_0x2412f3(0x1c8)+_0x1739d2['length']+_0x2412f3(0x28a)+(_0x1739d2[_0x2412f3(0x25c)]!==0x1?'s':''));const _0x333249=_0x17d82b=>{const _0x55e7a3=_0x2412f3;return getConsoleNextUrl(_0x3de5e1[_0x55e7a3(0x185)],_0x55e7a3(0x1fe)+_0x17d82b);};if(_0x3de5e1[_0x2412f3(0x2c6)]==='json'||_0x3de5e1[_0x2412f3(0x2c6)]===_0x2412f3(0x1f6)){const _0x3b2d89=_0x1739d2[_0x2412f3(0x1fd)](_0x45413f=>({..._0x45413f,'url':_0x333249(_0x45413f['id'])}));await handleSDKOutput(_0x3b2d89,_0x3de5e1);}else{if(_0x1739d2[_0x2412f3(0x25c)]===0x0)_0x19d152?console[_0x2412f3(0x19d)](_0x2412f3(0x207)+_0x19d152):console['log']('No\x20parent\x20segments\x20found');else for(const _0x429e91 of _0x1739d2){const _0x241931=_0x429e91['attributes'][_0x2412f3(0x320)]?a32_0x4ae168[_0x2412f3(0x2f5)]('\x20('+formatRows(_0x429e91['attributes'][_0x2412f3(0x320)])+')'):'',_0x3ffd62=hyperlink(_0x429e91[_0x2412f3(0x12d)][_0x2412f3(0x17c)],_0x333249(_0x429e91['id']));console[_0x2412f3(0x19d)]('👥\x20'+_0x3ffd62+_0x241931);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x130);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x210);async[a32_0x4b25d6(0x1b0)](_0x3946fe){const _0x62b03a=a32_0x4b25d6,{options:_0xc59d27,args:_0x22371f,tdx:_0x526d99}=_0x3946fe;console[_0x62b03a(0x1ea)](_0x62b03a(0x148)+_0x62b03a(0x2bd)+_0x62b03a(0x12f));const _0x1f5897=_0xc59d27;if(_0x22371f[_0x62b03a(0x25c)]===0x0)return console[_0x62b03a(0x1ea)](a32_0x4ae168[_0x62b03a(0x2a7)]('Error:\x20Parent\x20segment\x20name\x20is\x20required')),console[_0x62b03a(0x1ea)](_0x62b03a(0x328)),0x1;const _0x4e4f28=_0x22371f[0x0];if(!_0x1f5897[_0x62b03a(0x25d)]||!_0x1f5897[_0x62b03a(0x262)])return console['error']('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x62b03a(0x1ea)](_0x62b03a(0x328)),0x1;_0x1f5897['verbose']&&(console[_0x62b03a(0x1ea)](_0x62b03a(0x322)+_0x1f5897[_0x62b03a(0x185)]),console[_0x62b03a(0x1ea)]('Name:\x20'+_0x4e4f28),console['error'](_0x62b03a(0x253)+_0x1f5897['database']),console['error'](_0x62b03a(0x182)+_0x1f5897[_0x62b03a(0x262)]));const _0x10f405=await loadJSONFromOptions(_0x1f5897['attributes'],_0x1f5897[_0x62b03a(0x333)]),_0x8f055a=await loadJSONFromOptions(_0x1f5897['behaviors'],_0x1f5897['behaviorsFile']),_0x126c08=await loadJSONFromOptions(_0x1f5897[_0x62b03a(0x249)],_0x1f5897[_0x62b03a(0x25e)]),_0x588dc3={'name':_0x4e4f28,'description':_0x1f5897[_0x62b03a(0x291)],'scheduleType':_0x1f5897[_0x62b03a(0x2a9)],'scheduleOption':_0x1f5897['scheduleOption'],'timezone':_0x1f5897['timezone'],'master':{'parentDatabaseName':_0x1f5897['database'],'parentTableName':_0x1f5897['table']},'attributes':_0x10f405,'behaviors':_0x8f055a,'customerGroup':_0x126c08},_0x406638=await withSpinner(_0x62b03a(0x146)+_0x4e4f28+_0x62b03a(0x30f),()=>_0x526d99['segment']['createParent'](_0x588dc3),{'verbose':_0xc59d27[_0x62b03a(0x2f3)]}),_0x19fbda=_0x406638[_0x62b03a(0x13d)];return console[_0x62b03a(0x1ea)](_0x62b03a(0x187)+_0x19fbda[_0x62b03a(0x17c)]+_0x62b03a(0x261)+_0x19fbda['id']),await handleSDKOutput([_0x19fbda],_0xc59d27),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a32_0x4b25d6(0x2f9);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x142);async['execute'](_0x42d58f){const _0x1a0d08=a32_0x4b25d6,{options:_0x2e0641,args:_0x567f5e,tdx:_0x562d84}=_0x42d58f;console[_0x1a0d08(0x1ea)](_0x1a0d08(0x305)+_0x1a0d08(0x2bd)+'\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a');const _0x1d85fd=_0x2e0641;if(_0x567f5e[_0x1a0d08(0x25c)]===0x0)return console[_0x1a0d08(0x1ea)](a32_0x4ae168[_0x1a0d08(0x2a7)](_0x1a0d08(0x2af))),console[_0x1a0d08(0x1ea)](_0x1a0d08(0x14f)),0x1;const _0x201f51=_0x567f5e[0x0];_0x1d85fd['verbose']&&(console[_0x1a0d08(0x1ea)](_0x1a0d08(0x322)+_0x1d85fd['site']),console[_0x1a0d08(0x1ea)](_0x1a0d08(0x2c2)+_0x201f51));const _0x45613f=await withSpinner(_0x1a0d08(0x171)+_0x201f51+_0x1a0d08(0x30f),()=>_0x562d84[_0x1a0d08(0x250)]['getParentFull'](_0x201f51),{'verbose':_0x1d85fd[_0x1a0d08(0x2f3)]}),_0x13533d=_0x45613f['data'],_0x2e3820=await loadJSONFromOptions(_0x1d85fd[_0x1a0d08(0x335)],_0x1d85fd[_0x1a0d08(0x1c5)]),_0xb51822=await loadJSONFromOptions(_0x1d85fd[_0x1a0d08(0x290)],_0x1d85fd['addBehaviorsFile']),_0x18abc6={'name':_0x13533d[_0x1a0d08(0x17c)],'description':_0x1d85fd[_0x1a0d08(0x291)]!==undefined?_0x1d85fd[_0x1a0d08(0x291)]:_0x13533d[_0x1a0d08(0x291)],'scheduleType':_0x1d85fd[_0x1a0d08(0x2a9)]!==undefined?_0x1d85fd[_0x1a0d08(0x2a9)]:_0x13533d[_0x1a0d08(0x2a9)],'scheduleOption':_0x1d85fd[_0x1a0d08(0x1ad)]!==undefined?_0x1d85fd[_0x1a0d08(0x1ad)]:_0x13533d[_0x1a0d08(0x1ad)],'timezone':_0x1d85fd[_0x1a0d08(0x238)]!==undefined?_0x1d85fd[_0x1a0d08(0x238)]:_0x13533d[_0x1a0d08(0x238)],'master':_0x13533d[_0x1a0d08(0x213)],'attributes':_0x2e3820?[..._0x13533d['attributes']||[],..._0x2e3820]:_0x13533d[_0x1a0d08(0x12d)],'behaviors':_0xb51822?[..._0x13533d[_0x1a0d08(0x298)]||[],..._0xb51822]:_0x13533d[_0x1a0d08(0x298)],'customerGroup':_0x13533d[_0x1a0d08(0x249)]},_0xc68754=await withSpinner(_0x1a0d08(0x2a1)+_0x201f51+'\x27...',()=>_0x562d84[_0x1a0d08(0x250)][_0x1a0d08(0x268)](_0x201f51,_0x18abc6),{'verbose':_0x1d85fd[_0x1a0d08(0x2f3)]}),_0x3729e6=_0xc68754[_0x1a0d08(0x13d)];return console[_0x1a0d08(0x1ea)](_0x1a0d08(0x2ea)+_0x3729e6[_0x1a0d08(0x17c)]+'\x27'),await handleSDKOutput([_0x3729e6],_0x1d85fd),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x2ae);['description']=a32_0x4b25d6(0x22c);async[a32_0x4b25d6(0x1b0)](_0x4d9912){const _0x2e50c9=a32_0x4b25d6,{options:_0x34774d,args:_0x22c8f6,tdx:_0x508794}=_0x4d9912,_0x42fe26=_0x34774d,_0x56d6c3=_0x22c8f6[0x0]||_0x34774d[_0x2e50c9(0x2c4)];if(!_0x56d6c3)return showParentSegmentNotSetError(_0x2e50c9(0x27c)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment'),0x1;if(_0x42fe26[_0x2e50c9(0x277)]&&_0x42fe26[_0x2e50c9(0x212)])return console[_0x2e50c9(0x1ea)](a32_0x4ae168[_0x2e50c9(0x2a7)]('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x2e50c9(0x1ea)](a32_0x4ae168['dim']('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console[_0x2e50c9(0x1ea)](a32_0x4ae168[_0x2e50c9(0x2f5)](_0x2e50c9(0x1c3)+PARENT_SEGMENT_DIR+_0x2e50c9(0x1eb))),console['error'](a32_0x4ae168[_0x2e50c9(0x30c)]('Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u')),0x1;const _0x195688=_0x42fe26[_0x2e50c9(0x212)]||a32_0x14c59b[_0x2e50c9(0x160)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x56d6c3)+_0x2e50c9(0x161));_0x42fe26[_0x2e50c9(0x2f3)]&&(console['error'](_0x2e50c9(0x322)+_0x42fe26[_0x2e50c9(0x185)]),console[_0x2e50c9(0x1ea)](_0x2e50c9(0x2c2)+_0x56d6c3),console[_0x2e50c9(0x1ea)]('Output\x20file:\x20'+_0x195688));const _0x3ac486=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x56d6c3+_0x2e50c9(0x30f),()=>_0x508794['segment'][_0x2e50c9(0x1d7)](_0x56d6c3),{'verbose':_0x42fe26['verbose']}),_0x55734e=_0x3ac486['data'];if(existsSync(_0x195688)){const _0x84e3c3=readFileSync(_0x195688,_0x2e50c9(0x137)),_0x3e2111=generateDiff(_0x84e3c3,_0x55734e);if(!hasChanges(_0x3e2111))console[_0x2e50c9(0x1ea)](a32_0x4ae168['green']('✔')+'\x20No\x20changes\x20-\x20'+a32_0x4ae168['cyan'](_0x195688)+_0x2e50c9(0x307));else{console[_0x2e50c9(0x1ea)](_0x2e50c9(0x2ce)+_0x195688+'\x27:'),console['error']('─'[_0x2e50c9(0x24f)](0x3c)),console[_0x2e50c9(0x1ea)](formatDiffWithColors(_0x3e2111)),console[_0x2e50c9(0x1ea)]('─'[_0x2e50c9(0x24f)](0x3c));if(!_0x42fe26[_0x2e50c9(0x158)]){if(!isInteractive())return console[_0x2e50c9(0x1ea)](a32_0x4ae168[_0x2e50c9(0x2a7)]('\x0aError:'),_0x2e50c9(0x2d7)),console[_0x2e50c9(0x1ea)](a32_0x4ae168['dim'](_0x2e50c9(0x30d))),0x1;const _0x4b453a=await confirmKey('Overwrite\x20\x27'+_0x195688+'\x27?');if(!_0x4b453a)return console['error'](a32_0x4ae168['yellow'](_0x2e50c9(0x258))),0x1;}writeFileSync(_0x195688,_0x55734e,'utf-8'),console[_0x2e50c9(0x1ea)](a32_0x4ae168['green']('✔')+_0x2e50c9(0x1dd)+a32_0x4ae168[_0x2e50c9(0x30c)](_0x195688));}}else{const _0x2e9c17=a32_0x14c59b['dirname'](_0x195688);!existsSync(_0x2e9c17)&&mkdirSync(_0x2e9c17,{'recursive':!![]}),writeFileSync(_0x195688,_0x55734e,_0x2e50c9(0x137)),console[_0x2e50c9(0x1ea)](a32_0x4ae168[_0x2e50c9(0x24e)]('✔')+'\x20Saved\x20parent\x20segment\x20configuration\x20to\x20'+a32_0x4ae168['cyan'](_0x195688));}return saveSessionContext({'parent_segment':_0x56d6c3},_0x42fe26[_0x2e50c9(0x215)]),console[_0x2e50c9(0x1ea)](a32_0x4ae168[_0x2e50c9(0x24e)]('✔')+'\x20Context\x20set:\x20'+a32_0x4ae168[_0x2e50c9(0x2f5)]('parent_segment')+_0x2e50c9(0x220)+a32_0x4ae168[_0x2e50c9(0x30c)](_0x56d6c3)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x4b25d6(0x17c)]='segment:parent:push';[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x23d);async['execute'](_0x25b86f){const _0x1b46c8=a32_0x4b25d6,{options:_0xa6a3a3,args:_0x416363,tdx:_0x351c47}=_0x25b86f,_0x1e1fa4=_0xa6a3a3,_0x43419f=_0x416363[0x0]||_0xa6a3a3[_0x1b46c8(0x2c4)];if(!_0x43419f)return showParentSegmentNotSetError(_0x1b46c8(0x226)+_0x1b46c8(0x20f)),0x1;const _0x25196=resolveYamlFile(_0x43419f);if(!existsSync(_0x25196))return showFileNotFoundError(_0x25196,_0x43419f),0x1;_0x1e1fa4[_0x1b46c8(0x2f3)]&&(console[_0x1b46c8(0x1ea)](_0x1b46c8(0x322)+_0x1e1fa4[_0x1b46c8(0x185)]),console['error']('YAML\x20file:\x20'+_0x25196));let _0x52beb4;try{_0x52beb4=readFileSync(_0x25196,_0x1b46c8(0x137));}catch(_0x7e28fe){const _0x1541f8=_0x7e28fe instanceof Error?_0x7e28fe[_0x1b46c8(0x282)]:String(_0x7e28fe);return console[_0x1b46c8(0x1ea)](_0x1b46c8(0x318)+_0x1541f8),0x1;}const _0x58184d=await withSpinner('Analyzing\x20changes...',()=>_0x351c47[_0x1b46c8(0x250)][_0x1b46c8(0x18d)](_0x52beb4),{'verbose':_0x1e1fa4[_0x1b46c8(0x2f3)]}),_0x2fdd05=_0x58184d[_0x1b46c8(0x13d)],{isNew:_0x55f965,name:_0x38ab88,hasChanges:_0x4b3b8c,diffFormatted:_0xda2424}=_0x2fdd05;if(!_0x4b3b8c)return console[_0x1b46c8(0x1ea)](_0x1b46c8(0x289)+_0x38ab88+_0x1b46c8(0x297)),0x0;_0x55f965?console[_0x1b46c8(0x1ea)](_0x1b46c8(0x276)+_0x38ab88+'\x27:'):console[_0x1b46c8(0x1ea)](_0x1b46c8(0x2b9)+_0x38ab88+'\x27:');console['error']('─'[_0x1b46c8(0x24f)](0x3c)),console['error'](_0xda2424),console[_0x1b46c8(0x1ea)]('─'[_0x1b46c8(0x24f)](0x3c));const _0xddc20e=_0x55f965?'Create\x20parent\x20segment\x20\x27'+_0x38ab88+'\x27?':'Apply\x20changes\x20to\x20\x27'+_0x38ab88+'\x27?';if(!_0x1e1fa4[_0x1b46c8(0x158)]){if(!isInteractive())return console[_0x1b46c8(0x1ea)](a32_0x4ae168[_0x1b46c8(0x2a7)](_0x1b46c8(0x2e1)),_0x1b46c8(0x2d7)),console[_0x1b46c8(0x1ea)](a32_0x4ae168['dim'](_0x1b46c8(0x30d))),0x1;const _0x5fb17b=await confirmKey(_0xddc20e);if(!_0x5fb17b)return console[_0x1b46c8(0x1ea)](a32_0x4ae168[_0x1b46c8(0x288)](_0x1b46c8(0x258))),0x1;}const _0x18a722=_0x55f965?'Creating':_0x1b46c8(0x221),_0x31fdcb=await withSpinner(_0x18a722+_0x1b46c8(0x28e)+_0x38ab88+_0x1b46c8(0x30f),()=>_0x2fdd05[_0x1b46c8(0x172)](),{'verbose':_0x1e1fa4[_0x1b46c8(0x2f3)]}),_0x4e57e9=_0x31fdcb[_0x1b46c8(0x13d)],_0xb5140b=getConsoleNextUrl(_0x1e1fa4['site'],_0x1b46c8(0x1fe)+_0x4e57e9['id']),_0x57d9e0=_0x55f965?_0x1b46c8(0x19e):_0x1b46c8(0x26d);return console[_0x1b46c8(0x1ea)]('✔\x20'+_0x57d9e0+_0x1b46c8(0x28e)+_0x4e57e9[_0x1b46c8(0x17c)]+'\x27'),console[_0x1b46c8(0x1ea)]('\x20\x20'+_0xb5140b),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{['name']=a32_0x4b25d6(0x16d);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x1f9);async[a32_0x4b25d6(0x1b0)](_0x346b9b){const _0x157c66=a32_0x4b25d6,{options:_0x3a9f51,args:_0x3674c5,tdx:_0x1d24d9}=_0x346b9b,_0x2cc67d=_0x3a9f51,_0x502be9=_0x3674c5[0x0]||_0x3a9f51[_0x157c66(0x2c4)];if(!_0x502be9)return showParentSegmentNotSetError(_0x157c66(0x134)+_0x157c66(0x177)+'Options:\x0a'+_0x157c66(0x31d)+_0x157c66(0x1a5)+_0x157c66(0x319)),0x1;const _0x5d81ef=resolveYamlFile(_0x502be9);if(!existsSync(_0x5d81ef))return showFileNotFoundError(_0x5d81ef,_0x502be9),0x1;_0x2cc67d['verbose']&&(console['error'](_0x157c66(0x322)+_0x2cc67d[_0x157c66(0x185)]),console[_0x157c66(0x1ea)]('YAML\x20file:\x20'+_0x5d81ef));let _0x98f2dd;try{_0x98f2dd=readFileSync(_0x5d81ef,_0x157c66(0x137));}catch(_0x3fdab0){const _0x1777a7=_0x3fdab0 instanceof Error?_0x3fdab0[_0x157c66(0x282)]:String(_0x3fdab0);return console[_0x157c66(0x1ea)](_0x157c66(0x318)+_0x1777a7),0x1;}const _0x5d3d21=createCommandSpinner(a32_0x4ae168[_0x157c66(0x2f5)](_0x157c66(0x2dc)),{'verbose':_0x2cc67d[_0x157c66(0x2f3)]});_0x5d3d21[_0x157c66(0x309)]();const _0xf5be37={'onProgress':_0x5ca7ed=>{const _0x33aeaf=_0x157c66;_0x5d3d21[_0x33aeaf(0x27f)]=formatProgressMessage(_0x5ca7ed);}};if(_0x2cc67d[_0x157c66(0x213)])_0xf5be37[_0x157c66(0x213)]=!![];if(_0x2cc67d[_0x157c66(0x20c)])_0xf5be37[_0x157c66(0x20c)]=!![];_0x2cc67d[_0x157c66(0x27a)]&&(_0xf5be37[_0x157c66(0x27a)]=_0x2cc67d[_0x157c66(0x27a)]);_0x2cc67d[_0x157c66(0x2d5)]&&(_0xf5be37[_0x157c66(0x2d5)]=_0x2cc67d[_0x157c66(0x2d5)]);if(_0x2cc67d[_0x157c66(0x2cf)])_0xf5be37[_0x157c66(0x2cf)]=_0x2cc67d[_0x157c66(0x2cf)];let _0xacda00;try{_0xacda00=await _0x1d24d9['segment']['validateParentYaml'](_0x98f2dd,_0xf5be37),_0x5d3d21[_0x157c66(0x28b)]();}catch(_0x4fb265){_0x5d3d21[_0x157c66(0x28b)]();throw _0x4fb265;}const _0x35a875=_0x2cc67d[_0x157c66(0x2cf)]||_0x157c66(0x33a);return this[_0x157c66(0x338)](_0xacda00,_0xf5be37,_0x5d81ef,_0x35a875),_0xacda00[_0x157c66(0x1b4)]?0x0:0x1;}[a32_0x4b25d6(0x338)](_0x4065a8,_0x2cc92e,_0x5344a6,_0x33ae7b){const _0xe6ac25=a32_0x4b25d6;console[_0xe6ac25(0x1ea)]('\x0a'+a32_0x4ae168[_0xe6ac25(0x223)](_0xe6ac25(0x303))+'\x20'+_0x4065a8[_0xe6ac25(0x17c)]),console[_0xe6ac25(0x1ea)]('═'[_0xe6ac25(0x24f)](0x3c)),this[_0xe6ac25(0x183)](_0x4065a8);if(typeof _0x2cc92e[_0xe6ac25(0x27a)]==='string'){this[_0xe6ac25(0x25b)](_0x4065a8),this[_0xe6ac25(0x299)](_0x4065a8),this['displayPreviewHints'](_0x5344a6,_0x33ae7b,_0xe6ac25(0x27a),_0x2cc92e['attribute']);return;}if(_0x2cc92e[_0xe6ac25(0x27a)]===!![]){this[_0xe6ac25(0x25b)](_0x4065a8),this[_0xe6ac25(0x299)](_0x4065a8),this[_0xe6ac25(0x151)](_0x5344a6,_0x33ae7b,'attributes');return;}if(typeof _0x2cc92e[_0xe6ac25(0x2d5)]===_0xe6ac25(0x2b8)){this[_0xe6ac25(0x33b)](_0x4065a8,_0x33ae7b),this[_0xe6ac25(0x299)](_0x4065a8),this[_0xe6ac25(0x151)](_0x5344a6,_0x33ae7b,_0xe6ac25(0x2d5),_0x2cc92e['behavior']);return;}if(_0x2cc92e[_0xe6ac25(0x2d5)]===!![]){this['displayBehaviorsStats'](_0x4065a8,_0x33ae7b),this[_0xe6ac25(0x299)](_0x4065a8),this[_0xe6ac25(0x151)](_0x5344a6,_0x33ae7b,'behaviors');return;}this[_0xe6ac25(0x25b)](_0x4065a8),this[_0xe6ac25(0x33b)](_0x4065a8,_0x33ae7b),this[_0xe6ac25(0x1ab)](_0x4065a8),this[_0xe6ac25(0x299)](_0x4065a8),this[_0xe6ac25(0x151)](_0x5344a6,_0x33ae7b,_0xe6ac25(0x2f0));}['displayRealtimeInfo'](_0x501f97){displayRealtimeValidation(_0x501f97);}[a32_0x4b25d6(0x151)](_0x1d3de2,_0x5dae4b,_0x265862,_0x3c5049){const _0x558ae2=a32_0x4b25d6;console['error']('\x0a'+a32_0x4ae168[_0x558ae2(0x2f5)](_0x558ae2(0x14e)));const _0x530cb5=_0x5dae4b!==_0x558ae2(0x33a)?_0x558ae2(0x24a)+_0x5dae4b:'';if(_0x265862===_0x558ae2(0x27a)&&_0x3c5049)console[_0x558ae2(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x558ae2(0x2f5)](_0x558ae2(0x2d6)+_0x1d3de2+_0x558ae2(0x19b)+_0x3c5049+'\x22'+_0x530cb5));else{if(_0x265862===_0x558ae2(0x2d5)&&_0x3c5049)console[_0x558ae2(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x558ae2(0x2f5)]('tdx\x20ps\x20preview\x20'+_0x1d3de2+_0x558ae2(0x2f1)+_0x3c5049+'\x22'+_0x530cb5));else(_0x265862===_0x558ae2(0x12d)||_0x265862===_0x558ae2(0x2f0))&&console[_0x558ae2(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x558ae2(0x2f5)](_0x558ae2(0x2d6)+_0x1d3de2+_0x558ae2(0x20a)+_0x530cb5));}(_0x265862===_0x558ae2(0x298)||_0x265862==='all')&&console[_0x558ae2(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x558ae2(0x2f5)](_0x558ae2(0x2d6)+_0x1d3de2+_0x558ae2(0x1f8)+_0x530cb5)),_0x265862===_0x558ae2(0x2f0)&&console[_0x558ae2(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x558ae2(0x2f5)]('tdx\x20ps\x20preview\x20'+_0x1d3de2+_0x558ae2(0x2d1)+_0x530cb5));}['displayMasterInfo'](_0x1d85cc){const _0x1ab7dc=a32_0x4b25d6,{master:_0x1743f1}=_0x1d85cc,_0x566658=_0x1743f1['schemaValid']?a32_0x4ae168[_0x1ab7dc(0x24e)]('✔'):a32_0x4ae168[_0x1ab7dc(0x2a7)]('✘');console[_0x1ab7dc(0x1ea)]('\x0a'+a32_0x4ae168['dim'](_0x1ab7dc(0x32c))),console[_0x1ab7dc(0x1ea)](_0x566658+'\x20'+a32_0x4ae168[_0x1ab7dc(0x223)](_0x1743f1[_0x1ab7dc(0x25d)]+'.'+_0x1743f1[_0x1ab7dc(0x262)])),_0x1743f1[_0x1ab7dc(0x1e2)]?_0x1743f1[_0x1ab7dc(0x1e9)]!==undefined&&console[_0x1ab7dc(0x1ea)]('\x20\x20'+a32_0x4ae168['dim']('Rows:')+'\x20'+a32_0x4ae168[_0x1ab7dc(0x30c)](formatRows(_0x1743f1[_0x1ab7dc(0x1e9)]))):console[_0x1ab7dc(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x1ab7dc(0x2a7)](_0x1ab7dc(0x1f1))+'\x20'+_0x1743f1[_0x1ab7dc(0x1a0)]);}[a32_0x4b25d6(0x25b)](_0x500b62){const _0x1dac28=a32_0x4b25d6;if(_0x500b62[_0x1dac28(0x12d)][_0x1dac28(0x25c)]===0x0)return;console['error']('\x0a'+a32_0x4ae168[_0x1dac28(0x2f5)](_0x1dac28(0x1dc)));for(const _0x51226e of _0x500b62[_0x1dac28(0x12d)]){const _0x56d98c=_0x51226e[_0x1dac28(0x1e2)]?a32_0x4ae168[_0x1dac28(0x24e)]('✔'):a32_0x4ae168[_0x1dac28(0x2a7)]('✘');let _0x1d44be='';if(_0x51226e[_0x1dac28(0x1e2)]&&_0x51226e[_0x1dac28(0x1d1)]!==undefined&&_0x51226e['coveragePercent']!==undefined){const _0x4d2ead=_0x51226e[_0x1dac28(0x1a3)][_0x1dac28(0x32d)](0x1),_0x51222c=_0x51226e['coveragePercent']>=0x50?a32_0x4ae168[_0x1dac28(0x24e)]:_0x51226e[_0x1dac28(0x1a3)]>=0x32?a32_0x4ae168[_0x1dac28(0x288)]:a32_0x4ae168[_0x1dac28(0x2a7)];_0x1d44be='\x20'+a32_0x4ae168[_0x1dac28(0x2f5)](_0x1dac28(0x315))+'\x20'+_0x51222c(_0x4d2ead+'%')+'\x20('+formatRows(_0x51226e[_0x1dac28(0x1d1)])+_0x1dac28(0x2a0);}console[_0x1dac28(0x1ea)](_0x56d98c+'\x20'+a32_0x4ae168[_0x1dac28(0x223)](_0x51226e['name'])+_0x1d44be),console['error']('\x20\x20'+a32_0x4ae168['dim'](_0x1dac28(0x2b0))+'\x20'+a32_0x4ae168[_0x1dac28(0x223)](_0x51226e[_0x1dac28(0x25d)]+'.'+_0x51226e['table']));const _0x35f79b=_0x51226e[_0x1dac28(0x1ac)]===_0x51226e[_0x1dac28(0x188)]?a32_0x4ae168['dim'](_0x1dac28(0x17e))+'\x20'+_0x51226e['joinKey']:a32_0x4ae168[_0x1dac28(0x2f5)]('Join:')+'\x20'+_0x51226e[_0x1dac28(0x1ac)]+_0x1dac28(0x220)+_0x51226e[_0x1dac28(0x188)];console[_0x1dac28(0x1ea)]('\x20\x20'+_0x35f79b),console[_0x1dac28(0x1ea)]('\x20\x20'+a32_0x4ae168['dim'](_0x1dac28(0x31a))),this['displayColumns'](_0x51226e['columns']),!_0x51226e[_0x1dac28(0x1e2)]&&console[_0x1dac28(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x1dac28(0x2a7)](_0x1dac28(0x1f1))+'\x20'+_0x51226e['schemaError']);}}[a32_0x4b25d6(0x33b)](_0x4cf3dc,_0x1fc753){const _0x534dd1=a32_0x4b25d6;if(_0x4cf3dc[_0x534dd1(0x298)][_0x534dd1(0x25c)]===0x0)return;console['error']('\x0a'+a32_0x4ae168[_0x534dd1(0x2f5)](_0x534dd1(0x1e3))+'\x20'+a32_0x4ae168[_0x534dd1(0x2f5)]('('+_0x1fc753+')'));for(const _0x53a0ad of _0x4cf3dc['behaviors']){const _0x3a05c0=_0x53a0ad[_0x534dd1(0x1e2)]?a32_0x4ae168[_0x534dd1(0x24e)]('✔'):a32_0x4ae168['red']('✘');let _0x154f52='';if(_0x53a0ad['schemaValid']&&_0x53a0ad[_0x534dd1(0x1e5)]!==undefined&&_0x53a0ad['totalEvents']!==undefined){const _0x659eb3=_0x53a0ad[_0x534dd1(0x2c0)]?.['toFixed'](0x1)||'?',_0xbbca82=(_0x53a0ad[_0x534dd1(0x2c0)]??0x0)>=0x32?a32_0x4ae168['green']:(_0x53a0ad[_0x534dd1(0x2c0)]??0x0)>=0x14?a32_0x4ae168[_0x534dd1(0x288)]:a32_0x4ae168[_0x534dd1(0x2a7)];_0x154f52='\x20'+a32_0x4ae168[_0x534dd1(0x2f5)](_0x534dd1(0x154))+'\x20'+_0xbbca82(formatRows(_0x53a0ad['customersWithEvents']))+'\x20('+_0x659eb3+_0x534dd1(0x2a2)+a32_0x4ae168[_0x534dd1(0x2f5)]('Events:')+'\x20'+a32_0x4ae168[_0x534dd1(0x30c)](formatRows(_0x53a0ad[_0x534dd1(0x14c)]));}console[_0x534dd1(0x1ea)](_0x3a05c0+'\x20'+a32_0x4ae168[_0x534dd1(0x223)](_0x53a0ad[_0x534dd1(0x17c)])+_0x154f52),console[_0x534dd1(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x534dd1(0x2f5)]('Source:')+'\x20'+a32_0x4ae168[_0x534dd1(0x223)](_0x53a0ad['database']+'.'+_0x53a0ad[_0x534dd1(0x262)]));const _0xe314d2=_0x53a0ad['joinKey']===_0x53a0ad[_0x534dd1(0x188)]?a32_0x4ae168[_0x534dd1(0x2f5)](_0x534dd1(0x17e))+'\x20'+_0x53a0ad[_0x534dd1(0x1ac)]:a32_0x4ae168[_0x534dd1(0x2f5)]('Join:')+'\x20'+_0x53a0ad['joinKey']+_0x534dd1(0x220)+_0x53a0ad[_0x534dd1(0x188)];console[_0x534dd1(0x1ea)]('\x20\x20'+_0xe314d2),console[_0x534dd1(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x534dd1(0x2f5)]('Columns:')),this[_0x534dd1(0x169)](_0x53a0ad[_0x534dd1(0x17a)]),!_0x53a0ad['schemaValid']&&console[_0x534dd1(0x1ea)]('\x20\x20'+a32_0x4ae168['red'](_0x534dd1(0x1f1))+'\x20'+_0x53a0ad[_0x534dd1(0x1a0)]);}}['displayColumns'](_0x6f1dc1){const _0x4be9bb=a32_0x4b25d6;for(const _0x3cb7e8 of _0x6f1dc1){_0x3cb7e8[_0x4be9bb(0x22e)]===_0x3cb7e8['column']||_0x3cb7e8['column']==='*'?console[_0x4be9bb(0x1ea)](_0x4be9bb(0x2bc)+_0x3cb7e8[_0x4be9bb(0x22e)]):console[_0x4be9bb(0x1ea)]('\x20\x20\x20\x20-\x20'+_0x3cb7e8[_0x4be9bb(0x22e)]+'\x20'+a32_0x4ae168[_0x4be9bb(0x2f5)]('('+_0x3cb7e8[_0x4be9bb(0x2b1)]+')'));}}[a32_0x4b25d6(0x299)](_0xce3a0e){const _0x4275b9=a32_0x4b25d6;console['error']('─'['repeat'](0x3c));if(_0xce3a0e[_0x4275b9(0x29e)]['length']>0x0){console[_0x4275b9(0x1ea)]('\x0a'+a32_0x4ae168[_0x4275b9(0x2a7)](_0x4275b9(0x23a)));for(const _0x3ffbef of _0xce3a0e[_0x4275b9(0x29e)]){console[_0x4275b9(0x1ea)]('\x20\x20'+a32_0x4ae168['red']('•')+'\x20'+_0x3ffbef);}}_0xce3a0e[_0x4275b9(0x1b4)]&&console[_0x4275b9(0x1ea)]('\x0a'+a32_0x4ae168[_0x4275b9(0x24e)]('✔')+_0x4275b9(0x241));}}function a32_0x3fa1(_0x511b6a,_0x3d6a3f){_0x511b6a=_0x511b6a-0x12b;const _0x48b6e8=a32_0x48b6();let _0x3fa10d=_0x48b6e8[_0x511b6a];return _0x3fa10d;}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x2e6);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x326);async[a32_0x4b25d6(0x1b0)](_0x154059){const _0x3448b7=a32_0x4b25d6,{options:_0x12fdfb,args:_0x55ccb3,tdx:_0x4c1dd4}=_0x154059,_0x52c681=_0x12fdfb,_0xb34ccc=_0x55ccb3[0x0]||_0x12fdfb['parentSegment'];if(!_0xb34ccc)return showParentSegmentNotSetError(_0x3448b7(0x1c6)+_0x3448b7(0x179)+_0x3448b7(0x20d)+_0x3448b7(0x228)+_0x3448b7(0x270)+_0x3448b7(0x1b9)+'\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a'+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x52c681[_0x3448b7(0x213)]&&!_0x52c681['attribute']&&!_0x52c681['behavior']&&!_0x52c681['enriched'])return console[_0x3448b7(0x1ea)](a32_0x4ae168[_0x3448b7(0x2a7)](_0x3448b7(0x245))),console[_0x3448b7(0x1ea)](_0x3448b7(0x227)),console[_0x3448b7(0x1ea)](_0x3448b7(0x13a)),console[_0x3448b7(0x1ea)](_0x3448b7(0x30a)),console[_0x3448b7(0x1ea)](_0x3448b7(0x2f8)),console[_0x3448b7(0x1ea)](_0x3448b7(0x162)),console[_0x3448b7(0x1ea)](_0x3448b7(0x2ca)),0x1;const _0x1872e5=resolveYamlFile(_0xb34ccc);if(!existsSync(_0x1872e5))return showFileNotFoundError(_0x1872e5,_0xb34ccc),0x1;_0x52c681[_0x3448b7(0x2f3)]&&(console[_0x3448b7(0x1ea)](_0x3448b7(0x322)+_0x52c681[_0x3448b7(0x185)]),console['error'](_0x3448b7(0x1bf)+_0x1872e5));let _0x432772;try{_0x432772=readFileSync(_0x1872e5,_0x3448b7(0x137));}catch(_0x2b6d81){const _0x807741=_0x2b6d81 instanceof Error?_0x2b6d81[_0x3448b7(0x282)]:String(_0x2b6d81);return console[_0x3448b7(0x1ea)](_0x3448b7(0x318)+_0x807741),0x1;}let _0x3d4286;try{_0x3d4286=parseDef(_0x432772);}catch(_0x376d9f){const _0x2205b6=_0x376d9f instanceof Error?_0x376d9f['message']:String(_0x376d9f);return console[_0x3448b7(0x1ea)](a32_0x4ae168['red']('Error\x20parsing\x20YAML:\x20'+_0x2205b6)),0x1;}if(_0x52c681[_0x3448b7(0x27a)]===!![]||_0x52c681[_0x3448b7(0x27a)]===''){const _0x2b6bf7=_0x3d4286['attributes']?.['map'](_0x48ab8c=>_0x48ab8c[_0x3448b7(0x17c)])||[];if(_0x2b6bf7[_0x3448b7(0x25c)]===0x0)console[_0x3448b7(0x1ea)](a32_0x4ae168[_0x3448b7(0x2a7)](_0x3448b7(0x2dd)));else{console[_0x3448b7(0x1ea)](a32_0x4ae168['red'](_0x3448b7(0x141))),console[_0x3448b7(0x1ea)](_0x3448b7(0x2e8));for(const _0x59d53 of _0x2b6bf7){console[_0x3448b7(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x3448b7(0x30c)](_0x59d53));}console[_0x3448b7(0x1ea)]('\x0aUsage:\x20tdx\x20ps\x20preview\x20'+_0xb34ccc+_0x3448b7(0x19b)+_0x2b6bf7[0x0]+'\x22');}return 0x1;}if(_0x52c681[_0x3448b7(0x2d5)]===!![]||_0x52c681[_0x3448b7(0x2d5)]===''){const _0x1f8981=_0x3d4286[_0x3448b7(0x298)]?.[_0x3448b7(0x1fd)](_0x20ebf1=>_0x20ebf1['name'])||[];if(_0x1f8981[_0x3448b7(0x25c)]===0x0)console[_0x3448b7(0x1ea)](a32_0x4ae168[_0x3448b7(0x2a7)](_0x3448b7(0x257)));else{console[_0x3448b7(0x1ea)](a32_0x4ae168['red'](_0x3448b7(0x144))),console['error'](_0x3448b7(0x14b));for(const _0xb119a of _0x1f8981){console[_0x3448b7(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x3448b7(0x30c)](_0xb119a));}console[_0x3448b7(0x1ea)](_0x3448b7(0x285)+_0xb34ccc+_0x3448b7(0x2f1)+_0x1f8981[0x0]+'\x22');}return 0x1;}const _0x34a034=createCommandSpinner(a32_0x4ae168['dim'](_0x3448b7(0x1da)),{'verbose':_0x52c681['verbose']});_0x34a034[_0x3448b7(0x309)]();const _0x37c7ae={'onProgress':_0x3bd0a6=>{const _0x2a2fba=_0x3448b7;_0x34a034[_0x2a2fba(0x27f)]=formatProgressMessage(_0x3bd0a6);}};if(_0x52c681['master'])_0x37c7ae[_0x3448b7(0x213)]=!![];if(_0x52c681['attribute']&&typeof _0x52c681[_0x3448b7(0x27a)]==='string')_0x37c7ae['attribute']=_0x52c681[_0x3448b7(0x27a)];if(_0x52c681[_0x3448b7(0x2d5)]&&typeof _0x52c681[_0x3448b7(0x2d5)]===_0x3448b7(0x2b8))_0x37c7ae[_0x3448b7(0x2d5)]=_0x52c681[_0x3448b7(0x2d5)];if(_0x52c681['enriched'])_0x37c7ae[_0x3448b7(0x20c)]=!![];if(_0x52c681['interval'])_0x37c7ae[_0x3448b7(0x2cf)]=_0x52c681[_0x3448b7(0x2cf)];let _0x24bcf0;try{_0x24bcf0=await _0x4c1dd4[_0x3448b7(0x250)][_0x3448b7(0x2cc)](_0x432772,_0x37c7ae),_0x34a034[_0x3448b7(0x28b)]();}catch(_0x32b38c){_0x34a034[_0x3448b7(0x28b)]();throw _0x32b38c;}return await this[_0x3448b7(0x29a)](_0x24bcf0,{'master':_0x52c681[_0x3448b7(0x213)],'attribute':typeof _0x52c681[_0x3448b7(0x27a)]===_0x3448b7(0x2b8)?_0x52c681[_0x3448b7(0x27a)]:undefined,'behavior':typeof _0x52c681[_0x3448b7(0x2d5)]===_0x3448b7(0x2b8)?_0x52c681[_0x3448b7(0x2d5)]:undefined,'enriched':_0x52c681[_0x3448b7(0x20c)]}),_0x24bcf0['allValid']?0x0:0x1;}async[a32_0x4b25d6(0x29a)](_0x322f58,_0x2aff16){const _0x3158cb=a32_0x4b25d6;console['error']('\x0a'+a32_0x4ae168['bold']('Preview:')+'\x20'+_0x322f58[_0x3158cb(0x17c)]),console[_0x3158cb(0x1ea)]('═'['repeat'](0x3c));if(_0x2aff16['master']&&_0x322f58[_0x3158cb(0x196)]){const _0xf0c6a8=a32_0x4ae168[_0x3158cb(0x2f5)](_0x3158cb(0x31c))+'\x20'+a32_0x4ae168[_0x3158cb(0x223)](_0x322f58[_0x3158cb(0x213)][_0x3158cb(0x25d)]+'.'+_0x322f58[_0x3158cb(0x213)][_0x3158cb(0x262)]);await this['displaySampleData'](_0xf0c6a8,_0x322f58[_0x3158cb(0x196)]);}else{if(_0x2aff16[_0x3158cb(0x27a)]&&_0x322f58['sampleData']){const _0x327c24=a32_0x4ae168['dim']('Attribute:')+'\x20'+a32_0x4ae168['bold'](_0x2aff16[_0x3158cb(0x27a)]);await this['displaySampleData'](_0x327c24,_0x322f58['sampleData']);}else{if(_0x2aff16[_0x3158cb(0x2d5)]&&_0x322f58[_0x3158cb(0x196)]){const _0x1de71c=a32_0x4ae168[_0x3158cb(0x2f5)](_0x3158cb(0x2be))+'\x20'+a32_0x4ae168[_0x3158cb(0x223)](_0x2aff16[_0x3158cb(0x2d5)]);await this[_0x3158cb(0x302)](_0x1de71c,_0x322f58['sampleData']);}else{if(_0x2aff16['enriched']&&_0x322f58[_0x3158cb(0x196)]){const _0x4d91ad=a32_0x4ae168[_0x3158cb(0x2f5)](_0x3158cb(0x2c5))+'\x20'+a32_0x4ae168[_0x3158cb(0x223)](_0x3158cb(0x239));await this['displaySampleData'](_0x4d91ad,_0x322f58[_0x3158cb(0x196)]);}else!_0x322f58['sampleData']&&console[_0x3158cb(0x1ea)](_0x3158cb(0x28d));}}}if(_0x322f58[_0x3158cb(0x29e)][_0x3158cb(0x25c)]>0x0){console[_0x3158cb(0x1ea)]('─'[_0x3158cb(0x24f)](0x3c)),console['error']('\x0a'+a32_0x4ae168[_0x3158cb(0x2a7)](_0x3158cb(0x23a)));for(const _0x1835e1 of _0x322f58[_0x3158cb(0x29e)]){console[_0x3158cb(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x3158cb(0x2a7)]('•')+'\x20'+_0x1835e1);}}}async[a32_0x4b25d6(0x302)](_0x5dd8bc,_0x39c2f0){const _0x268fa7=a32_0x4b25d6;if(_0x39c2f0[_0x268fa7(0x25c)]===0x0){console[_0x268fa7(0x1ea)]('\x0a'+_0x5dd8bc),console['error'](_0x268fa7(0x323));return;}console[_0x268fa7(0x1ea)]('\x0a'+_0x5dd8bc);const _0x5bee9a=Object['keys'](_0x39c2f0[0x0])[_0x268fa7(0x1fd)](_0x14ee6b=>({'name':_0x14ee6b,'type':typeof _0x39c2f0[0x0][_0x14ee6b]===_0x268fa7(0x30e)?'double':'varchar'})),_0x294782={'queryId':'preview','columns':_0x5bee9a,'data':_0x39c2f0,'stats':{'state':_0x268fa7(0x32b),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x39c2f0[_0x268fa7(0x25c)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x2ca78d=formatAsTable(_0x294782,_0x39c2f0[_0x268fa7(0x25c)],!![]);await writeOutput(_0x2ca78d,undefined,_0x268fa7(0x262));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x231);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x1c4);async[a32_0x4b25d6(0x1b0)](_0x3bc362){const _0x16f2d9=a32_0x4b25d6,{options:_0xff4096,args:_0x54aafe,tdx:_0x3d1031}=_0x3bc362,_0x2cb7ca=_0xff4096,_0x265e0a=_0x54aafe[0x0]||_0xff4096[_0x16f2d9(0x2c4)];if(!_0x265e0a)return showParentSegmentNotSetError(_0x16f2d9(0x325)+_0x16f2d9(0x2a6)),0x1;const _0x4f7928=resolveYamlFile(_0x265e0a);if(existsSync(_0x4f7928)){_0x2cb7ca[_0x16f2d9(0x2f3)]&&console[_0x16f2d9(0x1ea)](_0x16f2d9(0x24b)+_0x4f7928);let _0x896a93;try{_0x896a93=readFileSync(_0x4f7928,_0x16f2d9(0x137));}catch(_0x17f87b){const _0x177169=_0x17f87b instanceof Error?_0x17f87b[_0x16f2d9(0x282)]:String(_0x17f87b);return console[_0x16f2d9(0x1ea)](_0x16f2d9(0x318)+_0x177169),0x1;}const _0xd3faac=await withSpinner(_0x16f2d9(0x1a1),()=>_0x3d1031[_0x16f2d9(0x250)]['pushParentYaml'](_0x896a93),{'verbose':_0x2cb7ca['verbose']}),_0x158033=_0xd3faac['data'],{isNew:_0x333919,name:_0x39c72f,hasChanges:_0x5ec927,diffFormatted:_0x26e01d}=_0x158033;if(_0x5ec927){_0x333919?console[_0x16f2d9(0x1ea)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x39c72f+'\x27:'):console[_0x16f2d9(0x1ea)](_0x16f2d9(0x2b9)+_0x39c72f+'\x27:');console['error']('─'[_0x16f2d9(0x24f)](0x3c)),console['error'](_0x26e01d),console[_0x16f2d9(0x1ea)]('─'[_0x16f2d9(0x24f)](0x3c));const _0x4b334a=_0x333919?_0x16f2d9(0x272)+_0x39c72f+_0x16f2d9(0x1d8):_0x16f2d9(0x16c)+_0x39c72f+'\x27\x20and\x20run\x20workflow?';if(!_0x2cb7ca[_0x16f2d9(0x158)]){if(!isInteractive())return console[_0x16f2d9(0x1ea)](a32_0x4ae168['red']('\x0aError:'),_0x16f2d9(0x2d7)),console[_0x16f2d9(0x1ea)](a32_0x4ae168[_0x16f2d9(0x2f5)](_0x16f2d9(0x30d))),0x1;const _0x130b36=await confirmKey(_0x4b334a);if(!_0x130b36)return console[_0x16f2d9(0x1ea)](a32_0x4ae168[_0x16f2d9(0x288)](_0x16f2d9(0x258))),0x1;}const _0x33a8e8=_0x333919?_0x16f2d9(0x191):'Updating';await withSpinner(_0x33a8e8+'\x20parent\x20segment\x20\x27'+_0x39c72f+_0x16f2d9(0x30f),()=>_0x158033['apply'](),{'verbose':_0x2cb7ca[_0x16f2d9(0x2f3)]});const _0x1b135b=_0x333919?_0x16f2d9(0x19e):'Updated';console[_0x16f2d9(0x1ea)]('✔\x20'+_0x1b135b+'\x20parent\x20segment\x20\x27'+_0x39c72f+'\x27');}else console[_0x16f2d9(0x1ea)](_0x16f2d9(0x289)+_0x39c72f+_0x16f2d9(0x300));}const _0x117417=await withSpinner(_0x16f2d9(0x295)+_0x265e0a+_0x16f2d9(0x30f),()=>_0x3d1031[_0x16f2d9(0x250)][_0x16f2d9(0x2b4)](_0x265e0a),{'verbose':_0x2cb7ca[_0x16f2d9(0x2f3)]}),_0x598627=_0x117417[_0x16f2d9(0x13d)],_0x382432=getConsoleUrl(_0x2cb7ca[_0x16f2d9(0x185)],_0x16f2d9(0x15e)+_0x598627['workflowId']+'/sessions/'+_0x598627[_0x16f2d9(0x332)]+_0x16f2d9(0x31f)+_0x598627['workflowAttemptId']);return console[_0x16f2d9(0x1ea)]('\x0a✔\x20Workflow\x20started'),console[_0x16f2d9(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x16f2d9(0x2f5)](_0x16f2d9(0x1ba))+'\x20'+_0x598627[_0x16f2d9(0x2d8)]),console[_0x16f2d9(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x16f2d9(0x2f5)]('Status:')+'\x20'+_0x598627['status']),console[_0x16f2d9(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x16f2d9(0x2f5)](_0x16f2d9(0x2ab))+'\x20'+_0x598627[_0x16f2d9(0x332)]),console[_0x16f2d9(0x1ea)]('\x20\x20'+a32_0x4ae168['dim'](_0x16f2d9(0x2fb))+'\x20'+_0x598627['workflowAttemptId']),console[_0x16f2d9(0x1ea)]('\x20\x20'+_0x382432),console[_0x16f2d9(0x1ea)]('\x0a'+a32_0x4ae168[_0x16f2d9(0x2f5)](_0x16f2d9(0x273))+_0x16f2d9(0x2d0)+_0x598627[_0x16f2d9(0x2fd)]+'\x20kill'),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x2cb);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x236);async[a32_0x4b25d6(0x1b0)](_0x3645f4){const _0x3d0d54=a32_0x4b25d6,{options:_0x3c1864,args:_0x297400,tdx:_0x617ae3}=_0x3645f4,_0x2df9d4=_0x297400[0x0]||_0x3c1864[_0x3d0d54(0x2c4)];if(!_0x2df9d4)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'+_0x3d0d54(0x324)),0x1;_0x3c1864['verbose']&&(console['error']('Site:\x20'+_0x3c1864[_0x3d0d54(0x185)]),console[_0x3d0d54(0x1ea)](_0x3d0d54(0x2c2)+_0x2df9d4));const _0x3c4bf2=await withSpinner(_0x3d0d54(0x339)+_0x2df9d4+_0x3d0d54(0x30f),()=>_0x617ae3[_0x3d0d54(0x250)]['listFields'](_0x2df9d4),{'verbose':_0x3c1864['verbose']}),_0x11d6a5=_0x3c4bf2[_0x3d0d54(0x13d)];console[_0x3d0d54(0x1ea)](_0x3d0d54(0x1c8)+_0x11d6a5[_0x3d0d54(0x25c)]+'\x20field'+(_0x11d6a5[_0x3d0d54(0x25c)]!==0x1?'s':''));if(_0x3c1864['json']||_0x3c1864[_0x3d0d54(0x1f6)])return await handleSDKOutput(_0x11d6a5,_0x3c1864),0x0;return displayFieldsHumanReadable(_0x11d6a5,_0x2df9d4),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x248);[a32_0x4b25d6(0x291)]='Show\x20parent\x20segment\x20details';async[a32_0x4b25d6(0x1b0)](_0x2e6b0f){const _0x2d66a7=a32_0x4b25d6,{options:_0x585c56,args:_0x5dc66d,tdx:_0x83a6fd}=_0x2e6b0f,_0x393ed0=_0x585c56,_0x27194c=_0x5dc66d[0x0]||_0x585c56[_0x2d66a7(0x2c4)];if(!_0x27194c)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'+_0x2d66a7(0x27b)+'Options:\x0a'+'\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser'),0x1;_0x585c56[_0x2d66a7(0x2f3)]&&(console['error']('Site:\x20'+_0x585c56[_0x2d66a7(0x185)]),console[_0x2d66a7(0x1ea)](_0x2d66a7(0x2c2)+_0x27194c));const _0x7e6b5f=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x27194c+_0x2d66a7(0x30f),()=>_0x83a6fd[_0x2d66a7(0x250)][_0x2d66a7(0x2db)](_0x27194c),{'verbose':_0x585c56['verbose']}),_0x108100=_0x7e6b5f[_0x2d66a7(0x13d)];if(_0x393ed0[_0x2d66a7(0x286)]){const _0x132e19=getConsoleNextUrl(_0x393ed0[_0x2d66a7(0x185)],_0x2d66a7(0x1fe)+_0x108100['id']);return console[_0x2d66a7(0x1ea)](a32_0x4ae168[_0x2d66a7(0x24e)]('✔')+_0x2d66a7(0x200)+a32_0x4ae168[_0x2d66a7(0x30c)](_0x132e19)),openBrowser(_0x132e19),0x0;}return await handleSingleObjectOutput(_0x108100,_0x585c56),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{['name']=a32_0x4b25d6(0x22d);['description']=a32_0x4b25d6(0x2b7);async['execute'](_0x246b31){const _0x228c5a=a32_0x4b25d6,{options:_0x16f664,args:_0x12fefb,tdx:_0x270e78}=_0x246b31,_0x3731bc=_0x16f664,_0x3d58fc=_0x12fefb[0x0]||_0x16f664[_0x228c5a(0x2c4)];if(!_0x3d58fc)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'+_0x228c5a(0x214)),0x1;_0x16f664['verbose']&&(console[_0x228c5a(0x1ea)]('Site:\x20'+_0x16f664[_0x228c5a(0x185)]),console['error'](_0x228c5a(0x2c2)+_0x3d58fc));const _0x3e4613=await withSpinner(_0x228c5a(0x306)+_0x3d58fc+'\x27...',()=>_0x270e78[_0x228c5a(0x250)][_0x228c5a(0x233)](_0x3d58fc),{'verbose':_0x16f664[_0x228c5a(0x2f3)]}),_0xf84184=_0x3e4613[_0x228c5a(0x13d)],_0x1a83ce=_0x270e78[_0x228c5a(0x250)][_0x228c5a(0x28c)](_0xf84184);if(_0x3731bc[_0x228c5a(0x212)]){const _0x21e2c4=await this[_0x228c5a(0x2d3)](_0x246b31,_0x3d58fc,_0xf84184,_0x1a83ce),_0x286793=this[_0x228c5a(0x256)](_0x21e2c4);writeFileSync(_0x3731bc[_0x228c5a(0x212)],_0x286793);const _0x171a7d=_0x21e2c4[_0x228c5a(0x32a)][_0x228c5a(0x17a)][_0x228c5a(0x25c)]+_0x21e2c4[_0x228c5a(0x298)][_0x228c5a(0x260)]((_0xa7c44d,_0x30d663)=>_0xa7c44d+_0x30d663[_0x228c5a(0x17a)][_0x228c5a(0x25c)],0x0),_0x348d6f=_0x21e2c4['behaviors']['filter'](_0xe33031=>_0xe33031[_0x228c5a(0x17a)][_0x228c5a(0x25c)]===0x0)['length'];return console[_0x228c5a(0x19d)](_0x228c5a(0x296)+_0x3731bc[_0x228c5a(0x212)]),console[_0x228c5a(0x19d)]('\x20\x20Database:\x20'+_0x1a83ce),console[_0x228c5a(0x19d)](_0x228c5a(0x2c8)+_0x21e2c4[_0x228c5a(0x298)][_0x228c5a(0x25c)]+_0x228c5a(0x186)),console[_0x228c5a(0x19d)]('\x20\x20Columns:\x20'+_0x171a7d+_0x228c5a(0x17d)),_0x348d6f>0x0&&console['log'](_0x228c5a(0x18a)+_0x348d6f+_0x228c5a(0x152)),0x0;}console[_0x228c5a(0x1ea)]('\x0a'+a32_0x4ae168['bold'](_0x228c5a(0x2ed))+'\x20'+a32_0x4ae168[_0x228c5a(0x30c)](_0x1a83ce));const _0x5cf6ef=await withSpinner(_0x228c5a(0x26e),()=>_0x270e78[_0x228c5a(0x250)][_0x228c5a(0x2d2)](_0xf84184),{'verbose':_0x16f664[_0x228c5a(0x2f3)]});console[_0x228c5a(0x1ea)]('\x0a'+a32_0x4ae168[_0x228c5a(0x223)](_0x228c5a(0x32a))+'\x20'+a32_0x4ae168[_0x228c5a(0x2f5)]('('+_0x1a83ce+_0x228c5a(0x166)));const _0x2c9950=await executeSchemaQuery(_0x5cf6ef[_0x228c5a(0x13d)],_0x270e78,_0x16f664);await handleQueryOutput(_0x2c9950,_0x16f664);const _0x53cad2=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x270e78[_0x228c5a(0x250)]['getBehaviorNames'](_0xf84184),{'verbose':_0x16f664[_0x228c5a(0x2f3)]});for(const _0x16e849 of _0x53cad2[_0x228c5a(0x13d)]){const _0x529e13=_0x228c5a(0x181)+_0x16e849['toLowerCase']()['replace'](/\s+/g,'_'),_0x4af7ad='SELECT\x20*\x20FROM\x20'+_0x1a83ce+'.'+_0x529e13;console['error']('\x0a'+a32_0x4ae168[_0x228c5a(0x223)](_0x16e849)+'\x20'+a32_0x4ae168[_0x228c5a(0x2f5)]('('+_0x1a83ce+'.'+_0x529e13+')'));try{const _0x152e55=await executeSchemaQuery(_0x4af7ad,_0x270e78,_0x16f664);await handleQueryOutput(_0x152e55,_0x16f664);}catch{console[_0x228c5a(0x1ea)](a32_0x4ae168[_0x228c5a(0x288)](_0x228c5a(0x25a)));}}return 0x0;}async[a32_0x4b25d6(0x2d3)](_0x5374f1,_0x4bd06a,_0x2e8219,_0xcb4116){const _0x4bfd47=a32_0x4b25d6,{options:_0x1533cd,tdx:_0x3832fc}=_0x5374f1,_0x6e02c6=await withSpinner(_0x4bfd47(0x26e),()=>_0x3832fc[_0x4bfd47(0x250)][_0x4bfd47(0x2d2)](_0x2e8219),{'verbose':_0x1533cd['verbose']}),_0x69c9d1=await executeSchemaQuery(_0x6e02c6[_0x4bfd47(0x13d)],_0x3832fc,_0x1533cd),_0x4e3a12=_0x69c9d1[_0x4bfd47(0x13d)][_0x4bfd47(0x1fd)](_0x39beca=>({'name':_0x39beca[_0x4bfd47(0x2df)],'type':_0x39beca[_0x4bfd47(0x22a)]})),_0x284bcc=await withSpinner(_0x4bfd47(0x1ce),()=>_0x3832fc[_0x4bfd47(0x250)][_0x4bfd47(0x1ef)](_0x2e8219),{'verbose':_0x1533cd[_0x4bfd47(0x2f3)]}),_0x2e362d=[];for(const _0x501c2c of _0x284bcc[_0x4bfd47(0x13d)]){const _0x31522e='behavior_'+_0x501c2c[_0x4bfd47(0x321)]()['replace'](/\s+/g,'_'),_0x30b8d0='SELECT\x20*\x20FROM\x20'+_0xcb4116+'.'+_0x31522e;let _0x5a8757=[];try{const _0x59d0a9=await executeSchemaQuery(_0x30b8d0,_0x3832fc,_0x1533cd);_0x5a8757=_0x59d0a9['data'][_0x4bfd47(0x1fd)](_0x1014d4=>({'name':_0x1014d4[_0x4bfd47(0x2df)],'type':_0x1014d4[_0x4bfd47(0x22a)]}));}catch{}_0x2e362d['push']({'table':_0x31522e,'columns':_0x5a8757});}return{'database':_0xcb4116,'parent_segment':_0x4bd06a,'parent_id':_0x2e8219,'customers':{'table':'customers','columns':_0x4e3a12},'behaviors':_0x2e362d};}[a32_0x4b25d6(0x256)](_0x188d25){const _0x2fe7ca=a32_0x4b25d6,_0x5d6421=_0x486bd1=>{const _0x80671a=a32_0x3fa1;if(_0x486bd1[_0x80671a(0x25c)]===0x0)return'[]';const _0x42322b=_0x486bd1[_0x80671a(0x1fd)](_0x4e7af0=>_0x80671a(0x155)+_0x4e7af0[_0x80671a(0x17c)]+_0x80671a(0x15b)+_0x4e7af0[_0x80671a(0x145)]+_0x80671a(0x1db));return'[\x0a'+_0x42322b[_0x80671a(0x160)](',\x0a')+_0x80671a(0x26c);},_0x9642e=_0x188d25[_0x2fe7ca(0x298)][_0x2fe7ca(0x1fd)](_0x321ee5=>{const _0x2439c6=_0x2fe7ca;return'\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22'+_0x321ee5[_0x2439c6(0x262)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x5d6421(_0x321ee5[_0x2439c6(0x17a)])['replace'](/^/gm,'\x20\x20')[_0x2439c6(0x1f2)]()+'\x0a\x20\x20\x20\x20}';})['join'](',\x0a');return _0x2fe7ca(0x263)+_0x188d25['database']+_0x2fe7ca(0x205)+_0x188d25[_0x2fe7ca(0x1e6)]+_0x2fe7ca(0x284)+_0x188d25[_0x2fe7ca(0x14d)]+_0x2fe7ca(0x165)+_0x188d25[_0x2fe7ca(0x32a)]['table']+'\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20'+_0x5d6421(_0x188d25['customers'][_0x2fe7ca(0x17a)])[_0x2fe7ca(0x283)](/^/gm,'\x20\x20')[_0x2fe7ca(0x1f2)]()+_0x2fe7ca(0x1ae)+_0x9642e+_0x2fe7ca(0x27d);}}export class ParentSegmentSQLCommand extends BaseCommand{['name']=a32_0x4b25d6(0x2e2);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x15c);async['execute'](_0x5ca914){const _0x232caf=a32_0x4b25d6,{options:_0x1e6e0a,args:_0xa8102d,tdx:_0x3c1b60}=_0x5ca914,_0x298298=_0xa8102d[0x0]||_0x1e6e0a[_0x232caf(0x2c4)];if(!_0x298298)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x232caf(0x202)),0x1;_0x1e6e0a[_0x232caf(0x2f3)]&&(console[_0x232caf(0x1ea)](_0x232caf(0x322)+_0x1e6e0a[_0x232caf(0x185)]),console[_0x232caf(0x1ea)](_0x232caf(0x2c2)+_0x298298));const _0x2d05e8=await withSpinner(_0x232caf(0x306)+_0x298298+'\x27...',()=>_0x3c1b60[_0x232caf(0x250)]['resolveParentId'](_0x298298),{'verbose':_0x1e6e0a[_0x232caf(0x2f3)]}),_0x406c5d=_0x2d05e8[_0x232caf(0x13d)],_0x11b486=await withSpinner(_0x232caf(0x175)+_0x298298+'\x27...',()=>_0x3c1b60[_0x232caf(0x250)]['getParentSQL'](_0x406c5d),{'verbose':_0x1e6e0a[_0x232caf(0x2f3)]}),_0x26823d=_0x11b486[_0x232caf(0x13d)];return _0x1e6e0a['format']===_0x232caf(0x18f)||_0x1e6e0a['format']===_0x232caf(0x1f6)?await handleSDKOutput([{'sql':_0x26823d}],_0x1e6e0a):console[_0x232caf(0x19d)](_0x26823d),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{['name']=a32_0x4b25d6(0x2a8);['description']='Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a32_0x4b25d6(0x1b0)](_0x31175c){const _0x750617=a32_0x4b25d6,{options:_0x47b7d3,args:_0x7ad3b1,tdx:_0x25da12}=_0x31175c,_0x57ac9f=_0x7ad3b1[0x0]||_0x47b7d3[_0x750617(0x2c4)];if(!_0x57ac9f)return showParentSegmentNotSetError(_0x750617(0x1d4)+_0x750617(0x2ba)),0x1;_0x47b7d3[_0x750617(0x2f3)]&&(console[_0x750617(0x1ea)]('Site:\x20'+_0x47b7d3[_0x750617(0x185)]),console[_0x750617(0x1ea)]('Parent\x20segment:\x20'+_0x57ac9f));const _0x28f9de=await withSpinner(_0x750617(0x306)+_0x57ac9f+'\x27...',()=>_0x25da12[_0x750617(0x250)][_0x750617(0x233)](_0x57ac9f),{'verbose':_0x47b7d3[_0x750617(0x2f3)]}),_0x2a0161=_0x28f9de['data'],_0x4604ac=await withSpinner(_0x750617(0x175)+_0x57ac9f+_0x750617(0x30f),()=>_0x25da12['segment']['getParentSQL'](_0x2a0161),{'verbose':_0x47b7d3[_0x750617(0x2f3)]});let _0x3603a7=_0x4604ac[_0x750617(0x13d)];const _0x53f26a=resolveLimit(_0x47b7d3[_0x750617(0x278)],DEFAULT_DISPLAY_LIMIT),_0xf921ed=/\bLIMIT\s+\d+/i[_0x750617(0x193)](_0x3603a7);!_0xf921ed&&(_0x3603a7=_0x3603a7[_0x750617(0x1f2)]()[_0x750617(0x283)](/;+$/,''),_0x3603a7=_0x750617(0x330)+_0x3603a7+_0x750617(0x17f)+_0x53f26a);_0x47b7d3['verbose']&&console[_0x750617(0x1ea)](_0x750617(0x21d)+_0x3603a7);const _0x4cb2de=await withProgressSpinner(_0x750617(0x1f7),async _0x30a1f2=>{const _0xd874b8=_0x750617,_0x24fdb6=await _0x25da12['query'][_0xd874b8(0x1b0)](_0x3603a7,{'catalog':'td','schema':_0xd874b8(0x2a5),'onJobId':_0x3451f2=>{const _0x31620c=_0xd874b8;_0x30a1f2[_0x31620c(0x274)](_0x3451f2);}});return _0x24fdb6;},{'verbose':_0x47b7d3[_0x750617(0x2f3)]}),_0x5c1616=_0x4cb2de[_0x750617(0x13d)],_0x243f06=_0x5c1616['jobId']?_0x750617(0x174)+_0x5c1616[_0x750617(0x246)]+']':'';return console[_0x750617(0x1ea)](_0x750617(0x209)+_0x5c1616[_0x750617(0x195)][_0x750617(0x327)][_0x750617(0x329)]()+'\x20rows\x20'+('in\x20'+formatElapsed(_0x5c1616[_0x750617(0x195)][_0x750617(0x237)])+_0x243f06)),await handleQueryOutput(_0x5c1616,_0x47b7d3),0x0;}}export class PSRtListCommand extends BaseCommand{['name']='ps:rt:list';['description']='List\x20parent\x20segments\x20with\x20RT\x202.0\x20status';async[a32_0x4b25d6(0x1b0)](_0x2af772){const _0x218040=a32_0x4b25d6,{options:_0x257adf,args:_0x320268,tdx:_0x5da3db}=_0x2af772,_0x2f78c6=_0x320268[0x0],_0x227ede=await withSpinner(_0x2f78c6?_0x218040(0x208)+_0x2f78c6+_0x218040(0x30f):_0x218040(0x267),()=>_0x5da3db['realtime'][_0x218040(0x1a6)](),{'verbose':_0x257adf[_0x218040(0x2f3)]});let _0x4c751d=_0x227ede[_0x218040(0x13d)][_0x218040(0x2eb)](_0x313e1a=>_0x313e1a['realtime_enabled']);if(_0x2f78c6){const _0xa17787=_0x2f78c6['replace'](/[.+^${}()|[\]\\]/g,_0x218040(0x1b7))[_0x218040(0x283)](/\*/g,'.*')[_0x218040(0x283)](/\?/g,'.'),_0x4dfad9=new RegExp('^'+_0xa17787+'$','i');_0x4c751d=_0x4c751d[_0x218040(0x2eb)](_0xdb578=>_0x4dfad9['test'](_0xdb578[_0x218040(0x17c)]));}_0x4c751d[_0x218040(0x147)]((_0x8c21f8,_0x39edc3)=>_0x8c21f8[_0x218040(0x17c)]['localeCompare'](_0x39edc3[_0x218040(0x17c)])),console[_0x218040(0x1ea)](_0x218040(0x1c8)+_0x4c751d[_0x218040(0x25c)]+_0x218040(0x1a7)+(_0x4c751d[_0x218040(0x25c)]!==0x1?'s':''));const _0x117c97=_0x1ee662=>{const _0x1250c6=_0x218040;return getConsoleNextUrl(_0x257adf[_0x1250c6(0x185)],_0x1250c6(0x1fe)+_0x1ee662);};if(_0x257adf['format']===_0x218040(0x18f)||_0x257adf['format']===_0x218040(0x1f6)){const _0x5c38bb=_0x4c751d[_0x218040(0x1fd)](_0x18f2d3=>({..._0x18f2d3,'url':_0x117c97(_0x18f2d3['id'])}));await handleSDKOutput(_0x5c38bb,_0x257adf);}else{if(_0x4c751d['length']===0x0)console[_0x218040(0x19d)](_0x218040(0x2f4));else for(const _0x27a255 of _0x4c751d){const _0x493970=_0x27a255[_0x218040(0x320)]?a32_0x4ae168[_0x218040(0x2f5)]('\x20('+formatRows(_0x27a255[_0x218040(0x320)])+')'):'',_0x52d684=hyperlink(_0x27a255[_0x218040(0x17c)],_0x117c97(_0x27a255['id']));console[_0x218040(0x19d)]('⚡\x20'+_0x52d684+_0x493970);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x2e7);[a32_0x4b25d6(0x291)]='Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML';async[a32_0x4b25d6(0x1b0)](_0x2bad99){const _0x2aec22=a32_0x4b25d6,{options:_0x5bfb55,args:_0x44d272,tdx:_0x42bd7a}=_0x2bad99,_0x344fe0=_0x44d272[0x0]||_0x5bfb55[_0x2aec22(0x2c4)];if(!_0x344fe0)return showParentSegmentNotSetError(_0x2aec22(0x281)+'\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 _0x22464d=resolveYamlFile(_0x344fe0);if(!existsSync(_0x22464d))return showFileNotFoundError(_0x22464d,_0x344fe0),0x1;let _0x562447;try{_0x562447=readFileSync(_0x22464d,_0x2aec22(0x137));}catch(_0x4d329f){const _0x4b6314=_0x4d329f instanceof Error?_0x4d329f['message']:String(_0x4d329f);return console[_0x2aec22(0x1ea)](_0x2aec22(0x318)+_0x4b6314),0x1;}const _0x1153bd=createCommandSpinner(a32_0x4ae168[_0x2aec22(0x2f5)](_0x2aec22(0x301)),{'verbose':_0x5bfb55[_0x2aec22(0x2f3)]});_0x1153bd['start']();const _0x546bfe={'realtime':!![],'onProgress':_0x1fa8fe=>{_0x1153bd['text']=formatProgressMessage(_0x1fa8fe);}};let _0x276cb7;try{_0x276cb7=await _0x42bd7a[_0x2aec22(0x250)]['validateParentYaml'](_0x562447,_0x546bfe),_0x1153bd[_0x2aec22(0x28b)]();}catch(_0x23d691){_0x1153bd[_0x2aec22(0x28b)]();throw _0x23d691;}console['error']('\x0a'+a32_0x4ae168[_0x2aec22(0x223)]('RT\x202.0\x20Validate:')+'\x20'+_0x276cb7[_0x2aec22(0x17c)]),console[_0x2aec22(0x1ea)]('═'['repeat'](0x3c)),displayRealtimeValidation(_0x276cb7),console[_0x2aec22(0x1ea)]('─'[_0x2aec22(0x24f)](0x3c));if(_0x276cb7['errors'][_0x2aec22(0x25c)]>0x0){console['error']('\x0a'+a32_0x4ae168[_0x2aec22(0x2a7)](_0x2aec22(0x23a)));for(const _0x2e60ba of _0x276cb7[_0x2aec22(0x29e)]){console[_0x2aec22(0x1ea)]('\x20\x20'+a32_0x4ae168[_0x2aec22(0x2a7)]('•')+'\x20'+_0x2e60ba);}}return _0x276cb7[_0x2aec22(0x1b4)]&&console['error']('\x0a'+a32_0x4ae168[_0x2aec22(0x24e)]('✔')+_0x2aec22(0x22f)),_0x276cb7[_0x2aec22(0x1b4)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]='ps:rt:jn:list';[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x2c3);async[a32_0x4b25d6(0x1b0)](_0x53c047){const _0x37ab8f=a32_0x4b25d6,{options:_0x582362,args:_0x4d7208,tdx:_0x602642}=_0x53c047,_0x36aac9=_0x4d7208[0x0]||_0x582362[_0x37ab8f(0x2c4)];if(!_0x36aac9)return showParentSegmentNotSetError(_0x37ab8f(0x2ef)+'\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;_0x582362[_0x37ab8f(0x2f3)]&&(console[_0x37ab8f(0x1ea)](_0x37ab8f(0x322)+_0x582362['site']),console[_0x37ab8f(0x1ea)]('Parent\x20segment:\x20'+_0x36aac9));const _0x50c8cf=await withSpinner(_0x37ab8f(0x306)+_0x36aac9+'\x27...',()=>_0x602642[_0x37ab8f(0x250)][_0x37ab8f(0x233)](_0x36aac9),{'verbose':_0x582362[_0x37ab8f(0x2f3)]}),_0x57c273=_0x50c8cf[_0x37ab8f(0x13d)],_0x1fd1f3=await withSpinner(_0x37ab8f(0x18e)+_0x36aac9+'\x27...',()=>_0x602642[_0x37ab8f(0x1ff)][_0x37ab8f(0x14a)](_0x57c273),{'verbose':_0x582362[_0x37ab8f(0x2f3)]}),_0x321100=_0x1fd1f3[_0x37ab8f(0x13d)];console['error'](_0x37ab8f(0x1c8)+_0x321100[_0x37ab8f(0x25c)]+_0x37ab8f(0x211)+(_0x321100[_0x37ab8f(0x25c)]!==0x1?'s':''));if(_0x582362['format']===_0x37ab8f(0x18f)||_0x582362[_0x37ab8f(0x2c6)]==='jsonl')await handleSDKOutput(_0x321100,_0x582362);else{if(_0x321100['length']===0x0)console[_0x37ab8f(0x19d)](_0x37ab8f(0x199));else for(const _0x7b3352 of _0x321100){const _0x3ae321=_0x7b3352[_0x37ab8f(0x16a)]==='launched'?'🚀':'📝',_0x34fd5a=_0x7b3352[_0x37ab8f(0x2ec)]?a32_0x4ae168[_0x37ab8f(0x288)]('\x20(paused)'):'',_0x519202=a32_0x4ae168[_0x37ab8f(0x2f5)]('\x20('+_0x7b3352[_0x37ab8f(0x313)]+'\x20stage'+(_0x7b3352[_0x37ab8f(0x313)]!==0x1?'s':'')+')');console[_0x37ab8f(0x19d)](_0x3ae321+'\x20'+_0x7b3352[_0x37ab8f(0x17c)]+_0x34fd5a+_0x519202);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x149);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x1d0);async['execute'](_0x2b6681){const _0x2fb562=a32_0x4b25d6,{options:_0xc754e2,args:_0x166cbe,tdx:_0x34817e}=_0x2b6681,_0x4e800b=_0x166cbe[0x0];if(!_0x4e800b)return console[_0x2fb562(0x1ea)](a32_0x4ae168[_0x2fb562(0x2a7)]('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x2fb562(0x1ea)](_0x2fb562(0x217)),console[_0x2fb562(0x1ea)](a32_0x4ae168['dim'](_0x2fb562(0x12b))),0x1;_0xc754e2['verbose']&&(console[_0x2fb562(0x1ea)](_0x2fb562(0x322)+_0xc754e2[_0x2fb562(0x185)]),console[_0x2fb562(0x1ea)](_0x2fb562(0x1b5)+_0x4e800b));const _0x1a72d2=await withSpinner(_0x2fb562(0x21e)+_0x4e800b+_0x2fb562(0x30f),()=>_0x34817e[_0x2fb562(0x1ff)][_0x2fb562(0x2b6)](_0x4e800b),{'verbose':_0xc754e2[_0x2fb562(0x2f3)]}),_0x482e1c=_0x1a72d2[_0x2fb562(0x13d)];console[_0x2fb562(0x1ea)](_0x2fb562(0x280)+_0x482e1c[_0x2fb562(0x17c)]+'\x27');if(_0xc754e2['format']===_0x2fb562(0x18f)||_0xc754e2[_0x2fb562(0x2c6)]===_0x2fb562(0x1f6))await handleSDKOutput([_0x482e1c],_0xc754e2);else{const _0x45d31a=_0x482e1c[_0x2fb562(0x16a)]===_0x2fb562(0x2f7)?'🚀':'📝',_0x56dd7b=_0x482e1c[_0x2fb562(0x2ec)]?a32_0x4ae168[_0x2fb562(0x288)]('\x20(paused)'):'';console[_0x2fb562(0x19d)](_0x45d31a+'\x20'+_0x482e1c['name']+_0x56dd7b);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x194);[a32_0x4b25d6(0x291)]='Resume\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x4b25d6(0x1b0)](_0x343312){const _0x1ccaba=a32_0x4b25d6,{options:_0x2f1221,args:_0x3e4ba7,tdx:_0x24918d}=_0x343312,_0x4c8766=_0x3e4ba7[0x0];if(!_0x4c8766)return console[_0x1ccaba(0x1ea)](a32_0x4ae168['red']('Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a')),console[_0x1ccaba(0x1ea)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a'),console[_0x1ccaba(0x1ea)](a32_0x4ae168[_0x1ccaba(0x2f5)](_0x1ccaba(0x12b))),0x1;_0x2f1221[_0x1ccaba(0x2f3)]&&(console[_0x1ccaba(0x1ea)](_0x1ccaba(0x322)+_0x2f1221[_0x1ccaba(0x185)]),console[_0x1ccaba(0x1ea)](_0x1ccaba(0x1b5)+_0x4c8766));const _0xe2ed82=await withSpinner(_0x1ccaba(0x334)+_0x4c8766+_0x1ccaba(0x30f),()=>_0x24918d['realtime'][_0x1ccaba(0x275)](_0x4c8766),{'verbose':_0x2f1221[_0x1ccaba(0x2f3)]}),_0x2ed28e=_0xe2ed82[_0x1ccaba(0x13d)];console['error'](_0x1ccaba(0x255)+_0x2ed28e[_0x1ccaba(0x17c)]+'\x27');if(_0x2f1221[_0x1ccaba(0x2c6)]===_0x1ccaba(0x18f)||_0x2f1221[_0x1ccaba(0x2c6)]===_0x1ccaba(0x1f6))await handleSDKOutput([_0x2ed28e],_0x2f1221);else{const _0x5e65c8=_0x2ed28e[_0x1ccaba(0x16a)]===_0x1ccaba(0x2f7)?'🚀':'📝',_0x30e975=_0x2ed28e[_0x1ccaba(0x2ec)]?a32_0x4ae168[_0x1ccaba(0x288)]('\x20(paused)'):'';console[_0x1ccaba(0x19d)](_0x5e65c8+'\x20'+_0x2ed28e[_0x1ccaba(0x17c)]+_0x30e975);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{['name']=a32_0x4b25d6(0x1df);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x176);async['execute'](_0x43eeb3){const _0x934704=a32_0x4b25d6,{options:_0x500440,args:_0xe78068,tdx:_0x56ba63}=_0x43eeb3,_0x160570=_0xe78068[0x0]||_0x500440[_0x934704(0x2c4)];if(!_0x160570)return showParentSegmentNotSetError(_0x934704(0x269)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20rt\x20configuration_versions\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Get\x20RT\x20config\x20version\x20for\x20specific\x20parent\x20segment'),0x1;_0x500440[_0x934704(0x2f3)]&&(console['error'](_0x934704(0x322)+_0x500440[_0x934704(0x185)]),console['error']('Parent\x20segment:\x20'+_0x160570));const _0x2349fa=await withSpinner(_0x934704(0x306)+_0x160570+_0x934704(0x30f),()=>_0x56ba63[_0x934704(0x250)]['resolveParentId'](_0x160570),{'verbose':_0x500440[_0x934704(0x2f3)]}),_0x25229f=_0x2349fa[_0x934704(0x13d)],_0x2819fe=await withSpinner(_0x934704(0x2f6)+_0x160570+_0x934704(0x30f),()=>_0x56ba63['realtime']['getCurrentConfigVersion'](_0x25229f),{'verbose':_0x500440['verbose']}),_0x2f1d8e=_0x2819fe[_0x934704(0x13d)];return console[_0x934704(0x1ea)](_0x934704(0x24d)),_0x500440[_0x934704(0x2c6)]==='json'||_0x500440[_0x934704(0x2c6)]===_0x934704(0x1f6)?await handleSDKOutput([_0x2f1d8e],_0x500440):(console['log'](_0x934704(0x310)+_0x2f1d8e['id']),console['log'](_0x934704(0x2d9)+_0x2f1d8e[_0x934704(0x2d8)]),console[_0x934704(0x19d)](_0x934704(0x1c1)+_0x2f1d8e[_0x934704(0x13c)]),console[_0x934704(0x19d)](_0x934704(0x27e)+_0x2f1d8e[_0x934704(0x12e)]),console[_0x934704(0x19d)]('status:\x20'+_0x2f1d8e[_0x934704(0x20e)])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]='ps:pz:service:list';[a32_0x4b25d6(0x291)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async['execute'](_0x45d2ff){const _0xac53f7=a32_0x4b25d6,{options:_0x136111,args:_0x2fcccc,tdx:_0x14a3b2}=_0x45d2ff,_0x932323=_0x2fcccc[0x0]||_0x136111[_0xac53f7(0x2c4)];if(!_0x932323)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a'+_0xac53f7(0x1d9)),0x1;const _0x19927f=await withSpinner(_0xac53f7(0x306)+_0x932323+_0xac53f7(0x30f),()=>_0x14a3b2[_0xac53f7(0x250)][_0xac53f7(0x233)](_0x932323),{'verbose':_0x136111[_0xac53f7(0x2f3)]}),_0x1225e5=_0x19927f[_0xac53f7(0x13d)],_0x43330b=await withSpinner(_0xac53f7(0x163)+_0x932323+_0xac53f7(0x30f),()=>_0x14a3b2[_0xac53f7(0x316)][_0xac53f7(0x1a6)](_0x1225e5),{'verbose':_0x136111[_0xac53f7(0x2f3)]}),_0x5ef7cc=_0x43330b[_0xac53f7(0x13d)];console['error'](_0xac53f7(0x1c8)+_0x5ef7cc[_0xac53f7(0x25c)]+_0xac53f7(0x311)+(_0x5ef7cc['length']!==0x1?'s':''));if(_0x136111[_0xac53f7(0x2c6)]===_0xac53f7(0x18f)||_0x136111['format']===_0xac53f7(0x1f6))await handleSDKOutput(_0x5ef7cc,_0x136111);else{if(_0x5ef7cc[_0xac53f7(0x25c)]===0x0)console[_0xac53f7(0x19d)]('No\x20personalization\x20services\x20configured'),console[_0xac53f7(0x1ea)](a32_0x4ae168[_0xac53f7(0x30c)](_0xac53f7(0x159)));else for(const _0x53830a of _0x5ef7cc){console[_0xac53f7(0x19d)](a32_0x4ae168[_0xac53f7(0x223)](_0x53830a[_0xac53f7(0x17c)])+'\x20'+a32_0x4ae168[_0xac53f7(0x2f5)](_0xac53f7(0x31b)+_0x53830a['id']+')'));_0x53830a['description']&&console[_0xac53f7(0x19d)]('\x20\x20'+a32_0x4ae168['dim'](_0x53830a[_0xac53f7(0x291)]));if(_0x53830a[_0xac53f7(0x2cd)]&&_0x53830a['tokens']['length']>0x0)for(const _0x4282dd of _0x53830a[_0xac53f7(0x2cd)]){const _0x54e9ed=_0x4282dd[_0xac53f7(0x1b2)]?.[_0xac53f7(0x25c)]?_0x4282dd['allowedIps'][_0xac53f7(0x160)](',\x20'):'any';console[_0xac53f7(0x19d)]('\x20\x20'+a32_0x4ae168[_0xac53f7(0x30c)](_0xac53f7(0x17b))+'\x20'+_0x4282dd['name']+'\x20'+a32_0x4ae168[_0xac53f7(0x2f5)](_0xac53f7(0x31b)+_0x4282dd['id']+')')),console[_0xac53f7(0x19d)](_0xac53f7(0x1e7)+a32_0x4ae168[_0xac53f7(0x2f5)]('allowed\x20IPs:')+'\x20'+_0x54e9ed);}else console[_0xac53f7(0x19d)]('\x20\x20'+a32_0x4ae168['dim'](_0xac53f7(0x132)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a32_0x4b25d6(0x1ca);['description']=a32_0x4b25d6(0x15d);async['execute'](_0x4c5fec){const _0x5790d6=a32_0x4b25d6,{options:_0x4a4434,args:_0x484481,tdx:_0x3a873e}=_0x4c5fec,_0x23b9db=_0x4a4434,_0x5315d1=_0x484481[0x0],_0x259cfa=_0x484481[0x1]||_0x4a4434[_0x5790d6(0x2c4)];if(!_0x5315d1)return console[_0x5790d6(0x1ea)]('Error:\x20Service\x20name\x20is\x20required'),console[_0x5790d6(0x1ea)](_0x5790d6(0x32f)),console[_0x5790d6(0x1ea)](_0x5790d6(0x29b)),0x1;if(!_0x259cfa)return showParentSegmentNotSetError(_0x5790d6(0x2f2)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x556daf=await withSpinner(_0x5790d6(0x306)+_0x259cfa+_0x5790d6(0x30f),()=>_0x3a873e[_0x5790d6(0x250)][_0x5790d6(0x233)](_0x259cfa),{'verbose':_0x4a4434[_0x5790d6(0x2f3)]}),_0x4717bc=_0x556daf[_0x5790d6(0x13d)],_0x4d2930={'name':_0x5315d1,'description':_0x23b9db[_0x5790d6(0x291)],'public':_0x23b9db[_0x5790d6(0x21a)]},_0xb0d48b=await withSpinner(_0x5790d6(0x2e3)+_0x5315d1+'\x27...',()=>_0x3a873e[_0x5790d6(0x316)][_0x5790d6(0x173)](_0x4717bc,_0x4d2930),{'verbose':_0x4a4434[_0x5790d6(0x2f3)]}),_0x1d1f64=_0xb0d48b['data'];return console[_0x5790d6(0x1ea)](_0x5790d6(0x164)+_0x1d1f64[_0x5790d6(0x17c)]+_0x5790d6(0x261)+_0x1d1f64['id']),await handleSDKOutput([_0x1d1f64],_0x4a4434),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]='ps:pz:service:show';[a32_0x4b25d6(0x291)]='Show\x20personalization\x20service\x20details';async[a32_0x4b25d6(0x1b0)](_0x4888cb){const _0x57d205=a32_0x4b25d6,{options:_0x125830,args:_0x5dd1be,tdx:_0x5e3f93}=_0x4888cb,_0x536704=_0x5dd1be[0x0],_0x1ad9ee=_0x5dd1be[0x1]||_0x125830[_0x57d205(0x2c4)];if(!_0x536704)return console[_0x57d205(0x1ea)]('Error:\x20Service\x20ID\x20is\x20required'),console['error'](_0x57d205(0x1aa)),console[_0x57d205(0x1ea)](_0x57d205(0x140)),0x1;if(!_0x1ad9ee)return showParentSegmentNotSetError(_0x57d205(0x1c0)+_0x57d205(0x140)),0x1;const _0x455769=await withSpinner(_0x57d205(0x306)+_0x1ad9ee+'\x27...',()=>_0x5e3f93[_0x57d205(0x250)]['resolveParentId'](_0x1ad9ee),{'verbose':_0x125830[_0x57d205(0x2f3)]}),_0x2acacc=_0x455769[_0x57d205(0x13d)],_0x107ee5=await withSpinner(_0x57d205(0x1be)+_0x536704+_0x57d205(0x30f),()=>_0x5e3f93[_0x57d205(0x316)][_0x57d205(0x1c7)](_0x2acacc,_0x536704),{'verbose':_0x125830['verbose']}),_0x32eda2=_0x107ee5[_0x57d205(0x13d)];if(_0x125830[_0x57d205(0x18f)]||_0x125830['jsonl'])await handleSDKOutput([_0x32eda2],_0x125830);else{console['log'](a32_0x4ae168[_0x57d205(0x223)](_0x32eda2[_0x57d205(0x17c)])+'\x20'+a32_0x4ae168[_0x57d205(0x2f5)](_0x57d205(0x31b)+_0x32eda2['id']+')'));_0x32eda2[_0x57d205(0x291)]&&console[_0x57d205(0x19d)]('\x20\x20'+a32_0x4ae168['dim'](_0x32eda2[_0x57d205(0x291)]));console[_0x57d205(0x19d)]('\x20\x20'+a32_0x4ae168[_0x57d205(0x30c)](_0x57d205(0x21f))+'\x20'+(_0x32eda2[_0x57d205(0x21a)]?_0x57d205(0x158):'no'));if(_0x32eda2[_0x57d205(0x2cd)]&&_0x32eda2[_0x57d205(0x2cd)][_0x57d205(0x25c)]>0x0)for(const _0x4c0ebe of _0x32eda2[_0x57d205(0x2cd)]){const _0x2334bd=_0x4c0ebe[_0x57d205(0x1b2)]?.[_0x57d205(0x25c)]?_0x4c0ebe[_0x57d205(0x1b2)]['join'](',\x20'):_0x57d205(0x22b);console['log']('\x20\x20'+a32_0x4ae168[_0x57d205(0x30c)](_0x57d205(0x17b))+'\x20'+_0x4c0ebe[_0x57d205(0x17c)]+'\x20'+a32_0x4ae168[_0x57d205(0x2f5)]('(id:\x20'+_0x4c0ebe['id']+')')),console[_0x57d205(0x19d)]('\x20\x20\x20\x20'+a32_0x4ae168[_0x57d205(0x2f5)](_0x57d205(0x1ec))+'\x20'+_0x2334bd);}else console[_0x57d205(0x19d)]('\x20\x20'+a32_0x4ae168[_0x57d205(0x2f5)](_0x57d205(0x132)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x216);['description']='Delete\x20a\x20personalization\x20service';async[a32_0x4b25d6(0x1b0)](_0x115350){const _0x326a66=a32_0x4b25d6,{options:_0x36f05d,args:_0x4ea18e,tdx:_0x30d63c}=_0x115350,_0x3b71e9=_0x4ea18e[0x0],_0x8b671b=_0x4ea18e[0x1]||_0x36f05d[_0x326a66(0x2c4)];if(!_0x3b71e9)return console['error'](_0x326a66(0x203)),console[_0x326a66(0x1ea)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console[_0x326a66(0x1ea)](_0x326a66(0x25f)),0x1;if(!_0x8b671b)return showParentSegmentNotSetError(_0x326a66(0x279)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x1a0804=await withSpinner(_0x326a66(0x306)+_0x8b671b+_0x326a66(0x30f),()=>_0x30d63c[_0x326a66(0x250)][_0x326a66(0x233)](_0x8b671b),{'verbose':_0x36f05d[_0x326a66(0x2f3)]}),_0x2d0850=_0x1a0804['data'];return await withSpinner(_0x326a66(0x1e0)+_0x3b71e9+_0x326a66(0x30f),()=>_0x30d63c[_0x326a66(0x316)][_0x326a66(0x1d2)](_0x2d0850,_0x3b71e9),{'verbose':_0x36f05d[_0x326a66(0x2f3)]}),console['error'](_0x326a66(0x2ac)+_0x3b71e9+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x292);['description']=a32_0x4b25d6(0x1b8);async[a32_0x4b25d6(0x1b0)](_0x48f5bf){const _0x414d70=a32_0x4b25d6,{options:_0x2dc903,args:_0x549be3,tdx:_0x27f5f9}=_0x48f5bf,_0x5a2819=_0x2dc903,_0x47b8f1=_0x549be3[0x0],_0x437785=_0x549be3[0x1]||_0x2dc903[_0x414d70(0x2c4)];if(!_0x47b8f1)return console[_0x414d70(0x1ea)](_0x414d70(0x203)),console[_0x414d70(0x1ea)](_0x414d70(0x331)),console['error'](_0x414d70(0x24c)),0x1;if(!_0x5a2819[_0x414d70(0x17c)])return console[_0x414d70(0x1ea)]('Error:\x20--name\x20is\x20required'),console[_0x414d70(0x1ea)](_0x414d70(0x331)),0x1;if(!_0x437785)return showParentSegmentNotSetError(_0x414d70(0x235)+_0x414d70(0x24c)),0x1;const _0x3d7faa=await withSpinner(_0x414d70(0x306)+_0x437785+'\x27...',()=>_0x27f5f9['segment'][_0x414d70(0x233)](_0x437785),{'verbose':_0x2dc903['verbose']}),_0x5053dc=_0x3d7faa[_0x414d70(0x13d)],_0x39c810={'name':_0x5a2819[_0x414d70(0x17c)]};_0x5a2819[_0x414d70(0x291)]!==undefined&&(_0x39c810[_0x414d70(0x291)]=_0x5a2819[_0x414d70(0x291)]);const _0xdfb960=await withSpinner(_0x414d70(0x12c)+_0x47b8f1+_0x414d70(0x30f),()=>_0x27f5f9[_0x414d70(0x316)][_0x414d70(0x1cb)](_0x5053dc,_0x47b8f1,_0x39c810),{'verbose':_0x2dc903[_0x414d70(0x2f3)]}),_0x2a1746=_0xdfb960[_0x414d70(0x13d)];return console[_0x414d70(0x1ea)](_0x414d70(0x225)+_0x2a1746[_0x414d70(0x17c)]+'\x27'),await handleSDKOutput([_0x2a1746],_0x2dc903),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x19c);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x304);async[a32_0x4b25d6(0x1b0)](_0x473a81){const _0xf5428c=a32_0x4b25d6,{options:_0x29bd51,args:_0x2f7c2d,tdx:_0x16edc7}=_0x473a81,_0xa90ebc=_0x29bd51,_0x56f12c=_0x2f7c2d[0x0],_0x2d66bf=_0x2f7c2d[0x1],_0x38ffa3=_0x2f7c2d[0x2]||_0x29bd51[_0xf5428c(0x2c4)];if(!_0x56f12c)return console[_0xf5428c(0x1ea)](_0xf5428c(0x192)),console[_0xf5428c(0x1ea)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0xf5428c(0x1ea)](_0xf5428c(0x2bf)),0x1;if(!_0x2d66bf)return console[_0xf5428c(0x1ea)]('Error:\x20Service\x20ID\x20is\x20required'),console[_0xf5428c(0x1ea)](_0xf5428c(0x1f3)),console[_0xf5428c(0x1ea)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x38ffa3)return showParentSegmentNotSetError(_0xf5428c(0x1f5)+_0xf5428c(0x2bf)),0x1;const _0x32b1bf=await withSpinner(_0xf5428c(0x306)+_0x38ffa3+_0xf5428c(0x30f),()=>_0x16edc7[_0xf5428c(0x250)][_0xf5428c(0x233)](_0x38ffa3),{'verbose':_0x29bd51['verbose']}),_0x118981=_0x32b1bf['data'],_0x3f7f50={'name':_0x56f12c};_0xa90ebc[_0xf5428c(0x1b2)]&&(_0x3f7f50[_0xf5428c(0x1b2)]=_0xa90ebc['allowedIps'][_0xf5428c(0x31e)](',')[_0xf5428c(0x1fd)](_0x4f4346=>_0x4f4346[_0xf5428c(0x1f2)]()));_0xa90ebc['description']&&(_0x3f7f50['description']=_0xa90ebc[_0xf5428c(0x291)]);const _0x3b74af=await withSpinner('Creating\x20token\x20\x27'+_0x56f12c+_0xf5428c(0x21b)+_0x2d66bf+'\x27...',()=>_0x16edc7[_0xf5428c(0x316)][_0xf5428c(0x157)](_0x118981,_0x2d66bf,_0x3f7f50),{'verbose':_0x29bd51[_0xf5428c(0x2f3)]}),_0x1451f0=_0x3b74af[_0xf5428c(0x13d)];return console['error'](_0xf5428c(0x150)+_0x1451f0[_0xf5428c(0x17c)]+_0xf5428c(0x261)+_0x1451f0['id']),_0x1451f0[_0xf5428c(0x29c)]&&(console[_0xf5428c(0x1ea)](a32_0x4ae168[_0xf5428c(0x288)](_0xf5428c(0x247))),console['error'](a32_0x4ae168['cyan'](_0x1451f0[_0xf5428c(0x29c)])),console[_0xf5428c(0x1ea)]('')),await handleSDKOutput([_0x1451f0],_0x29bd51),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]='ps:pz:service:token:delete';[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x2b2);async[a32_0x4b25d6(0x1b0)](_0x195265){const _0x52c090=a32_0x4b25d6,{options:_0x4f5838,args:_0x5d8438,tdx:_0x42b6dc}=_0x195265,_0x17a0e5=_0x5d8438[0x0],_0x3c378e=_0x5d8438[0x1]||_0x4f5838[_0x52c090(0x2c4)];if(!_0x17a0e5)return console['error'](_0x52c090(0x153)),console['error'](_0x52c090(0x2d4)),console[_0x52c090(0x1ea)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x3c378e)return showParentSegmentNotSetError(_0x52c090(0x2c9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context'),0x1;const _0x349d6d=await withSpinner(_0x52c090(0x306)+_0x3c378e+'\x27...',()=>_0x42b6dc[_0x52c090(0x250)][_0x52c090(0x233)](_0x3c378e),{'verbose':_0x4f5838[_0x52c090(0x2f3)]}),_0x237a4d=_0x349d6d[_0x52c090(0x13d)],_0x491478=await withSpinner('Finding\x20service\x20for\x20token...',()=>_0x42b6dc[_0x52c090(0x316)]['list'](_0x237a4d),{'verbose':_0x4f5838[_0x52c090(0x2f3)]}),_0x1f70ed=_0x491478[_0x52c090(0x13d)];let _0x43e9b5;for(const _0xb72a7c of _0x1f70ed){if(_0xb72a7c[_0x52c090(0x2cd)]?.[_0x52c090(0x1e1)](_0x115579=>_0x115579['id']===_0x17a0e5)){_0x43e9b5=_0xb72a7c['id'];break;}}if(!_0x43e9b5)return console[_0x52c090(0x1ea)](_0x52c090(0x2ad)+_0x17a0e5+_0x52c090(0x252)),0x1;const _0x23a048=await withSpinner('Deleting\x20token\x20\x27'+_0x17a0e5+_0x52c090(0x30f),()=>_0x42b6dc[_0x52c090(0x316)]['deleteToken'](_0x237a4d,_0x43e9b5,_0x17a0e5),{'verbose':_0x4f5838['verbose']}),_0x553972=_0x23a048[_0x52c090(0x13d)];return console[_0x52c090(0x1ea)](_0x52c090(0x26b)+(_0x553972['name']||_0x17a0e5)+'\x27'),await handleSDKOutput([_0x553972],_0x4f5838),0x0;}}export class PSPzListCommand extends BaseCommand{['name']=a32_0x4b25d6(0x218);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x314);async['execute'](_0x1563e2){const _0x2f2409=a32_0x4b25d6,{options:_0x313421,args:_0x357ed6,tdx:_0x2458e6}=_0x1563e2,_0x30d5a1=_0x357ed6[0x0]||_0x313421[_0x2f2409(0x2c4)];if(!_0x30d5a1)return showParentSegmentNotSetError(_0x2f2409(0x138)+_0x2f2409(0x143)),0x1;const _0x41c9b9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x30d5a1+_0x2f2409(0x30f),()=>_0x2458e6[_0x2f2409(0x250)][_0x2f2409(0x233)](_0x30d5a1),{'verbose':_0x313421[_0x2f2409(0x2f3)]}),_0x59363a=_0x41c9b9[_0x2f2409(0x13d)],_0x4f82be=await withSpinner(_0x2f2409(0x168)+_0x30d5a1+_0x2f2409(0x30f),()=>_0x2458e6[_0x2f2409(0x316)][_0x2f2409(0x264)](_0x59363a),{'verbose':_0x313421[_0x2f2409(0x2f3)]}),_0x2d2b1e=_0x4f82be['data'];console[_0x2f2409(0x1ea)]('✔\x20Found\x20'+_0x2d2b1e[_0x2f2409(0x25c)]+'\x20personalization'+(_0x2d2b1e[_0x2f2409(0x25c)]!==0x1?'s':''));if(_0x313421[_0x2f2409(0x2c6)]===_0x2f2409(0x18f)||_0x313421['format']===_0x2f2409(0x1f6))await handleSDKOutput(_0x2d2b1e,_0x313421);else{if(_0x2d2b1e[_0x2f2409(0x25c)]===0x0)console[_0x2f2409(0x19d)](_0x2f2409(0x2fa));else for(const _0x22c566 of _0x2d2b1e){console[_0x2f2409(0x19d)](a32_0x4ae168['bold'](_0x22c566[_0x2f2409(0x17c)])+'\x20'+a32_0x4ae168[_0x2f2409(0x2f5)](_0x2f2409(0x31b)+_0x22c566['id']+')'));_0x22c566['description']&&console[_0x2f2409(0x19d)]('\x20\x20'+a32_0x4ae168[_0x2f2409(0x2f5)](_0x22c566[_0x2f2409(0x291)]));const _0x51157d=_0x22c566[_0x2f2409(0x1d3)]?.[_0x2f2409(0x25c)]||0x0;console[_0x2f2409(0x19d)]('\x20\x20'+a32_0x4ae168[_0x2f2409(0x30c)](_0x2f2409(0x2aa))+'\x20'+_0x51157d);if(_0x22c566[_0x2f2409(0x1d3)]&&_0x22c566[_0x2f2409(0x1d3)][_0x2f2409(0x25c)]>0x0)for(const _0x4efe46 of _0x22c566['sections']){console[_0x2f2409(0x19d)](_0x2f2409(0x2bc)+_0x4efe46[_0x2f2409(0x17c)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x1ed);['description']='Show\x20a\x20specific\x20realtime\x20personalization';async[a32_0x4b25d6(0x1b0)](_0x24fe59){const _0x522b7e=a32_0x4b25d6,{options:_0x14c0d4,args:_0x882568,tdx:_0x4b5c1d}=_0x24fe59,_0x21fe73=_0x882568[0x0];if(!_0x21fe73)return console[_0x522b7e(0x1ea)](_0x522b7e(0x133)),console[_0x522b7e(0x1ea)](_0x522b7e(0x1a4)),0x1;const _0x231cd9=await withSpinner(_0x522b7e(0x234)+_0x21fe73+_0x522b7e(0x30f),()=>_0x4b5c1d['personalization']['getPersonalization'](_0x21fe73),{'verbose':_0x14c0d4[_0x522b7e(0x2f3)]}),_0x462153=_0x231cd9[_0x522b7e(0x13d)];console[_0x522b7e(0x1ea)](_0x522b7e(0x1af)+_0x462153[_0x522b7e(0x17c)]+'\x27');if(_0x14c0d4[_0x522b7e(0x2c6)]===_0x522b7e(0x18f)||_0x14c0d4[_0x522b7e(0x2c6)]===_0x522b7e(0x1f6))await handleSDKOutput([_0x462153],_0x14c0d4);else{console[_0x522b7e(0x19d)](a32_0x4ae168[_0x522b7e(0x223)](_0x462153['name'])+'\x20'+a32_0x4ae168[_0x522b7e(0x2f5)](_0x522b7e(0x31b)+_0x462153['id']+')'));_0x462153[_0x522b7e(0x291)]&&console[_0x522b7e(0x19d)]('\x20\x20'+a32_0x4ae168['dim'](_0x462153[_0x522b7e(0x291)]));_0x462153['audienceId']&&console[_0x522b7e(0x19d)]('\x20\x20'+a32_0x4ae168[_0x522b7e(0x30c)]('audienceId:')+'\x20'+_0x462153[_0x522b7e(0x2d8)]);console[_0x522b7e(0x19d)]('\x20\x20'+a32_0x4ae168[_0x522b7e(0x30c)](_0x522b7e(0x1f0))+'\x20'+_0x462153[_0x522b7e(0x240)]),console['log']('\x20\x20'+a32_0x4ae168[_0x522b7e(0x30c)]('updated:')+'\x20'+_0x462153['updatedAt']);const _0x374374=_0x462153[_0x522b7e(0x1d3)]?.[_0x522b7e(0x25c)]||0x0;console['log']('\x20\x20'+a32_0x4ae168[_0x522b7e(0x30c)]('sections:')+'\x20'+_0x374374);if(_0x462153[_0x522b7e(0x1d3)]&&_0x462153[_0x522b7e(0x1d3)][_0x522b7e(0x25c)]>0x0)for(const _0x4078f6 of _0x462153['sections']){console['log'](_0x522b7e(0x1e7)+a32_0x4ae168[_0x522b7e(0x223)](_0x4078f6[_0x522b7e(0x17c)])+'\x20'+a32_0x4ae168[_0x522b7e(0x2f5)](_0x522b7e(0x31b)+_0x4078f6['id']+')')),_0x4078f6[_0x522b7e(0x317)]&&(console[_0x522b7e(0x19d)](_0x522b7e(0x287)+a32_0x4ae168[_0x522b7e(0x30c)](_0x522b7e(0x259))+'\x20'+_0x4078f6[_0x522b7e(0x317)]['name']),_0x4078f6[_0x522b7e(0x317)]['keyEventCriteria']?.['keyEventId']&&console['log']('\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x4ae168[_0x522b7e(0x30c)](_0x522b7e(0x136))+'\x20'+_0x4078f6[_0x522b7e(0x317)][_0x522b7e(0x2fc)]['keyEventId'])),_0x4078f6[_0x522b7e(0x198)]&&console['log'](_0x522b7e(0x287)+a32_0x4ae168['cyan'](_0x522b7e(0x13f))+'\x20'+JSON[_0x522b7e(0x232)](_0x4078f6[_0x522b7e(0x198)])),_0x4078f6[_0x522b7e(0x224)]&&console['log'](_0x522b7e(0x287)+a32_0x4ae168[_0x522b7e(0x30c)]('includeSensitive:')+_0x522b7e(0x28f));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x2e4);['description']=a32_0x4b25d6(0x1cc);async['execute'](_0x530b31){const _0x39f7ec=a32_0x4b25d6,{options:_0x23bba2,args:_0x185d0a,tdx:_0x380b4b}=_0x530b31,_0x476750=_0x185d0a[0x0];if(!_0x476750)return console[_0x39f7ec(0x1ea)]('Error:\x20Personalization\x20ID\x20is\x20required'),console[_0x39f7ec(0x1ea)](_0x39f7ec(0x2c7)),0x1;return await withSpinner('Deleting\x20personalization\x20\x27'+_0x476750+'\x27...',()=>_0x380b4b[_0x39f7ec(0x316)][_0x39f7ec(0x2e5)](_0x476750),{'verbose':_0x23bba2['verbose']}),console[_0x39f7ec(0x1ea)]('✔\x20Deleted\x20personalization\x20\x27'+_0x476750+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x251);[a32_0x4b25d6(0x291)]='Create\x20a\x20realtime\x20personalization\x20entity';async[a32_0x4b25d6(0x1b0)](_0x9f1ace){const _0x40acbb=a32_0x4b25d6,{options:_0x5653e1,tdx:_0x43958a}=_0x9f1ace,_0x41d7d5=_0x5653e1;let _0x31a9e2;if(_0x41d7d5['file']){_0x31a9e2=await loadJSON(_0x41d7d5[_0x40acbb(0x1e4)],!![]);if(!_0x31a9e2['relationships']?.['parentFolder'])return console['error'](_0x40acbb(0x230)),console[_0x40acbb(0x1ea)]('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x40acbb(0x1ea)](_0x40acbb(0x1a2)),0x1;}else{if(!_0x41d7d5[_0x40acbb(0x17c)])return console[_0x40acbb(0x1ea)]('Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console[_0x40acbb(0x1ea)](_0x40acbb(0x23f)),console[_0x40acbb(0x1ea)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x41d7d5[_0x40acbb(0x291)]===undefined)return console[_0x40acbb(0x1ea)](_0x40acbb(0x16b)),console[_0x40acbb(0x1ea)](_0x40acbb(0x23f)),console['error'](_0x40acbb(0x1fb)),0x1;if(_0x41d7d5['folderId']===undefined)return console[_0x40acbb(0x1ea)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console['error'](_0x40acbb(0x1b1)),0x1;let _0x2326ca=_0x41d7d5['audienceId'];if(!_0x2326ca&&_0x5653e1['parentSegment']){const _0x2424c4=await withSpinner(_0x40acbb(0x306)+_0x5653e1[_0x40acbb(0x2c4)]+_0x40acbb(0x30f),()=>_0x43958a['segment'][_0x40acbb(0x233)](_0x5653e1[_0x40acbb(0x2c4)]),{'verbose':_0x5653e1['verbose']});_0x2326ca=_0x2424c4[_0x40acbb(0x13d)];}let _0x4c079a;_0x41d7d5['sections']&&(_0x4c079a=await loadJSON(_0x41d7d5[_0x40acbb(0x1d3)],![]));const _0x4cea88=_0x41d7d5[_0x40acbb(0x1d6)]===_0x40acbb(0x2da)?null:{'id':_0x41d7d5['folderId'],'type':_0x40acbb(0x294)};_0x31a9e2={'attributes':{'name':_0x41d7d5[_0x40acbb(0x17c)],'description':_0x41d7d5[_0x40acbb(0x291)]||null,..._0x2326ca!==undefined&&{'audienceId':_0x2326ca},..._0x4c079a!==undefined&&{'sections':_0x4c079a}},'relationships':{'parentFolder':{'data':_0x4cea88}}};}const _0x1a8dc0=await withSpinner(_0x40acbb(0x20b)+(_0x31a9e2[_0x40acbb(0x12d)]?.[_0x40acbb(0x17c)]??'')+_0x40acbb(0x30f),()=>_0x43958a[_0x40acbb(0x316)][_0x40acbb(0x2e9)](_0x31a9e2),{'verbose':_0x5653e1[_0x40acbb(0x2f3)]}),_0x462ce9=_0x1a8dc0['data'];return console['error'](_0x40acbb(0x1f4)+_0x462ce9[_0x40acbb(0x17c)]+'\x27\x20with\x20ID:\x20'+_0x462ce9['id']),await handleSDKOutput([_0x462ce9],_0x5653e1),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x19f);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x1a8);async[a32_0x4b25d6(0x1b0)](_0x58122a){const _0x505f74=a32_0x4b25d6,{options:_0x545171,args:_0x35c8b2}=_0x58122a,_0xd1b91b=_0x545171,_0x4a9282=_0x35c8b2[0x0];if(!_0x4a9282)return console[_0x505f74(0x1ea)](_0x505f74(0x133)),console[_0x505f74(0x1ea)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),console[_0x505f74(0x1ea)](_0x505f74(0x19a)),0x1;let _0x183167;if(_0xd1b91b['file'])_0x183167=await loadJSON(_0xd1b91b['file'],!![]);else{if(!_0xd1b91b['name'])return console[_0x505f74(0x1ea)](_0x505f74(0x13e)),console[_0x505f74(0x1ea)](_0x505f74(0x2ee)),0x1;if(_0xd1b91b[_0x505f74(0x291)]===undefined)return console[_0x505f74(0x1ea)](_0x505f74(0x16b)),console[_0x505f74(0x1ea)]('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;let _0x377855;_0xd1b91b[_0x505f74(0x1d3)]&&(_0x377855=await loadJSON(_0xd1b91b[_0x505f74(0x1d3)],![])),_0x183167={'attributes':{'name':_0xd1b91b[_0x505f74(0x17c)],'description':_0xd1b91b[_0x505f74(0x291)]||null,..._0x377855!==undefined&&{'sections':_0x377855}}};}const {tdx:_0x3fdf3a}=_0x58122a,_0x253eb5=await withSpinner(_0x505f74(0x178)+_0x4a9282+_0x505f74(0x30f),()=>_0x3fdf3a[_0x505f74(0x316)][_0x505f74(0x2c1)](_0x4a9282,_0x183167),{'verbose':_0x545171[_0x505f74(0x2f3)]}),_0x4f1589=_0x253eb5[_0x505f74(0x13d)];return console[_0x505f74(0x1ea)]('✔\x20Updated\x20personalization\x20\x27'+_0x4f1589[_0x505f74(0x17c)]+'\x27\x20(id:\x20'+_0x4f1589['id']+')'),await handleSDKOutput([_0x4f1589],_0x545171),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{[a32_0x4b25d6(0x17c)]=a32_0x4b25d6(0x23c);[a32_0x4b25d6(0x291)]=a32_0x4b25d6(0x201);async['execute'](_0x5b1793){const _0x346450=a32_0x4b25d6,{options:_0x3d079e,args:_0x375f8c}=_0x5b1793,_0x4c3068=_0x375f8c[0x0]||_0x3d079e[_0x346450(0x2c4)];if(!_0x4c3068)return showParentSegmentNotSetError(_0x346450(0x337)+_0x346450(0x1cd)),0x1;const _0x31f771=resolveYamlFile(_0x4c3068);if(!existsSync(_0x31f771))return showFileNotFoundError(_0x31f771,_0x4c3068),0x1;let _0x439b75;try{_0x439b75=readFileSync(_0x31f771,_0x346450(0x137));}catch(_0x1fbb9e){const _0x403767=_0x1fbb9e instanceof Error?_0x1fbb9e[_0x346450(0x282)]:String(_0x1fbb9e);return console['error']('Error\x20reading\x20file:\x20'+_0x403767),0x1;}let _0x4efde7;try{_0x4efde7=parseDef(_0x439b75);}catch(_0x5e60ea){const _0x5500ef=_0x5e60ea instanceof Error?_0x5e60ea[_0x346450(0x282)]:String(_0x5e60ea);return console[_0x346450(0x1ea)](a32_0x4ae168['red'](_0x346450(0x16e)+_0x5500ef)),0x1;}if(_0x4efde7['personalization_services']&&_0x4efde7[_0x346450(0x242)][_0x346450(0x25c)]>0x0)return console[_0x346450(0x1ea)](a32_0x4ae168[_0x346450(0x288)](_0x346450(0x2a4)+_0x31f771)),console[_0x346450(0x1ea)](a32_0x4ae168[_0x346450(0x2f5)](_0x346450(0x271)+_0x4efde7[_0x346450(0x242)][_0x346450(0x25c)]+_0x346450(0x1c9))),0x1;!_0x4efde7['realtime']&&(_0x4efde7[_0x346450(0x1ff)]={'events':[{'name':'page_view','source_table':_0x346450(0x2a3)}],'attributes':[{'name':_0x346450(0x222),'type':'single'}],'id_stitching':{'primary_key':_0x4efde7[_0x346450(0x213)][_0x346450(0x262)]===_0x346450(0x32a)?_0x346450(0x190):_0x346450(0x2ff)}});_0x4efde7[_0x346450(0x242)]=[{'name':_0x346450(0x156),'description':_0x346450(0x1c2),'trigger_event':_0x346450(0x336),'sections':[{'name':'Default','criteria':'true','attributes':[_0x346450(0x222)]}]}];const _0x395e4b=serializeDef(_0x4efde7);return writeFileSync(_0x31f771,_0x395e4b,_0x346450(0x137)),console[_0x346450(0x1ea)](a32_0x4ae168[_0x346450(0x24e)]('✔')+_0x346450(0x1bc)+a32_0x4ae168[_0x346450(0x30c)](_0x31f771)),(!_0x4efde7[_0x346450(0x1ff)]||_0x439b75[_0x346450(0x2de)]('realtime:')===-0x1)&&console[_0x346450(0x1ea)](a32_0x4ae168['green']('✔')+'\x20Added\x20RT\x202.0\x20template\x20section'),console[_0x346450(0x1ea)]('\x0a'+a32_0x4ae168[_0x346450(0x2f5)](_0x346450(0x308))),console['error'](_0x346450(0x1de)+_0x31f771+_0x346450(0x2bb)),console['error'](_0x346450(0x18c)+a32_0x4ae168[_0x346450(0x2f5)](_0x346450(0x1e8)+_0x4c3068)+_0x346450(0x23e)),0x0;}}
|
|
1
|
+
const a32_0x3c5e89=a32_0x375c;(function(_0x1c4495,_0x48ef97){const _0x469c25=a32_0x375c,_0x48e98b=_0x1c4495();while(!![]){try{const _0x3e6dee=parseInt(_0x469c25(0x2d5))/0x1*(-parseInt(_0x469c25(0x2af))/0x2)+parseInt(_0x469c25(0x348))/0x3+-parseInt(_0x469c25(0x1ec))/0x4*(parseInt(_0x469c25(0x30e))/0x5)+-parseInt(_0x469c25(0x2fa))/0x6*(parseInt(_0x469c25(0x1db))/0x7)+parseInt(_0x469c25(0x29f))/0x8+parseInt(_0x469c25(0x226))/0x9+parseInt(_0x469c25(0x244))/0xa;if(_0x3e6dee===_0x48ef97)break;else _0x48e98b['push'](_0x48e98b['shift']());}catch(_0x4c7b42){_0x48e98b['push'](_0x48e98b['shift']());}}}(a32_0x3f58,0x72e66));import{writeFileSync,readFileSync,existsSync,mkdirSync,renameSync,statSync}from'fs';import{spawn}from'child_process';import a32_0x40546c 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 a32_0x54ffbd 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='parent_segment';function openBrowser(_0xe51b24){const _0x4259e7=a32_0x375c,_0x514744=process[_0x4259e7(0x1bd)],_0x59ae1a=_0x514744==='darwin'?_0x4259e7(0x2ea):_0x514744===_0x4259e7(0x3aa)?_0x4259e7(0x357):_0x4259e7(0x354);spawn(_0x59ae1a,[_0xe51b24],{'detached':!![],'stdio':_0x4259e7(0x219)})[_0x4259e7(0x2bf)]();}function migrateLegacyDirectory(){const _0x3dd9e8=a32_0x375c;if(!existsSync(LEGACY_PARENT_SEGMENT_DIR))return![];const _0x5cc545=statSync(LEGACY_PARENT_SEGMENT_DIR);if(!_0x5cc545[_0x3dd9e8(0x306)]())return![];if(existsSync(PARENT_SEGMENT_DIR))return console[_0x3dd9e8(0x3bd)](a32_0x54ffbd['yellow'](_0x3dd9e8(0x2bb)+LEGACY_PARENT_SEGMENT_DIR+_0x3dd9e8(0x2f5)+PARENT_SEGMENT_DIR+'/\x20directories\x20exist.')),console[_0x3dd9e8(0x3bd)](a32_0x54ffbd[_0x3dd9e8(0x2f6)](_0x3dd9e8(0x1b3)+LEGACY_PARENT_SEGMENT_DIR+'/\x20directory.\x0a')),![];console[_0x3dd9e8(0x3bd)](a32_0x54ffbd[_0x3dd9e8(0x24d)](_0x3dd9e8(0x23e)+LEGACY_PARENT_SEGMENT_DIR+_0x3dd9e8(0x379)+PARENT_SEGMENT_DIR+'/\x0a'));try{return renameSync(LEGACY_PARENT_SEGMENT_DIR,PARENT_SEGMENT_DIR),console['error'](a32_0x54ffbd[_0x3dd9e8(0x1d8)](_0x3dd9e8(0x338)+PARENT_SEGMENT_DIR+'/\x0a')),!![];}catch(_0x2e093e){const _0x2eda69=_0x2e093e instanceof Error?_0x2e093e['message']:String(_0x2e093e);return console[_0x3dd9e8(0x3bd)](a32_0x54ffbd[_0x3dd9e8(0x2cb)](_0x3dd9e8(0x249)+_0x2eda69+'\x0a')),![];}}class BaseParentSegmentCommand extends BaseCommand{async[a32_0x3c5e89(0x3b1)](_0x1d0867){const _0x1e2348=a32_0x3c5e89;return migrateLegacyDirectory(),super[_0x1e2348(0x3b1)](_0x1d0867);}}function resolveYamlFile(_0x3a5ffa){const _0x2bdaff=a32_0x3c5e89;if(_0x3a5ffa[_0x2bdaff(0x3b2)](_0x2bdaff(0x352))||_0x3a5ffa[_0x2bdaff(0x3b2)](_0x2bdaff(0x2d8)))return _0x3a5ffa;return a32_0x40546c[_0x2bdaff(0x296)](PARENT_SEGMENT_DIR,sanitizeFileName(_0x3a5ffa)+_0x2bdaff(0x352));}function formatProgressMessage(_0x799410){const _0x3f192b=a32_0x3c5e89,_0x194be9=_0x799410['match'](/^(.+?):\s*(.+?)(\s*\(.+\))?$/);if(_0x194be9){const [,_0xb718e1,_0x262c11,_0xd3ac2f='']=_0x194be9;return a32_0x54ffbd[_0x3f192b(0x2f6)](_0xb718e1+':')+'\x20'+_0x262c11+a32_0x54ffbd['dim'](_0xd3ac2f);}return a32_0x54ffbd[_0x3f192b(0x2f6)](_0x799410);}function showFileNotFoundError(_0x1f9476,_0x1cb354){const _0x42e107=a32_0x3c5e89;console[_0x42e107(0x3bd)](a32_0x54ffbd[_0x42e107(0x2cb)](_0x42e107(0x286)+_0x1f9476+'\x0a')),console[_0x42e107(0x3bd)](a32_0x54ffbd[_0x42e107(0x30f)](_0x42e107(0x398)+_0x1cb354+'`\x20to\x20download\x20the\x20configuration\x20first'));}function displayRealtimeValidation(_0x4c588e){const _0x4a1ab3=a32_0x3c5e89;if(!_0x4c588e[_0x4a1ab3(0x1f1)])return;const _0x35dbd6=_0x4c588e[_0x4a1ab3(0x1f1)],_0x14514c=_0x35dbd6[_0x4a1ab3(0x1c8)]?a32_0x54ffbd[_0x4a1ab3(0x1d8)]('⚡\x20Enabled'):a32_0x54ffbd[_0x4a1ab3(0x24d)](_0x4a1ab3(0x1dc));console[_0x4a1ab3(0x3bd)]('\x0a'+a32_0x54ffbd[_0x4a1ab3(0x2f6)](_0x4a1ab3(0x27a))+'\x20'+_0x14514c);if(_0x35dbd6['events']&&_0x35dbd6[_0x4a1ab3(0x218)][_0x4a1ab3(0x30a)]>0x0){console[_0x4a1ab3(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x4a1ab3(0x2f6)](_0x4a1ab3(0x1e9))+'\x20'+_0x35dbd6['events'][_0x4a1ab3(0x30a)]+_0x4a1ab3(0x290));for(const _0x50c62f of _0x35dbd6[_0x4a1ab3(0x218)]){const _0x48b535=_0x50c62f[_0x4a1ab3(0x201)]===![]?a32_0x54ffbd[_0x4a1ab3(0x2cb)]('✘'):a32_0x54ffbd[_0x4a1ab3(0x1d8)]('✔');console[_0x4a1ab3(0x3bd)](_0x4a1ab3(0x308)+_0x48b535+'\x20'+_0x50c62f[_0x4a1ab3(0x37d)]),_0x50c62f[_0x4a1ab3(0x35e)]&&console['error'](_0x4a1ab3(0x1de)+a32_0x54ffbd[_0x4a1ab3(0x2cb)](_0x50c62f[_0x4a1ab3(0x35e)]));}}if(_0x35dbd6[_0x4a1ab3(0x370)]&&_0x35dbd6[_0x4a1ab3(0x370)]['length']>0x0){console['error']('\x20\x20'+a32_0x54ffbd[_0x4a1ab3(0x2f6)](_0x4a1ab3(0x2ec))+'\x20'+_0x35dbd6['attributes'][_0x4a1ab3(0x30a)]+'\x20configured');for(const _0x3e1bc1 of _0x35dbd6[_0x4a1ab3(0x370)]){const _0x2369e5=_0x3e1bc1[_0x4a1ab3(0x323)]?a32_0x54ffbd[_0x4a1ab3(0x1d8)]('✔'):a32_0x54ffbd['red']('✘');console[_0x4a1ab3(0x3bd)]('\x20\x20\x20\x20'+_0x2369e5+'\x20'+_0x3e1bc1[_0x4a1ab3(0x37d)]+'\x20'+a32_0x54ffbd['dim']('('+_0x3e1bc1[_0x4a1ab3(0x1b4)]+')'));}}if(_0x35dbd6[_0x4a1ab3(0x3a4)]){const _0x16c5ee=_0x35dbd6['idStitching'][_0x4a1ab3(0x37b)]?.[_0x4a1ab3(0x30a)]?_0x4a1ab3(0x1e3)+_0x35dbd6[_0x4a1ab3(0x3a4)][_0x4a1ab3(0x37b)][_0x4a1ab3(0x296)](',\x20')+']':'';console[_0x4a1ab3(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x4a1ab3(0x2f6)]('ID\x20Stitching:')+'\x20'+_0x35dbd6['idStitching'][_0x4a1ab3(0x39b)]+_0x16c5ee);}if(_0x35dbd6['personalizationServices']&&_0x35dbd6[_0x4a1ab3(0x23d)][_0x4a1ab3(0x30a)]>0x0){console[_0x4a1ab3(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x4a1ab3(0x2f6)](_0x4a1ab3(0x2b1))+'\x20'+_0x35dbd6[_0x4a1ab3(0x23d)]['length']+_0x4a1ab3(0x2b8)+(_0x35dbd6[_0x4a1ab3(0x23d)][_0x4a1ab3(0x30a)]!==0x1?'s':''));for(const _0x19a399 of _0x35dbd6[_0x4a1ab3(0x23d)]){console['error'](_0x4a1ab3(0x2f0)+_0x19a399[_0x4a1ab3(0x37d)]);}}}function showParentSegmentNotSetError(_0x2e96d2){const _0x5dae1b=a32_0x3c5e89;console[_0x5dae1b(0x3bd)](a32_0x54ffbd[_0x5dae1b(0x24d)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20ps\x20use\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x5dae1b(0x3bd)](_0x2e96d2);}export class ParentSegmentListCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x261);['description']=a32_0x3c5e89(0x222);async['execute'](_0x7b08b0){const _0x3d093e=a32_0x3c5e89,{options:_0x114dd4,args:_0x43d808,tdx:_0x5e472}=_0x7b08b0,_0x30e870=_0x43d808[0x0];_0x114dd4['verbose']&&(console[_0x3d093e(0x3bd)](_0x3d093e(0x39e)+_0x114dd4[_0x3d093e(0x1d1)]),_0x30e870&&console[_0x3d093e(0x3bd)](_0x3d093e(0x35f)+_0x30e870));const _0x5f5dda=await withSpinner(_0x30e870?_0x3d093e(0x24c)+_0x30e870+_0x3d093e(0x288):'Listing\x20parent\x20segments...',()=>_0x5e472[_0x3d093e(0x1f3)][_0x3d093e(0x298)](),{'verbose':_0x114dd4['verbose']});let _0x222dba=_0x5f5dda[_0x3d093e(0x1ad)];if(_0x30e870){const _0x4eb04d=_0x30e870[_0x3d093e(0x3bf)](/[.+^${}()|[\]\\]/g,_0x3d093e(0x391))[_0x3d093e(0x3bf)](/\*/g,'.*')[_0x3d093e(0x3bf)](/\?/g,'.'),_0x45a5b6=new RegExp('^'+_0x4eb04d+'$','i');_0x222dba=_0x222dba[_0x3d093e(0x2d1)](_0x5e98aa=>_0x45a5b6[_0x3d093e(0x2fd)](_0x5e98aa[_0x3d093e(0x370)]['name']));}_0x222dba[_0x3d093e(0x385)]((_0xcda5a9,_0x5b985a)=>_0xcda5a9['attributes'][_0x3d093e(0x37d)][_0x3d093e(0x20d)](_0x5b985a[_0x3d093e(0x370)][_0x3d093e(0x37d)])),console[_0x3d093e(0x3bd)]('✔\x20Found\x20'+_0x222dba[_0x3d093e(0x30a)]+_0x3d093e(0x39a)+(_0x222dba[_0x3d093e(0x30a)]!==0x1?'s':''));const _0x7ddb9c=_0x41c1b5=>{const _0x3d4976=_0x3d093e;return getConsoleNextUrl(_0x114dd4[_0x3d4976(0x1d1)],_0x3d4976(0x24f)+_0x41c1b5);};if(_0x114dd4['format']===_0x3d093e(0x2e5)||_0x114dd4[_0x3d093e(0x3b3)]===_0x3d093e(0x1ae)){const _0x4b7ca5=_0x222dba[_0x3d093e(0x383)](_0x168064=>({..._0x168064,'url':_0x7ddb9c(_0x168064['id'])}));await handleSDKOutput(_0x4b7ca5,_0x114dd4);}else{if(_0x222dba[_0x3d093e(0x30a)]===0x0)_0x30e870?console[_0x3d093e(0x2c0)](_0x3d093e(0x2ac)+_0x30e870):console[_0x3d093e(0x2c0)](_0x3d093e(0x37e));else for(const _0x31bc10 of _0x222dba){const _0x5de175=_0x31bc10['attributes'][_0x3d093e(0x38c)]?a32_0x54ffbd[_0x3d093e(0x2f6)]('\x20('+formatRows(_0x31bc10[_0x3d093e(0x370)][_0x3d093e(0x38c)])+')'):'',_0xd084df=hyperlink(_0x31bc10[_0x3d093e(0x370)]['name'],_0x7ddb9c(_0x31bc10['id']));console[_0x3d093e(0x2c0)](_0x3d093e(0x34f)+_0xd084df+_0x5de175);}}return 0x0;}}export class ParentSegmentCreateCommand extends BaseCommand{['name']=a32_0x3c5e89(0x267);[a32_0x3c5e89(0x297)]='Create\x20new\x20parent\x20segment\x20(audience)\x20[DEPRECATED]';async['execute'](_0x288ac5){const _0x319bbc=a32_0x3c5e89,{options:_0x57726e,args:_0xce66be,tdx:_0x3a3cc3}=_0x288ac5;console['error'](_0x319bbc(0x2c2)+_0x319bbc(0x3b0)+_0x319bbc(0x22d));const _0x1d61d4=_0x57726e;if(_0xce66be[_0x319bbc(0x30a)]===0x0)return console[_0x319bbc(0x3bd)](a32_0x54ffbd[_0x319bbc(0x2cb)](_0x319bbc(0x2e1))),console[_0x319bbc(0x3bd)](_0x319bbc(0x2c7)),0x1;const _0x28e070=_0xce66be[0x0];if(!_0x1d61d4[_0x319bbc(0x279)]||!_0x1d61d4[_0x319bbc(0x20a)])return console[_0x319bbc(0x3bd)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x319bbc(0x3bd)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;_0x1d61d4[_0x319bbc(0x387)]&&(console[_0x319bbc(0x3bd)](_0x319bbc(0x39e)+_0x1d61d4[_0x319bbc(0x1d1)]),console['error'](_0x319bbc(0x202)+_0x28e070),console[_0x319bbc(0x3bd)](_0x319bbc(0x2d9)+_0x1d61d4[_0x319bbc(0x279)]),console[_0x319bbc(0x3bd)](_0x319bbc(0x2b5)+_0x1d61d4[_0x319bbc(0x20a)]));const _0x1bc6c1=await loadJSONFromOptions(_0x1d61d4[_0x319bbc(0x370)],_0x1d61d4[_0x319bbc(0x1e4)]),_0x2f4f40=await loadJSONFromOptions(_0x1d61d4['behaviors'],_0x1d61d4[_0x319bbc(0x275)]),_0x29e902=await loadJSONFromOptions(_0x1d61d4['customerGroup'],_0x1d61d4[_0x319bbc(0x1c2)]),_0x2c6e31={'name':_0x28e070,'description':_0x1d61d4['description'],'scheduleType':_0x1d61d4[_0x319bbc(0x299)],'scheduleOption':_0x1d61d4[_0x319bbc(0x349)],'timezone':_0x1d61d4['timezone'],'master':{'parentDatabaseName':_0x1d61d4[_0x319bbc(0x279)],'parentTableName':_0x1d61d4['table']},'attributes':_0x1bc6c1,'behaviors':_0x2f4f40,'customerGroup':_0x29e902},_0x5e6538=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x28e070+_0x319bbc(0x288),()=>_0x3a3cc3['segment'][_0x319bbc(0x272)](_0x2c6e31),{'verbose':_0x57726e[_0x319bbc(0x387)]}),_0x1bcc31=_0x5e6538[_0x319bbc(0x1ad)];return console[_0x319bbc(0x3bd)](_0x319bbc(0x2b2)+_0x1bcc31[_0x319bbc(0x37d)]+_0x319bbc(0x1c6)+_0x1bcc31['id']),await handleSDKOutput([_0x1bcc31],_0x57726e),0x0;}}function a32_0x375c(_0x319ef4,_0x3a718a){_0x319ef4=_0x319ef4-0x199;const _0x3f581f=a32_0x3f58();let _0x375c4b=_0x3f581f[_0x319ef4];return _0x375c4b;}export class ParentSegmentUpdateCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x2a7);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x382);async[a32_0x3c5e89(0x2ce)](_0x2fc34a){const _0x504f5a=a32_0x3c5e89,{options:_0x17b669,args:_0x194323,tdx:_0x59b50a}=_0x2fc34a;console['error']('\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20update`\x20is\x20deprecated.\x0a'+_0x504f5a(0x3b0)+_0x504f5a(0x22d));const _0x64c126=_0x17b669;if(_0x194323['length']===0x0)return console[_0x504f5a(0x3bd)](a32_0x54ffbd[_0x504f5a(0x2cb)](_0x504f5a(0x2e1))),console[_0x504f5a(0x3bd)]('Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'),0x1;const _0x97184a=_0x194323[0x0];_0x64c126[_0x504f5a(0x387)]&&(console['error'](_0x504f5a(0x39e)+_0x64c126[_0x504f5a(0x1d1)]),console[_0x504f5a(0x3bd)](_0x504f5a(0x2c9)+_0x97184a));const _0x4f0ba2=await withSpinner(_0x504f5a(0x34d)+_0x97184a+_0x504f5a(0x288),()=>_0x59b50a[_0x504f5a(0x1f3)][_0x504f5a(0x24a)](_0x97184a),{'verbose':_0x64c126[_0x504f5a(0x387)]}),_0x56524a=_0x4f0ba2[_0x504f5a(0x1ad)],_0x297be4=await loadJSONFromOptions(_0x64c126[_0x504f5a(0x314)],_0x64c126[_0x504f5a(0x231)]),_0x10e3bd=await loadJSONFromOptions(_0x64c126['addBehaviors'],_0x64c126[_0x504f5a(0x2e0)]),_0x1b42fc={'name':_0x56524a[_0x504f5a(0x37d)],'description':_0x64c126[_0x504f5a(0x297)]!==undefined?_0x64c126[_0x504f5a(0x297)]:_0x56524a[_0x504f5a(0x297)],'scheduleType':_0x64c126[_0x504f5a(0x299)]!==undefined?_0x64c126['scheduleType']:_0x56524a[_0x504f5a(0x299)],'scheduleOption':_0x64c126[_0x504f5a(0x349)]!==undefined?_0x64c126[_0x504f5a(0x349)]:_0x56524a[_0x504f5a(0x349)],'timezone':_0x64c126[_0x504f5a(0x247)]!==undefined?_0x64c126['timezone']:_0x56524a[_0x504f5a(0x247)],'master':_0x56524a[_0x504f5a(0x1d3)],'attributes':_0x297be4?[..._0x56524a['attributes']||[],..._0x297be4]:_0x56524a[_0x504f5a(0x370)],'behaviors':_0x10e3bd?[..._0x56524a[_0x504f5a(0x27f)]||[],..._0x10e3bd]:_0x56524a[_0x504f5a(0x27f)],'customerGroup':_0x56524a[_0x504f5a(0x36e)]},_0x230d4b=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x97184a+_0x504f5a(0x288),()=>_0x59b50a['segment'][_0x504f5a(0x3a0)](_0x97184a,_0x1b42fc),{'verbose':_0x64c126[_0x504f5a(0x387)]}),_0x463d6d=_0x230d4b[_0x504f5a(0x1ad)];return console['error']('✔\x20Updated\x20parent\x20segment\x20\x27'+_0x463d6d['name']+'\x27'),await handleSDKOutput([_0x463d6d],_0x64c126),0x0;}}export class ParentSegmentPullCommand extends BaseParentSegmentCommand{['name']='segment:parent:pull';[a32_0x3c5e89(0x297)]='Pull\x20parent\x20segment\x20configuration\x20to\x20YAML\x20file';async['execute'](_0x144593){const _0x4777c8=a32_0x3c5e89,{options:_0x181626,args:_0x142d18,tdx:_0x50ed2b}=_0x144593,_0x5b9cf3=_0x181626,_0x419def=_0x142d18[0x0]||_0x181626[_0x4777c8(0x1bc)];if(!_0x419def)return showParentSegmentNotSetError(_0x4777c8(0x255)+_0x4777c8(0x20e)),0x1;if(_0x5b9cf3[_0x4777c8(0x363)]&&_0x5b9cf3[_0x4777c8(0x22e)])return console[_0x4777c8(0x3bd)](a32_0x54ffbd['red']('Error:\x20-u\x20(--use)\x20and\x20-o\x20(--output)\x20cannot\x20be\x20used\x20together\x0a')),console[_0x4777c8(0x3bd)](a32_0x54ffbd['dim']('The\x20-u\x20flag\x20sets\x20the\x20context\x20to\x20the\x20pulled\x20segment,\x20which\x20requires')),console['error'](a32_0x54ffbd[_0x4777c8(0x2f6)](_0x4777c8(0x1d6)+PARENT_SEGMENT_DIR+_0x4777c8(0x34b))),console['error'](a32_0x54ffbd[_0x4777c8(0x30f)](_0x4777c8(0x200))),0x1;const _0x56e192=_0x5b9cf3[_0x4777c8(0x22e)]||a32_0x40546c['join'](PARENT_SEGMENT_DIR,sanitizeFileName(_0x419def)+_0x4777c8(0x352));_0x5b9cf3[_0x4777c8(0x387)]&&(console[_0x4777c8(0x3bd)](_0x4777c8(0x39e)+_0x5b9cf3[_0x4777c8(0x1d1)]),console[_0x4777c8(0x3bd)](_0x4777c8(0x2c9)+_0x419def),console[_0x4777c8(0x3bd)](_0x4777c8(0x2e7)+_0x56e192));const _0x477305=await withSpinner('Fetching\x20parent\x20segment\x20\x27'+_0x419def+_0x4777c8(0x288),()=>_0x50ed2b[_0x4777c8(0x1f3)][_0x4777c8(0x1b6)](_0x419def),{'verbose':_0x5b9cf3[_0x4777c8(0x387)]}),_0x51411f=_0x477305[_0x4777c8(0x1ad)];if(existsSync(_0x56e192)){const _0x1004ca=readFileSync(_0x56e192,_0x4777c8(0x36a)),_0x1d2807=generateDiff(_0x1004ca,_0x51411f);if(!hasChanges(_0x1d2807))console[_0x4777c8(0x3bd)](a32_0x54ffbd[_0x4777c8(0x1d8)]('✔')+_0x4777c8(0x1fd)+a32_0x54ffbd[_0x4777c8(0x30f)](_0x56e192)+_0x4777c8(0x3a3));else{console[_0x4777c8(0x3bd)](_0x4777c8(0x3a8)+_0x56e192+'\x27:'),console['error']('─'['repeat'](0x3c)),console['error'](formatDiffWithColors(_0x1d2807)),console['error']('─'[_0x4777c8(0x346)](0x3c));if(!_0x5b9cf3[_0x4777c8(0x3ab)]){if(!isInteractive())return console[_0x4777c8(0x3bd)](a32_0x54ffbd[_0x4777c8(0x2cb)](_0x4777c8(0x2ee)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4777c8(0x3bd)](a32_0x54ffbd['dim'](_0x4777c8(0x28d))),0x1;const _0x3d76da=await confirmKey(_0x4777c8(0x2b7)+_0x56e192+'\x27?');if(!_0x3d76da)return console[_0x4777c8(0x3bd)](a32_0x54ffbd['yellow'](_0x4777c8(0x264))),0x1;}writeFileSync(_0x56e192,_0x51411f,_0x4777c8(0x36a)),console[_0x4777c8(0x3bd)](a32_0x54ffbd['green']('✔')+_0x4777c8(0x1fc)+a32_0x54ffbd[_0x4777c8(0x30f)](_0x56e192));}}else{const _0x45aaf4=a32_0x40546c[_0x4777c8(0x212)](_0x56e192);!existsSync(_0x45aaf4)&&mkdirSync(_0x45aaf4,{'recursive':!![]}),writeFileSync(_0x56e192,_0x51411f,_0x4777c8(0x36a)),console[_0x4777c8(0x3bd)](a32_0x54ffbd['green']('✔')+_0x4777c8(0x1fc)+a32_0x54ffbd[_0x4777c8(0x30f)](_0x56e192));}return saveSessionContext({'parent_segment':_0x419def},_0x5b9cf3[_0x4777c8(0x367)]),console[_0x4777c8(0x3bd)](a32_0x54ffbd[_0x4777c8(0x1d8)]('✔')+_0x4777c8(0x38e)+a32_0x54ffbd[_0x4777c8(0x2f6)](_0x4777c8(0x2c5))+_0x4777c8(0x343)+a32_0x54ffbd[_0x4777c8(0x30f)](_0x419def)),0x0;}}export class ParentSegmentPushCommand extends BaseParentSegmentCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x380);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x1ff);async['execute'](_0x373e38){const _0x20fd63=a32_0x3c5e89,{options:_0x497f2c,args:_0x3d7f8d,tdx:_0x31d87e}=_0x373e38,_0x301139=_0x497f2c,_0x3e5280=_0x3d7f8d[0x0]||_0x497f2c[_0x20fd63(0x1bc)];if(!_0x3e5280)return showParentSegmentNotSetError(_0x20fd63(0x2f4)+_0x20fd63(0x1e8)),0x1;const _0x4682c2=resolveYamlFile(_0x3e5280);if(!existsSync(_0x4682c2))return showFileNotFoundError(_0x4682c2,_0x3e5280),0x1;_0x301139['verbose']&&(console[_0x20fd63(0x3bd)]('Site:\x20'+_0x301139[_0x20fd63(0x1d1)]),console['error']('YAML\x20file:\x20'+_0x4682c2));let _0x9499e6;try{_0x9499e6=readFileSync(_0x4682c2,_0x20fd63(0x36a));}catch(_0x172d89){const _0x409743=_0x172d89 instanceof Error?_0x172d89[_0x20fd63(0x2fe)]:String(_0x172d89);return console[_0x20fd63(0x3bd)]('Error\x20reading\x20file:\x20'+_0x409743),0x1;}const _0x374c87=await withSpinner('Analyzing\x20changes...',()=>_0x31d87e[_0x20fd63(0x1f3)][_0x20fd63(0x2b4)](_0x9499e6),{'verbose':_0x301139[_0x20fd63(0x387)]}),_0x14af30=_0x374c87[_0x20fd63(0x1ad)],{isNew:_0x47d9a3,name:_0x21d253,hasChanges:_0x2932ea,diffFormatted:_0x3375b6}=_0x14af30;if(!_0x2932ea)return console['error']('✔\x20No\x20changes\x20-\x20\x27'+_0x21d253+_0x20fd63(0x1d7)),0x0;_0x47d9a3?console[_0x20fd63(0x3bd)]('\x0aNew\x20parent\x20segment\x20\x27'+_0x21d253+'\x27:'):console[_0x20fd63(0x3bd)](_0x20fd63(0x350)+_0x21d253+'\x27:');console[_0x20fd63(0x3bd)]('─'['repeat'](0x3c)),console['error'](_0x3375b6),console['error']('─'[_0x20fd63(0x346)](0x3c));const _0x391502=_0x47d9a3?_0x20fd63(0x239)+_0x21d253+'\x27?':_0x20fd63(0x1df)+_0x21d253+'\x27?';if(!_0x301139['yes']){if(!isInteractive())return console['error'](a32_0x54ffbd['red']('\x0aError:'),_0x20fd63(0x248)),console[_0x20fd63(0x3bd)](a32_0x54ffbd[_0x20fd63(0x2f6)](_0x20fd63(0x28d))),0x1;const _0x29de44=await confirmKey(_0x391502);if(!_0x29de44)return console[_0x20fd63(0x3bd)](a32_0x54ffbd[_0x20fd63(0x24d)](_0x20fd63(0x264))),0x1;}const _0x5ec933=_0x47d9a3?_0x20fd63(0x22f):_0x20fd63(0x28b),_0x3abdbe=await withSpinner(_0x5ec933+_0x20fd63(0x25b)+_0x21d253+_0x20fd63(0x288),()=>_0x14af30[_0x20fd63(0x2c3)](),{'verbose':_0x301139[_0x20fd63(0x387)]}),_0x24df4a=_0x3abdbe[_0x20fd63(0x1ad)],_0x113670=getConsoleNextUrl(_0x301139[_0x20fd63(0x1d1)],_0x20fd63(0x24f)+_0x24df4a['id']),_0x591f07=_0x47d9a3?_0x20fd63(0x1f7):_0x20fd63(0x3a9);return console['error']('✔\x20'+_0x591f07+_0x20fd63(0x25b)+_0x24df4a[_0x20fd63(0x37d)]+'\x27'),console[_0x20fd63(0x3bd)]('\x20\x20'+_0x113670),0x0;}}export class ParentSegmentValidateCommand extends BaseParentSegmentCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x2b9);[a32_0x3c5e89(0x297)]='Validate\x20parent\x20segment\x20YAML\x20configuration\x20and\x20show\x20statistics';async[a32_0x3c5e89(0x2ce)](_0x35af0a){const _0x419c36=a32_0x3c5e89,{options:_0x173ab9,args:_0x3c803c,tdx:_0x36815f}=_0x35af0a,_0x54c122=_0x173ab9,_0x5b8909=_0x3c803c[0x0]||_0x173ab9['parentSegment'];if(!_0x5b8909)return showParentSegmentNotSetError(_0x419c36(0x1c1)+_0x419c36(0x1a3)+_0x419c36(0x1b2)+'\x20\x20--attribute\x20[name]\x20\x20\x20Show\x20only\x20attributes\x20(or\x20specific\x20one)\x0a'+_0x419c36(0x28f)+_0x419c36(0x1b7)),0x1;const _0x3f1ea2=resolveYamlFile(_0x5b8909);if(!existsSync(_0x3f1ea2))return showFileNotFoundError(_0x3f1ea2,_0x5b8909),0x1;_0x54c122[_0x419c36(0x387)]&&(console['error'](_0x419c36(0x39e)+_0x54c122[_0x419c36(0x1d1)]),console[_0x419c36(0x3bd)](_0x419c36(0x389)+_0x3f1ea2));let _0x5573e1;try{_0x5573e1=readFileSync(_0x3f1ea2,_0x419c36(0x36a));}catch(_0x1d7f06){const _0x129932=_0x1d7f06 instanceof Error?_0x1d7f06[_0x419c36(0x2fe)]:String(_0x1d7f06);return console[_0x419c36(0x3bd)](_0x419c36(0x37a)+_0x129932),0x1;}const _0x4fd48a=createCommandSpinner(a32_0x54ffbd[_0x419c36(0x2f6)](_0x419c36(0x1e1)),{'verbose':_0x54c122['verbose']});_0x4fd48a['start']();const _0x3ceb05={'onProgress':_0x443e09=>{const _0x4a9e61=_0x419c36;_0x4fd48a[_0x4a9e61(0x26e)]=formatProgressMessage(_0x443e09);}};if(_0x54c122['master'])_0x3ceb05[_0x419c36(0x1d3)]=!![];if(_0x54c122['enriched'])_0x3ceb05[_0x419c36(0x34c)]=!![];_0x54c122['attribute']&&(_0x3ceb05[_0x419c36(0x2a0)]=_0x54c122[_0x419c36(0x2a0)]);_0x54c122[_0x419c36(0x312)]&&(_0x3ceb05['behavior']=_0x54c122['behavior']);if(_0x54c122['interval'])_0x3ceb05[_0x419c36(0x3b7)]=_0x54c122[_0x419c36(0x3b7)];let _0x184aba;try{_0x184aba=await _0x36815f[_0x419c36(0x1f3)][_0x419c36(0x1c7)](_0x5573e1,_0x3ceb05),_0x4fd48a[_0x419c36(0x3ba)]();}catch(_0x591e4a){_0x4fd48a[_0x419c36(0x3ba)]();throw _0x591e4a;}const _0x2ebe03=_0x54c122['interval']||'-1d';return this[_0x419c36(0x2ff)](_0x184aba,_0x3ceb05,_0x3f1ea2,_0x2ebe03),_0x184aba['allValid']?0x0:0x1;}[a32_0x3c5e89(0x2ff)](_0x3b1d7d,_0x1e2dab,_0x20df4d,_0x40f3ba){const _0x1826c7=a32_0x3c5e89;console['error']('\x0a'+a32_0x54ffbd[_0x1826c7(0x1be)]('Validate:')+'\x20'+_0x3b1d7d[_0x1826c7(0x37d)]),console['error']('═'['repeat'](0x3c)),this[_0x1826c7(0x294)](_0x3b1d7d);if(typeof _0x1e2dab[_0x1826c7(0x2a0)]===_0x1826c7(0x26b)){this[_0x1826c7(0x378)](_0x3b1d7d),this[_0x1826c7(0x1ce)](_0x3b1d7d),this['displayPreviewHints'](_0x20df4d,_0x40f3ba,_0x1826c7(0x2a0),_0x1e2dab[_0x1826c7(0x2a0)]);return;}if(_0x1e2dab[_0x1826c7(0x2a0)]===!![]){this[_0x1826c7(0x378)](_0x3b1d7d),this['displaySummary'](_0x3b1d7d),this['displayPreviewHints'](_0x20df4d,_0x40f3ba,_0x1826c7(0x370));return;}if(typeof _0x1e2dab[_0x1826c7(0x312)]===_0x1826c7(0x26b)){this[_0x1826c7(0x29b)](_0x3b1d7d,_0x40f3ba),this[_0x1826c7(0x1ce)](_0x3b1d7d),this[_0x1826c7(0x2a1)](_0x20df4d,_0x40f3ba,_0x1826c7(0x312),_0x1e2dab['behavior']);return;}if(_0x1e2dab[_0x1826c7(0x312)]===!![]){this['displayBehaviorsStats'](_0x3b1d7d,_0x40f3ba),this['displaySummary'](_0x3b1d7d),this[_0x1826c7(0x2a1)](_0x20df4d,_0x40f3ba,_0x1826c7(0x27f));return;}this[_0x1826c7(0x378)](_0x3b1d7d),this[_0x1826c7(0x29b)](_0x3b1d7d,_0x40f3ba),this[_0x1826c7(0x2cc)](_0x3b1d7d),this['displaySummary'](_0x3b1d7d),this['displayPreviewHints'](_0x20df4d,_0x40f3ba,_0x1826c7(0x307));}[a32_0x3c5e89(0x2cc)](_0x433c6a){displayRealtimeValidation(_0x433c6a);}[a32_0x3c5e89(0x2a1)](_0x505eb3,_0x2aa122,_0x590177,_0x23ed63){const _0x520b53=a32_0x3c5e89;console[_0x520b53(0x3bd)]('\x0a'+a32_0x54ffbd[_0x520b53(0x2f6)](_0x520b53(0x1bf)));const _0x3c88a7=_0x2aa122!==_0x520b53(0x394)?_0x520b53(0x2fb)+_0x2aa122:'';if(_0x590177==='attribute'&&_0x23ed63)console['error']('\x20\x20'+a32_0x54ffbd['dim'](_0x520b53(0x295)+_0x505eb3+_0x520b53(0x213)+_0x23ed63+'\x22'+_0x3c88a7));else{if(_0x590177==='behavior'&&_0x23ed63)console['error']('\x20\x20'+a32_0x54ffbd[_0x520b53(0x2f6)](_0x520b53(0x295)+_0x505eb3+'\x20--behavior\x20\x22'+_0x23ed63+'\x22'+_0x3c88a7));else(_0x590177===_0x520b53(0x370)||_0x590177===_0x520b53(0x307))&&console[_0x520b53(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x520b53(0x2f6)](_0x520b53(0x295)+_0x505eb3+_0x520b53(0x1ca)+_0x3c88a7));}(_0x590177==='behaviors'||_0x590177===_0x520b53(0x307))&&console[_0x520b53(0x3bd)]('\x20\x20'+a32_0x54ffbd['dim'](_0x520b53(0x295)+_0x505eb3+_0x520b53(0x3b5)+_0x3c88a7)),_0x590177===_0x520b53(0x307)&&console[_0x520b53(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x520b53(0x2f6)](_0x520b53(0x295)+_0x505eb3+_0x520b53(0x280)+_0x3c88a7));}[a32_0x3c5e89(0x294)](_0x3f5b67){const _0x312a6a=a32_0x3c5e89,{master:_0x2a0ed5}=_0x3f5b67,_0x3aeea0=_0x2a0ed5[_0x312a6a(0x396)]?a32_0x54ffbd[_0x312a6a(0x1d8)]('✔'):a32_0x54ffbd[_0x312a6a(0x2cb)]('✘');console['error']('\x0a'+a32_0x54ffbd[_0x312a6a(0x2f6)]('Master\x20Table')),console[_0x312a6a(0x3bd)](_0x3aeea0+'\x20'+a32_0x54ffbd[_0x312a6a(0x1be)](_0x2a0ed5[_0x312a6a(0x279)]+'.'+_0x2a0ed5[_0x312a6a(0x20a)])),_0x2a0ed5['schemaValid']?_0x2a0ed5[_0x312a6a(0x2fc)]!==undefined&&console[_0x312a6a(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x312a6a(0x2f6)](_0x312a6a(0x2a5))+'\x20'+a32_0x54ffbd[_0x312a6a(0x30f)](formatRows(_0x2a0ed5[_0x312a6a(0x2fc)]))):console[_0x312a6a(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x312a6a(0x2cb)]('Error:')+'\x20'+_0x2a0ed5[_0x312a6a(0x1e2)]);}[a32_0x3c5e89(0x378)](_0x4a3bac){const _0x31cdae=a32_0x3c5e89;if(_0x4a3bac[_0x31cdae(0x370)][_0x31cdae(0x30a)]===0x0)return;console['error']('\x0a'+a32_0x54ffbd['dim'](_0x31cdae(0x28a)));for(const _0x34b31f of _0x4a3bac[_0x31cdae(0x370)]){const _0x9b32bc=_0x34b31f[_0x31cdae(0x396)]?a32_0x54ffbd[_0x31cdae(0x1d8)]('✔'):a32_0x54ffbd[_0x31cdae(0x2cb)]('✘');let _0x46026a='';if(_0x34b31f[_0x31cdae(0x396)]&&_0x34b31f[_0x31cdae(0x336)]!==undefined&&_0x34b31f[_0x31cdae(0x3b4)]!==undefined){const _0x6c6f93=_0x34b31f['coveragePercent']['toFixed'](0x1),_0x24ef7f=_0x34b31f[_0x31cdae(0x3b4)]>=0x50?a32_0x54ffbd[_0x31cdae(0x1d8)]:_0x34b31f[_0x31cdae(0x3b4)]>=0x32?a32_0x54ffbd[_0x31cdae(0x24d)]:a32_0x54ffbd[_0x31cdae(0x2cb)];_0x46026a='\x20'+a32_0x54ffbd[_0x31cdae(0x2f6)](_0x31cdae(0x39c))+'\x20'+_0x24ef7f(_0x6c6f93+'%')+'\x20('+formatRows(_0x34b31f[_0x31cdae(0x336)])+_0x31cdae(0x31a);}console[_0x31cdae(0x3bd)](_0x9b32bc+'\x20'+a32_0x54ffbd['bold'](_0x34b31f[_0x31cdae(0x37d)])+_0x46026a),console[_0x31cdae(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x31cdae(0x2f6)](_0x31cdae(0x1af))+'\x20'+a32_0x54ffbd['bold'](_0x34b31f[_0x31cdae(0x279)]+'.'+_0x34b31f[_0x31cdae(0x20a)]));const _0x1d9e9d=_0x34b31f[_0x31cdae(0x1e6)]===_0x34b31f['foreignKey']?a32_0x54ffbd[_0x31cdae(0x2f6)](_0x31cdae(0x366))+'\x20'+_0x34b31f[_0x31cdae(0x1e6)]:a32_0x54ffbd[_0x31cdae(0x2f6)](_0x31cdae(0x34e))+'\x20'+_0x34b31f[_0x31cdae(0x1e6)]+'\x20=\x20'+_0x34b31f[_0x31cdae(0x2f3)];console['error']('\x20\x20'+_0x1d9e9d),console[_0x31cdae(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x31cdae(0x2f6)]('Columns:')),this[_0x31cdae(0x1d2)](_0x34b31f[_0x31cdae(0x22a)]),!_0x34b31f[_0x31cdae(0x396)]&&console[_0x31cdae(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x31cdae(0x2cb)](_0x31cdae(0x2c1))+'\x20'+_0x34b31f[_0x31cdae(0x1e2)]);}}[a32_0x3c5e89(0x29b)](_0xd04912,_0x211f0d){const _0x3329c3=a32_0x3c5e89;if(_0xd04912['behaviors'][_0x3329c3(0x30a)]===0x0)return;console[_0x3329c3(0x3bd)]('\x0a'+a32_0x54ffbd[_0x3329c3(0x2f6)](_0x3329c3(0x257))+'\x20'+a32_0x54ffbd['dim']('('+_0x211f0d+')'));for(const _0x25b153 of _0xd04912[_0x3329c3(0x27f)]){const _0x28b5fb=_0x25b153[_0x3329c3(0x396)]?a32_0x54ffbd[_0x3329c3(0x1d8)]('✔'):a32_0x54ffbd[_0x3329c3(0x2cb)]('✘');let _0x319feb='';if(_0x25b153['schemaValid']&&_0x25b153['customersWithEvents']!==undefined&&_0x25b153['totalEvents']!==undefined){const _0x4a5100=_0x25b153['customerPercent']?.[_0x3329c3(0x33a)](0x1)||'?',_0x8f55e2=(_0x25b153[_0x3329c3(0x1c4)]??0x0)>=0x32?a32_0x54ffbd['green']:(_0x25b153[_0x3329c3(0x1c4)]??0x0)>=0x14?a32_0x54ffbd[_0x3329c3(0x24d)]:a32_0x54ffbd[_0x3329c3(0x2cb)];_0x319feb='\x20'+a32_0x54ffbd[_0x3329c3(0x2f6)]('Customers:')+'\x20'+_0x8f55e2(formatRows(_0x25b153['customersWithEvents']))+'\x20('+_0x4a5100+_0x3329c3(0x265)+a32_0x54ffbd['dim']('Events:')+'\x20'+a32_0x54ffbd['cyan'](formatRows(_0x25b153['totalEvents']));}console[_0x3329c3(0x3bd)](_0x28b5fb+'\x20'+a32_0x54ffbd[_0x3329c3(0x1be)](_0x25b153[_0x3329c3(0x37d)])+_0x319feb),console[_0x3329c3(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x3329c3(0x2f6)](_0x3329c3(0x1af))+'\x20'+a32_0x54ffbd[_0x3329c3(0x1be)](_0x25b153[_0x3329c3(0x279)]+'.'+_0x25b153[_0x3329c3(0x20a)]));const _0x44610b=_0x25b153[_0x3329c3(0x1e6)]===_0x25b153[_0x3329c3(0x2f3)]?a32_0x54ffbd[_0x3329c3(0x2f6)](_0x3329c3(0x366))+'\x20'+_0x25b153[_0x3329c3(0x1e6)]:a32_0x54ffbd['dim'](_0x3329c3(0x34e))+'\x20'+_0x25b153[_0x3329c3(0x1e6)]+_0x3329c3(0x343)+_0x25b153[_0x3329c3(0x2f3)];console[_0x3329c3(0x3bd)]('\x20\x20'+_0x44610b),console[_0x3329c3(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x3329c3(0x2f6)](_0x3329c3(0x2ae))),this[_0x3329c3(0x1d2)](_0x25b153['columns']),!_0x25b153[_0x3329c3(0x396)]&&console[_0x3329c3(0x3bd)]('\x20\x20'+a32_0x54ffbd['red'](_0x3329c3(0x2c1))+'\x20'+_0x25b153[_0x3329c3(0x1e2)]);}}[a32_0x3c5e89(0x1d2)](_0x5c118e){const _0x14793d=a32_0x3c5e89;for(const _0x343647 of _0x5c118e){_0x343647[_0x14793d(0x31e)]===_0x343647[_0x14793d(0x25e)]||_0x343647[_0x14793d(0x25e)]==='*'?console[_0x14793d(0x3bd)](_0x14793d(0x2f0)+_0x343647[_0x14793d(0x31e)]):console['error'](_0x14793d(0x2f0)+_0x343647['label']+'\x20'+a32_0x54ffbd[_0x14793d(0x2f6)]('('+_0x343647[_0x14793d(0x25e)]+')'));}}[a32_0x3c5e89(0x1ce)](_0x593e58){const _0x443614=a32_0x3c5e89;console[_0x443614(0x3bd)]('─'[_0x443614(0x346)](0x3c));if(_0x593e58[_0x443614(0x1b5)][_0x443614(0x30a)]>0x0){console[_0x443614(0x3bd)]('\x0a'+a32_0x54ffbd[_0x443614(0x2cb)](_0x443614(0x236)));for(const _0xa6ffdc of _0x593e58[_0x443614(0x1b5)]){console[_0x443614(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x443614(0x2cb)]('•')+'\x20'+_0xa6ffdc);}}_0x593e58[_0x443614(0x224)]&&console[_0x443614(0x3bd)]('\x0a'+a32_0x54ffbd[_0x443614(0x1d8)]('✔')+_0x443614(0x25f));}}export class ParentSegmentPreviewCommand extends BaseParentSegmentCommand{['name']=a32_0x3c5e89(0x2b3);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x2e8);async[a32_0x3c5e89(0x2ce)](_0x28f6a8){const _0x2d49f0=a32_0x3c5e89,{options:_0x486962,args:_0x364641,tdx:_0x462bd4}=_0x28f6a8,_0x490a5d=_0x486962,_0x5421ec=_0x364641[0x0]||_0x486962[_0x2d49f0(0x1bc)];if(!_0x5421ec)return showParentSegmentNotSetError(_0x2d49f0(0x328)+_0x2d49f0(0x29c)+'Options\x20(one\x20required):\x0a'+_0x2d49f0(0x369)+'\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute\x0a'+_0x2d49f0(0x1a9)+_0x2d49f0(0x31f)+'\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)'),0x1;if(!_0x490a5d[_0x2d49f0(0x1d3)]&&!_0x490a5d[_0x2d49f0(0x2a0)]&&!_0x490a5d[_0x2d49f0(0x312)]&&!_0x490a5d[_0x2d49f0(0x34c)])return console[_0x2d49f0(0x3bd)](a32_0x54ffbd[_0x2d49f0(0x2cb)](_0x2d49f0(0x1ba))),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x27d)),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x259)),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x371)),console['error']('\x20\x20--attribute\x20<name>\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20attribute'),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x375)),console[_0x2d49f0(0x3bd)]('\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data'),0x1;const _0x57106b=resolveYamlFile(_0x5421ec);if(!existsSync(_0x57106b))return showFileNotFoundError(_0x57106b,_0x5421ec),0x1;_0x490a5d['verbose']&&(console['error'](_0x2d49f0(0x39e)+_0x490a5d[_0x2d49f0(0x1d1)]),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x389)+_0x57106b));let _0x3fdd04;try{_0x3fdd04=readFileSync(_0x57106b,_0x2d49f0(0x36a));}catch(_0x39018b){const _0x570ccd=_0x39018b instanceof Error?_0x39018b[_0x2d49f0(0x2fe)]:String(_0x39018b);return console[_0x2d49f0(0x3bd)]('Error\x20reading\x20file:\x20'+_0x570ccd),0x1;}let _0x337bd3;try{_0x337bd3=parseDef(_0x3fdd04);}catch(_0x1c3f75){const _0x16136d=_0x1c3f75 instanceof Error?_0x1c3f75[_0x2d49f0(0x2fe)]:String(_0x1c3f75);return console['error'](a32_0x54ffbd['red']('Error\x20parsing\x20YAML:\x20'+_0x16136d)),0x1;}if(_0x490a5d[_0x2d49f0(0x2a0)]===!![]||_0x490a5d['attribute']===''){const _0x2f2bce=_0x337bd3['attributes']?.[_0x2d49f0(0x383)](_0x13af7b=>_0x13af7b[_0x2d49f0(0x37d)])||[];if(_0x2f2bce[_0x2d49f0(0x30a)]===0x0)console[_0x2d49f0(0x3bd)](a32_0x54ffbd[_0x2d49f0(0x2cb)]('Error:\x20No\x20attributes\x20defined\x20in\x20configuration'));else{console['error'](a32_0x54ffbd[_0x2d49f0(0x2cb)](_0x2d49f0(0x1ac))),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x390));for(const _0xb56d6e of _0x2f2bce){console[_0x2d49f0(0x3bd)]('\x20\x20'+a32_0x54ffbd['cyan'](_0xb56d6e));}console[_0x2d49f0(0x3bd)](_0x2d49f0(0x26a)+_0x5421ec+_0x2d49f0(0x213)+_0x2f2bce[0x0]+'\x22');}return 0x1;}if(_0x490a5d[_0x2d49f0(0x312)]===!![]||_0x490a5d[_0x2d49f0(0x312)]===''){const _0x216521=_0x337bd3[_0x2d49f0(0x27f)]?.[_0x2d49f0(0x383)](_0x4f3066=>_0x4f3066['name'])||[];if(_0x216521[_0x2d49f0(0x30a)]===0x0)console[_0x2d49f0(0x3bd)](a32_0x54ffbd['red'](_0x2d49f0(0x38f)));else{console[_0x2d49f0(0x3bd)](a32_0x54ffbd[_0x2d49f0(0x2cb)](_0x2d49f0(0x237))),console[_0x2d49f0(0x3bd)](_0x2d49f0(0x344));for(const _0x343259 of _0x216521){console[_0x2d49f0(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x2d49f0(0x30f)](_0x343259));}console[_0x2d49f0(0x3bd)](_0x2d49f0(0x26a)+_0x5421ec+'\x20--behavior\x20\x22'+_0x216521[0x0]+'\x22');}return 0x1;}const _0x3ab379=createCommandSpinner(a32_0x54ffbd[_0x2d49f0(0x2f6)](_0x2d49f0(0x30b)),{'verbose':_0x490a5d[_0x2d49f0(0x387)]});_0x3ab379[_0x2d49f0(0x357)]();const _0x6c8a49={'onProgress':_0x424f73=>{_0x3ab379['text']=formatProgressMessage(_0x424f73);}};if(_0x490a5d['master'])_0x6c8a49[_0x2d49f0(0x1d3)]=!![];if(_0x490a5d[_0x2d49f0(0x2a0)]&&typeof _0x490a5d['attribute']===_0x2d49f0(0x26b))_0x6c8a49[_0x2d49f0(0x2a0)]=_0x490a5d[_0x2d49f0(0x2a0)];if(_0x490a5d[_0x2d49f0(0x312)]&&typeof _0x490a5d[_0x2d49f0(0x312)]==='string')_0x6c8a49[_0x2d49f0(0x312)]=_0x490a5d[_0x2d49f0(0x312)];if(_0x490a5d['enriched'])_0x6c8a49['enriched']=!![];if(_0x490a5d[_0x2d49f0(0x3b7)])_0x6c8a49['interval']=_0x490a5d['interval'];let _0x3c4dab;try{_0x3c4dab=await _0x462bd4[_0x2d49f0(0x1f3)][_0x2d49f0(0x364)](_0x3fdd04,_0x6c8a49),_0x3ab379[_0x2d49f0(0x3ba)]();}catch(_0x54ace7){_0x3ab379[_0x2d49f0(0x3ba)]();throw _0x54ace7;}return await this[_0x2d49f0(0x355)](_0x3c4dab,{'master':_0x490a5d[_0x2d49f0(0x1d3)],'attribute':typeof _0x490a5d[_0x2d49f0(0x2a0)]===_0x2d49f0(0x26b)?_0x490a5d['attribute']:undefined,'behavior':typeof _0x490a5d['behavior']===_0x2d49f0(0x26b)?_0x490a5d[_0x2d49f0(0x312)]:undefined,'enriched':_0x490a5d['enriched']}),_0x3c4dab[_0x2d49f0(0x224)]?0x0:0x1;}async[a32_0x3c5e89(0x355)](_0x323817,_0x560b32){const _0xc08153=a32_0x3c5e89;console[_0xc08153(0x3bd)]('\x0a'+a32_0x54ffbd[_0xc08153(0x1be)](_0xc08153(0x220))+'\x20'+_0x323817[_0xc08153(0x37d)]),console[_0xc08153(0x3bd)]('═'[_0xc08153(0x346)](0x3c));if(_0x560b32['master']&&_0x323817['sampleData']){const _0x17e718=a32_0x54ffbd[_0xc08153(0x2f6)](_0xc08153(0x207))+'\x20'+a32_0x54ffbd[_0xc08153(0x1be)](_0x323817[_0xc08153(0x1d3)][_0xc08153(0x279)]+'.'+_0x323817[_0xc08153(0x1d3)][_0xc08153(0x20a)]);await this[_0xc08153(0x2eb)](_0x17e718,_0x323817[_0xc08153(0x333)]);}else{if(_0x560b32[_0xc08153(0x2a0)]&&_0x323817[_0xc08153(0x333)]){const _0x211140=a32_0x54ffbd['dim'](_0xc08153(0x335))+'\x20'+a32_0x54ffbd[_0xc08153(0x1be)](_0x560b32[_0xc08153(0x2a0)]);await this['displaySampleData'](_0x211140,_0x323817[_0xc08153(0x333)]);}else{if(_0x560b32[_0xc08153(0x312)]&&_0x323817[_0xc08153(0x333)]){const _0x1280d6=a32_0x54ffbd['dim']('Behavior:')+'\x20'+a32_0x54ffbd[_0xc08153(0x1be)](_0x560b32[_0xc08153(0x312)]);await this['displaySampleData'](_0x1280d6,_0x323817['sampleData']);}else{if(_0x560b32[_0xc08153(0x34c)]&&_0x323817[_0xc08153(0x333)]){const _0x2b05bb=a32_0x54ffbd['dim']('Enriched:')+'\x20'+a32_0x54ffbd[_0xc08153(0x1be)](_0xc08153(0x37f));await this['displaySampleData'](_0x2b05bb,_0x323817[_0xc08153(0x333)]);}else!_0x323817[_0xc08153(0x333)]&&console[_0xc08153(0x3bd)](_0xc08153(0x278));}}}if(_0x323817[_0xc08153(0x1b5)][_0xc08153(0x30a)]>0x0){console[_0xc08153(0x3bd)]('─'[_0xc08153(0x346)](0x3c)),console[_0xc08153(0x3bd)]('\x0a'+a32_0x54ffbd[_0xc08153(0x2cb)]('Errors:'));for(const _0x335be1 of _0x323817[_0xc08153(0x1b5)]){console['error']('\x20\x20'+a32_0x54ffbd[_0xc08153(0x2cb)]('•')+'\x20'+_0x335be1);}}}async[a32_0x3c5e89(0x2eb)](_0x3245b9,_0x190dfb){const _0x4f3a07=a32_0x3c5e89;if(_0x190dfb[_0x4f3a07(0x30a)]===0x0){console['error']('\x0a'+_0x3245b9),console[_0x4f3a07(0x3bd)](_0x4f3a07(0x332));return;}console[_0x4f3a07(0x3bd)]('\x0a'+_0x3245b9);const _0x11cef0=Object[_0x4f3a07(0x33f)](_0x190dfb[0x0])[_0x4f3a07(0x383)](_0x4d25b8=>({'name':_0x4d25b8,'type':typeof _0x190dfb[0x0][_0x4d25b8]===_0x4f3a07(0x34a)?_0x4f3a07(0x2e6):'varchar'})),_0x32a8d6={'queryId':_0x4f3a07(0x19a),'columns':_0x11cef0,'data':_0x190dfb,'stats':{'state':_0x4f3a07(0x282),'queued':![],'scheduled':![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x190dfb['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}},_0x171e17=formatAsTable(_0x32a8d6,_0x190dfb[_0x4f3a07(0x30a)],!![]);await writeOutput(_0x171e17,undefined,_0x4f3a07(0x20a));}}export class ParentSegmentRunCommand extends BaseParentSegmentCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x254);[a32_0x3c5e89(0x297)]='Run\x20parent\x20segment\x20workflow\x20(pushes\x20YAML\x20if\x20exists)';async['execute'](_0x38f340){const _0x5e899d=a32_0x3c5e89,{options:_0x2d079d,args:_0x384bbf,tdx:_0x1aec68}=_0x38f340,_0x2c34d4=_0x2d079d,_0x3c9f0e=_0x384bbf[0x0]||_0x2d079d[_0x5e899d(0x1bc)];if(!_0x3c9f0e)return showParentSegmentNotSetError(_0x5e899d(0x1d4)+_0x5e899d(0x1cd)),0x1;const _0x22b00c=resolveYamlFile(_0x3c9f0e);if(existsSync(_0x22b00c)){_0x2c34d4[_0x5e899d(0x387)]&&console['error']('Found\x20YAML\x20file:\x20'+_0x22b00c);let _0x1b0454;try{_0x1b0454=readFileSync(_0x22b00c,_0x5e899d(0x36a));}catch(_0x2338c3){const _0x1f710e=_0x2338c3 instanceof Error?_0x2338c3[_0x5e899d(0x2fe)]:String(_0x2338c3);return console[_0x5e899d(0x3bd)](_0x5e899d(0x37a)+_0x1f710e),0x1;}const _0x5ce4d0=await withSpinner('Analyzing\x20changes...',()=>_0x1aec68['segment'][_0x5e899d(0x2b4)](_0x1b0454),{'verbose':_0x2c34d4['verbose']}),_0xe00236=_0x5ce4d0[_0x5e899d(0x1ad)],{isNew:_0x3e020a,name:_0x3a632f,hasChanges:_0x5b9e23,diffFormatted:_0x42f012}=_0xe00236;if(_0x5b9e23){_0x3e020a?console['error'](_0x5e899d(0x19d)+_0x3a632f+'\x27:'):console[_0x5e899d(0x3bd)](_0x5e899d(0x350)+_0x3a632f+'\x27:');console['error']('─'[_0x5e899d(0x346)](0x3c)),console[_0x5e899d(0x3bd)](_0x42f012),console[_0x5e899d(0x3bd)]('─'['repeat'](0x3c));const _0x3e61d2=_0x3e020a?_0x5e899d(0x239)+_0x3a632f+'\x27\x20and\x20run\x20workflow?':_0x5e899d(0x1df)+_0x3a632f+_0x5e899d(0x2cf);if(!_0x2c34d4[_0x5e899d(0x3ab)]){if(!isInteractive())return console[_0x5e899d(0x3bd)](a32_0x54ffbd[_0x5e899d(0x2cb)](_0x5e899d(0x2ee)),_0x5e899d(0x248)),console[_0x5e899d(0x3bd)](a32_0x54ffbd[_0x5e899d(0x2f6)](_0x5e899d(0x28d))),0x1;const _0x30c458=await confirmKey(_0x3e61d2);if(!_0x30c458)return console[_0x5e899d(0x3bd)](a32_0x54ffbd[_0x5e899d(0x24d)](_0x5e899d(0x264))),0x1;}const _0x4a24a3=_0x3e020a?'Creating':_0x5e899d(0x28b);await withSpinner(_0x4a24a3+_0x5e899d(0x25b)+_0x3a632f+_0x5e899d(0x288),()=>_0xe00236[_0x5e899d(0x2c3)](),{'verbose':_0x2c34d4[_0x5e899d(0x387)]});const _0x3d255f=_0x3e020a?_0x5e899d(0x1f7):'Updated';console[_0x5e899d(0x3bd)]('✔\x20'+_0x3d255f+_0x5e899d(0x25b)+_0x3a632f+'\x27');}else console[_0x5e899d(0x3bd)](_0x5e899d(0x199)+_0x3a632f+'\x27\x20is\x20up\x20to\x20date');}const _0x407b0a=await withSpinner('Running\x20parent\x20segment\x20workflow\x20for\x20\x27'+_0x3c9f0e+'\x27...',()=>_0x1aec68[_0x5e899d(0x1f3)]['runParent'](_0x3c9f0e),{'verbose':_0x2c34d4[_0x5e899d(0x387)]}),_0x2d3a54=_0x407b0a[_0x5e899d(0x1ad)],_0x1a52a2=getConsoleUrl(_0x2c34d4['site'],_0x5e899d(0x1ed)+_0x2d3a54[_0x5e899d(0x2ca)]+_0x5e899d(0x3b6)+_0x2d3a54['workflowSessionId']+'/attempt/'+_0x2d3a54[_0x5e899d(0x20b)]);return console[_0x5e899d(0x3bd)](_0x5e899d(0x377)),console['error']('\x20\x20'+a32_0x54ffbd[_0x5e899d(0x2f6)](_0x5e899d(0x271))+'\x20'+_0x2d3a54[_0x5e899d(0x319)]),console['error']('\x20\x20'+a32_0x54ffbd[_0x5e899d(0x2f6)](_0x5e899d(0x301))+'\x20'+_0x2d3a54[_0x5e899d(0x3b9)]),console[_0x5e899d(0x3bd)]('\x20\x20'+a32_0x54ffbd['dim'](_0x5e899d(0x250))+'\x20'+_0x2d3a54[_0x5e899d(0x31c)]),console[_0x5e899d(0x3bd)]('\x20\x20'+a32_0x54ffbd['dim'](_0x5e899d(0x284))+'\x20'+_0x2d3a54[_0x5e899d(0x20b)]),console[_0x5e899d(0x3bd)]('\x20\x20'+_0x1a52a2),console['error']('\x0a'+a32_0x54ffbd['dim'](_0x5e899d(0x334))+_0x5e899d(0x2d7)+_0x2d3a54[_0x5e899d(0x20b)]+_0x5e899d(0x277)),0x0;}}export class ParentSegmentFieldsCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x36f);[a32_0x3c5e89(0x297)]='List\x20available\x20fields\x20for\x20segmentation';async[a32_0x3c5e89(0x2ce)](_0x2a5c95){const _0xf555b9=a32_0x3c5e89,{options:_0x2eb817,args:_0x21ca6f,tdx:_0x249302}=_0x2a5c95,_0x4f443b=_0x21ca6f[0x0]||_0x2eb817[_0xf555b9(0x1bc)];if(!_0x4f443b)return showParentSegmentNotSetError(_0xf555b9(0x23b)+_0xf555b9(0x2f2)),0x1;_0x2eb817[_0xf555b9(0x387)]&&(console[_0xf555b9(0x3bd)]('Site:\x20'+_0x2eb817['site']),console['error'](_0xf555b9(0x2c9)+_0x4f443b));const _0x5f2b3f=await withSpinner(_0xf555b9(0x35a)+_0x4f443b+_0xf555b9(0x288),()=>_0x249302['segment'][_0xf555b9(0x1c5)](_0x4f443b),{'verbose':_0x2eb817[_0xf555b9(0x387)]}),_0x9477c7=_0x5f2b3f[_0xf555b9(0x1ad)];console[_0xf555b9(0x3bd)]('✔\x20Found\x20'+_0x9477c7[_0xf555b9(0x30a)]+_0xf555b9(0x2a6)+(_0x9477c7[_0xf555b9(0x30a)]!==0x1?'s':''));if(_0x2eb817[_0xf555b9(0x2e5)]||_0x2eb817[_0xf555b9(0x1ae)])return await handleSDKOutput(_0x9477c7,_0x2eb817),0x0;return displayFieldsHumanReadable(_0x9477c7,_0x4f443b),0x0;}}export class ParentSegmentViewCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]='segment:parent:view';[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x32e);async[a32_0x3c5e89(0x2ce)](_0x3ab583){const _0x52e58f=a32_0x3c5e89,{options:_0x3d1110,args:_0x35a909,tdx:_0x434bbf}=_0x3ab583,_0x2a9bbe=_0x3d1110,_0x20ae69=_0x35a909[0x0]||_0x3d1110[_0x52e58f(0x1bc)];if(!_0x20ae69)return showParentSegmentNotSetError(_0x52e58f(0x3a6)+_0x52e58f(0x397)+_0x52e58f(0x1b2)+_0x52e58f(0x3b8)),0x1;_0x3d1110['verbose']&&(console['error'](_0x52e58f(0x39e)+_0x3d1110['site']),console['error'](_0x52e58f(0x2c9)+_0x20ae69));const _0x31d6bb=await withSpinner(_0x52e58f(0x1f9)+_0x20ae69+_0x52e58f(0x288),()=>_0x434bbf['segment']['getParentFull'](_0x20ae69),{'verbose':_0x3d1110[_0x52e58f(0x387)]}),_0x15be89=_0x31d6bb[_0x52e58f(0x1ad)];if(_0x2a9bbe[_0x52e58f(0x1a7)]){const _0xae7081=getConsoleNextUrl(_0x2a9bbe[_0x52e58f(0x1d1)],'/app/dw/parentSegments/'+_0x15be89['id']);return console[_0x52e58f(0x3bd)](a32_0x54ffbd[_0x52e58f(0x1d8)]('✔')+'\x20Opening\x20'+a32_0x54ffbd['cyan'](_0xae7081)),openBrowser(_0xae7081),0x0;}return await handleSingleObjectOutput(_0x15be89,_0x3d1110),0x0;}}export class ParentSegmentDescCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x1f2);['description']=a32_0x3c5e89(0x3a7);async['execute'](_0x1aa246){const _0x4bed3a=a32_0x3c5e89,{options:_0x40d512,args:_0x184201,tdx:_0x4049ce}=_0x1aa246,_0x5715f8=_0x40d512,_0x2dcfc3=_0x184201[0x0]||_0x40d512[_0x4bed3a(0x1bc)];if(!_0x2dcfc3)return showParentSegmentNotSetError(_0x4bed3a(0x30d)+_0x4bed3a(0x221)+_0x4bed3a(0x1b2)+'\x20\x20-o,\x20--output\x20<file>\x20\x20Output\x20file\x20path'),0x1;_0x40d512[_0x4bed3a(0x387)]&&(console['error']('Site:\x20'+_0x40d512[_0x4bed3a(0x1d1)]),console['error']('Parent\x20segment:\x20'+_0x2dcfc3));const _0x366893=await withSpinner(_0x4bed3a(0x245)+_0x2dcfc3+_0x4bed3a(0x288),()=>_0x4049ce[_0x4bed3a(0x1f3)][_0x4bed3a(0x251)](_0x2dcfc3),{'verbose':_0x40d512[_0x4bed3a(0x387)]}),_0x5b55b3=_0x366893[_0x4bed3a(0x1ad)],_0x4d0093=_0x4049ce[_0x4bed3a(0x1f3)][_0x4bed3a(0x2b6)](_0x5b55b3);if(_0x5715f8[_0x4bed3a(0x22e)]){const _0x1bd924=await this['collectSchema'](_0x1aa246,_0x2dcfc3,_0x5b55b3,_0x4d0093),_0xdf5345=this['formatSchemaJson'](_0x1bd924);writeFileSync(_0x5715f8['output'],_0xdf5345);const _0x4bd977=_0x1bd924[_0x4bed3a(0x1c0)][_0x4bed3a(0x22a)][_0x4bed3a(0x30a)]+_0x1bd924[_0x4bed3a(0x27f)][_0x4bed3a(0x1c9)]((_0x266168,_0x229ee4)=>_0x266168+_0x229ee4[_0x4bed3a(0x22a)][_0x4bed3a(0x30a)],0x0),_0x1608de=_0x1bd924[_0x4bed3a(0x27f)]['filter'](_0x4070b9=>_0x4070b9[_0x4bed3a(0x22a)][_0x4bed3a(0x30a)]===0x0)[_0x4bed3a(0x30a)];return console['log'](_0x4bed3a(0x32b)+_0x5715f8[_0x4bed3a(0x22e)]),console[_0x4bed3a(0x2c0)](_0x4bed3a(0x395)+_0x4d0093),console['log'](_0x4bed3a(0x26d)+_0x1bd924[_0x4bed3a(0x27f)][_0x4bed3a(0x30a)]+_0x4bed3a(0x208)),console[_0x4bed3a(0x2c0)](_0x4bed3a(0x3bc)+_0x4bd977+'\x20total'),_0x1608de>0x0&&console[_0x4bed3a(0x2c0)](_0x4bed3a(0x19c)+_0x1608de+_0x4bed3a(0x256)),0x0;}console[_0x4bed3a(0x3bd)]('\x0a'+a32_0x54ffbd[_0x4bed3a(0x1be)]('Output\x20Database:')+'\x20'+a32_0x54ffbd['cyan'](_0x4d0093));const _0x6ab84e=await withSpinner('Fetching\x20customers\x20schema...',()=>_0x4049ce[_0x4bed3a(0x1f3)]['getParentSQL'](_0x5b55b3),{'verbose':_0x40d512[_0x4bed3a(0x387)]});console['error']('\x0a'+a32_0x54ffbd[_0x4bed3a(0x1be)](_0x4bed3a(0x1c0))+'\x20'+a32_0x54ffbd[_0x4bed3a(0x2f6)]('('+_0x4d0093+'.customers)'));const _0x3fab46=await executeSchemaQuery(_0x6ab84e[_0x4bed3a(0x1ad)],_0x4049ce,_0x40d512);await handleQueryOutput(_0x3fab46,_0x40d512);const _0x232050=await withSpinner('Fetching\x20behavior\x20list...',()=>_0x4049ce['segment']['getBehaviorNames'](_0x5b55b3),{'verbose':_0x40d512[_0x4bed3a(0x387)]});for(const _0x2c3745 of _0x232050[_0x4bed3a(0x1ad)]){const _0xaf7f2e='behavior_'+_0x2c3745[_0x4bed3a(0x210)]()[_0x4bed3a(0x3bf)](/\s+/g,'_'),_0x44023d='SELECT\x20*\x20FROM\x20'+_0x4d0093+'.'+_0xaf7f2e;console['error']('\x0a'+a32_0x54ffbd[_0x4bed3a(0x1be)](_0x2c3745)+'\x20'+a32_0x54ffbd[_0x4bed3a(0x2f6)]('('+_0x4d0093+'.'+_0xaf7f2e+')'));try{const _0x3d6b14=await executeSchemaQuery(_0x44023d,_0x4049ce,_0x40d512);await handleQueryOutput(_0x3d6b14,_0x40d512);}catch{console[_0x4bed3a(0x3bd)](a32_0x54ffbd[_0x4bed3a(0x24d)](_0x4bed3a(0x2dd)));}}return 0x0;}async[a32_0x3c5e89(0x3a2)](_0xd4f9a7,_0x5572da,_0x1cd7c1,_0x45efc5){const _0x579e2f=a32_0x3c5e89,{options:_0x2669e5,tdx:_0x1dce0c}=_0xd4f9a7,_0x4c6bd8=await withSpinner(_0x579e2f(0x258),()=>_0x1dce0c['segment']['getParentSQL'](_0x1cd7c1),{'verbose':_0x2669e5[_0x579e2f(0x387)]}),_0x582f26=await executeSchemaQuery(_0x4c6bd8['data'],_0x1dce0c,_0x2669e5),_0x110cbe=_0x582f26[_0x579e2f(0x1ad)][_0x579e2f(0x383)](_0x5837bd=>({'name':_0x5837bd['column_name'],'type':_0x5837bd[_0x579e2f(0x26c)]})),_0xebcbc3=await withSpinner(_0x579e2f(0x317),()=>_0x1dce0c['segment'][_0x579e2f(0x230)](_0x1cd7c1),{'verbose':_0x2669e5[_0x579e2f(0x387)]}),_0x466db6=[];for(const _0x403f47 of _0xebcbc3[_0x579e2f(0x1ad)]){const _0x26fa87=_0x579e2f(0x205)+_0x403f47['toLowerCase']()[_0x579e2f(0x3bf)](/\s+/g,'_'),_0x57aa9c=_0x579e2f(0x3a1)+_0x45efc5+'.'+_0x26fa87;let _0xf50309=[];try{const _0x2afadd=await executeSchemaQuery(_0x57aa9c,_0x1dce0c,_0x2669e5);_0xf50309=_0x2afadd[_0x579e2f(0x1ad)][_0x579e2f(0x383)](_0x525d61=>({'name':_0x525d61[_0x579e2f(0x2f8)],'type':_0x525d61[_0x579e2f(0x26c)]}));}catch{}_0x466db6[_0x579e2f(0x19b)]({'table':_0x26fa87,'columns':_0xf50309});}return{'database':_0x45efc5,'parent_segment':_0x5572da,'parent_id':_0x1cd7c1,'customers':{'table':'customers','columns':_0x110cbe},'behaviors':_0x466db6};}['formatSchemaJson'](_0x5f55fa){const _0x59a3b3=a32_0x3c5e89,_0x5836ff=_0x57e23a=>{const _0x448c75=a32_0x375c;if(_0x57e23a['length']===0x0)return'[]';const _0x2dca8f=_0x57e23a[_0x448c75(0x383)](_0x2e9f80=>'\x20\x20\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22'+_0x2e9f80['name']+_0x448c75(0x25a)+_0x2e9f80[_0x448c75(0x1b4)]+_0x448c75(0x241));return'[\x0a'+_0x2dca8f[_0x448c75(0x296)](',\x0a')+_0x448c75(0x1cc);},_0x13e2fa=_0x5f55fa[_0x59a3b3(0x27f)][_0x59a3b3(0x383)](_0x5f4c68=>{const _0x403f94=_0x59a3b3;return _0x403f94(0x360)+_0x5f4c68[_0x403f94(0x20a)]+'\x22,\x0a\x20\x20\x20\x20\x20\x20\x22columns\x22:\x20'+_0x5836ff(_0x5f4c68[_0x403f94(0x22a)])[_0x403f94(0x3bf)](/^/gm,'\x20\x20')[_0x403f94(0x232)]()+_0x403f94(0x388);})['join'](',\x0a');return'{\x0a\x20\x20\x22database\x22:\x20\x22'+_0x5f55fa[_0x59a3b3(0x279)]+'\x22,\x0a\x20\x20\x22parent_segment\x22:\x20\x22'+_0x5f55fa[_0x59a3b3(0x2c5)]+_0x59a3b3(0x2f9)+_0x5f55fa[_0x59a3b3(0x32d)]+_0x59a3b3(0x2a4)+_0x5f55fa[_0x59a3b3(0x1c0)][_0x59a3b3(0x20a)]+_0x59a3b3(0x1d0)+_0x5836ff(_0x5f55fa[_0x59a3b3(0x1c0)][_0x59a3b3(0x22a)])[_0x59a3b3(0x3bf)](/^/gm,'\x20\x20')['trim']()+'\x0a\x20\x20},\x0a\x20\x20\x22behaviors\x22:\x20[\x0a'+_0x13e2fa+_0x59a3b3(0x327);}}function a32_0x3f58(){const _0x4f32b0=['Usage:\x20tdx\x20ps\x20rt\x20jn\x20resume_activations\x20<journeyId>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20\x20#\x20Uses\x20context','Usage:\x20tdx\x20parent-segment\x20preview\x20<name>\x20<option>\x0a','information_schema','behaviors','\x20--enriched','\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','FINISHED','Listing\x20personalization\x20services\x20for\x20\x27','Attempt:','\x0aTip:\x20Run\x20`tdx\x20ps\x20pz\x20service\x20init`\x20to\x20add\x20a\x20template\x20personalization\x20section\x20to\x20your\x20YAML','Error:\x20File\x20not\x20found:\x20','ps:rt:list','\x27...','createToken','Attributes','Updating','Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Usage:\x20tdx\x20ps\x20show\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20(requires\x20context)\x0a','\x20\x20--behavior\x20[name]\x20\x20\x20\x20Show\x20only\x20behaviors\x20(or\x20specific\x20one)\x0a','\x20configured','Patching\x20personalization\x20\x27','\x20stage','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]','displayMasterInfo','tdx\x20ps\x20preview\x20','join','description','listParents','scheduleType','Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]','displayBehaviorsStats','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20preview\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20specific\x20parent\x20segment\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20Pass\x20null\x20to\x20place\x20in\x20the\x20root\x20folder.','✔\x20Retrieved\x20RT\x20configuration\x20version','2803072uwvoXs','attribute','displayPreviewHints','✔\x20Created\x20token\x20\x27','Listing\x20personalizations\x20for\x20\x27','\x22,\x0a\x20\x20\x22customers\x22:\x20{\x0a\x20\x20\x20\x20\x22table\x22:\x20\x22','Rows:','\x20field','segment:parent:update','Pausing\x20activations\x20for\x20RT\x20journey\x20\x27','createPersonalization','deletePersonalization','Error\x20parsing\x20YAML:\x20','No\x20parent\x20segments\x20match\x20pattern:\x20','\x27\x20for\x20service\x20\x27','Columns:','2CDBQbW','My\x20Service','Personalization:','✔\x20Created\x20parent\x20segment\x20\x27','segment:parent:preview','pushParentYaml','Table:\x20','getOutputDatabaseName','Overwrite\x20\x27','\x20service','segment:parent:validate','payload:','\x0a⚠️\x20\x20Both\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20List\x20PZ\x20services\x20(requires\x20context)\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20show\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20config\x20for\x20specific\x20parent\x20segment','Error:\x20Token\x20name\x20is\x20required','unref','log','Error:','\x0a⚠️\x20\x20DEPRECATED:\x20`tdx\x20segment\x20parent\x20create`\x20is\x20deprecated.\x0a','apply','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>','parent_segment','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]\x0a','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]\x0a','Parent\x20segment:\x20','workflowId','red','displayRealtimeInfo','RT\x202.0\x20Validate:','execute','\x27\x20and\x20run\x20workflow?','SELECT\x20*\x20FROM\x20(\x0a','filter','getParentSQL','Tip:\x20Use\x20`tdx\x20ps\x20rt\x20jn\x20list\x20<parent_segment>`\x20to\x20find\x20journey\x20IDs','true','849358NKACbm','file','\x20tdx\x20wf\x20attempt\x20','.yaml','Database:\x20','Updating\x20personalization\x20service\x20\x27','⚠️\x20\x20personalization_services\x20section\x20already\x20exists\x20in\x20','Resume\x20activations\x20in\x20an\x20RT\x20journey','\x20\x20Schema\x20not\x20available\x20(workflow\x20may\x20not\x20have\x20run\x20yet)','updated:','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','addBehaviorsFile','Error:\x20Parent\x20segment\x20name\x20is\x20required','Error:\x20Token\x20\x27','\x20service(s)\x20configured','keyEventCriteria','json','double','Output\x20file:\x20','Preview\x20sample\x20data\x20from\x20parent\x20segment\x20YAML\x20configuration','payload','open','displaySampleData','Attributes:','last_page_viewed','\x0aError:','Usage:\x20tdx\x20ps\x20pz\x20create\x20--name\x20<name>\x20--description\x20<desc>\x20--folder-id\x20<id>\x20[options]','\x20\x20\x20\x20-\x20','allowedIps','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20fields\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20for\x20specific\x20parent\x20segment','foreignKey','Usage:\x20tdx\x20ps\x20push\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20(requires\x20context)\x0a','/\x20and\x20','dim','setJobId','column_name','\x22,\x0a\x20\x20\x22parent_id\x22:\x20\x22','2322918ApRTdb','\x20--interval\x20','rowCount','test','message','displayValidateResults','\x20personalization','Status:','Creating\x20personalization\x20service\x20\x27','Deleting\x20token\x20\x27','✔\x20Updated\x20personalization\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20sql\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20for\x20specific\x20parent\x20segment','isDirectory','all','\x20\x20\x20\x20','✔\x20Deleted\x20personalization\x20\x27','length','Fetching\x20sample\x20data...','token:','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','475ZETtow','cyan','single','updatedAt','behavior','Validate\x20RT\x202.0\x20configuration\x20from\x20parent\x20segment\x20YAML','addAttributes','\x20to\x20configure\x20your\x20personalization\x20service','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--file\x20<path>','Fetching\x20behavior\x20list...','keyEventId','audienceId','\x20rows)','\x20(paused)','workflowSessionId','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','label','\x20\x20--enriched\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20enriched\x20master\x20data\x0a','getPersonalization','Update\x20a\x20personalization\x20service\x20name\x20and/or\x20description','created:','valid','personalization','td_client_id','public','\x0a\x20\x20]\x0a}\x0a','Usage:\x20tdx\x20ps\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Preview\x20(requires\x20context)\x0a','ps:rt:validate','tokens','Schema\x20saved\x20to\x20','id:\x20','parent_id','Show\x20parent\x20segment\x20details','parentFolder','Finding\x20service\x20for\x20token...','Usage:\x20tdx\x20ps\x20pz\x20show\x20<personalization_id>','\x20\x20No\x20sample\x20data\x20available','sampleData','To\x20cancel:','Attribute:','matchedCount','ps:pz:service:token:create','✔\x20Renamed\x20directory\x20to\x20','Listing\x20RT-enabled\x20parent\x20segments...','toFixed','Error:\x20Token\x20ID\x20is\x20required','✔\x20Resumed\x20activations\x20for\x20RT\x20journey\x20\x27','patch','realtime:','keys','Error:\x20\x22relationships.parentFolder\x22\x20is\x20required\x20in\x20the\x20JSON\x20file.','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20\x20#\x20Uses\x20context','page_view','\x20=\x20','Available\x20behaviors:','keyEventId:','repeat','Next\x20steps:','815937TpivVA','scheduleOption','number','/{name}.yml\x0a','enriched','Fetching\x20current\x20configuration\x20for\x20\x27','Join:','👥\x20','\x0aChanges\x20to\x20apply\x20to\x20\x27','ps:pz:service:create','.yml','allowed\x20IPs:','xdg-open','displayPreviewResults','ps:pz:patch','start','getCurrentConfigVersion','identifier','Listing\x20fields\x20for\x20\x27','RT\x20Journey\x20ID:\x20','No\x20RT-enabled\x20parent\x20segments\x20found','ps:pz:delete','sourceTableError','Pattern:\x20','\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22table\x22:\x20\x22','\x27\x20(id:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20show\x20<service_id>\x20[parent_segment]','use','previewParentYaml','Execute\x20parent\x20segment\x20SQL\x20query\x20and\x20show\x20results','Join\x20on:','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20\x20#\x20Uses\x20context','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data\x0a','utf-8','Error:\x20Service\x20name\x20is\x20required','Error:\x20--name\x20is\x20required','listJourneys','customerGroup','segment:parent:fields','attributes','\x20\x20--master\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20sample\x20master\x20table\x20data','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]','\x20\x202.\x20Run\x20','list','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context','\x0a✔\x20Workflow\x20started','displayAttributesStats','/\x20→\x20','Error\x20reading\x20file:\x20','stitchingKeys','ps:pz:service:token:delete','name','No\x20parent\x20segments\x20found','Master\x20+\x20Attributes','segment:parent:push','launched','Update\x20existing\x20parent\x20segment\x20(audience)\x20[DEPRECATED]','map','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','sort','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','verbose','\x0a\x20\x20\x20\x20}','YAML\x20file:\x20','patchPersonalization','stageCount','population','✔\x20Found\x20','\x20Context\x20set:\x20','Error:\x20No\x20behaviors\x20defined\x20in\x20configuration','Available\x20attributes:','\x5c$&','paused','\x20\x20\x20\x20\x20\x20\x20\x20','-1d','\x20\x20Database:\x20','schemaValid','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20View\x20specific\x20parent\x20segment\x0a\x0a','Tip:\x20Run\x20`tdx\x20ps\x20pull\x20-u\x20','✔\x20Paused\x20activations\x20for\x20RT\x20journey\x20\x27','\x20parent\x20segment','primaryKey','Coverage:','\x27\x20not\x20found\x20in\x20any\x20personalization\x20service','Site:\x20','identifier:\x20','updateParent','SELECT\x20*\x20FROM\x20','collectSchema','\x20is\x20already\x20up\x20to\x20date','idStitching','eventKind:\x20','Usage:\x20tdx\x20ps\x20view\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20View\x20(requires\x20context)\x0a','Show\x20parent\x20segment\x20schema\x20(column\x20types)','\x0aChanges\x20to\x20\x27','Updated','win32','yes','Validating\x20RT\x20configuration...','split','\x20true','List\x20realtime\x20personalizations\x20for\x20a\x20parent\x20segment','\x20\x20\x20Use\x20`tdx\x20segment\x20parent\x20push\x20<file.yml>`\x20instead\x20for\x20better\x20configuration\x20management.\x0a','run','endsWith','format','coveragePercent','\x20--behavior\x20\x22<name>\x22','/sessions/','interval','\x20\x20-w,\x20--web\x20\x20Open\x20parent\x20segment\x20in\x20web\x20browser','status','stop','toLocaleString','\x20\x20Columns:\x20','error','Getting\x20RT\x20configuration\x20version\x20for\x20\x27','replace','✔\x20No\x20changes\x20-\x20\x27','preview','push','\x20\x20Note:\x20','\x0aNew\x20parent\x20segment\x20\x27','\x20Added\x20RT\x202.0\x20template\x20section','List\x20parent\x20segments\x20with\x20RT\x202.0\x20status','tdx\x20ps\x20push\x20','Listing\x20RT\x20journeys\x20for\x20\x27','Error:\x20Service\x20ID\x20is\x20required','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20validate\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20specific\x20parent\x20segment\x0a\x0a','✔\x20Query\x20completed:\x20Processed\x20','\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','Delete\x20a\x20realtime\x20personalization','web','\x20RT\x20configuration\x20is\x20valid','\x20\x20--behavior\x20<name>\x20\x20\x20\x20Show\x20sample\x20data\x20for\x20specific\x20behavior\x0a','Get\x20SQL\x20query\x20for\x20parent\x20segment','deleteToken','Error:\x20--attribute\x20requires\x20a\x20name\x0a','data','jsonl','Source:','\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','jobId','Options:\x0a','\x20\x20\x20Please\x20manually\x20merge\x20or\x20remove\x20','type','errors','pullParentYaml','\x20\x20--interval\x20<range>\x20\x20\x20TD_INTERVAL\x20time\x20range\x20for\x20behaviors\x20(default:\x20-1d)','Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]','folderId','Error:\x20At\x20least\x20one\x20preview\x20option\x20required\x0a','\x20[Job\x20ID:\x20','parentSegment','platform','bold','To\x20view\x20sample\x20data:','customers','Usage:\x20tdx\x20ps\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20(requires\x20context)\x0a','customerGroupFile','audienceId:','customerPercent','listFields','\x27\x20with\x20ID:\x20','validateParentYaml','enabled','reduce','\x20--attribute\x20\x22<name>\x22','Creating\x20personalization\x20\x27','\x0a\x20\x20\x20\x20]','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20run\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20specific\x20parent\x20segment','displaySummary','elapsedTimeMillis','\x22,\x0a\x20\x20\x20\x20\x22columns\x22:\x20','site','displayColumns','master','Usage:\x20tdx\x20ps\x20run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20(requires\x20context)\x0a','eventKind','using\x20the\x20default\x20path:\x20','\x27\x20is\x20already\x20up\x20to\x20date','green','\x20\x20\x20','Listing\x20RT-enabled\x20parent\x20segments\x20matching\x20\x27','7dAhizh','⚡\x20Not\x20enabled','Create\x20a\x20personalization\x20service\x20for\x20a\x20parent\x20segment','\x20\x20\x20\x20\x20\x20','Apply\x20changes\x20to\x20\x27','(id:\x20','Validating\x20configuration...','schemaError','\x20+\x20[','attributesFile','✔\x20Updated\x20personalization\x20service\x20\x27','joinKey','Add\x20template\x20personalization\x20section\x20to\x20parent\x20segment\x20YAML','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20push\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Push\x20specific\x20parent\x20segment','Events:','Deleting\x20personalization\x20\x27','SQL\x20query:\x0a','18652KstYSE','/app/workflows/','delete','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20--name\x20<name>\x20\x20#\x20Uses\x20context','\x20rows\x20','realtime','segment:parent:desc','segment','No\x20personalizations\x20configured','\x20\x201.\x20Edit\x20','ps:rt:jn:pause','Created','segment:parent:sql','Fetching\x20parent\x20segment\x20\x27','Show\x20personalization\x20service\x20details','<database>.<table>','\x20Saved\x20parent\x20segment\x20configuration\x20to\x20','\x20No\x20changes\x20-\x20','Executing\x20parent\x20segment\x20query...','Push\x20parent\x20segment\x20configuration\x20from\x20YAML\x20file','Tip:\x20Use\x20-u\x20without\x20-o,\x20or\x20-o\x20without\x20-u','sourceTableValid','Name:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context','Fetching\x20personalization\x20service\x20\x27','behavior_','Error:\x20RT\x20journey\x20ID\x20is\x20required\x0a','Master:','\x20behaviors','entryCriteria','table','workflowAttemptId','✔\x20Created\x20personalization\x20\x27','localeCompare','\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pull\x20<name>\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20parent\x20segment','query','toLowerCase','status:\x20','dirname','\x20--attribute\x20\x22','Fetching\x20SQL\x20for\x20\x27','✔\x20Deleted\x20personalization\x20service\x20\x27','processedRows','get','events','ignore','\x20to\x20push\x20the\x20configuration','resumeJourney','no\x20tokens\x20configured','\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','Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]\x0a','state','Preview:','\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','List\x20parent\x20segments','audienceId:\x20','allValid','Error:\x20--name\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)','7486443ggQypZ','create','ps:rt:jn:list','\x0a⚠\x20Save\x20this\x20token\x20value\x20-\x20it\x20will\x20not\x20be\x20shown\x20again:','columns','ps:rt:configuration_versions','pauseJourney','\x20\x20\x20See:\x20tdx\x20segment\x20parent\x20pull\x20--help\x0a','output','Creating','getBehaviorNames','addAttributesFile','trim','personalization_services','ps:pz:show','includeSensitive:','Errors:','Error:\x20--behavior\x20requires\x20a\x20name\x0a','value','Create\x20parent\x20segment\x20\x27','Creating\x20token\x20\x27','Usage:\x20tdx\x20ps\x20fields\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20fields\x20(requires\x20context)\x0a','\x20RT\x20journey','personalizationServices','\x0a⚠️\x20\x20Migrating:\x20','Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]\x0a','Personalization\x20service\x20description','\x22\x20}','Error:\x20Personalization\x20ID\x20is\x20required','indexOf','6959360UfGnPq','Resolving\x20parent\x20segment\x20\x27','✔\x20Found\x20personalization\x20\x27','timezone','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','✘\x20Failed\x20to\x20rename\x20directory:\x20','getParentFull','\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','Listing\x20parent\x20segments\x20matching\x20\x27','yellow','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','/app/dw/parentSegments/','Session:','resolveParentId','Getting\x20personalization\x20\x27','includeSensitive','segment:parent:run','Usage:\x20tdx\x20ps\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20(requires\x20context)\x0a','\x20behavior\x20tables\x20not\x20yet\x20generated\x20(workflow\x20may\x20not\x20have\x20run)','Behaviors','Fetching\x20customers\x20schema...','Options:','\x22,\x20\x22type\x22:\x20\x22','\x20parent\x20segment\x20\x27','sections','Get\x20current\x20RT\x20configuration\x20version\x20status','column','\x20Configuration\x20is\x20valid','some','segment:parent:list','segment:parent:show','ps:pz:list','Aborted.','%)\x20','sections:','segment:parent:create','✔\x20Deleted\x20token\x20\x27','any','\x0aUsage:\x20tdx\x20ps\x20preview\x20','string','column_type','\x20\x20Tables:\x201\x20customers\x20+\x20','text','\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}','stringify','Audience\x20ID:','createParent','limit','ps:rt:jn:resume','behaviorsFile','ps:pz:service:list','\x20kill','\x0aNo\x20sample\x20data\x20available','database','RT\x202.0:'];a32_0x3f58=function(){return _0x4f32b0;};return a32_0x3f58();}export class ParentSegmentSQLCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x1f8);['description']=a32_0x3c5e89(0x1aa);async['execute'](_0x52d461){const _0x554cb9=a32_0x3c5e89,{options:_0x3b360f,args:_0x22c900,tdx:_0x58eb0d}=_0x52d461,_0x13733a=_0x22c900[0x0]||_0x3b360f[_0x554cb9(0x1bc)];if(!_0x13733a)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20sql\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20SQL\x20(requires\x20context)\x0a'+_0x554cb9(0x305)),0x1;_0x3b360f[_0x554cb9(0x387)]&&(console[_0x554cb9(0x3bd)](_0x554cb9(0x39e)+_0x3b360f[_0x554cb9(0x1d1)]),console[_0x554cb9(0x3bd)](_0x554cb9(0x2c9)+_0x13733a));const _0x29c2d9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x13733a+_0x554cb9(0x288),()=>_0x58eb0d['segment'][_0x554cb9(0x251)](_0x13733a),{'verbose':_0x3b360f[_0x554cb9(0x387)]}),_0x2e6bf6=_0x29c2d9[_0x554cb9(0x1ad)],_0x132768=await withSpinner(_0x554cb9(0x214)+_0x13733a+_0x554cb9(0x288),()=>_0x58eb0d[_0x554cb9(0x1f3)]['getParentSQL'](_0x2e6bf6),{'verbose':_0x3b360f[_0x554cb9(0x387)]}),_0x5f313f=_0x132768[_0x554cb9(0x1ad)];return _0x3b360f['format']===_0x554cb9(0x2e5)||_0x3b360f[_0x554cb9(0x3b3)]===_0x554cb9(0x1ae)?await handleSDKOutput([{'sql':_0x5f313f}],_0x3b360f):console[_0x554cb9(0x2c0)](_0x5f313f),0x0;}}export class ParentSegmentShowCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x262);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x365);async['execute'](_0x207dc3){const _0x3f4e74=a32_0x3c5e89,{options:_0xe35f0,args:_0x2af5cf,tdx:_0x3e0323}=_0x207dc3,_0xf0fe23=_0x2af5cf[0x0]||_0xe35f0[_0x3f4e74(0x1bc)];if(!_0xf0fe23)return showParentSegmentNotSetError(_0x3f4e74(0x28e)+_0x3f4e74(0x2bd)),0x1;_0xe35f0[_0x3f4e74(0x387)]&&(console[_0x3f4e74(0x3bd)](_0x3f4e74(0x39e)+_0xe35f0['site']),console[_0x3f4e74(0x3bd)](_0x3f4e74(0x2c9)+_0xf0fe23));const _0x3fb2c7=await withSpinner(_0x3f4e74(0x245)+_0xf0fe23+'\x27...',()=>_0x3e0323['segment']['resolveParentId'](_0xf0fe23),{'verbose':_0xe35f0[_0x3f4e74(0x387)]}),_0xf2088a=_0x3fb2c7['data'],_0x1e35b7=await withSpinner(_0x3f4e74(0x214)+_0xf0fe23+'\x27...',()=>_0x3e0323[_0x3f4e74(0x1f3)][_0x3f4e74(0x2d2)](_0xf2088a),{'verbose':_0xe35f0[_0x3f4e74(0x387)]});let _0x2ca9ee=_0x1e35b7[_0x3f4e74(0x1ad)];const _0x2f90fa=resolveLimit(_0xe35f0[_0x3f4e74(0x273)],DEFAULT_DISPLAY_LIMIT),_0x776490=/\bLIMIT\s+\d+/i[_0x3f4e74(0x2fd)](_0x2ca9ee);!_0x776490&&(_0x2ca9ee=_0x2ca9ee['trim']()[_0x3f4e74(0x3bf)](/;+$/,''),_0x2ca9ee=_0x3f4e74(0x2d0)+_0x2ca9ee+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x2f90fa);_0xe35f0[_0x3f4e74(0x387)]&&console[_0x3f4e74(0x3bd)](_0x3f4e74(0x1eb)+_0x2ca9ee);const _0x2da8b5=await withProgressSpinner(_0x3f4e74(0x1fe),async _0x2f635a=>{const _0x2087f1=_0x3f4e74,_0x46257e=await _0x3e0323[_0x2087f1(0x20f)][_0x2087f1(0x2ce)](_0x2ca9ee,{'catalog':'td','schema':_0x2087f1(0x27e),'onJobId':_0x5e86bd=>{const _0xf70821=_0x2087f1;_0x2f635a[_0xf70821(0x2f7)](_0x5e86bd);}});return _0x46257e;},{'verbose':_0xe35f0[_0x3f4e74(0x387)]}),_0x53802e=_0x2da8b5['data'],_0x31c68c=_0x53802e[_0x3f4e74(0x1b1)]?_0x3f4e74(0x1bb)+_0x53802e[_0x3f4e74(0x1b1)]+']':'';return console['error'](_0x3f4e74(0x1a4)+_0x53802e['stats'][_0x3f4e74(0x216)][_0x3f4e74(0x3bb)]()+_0x3f4e74(0x1f0)+('in\x20'+formatElapsed(_0x53802e['stats'][_0x3f4e74(0x1cf)])+_0x31c68c)),await handleQueryOutput(_0x53802e,_0xe35f0),0x0;}}export class PSRtListCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x287);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x19f);async[a32_0x3c5e89(0x2ce)](_0x4b17c5){const _0x425f36=a32_0x3c5e89,{options:_0xf2e8a6,args:_0x2eb87d,tdx:_0x4dec56}=_0x4b17c5,_0x22b89c=_0x2eb87d[0x0],_0x36f18f=await withSpinner(_0x22b89c?_0x425f36(0x1da)+_0x22b89c+_0x425f36(0x288):_0x425f36(0x339),()=>_0x4dec56[_0x425f36(0x1f1)]['list'](),{'verbose':_0xf2e8a6[_0x425f36(0x387)]});let _0x17786e=_0x36f18f[_0x425f36(0x1ad)][_0x425f36(0x2d1)](_0x12bf48=>_0x12bf48['realtime_enabled']);if(_0x22b89c){const _0x2d1a78=_0x22b89c['replace'](/[.+^${}()|[\]\\]/g,_0x425f36(0x391))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x479657=new RegExp('^'+_0x2d1a78+'$','i');_0x17786e=_0x17786e['filter'](_0xec32df=>_0x479657[_0x425f36(0x2fd)](_0xec32df[_0x425f36(0x37d)]));}_0x17786e[_0x425f36(0x385)]((_0x4c9290,_0xd1242c)=>_0x4c9290[_0x425f36(0x37d)]['localeCompare'](_0xd1242c['name'])),console[_0x425f36(0x3bd)](_0x425f36(0x38d)+_0x17786e[_0x425f36(0x30a)]+'\x20RT-enabled\x20parent\x20segment'+(_0x17786e[_0x425f36(0x30a)]!==0x1?'s':''));const _0x23c4c5=_0x37f073=>{const _0x248f27=_0x425f36;return getConsoleNextUrl(_0xf2e8a6[_0x248f27(0x1d1)],_0x248f27(0x24f)+_0x37f073);};if(_0xf2e8a6[_0x425f36(0x3b3)]==='json'||_0xf2e8a6['format']===_0x425f36(0x1ae)){const _0x57562a=_0x17786e['map'](_0x516749=>({..._0x516749,'url':_0x23c4c5(_0x516749['id'])}));await handleSDKOutput(_0x57562a,_0xf2e8a6);}else{if(_0x17786e[_0x425f36(0x30a)]===0x0)console['log'](_0x425f36(0x35c));else for(const _0x24243d of _0x17786e){const _0x5551c8=_0x24243d[_0x425f36(0x38c)]?a32_0x54ffbd['dim']('\x20('+formatRows(_0x24243d[_0x425f36(0x38c)])+')'):'',_0x3881a0=hyperlink(_0x24243d[_0x425f36(0x37d)],_0x23c4c5(_0x24243d['id']));console[_0x425f36(0x2c0)]('⚡\x20'+_0x3881a0+_0x5551c8);}}return 0x0;}}export class PSRtValidateCommand extends BaseParentSegmentCommand{['name']=a32_0x3c5e89(0x329);['description']=a32_0x3c5e89(0x313);async[a32_0x3c5e89(0x2ce)](_0x558e77){const _0x488f21=a32_0x3c5e89,{options:_0x40b265,args:_0x281961,tdx:_0x9d9732}=_0x558e77,_0x21c4b7=_0x281961[0x0]||_0x40b265[_0x488f21(0x1bc)];if(!_0x21c4b7)return showParentSegmentNotSetError(_0x488f21(0x2df)+_0x488f21(0x281)),0x1;const _0x1c6e5a=resolveYamlFile(_0x21c4b7);if(!existsSync(_0x1c6e5a))return showFileNotFoundError(_0x1c6e5a,_0x21c4b7),0x1;let _0x3dd2ce;try{_0x3dd2ce=readFileSync(_0x1c6e5a,_0x488f21(0x36a));}catch(_0xeaf84a){const _0x4f3bd4=_0xeaf84a instanceof Error?_0xeaf84a[_0x488f21(0x2fe)]:String(_0xeaf84a);return console['error'](_0x488f21(0x37a)+_0x4f3bd4),0x1;}const _0x3a6f2c=createCommandSpinner(a32_0x54ffbd['dim'](_0x488f21(0x3ac)),{'verbose':_0x40b265[_0x488f21(0x387)]});_0x3a6f2c['start']();const _0x13acf7={'realtime':!![],'onProgress':_0x17bf31=>{const _0x3a745e=_0x488f21;_0x3a6f2c[_0x3a745e(0x26e)]=formatProgressMessage(_0x17bf31);}};let _0x44c457;try{_0x44c457=await _0x9d9732[_0x488f21(0x1f3)][_0x488f21(0x1c7)](_0x3dd2ce,_0x13acf7),_0x3a6f2c['stop']();}catch(_0x1cc47c){_0x3a6f2c['stop']();throw _0x1cc47c;}console[_0x488f21(0x3bd)]('\x0a'+a32_0x54ffbd[_0x488f21(0x1be)](_0x488f21(0x2cd))+'\x20'+_0x44c457['name']),console[_0x488f21(0x3bd)]('═'[_0x488f21(0x346)](0x3c)),displayRealtimeValidation(_0x44c457),console[_0x488f21(0x3bd)]('─'[_0x488f21(0x346)](0x3c));if(_0x44c457[_0x488f21(0x1b5)][_0x488f21(0x30a)]>0x0){console[_0x488f21(0x3bd)]('\x0a'+a32_0x54ffbd['red'](_0x488f21(0x236)));for(const _0x4ace47 of _0x44c457['errors']){console[_0x488f21(0x3bd)]('\x20\x20'+a32_0x54ffbd[_0x488f21(0x2cb)]('•')+'\x20'+_0x4ace47);}}return _0x44c457['allValid']&&console['error']('\x0a'+a32_0x54ffbd[_0x488f21(0x1d8)]('✔')+_0x488f21(0x1a8)),_0x44c457[_0x488f21(0x224)]?0x0:0x1;}}export class PSRtJnListCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x228);[a32_0x3c5e89(0x297)]='List\x20RT\x20journeys';async['execute'](_0x4c4141){const _0x26db70=a32_0x3c5e89,{options:_0x48f657,args:_0x44eb5f,tdx:_0x43189d}=_0x4c4141,_0x57ea28=_0x44eb5f[0x0]||_0x48f657[_0x26db70(0x1bc)];if(!_0x57ea28)return showParentSegmentNotSetError(_0x26db70(0x386)+'\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;_0x48f657[_0x26db70(0x387)]&&(console[_0x26db70(0x3bd)](_0x26db70(0x39e)+_0x48f657[_0x26db70(0x1d1)]),console[_0x26db70(0x3bd)](_0x26db70(0x2c9)+_0x57ea28));const _0x2a54b3=await withSpinner(_0x26db70(0x245)+_0x57ea28+_0x26db70(0x288),()=>_0x43189d[_0x26db70(0x1f3)]['resolveParentId'](_0x57ea28),{'verbose':_0x48f657[_0x26db70(0x387)]}),_0x5aea90=_0x2a54b3['data'],_0x204a73=await withSpinner(_0x26db70(0x1a1)+_0x57ea28+_0x26db70(0x288),()=>_0x43189d[_0x26db70(0x1f1)][_0x26db70(0x36d)](_0x5aea90),{'verbose':_0x48f657[_0x26db70(0x387)]}),_0x4aad12=_0x204a73['data'];console[_0x26db70(0x3bd)]('✔\x20Found\x20'+_0x4aad12['length']+_0x26db70(0x23c)+(_0x4aad12['length']!==0x1?'s':''));if(_0x48f657[_0x26db70(0x3b3)]===_0x26db70(0x2e5)||_0x48f657[_0x26db70(0x3b3)]===_0x26db70(0x1ae))await handleSDKOutput(_0x4aad12,_0x48f657);else{if(_0x4aad12[_0x26db70(0x30a)]===0x0)console['log']('No\x20RT\x20journeys\x20found');else for(const _0x24d564 of _0x4aad12){const _0x676a2f=_0x24d564[_0x26db70(0x21f)]==='launched'?'🚀':'📝',_0x59baf8=_0x24d564[_0x26db70(0x392)]?a32_0x54ffbd['yellow']('\x20(paused)'):'',_0xde6839=a32_0x54ffbd[_0x26db70(0x2f6)]('\x20('+_0x24d564['stageCount']+_0x26db70(0x292)+(_0x24d564[_0x26db70(0x38b)]!==0x1?'s':'')+')');console[_0x26db70(0x2c0)](_0x676a2f+'\x20'+_0x24d564[_0x26db70(0x37d)]+_0x59baf8+_0xde6839);}}return 0x0;}}export class PSRtJnPauseCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x1f6);[a32_0x3c5e89(0x297)]='Pause\x20activations\x20in\x20an\x20RT\x20journey';async[a32_0x3c5e89(0x2ce)](_0x16c65e){const _0x553aee=a32_0x3c5e89,{options:_0x48da5f,args:_0x544de0,tdx:_0x3000bf}=_0x16c65e,_0xa20d5c=_0x544de0[0x0];if(!_0xa20d5c)return console[_0x553aee(0x3bd)](a32_0x54ffbd[_0x553aee(0x2cb)](_0x553aee(0x206))),console[_0x553aee(0x3bd)]('Usage:\x20tdx\x20ps\x20rt\x20jn\x20pause_activations\x20<journeyId>\x0a'),console[_0x553aee(0x3bd)](a32_0x54ffbd[_0x553aee(0x2f6)](_0x553aee(0x2d3))),0x1;_0x48da5f[_0x553aee(0x387)]&&(console[_0x553aee(0x3bd)](_0x553aee(0x39e)+_0x48da5f[_0x553aee(0x1d1)]),console['error'](_0x553aee(0x35b)+_0xa20d5c));const _0x2f4e76=await withSpinner(_0x553aee(0x2a8)+_0xa20d5c+_0x553aee(0x288),()=>_0x3000bf[_0x553aee(0x1f1)][_0x553aee(0x22c)](_0xa20d5c),{'verbose':_0x48da5f[_0x553aee(0x387)]}),_0x33f80f=_0x2f4e76['data'];console[_0x553aee(0x3bd)](_0x553aee(0x399)+_0x33f80f[_0x553aee(0x37d)]+'\x27');if(_0x48da5f[_0x553aee(0x3b3)]==='json'||_0x48da5f['format']===_0x553aee(0x1ae))await handleSDKOutput([_0x33f80f],_0x48da5f);else{const _0x45becb=_0x33f80f[_0x553aee(0x21f)]===_0x553aee(0x381)?'🚀':'📝',_0x3ee7c0=_0x33f80f[_0x553aee(0x392)]?a32_0x54ffbd[_0x553aee(0x24d)](_0x553aee(0x31b)):'';console['log'](_0x45becb+'\x20'+_0x33f80f[_0x553aee(0x37d)]+_0x3ee7c0);}return 0x0;}}export class PSRtJnResumeCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x274);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x2dc);async[a32_0x3c5e89(0x2ce)](_0x9d9302){const _0x549519=a32_0x3c5e89,{options:_0x267e10,args:_0x24700e,tdx:_0x1bdf26}=_0x9d9302,_0x2136cc=_0x24700e[0x0];if(!_0x2136cc)return console[_0x549519(0x3bd)](a32_0x54ffbd[_0x549519(0x2cb)](_0x549519(0x206))),console[_0x549519(0x3bd)](_0x549519(0x27b)),console[_0x549519(0x3bd)](a32_0x54ffbd[_0x549519(0x2f6)](_0x549519(0x2d3))),0x1;_0x267e10[_0x549519(0x387)]&&(console[_0x549519(0x3bd)]('Site:\x20'+_0x267e10[_0x549519(0x1d1)]),console[_0x549519(0x3bd)]('RT\x20Journey\x20ID:\x20'+_0x2136cc));const _0x5bfcf0=await withSpinner('Resuming\x20activations\x20for\x20RT\x20journey\x20\x27'+_0x2136cc+'\x27...',()=>_0x1bdf26[_0x549519(0x1f1)][_0x549519(0x21b)](_0x2136cc),{'verbose':_0x267e10[_0x549519(0x387)]}),_0x37b541=_0x5bfcf0[_0x549519(0x1ad)];console[_0x549519(0x3bd)](_0x549519(0x33c)+_0x37b541[_0x549519(0x37d)]+'\x27');if(_0x267e10['format']===_0x549519(0x2e5)||_0x267e10[_0x549519(0x3b3)]===_0x549519(0x1ae))await handleSDKOutput([_0x37b541],_0x267e10);else{const _0x9526a5=_0x37b541['state']===_0x549519(0x381)?'🚀':'📝',_0x5df43a=_0x37b541[_0x549519(0x392)]?a32_0x54ffbd[_0x549519(0x24d)](_0x549519(0x31b)):'';console[_0x549519(0x2c0)](_0x9526a5+'\x20'+_0x37b541[_0x549519(0x37d)]+_0x5df43a);}return 0x0;}}export class PSRtConfigVersionCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x22b);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x25d);async[a32_0x3c5e89(0x2ce)](_0x1ecd96){const _0x410e06=a32_0x3c5e89,{options:_0xeabf,args:_0x25bd45,tdx:_0x5741da}=_0x1ecd96,_0x6bed6f=_0x25bd45[0x0]||_0xeabf[_0x410e06(0x1bc)];if(!_0x6bed6f)return showParentSegmentNotSetError(_0x410e06(0x31d)+_0x410e06(0x21d)),0x1;_0xeabf[_0x410e06(0x387)]&&(console[_0x410e06(0x3bd)](_0x410e06(0x39e)+_0xeabf[_0x410e06(0x1d1)]),console[_0x410e06(0x3bd)](_0x410e06(0x2c9)+_0x6bed6f));const _0x22b15f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x6bed6f+_0x410e06(0x288),()=>_0x5741da[_0x410e06(0x1f3)]['resolveParentId'](_0x6bed6f),{'verbose':_0xeabf[_0x410e06(0x387)]}),_0x434109=_0x22b15f[_0x410e06(0x1ad)],_0x171d12=await withSpinner(_0x410e06(0x3be)+_0x6bed6f+_0x410e06(0x288),()=>_0x5741da[_0x410e06(0x1f1)][_0x410e06(0x358)](_0x434109),{'verbose':_0xeabf[_0x410e06(0x387)]}),_0x32be3d=_0x171d12[_0x410e06(0x1ad)];return console[_0x410e06(0x3bd)](_0x410e06(0x29e)),_0xeabf[_0x410e06(0x3b3)]===_0x410e06(0x2e5)||_0xeabf[_0x410e06(0x3b3)]===_0x410e06(0x1ae)?await handleSDKOutput([_0x32be3d],_0xeabf):(console[_0x410e06(0x2c0)](_0x410e06(0x32c)+_0x32be3d['id']),console[_0x410e06(0x2c0)](_0x410e06(0x223)+_0x32be3d[_0x410e06(0x319)]),console[_0x410e06(0x2c0)](_0x410e06(0x39f)+_0x32be3d[_0x410e06(0x359)]),console['log'](_0x410e06(0x3a5)+_0x32be3d[_0x410e06(0x1d5)]),console[_0x410e06(0x2c0)](_0x410e06(0x211)+_0x32be3d['status'])),0x0;}}export class PSPzServiceListCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x276);[a32_0x3c5e89(0x297)]='List\x20personalization\x20services\x20for\x20a\x20parent\x20segment';async[a32_0x3c5e89(0x2ce)](_0x5db950){const _0x3218c7=a32_0x3c5e89,{options:_0x3ceda7,args:_0x587aa1,tdx:_0x56b232}=_0x5db950,_0x2c5c27=_0x587aa1[0x0]||_0x3ceda7[_0x3218c7(0x1bc)];if(!_0x2c5c27)return showParentSegmentNotSetError(_0x3218c7(0x2bc)+_0x3218c7(0x1a5)),0x1;const _0x182f83=await withSpinner(_0x3218c7(0x245)+_0x2c5c27+_0x3218c7(0x288),()=>_0x56b232[_0x3218c7(0x1f3)][_0x3218c7(0x251)](_0x2c5c27),{'verbose':_0x3ceda7[_0x3218c7(0x387)]}),_0x50bf94=_0x182f83[_0x3218c7(0x1ad)],_0x5e655c=await withSpinner(_0x3218c7(0x283)+_0x2c5c27+_0x3218c7(0x288),()=>_0x56b232['personalization']['list'](_0x50bf94),{'verbose':_0x3ceda7[_0x3218c7(0x387)]}),_0xbae874=_0x5e655c[_0x3218c7(0x1ad)];console[_0x3218c7(0x3bd)](_0x3218c7(0x38d)+_0xbae874[_0x3218c7(0x30a)]+'\x20personalization\x20service'+(_0xbae874[_0x3218c7(0x30a)]!==0x1?'s':''));if(_0x3ceda7[_0x3218c7(0x3b3)]===_0x3218c7(0x2e5)||_0x3ceda7[_0x3218c7(0x3b3)]===_0x3218c7(0x1ae))await handleSDKOutput(_0xbae874,_0x3ceda7);else{if(_0xbae874[_0x3218c7(0x30a)]===0x0)console[_0x3218c7(0x2c0)]('No\x20personalization\x20services\x20configured'),console[_0x3218c7(0x3bd)](a32_0x54ffbd[_0x3218c7(0x30f)](_0x3218c7(0x285)));else for(const _0x2c0b18 of _0xbae874){console[_0x3218c7(0x2c0)](a32_0x54ffbd['bold'](_0x2c0b18[_0x3218c7(0x37d)])+'\x20'+a32_0x54ffbd['dim'](_0x3218c7(0x1e0)+_0x2c0b18['id']+')'));_0x2c0b18[_0x3218c7(0x297)]&&console[_0x3218c7(0x2c0)]('\x20\x20'+a32_0x54ffbd[_0x3218c7(0x2f6)](_0x2c0b18['description']));if(_0x2c0b18[_0x3218c7(0x32a)]&&_0x2c0b18[_0x3218c7(0x32a)][_0x3218c7(0x30a)]>0x0)for(const _0x5960d7 of _0x2c0b18[_0x3218c7(0x32a)]){const _0x4cb5ee=_0x5960d7[_0x3218c7(0x2f1)]?.[_0x3218c7(0x30a)]?_0x5960d7[_0x3218c7(0x2f1)][_0x3218c7(0x296)](',\x20'):_0x3218c7(0x269);console[_0x3218c7(0x2c0)]('\x20\x20'+a32_0x54ffbd[_0x3218c7(0x30f)](_0x3218c7(0x30c))+'\x20'+_0x5960d7[_0x3218c7(0x37d)]+'\x20'+a32_0x54ffbd[_0x3218c7(0x2f6)](_0x3218c7(0x1e0)+_0x5960d7['id']+')')),console[_0x3218c7(0x2c0)](_0x3218c7(0x308)+a32_0x54ffbd[_0x3218c7(0x2f6)](_0x3218c7(0x353))+'\x20'+_0x4cb5ee);}else console[_0x3218c7(0x2c0)]('\x20\x20'+a32_0x54ffbd[_0x3218c7(0x2f6)](_0x3218c7(0x21c)));}}return 0x0;}}export class PSPzServiceCreateCommand extends BaseCommand{['name']=a32_0x3c5e89(0x351);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x1dd);async[a32_0x3c5e89(0x2ce)](_0x5db688){const _0x45389b=a32_0x3c5e89,{options:_0x45cd34,args:_0x1fcaa9,tdx:_0x184e47}=_0x5db688,_0x44aa8f=_0x45cd34,_0x4b01ca=_0x1fcaa9[0x0],_0x436f10=_0x1fcaa9[0x1]||_0x45cd34[_0x45389b(0x1bc)];if(!_0x4b01ca)return console[_0x45389b(0x3bd)](_0x45389b(0x36b)),console[_0x45389b(0x3bd)](_0x45389b(0x1b8)),console[_0x45389b(0x3bd)](_0x45389b(0x203)),0x1;if(!_0x436f10)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20[parent_segment]\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20create\x20<name>\x20\x20#\x20Uses\x20context'),0x1;const _0x4686c2=await withSpinner(_0x45389b(0x245)+_0x436f10+_0x45389b(0x288),()=>_0x184e47['segment'][_0x45389b(0x251)](_0x436f10),{'verbose':_0x45cd34[_0x45389b(0x387)]}),_0x7989e0=_0x4686c2[_0x45389b(0x1ad)],_0x92f1b6={'name':_0x4b01ca,'description':_0x44aa8f[_0x45389b(0x297)],'public':_0x44aa8f['public']},_0x46c262=await withSpinner(_0x45389b(0x302)+_0x4b01ca+_0x45389b(0x288),()=>_0x184e47[_0x45389b(0x324)][_0x45389b(0x227)](_0x7989e0,_0x92f1b6),{'verbose':_0x45cd34[_0x45389b(0x387)]}),_0x3d34dd=_0x46c262[_0x45389b(0x1ad)];return console[_0x45389b(0x3bd)]('✔\x20Created\x20personalization\x20service\x20\x27'+_0x3d34dd[_0x45389b(0x37d)]+_0x45389b(0x1c6)+_0x3d34dd['id']),await handleSDKOutput([_0x3d34dd],_0x45cd34),0x0;}}export class PSPzServiceShowCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]='ps:pz:service:show';[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x1fa);async['execute'](_0x3710ca){const _0x5d137c=a32_0x3c5e89,{options:_0x1f780e,args:_0x492bc7,tdx:_0x537ab3}=_0x3710ca,_0x2d132c=_0x492bc7[0x0],_0x24ad06=_0x492bc7[0x1]||_0x1f780e[_0x5d137c(0x1bc)];if(!_0x2d132c)return console['error'](_0x5d137c(0x1a2)),console['error'](_0x5d137c(0x362)),console[_0x5d137c(0x3bd)](_0x5d137c(0x27c)),0x1;if(!_0x24ad06)return showParentSegmentNotSetError(_0x5d137c(0x2c6)+_0x5d137c(0x27c)),0x1;const _0xd049a4=await withSpinner(_0x5d137c(0x245)+_0x24ad06+'\x27...',()=>_0x537ab3[_0x5d137c(0x1f3)][_0x5d137c(0x251)](_0x24ad06),{'verbose':_0x1f780e[_0x5d137c(0x387)]}),_0x209346=_0xd049a4[_0x5d137c(0x1ad)],_0x42e205=await withSpinner(_0x5d137c(0x204)+_0x2d132c+_0x5d137c(0x288),()=>_0x537ab3[_0x5d137c(0x324)][_0x5d137c(0x217)](_0x209346,_0x2d132c),{'verbose':_0x1f780e[_0x5d137c(0x387)]}),_0x4cb5e8=_0x42e205[_0x5d137c(0x1ad)];if(_0x1f780e[_0x5d137c(0x2e5)]||_0x1f780e[_0x5d137c(0x1ae)])await handleSDKOutput([_0x4cb5e8],_0x1f780e);else{console[_0x5d137c(0x2c0)](a32_0x54ffbd[_0x5d137c(0x1be)](_0x4cb5e8[_0x5d137c(0x37d)])+'\x20'+a32_0x54ffbd[_0x5d137c(0x2f6)](_0x5d137c(0x1e0)+_0x4cb5e8['id']+')'));_0x4cb5e8['description']&&console[_0x5d137c(0x2c0)]('\x20\x20'+a32_0x54ffbd[_0x5d137c(0x2f6)](_0x4cb5e8[_0x5d137c(0x297)]));console['log']('\x20\x20'+a32_0x54ffbd[_0x5d137c(0x30f)]('public:')+'\x20'+(_0x4cb5e8[_0x5d137c(0x326)]?_0x5d137c(0x3ab):'no'));if(_0x4cb5e8[_0x5d137c(0x32a)]&&_0x4cb5e8['tokens'][_0x5d137c(0x30a)]>0x0)for(const _0x2ff116 of _0x4cb5e8[_0x5d137c(0x32a)]){const _0x46024a=_0x2ff116[_0x5d137c(0x2f1)]?.['length']?_0x2ff116[_0x5d137c(0x2f1)][_0x5d137c(0x296)](',\x20'):'any';console['log']('\x20\x20'+a32_0x54ffbd[_0x5d137c(0x30f)](_0x5d137c(0x30c))+'\x20'+_0x2ff116[_0x5d137c(0x37d)]+'\x20'+a32_0x54ffbd['dim'](_0x5d137c(0x1e0)+_0x2ff116['id']+')')),console[_0x5d137c(0x2c0)]('\x20\x20\x20\x20'+a32_0x54ffbd[_0x5d137c(0x2f6)](_0x5d137c(0x353))+'\x20'+_0x46024a);}else console[_0x5d137c(0x2c0)]('\x20\x20'+a32_0x54ffbd[_0x5d137c(0x2f6)](_0x5d137c(0x21c)));}return 0x0;}}export class PSPzServiceDeleteCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]='ps:pz:service:delete';[a32_0x3c5e89(0x297)]='Delete\x20a\x20personalization\x20service';async['execute'](_0x5a54c3){const _0x2cca09=a32_0x3c5e89,{options:_0x372741,args:_0x42ae54,tdx:_0x28747a}=_0x5a54c3,_0x4c18b8=_0x42ae54[0x0],_0xd532ec=_0x42ae54[0x1]||_0x372741[_0x2cca09(0x1bc)];if(!_0x4c18b8)return console[_0x2cca09(0x3bd)]('Error:\x20Service\x20ID\x20is\x20required'),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]'),console['error'](_0x2cca09(0x368)),0x1;if(!_0xd532ec)return showParentSegmentNotSetError('Usage:\x20tdx\x20ps\x20pz\x20service\x20delete\x20<service_id>\x20[parent_segment]\x0a'+_0x2cca09(0x368)),0x1;const _0x364669=await withSpinner(_0x2cca09(0x245)+_0xd532ec+_0x2cca09(0x288),()=>_0x28747a[_0x2cca09(0x1f3)][_0x2cca09(0x251)](_0xd532ec),{'verbose':_0x372741[_0x2cca09(0x387)]}),_0x2cb6ee=_0x364669[_0x2cca09(0x1ad)];return await withSpinner('Deleting\x20personalization\x20service\x20\x27'+_0x4c18b8+'\x27...',()=>_0x28747a[_0x2cca09(0x324)][_0x2cca09(0x1ee)](_0x2cb6ee,_0x4c18b8),{'verbose':_0x372741[_0x2cca09(0x387)]}),console['error'](_0x2cca09(0x215)+_0x4c18b8+'\x27'),0x0;}}export class PSPzServiceUpdateCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]='ps:pz:service:update';[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x321);async[a32_0x3c5e89(0x2ce)](_0x7173d4){const _0x252872=a32_0x3c5e89,{options:_0x1c54e1,args:_0x131922,tdx:_0x5e6b86}=_0x7173d4,_0x572993=_0x1c54e1,_0xdc19a3=_0x131922[0x0],_0x1e2572=_0x131922[0x1]||_0x1c54e1['parentSegment'];if(!_0xdc19a3)return console[_0x252872(0x3bd)](_0x252872(0x1a2)),console[_0x252872(0x3bd)](_0x252872(0x372)),console[_0x252872(0x3bd)](_0x252872(0x1ef)),0x1;if(!_0x572993[_0x252872(0x37d)])return console['error'](_0x252872(0x36c)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20update\x20<service_id>\x20[parent_segment]\x20--name\x20<name>\x20[--description\x20<text>]'),0x1;if(!_0x1e2572)return showParentSegmentNotSetError(_0x252872(0x21e)+_0x252872(0x1ef)),0x1;const _0x27b455=await withSpinner(_0x252872(0x245)+_0x1e2572+'\x27...',()=>_0x5e6b86[_0x252872(0x1f3)]['resolveParentId'](_0x1e2572),{'verbose':_0x1c54e1[_0x252872(0x387)]}),_0x1e00ef=_0x27b455[_0x252872(0x1ad)],_0x3c0667={'name':_0x572993['name']};_0x572993[_0x252872(0x297)]!==undefined&&(_0x3c0667[_0x252872(0x297)]=_0x572993['description']);const _0x197876=await withSpinner(_0x252872(0x2da)+_0xdc19a3+_0x252872(0x288),()=>_0x5e6b86['personalization'][_0x252872(0x33d)](_0x1e00ef,_0xdc19a3,_0x3c0667),{'verbose':_0x1c54e1[_0x252872(0x387)]}),_0x573dfe=_0x197876[_0x252872(0x1ad)];return console[_0x252872(0x3bd)](_0x252872(0x1e5)+_0x573dfe[_0x252872(0x37d)]+'\x27'),await handleSDKOutput([_0x573dfe],_0x1c54e1),0x0;}}export class PSPzServiceTokenCreateCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x337);[a32_0x3c5e89(0x297)]='Create\x20a\x20token\x20for\x20a\x20personalization\x20service';async[a32_0x3c5e89(0x2ce)](_0x26f5af){const _0x48cf7d=a32_0x3c5e89,{options:_0x246cd7,args:_0x28eb0e,tdx:_0x41c3d9}=_0x26f5af,_0x1f177c=_0x246cd7,_0x527fc0=_0x28eb0e[0x0],_0x4f9f7e=_0x28eb0e[0x1],_0x5a92d8=_0x28eb0e[0x2]||_0x246cd7[_0x48cf7d(0x1bc)];if(!_0x527fc0)return console['error'](_0x48cf7d(0x2be)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20[parent_segment]'),console[_0x48cf7d(0x3bd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20service\x20token\x20create\x20<name>\x20<service_id>\x20\x20#\x20Uses\x20context'),0x1;if(!_0x4f9f7e)return console['error'](_0x48cf7d(0x1a2)),console[_0x48cf7d(0x3bd)](_0x48cf7d(0x293)),console[_0x48cf7d(0x3bd)](_0x48cf7d(0x376)),0x1;if(!_0x5a92d8)return showParentSegmentNotSetError(_0x48cf7d(0x2c8)+_0x48cf7d(0x376)),0x1;const _0x2e8d2a=await withSpinner(_0x48cf7d(0x245)+_0x5a92d8+_0x48cf7d(0x288),()=>_0x41c3d9[_0x48cf7d(0x1f3)][_0x48cf7d(0x251)](_0x5a92d8),{'verbose':_0x246cd7['verbose']}),_0x53a975=_0x2e8d2a['data'],_0xc150cb={'name':_0x527fc0};_0x1f177c[_0x48cf7d(0x2f1)]&&(_0xc150cb['allowedIps']=_0x1f177c[_0x48cf7d(0x2f1)][_0x48cf7d(0x3ad)](',')['map'](_0x2c9c81=>_0x2c9c81[_0x48cf7d(0x232)]()));_0x1f177c[_0x48cf7d(0x297)]&&(_0xc150cb[_0x48cf7d(0x297)]=_0x1f177c[_0x48cf7d(0x297)]);const _0x3080e0=await withSpinner(_0x48cf7d(0x23a)+_0x527fc0+_0x48cf7d(0x2ad)+_0x4f9f7e+_0x48cf7d(0x288),()=>_0x41c3d9[_0x48cf7d(0x324)][_0x48cf7d(0x289)](_0x53a975,_0x4f9f7e,_0xc150cb),{'verbose':_0x246cd7[_0x48cf7d(0x387)]}),_0x2c35a5=_0x3080e0[_0x48cf7d(0x1ad)];return console[_0x48cf7d(0x3bd)](_0x48cf7d(0x2a2)+_0x2c35a5[_0x48cf7d(0x37d)]+_0x48cf7d(0x1c6)+_0x2c35a5['id']),_0x2c35a5[_0x48cf7d(0x238)]&&(console['error'](a32_0x54ffbd[_0x48cf7d(0x24d)](_0x48cf7d(0x229))),console['error'](a32_0x54ffbd[_0x48cf7d(0x30f)](_0x2c35a5['value'])),console[_0x48cf7d(0x3bd)]('')),await handleSDKOutput([_0x2c35a5],_0x246cd7),0x0;}}export class PSPzServiceTokenDeleteCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x37c);[a32_0x3c5e89(0x297)]='Delete\x20a\x20token\x20from\x20a\x20personalization\x20service';async[a32_0x3c5e89(0x2ce)](_0x5e7dcf){const _0x584538=a32_0x3c5e89,{options:_0xb04776,args:_0x326fd8,tdx:_0x54de37}=_0x5e7dcf,_0x1c6b33=_0x326fd8[0x0],_0x309f47=_0x326fd8[0x1]||_0xb04776[_0x584538(0x1bc)];if(!_0x1c6b33)return console[_0x584538(0x3bd)](_0x584538(0x33b)),console[_0x584538(0x3bd)]('Usage:\x20tdx\x20ps\x20pz\x20service\x20token\x20delete\x20<token_id>\x20[parent_segment]'),console['error'](_0x584538(0x341)),0x1;if(!_0x309f47)return showParentSegmentNotSetError(_0x584538(0x23f)+_0x584538(0x341)),0x1;const _0x3611be=await withSpinner(_0x584538(0x245)+_0x309f47+_0x584538(0x288),()=>_0x54de37[_0x584538(0x1f3)][_0x584538(0x251)](_0x309f47),{'verbose':_0xb04776[_0x584538(0x387)]}),_0x184756=_0x3611be[_0x584538(0x1ad)],_0x3b3e10=await withSpinner(_0x584538(0x330),()=>_0x54de37[_0x584538(0x324)][_0x584538(0x374)](_0x184756),{'verbose':_0xb04776['verbose']}),_0x4b712b=_0x3b3e10['data'];let _0x3ff25b;for(const _0x4fe206 of _0x4b712b){if(_0x4fe206[_0x584538(0x32a)]?.[_0x584538(0x260)](_0x40f16d=>_0x40f16d['id']===_0x1c6b33)){_0x3ff25b=_0x4fe206['id'];break;}}if(!_0x3ff25b)return console['error'](_0x584538(0x2e2)+_0x1c6b33+_0x584538(0x39d)),0x1;const _0x44585e=await withSpinner(_0x584538(0x303)+_0x1c6b33+_0x584538(0x288),()=>_0x54de37['personalization'][_0x584538(0x1ab)](_0x184756,_0x3ff25b,_0x1c6b33),{'verbose':_0xb04776[_0x584538(0x387)]}),_0x383d8b=_0x44585e['data'];return console['error'](_0x584538(0x268)+(_0x383d8b['name']||_0x1c6b33)+'\x27'),await handleSDKOutput([_0x383d8b],_0xb04776),0x0;}}export class PSPzListCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x263);[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x3af);async['execute'](_0x351559){const _0x5dca88=a32_0x3c5e89,{options:_0x3f2a85,args:_0x54749b,tdx:_0xe3ed53}=_0x351559,_0x331914=_0x54749b[0x0]||_0x3f2a85[_0x5dca88(0x1bc)];if(!_0x331914)return showParentSegmentNotSetError(_0x5dca88(0x384)+_0x5dca88(0x24b)),0x1;const _0x12592d=await withSpinner(_0x5dca88(0x245)+_0x331914+_0x5dca88(0x288),()=>_0xe3ed53['segment'][_0x5dca88(0x251)](_0x331914),{'verbose':_0x3f2a85[_0x5dca88(0x387)]}),_0xd2f1d=_0x12592d[_0x5dca88(0x1ad)],_0x296909=await withSpinner(_0x5dca88(0x2a3)+_0x331914+_0x5dca88(0x288),()=>_0xe3ed53['personalization']['listPersonalizations'](_0xd2f1d),{'verbose':_0x3f2a85['verbose']}),_0x5631ed=_0x296909[_0x5dca88(0x1ad)];console[_0x5dca88(0x3bd)](_0x5dca88(0x38d)+_0x5631ed[_0x5dca88(0x30a)]+_0x5dca88(0x300)+(_0x5631ed[_0x5dca88(0x30a)]!==0x1?'s':''));if(_0x3f2a85[_0x5dca88(0x3b3)]===_0x5dca88(0x2e5)||_0x3f2a85[_0x5dca88(0x3b3)]===_0x5dca88(0x1ae))await handleSDKOutput(_0x5631ed,_0x3f2a85);else{if(_0x5631ed[_0x5dca88(0x30a)]===0x0)console[_0x5dca88(0x2c0)](_0x5dca88(0x1f4));else for(const _0xbfbf4e of _0x5631ed){console[_0x5dca88(0x2c0)](a32_0x54ffbd[_0x5dca88(0x1be)](_0xbfbf4e[_0x5dca88(0x37d)])+'\x20'+a32_0x54ffbd[_0x5dca88(0x2f6)](_0x5dca88(0x1e0)+_0xbfbf4e['id']+')'));_0xbfbf4e['description']&&console[_0x5dca88(0x2c0)]('\x20\x20'+a32_0x54ffbd['dim'](_0xbfbf4e[_0x5dca88(0x297)]));const _0x1336cb=_0xbfbf4e['sections']?.['length']||0x0;console['log']('\x20\x20'+a32_0x54ffbd[_0x5dca88(0x30f)](_0x5dca88(0x266))+'\x20'+_0x1336cb);if(_0xbfbf4e[_0x5dca88(0x25c)]&&_0xbfbf4e[_0x5dca88(0x25c)][_0x5dca88(0x30a)]>0x0)for(const _0xfd7045 of _0xbfbf4e[_0x5dca88(0x25c)]){console[_0x5dca88(0x2c0)]('\x20\x20\x20\x20-\x20'+_0xfd7045[_0x5dca88(0x37d)]);}}}return 0x0;}}export class PSPzShowCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x234);[a32_0x3c5e89(0x297)]='Show\x20a\x20specific\x20realtime\x20personalization';async[a32_0x3c5e89(0x2ce)](_0x204b25){const _0x1ef2c3=a32_0x3c5e89,{options:_0x3adc34,args:_0x4fd611,tdx:_0x46ea32}=_0x204b25,_0x1aadee=_0x4fd611[0x0];if(!_0x1aadee)return console['error'](_0x1ef2c3(0x242)),console[_0x1ef2c3(0x3bd)](_0x1ef2c3(0x331)),0x1;const _0x4d2792=await withSpinner(_0x1ef2c3(0x252)+_0x1aadee+'\x27...',()=>_0x46ea32[_0x1ef2c3(0x324)][_0x1ef2c3(0x320)](_0x1aadee),{'verbose':_0x3adc34['verbose']}),_0x3fbf32=_0x4d2792[_0x1ef2c3(0x1ad)];console['error'](_0x1ef2c3(0x246)+_0x3fbf32[_0x1ef2c3(0x37d)]+'\x27');if(_0x3adc34[_0x1ef2c3(0x3b3)]===_0x1ef2c3(0x2e5)||_0x3adc34[_0x1ef2c3(0x3b3)]==='jsonl')await handleSDKOutput([_0x3fbf32],_0x3adc34);else{console[_0x1ef2c3(0x2c0)](a32_0x54ffbd[_0x1ef2c3(0x1be)](_0x3fbf32['name'])+'\x20'+a32_0x54ffbd[_0x1ef2c3(0x2f6)]('(id:\x20'+_0x3fbf32['id']+')'));_0x3fbf32[_0x1ef2c3(0x297)]&&console['log']('\x20\x20'+a32_0x54ffbd[_0x1ef2c3(0x2f6)](_0x3fbf32['description']));_0x3fbf32[_0x1ef2c3(0x319)]&&console[_0x1ef2c3(0x2c0)]('\x20\x20'+a32_0x54ffbd['cyan'](_0x1ef2c3(0x1c3))+'\x20'+_0x3fbf32[_0x1ef2c3(0x319)]);console['log']('\x20\x20'+a32_0x54ffbd['cyan'](_0x1ef2c3(0x322))+'\x20'+_0x3fbf32['createdAt']),console[_0x1ef2c3(0x2c0)]('\x20\x20'+a32_0x54ffbd['cyan'](_0x1ef2c3(0x2de))+'\x20'+_0x3fbf32[_0x1ef2c3(0x311)]);const _0x526d03=_0x3fbf32[_0x1ef2c3(0x25c)]?.['length']||0x0;console[_0x1ef2c3(0x2c0)]('\x20\x20'+a32_0x54ffbd[_0x1ef2c3(0x30f)](_0x1ef2c3(0x266))+'\x20'+_0x526d03);if(_0x3fbf32['sections']&&_0x3fbf32[_0x1ef2c3(0x25c)][_0x1ef2c3(0x30a)]>0x0)for(const _0x104dc7 of _0x3fbf32[_0x1ef2c3(0x25c)]){console['log']('\x20\x20\x20\x20'+a32_0x54ffbd['bold'](_0x104dc7[_0x1ef2c3(0x37d)])+'\x20'+a32_0x54ffbd[_0x1ef2c3(0x2f6)](_0x1ef2c3(0x1e0)+_0x104dc7['id']+')')),_0x104dc7[_0x1ef2c3(0x209)]&&(console['log']('\x20\x20\x20\x20\x20\x20'+a32_0x54ffbd[_0x1ef2c3(0x30f)]('entryCriteria:')+'\x20'+_0x104dc7['entryCriteria'][_0x1ef2c3(0x37d)]),_0x104dc7[_0x1ef2c3(0x209)]['keyEventCriteria']?.[_0x1ef2c3(0x318)]&&console[_0x1ef2c3(0x2c0)](_0x1ef2c3(0x393)+a32_0x54ffbd[_0x1ef2c3(0x30f)](_0x1ef2c3(0x345))+'\x20'+_0x104dc7[_0x1ef2c3(0x209)][_0x1ef2c3(0x2e4)][_0x1ef2c3(0x318)])),_0x104dc7['payload']&&console['log'](_0x1ef2c3(0x1de)+a32_0x54ffbd['cyan'](_0x1ef2c3(0x2ba))+'\x20'+JSON[_0x1ef2c3(0x270)](_0x104dc7[_0x1ef2c3(0x2e9)])),_0x104dc7[_0x1ef2c3(0x253)]&&console[_0x1ef2c3(0x2c0)](_0x1ef2c3(0x1de)+a32_0x54ffbd[_0x1ef2c3(0x30f)](_0x1ef2c3(0x235))+_0x1ef2c3(0x3ae));}}return 0x0;}}export class PSPzDeleteCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x35d);['description']=a32_0x3c5e89(0x1a6);async[a32_0x3c5e89(0x2ce)](_0x507f79){const _0xdce1b3=a32_0x3c5e89,{options:_0x21df58,args:_0x33390f,tdx:_0x4d545f}=_0x507f79,_0x34a8d7=_0x33390f[0x0];if(!_0x34a8d7)return console[_0xdce1b3(0x3bd)](_0xdce1b3(0x242)),console[_0xdce1b3(0x3bd)]('Usage:\x20tdx\x20ps\x20pz\x20delete\x20<personalization_id>'),0x1;return await withSpinner(_0xdce1b3(0x1ea)+_0x34a8d7+'\x27...',()=>_0x4d545f[_0xdce1b3(0x324)][_0xdce1b3(0x2aa)](_0x34a8d7),{'verbose':_0x21df58[_0xdce1b3(0x387)]}),console['error'](_0xdce1b3(0x309)+_0x34a8d7+'\x27'),0x0;}}export class PSPzCreateCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]='ps:pz:create';[a32_0x3c5e89(0x297)]='Create\x20a\x20realtime\x20personalization\x20entity';async[a32_0x3c5e89(0x2ce)](_0x193e97){const _0x4a1f76=a32_0x3c5e89,{options:_0x5cdf8d,tdx:_0x4978f8}=_0x193e97,_0x61c01b=_0x5cdf8d;let _0x4a537d;if(_0x61c01b[_0x4a1f76(0x2d6)]){_0x4a537d=await loadJSON(_0x61c01b[_0x4a1f76(0x2d6)],!![]);if(!_0x4a537d['relationships']?.[_0x4a1f76(0x32f)])return console[_0x4a1f76(0x3bd)](_0x4a1f76(0x340)),console['error']('Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID,\x20then\x20add:'),console[_0x4a1f76(0x3bd)](_0x4a1f76(0x26f)),0x1;}else{if(!_0x61c01b[_0x4a1f76(0x37d)])return console[_0x4a1f76(0x3bd)](_0x4a1f76(0x225)),console[_0x4a1f76(0x3bd)](_0x4a1f76(0x2ef)),console[_0x4a1f76(0x3bd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20ps\x20pz\x20create\x20--file\x20<path>'),0x1;if(_0x61c01b['description']===undefined)return console[_0x4a1f76(0x3bd)](_0x4a1f76(0x28c)),console[_0x4a1f76(0x3bd)](_0x4a1f76(0x2ef)),console[_0x4a1f76(0x3bd)](_0x4a1f76(0x2c4)),0x1;if(_0x61c01b[_0x4a1f76(0x1b9)]===undefined)return console[_0x4a1f76(0x3bd)]('Error:\x20--folder-id\x20is\x20required.\x20Use\x20`tdx\x20ps\x20folder\x20list\x20<name>`\x20to\x20find\x20the\x20folder\x20ID.'),console[_0x4a1f76(0x3bd)](_0x4a1f76(0x29d)),0x1;let _0x1a0eb0=_0x61c01b['audienceId'];if(!_0x1a0eb0&&_0x5cdf8d[_0x4a1f76(0x1bc)]){const _0xae8075=await withSpinner(_0x4a1f76(0x245)+_0x5cdf8d[_0x4a1f76(0x1bc)]+_0x4a1f76(0x288),()=>_0x4978f8[_0x4a1f76(0x1f3)][_0x4a1f76(0x251)](_0x5cdf8d[_0x4a1f76(0x1bc)]),{'verbose':_0x5cdf8d[_0x4a1f76(0x387)]});_0x1a0eb0=_0xae8075[_0x4a1f76(0x1ad)];}let _0x555e90;_0x61c01b[_0x4a1f76(0x25c)]&&(_0x555e90=await loadJSON(_0x61c01b[_0x4a1f76(0x25c)],![]));const _0x16967e=_0x61c01b[_0x4a1f76(0x1b9)]==='null'?null:{'id':_0x61c01b['folderId'],'type':'folder-segment'};_0x4a537d={'attributes':{'name':_0x61c01b[_0x4a1f76(0x37d)],'description':_0x61c01b['description']||null,..._0x1a0eb0!==undefined&&{'audienceId':_0x1a0eb0},..._0x555e90!==undefined&&{'sections':_0x555e90}},'relationships':{'parentFolder':{'data':_0x16967e}}};}const _0x1168a7=await withSpinner(_0x4a1f76(0x1cb)+(_0x4a537d[_0x4a1f76(0x370)]?.[_0x4a1f76(0x37d)]??'')+'\x27...',()=>_0x4978f8['personalization'][_0x4a1f76(0x2a9)](_0x4a537d),{'verbose':_0x5cdf8d[_0x4a1f76(0x387)]}),_0x294ab4=_0x1168a7['data'];return console['error'](_0x4a1f76(0x20c)+_0x294ab4[_0x4a1f76(0x37d)]+_0x4a1f76(0x1c6)+_0x294ab4['id']),await handleSDKOutput([_0x294ab4],_0x5cdf8d),0x0;}}export class PSPzPatchCommand extends BaseCommand{[a32_0x3c5e89(0x37d)]=a32_0x3c5e89(0x356);['description']='Update\x20a\x20realtime\x20personalization\x20entity';async[a32_0x3c5e89(0x2ce)](_0x4d5794){const _0x8440ea=a32_0x3c5e89,{options:_0x1963c0,args:_0x4b96cd}=_0x4d5794,_0x29b48e=_0x1963c0,_0x1a149f=_0x4b96cd[0x0];if(!_0x1a149f)return console[_0x8440ea(0x3bd)](_0x8440ea(0x242)),console['error'](_0x8440ea(0x29a)),console['error'](_0x8440ea(0x316)),0x1;let _0x275d5b;if(_0x29b48e[_0x8440ea(0x2d6)])_0x275d5b=await loadJSON(_0x29b48e[_0x8440ea(0x2d6)],!![]);else{if(!_0x29b48e[_0x8440ea(0x37d)])return console['error'](_0x8440ea(0x225)),console['error']('Usage:\x20tdx\x20ps\x20pz\x20patch\x20<id>\x20--name\x20<name>\x20--description\x20<desc>\x20[--sections\x20<json>]'),0x1;if(_0x29b48e[_0x8440ea(0x297)]===undefined)return console['error']('Error:\x20--description\x20is\x20required\x20(or\x20use\x20--file\x20for\x20a\x20full\x20request\x20body)'),console['error'](_0x8440ea(0x29a)),0x1;let _0x3db548;_0x29b48e[_0x8440ea(0x25c)]&&(_0x3db548=await loadJSON(_0x29b48e['sections'],![])),_0x275d5b={'attributes':{'name':_0x29b48e[_0x8440ea(0x37d)],'description':_0x29b48e[_0x8440ea(0x297)]||null,..._0x3db548!==undefined&&{'sections':_0x3db548}}};}const {tdx:_0x1b15b2}=_0x4d5794,_0x10a3ed=await withSpinner(_0x8440ea(0x291)+_0x1a149f+_0x8440ea(0x288),()=>_0x1b15b2[_0x8440ea(0x324)][_0x8440ea(0x38a)](_0x1a149f,_0x275d5b),{'verbose':_0x1963c0[_0x8440ea(0x387)]}),_0x36d3ff=_0x10a3ed[_0x8440ea(0x1ad)];return console[_0x8440ea(0x3bd)](_0x8440ea(0x304)+_0x36d3ff[_0x8440ea(0x37d)]+_0x8440ea(0x361)+_0x36d3ff['id']+')'),await handleSDKOutput([_0x36d3ff],_0x1963c0),0x0;}}export class PSPzInitCommand extends BaseParentSegmentCommand{['name']='ps:pz:init';[a32_0x3c5e89(0x297)]=a32_0x3c5e89(0x1e7);async[a32_0x3c5e89(0x2ce)](_0x58f6fb){const _0x2146aa=a32_0x3c5e89,{options:_0x2d9f72,args:_0x317240}=_0x58f6fb,_0xc630cd=_0x317240[0x0]||_0x2d9f72[_0x2146aa(0x1bc)];if(!_0xc630cd)return showParentSegmentNotSetError(_0x2146aa(0x24e)+_0x2146aa(0x1b0)),0x1;const _0x5ac602=resolveYamlFile(_0xc630cd);if(!existsSync(_0x5ac602))return showFileNotFoundError(_0x5ac602,_0xc630cd),0x1;let _0x2b708a;try{_0x2b708a=readFileSync(_0x5ac602,_0x2146aa(0x36a));}catch(_0x1f52af){const _0x246f25=_0x1f52af instanceof Error?_0x1f52af[_0x2146aa(0x2fe)]:String(_0x1f52af);return console[_0x2146aa(0x3bd)](_0x2146aa(0x37a)+_0x246f25),0x1;}let _0x3cdce4;try{_0x3cdce4=parseDef(_0x2b708a);}catch(_0x413aa0){const _0x1b0e5b=_0x413aa0 instanceof Error?_0x413aa0[_0x2146aa(0x2fe)]:String(_0x413aa0);return console[_0x2146aa(0x3bd)](a32_0x54ffbd[_0x2146aa(0x2cb)](_0x2146aa(0x2ab)+_0x1b0e5b)),0x1;}if(_0x3cdce4['personalization_services']&&_0x3cdce4[_0x2146aa(0x233)][_0x2146aa(0x30a)]>0x0)return console[_0x2146aa(0x3bd)](a32_0x54ffbd[_0x2146aa(0x24d)](_0x2146aa(0x2db)+_0x5ac602)),console[_0x2146aa(0x3bd)](a32_0x54ffbd['dim'](_0x2146aa(0x1d9)+_0x3cdce4['personalization_services'][_0x2146aa(0x30a)]+_0x2146aa(0x2e3))),0x1;!_0x3cdce4[_0x2146aa(0x1f1)]&&(_0x3cdce4[_0x2146aa(0x1f1)]={'events':[{'name':'page_view','source_table':_0x2146aa(0x1fb)}],'attributes':[{'name':_0x2146aa(0x2ed),'type':_0x2146aa(0x310)}],'id_stitching':{'primary_key':_0x3cdce4[_0x2146aa(0x1d3)][_0x2146aa(0x20a)]===_0x2146aa(0x1c0)?_0x2146aa(0x325):'user_id'}});_0x3cdce4[_0x2146aa(0x233)]=[{'name':_0x2146aa(0x2b0),'description':_0x2146aa(0x240),'trigger_event':_0x2146aa(0x342),'sections':[{'name':'Default','criteria':_0x2146aa(0x2d4),'attributes':[_0x2146aa(0x2ed)]}]}];const _0x33c751=serializeDef(_0x3cdce4);return writeFileSync(_0x5ac602,_0x33c751,_0x2146aa(0x36a)),console['error'](a32_0x54ffbd['green']('✔')+'\x20Added\x20personalization\x20template\x20to\x20'+a32_0x54ffbd[_0x2146aa(0x30f)](_0x5ac602)),(!_0x3cdce4[_0x2146aa(0x1f1)]||_0x2b708a[_0x2146aa(0x243)](_0x2146aa(0x33e))===-0x1)&&console[_0x2146aa(0x3bd)](a32_0x54ffbd[_0x2146aa(0x1d8)]('✔')+_0x2146aa(0x19e)),console[_0x2146aa(0x3bd)]('\x0a'+a32_0x54ffbd[_0x2146aa(0x2f6)](_0x2146aa(0x347))),console['error'](_0x2146aa(0x1f5)+_0x5ac602+_0x2146aa(0x315)),console['error'](_0x2146aa(0x373)+a32_0x54ffbd[_0x2146aa(0x2f6)](_0x2146aa(0x1a0)+_0xc630cd)+_0x2146aa(0x21a)),0x0;}}
|