@treasuredata/tdx 2026.4.12 → 2026.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a142_0x521442=a142_0x46ea;(function(_0x4ab37a,_0x25c8ba){const _0x355130=a142_0x46ea,_0xb5cea0=_0x4ab37a();while(!![]){try{const _0x1ad855=parseInt(_0x355130(0x22a))/0x1+parseInt(_0x355130(0x1f4))/0x2+parseInt(_0x355130(0x1fa))/0x3+-parseInt(_0x355130(0x19c))/0x4+parseInt(_0x355130(0x1f3))/0x5+parseInt(_0x355130(0x21a))/0x6*(parseInt(_0x355130(0x1b7))/0x7)+-parseInt(_0x355130(0x1f0))/0x8*(parseInt(_0x355130(0x1d0))/0x9);if(_0x1ad855===_0x25c8ba)break;else _0xb5cea0['push'](_0xb5cea0['shift']());}catch(_0x2b2e59){_0xb5cea0['push'](_0xb5cea0['shift']());}}}(a142_0x38f0,0xd0fbd));import*as a142_0x44fc62 from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';import{ActivationDefSchema}from'./types/activation-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':a142_0x521442(0x1b1),'hourly':'hour','weekly':a142_0x521442(0x1e5),'monthly':a142_0x521442(0x1af),'minutes_interval':a142_0x521442(0x1f9)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a142_0x521442(0x190),'hour':'hourly','week':'weekly','month':a142_0x521442(0x1ab),'minute':a142_0x521442(0x235)};function filterRuleAsRuleDef(_0x31b118){return _0x31b118;}function ruleDefAsFilterRule(_0x2e3123){return _0x2e3123;}export function segmentResponseToDefSync(_0x287c99,_0x548402){const _0x529997=a142_0x521442,_0x114888=_0x287c99['rule']&&_0x529997(0x21e)in _0x287c99[_0x529997(0x185)]&&_0x287c99['rule'][_0x529997(0x21e)];return{'type':'segment','name':_0x287c99[_0x529997(0x1b2)],..._0x287c99[_0x529997(0x1dc)]&&{'description':_0x287c99['description']},..._0x548402&&{'folder':_0x548402},..._0x114888&&{'rule':apiRuleToYaml(_0x287c99[_0x529997(0x185)])},..._0x287c99[_0x529997(0x21f)]!==undefined&&{'kind':_0x287c99[_0x529997(0x21f)]===0x0?'batch':_0x287c99['kind']===0x1?'realtime':_0x529997(0x1e6)},..._0x287c99[_0x529997(0x1e7)]!==undefined&&{'visible':_0x287c99[_0x529997(0x1e7)]}};}export async function segmentResponseToDef(_0x1c5973,_0x31fea3,_0x3dc6c7){const _0x597207=a142_0x521442,_0x77d89b=segmentResponseToDefSync(_0x1c5973,_0x3dc6c7);if(!_0x31fea3||!_0x31fea3[_0x597207(0x1bd)])return _0x77d89b;return _0x77d89b[_0x597207(0x185)]&&(_0x77d89b['rule']=await resolveRuleSegmentRefs(_0x77d89b[_0x597207(0x185)],_0x31fea3['resolveSegmentName'])),_0x77d89b;}export function apiRuleToYaml(_0x3876dd){const _0x5d049a=a142_0x521442,_0x29fbe7=(_0x3876dd['conditions']||[])['flatMap'](_0x45f397=>{const _0x109623=a142_0x46ea,_0xbb2de=apiConditionToYaml(_0x45f397);if(isCompositeType(_0xbb2de)&&_0xbb2de[_0x109623(0x1dc)]!==undefined){const _0x4adc5c=_0xbb2de;if(_0x4adc5c[_0x109623(0x200)][_0x109623(0x1d2)]===0x1)return _0x4adc5c[_0x109623(0x200)];return[{'type':_0x4adc5c[_0x109623(0x21e)],'conditions':_0x4adc5c[_0x109623(0x200)]}];}return[_0xbb2de];});if(_0x29fbe7[_0x5d049a(0x1d2)]===0x1&&!_0x3876dd['description']&&isCompositeType(_0x29fbe7[0x0])){const _0x36336b=_0x29fbe7[0x0];if(_0x36336b[_0x5d049a(0x21e)]===_0x3876dd['type']&&_0x36336b[_0x5d049a(0x200)]&&_0x36336b['description']===undefined)return{'type':_0x3876dd[_0x5d049a(0x21e)],'conditions':_0x36336b[_0x5d049a(0x200)]};}return{'type':_0x3876dd['type'],'conditions':_0x29fbe7};}export async function resolveRuleSegmentRefs(_0xd5b894,_0x2bb27f){return transformRuleSegmentRefs(_0xd5b894,_0x2bb27f,_0x5fffb9=>/^\d+$/['test'](_0x5fffb9));}async function transformConditionSegmentRefs(_0x326478,_0x273e3e,_0x1a9a11,_0x72df8a){const _0x26bb76=a142_0x521442;if(_0x26bb76(0x1c8)in _0x326478&&(_0x326478['type']===_0x26bb76(0x231)||_0x326478['type']===_0x26bb76(0x1e3))){const _0x3081f0=_0x326478;if(_0x1a9a11(_0x3081f0[_0x26bb76(0x1c8)]))return{..._0x3081f0,'segment':await _0x273e3e(_0x3081f0['segment'])};return _0x326478;}if(_0x26bb76(0x200)in _0x326478&&_0x326478[_0x26bb76(0x200)]){const _0x2438ac=_0x326478,_0x2d40e5=await Promise['all'](_0x2438ac[_0x26bb76(0x200)][_0x26bb76(0x1f6)](_0x15c2ef=>transformConditionSegmentRefs(_0x15c2ef,_0x273e3e,_0x1a9a11,_0x72df8a)));return{..._0x2438ac,'conditions':_0x2d40e5};}if('filter'in _0x326478&&_0x326478[_0x26bb76(0x203)]){const _0x4f73b5=_0x326478,_0x2f7b12=await _0x72df8a(filterRuleAsRuleDef(_0x4f73b5['filter']),_0x273e3e);return{..._0x4f73b5,'filter':ruleDefAsFilterRule(_0x2f7b12)};}return _0x326478;}async function transformRuleSegmentRefs(_0x31a2f3,_0x3e707e,_0x5da4b3){const _0x427d77=a142_0x521442,_0x519854=(_0x5a7044,_0x5d4f96)=>transformRuleSegmentRefs(_0x5a7044,_0x5d4f96,_0x5da4b3),_0x393a3d=await Promise[_0x427d77(0x212)](_0x31a2f3[_0x427d77(0x200)][_0x427d77(0x1f6)](_0x590513=>transformConditionSegmentRefs(_0x590513,_0x3e707e,_0x5da4b3,_0x519854)));return{..._0x31a2f3,'conditions':_0x393a3d};}export async function resolveRuleSegmentIds(_0x169a2c,_0x5328c8){const _0x3b0311=a142_0x521442;return transformRuleSegmentRefs(_0x169a2c,_0x5328c8,_0x201611=>!/^\d+$/[_0x3b0311(0x1c3)](_0x201611));}function isCompositeType(_0x53032d){const _0xae0fbb=a142_0x521442;return _0x53032d[_0xae0fbb(0x21e)]===_0xae0fbb(0x20c)||_0x53032d[_0xae0fbb(0x21e)]==='Or';}function isBehaviorApiCondition(_0x3b831c){const _0x100c0c=a142_0x521442;if(!_0x3b831c[_0x100c0c(0x22c)]?.['source']?.['name'])return![];return!![];}function apiConditionToYaml(_0x7c6821){const _0x3a02f7=a142_0x521442;if(_0x7c6821[_0x3a02f7(0x21e)]===_0x3a02f7(0x20c)||_0x7c6821['type']==='Or'){if(_0x7c6821[_0x3a02f7(0x200)]){const _0x429f81=_0x7c6821[_0x3a02f7(0x200)][_0x3a02f7(0x1f6)](apiConditionToYaml),_0xf686fa=_0x7c6821[_0x3a02f7(0x1dc)]!==undefined;if(_0x429f81[_0x3a02f7(0x1d2)]===0x1&&!_0xf686fa)return _0x429f81[0x0];return{'type':_0x7c6821['type'],'conditions':_0x429f81,..._0x7c6821[_0x3a02f7(0x1dc)]!==undefined&&{'description':_0x7c6821['description']}};}}if(_0x7c6821['type']===_0x3a02f7(0x20d)&&_0x7c6821[_0x3a02f7(0x22c)]&&_0x7c6821['operator']){const _0x15f2aa=_0x7c6821[_0x3a02f7(0x22c)][_0x3a02f7(0x22f)]?buildAggregationDefFromApi(_0x7c6821['leftValue'][_0x3a02f7(0x22f)]):undefined;if(isBehaviorApiCondition(_0x7c6821)){const _0xfa7896=_0x7c6821[_0x3a02f7(0x22c)][_0x3a02f7(0x199)]['name'];return{'type':_0x3a02f7(0x1ca),'attribute':'','operator':apiOperatorToYaml(_0x7c6821['operator']),..._0x7c6821[_0x3a02f7(0x1ec)]&&_0x7c6821[_0x3a02f7(0x1ec)]!==_0x3a02f7(0x221)?{'arrayMatching':_0x7c6821[_0x3a02f7(0x1ec)]}:{},..._0x7c6821[_0x3a02f7(0x1e3)]?{'exclude':_0x7c6821[_0x3a02f7(0x1e3)]}:{},..._0x15f2aa?{'aggregation':_0x15f2aa}:{},'source':_0xfa7896,..._0x7c6821[_0x3a02f7(0x22c)][_0x3a02f7(0x203)]?{'filter':apiRuleToYaml(_0x7c6821[_0x3a02f7(0x22c)][_0x3a02f7(0x203)])}:{},..._0x7c6821[_0x3a02f7(0x239)]!==undefined&&_0x7c6821['limit']!==null?{'limit':_0x7c6821['limit']}:{}};}return{'type':_0x3a02f7(0x20d),'attribute':_0x7c6821['leftValue'][_0x3a02f7(0x1b2)]||'','operator':apiOperatorToYaml(_0x7c6821[_0x3a02f7(0x1a8)]),..._0x7c6821['arrayMatching']&&_0x7c6821[_0x3a02f7(0x1ec)]!=='any'?{'arrayMatching':_0x7c6821[_0x3a02f7(0x1ec)]}:{},..._0x7c6821[_0x3a02f7(0x1e3)]?{'exclude':_0x7c6821[_0x3a02f7(0x1e3)]}:{},..._0x15f2aa?{'aggregation':_0x15f2aa}:{},..._0x7c6821[_0x3a02f7(0x22c)]['filter']?{'filter':apiRuleToYaml(_0x7c6821[_0x3a02f7(0x22c)][_0x3a02f7(0x203)])}:{},..._0x7c6821[_0x3a02f7(0x239)]!==undefined&&_0x7c6821[_0x3a02f7(0x239)]!==null?{'limit':_0x7c6821[_0x3a02f7(0x239)]}:{}};}if(_0x7c6821[_0x3a02f7(0x21e)]===_0x3a02f7(0x207)&&_0x7c6821[_0x3a02f7(0x1ea)]&&_0x7c6821[_0x3a02f7(0x1a8)])return{'type':'Column','column':_0x7c6821[_0x3a02f7(0x1ea)],'operator':apiOperatorToYaml(_0x7c6821[_0x3a02f7(0x1a8)])};if(_0x7c6821[_0x3a02f7(0x21e)]==='Reference'&&_0x7c6821['id'])return{'type':_0x7c6821[_0x3a02f7(0x1e3)]?'exclude':'include','segment':_0x7c6821['id']};return{'type':_0x3a02f7(0x20c),'conditions':[]};}function isTemporalOperator(_0x3471eb){const _0x14cd27=a142_0x521442;return _0x3471eb===_0x14cd27(0x233)||_0x3471eb===_0x14cd27(0x1a0);}function isBetweenOperator(_0x4cc651){const _0x52d897=a142_0x521442;return _0x4cc651===_0x52d897(0x195);}function getEffectiveValue(_0x5575b5){const _0x3eda84=a142_0x521442,_0x5f34ee=_0x5575b5[_0x3eda84(0x232)];return _0x5575b5['value']??_0x5f34ee;}function parseNumericValue(_0x12f4aa){const _0x1c10f8=a142_0x521442;if(typeof _0x12f4aa===_0x1c10f8(0x1a6)&&_0x12f4aa!==null)return _0x12f4aa;if(_0x12f4aa==='')return _0x12f4aa;const _0x444894=Number(_0x12f4aa);return Number[_0x1c10f8(0x1c5)](_0x444894)?_0x444894:_0x12f4aa;}function apiOperatorToYaml(_0x1e2963){const _0x3b6e84=a142_0x521442;if(isBetweenOperator(_0x1e2963[_0x3b6e84(0x21e)]))return{'type':mapApiOperatorType(_0x1e2963[_0x3b6e84(0x21e)]),..._0x1e2963[_0x3b6e84(0x184)]!==undefined&&{'not':_0x1e2963[_0x3b6e84(0x184)]},..._0x1e2963['minValue']!==undefined&&{'min':parseNumericValue(_0x1e2963[_0x3b6e84(0x218)])},..._0x1e2963['maxValue']!==undefined&&{'max':parseNumericValue(_0x1e2963[_0x3b6e84(0x1de)])}};if(_0x1e2963[_0x3b6e84(0x21e)]===_0x3b6e84(0x1f7))return{'type':_0x3b6e84(0x1f7),..._0x1e2963[_0x3b6e84(0x184)]!==undefined&&{'not':_0x1e2963[_0x3b6e84(0x184)]},..._0x1e2963[_0x3b6e84(0x23c)]!==undefined&&{'duration':_0x1e2963[_0x3b6e84(0x23c)]},..._0x1e2963[_0x3b6e84(0x18c)]!==undefined&&{'from':_0x1e2963['from']},..._0x1e2963[_0x3b6e84(0x222)]!==undefined&&{'reverse':_0x1e2963[_0x3b6e84(0x222)]}};let _0x464432;if(_0x1e2963['rightValues']&&_0x1e2963[_0x3b6e84(0x1aa)][_0x3b6e84(0x1d2)]>0x0)_0x464432=_0x1e2963[_0x3b6e84(0x1aa)];else{if(_0x1e2963[_0x3b6e84(0x1a4)]!==undefined)_0x464432=_0x1e2963['rightValue'];else isTemporalOperator(_0x1e2963[_0x3b6e84(0x21e)])&&_0x1e2963[_0x3b6e84(0x1e0)]!==undefined&&(_0x464432=_0x1e2963[_0x3b6e84(0x1e0)]);}return{'type':mapApiOperatorType(_0x1e2963['type']),..._0x1e2963['not']!==undefined&&{'not':_0x1e2963['not']},..._0x464432!==undefined&&{'value':_0x464432},..._0x1e2963[_0x3b6e84(0x1a7)]!==undefined&&{'unit':_0x1e2963['unit']}};}function a142_0x38f0(){const _0x1ae665=['null','notification','from','behavior','conditions[','__UNRESOLVED__','daily','valid','CONNECTOR_SCHEMA_NOT_FOUND','emailToIdMap','get','Between','all_columns','\x0a\x0aAvailable\x20fields:\x0a','activationTemplateId','source','notify_on','warn','6490016emQcUq','visible','replace','orderBy','TimeWithinNext','toLowerCase','add','shape','rightValue','ruleHashToName','object','unit','operator','match','rightValues','monthly','Warning:\x20activation\x20\x22','\x22:\x0a','connection','month','connectorConfig','day','name','connectionNameToTypeMap','connectionNameToIdMap','keys','connector_config','2828ZNwCEC','Invalid\x20connector_config\x20for\x20activation\x20\x22','emailRecipients','string','repeatUnit','has','resolveSegmentName','__SEGMENT_REF__','max','localeCompare','min','notifyOn','test','lockEnabled','isFinite','orderColumn','email_recipients','segment','entries','Behavior','Count','stringify','batch','set','getSchema','9LOYdyF','usedNames','length','sort','repeatSubFrequency','code','scheduleOption','behavior_table','activations','every','First','Unknown\x20connection:\x20','description','isArray','maxValue','forEach','value','Segment\x20description','allColumns','exclude','nestedWorkflowProjectName','week','funnel_stage','isVisible','segmentFolderId','realtime','column','joinRow','arrayMatching','activation_template_id','join_row','runAfterJourneyRefresh','34739056OsHQmH','nested_workflow_project_name','repeatFrequency','7197920iPEgMf','1715106BzFNas','columns','map','TimeRange','\x22\x20has\x20unrecognized\x20fields\x20(will\x20be\x20ignored):\x0a','minute','4725060TAryNB','push','formatting','CountDistinct','timezone','scheduleType','conditions','errors','attribute_name','filter','repeat_frequency','syndicationBehavior','connectionId','Column','startAt','attributes','localRuleToName','Reference','And','Value','rule:','schedule','folder','join_strategy','all','CONNECTION_NOT_FOUND','join','endOn','order_by','\x27:\x20','minValue','none','24204rnngld','repeat_sub_frequency','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','CONNECTOR_INVALID_CONFIG','type','kind','nested_workflow_name','any','reverse','].attribute\x20cannot\x20be\x20empty.\x0a','Connector:\x20','visibility','repeat_unit','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','connector_config\x20for\x20activation\x20\x22','activations:','1318990YPaxKZ','parse','leftValue','Last','lock_enabled','aggregation','start_at','include','values','TimeWithinPast','joinStrategy','minutes_interval','timeWindow','New\x20Segment','behaviorTableName','limit','nestedWorkflowName','All','duration','end_on','\x20\x20-\x20\x22','not','rule','warnings','run_after_journey_refresh','groupingColumns','attribute'];a142_0x38f0=function(){return _0x1ae665;};return a142_0x38f0();}function mapApiOperatorType(_0x442d8e){return _0x442d8e;}export function segmentDefToCreateRequest(_0x6838fd,_0x4ad13c){const _0x4ebca9=a142_0x521442,_0x207bc1={'name':_0x6838fd[_0x4ebca9(0x1b2)]};return _0x6838fd[_0x4ebca9(0x1dc)]&&(_0x207bc1[_0x4ebca9(0x1dc)]=_0x6838fd[_0x4ebca9(0x1dc)]),_0x6838fd[_0x4ebca9(0x185)]&&(_0x207bc1[_0x4ebca9(0x185)]=yamlRuleToApi(_0x6838fd[_0x4ebca9(0x185)])),_0x6838fd[_0x4ebca9(0x21f)]&&(_0x207bc1['kind']=_0x6838fd[_0x4ebca9(0x21f)]===_0x4ebca9(0x1cd)?0x0:_0x6838fd[_0x4ebca9(0x21f)]===_0x4ebca9(0x1e9)?0x1:0x2),_0x6838fd[_0x4ebca9(0x19d)]!==undefined&&(_0x207bc1[_0x4ebca9(0x1e7)]=_0x6838fd[_0x4ebca9(0x19d)]),_0x4ad13c&&(_0x207bc1[_0x4ebca9(0x1e8)]=_0x4ad13c),_0x207bc1;}export function segmentDefToUpdateRequest(_0x2b74bb){const _0x1706db=a142_0x521442,_0x4b4bf9={'name':_0x2b74bb[_0x1706db(0x1b2)]};return _0x2b74bb[_0x1706db(0x1dc)]!==undefined&&(_0x4b4bf9['description']=_0x2b74bb[_0x1706db(0x1dc)]),_0x2b74bb['rule']&&(_0x4b4bf9[_0x1706db(0x185)]=yamlRuleToApi(_0x2b74bb['rule'])),_0x2b74bb[_0x1706db(0x21f)]&&(_0x4b4bf9[_0x1706db(0x21f)]=_0x2b74bb[_0x1706db(0x21f)]==='batch'?0x0:_0x2b74bb[_0x1706db(0x21f)]===_0x1706db(0x1e9)?0x1:0x2),_0x4b4bf9;}export function yamlRuleToApi(_0x33622a){const _0x1ace5c=a142_0x521442,_0x532df8=_0x33622a['conditions'][_0x1ace5c(0x1f6)](yamlConditionToApi),_0x485953=_0x532df8[_0x1ace5c(0x1d9)](_0x10103a=>isCompositeType(_0x10103a)&&_0x10103a['description']!==undefined);if(!_0x485953&&_0x532df8['length']>0x0){const _0x4f61c7=[];for(const _0x545237 of _0x532df8){isCompositeType(_0x545237)&&_0x545237['description']===undefined&&_0x545237[_0x1ace5c(0x200)]&&_0x545237['conditions'][_0x1ace5c(0x1d9)](_0x38ce3c=>!isCompositeType(_0x38ce3c))?_0x4f61c7[_0x1ace5c(0x1fb)]({'type':_0x545237[_0x1ace5c(0x21e)],'description':'','conditions':_0x545237[_0x1ace5c(0x200)]}):_0x4f61c7['push']({'type':_0x1ace5c(0x20c),'description':_0x33622a[_0x1ace5c(0x1dc)]||'','conditions':[_0x545237]});}return{'type':_0x33622a[_0x1ace5c(0x21e)],'conditions':_0x4f61c7};}return{'type':_0x33622a['type'],'conditions':_0x532df8,..._0x33622a[_0x1ace5c(0x1dc)]&&{'description':_0x33622a[_0x1ace5c(0x1dc)]}};}function yamlFilterRuleToApi(_0x34eb9c){const _0x4f06db=a142_0x521442,_0x56024a=_0x34eb9c[_0x4f06db(0x200)][_0x4f06db(0x1f6)](yamlConditionToApi);return{'type':_0x34eb9c[_0x4f06db(0x21e)],'conditions':_0x56024a};}function yamlConditionToApi(_0x1d4e27){const _0x11df60=a142_0x521442;if(_0x11df60(0x1c8)in _0x1d4e27&&(_0x1d4e27[_0x11df60(0x21e)]===_0x11df60(0x231)||_0x1d4e27[_0x11df60(0x21e)]==='exclude')){const _0x36e47f=_0x1d4e27;return{'type':_0x11df60(0x20b),'id':_0x36e47f[_0x11df60(0x1c8)],'exclude':_0x36e47f['type']===_0x11df60(0x1e3)};}if(_0x1d4e27[_0x11df60(0x21e)]==='And'||_0x1d4e27[_0x11df60(0x21e)]==='Or'){const _0x54d136=_0x1d4e27;return{'type':_0x54d136[_0x11df60(0x21e)],'conditions':_0x54d136['conditions'][_0x11df60(0x1f6)](yamlConditionToApi),..._0x54d136['description']&&{'description':_0x54d136[_0x11df60(0x1dc)]}};}if(_0x11df60(0x1ea)in _0x1d4e27&&_0x1d4e27['type']===_0x11df60(0x207)){const _0x3b9724=_0x1d4e27;return{'type':_0x11df60(0x207),'column':_0x3b9724[_0x11df60(0x1ea)],'operator':yamlOperatorToApi(_0x3b9724[_0x11df60(0x1a8)])};}const _0x577245=_0x1d4e27,_0x3aa9bb={'type':_0x11df60(0x20d),'leftValue':buildLeftValue(_0x577245),'operator':yamlOperatorToApi(_0x577245[_0x11df60(0x1a8)]),'exclude':_0x577245[_0x11df60(0x1e3)]??![],'arrayMatching':_0x577245[_0x11df60(0x1ec)]??_0x11df60(0x221)};return _0x577245['limit']!==undefined&&(_0x3aa9bb[_0x11df60(0x239)]=_0x577245[_0x11df60(0x239)]),_0x3aa9bb;}function a142_0x46ea(_0x48a238,_0x1361e7){_0x48a238=_0x48a238-0x184;const _0x38f020=a142_0x38f0();let _0x46ea44=_0x38f020[_0x48a238];return _0x46ea44;}function buildAggregationDefFromApi(_0x470bdc){const _0x279359=a142_0x521442,_0x1c1dc6=_0x470bdc['type'];if(_0x1c1dc6===_0x279359(0x1fd))return{'type':_0x1c1dc6,'columns':_0x470bdc[_0x279359(0x1f5)]??[]};if(_0x1c1dc6===_0x279359(0x1da)||_0x1c1dc6===_0x279359(0x22d))return{'type':_0x1c1dc6,'column':_0x470bdc[_0x279359(0x1ea)]??'','orderColumn':_0x470bdc['orderColumn']??'',..._0x470bdc[_0x279359(0x188)]&&{'groupingColumns':_0x470bdc[_0x279359(0x188)]}};if(_0x1c1dc6===_0x279359(0x1cb))return{'type':_0x1c1dc6,..._0x470bdc['groupingColumns']&&{'groupingColumns':_0x470bdc[_0x279359(0x188)]}};return{'type':_0x1c1dc6,'column':_0x470bdc[_0x279359(0x1ea)]??'',..._0x470bdc[_0x279359(0x188)]&&{'groupingColumns':_0x470bdc[_0x279359(0x188)]}};}function buildLeftValue(_0x3739a0){const _0x311e16=a142_0x521442,_0x579f35={};_0x3739a0['attribute']&&_0x3739a0[_0x311e16(0x21e)]!==_0x311e16(0x1ca)&&(_0x579f35['name']=_0x3739a0[_0x311e16(0x189)]);if(_0x3739a0[_0x311e16(0x22f)]){const _0x203395=_0x3739a0[_0x311e16(0x22f)];if(_0x203395[_0x311e16(0x21e)]===_0x311e16(0x1fd))_0x579f35['aggregation']={'type':_0x311e16(0x1fd),'columns':_0x203395[_0x311e16(0x1f5)]};else{if(_0x203395[_0x311e16(0x21e)]===_0x311e16(0x1da)||_0x203395['type']===_0x311e16(0x22d))_0x579f35[_0x311e16(0x22f)]={'type':_0x203395[_0x311e16(0x21e)],'column':_0x203395[_0x311e16(0x1ea)],'orderColumn':_0x203395[_0x311e16(0x1c6)],..._0x203395[_0x311e16(0x188)]&&{'groupingColumns':_0x203395['groupingColumns']}};else _0x203395[_0x311e16(0x21e)]===_0x311e16(0x1cb)?_0x579f35[_0x311e16(0x22f)]={'type':_0x311e16(0x1cb),..._0x203395[_0x311e16(0x188)]&&{'groupingColumns':_0x203395[_0x311e16(0x188)]}}:_0x579f35[_0x311e16(0x22f)]={'type':_0x203395[_0x311e16(0x21e)],'column':_0x203395[_0x311e16(0x1ea)],..._0x203395[_0x311e16(0x188)]&&{'groupingColumns':_0x203395['groupingColumns']}};}}return _0x3739a0[_0x311e16(0x199)]&&(_0x579f35[_0x311e16(0x199)]={'name':_0x3739a0[_0x311e16(0x199)]}),_0x3739a0[_0x311e16(0x203)]&&(_0x579f35[_0x311e16(0x203)]=yamlFilterRuleToApi(filterRuleAsRuleDef(_0x3739a0[_0x311e16(0x203)]))),_0x579f35;}function yamlOperatorToApi(_0x4eedf0){const _0x303657=a142_0x521442,_0xdac9e5={'type':mapYamlOperatorType(_0x4eedf0[_0x303657(0x21e)]),'not':_0x4eedf0[_0x303657(0x184)]??![]};if(isBetweenOperator(_0x4eedf0['type']))return _0x4eedf0[_0x303657(0x1c1)]!==undefined&&(_0xdac9e5[_0x303657(0x218)]=typeof _0x4eedf0[_0x303657(0x1c1)]===_0x303657(0x1a6)?_0x4eedf0[_0x303657(0x1c1)]:String(_0x4eedf0[_0x303657(0x1c1)])),_0x4eedf0['max']!==undefined&&(_0xdac9e5[_0x303657(0x1de)]=typeof _0x4eedf0['max']===_0x303657(0x1a6)?_0x4eedf0[_0x303657(0x1bf)]:String(_0x4eedf0[_0x303657(0x1bf)])),_0xdac9e5;if(_0x4eedf0[_0x303657(0x21e)]==='TimeRange')return _0x4eedf0[_0x303657(0x23c)]&&(_0xdac9e5[_0x303657(0x23c)]=_0x4eedf0[_0x303657(0x23c)]),_0x4eedf0[_0x303657(0x18c)]&&(_0xdac9e5[_0x303657(0x18c)]=_0x4eedf0[_0x303657(0x18c)]),_0x4eedf0['reverse']!==undefined&&(_0xdac9e5[_0x303657(0x222)]=_0x4eedf0[_0x303657(0x222)]),_0xdac9e5;const _0x361baa=getEffectiveValue(_0x4eedf0);if(_0x361baa!==undefined){if(Array['isArray'](_0x361baa))_0xdac9e5['rightValues']=_0x361baa;else isTemporalOperator(_0x4eedf0[_0x303657(0x21e)])?_0xdac9e5['value']=_0x361baa:_0xdac9e5['rightValue']=_0x361baa;}return _0x4eedf0[_0x303657(0x1a7)]&&(_0xdac9e5[_0x303657(0x1a7)]=_0x4eedf0[_0x303657(0x1a7)]),_0xdac9e5;}function mapYamlOperatorType(_0x5cdb6c){return _0x5cdb6c;}export function toYamlString(_0x515b23){const _0x3981ee=a142_0x521442,_0x438c6e=JSON[_0x3981ee(0x22b)](JSON[_0x3981ee(0x1cc)](_0x515b23)),_0x588ac2=a142_0x44fc62[_0x3981ee(0x1cc)](_0x438c6e,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3981ee(0x18a)}),_0x454ce0=[_0x3981ee(0x20e)];let _0x264fe8=_0x588ac2;for(const _0xbf8d9f of _0x454ce0){_0x264fe8=_0x264fe8[_0x3981ee(0x19e)](new RegExp('^('+_0xbf8d9f+')','m'),(_0x497fa7,_0x99bc99,_0x1ccf87)=>{if(_0x1ccf87===0x0||_0x264fe8[_0x1ccf87-0x1]==='\x0a'&&_0x264fe8[_0x1ccf87-0x2]==='\x0a')return _0x99bc99;return'\x0a'+_0x99bc99;});}return _0x264fe8;}export function parseYamlString(_0x7f372b){return parseSegmentYamlFile(_0x7f372b);}export function isSegmentYaml(_0xdd8a72){const _0x5954ff=a142_0x521442;if(typeof _0xdd8a72!==_0x5954ff(0x1a6)||_0xdd8a72===null)return![];const _0x326e73=_0xdd8a72;return _0x326e73['type']===_0x5954ff(0x1c8)||_0x326e73[_0x5954ff(0x21e)]===undefined;}export function generateTemplate(_0xc9c65d=a142_0x521442(0x237)){const _0x17eec5=a142_0x521442,_0x3df7a7={'type':_0x17eec5(0x1c8),'name':_0xc9c65d,'description':_0x17eec5(0x1e1),'rule':{'type':_0x17eec5(0x20c),'conditions':[{'type':_0x17eec5(0x20d),'attribute':_0x17eec5(0x202),'operator':{'type':'Equal','value':'value'}}]}};return toYamlString(_0x3df7a7);}export function segmentToYamlString(_0x54cfb8){const _0x4e5681=a142_0x521442,_0x613b7a=JSON[_0x4e5681(0x22b)](JSON[_0x4e5681(0x1cc)](_0x54cfb8)),_0x3b66fe=a142_0x44fc62[_0x4e5681(0x1cc)](_0x613b7a,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x4e5681(0x18a)}),_0x48ff8e=[_0x4e5681(0x20e),_0x4e5681(0x229)];let _0x3d84f5=_0x3b66fe;for(const _0x441386 of _0x48ff8e){_0x3d84f5=_0x3d84f5['replace'](new RegExp('^('+_0x441386+')','m'),(_0x146a50,_0x359352,_0x2b11bf)=>{if(_0x2b11bf===0x0||_0x3d84f5[_0x2b11bf-0x1]==='\x0a'&&_0x3d84f5[_0x2b11bf-0x2]==='\x0a')return _0x359352;return'\x0a'+_0x359352;});}return _0x3d84f5;}export function parseSegmentYamlFile(_0x1f6049){return safeParseYaml(_0x1f6049,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x34ce25){const _0x1c736c=a142_0x521442;return{'type':_0x1c736c(0x1c8),'name':_0x34ce25['name'],..._0x34ce25[_0x1c736c(0x1dc)]!==undefined&&{'description':_0x34ce25[_0x1c736c(0x1dc)]},..._0x34ce25['folder']!==undefined&&{'folder':_0x34ce25[_0x1c736c(0x210)]},..._0x34ce25['rule']&&{'rule':normalizeRule(_0x34ce25[_0x1c736c(0x185)])},..._0x34ce25[_0x1c736c(0x21f)]!==undefined&&{'kind':_0x34ce25[_0x1c736c(0x21f)]},..._0x34ce25['visible']!==undefined&&{'visible':_0x34ce25[_0x1c736c(0x19d)]},..._0x34ce25[_0x1c736c(0x1d8)]&&{'activations':_0x34ce25[_0x1c736c(0x1d8)][_0x1c736c(0x1f6)](normalizeActivation)}};}export function normalizeRule(_0x217a4b){const _0xd53a25=a142_0x521442;return{'type':_0x217a4b['type'],'conditions':_0x217a4b[_0xd53a25(0x200)]['map'](normalizeCondition),..._0x217a4b['description']!==undefined&&{'description':_0x217a4b[_0xd53a25(0x1dc)]}};}function normalizeCondition(_0x3aa069){const _0x56edf3=a142_0x521442;if('segment'in _0x3aa069&&(_0x3aa069[_0x56edf3(0x21e)]===_0x56edf3(0x231)||_0x3aa069[_0x56edf3(0x21e)]===_0x56edf3(0x1e3))){const _0x99f9d5=_0x3aa069;return{'type':_0x99f9d5['type'],'segment':_0x99f9d5[_0x56edf3(0x1c8)]};}if(_0x3aa069['type']===_0x56edf3(0x20c)||_0x3aa069['type']==='Or'){const _0x10726a=_0x3aa069;return{'type':_0x10726a[_0x56edf3(0x21e)],'conditions':_0x10726a[_0x56edf3(0x200)][_0x56edf3(0x1f6)](normalizeCondition),..._0x10726a[_0x56edf3(0x1dc)]!==undefined&&{'description':_0x10726a[_0x56edf3(0x1dc)]}};}if('column'in _0x3aa069&&_0x3aa069[_0x56edf3(0x21e)]===_0x56edf3(0x207)){const _0x1a6747=_0x3aa069;return{'type':'Column','column':_0x1a6747[_0x56edf3(0x1ea)],'operator':normalizeOperator(_0x1a6747[_0x56edf3(0x1a8)])};}if(_0x3aa069[_0x56edf3(0x21e)]===_0x56edf3(0x1ca)){const _0x3c6345=_0x3aa069;return{'type':_0x56edf3(0x1ca),'attribute':_0x3c6345[_0x56edf3(0x189)],'operator':normalizeOperator(_0x3c6345[_0x56edf3(0x1a8)]),..._0x3c6345[_0x56edf3(0x1ec)]!==undefined&&{'arrayMatching':_0x3c6345[_0x56edf3(0x1ec)]},..._0x3c6345[_0x56edf3(0x1e3)]!==undefined&&{'exclude':_0x3c6345[_0x56edf3(0x1e3)]},..._0x3c6345[_0x56edf3(0x22f)]!==undefined&&{'aggregation':_0x3c6345['aggregation']},..._0x3c6345[_0x56edf3(0x199)]!==undefined&&{'source':_0x3c6345['source']},..._0x3c6345[_0x56edf3(0x203)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x3c6345[_0x56edf3(0x203)])))},..._0x3c6345[_0x56edf3(0x236)]!==undefined&&{'timeWindow':_0x3c6345[_0x56edf3(0x236)]},..._0x3c6345[_0x56edf3(0x239)]!==undefined&&{'limit':_0x3c6345[_0x56edf3(0x239)]}};}const _0x3c17e5=_0x3aa069;return{'type':_0x56edf3(0x20d),'attribute':_0x3c17e5['attribute'],'operator':normalizeOperator(_0x3c17e5[_0x56edf3(0x1a8)]),..._0x3c17e5['arrayMatching']!==undefined&&{'arrayMatching':_0x3c17e5[_0x56edf3(0x1ec)]},..._0x3c17e5[_0x56edf3(0x1e3)]!==undefined&&{'exclude':_0x3c17e5[_0x56edf3(0x1e3)]},..._0x3c17e5[_0x56edf3(0x22f)]!==undefined&&{'aggregation':_0x3c17e5[_0x56edf3(0x22f)]},..._0x3c17e5[_0x56edf3(0x199)]!==undefined&&{'source':_0x3c17e5[_0x56edf3(0x199)]},..._0x3c17e5[_0x56edf3(0x203)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x3c17e5[_0x56edf3(0x203)])))},..._0x3c17e5[_0x56edf3(0x239)]!==undefined&&{'limit':_0x3c17e5['limit']}};}function normalizeOperator(_0x4b30c6){const _0xd63de4=a142_0x521442;if(isBetweenOperator(_0x4b30c6[_0xd63de4(0x21e)]))return{'type':_0x4b30c6[_0xd63de4(0x21e)],..._0x4b30c6[_0xd63de4(0x184)]!==undefined&&{'not':_0x4b30c6[_0xd63de4(0x184)]},..._0x4b30c6[_0xd63de4(0x1c1)]!==undefined&&{'min':_0x4b30c6[_0xd63de4(0x1c1)]},..._0x4b30c6['max']!==undefined&&{'max':_0x4b30c6[_0xd63de4(0x1bf)]}};const _0x272f10=getEffectiveValue(_0x4b30c6);return{'type':_0x4b30c6[_0xd63de4(0x21e)],..._0x4b30c6[_0xd63de4(0x184)]!==undefined&&{'not':_0x4b30c6[_0xd63de4(0x184)]},..._0x272f10!==undefined&&{'value':_0x272f10},..._0x4b30c6[_0xd63de4(0x1a7)]!==undefined&&{'unit':_0x4b30c6['unit']},..._0x4b30c6[_0xd63de4(0x23c)]!==undefined&&{'duration':_0x4b30c6[_0xd63de4(0x23c)]},..._0x4b30c6[_0xd63de4(0x18c)]!==undefined&&{'from':_0x4b30c6[_0xd63de4(0x18c)]},..._0x4b30c6['reverse']!==undefined&&{'reverse':_0x4b30c6[_0xd63de4(0x222)]}};}function normalizeActivation(_0x47bcbe){const _0xa612ed=a142_0x521442;return{'name':_0x47bcbe[_0xa612ed(0x1b2)],'connection':_0x47bcbe[_0xa612ed(0x1ae)],..._0x47bcbe['description']!==undefined&&{'description':_0x47bcbe[_0xa612ed(0x1dc)]},..._0x47bcbe[_0xa612ed(0x196)]!==undefined&&{'all_columns':_0x47bcbe['all_columns']},..._0x47bcbe[_0xa612ed(0x1f5)]!==undefined&&{'columns':_0x47bcbe[_0xa612ed(0x1f5)]},..._0x47bcbe[_0xa612ed(0x18d)]!==undefined&&{'behavior':_0x47bcbe['behavior']},..._0x47bcbe[_0xa612ed(0x20f)]!==undefined&&{'schedule':_0x47bcbe['schedule']},..._0x47bcbe[_0xa612ed(0x18b)]!==undefined&&{'notification':_0x47bcbe['notification']},..._0x47bcbe[_0xa612ed(0x1b6)]!==undefined&&{'connector_config':_0x47bcbe[_0xa612ed(0x1b6)]},..._0x47bcbe['activation_template_id']!==undefined&&{'activation_template_id':_0x47bcbe[_0xa612ed(0x1ed)]},..._0x47bcbe[_0xa612ed(0x1f1)]!==undefined&&{'nested_workflow_project_name':_0x47bcbe['nested_workflow_project_name']},..._0x47bcbe[_0xa612ed(0x220)]!==undefined&&{'nested_workflow_name':_0x47bcbe[_0xa612ed(0x220)]},..._0x47bcbe[_0xa612ed(0x22e)]!==undefined&&{'lock_enabled':_0x47bcbe[_0xa612ed(0x22e)]}};}function getColumnName(_0x1f740c){const _0x4a3e5c=a142_0x521442;return _0x1f740c['column']||_0x1f740c[_0x4a3e5c(0x1b2)];}export function activationResponseToDef(_0x514d4e,_0x4f9a05,_0x47d14d){const _0x5f4e3a=a142_0x521442,_0x34be63=_0x514d4e[_0x5f4e3a(0x206)]||'',_0x308679=_0x47d14d?.[_0x5f4e3a(0x194)](_0x34be63)??_0x34be63,_0x26f198={'name':_0x514d4e['name'],'connection':_0x308679};_0x514d4e[_0x5f4e3a(0x1dc)]&&(_0x26f198[_0x5f4e3a(0x1dc)]=_0x514d4e[_0x5f4e3a(0x1dc)]);let _0x4cdbff=[];_0x514d4e[_0x5f4e3a(0x1f5)]&&_0x514d4e[_0x5f4e3a(0x1f5)][_0x5f4e3a(0x1d2)]>0x0&&(_0x4cdbff=_0x514d4e[_0x5f4e3a(0x1f5)][_0x5f4e3a(0x203)](_0x4f14dc=>_0x4f14dc&&getColumnName(_0x4f14dc))[_0x5f4e3a(0x1f6)](_0x4ed751=>{const _0x8600b8=_0x5f4e3a,_0x50987b=getColumnName(_0x4ed751);if(_0x4ed751[_0x8600b8(0x21e)]||_0x4ed751[_0x8600b8(0x225)])return{'name':_0x50987b,..._0x4ed751['type']&&{'type':_0x4ed751['type']},..._0x4ed751[_0x8600b8(0x225)]&&{'visibility':_0x4ed751[_0x8600b8(0x225)]}};return _0x50987b;}));_0x4cdbff[_0x5f4e3a(0x1d2)]>0x0&&(_0x26f198[_0x5f4e3a(0x1f5)]=_0x4cdbff);_0x514d4e[_0x5f4e3a(0x1e2)]!==undefined&&(_0x514d4e[_0x5f4e3a(0x1e2)]===![]&&_0x4cdbff['length']===0x0?_0x26f198[_0x5f4e3a(0x196)]=!![]:_0x26f198['all_columns']=_0x514d4e[_0x5f4e3a(0x1e2)]);const _0x386653={};let _0x2386f9=![];_0x514d4e[_0x5f4e3a(0x1ff)]&&(_0x386653[_0x5f4e3a(0x21e)]=_0x514d4e['scheduleType'],_0x2386f9=!![]);_0x514d4e['repeatUnit']&&(_0x386653['repeat_unit']=_0x514d4e[_0x5f4e3a(0x1bb)],_0x2386f9=!![]);_0x514d4e[_0x5f4e3a(0x1f2)]!==undefined&&_0x514d4e[_0x5f4e3a(0x1f2)]!==null&&(_0x386653[_0x5f4e3a(0x204)]=_0x514d4e[_0x5f4e3a(0x1f2)],_0x2386f9=!![]);_0x514d4e['repeatSubFrequency']&&_0x514d4e['repeatSubFrequency']['length']>0x0&&(_0x386653[_0x5f4e3a(0x21b)]=_0x514d4e[_0x5f4e3a(0x1d4)],_0x2386f9=!![]);_0x514d4e[_0x5f4e3a(0x208)]!==undefined&&(_0x386653[_0x5f4e3a(0x230)]=_0x514d4e[_0x5f4e3a(0x208)],_0x2386f9=!![]);_0x514d4e[_0x5f4e3a(0x215)]!==undefined&&(_0x386653[_0x5f4e3a(0x23d)]=_0x514d4e[_0x5f4e3a(0x215)],_0x2386f9=!![]);_0x514d4e[_0x5f4e3a(0x1fe)]&&(_0x386653[_0x5f4e3a(0x1fe)]=_0x514d4e[_0x5f4e3a(0x1fe)],_0x2386f9=!![]);_0x2386f9&&(_0x26f198[_0x5f4e3a(0x20f)]=_0x386653);(_0x514d4e[_0x5f4e3a(0x1c2)]&&_0x514d4e['notifyOn'][_0x5f4e3a(0x1d2)]>0x0||_0x514d4e[_0x5f4e3a(0x1b9)]&&_0x514d4e[_0x5f4e3a(0x1b9)][_0x5f4e3a(0x1d2)]>0x0)&&(_0x26f198[_0x5f4e3a(0x18b)]={},_0x514d4e[_0x5f4e3a(0x1c2)]&&_0x514d4e[_0x5f4e3a(0x1c2)][_0x5f4e3a(0x1d2)]>0x0&&(_0x26f198[_0x5f4e3a(0x18b)][_0x5f4e3a(0x19a)]=_0x514d4e[_0x5f4e3a(0x1c2)]),_0x514d4e[_0x5f4e3a(0x1b9)]&&_0x514d4e['emailRecipients']['length']>0x0&&(_0x26f198[_0x5f4e3a(0x18b)][_0x5f4e3a(0x1c7)]=_0x514d4e['emailRecipients'][_0x5f4e3a(0x1f6)](_0x4b1791=>{const _0x51c2af=_0x4f9a05?.['get'](_0x4b1791);return _0x51c2af??String(_0x4b1791);})));_0x514d4e['connectorConfig']&&Object[_0x5f4e3a(0x1b5)](_0x514d4e[_0x5f4e3a(0x1b0)])[_0x5f4e3a(0x1d2)]>0x0&&(_0x26f198['connector_config']=normalizeConnectorConfigForYaml(_0x514d4e[_0x5f4e3a(0x1b0)]));_0x514d4e['activationTemplateId']&&(_0x26f198['activation_template_id']=_0x514d4e[_0x5f4e3a(0x198)]);if(_0x514d4e['syndicationBehavior']){const _0x3c72e1={},_0x19eef3=_0x514d4e[_0x5f4e3a(0x205)];_0x19eef3[_0x5f4e3a(0x1f5)]&&_0x19eef3[_0x5f4e3a(0x1f5)][_0x5f4e3a(0x1d2)]>0x0&&(_0x3c72e1[_0x5f4e3a(0x1f5)]=_0x19eef3[_0x5f4e3a(0x1f5)][_0x5f4e3a(0x203)](_0x574b20=>_0x574b20&&getColumnName(_0x574b20))[_0x5f4e3a(0x1f6)](_0x4f4f28=>({'name':getColumnName(_0x4f4f28),..._0x4f4f28[_0x5f4e3a(0x21e)]&&{'type':_0x4f4f28[_0x5f4e3a(0x21e)]},..._0x4f4f28[_0x5f4e3a(0x225)]&&{'visibility':_0x4f4f28[_0x5f4e3a(0x225)]}}))),_0x19eef3[_0x5f4e3a(0x238)]&&(_0x3c72e1['behavior_table']=_0x19eef3['behaviorTableName']),_0x19eef3[_0x5f4e3a(0x1eb)]!==undefined&&(_0x3c72e1[_0x5f4e3a(0x1ee)]=_0x19eef3[_0x5f4e3a(0x1eb)]),_0x19eef3['joinStrategy']&&(_0x3c72e1[_0x5f4e3a(0x211)]=_0x19eef3[_0x5f4e3a(0x234)]),_0x19eef3[_0x5f4e3a(0x1fc)]&&(_0x3c72e1[_0x5f4e3a(0x1fc)]=_0x19eef3[_0x5f4e3a(0x1fc)]),_0x19eef3[_0x5f4e3a(0x19f)]&&_0x19eef3[_0x5f4e3a(0x19f)][_0x5f4e3a(0x1d2)]>0x0&&(_0x3c72e1['order_by']=_0x19eef3['orderBy']),Object[_0x5f4e3a(0x1b5)](_0x3c72e1)[_0x5f4e3a(0x1d2)]>0x0&&(_0x26f198[_0x5f4e3a(0x18d)]=_0x3c72e1);}return _0x514d4e[_0x5f4e3a(0x1e4)]&&(_0x26f198[_0x5f4e3a(0x1f1)]=_0x514d4e['nestedWorkflowProjectName']),_0x514d4e['nestedWorkflowName']&&(_0x26f198[_0x5f4e3a(0x220)]=_0x514d4e[_0x5f4e3a(0x23a)]),_0x514d4e['lockEnabled']!==undefined&&(_0x26f198[_0x5f4e3a(0x22e)]=_0x514d4e[_0x5f4e3a(0x1c4)]),_0x26f198;}export function journeyActivationStepToYaml(_0x466564,_0x4d937b,_0x16e27b){const _0x579a65=a142_0x521442,_0x6cf602=_0x466564['attributes']['activationParams'],_0x24eaf1=_0x6cf602[_0x579a65(0x206)]||'',_0xbb26e1=_0x16e27b?.[_0x579a65(0x194)](_0x24eaf1)??_0x24eaf1,_0x377c8c={'name':_0x6cf602['name']||'','connection':_0xbb26e1};_0x466564[_0x579a65(0x209)][_0x579a65(0x1ef)]&&(_0x377c8c[_0x579a65(0x187)]=!![]);_0x6cf602['description']&&(_0x377c8c[_0x579a65(0x1dc)]=_0x6cf602[_0x579a65(0x1dc)]);let _0x26399c=[];_0x6cf602[_0x579a65(0x1f5)]&&_0x6cf602[_0x579a65(0x1f5)][_0x579a65(0x1d2)]>0x0&&(_0x26399c=_0x6cf602[_0x579a65(0x1f5)][_0x579a65(0x203)](_0x16067f=>_0x16067f&&getColumnName(_0x16067f))['map'](_0x2fb2f9=>{const _0x91637b=_0x579a65,_0x3166db=getColumnName(_0x2fb2f9);if(_0x2fb2f9['type']||_0x2fb2f9[_0x91637b(0x225)])return{'name':_0x3166db,..._0x2fb2f9['type']&&{'type':_0x2fb2f9['type']},..._0x2fb2f9[_0x91637b(0x225)]&&{'visibility':_0x2fb2f9['visibility']}};return _0x3166db;}));_0x26399c['length']>0x0&&(_0x377c8c['columns']=_0x26399c);_0x6cf602[_0x579a65(0x1e2)]!==undefined&&(_0x6cf602[_0x579a65(0x1e2)]===![]&&_0x26399c[_0x579a65(0x1d2)]===0x0?_0x377c8c[_0x579a65(0x196)]=!![]:_0x377c8c[_0x579a65(0x196)]=_0x6cf602[_0x579a65(0x1e2)]);const _0x1f022a={};let _0x2aaf6f=![];_0x6cf602['scheduleType']&&(_0x1f022a[_0x579a65(0x21e)]=_0x6cf602['scheduleType'],_0x2aaf6f=!![]);_0x6cf602[_0x579a65(0x1bb)]&&(_0x1f022a['repeat_unit']=_0x6cf602[_0x579a65(0x1bb)],_0x2aaf6f=!![]);_0x6cf602[_0x579a65(0x1f2)]!==undefined&&_0x6cf602[_0x579a65(0x1f2)]!==null&&(_0x1f022a[_0x579a65(0x204)]=_0x6cf602[_0x579a65(0x1f2)],_0x2aaf6f=!![]);_0x6cf602[_0x579a65(0x208)]!==undefined&&(_0x1f022a[_0x579a65(0x230)]=_0x6cf602['startAt'],_0x2aaf6f=!![]);_0x6cf602['endOn']!==undefined&&(_0x1f022a[_0x579a65(0x23d)]=_0x6cf602[_0x579a65(0x215)],_0x2aaf6f=!![]);_0x6cf602[_0x579a65(0x1fe)]&&(_0x1f022a[_0x579a65(0x1fe)]=_0x6cf602[_0x579a65(0x1fe)],_0x2aaf6f=!![]);_0x2aaf6f&&(_0x377c8c['schedule']=_0x1f022a);(_0x6cf602[_0x579a65(0x1c2)]&&_0x6cf602['notifyOn'][_0x579a65(0x1d2)]>0x0||_0x6cf602['emailRecipients']&&_0x6cf602[_0x579a65(0x1b9)][_0x579a65(0x1d2)]>0x0)&&(_0x377c8c[_0x579a65(0x18b)]={},_0x6cf602[_0x579a65(0x1c2)]&&_0x6cf602[_0x579a65(0x1c2)]['length']>0x0&&(_0x377c8c[_0x579a65(0x18b)][_0x579a65(0x19a)]=_0x6cf602[_0x579a65(0x1c2)]),_0x6cf602[_0x579a65(0x1b9)]&&_0x6cf602[_0x579a65(0x1b9)]['length']>0x0&&(_0x377c8c[_0x579a65(0x18b)][_0x579a65(0x1c7)]=_0x6cf602[_0x579a65(0x1b9)]['map'](_0x2a1fee=>{const _0x39dd17=_0x579a65,_0x266d66=_0x4d937b?.[_0x39dd17(0x194)](_0x2a1fee);return _0x266d66??String(_0x2a1fee);})));_0x6cf602[_0x579a65(0x1b0)]&&Object[_0x579a65(0x1b5)](_0x6cf602[_0x579a65(0x1b0)])[_0x579a65(0x1d2)]>0x0&&(_0x377c8c['connector_config']=normalizeConnectorConfigForYaml(_0x6cf602[_0x579a65(0x1b0)]));_0x6cf602['activationTemplateId']&&(_0x377c8c[_0x579a65(0x1ed)]=_0x6cf602[_0x579a65(0x198)]);if(_0x6cf602['syndicationBehavior']){const _0x1d479a={},_0x35a429=_0x6cf602[_0x579a65(0x205)];_0x35a429['columns']&&_0x35a429[_0x579a65(0x1f5)]['length']>0x0&&(_0x1d479a[_0x579a65(0x1f5)]=_0x35a429[_0x579a65(0x1f5)][_0x579a65(0x203)](_0x5466aa=>_0x5466aa&&getColumnName(_0x5466aa))['map'](_0x267b78=>({'name':getColumnName(_0x267b78),..._0x267b78[_0x579a65(0x21e)]&&{'type':_0x267b78[_0x579a65(0x21e)]},..._0x267b78['visibility']&&{'visibility':_0x267b78['visibility']}}))),_0x35a429['behaviorTableName']&&(_0x1d479a['behavior_table']=_0x35a429[_0x579a65(0x238)]),_0x35a429[_0x579a65(0x1eb)]!==undefined&&(_0x1d479a[_0x579a65(0x1ee)]=_0x35a429[_0x579a65(0x1eb)]),_0x35a429['joinStrategy']&&(_0x1d479a[_0x579a65(0x211)]=_0x35a429['joinStrategy']),_0x35a429[_0x579a65(0x1fc)]&&(_0x1d479a[_0x579a65(0x1fc)]=_0x35a429[_0x579a65(0x1fc)]),_0x35a429['orderBy']&&_0x35a429[_0x579a65(0x19f)]['length']>0x0&&(_0x1d479a[_0x579a65(0x216)]=_0x35a429[_0x579a65(0x19f)]),Object['keys'](_0x1d479a)[_0x579a65(0x1d2)]>0x0&&(_0x377c8c[_0x579a65(0x18d)]=_0x1d479a);}return _0x377c8c;}export function segmentWithActivationsToYaml(_0x16df67,_0x420e4f,_0xd2821d,_0x243c69,_0x363e4a){const _0x51ebe0=a142_0x521442,_0x28f9ca=segmentResponseToDefSync(_0x16df67,_0xd2821d);return _0x420e4f[_0x51ebe0(0x1d2)]>0x0&&(_0x28f9ca[_0x51ebe0(0x1d8)]=_0x420e4f['map'](_0x91ee92=>activationResponseToDef(_0x91ee92,_0x243c69,_0x363e4a))),_0x28f9ca;}function normalizeColumn(_0x29c317){const _0x366512=a142_0x521442;if(typeof _0x29c317==='string')return{'column':_0x29c317,'source':{'column':_0x29c317}};return{'column':_0x29c317['name'],'source':{'column':_0x29c317[_0x366512(0x1b2)]},..._0x29c317['type']&&{'type':_0x29c317[_0x366512(0x21e)]},..._0x29c317['visibility']&&{'visibility':_0x29c317['visibility']}};}const KNOWN_ACTIVATION_FIELDS=new Set(Object[a142_0x521442(0x1b5)](ActivationDefSchema[a142_0x521442(0x1a3)]));export function warnUnrecognizedActivationFields(_0x36f15b,_0x7e780d){const _0x4ec7ca=a142_0x521442,_0x4f8558=Object[_0x4ec7ca(0x1b5)](_0x36f15b)['filter'](_0x146ff6=>!KNOWN_ACTIVATION_FIELDS[_0x4ec7ca(0x1bc)](_0x146ff6));if(_0x4f8558[_0x4ec7ca(0x1d2)]>0x0){const _0x25fa6d=_0x4f8558[_0x4ec7ca(0x1f6)](_0x2df118=>_0x4ec7ca(0x23e)+_0x2df118+'\x22')[_0x4ec7ca(0x214)]('\x0a');console[_0x4ec7ca(0x19b)](_0x4ec7ca(0x1ac)+_0x7e780d+_0x4ec7ca(0x1f8)+_0x25fa6d);}}export async function activationDefToCreateRequest(_0x5e37f9,_0x526cf1){const _0x523918=a142_0x521442;warnUnrecognizedActivationFields(_0x5e37f9,_0x5e37f9['name']);const _0x4438c4=_0x526cf1?.[_0x523918(0x193)],_0x5b4ee6=_0x526cf1?.[_0x523918(0x1b4)],_0x1840c8=_0x5e37f9['connection'];let _0x2d9085;const _0x2b0c72=parseInt(_0x1840c8,0xa);if(!isNaN(_0x2b0c72)&&String(_0x2b0c72)===_0x1840c8)_0x2d9085=_0x2b0c72;else{const _0x1354b1=_0x5b4ee6?.['get'](_0x1840c8);if(_0x1354b1===undefined)throw new SDKError(ErrorCode[_0x523918(0x213)],_0x523918(0x1db)+_0x1840c8,undefined,{'helpText':_0x523918(0x21c)});_0x2d9085=_0x1354b1;}const _0x1fee6b={'name':_0x5e37f9['name'],'connectionId':_0x2d9085};_0x5e37f9[_0x523918(0x1dc)]&&(_0x1fee6b[_0x523918(0x1dc)]=_0x5e37f9['description']);let _0x46791d=[];_0x5e37f9[_0x523918(0x1f5)]&&_0x5e37f9[_0x523918(0x1f5)][_0x523918(0x1d2)]>0x0&&(_0x46791d=_0x5e37f9[_0x523918(0x1f5)][_0x523918(0x203)](_0x59e367=>_0x59e367!=null)[_0x523918(0x1f6)](normalizeColumn));_0x46791d['length']>0x0&&(_0x1fee6b[_0x523918(0x1f5)]=_0x46791d);_0x5e37f9[_0x523918(0x196)]!==undefined&&(_0x5e37f9['all_columns']===![]&&_0x46791d[_0x523918(0x1d2)]===0x0?_0x1fee6b[_0x523918(0x1e2)]=!![]:_0x1fee6b[_0x523918(0x1e2)]=_0x5e37f9[_0x523918(0x196)]);if(_0x5e37f9[_0x523918(0x20f)]){const _0x376660=_0x5e37f9['schedule'],_0x1aa742=_0x376660[_0x523918(0x21e)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x376660[_0x523918(0x226)]];_0x1aa742&&(_0x1fee6b[_0x523918(0x1ff)]=_0x1aa742);const _0x3832f1=_0x376660[_0x523918(0x226)]??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x376660[_0x523918(0x21e)]];_0x3832f1&&(_0x1fee6b[_0x523918(0x1bb)]=_0x3832f1);_0x376660[_0x523918(0x204)]!==undefined&&(_0x1fee6b[_0x523918(0x1f2)]=_0x376660[_0x523918(0x204)]);_0x376660['repeat_sub_frequency']&&(_0x1fee6b[_0x523918(0x1d4)]=_0x376660[_0x523918(0x21b)]);_0x376660[_0x523918(0x230)]!==undefined&&(_0x1fee6b['startAt']=_0x376660[_0x523918(0x230)]);_0x376660[_0x523918(0x23d)]!==undefined&&(_0x1fee6b[_0x523918(0x215)]=_0x376660['end_on']);_0x376660[_0x523918(0x1fe)]&&(_0x1fee6b[_0x523918(0x1fe)]=_0x376660['timezone']);if(_0x1aa742&&_0x1aa742!==_0x523918(0x219)&&_0x1aa742!=='cron'&&_0x376660[_0x523918(0x230)]){const _0x5f0835=_0x376660[_0x523918(0x230)][_0x523918(0x1a9)](/T(\d{2}:\d{2})/);_0x5f0835&&(_0x1fee6b[_0x523918(0x1d6)]=_0x5f0835[0x1]);}}_0x5e37f9[_0x523918(0x18b)]&&(_0x5e37f9[_0x523918(0x18b)]['notify_on']&&(_0x1fee6b[_0x523918(0x1c2)]=_0x5e37f9['notification'][_0x523918(0x19a)]),_0x5e37f9[_0x523918(0x18b)][_0x523918(0x1c7)]&&(_0x1fee6b[_0x523918(0x1b9)]=_0x5e37f9['notification'][_0x523918(0x1c7)]['map'](_0x9c675f=>{const _0x159dbf=_0x523918,_0x1ade17=Number(_0x9c675f);if(!isNaN(_0x1ade17)&&String(_0x1ade17)===_0x9c675f)return _0x1ade17;const _0x28c45e=_0x4438c4?.[_0x159dbf(0x194)](_0x9c675f[_0x159dbf(0x1a1)]());if(_0x28c45e===undefined)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Unknown\x20email\x20recipient:\x20'+_0x9c675f+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x28c45e;})));if(_0x5e37f9['connector_config']){const _0xd80000=_0x526cf1?.[_0x523918(0x1b3)]?.[_0x523918(0x194)](_0x1840c8);if(_0xd80000&&_0x526cf1?.[_0x523918(0x1cf)])try{const _0x6f02af=await _0x526cf1[_0x523918(0x1cf)](_0xd80000),_0xc87b98=validateConnectorConfig(_0x5e37f9[_0x523918(0x1b6)],_0x6f02af);if(!_0xc87b98[_0x523918(0x191)])throw new SDKError(ErrorCode[_0x523918(0x21d)],_0x523918(0x1b8)+_0x5e37f9[_0x523918(0x1b2)]+_0x523918(0x1ad)+formatValidationErrors(_0xc87b98[_0x523918(0x201)]),undefined,{'helpText':_0x523918(0x224)+_0xd80000+_0x523918(0x197)+formatSchemaAsHelp(_0x6f02af)});if(_0xc87b98['warnings'][_0x523918(0x1d2)]>0x0){const _0x382d2b=formatValidationWarnings(_0xc87b98[_0x523918(0x186)]);console[_0x523918(0x19b)](_0x523918(0x228)+_0x5e37f9[_0x523918(0x1b2)]+_0x523918(0x1ad)+_0x382d2b);}_0x1fee6b[_0x523918(0x1b0)]=transformConfigToLegacy(_0x5e37f9[_0x523918(0x1b6)],_0x6f02af);}catch(_0x1e760b){if(_0x1e760b instanceof SDKError&&_0x1e760b[_0x523918(0x1d5)]===ErrorCode[_0x523918(0x192)])_0x1fee6b[_0x523918(0x1b0)]=_0x5e37f9[_0x523918(0x1b6)];else throw _0x1e760b;}else _0x1fee6b[_0x523918(0x1b0)]=_0x5e37f9['connector_config'];}_0x5e37f9['activation_template_id']!==undefined&&(_0x1fee6b[_0x523918(0x198)]=_0x5e37f9[_0x523918(0x1ed)]);if(_0x5e37f9[_0x523918(0x18d)]){const _0x5b8e19=_0x5e37f9[_0x523918(0x18d)],_0x42e71c={};if(_0x5b8e19['columns']&&_0x5b8e19[_0x523918(0x1f5)]['length']>0x0){const _0x3c2395=_0x5b8e19[_0x523918(0x1f5)][_0x523918(0x203)](_0x3905e8=>_0x3905e8&&_0x3905e8[_0x523918(0x1b2)])['map'](normalizeColumn);_0x3c2395[_0x523918(0x1d2)]>0x0&&(_0x42e71c[_0x523918(0x1f5)]=_0x3c2395);}_0x5b8e19[_0x523918(0x1d7)]&&(_0x42e71c['behaviorTableName']=_0x5b8e19[_0x523918(0x1d7)]);_0x5b8e19[_0x523918(0x211)]&&(_0x42e71c[_0x523918(0x234)]=_0x5b8e19['join_strategy']);if(_0x5b8e19['join_row']!==undefined)_0x42e71c[_0x523918(0x1eb)]=_0x5b8e19[_0x523918(0x1ee)];else{if(_0x5b8e19['join_strategy']===_0x523918(0x22d)||_0x5b8e19[_0x523918(0x211)]===_0x523918(0x1da))_0x42e71c[_0x523918(0x1eb)]=0x1;else _0x5b8e19[_0x523918(0x211)]===_0x523918(0x23b)&&(_0x42e71c[_0x523918(0x1eb)]=null);}_0x5b8e19[_0x523918(0x1fc)]&&(_0x42e71c['formatting']=_0x5b8e19['formatting']),_0x5b8e19[_0x523918(0x216)]&&(_0x42e71c[_0x523918(0x19f)]=_0x5b8e19[_0x523918(0x216)]),_0x1fee6b['syndicationBehavior']=_0x42e71c;}return _0x5e37f9['nested_workflow_project_name']&&(_0x1fee6b[_0x523918(0x1e4)]=_0x5e37f9[_0x523918(0x1f1)]),_0x5e37f9[_0x523918(0x220)]&&(_0x1fee6b[_0x523918(0x23a)]=_0x5e37f9[_0x523918(0x220)]),_0x5e37f9[_0x523918(0x22e)]!==undefined&&(_0x1fee6b[_0x523918(0x1c4)]=_0x5e37f9[_0x523918(0x22e)]),_0x1fee6b;}export async function activationDefToUpdateRequest(_0x3ae444,_0x744b1f){return activationDefToCreateRequest(_0x3ae444,_0x744b1f);}export function deepSortObject(_0x42eeb4){const _0x2f922c=a142_0x521442;if(_0x42eeb4===null||typeof _0x42eeb4!==_0x2f922c(0x1a6))return _0x42eeb4;if(Array[_0x2f922c(0x1dd)](_0x42eeb4))return _0x42eeb4[_0x2f922c(0x1f6)](deepSortObject)[_0x2f922c(0x1d3)]((_0x37ae6b,_0x4251ef)=>JSON[_0x2f922c(0x1cc)](_0x37ae6b)[_0x2f922c(0x1c0)](JSON[_0x2f922c(0x1cc)](_0x4251ef)));const _0xad9fd1={};for(const _0x302a4d of Object[_0x2f922c(0x1b5)](_0x42eeb4)[_0x2f922c(0x1d3)]()){_0xad9fd1[_0x302a4d]=deepSortObject(_0x42eeb4[_0x302a4d]);}return _0xad9fd1;}export function serializeRule(_0x5a32ba){const _0x3c13c6=a142_0x521442;return JSON[_0x3c13c6(0x1cc)](deepSortObject(_0x5a32ba));}export function normalizeRuleForMatching(_0x542b3a){return normalizeConditionsForMatching(_0x542b3a);}function normalizeConditionsForMatching(_0x2efda2){const _0x5534f6=a142_0x521442;if(_0x2efda2===null||typeof _0x2efda2!==_0x5534f6(0x1a6))return _0x2efda2;if(Array[_0x5534f6(0x1dd)](_0x2efda2))return _0x2efda2['map'](normalizeConditionsForMatching);const _0x57aae8=_0x2efda2;if((_0x57aae8[_0x5534f6(0x21e)]===_0x5534f6(0x231)||_0x57aae8[_0x5534f6(0x21e)]===_0x5534f6(0x1e3))&&typeof _0x57aae8['segment']==='string')return{..._0x57aae8,'segment':_0x5534f6(0x1be)};const _0x1a83c7={};for(const _0x5efc5d of Object[_0x5534f6(0x1b5)](_0x57aae8)){_0x1a83c7[_0x5efc5d]=normalizeConditionsForMatching(_0x57aae8[_0x5efc5d]);}return _0x1a83c7;}export function serializeRuleForMatching(_0x15c306){const _0x7282b4=a142_0x521442;return JSON[_0x7282b4(0x1cc)](deepSortObject(normalizeRuleForMatching(_0x15c306)));}export function expandSegmentReferences(_0x3f08f9,_0x157c38,_0x1005e0=new Set()){return expandConditions(_0x3f08f9,_0x157c38,_0x1005e0);}function expandConditions(_0x59ec99,_0x3aef2d,_0x3c1c14){const _0x2ae5f7=a142_0x521442;if(_0x59ec99===null||typeof _0x59ec99!==_0x2ae5f7(0x1a6))return _0x59ec99;if(Array[_0x2ae5f7(0x1dd)](_0x59ec99))return _0x59ec99[_0x2ae5f7(0x1f6)](_0x58125f=>expandConditions(_0x58125f,_0x3aef2d,_0x3c1c14));const _0x2e3ec8=_0x59ec99;if((_0x2e3ec8[_0x2ae5f7(0x21e)]===_0x2ae5f7(0x231)||_0x2e3ec8['type']===_0x2ae5f7(0x1e3))&&typeof _0x2e3ec8[_0x2ae5f7(0x1c8)]===_0x2ae5f7(0x1ba)){const _0x43e66f=_0x2e3ec8['segment'],_0x17fbdc=_0x3aef2d[_0x2ae5f7(0x194)](_0x43e66f);if(_0x17fbdc&&!_0x3c1c14[_0x2ae5f7(0x1bc)](_0x43e66f)){const _0x5eb72b=new Set(_0x3c1c14);_0x5eb72b[_0x2ae5f7(0x1a2)](_0x43e66f);const _0x5bd3c0=expandConditions(_0x17fbdc,_0x3aef2d,_0x5eb72b);return{'type':_0x2e3ec8[_0x2ae5f7(0x21e)],'expanded_rule':_0x5bd3c0};}return{'type':_0x2e3ec8[_0x2ae5f7(0x21e)],'expanded_rule':_0x2ae5f7(0x18f)};}const _0x1365e3={};for(const _0x533d5b of Object[_0x2ae5f7(0x1b5)](_0x2e3ec8)){_0x1365e3[_0x533d5b]=expandConditions(_0x2e3ec8[_0x533d5b],_0x3aef2d,_0x3c1c14);}return _0x1365e3;}export function serializeExpandedRule(_0x32b7f8,_0x2e259c){const _0x3aca3d=a142_0x521442,_0xfae215=expandSegmentReferences(_0x32b7f8,_0x2e259c);return JSON[_0x3aca3d(0x1cc)](deepSortObject(_0xfae215));}export function createSegmentNameContext(_0x3e92ea){const _0x3b7d79=a142_0x521442,_0x2d96d1=new Set(),_0x5c3854=new Map(),_0x3b45fa=new Map();if(_0x3e92ea)for(const [_0x20f639,_0x325238]of Object[_0x3b7d79(0x1c9)](_0x3e92ea)){if(_0x325238[_0x3b7d79(0x185)]){const _0x17a0f0=serializeRule(_0x325238[_0x3b7d79(0x185)]);_0x3b45fa['set'](_0x17a0f0,_0x20f639),_0x2d96d1[_0x3b7d79(0x1a2)](_0x20f639);}}return{'usedNames':_0x2d96d1,'ruleHashToName':_0x5c3854,'localRuleToName':_0x3e92ea?_0x3b45fa:undefined};}export function resolveSegmentName(_0x526858,_0x2e3232,_0x6876c3,_0x22153d){const _0xf6fc9e=a142_0x521442,_0x431ccb=serializeRule(_0x2e3232);if(_0x6876c3['localRuleToName']){const _0x4b69c4=_0x6876c3[_0xf6fc9e(0x20a)][_0xf6fc9e(0x194)](_0x431ccb);if(_0x4b69c4)return{'name':_0x4b69c4,'isDuplicate':![],'isLocalMatch':!![]};}const _0x5138cf=_0x6876c3[_0xf6fc9e(0x1a5)][_0xf6fc9e(0x194)](_0x431ccb);if(_0x5138cf)return{'name':_0x5138cf,'isDuplicate':!![],'isLocalMatch':![]};const _0x2d7a71=_0x22153d(_0x526858);let _0x1b6941=_0x2d7a71||_0x526858,_0x56d01a=_0x1b6941,_0x413e70=0x2;while(_0x6876c3[_0xf6fc9e(0x1d1)][_0xf6fc9e(0x1bc)](_0x56d01a)){_0x56d01a=_0x1b6941+'_'+_0x413e70,_0x413e70++;}return _0x6876c3[_0xf6fc9e(0x1d1)][_0xf6fc9e(0x1a2)](_0x56d01a),_0x6876c3[_0xf6fc9e(0x1a5)][_0xf6fc9e(0x1ce)](_0x431ccb,_0x56d01a),{'name':_0x56d01a,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x4a90ad){const _0x139fc1=[],_0x45f9f1=_0x34bd0f=>{const _0x410226=a142_0x46ea;if(!_0x34bd0f||typeof _0x34bd0f!=='object')return;if(Array[_0x410226(0x1dd)](_0x34bd0f)){_0x34bd0f[_0x410226(0x1df)](_0x45f9f1);return;}const _0x3c5985=_0x34bd0f;(_0x3c5985[_0x410226(0x21e)]===_0x410226(0x231)||_0x3c5985[_0x410226(0x21e)]===_0x410226(0x1e3))&&typeof _0x3c5985['segment']===_0x410226(0x1ba)&&_0x139fc1[_0x410226(0x1fb)](_0x3c5985[_0x410226(0x1c8)]);for(const _0x52e18b of Object['values'](_0x3c5985)){_0x45f9f1(_0x52e18b);}};return _0x45f9f1(_0x4a90ad),_0x139fc1;}export function validateSegmentRule(_0x6ca85f,_0x1229fb){const _0x49e344=a142_0x521442;if(!_0x1229fb||!_0x1229fb['conditions'])return;for(let _0x4ef433=0x0;_0x4ef433<_0x1229fb['conditions'][_0x49e344(0x1d2)];_0x4ef433++){const _0x2f8967=_0x1229fb[_0x49e344(0x200)][_0x4ef433];if(_0x49e344(0x21e)in _0x2f8967&&_0x2f8967[_0x49e344(0x21e)]===_0x49e344(0x20d)){const _0x41bff6=_0x2f8967,_0x5a3122=_0x41bff6[_0x49e344(0x199)]||_0x41bff6['aggregation'];if((!_0x41bff6[_0x49e344(0x189)]||_0x41bff6[_0x49e344(0x189)]==='')&&!_0x5a3122)throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x49e344(0x227)+_0x6ca85f+_0x49e344(0x217)+(_0x49e344(0x18e)+_0x4ef433+_0x49e344(0x223))+'Please\x20specify\x20a\x20valid\x20attribute\x20name.');}}}
|
|
1
|
+
const a142_0xfc1175=a142_0x4889;(function(_0x461e47,_0x5042b6){const _0x4ccec6=a142_0x4889,_0x552b6a=_0x461e47();while(!![]){try{const _0x398771=-parseInt(_0x4ccec6(0x161))/0x1*(parseInt(_0x4ccec6(0x1e0))/0x2)+-parseInt(_0x4ccec6(0x158))/0x3+-parseInt(_0x4ccec6(0x18f))/0x4*(parseInt(_0x4ccec6(0x1b9))/0x5)+-parseInt(_0x4ccec6(0x155))/0x6*(parseInt(_0x4ccec6(0x1e5))/0x7)+parseInt(_0x4ccec6(0x1dc))/0x8*(parseInt(_0x4ccec6(0x197))/0x9)+-parseInt(_0x4ccec6(0x151))/0xa*(parseInt(_0x4ccec6(0x1ba))/0xb)+parseInt(_0x4ccec6(0x157))/0xc;if(_0x398771===_0x5042b6)break;else _0x552b6a['push'](_0x552b6a['shift']());}catch(_0x53e39e){_0x552b6a['push'](_0x552b6a['shift']());}}}(a142_0x6b8f,0x22bc8));import*as a142_0x4440b0 from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';import{ActivationDefSchema}from'./types/activation-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':a142_0xfc1175(0x17c),'hourly':a142_0xfc1175(0x1a0),'weekly':'week','monthly':'month','minutes_interval':a142_0xfc1175(0x1de)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a142_0xfc1175(0x14e),'hour':a142_0xfc1175(0x1d5),'week':a142_0xfc1175(0x14b),'month':'monthly','minute':'minutes_interval'};function filterRuleAsRuleDef(_0x34207f){return _0x34207f;}function ruleDefAsFilterRule(_0x264ea6){return _0x264ea6;}export function segmentResponseToDefSync(_0x4006b0,_0x27ef0b){const _0xfef09a=a142_0xfc1175,_0x29c0c9=_0x4006b0[_0xfef09a(0x179)]&&_0xfef09a(0x150)in _0x4006b0[_0xfef09a(0x179)]&&_0x4006b0[_0xfef09a(0x179)]['type'];return{'type':_0xfef09a(0x14f),'name':_0x4006b0[_0xfef09a(0x1b1)],..._0x4006b0['description']&&{'description':_0x4006b0[_0xfef09a(0x1f2)]},..._0x27ef0b&&{'folder':_0x27ef0b},..._0x29c0c9&&{'rule':apiRuleToYaml(_0x4006b0[_0xfef09a(0x179)])},..._0x4006b0[_0xfef09a(0x1aa)]!==undefined&&{'kind':_0x4006b0[_0xfef09a(0x1aa)]===0x0?_0xfef09a(0x174):_0x4006b0['kind']===0x1?_0xfef09a(0x188):_0xfef09a(0x171)},..._0x4006b0['isVisible']!==undefined&&{'visible':_0x4006b0['isVisible']}};}function a142_0x4889(_0x28467e,_0x63d9e2){_0x28467e=_0x28467e-0x141;const _0x6b8f9=a142_0x6b8f();let _0x488982=_0x6b8f9[_0x28467e];return _0x488982;}export async function segmentResponseToDef(_0x2b23b2,_0x2a8b22,_0x5b4c5d){const _0x5a9e61=a142_0xfc1175,_0x57c5aa=segmentResponseToDefSync(_0x2b23b2,_0x5b4c5d);if(!_0x2a8b22||!_0x2a8b22[_0x5a9e61(0x178)])return _0x57c5aa;return _0x57c5aa[_0x5a9e61(0x179)]&&(_0x57c5aa[_0x5a9e61(0x179)]=await resolveRuleSegmentRefs(_0x57c5aa[_0x5a9e61(0x179)],_0x2a8b22[_0x5a9e61(0x178)])),_0x57c5aa;}export function apiRuleToYaml(_0x289ef3){const _0x2bff72=a142_0xfc1175,_0x4c516c=(_0x289ef3[_0x2bff72(0x146)]||[])[_0x2bff72(0x182)](_0x5d70f7=>{const _0x2d16fe=_0x2bff72,_0xa7339e=apiConditionToYaml(_0x5d70f7);if(isCompositeType(_0xa7339e)&&_0xa7339e['description']!==undefined){const _0x48fc2a=_0xa7339e;if(_0x48fc2a[_0x2d16fe(0x146)][_0x2d16fe(0x142)]===0x1)return _0x48fc2a[_0x2d16fe(0x146)];return[{'type':_0x48fc2a[_0x2d16fe(0x150)],'conditions':_0x48fc2a[_0x2d16fe(0x146)]}];}return[_0xa7339e];});if(_0x4c516c['length']===0x1&&!_0x289ef3[_0x2bff72(0x1f2)]&&isCompositeType(_0x4c516c[0x0])){const _0xbc36e2=_0x4c516c[0x0];if(_0xbc36e2[_0x2bff72(0x150)]===_0x289ef3['type']&&_0xbc36e2[_0x2bff72(0x146)]&&_0xbc36e2[_0x2bff72(0x1f2)]===undefined)return{'type':_0x289ef3[_0x2bff72(0x150)],'conditions':_0xbc36e2[_0x2bff72(0x146)]};}return{'type':_0x289ef3[_0x2bff72(0x150)],'conditions':_0x4c516c};}export async function resolveRuleSegmentRefs(_0x20e25e,_0x39afb9){const _0x515b17=a142_0xfc1175;return transformRuleSegmentRefs(_0x20e25e,_0x39afb9,_0x32fb9d=>/^\d+$/[_0x515b17(0x1b0)](_0x32fb9d));}async function transformConditionSegmentRefs(_0x5ca092,_0x5a34b9,_0x520f9b,_0x2446d2){const _0x1f21d3=a142_0xfc1175;if(_0x1f21d3(0x14f)in _0x5ca092&&(_0x5ca092[_0x1f21d3(0x150)]===_0x1f21d3(0x15e)||_0x5ca092[_0x1f21d3(0x150)]===_0x1f21d3(0x153))){const _0x50ab3f=_0x5ca092;if(_0x520f9b(_0x50ab3f[_0x1f21d3(0x14f)]))return{..._0x50ab3f,'segment':await _0x5a34b9(_0x50ab3f['segment'])};return _0x5ca092;}if(_0x1f21d3(0x146)in _0x5ca092&&_0x5ca092[_0x1f21d3(0x146)]){const _0x18a456=_0x5ca092,_0x4ae0cd=await Promise[_0x1f21d3(0x1e3)](_0x18a456[_0x1f21d3(0x146)][_0x1f21d3(0x1f5)](_0x31e429=>transformConditionSegmentRefs(_0x31e429,_0x5a34b9,_0x520f9b,_0x2446d2)));return{..._0x18a456,'conditions':_0x4ae0cd};}if(_0x1f21d3(0x198)in _0x5ca092&&_0x5ca092['filter']){const _0x4c017b=_0x5ca092,_0x25c090=await _0x2446d2(filterRuleAsRuleDef(_0x4c017b[_0x1f21d3(0x198)]),_0x5a34b9);return{..._0x4c017b,'filter':ruleDefAsFilterRule(_0x25c090)};}return _0x5ca092;}async function transformRuleSegmentRefs(_0x1d3828,_0x5efb2b,_0x28fe97){const _0x45dd46=a142_0xfc1175,_0xb9efe2=(_0xd81feb,_0x2e69f3)=>transformRuleSegmentRefs(_0xd81feb,_0x2e69f3,_0x28fe97),_0x3faef5=await Promise[_0x45dd46(0x1e3)](_0x1d3828[_0x45dd46(0x146)][_0x45dd46(0x1f5)](_0x28f82d=>transformConditionSegmentRefs(_0x28f82d,_0x5efb2b,_0x28fe97,_0xb9efe2)));return{..._0x1d3828,'conditions':_0x3faef5};}export async function resolveRuleSegmentIds(_0x339982,_0x2ed5c6){return transformRuleSegmentRefs(_0x339982,_0x2ed5c6,_0x50327f=>!/^\d+$/['test'](_0x50327f));}function isCompositeType(_0x50c56c){const _0xa662b1=a142_0xfc1175;return _0x50c56c[_0xa662b1(0x150)]===_0xa662b1(0x1bd)||_0x50c56c['type']==='Or';}function isBehaviorApiCondition(_0x20e454){const _0x1d2c2a=a142_0xfc1175;if(!_0x20e454['leftValue']?.[_0x1d2c2a(0x1b8)]?.[_0x1d2c2a(0x1b1)])return![];return!![];}function apiConditionToYaml(_0xd46ef0){const _0x176721=a142_0xfc1175;if(_0xd46ef0['type']===_0x176721(0x1bd)||_0xd46ef0['type']==='Or'){if(_0xd46ef0[_0x176721(0x146)]){const _0x45d184=_0xd46ef0[_0x176721(0x146)]['map'](apiConditionToYaml),_0x5627f1=_0xd46ef0[_0x176721(0x1f2)]!==undefined;if(_0x45d184[_0x176721(0x142)]===0x1&&!_0x5627f1)return _0x45d184[0x0];return{'type':_0xd46ef0[_0x176721(0x150)],'conditions':_0x45d184,..._0xd46ef0[_0x176721(0x1f2)]!==undefined&&{'description':_0xd46ef0[_0x176721(0x1f2)]}};}}if(_0xd46ef0['type']===_0x176721(0x1ec)&&_0xd46ef0[_0x176721(0x187)]&&_0xd46ef0[_0x176721(0x1b7)]){const _0x412857=_0xd46ef0[_0x176721(0x187)]['aggregation']?buildAggregationDefFromApi(_0xd46ef0['leftValue'][_0x176721(0x1bf)]):undefined;if(isBehaviorApiCondition(_0xd46ef0)){const _0x1e7960=_0xd46ef0[_0x176721(0x187)][_0x176721(0x1b8)][_0x176721(0x1b1)];return{'type':_0x176721(0x16d),'attribute':'','operator':apiOperatorToYaml(_0xd46ef0['operator']),..._0xd46ef0[_0x176721(0x1d8)]&&_0xd46ef0[_0x176721(0x1d8)]!==_0x176721(0x147)?{'arrayMatching':_0xd46ef0['arrayMatching']}:{},..._0xd46ef0['exclude']?{'exclude':_0xd46ef0['exclude']}:{},..._0x412857?{'aggregation':_0x412857}:{},'source':_0x1e7960,..._0xd46ef0[_0x176721(0x187)][_0x176721(0x198)]?{'filter':apiRuleToYaml(_0xd46ef0[_0x176721(0x187)][_0x176721(0x198)])}:{},..._0xd46ef0['limit']!==undefined&&_0xd46ef0[_0x176721(0x172)]!==null?{'limit':_0xd46ef0[_0x176721(0x172)]}:{}};}return{'type':_0x176721(0x1ec),'attribute':_0xd46ef0[_0x176721(0x187)]['name']||'','operator':apiOperatorToYaml(_0xd46ef0[_0x176721(0x1b7)]),..._0xd46ef0['arrayMatching']&&_0xd46ef0[_0x176721(0x1d8)]!==_0x176721(0x147)?{'arrayMatching':_0xd46ef0[_0x176721(0x1d8)]}:{},..._0xd46ef0[_0x176721(0x153)]?{'exclude':_0xd46ef0['exclude']}:{},..._0x412857?{'aggregation':_0x412857}:{},..._0xd46ef0['leftValue'][_0x176721(0x198)]?{'filter':apiRuleToYaml(_0xd46ef0[_0x176721(0x187)][_0x176721(0x198)])}:{},..._0xd46ef0[_0x176721(0x172)]!==undefined&&_0xd46ef0['limit']!==null?{'limit':_0xd46ef0['limit']}:{}};}if(_0xd46ef0[_0x176721(0x150)]===_0x176721(0x1ad)&&_0xd46ef0[_0x176721(0x145)]&&_0xd46ef0[_0x176721(0x1b7)])return{'type':_0x176721(0x1ad),'column':_0xd46ef0['column'],'operator':apiOperatorToYaml(_0xd46ef0[_0x176721(0x1b7)])};if(_0xd46ef0[_0x176721(0x150)]===_0x176721(0x19b)&&_0xd46ef0['id'])return{'type':_0xd46ef0[_0x176721(0x153)]?_0x176721(0x153):'include','segment':_0xd46ef0['id']};return{'type':_0x176721(0x1bd),'conditions':[]};}function isTemporalOperator(_0x4c5faa){const _0x19aa33=a142_0xfc1175;return _0x4c5faa===_0x19aa33(0x184)||_0x4c5faa===_0x19aa33(0x181);}function a142_0x6b8f(){const _0x3cbe3d=['16XuEnlF','unit','minute','scheduleOption','11254ifaNyA','values','connectionNameToIdMap','all','\x22\x20has\x20unrecognized\x20fields\x20(will\x20be\x20ignored):\x0a','565649RMFbKC','\x0a\x0aAvailable\x20fields:\x0a','Equal','connectionId','min','CONNECTION_NOT_FOUND','attributes','Value','folder','groupingColumns','timeWindow','repeatSubFrequency','INVALID_ARGUMENT','description','repeatUnit','segmentFolderId','map','connection','behavior','length','All','forEach','column','conditions','any','keys','order_by','valid','weekly','email_recipients','duration','daily','segment','type','260NUbOyc','getSchema','exclude','activations','6kbRKrK','push','9465096sXogaz','708774qGzrPu','repeatFrequency','shape','max','notification','every','include','toLowerCase','rule:','33gtOBSw','Please\x20specify\x20a\x20valid\x20attribute\x20name.','warn','lock_enabled','set','lockEnabled','attribute','localRuleToName','emailRecipients','all_columns','repeat_sub_frequency','rightValues','Behavior','join','nestedWorkflowName','Last','funnel_stage','limit','].attribute\x20cannot\x20be\x20empty.\x0a','batch','add','usedNames','__UNRESOLVED__','resolveSegmentName','rule','maxValue','cron','day','from','joinRow','connector_config','value','TimeWithinNext','flatMap','Unknown\x20email\x20recipient:\x20','TimeWithinPast','\x27:\x20','syndicationBehavior','leftValue','realtime','reverse','endOn','behavior_table','nested_workflow_project_name','nested_workflow_name','end_on','295172gQYUIh','object','timezone','conditions[','allColumns','runAfterJourneyRefresh','repeat_frequency','visibility','698094xBlcDH','filter','sort','columns','Reference','repeat_unit','connector_config\x20for\x20activation\x20\x22','parse','TimeRange','hour','join_row','has','stringify','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','\x20\x20-\x20\x22','not','nestedWorkflowProjectName','ruleHashToName','get','kind','activation_template_id','errors','Column','visible','orderBy','test','name','rightValue','Invalid\x20connector_config\x20for\x20activation\x20\x22','null','isArray','joinStrategy','operator','source','10fvQauu','63998pNEouL','behaviorTableName','schedule','And','isVisible','aggregation','notify_on','orderColumn','activationTemplateId','activationParams','__SEGMENT_REF__','New\x20Segment','scheduleType','activations:','Count','CountDistinct','connectorConfig','start_at','replace','\x22:\x0a','Unknown\x20connection:\x20','startAt','minValue','warnings','First','connectionNameToTypeMap','join_strategy','hourly','formatting','none','arrayMatching','notifyOn','string','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27'];a142_0x6b8f=function(){return _0x3cbe3d;};return a142_0x6b8f();}function isBetweenOperator(_0x1cd8a8){return _0x1cd8a8==='Between';}function getEffectiveValue(_0x1b04a4){const _0x5a95e5=a142_0xfc1175,_0x342eaf=_0x1b04a4[_0x5a95e5(0x1e1)];return _0x1b04a4[_0x5a95e5(0x180)]??_0x342eaf;}function parseNumericValue(_0x337a53){const _0x45d7fe=a142_0xfc1175;if(typeof _0x337a53===_0x45d7fe(0x190)&&_0x337a53!==null)return _0x337a53;if(_0x337a53==='')return _0x337a53;const _0x4a9bec=Number(_0x337a53);return Number['isFinite'](_0x4a9bec)?_0x4a9bec:_0x337a53;}function apiOperatorToYaml(_0x23f5e0){const _0x2536cd=a142_0xfc1175;if(isBetweenOperator(_0x23f5e0[_0x2536cd(0x150)]))return{'type':mapApiOperatorType(_0x23f5e0[_0x2536cd(0x150)]),..._0x23f5e0['not']!==undefined&&{'not':_0x23f5e0[_0x2536cd(0x1a6)]},..._0x23f5e0[_0x2536cd(0x1d0)]!==undefined&&{'min':parseNumericValue(_0x23f5e0[_0x2536cd(0x1d0)])},..._0x23f5e0[_0x2536cd(0x17a)]!==undefined&&{'max':parseNumericValue(_0x23f5e0[_0x2536cd(0x17a)])}};if(_0x23f5e0[_0x2536cd(0x150)]===_0x2536cd(0x19f))return{'type':_0x2536cd(0x19f),..._0x23f5e0[_0x2536cd(0x1a6)]!==undefined&&{'not':_0x23f5e0[_0x2536cd(0x1a6)]},..._0x23f5e0[_0x2536cd(0x14d)]!==undefined&&{'duration':_0x23f5e0[_0x2536cd(0x14d)]},..._0x23f5e0[_0x2536cd(0x17d)]!==undefined&&{'from':_0x23f5e0[_0x2536cd(0x17d)]},..._0x23f5e0[_0x2536cd(0x189)]!==undefined&&{'reverse':_0x23f5e0[_0x2536cd(0x189)]}};let _0x58e1a6;if(_0x23f5e0[_0x2536cd(0x16c)]&&_0x23f5e0[_0x2536cd(0x16c)][_0x2536cd(0x142)]>0x0)_0x58e1a6=_0x23f5e0[_0x2536cd(0x16c)];else{if(_0x23f5e0[_0x2536cd(0x1b2)]!==undefined)_0x58e1a6=_0x23f5e0[_0x2536cd(0x1b2)];else isTemporalOperator(_0x23f5e0[_0x2536cd(0x150)])&&_0x23f5e0[_0x2536cd(0x180)]!==undefined&&(_0x58e1a6=_0x23f5e0['value']);}return{'type':mapApiOperatorType(_0x23f5e0[_0x2536cd(0x150)]),..._0x23f5e0['not']!==undefined&&{'not':_0x23f5e0[_0x2536cd(0x1a6)]},..._0x58e1a6!==undefined&&{'value':_0x58e1a6},..._0x23f5e0[_0x2536cd(0x1dd)]!==undefined&&{'unit':_0x23f5e0[_0x2536cd(0x1dd)]}};}function mapApiOperatorType(_0x39e467){return _0x39e467;}export function segmentDefToCreateRequest(_0x503f06,_0x106bf2){const _0x53a22f=a142_0xfc1175,_0x47a439={'name':_0x503f06[_0x53a22f(0x1b1)]};return _0x503f06[_0x53a22f(0x1f2)]&&(_0x47a439[_0x53a22f(0x1f2)]=_0x503f06[_0x53a22f(0x1f2)]),_0x503f06[_0x53a22f(0x179)]&&(_0x47a439[_0x53a22f(0x179)]=yamlRuleToApi(_0x503f06[_0x53a22f(0x179)])),_0x503f06[_0x53a22f(0x1aa)]&&(_0x47a439['kind']=_0x503f06[_0x53a22f(0x1aa)]==='batch'?0x0:_0x503f06[_0x53a22f(0x1aa)]===_0x53a22f(0x188)?0x1:0x2),_0x503f06[_0x53a22f(0x1ae)]!==undefined&&(_0x47a439[_0x53a22f(0x1be)]=_0x503f06['visible']),_0x106bf2&&(_0x47a439[_0x53a22f(0x1f4)]=_0x106bf2),_0x47a439;}export function segmentDefToUpdateRequest(_0x222beb){const _0x583897=a142_0xfc1175,_0x22ec0f={'name':_0x222beb[_0x583897(0x1b1)]};return _0x222beb['description']!==undefined&&(_0x22ec0f['description']=_0x222beb[_0x583897(0x1f2)]),_0x222beb[_0x583897(0x179)]&&(_0x22ec0f[_0x583897(0x179)]=yamlRuleToApi(_0x222beb[_0x583897(0x179)])),_0x222beb[_0x583897(0x1aa)]&&(_0x22ec0f[_0x583897(0x1aa)]=_0x222beb[_0x583897(0x1aa)]==='batch'?0x0:_0x222beb[_0x583897(0x1aa)]===_0x583897(0x188)?0x1:0x2),_0x22ec0f;}export function yamlRuleToApi(_0x3adfb0){const _0x491e4d=a142_0xfc1175,_0xe6113=_0x3adfb0[_0x491e4d(0x146)][_0x491e4d(0x1f5)](yamlConditionToApi),_0x4d33d8=_0xe6113[_0x491e4d(0x15d)](_0xa135f0=>isCompositeType(_0xa135f0)&&_0xa135f0[_0x491e4d(0x1f2)]!==undefined);if(!_0x4d33d8&&_0xe6113['length']>0x0){const _0x4a491a=[];for(const _0x2d6f5e of _0xe6113){isCompositeType(_0x2d6f5e)&&_0x2d6f5e[_0x491e4d(0x1f2)]===undefined&&_0x2d6f5e[_0x491e4d(0x146)]&&_0x2d6f5e[_0x491e4d(0x146)][_0x491e4d(0x15d)](_0x485a19=>!isCompositeType(_0x485a19))?_0x4a491a['push']({'type':_0x2d6f5e[_0x491e4d(0x150)],'description':'','conditions':_0x2d6f5e[_0x491e4d(0x146)]}):_0x4a491a[_0x491e4d(0x156)]({'type':'And','description':_0x3adfb0['description']||'','conditions':[_0x2d6f5e]});}return{'type':_0x3adfb0[_0x491e4d(0x150)],'conditions':_0x4a491a};}return{'type':_0x3adfb0[_0x491e4d(0x150)],'conditions':_0xe6113,..._0x3adfb0['description']&&{'description':_0x3adfb0['description']}};}function yamlFilterRuleToApi(_0x2383c7){const _0x38e932=a142_0xfc1175,_0x3be812=_0x2383c7[_0x38e932(0x146)][_0x38e932(0x1f5)](yamlConditionToApi);return{'type':_0x2383c7['type'],'conditions':_0x3be812};}function yamlConditionToApi(_0x3bda95){const _0x529ce5=a142_0xfc1175;if(_0x529ce5(0x14f)in _0x3bda95&&(_0x3bda95[_0x529ce5(0x150)]===_0x529ce5(0x15e)||_0x3bda95[_0x529ce5(0x150)]===_0x529ce5(0x153))){const _0x1ba7ac=_0x3bda95;return{'type':_0x529ce5(0x19b),'id':_0x1ba7ac[_0x529ce5(0x14f)],'exclude':_0x1ba7ac[_0x529ce5(0x150)]==='exclude'};}if(_0x3bda95['type']===_0x529ce5(0x1bd)||_0x3bda95[_0x529ce5(0x150)]==='Or'){const _0x3285e1=_0x3bda95;return{'type':_0x3285e1[_0x529ce5(0x150)],'conditions':_0x3285e1[_0x529ce5(0x146)][_0x529ce5(0x1f5)](yamlConditionToApi),..._0x3285e1[_0x529ce5(0x1f2)]&&{'description':_0x3285e1[_0x529ce5(0x1f2)]}};}if(_0x529ce5(0x145)in _0x3bda95&&_0x3bda95[_0x529ce5(0x150)]==='Column'){const _0x460342=_0x3bda95;return{'type':_0x529ce5(0x1ad),'column':_0x460342[_0x529ce5(0x145)],'operator':yamlOperatorToApi(_0x460342[_0x529ce5(0x1b7)])};}const _0x347a30=_0x3bda95,_0x3162e2={'type':'Value','leftValue':buildLeftValue(_0x347a30),'operator':yamlOperatorToApi(_0x347a30[_0x529ce5(0x1b7)]),'exclude':_0x347a30['exclude']??![],'arrayMatching':_0x347a30[_0x529ce5(0x1d8)]??_0x529ce5(0x147)};return _0x347a30[_0x529ce5(0x172)]!==undefined&&(_0x3162e2[_0x529ce5(0x172)]=_0x347a30[_0x529ce5(0x172)]),_0x3162e2;}function buildAggregationDefFromApi(_0x4a5d04){const _0x2476f9=a142_0xfc1175,_0x5aa208=_0x4a5d04[_0x2476f9(0x150)];if(_0x5aa208===_0x2476f9(0x1c9))return{'type':_0x5aa208,'columns':_0x4a5d04[_0x2476f9(0x19a)]??[]};if(_0x5aa208===_0x2476f9(0x1d2)||_0x5aa208===_0x2476f9(0x170))return{'type':_0x5aa208,'column':_0x4a5d04[_0x2476f9(0x145)]??'','orderColumn':_0x4a5d04[_0x2476f9(0x1c1)]??'',..._0x4a5d04['groupingColumns']&&{'groupingColumns':_0x4a5d04[_0x2476f9(0x1ee)]}};if(_0x5aa208===_0x2476f9(0x1c8))return{'type':_0x5aa208,..._0x4a5d04[_0x2476f9(0x1ee)]&&{'groupingColumns':_0x4a5d04[_0x2476f9(0x1ee)]}};return{'type':_0x5aa208,'column':_0x4a5d04[_0x2476f9(0x145)]??'',..._0x4a5d04['groupingColumns']&&{'groupingColumns':_0x4a5d04[_0x2476f9(0x1ee)]}};}function buildLeftValue(_0x4c5a05){const _0x18cbe0=a142_0xfc1175,_0x105676={};_0x4c5a05[_0x18cbe0(0x167)]&&_0x4c5a05[_0x18cbe0(0x150)]!==_0x18cbe0(0x16d)&&(_0x105676[_0x18cbe0(0x1b1)]=_0x4c5a05['attribute']);if(_0x4c5a05[_0x18cbe0(0x1bf)]){const _0x4d0a45=_0x4c5a05['aggregation'];if(_0x4d0a45[_0x18cbe0(0x150)]===_0x18cbe0(0x1c9))_0x105676[_0x18cbe0(0x1bf)]={'type':_0x18cbe0(0x1c9),'columns':_0x4d0a45[_0x18cbe0(0x19a)]};else{if(_0x4d0a45['type']===_0x18cbe0(0x1d2)||_0x4d0a45['type']===_0x18cbe0(0x170))_0x105676[_0x18cbe0(0x1bf)]={'type':_0x4d0a45[_0x18cbe0(0x150)],'column':_0x4d0a45[_0x18cbe0(0x145)],'orderColumn':_0x4d0a45[_0x18cbe0(0x1c1)],..._0x4d0a45[_0x18cbe0(0x1ee)]&&{'groupingColumns':_0x4d0a45[_0x18cbe0(0x1ee)]}};else _0x4d0a45[_0x18cbe0(0x150)]==='Count'?_0x105676[_0x18cbe0(0x1bf)]={'type':_0x18cbe0(0x1c8),..._0x4d0a45[_0x18cbe0(0x1ee)]&&{'groupingColumns':_0x4d0a45['groupingColumns']}}:_0x105676[_0x18cbe0(0x1bf)]={'type':_0x4d0a45[_0x18cbe0(0x150)],'column':_0x4d0a45[_0x18cbe0(0x145)],..._0x4d0a45[_0x18cbe0(0x1ee)]&&{'groupingColumns':_0x4d0a45[_0x18cbe0(0x1ee)]}};}}return _0x4c5a05[_0x18cbe0(0x1b8)]&&(_0x105676[_0x18cbe0(0x1b8)]={'name':_0x4c5a05[_0x18cbe0(0x1b8)]}),_0x4c5a05['filter']&&(_0x105676['filter']=yamlFilterRuleToApi(filterRuleAsRuleDef(_0x4c5a05[_0x18cbe0(0x198)]))),_0x105676;}function yamlOperatorToApi(_0x4d0215){const _0x3ab0dd=a142_0xfc1175,_0x2e26d7={'type':mapYamlOperatorType(_0x4d0215[_0x3ab0dd(0x150)]),'not':_0x4d0215[_0x3ab0dd(0x1a6)]??![]};if(isBetweenOperator(_0x4d0215[_0x3ab0dd(0x150)]))return _0x4d0215['min']!==undefined&&(_0x2e26d7['minValue']=typeof _0x4d0215[_0x3ab0dd(0x1e9)]===_0x3ab0dd(0x190)?_0x4d0215[_0x3ab0dd(0x1e9)]:String(_0x4d0215['min'])),_0x4d0215[_0x3ab0dd(0x15b)]!==undefined&&(_0x2e26d7[_0x3ab0dd(0x17a)]=typeof _0x4d0215[_0x3ab0dd(0x15b)]===_0x3ab0dd(0x190)?_0x4d0215[_0x3ab0dd(0x15b)]:String(_0x4d0215[_0x3ab0dd(0x15b)])),_0x2e26d7;if(_0x4d0215[_0x3ab0dd(0x150)]==='TimeRange')return _0x4d0215[_0x3ab0dd(0x14d)]&&(_0x2e26d7[_0x3ab0dd(0x14d)]=_0x4d0215[_0x3ab0dd(0x14d)]),_0x4d0215['from']&&(_0x2e26d7['from']=_0x4d0215[_0x3ab0dd(0x17d)]),_0x4d0215[_0x3ab0dd(0x189)]!==undefined&&(_0x2e26d7['reverse']=_0x4d0215[_0x3ab0dd(0x189)]),_0x2e26d7;const _0x709b76=getEffectiveValue(_0x4d0215);if(_0x709b76!==undefined){if(Array[_0x3ab0dd(0x1b5)](_0x709b76))_0x2e26d7[_0x3ab0dd(0x16c)]=_0x709b76;else isTemporalOperator(_0x4d0215[_0x3ab0dd(0x150)])?_0x2e26d7[_0x3ab0dd(0x180)]=_0x709b76:_0x2e26d7[_0x3ab0dd(0x1b2)]=_0x709b76;}return _0x4d0215['unit']&&(_0x2e26d7[_0x3ab0dd(0x1dd)]=_0x4d0215[_0x3ab0dd(0x1dd)]),_0x2e26d7;}function mapYamlOperatorType(_0x4b8b23){return _0x4b8b23;}export function toYamlString(_0x28de81){const _0x5996eb=a142_0xfc1175,_0x6f438d=JSON['parse'](JSON['stringify'](_0x28de81)),_0x4f82ed=a142_0x4440b0['stringify'](_0x6f438d,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x5996eb(0x1b4)}),_0x5c8d60=[_0x5996eb(0x160)];let _0x4d7b11=_0x4f82ed;for(const _0x5878bc of _0x5c8d60){_0x4d7b11=_0x4d7b11[_0x5996eb(0x1cc)](new RegExp('^('+_0x5878bc+')','m'),(_0x5ce165,_0x1ebe88,_0x2c2d1b)=>{if(_0x2c2d1b===0x0||_0x4d7b11[_0x2c2d1b-0x1]==='\x0a'&&_0x4d7b11[_0x2c2d1b-0x2]==='\x0a')return _0x1ebe88;return'\x0a'+_0x1ebe88;});}return _0x4d7b11;}export function parseYamlString(_0x2cb8d4){return parseSegmentYamlFile(_0x2cb8d4);}export function isSegmentYaml(_0x620be9){const _0x21bd17=a142_0xfc1175;if(typeof _0x620be9!=='object'||_0x620be9===null)return![];const _0x205106=_0x620be9;return _0x205106[_0x21bd17(0x150)]===_0x21bd17(0x14f)||_0x205106[_0x21bd17(0x150)]===undefined;}export function generateTemplate(_0x8993a6=a142_0xfc1175(0x1c5)){const _0x76ba9e=a142_0xfc1175,_0x46bc0b={'type':_0x76ba9e(0x14f),'name':_0x8993a6,'description':'Segment\x20description','rule':{'type':'And','conditions':[{'type':'Value','attribute':'attribute_name','operator':{'type':_0x76ba9e(0x1e7),'value':'value'}}]}};return toYamlString(_0x46bc0b);}export function segmentToYamlString(_0x4b5683){const _0x3208e0=a142_0xfc1175,_0x4402e9=JSON[_0x3208e0(0x19e)](JSON['stringify'](_0x4b5683)),_0x4f1768=a142_0x4440b0[_0x3208e0(0x1a3)](_0x4402e9,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3208e0(0x1b4)}),_0x1d78ec=[_0x3208e0(0x160),_0x3208e0(0x1c7)];let _0x53bb8f=_0x4f1768;for(const _0x1af61c of _0x1d78ec){_0x53bb8f=_0x53bb8f[_0x3208e0(0x1cc)](new RegExp('^('+_0x1af61c+')','m'),(_0x405dab,_0x26daec,_0x1ae186)=>{if(_0x1ae186===0x0||_0x53bb8f[_0x1ae186-0x1]==='\x0a'&&_0x53bb8f[_0x1ae186-0x2]==='\x0a')return _0x26daec;return'\x0a'+_0x26daec;});}return _0x53bb8f;}export function parseSegmentYamlFile(_0x587fab){return safeParseYaml(_0x587fab,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x30b75a){const _0x71595b=a142_0xfc1175;return{'type':_0x71595b(0x14f),'name':_0x30b75a[_0x71595b(0x1b1)],..._0x30b75a['description']!==undefined&&{'description':_0x30b75a[_0x71595b(0x1f2)]},..._0x30b75a['folder']!==undefined&&{'folder':_0x30b75a[_0x71595b(0x1ed)]},..._0x30b75a[_0x71595b(0x179)]&&{'rule':normalizeRule(_0x30b75a[_0x71595b(0x179)])},..._0x30b75a[_0x71595b(0x1aa)]!==undefined&&{'kind':_0x30b75a[_0x71595b(0x1aa)]},..._0x30b75a[_0x71595b(0x1ae)]!==undefined&&{'visible':_0x30b75a[_0x71595b(0x1ae)]},..._0x30b75a[_0x71595b(0x154)]&&{'activations':_0x30b75a['activations'][_0x71595b(0x1f5)](normalizeActivation)}};}export function normalizeRule(_0x29f89b){const _0x4636cc=a142_0xfc1175;return{'type':_0x29f89b[_0x4636cc(0x150)],'conditions':_0x29f89b['conditions'][_0x4636cc(0x1f5)](normalizeCondition),..._0x29f89b[_0x4636cc(0x1f2)]!==undefined&&{'description':_0x29f89b['description']}};}function normalizeCondition(_0x29188f){const _0x21077f=a142_0xfc1175;if(_0x21077f(0x14f)in _0x29188f&&(_0x29188f['type']===_0x21077f(0x15e)||_0x29188f[_0x21077f(0x150)]===_0x21077f(0x153))){const _0x15304d=_0x29188f;return{'type':_0x15304d[_0x21077f(0x150)],'segment':_0x15304d[_0x21077f(0x14f)]};}if(_0x29188f['type']==='And'||_0x29188f[_0x21077f(0x150)]==='Or'){const _0x599941=_0x29188f;return{'type':_0x599941[_0x21077f(0x150)],'conditions':_0x599941[_0x21077f(0x146)]['map'](normalizeCondition),..._0x599941[_0x21077f(0x1f2)]!==undefined&&{'description':_0x599941[_0x21077f(0x1f2)]}};}if(_0x21077f(0x145)in _0x29188f&&_0x29188f[_0x21077f(0x150)]==='Column'){const _0x2bc9be=_0x29188f;return{'type':_0x21077f(0x1ad),'column':_0x2bc9be[_0x21077f(0x145)],'operator':normalizeOperator(_0x2bc9be[_0x21077f(0x1b7)])};}if(_0x29188f[_0x21077f(0x150)]==='Behavior'){const _0xcaed3d=_0x29188f;return{'type':_0x21077f(0x16d),'attribute':_0xcaed3d[_0x21077f(0x167)],'operator':normalizeOperator(_0xcaed3d[_0x21077f(0x1b7)]),..._0xcaed3d[_0x21077f(0x1d8)]!==undefined&&{'arrayMatching':_0xcaed3d[_0x21077f(0x1d8)]},..._0xcaed3d[_0x21077f(0x153)]!==undefined&&{'exclude':_0xcaed3d[_0x21077f(0x153)]},..._0xcaed3d['aggregation']!==undefined&&{'aggregation':_0xcaed3d[_0x21077f(0x1bf)]},..._0xcaed3d[_0x21077f(0x1b8)]!==undefined&&{'source':_0xcaed3d[_0x21077f(0x1b8)]},..._0xcaed3d[_0x21077f(0x198)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0xcaed3d[_0x21077f(0x198)])))},..._0xcaed3d[_0x21077f(0x1ef)]!==undefined&&{'timeWindow':_0xcaed3d[_0x21077f(0x1ef)]},..._0xcaed3d[_0x21077f(0x172)]!==undefined&&{'limit':_0xcaed3d[_0x21077f(0x172)]}};}const _0x47e362=_0x29188f;return{'type':_0x21077f(0x1ec),'attribute':_0x47e362[_0x21077f(0x167)],'operator':normalizeOperator(_0x47e362[_0x21077f(0x1b7)]),..._0x47e362[_0x21077f(0x1d8)]!==undefined&&{'arrayMatching':_0x47e362[_0x21077f(0x1d8)]},..._0x47e362[_0x21077f(0x153)]!==undefined&&{'exclude':_0x47e362[_0x21077f(0x153)]},..._0x47e362[_0x21077f(0x1bf)]!==undefined&&{'aggregation':_0x47e362[_0x21077f(0x1bf)]},..._0x47e362[_0x21077f(0x1b8)]!==undefined&&{'source':_0x47e362[_0x21077f(0x1b8)]},..._0x47e362['filter']!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x47e362['filter'])))},..._0x47e362['limit']!==undefined&&{'limit':_0x47e362[_0x21077f(0x172)]}};}function normalizeOperator(_0xe36f54){const _0x4916ca=a142_0xfc1175;if(isBetweenOperator(_0xe36f54[_0x4916ca(0x150)]))return{'type':_0xe36f54[_0x4916ca(0x150)],..._0xe36f54['not']!==undefined&&{'not':_0xe36f54[_0x4916ca(0x1a6)]},..._0xe36f54[_0x4916ca(0x1e9)]!==undefined&&{'min':_0xe36f54[_0x4916ca(0x1e9)]},..._0xe36f54[_0x4916ca(0x15b)]!==undefined&&{'max':_0xe36f54[_0x4916ca(0x15b)]}};const _0x400846=getEffectiveValue(_0xe36f54);return{'type':_0xe36f54[_0x4916ca(0x150)],..._0xe36f54[_0x4916ca(0x1a6)]!==undefined&&{'not':_0xe36f54[_0x4916ca(0x1a6)]},..._0x400846!==undefined&&{'value':_0x400846},..._0xe36f54[_0x4916ca(0x1dd)]!==undefined&&{'unit':_0xe36f54[_0x4916ca(0x1dd)]},..._0xe36f54[_0x4916ca(0x14d)]!==undefined&&{'duration':_0xe36f54[_0x4916ca(0x14d)]},..._0xe36f54[_0x4916ca(0x17d)]!==undefined&&{'from':_0xe36f54['from']},..._0xe36f54[_0x4916ca(0x189)]!==undefined&&{'reverse':_0xe36f54[_0x4916ca(0x189)]}};}function normalizeActivation(_0x459860){const _0xeca79b=a142_0xfc1175;return{'name':_0x459860[_0xeca79b(0x1b1)],'connection':_0x459860[_0xeca79b(0x1f6)],..._0x459860[_0xeca79b(0x1f2)]!==undefined&&{'description':_0x459860['description']},..._0x459860[_0xeca79b(0x16a)]!==undefined&&{'all_columns':_0x459860[_0xeca79b(0x16a)]},..._0x459860[_0xeca79b(0x19a)]!==undefined&&{'columns':_0x459860[_0xeca79b(0x19a)]},..._0x459860[_0xeca79b(0x141)]!==undefined&&{'behavior':_0x459860[_0xeca79b(0x141)]},..._0x459860[_0xeca79b(0x1bc)]!==undefined&&{'schedule':_0x459860['schedule']},..._0x459860[_0xeca79b(0x15c)]!==undefined&&{'notification':_0x459860[_0xeca79b(0x15c)]},..._0x459860['connector_config']!==undefined&&{'connector_config':_0x459860[_0xeca79b(0x17f)]},..._0x459860['activation_template_id']!==undefined&&{'activation_template_id':_0x459860[_0xeca79b(0x1ab)]},..._0x459860[_0xeca79b(0x18c)]!==undefined&&{'nested_workflow_project_name':_0x459860[_0xeca79b(0x18c)]},..._0x459860[_0xeca79b(0x18d)]!==undefined&&{'nested_workflow_name':_0x459860[_0xeca79b(0x18d)]},..._0x459860[_0xeca79b(0x164)]!==undefined&&{'lock_enabled':_0x459860[_0xeca79b(0x164)]}};}function getColumnName(_0x32770c){const _0x1bf7c2=a142_0xfc1175;return _0x32770c[_0x1bf7c2(0x145)]||_0x32770c[_0x1bf7c2(0x1b1)];}export function activationResponseToDef(_0x3cd831,_0x33d647,_0x14a8b5){const _0x3ab361=a142_0xfc1175,_0x5f159c=_0x3cd831[_0x3ab361(0x1e8)]||'',_0x3ab525=_0x14a8b5?.[_0x3ab361(0x1a9)](_0x5f159c)??_0x5f159c,_0x3422e9={'name':_0x3cd831[_0x3ab361(0x1b1)],'connection':_0x3ab525};_0x3cd831['description']&&(_0x3422e9[_0x3ab361(0x1f2)]=_0x3cd831[_0x3ab361(0x1f2)]);let _0x55dcec=[];_0x3cd831[_0x3ab361(0x19a)]&&_0x3cd831[_0x3ab361(0x19a)][_0x3ab361(0x142)]>0x0&&(_0x55dcec=_0x3cd831[_0x3ab361(0x19a)][_0x3ab361(0x198)](_0xc20355=>_0xc20355&&getColumnName(_0xc20355))[_0x3ab361(0x1f5)](_0x1bb49e=>{const _0x35e653=_0x3ab361,_0x4fa2a9=getColumnName(_0x1bb49e);if(_0x1bb49e[_0x35e653(0x150)]||_0x1bb49e[_0x35e653(0x196)])return{'name':_0x4fa2a9,..._0x1bb49e[_0x35e653(0x150)]&&{'type':_0x1bb49e[_0x35e653(0x150)]},..._0x1bb49e['visibility']&&{'visibility':_0x1bb49e['visibility']}};return _0x4fa2a9;}));_0x55dcec[_0x3ab361(0x142)]>0x0&&(_0x3422e9[_0x3ab361(0x19a)]=_0x55dcec);_0x3cd831[_0x3ab361(0x193)]!==undefined&&(_0x3cd831[_0x3ab361(0x193)]===![]&&_0x55dcec['length']===0x0?_0x3422e9[_0x3ab361(0x16a)]=!![]:_0x3422e9[_0x3ab361(0x16a)]=_0x3cd831[_0x3ab361(0x193)]);const _0x1ca0f6={};let _0x520922=![];_0x3cd831[_0x3ab361(0x1c6)]&&(_0x1ca0f6[_0x3ab361(0x150)]=_0x3cd831[_0x3ab361(0x1c6)],_0x520922=!![]);_0x3cd831[_0x3ab361(0x1f3)]&&(_0x1ca0f6[_0x3ab361(0x19c)]=_0x3cd831[_0x3ab361(0x1f3)],_0x520922=!![]);_0x3cd831[_0x3ab361(0x159)]!==undefined&&_0x3cd831['repeatFrequency']!==null&&(_0x1ca0f6['repeat_frequency']=_0x3cd831['repeatFrequency'],_0x520922=!![]);_0x3cd831[_0x3ab361(0x1f0)]&&_0x3cd831[_0x3ab361(0x1f0)][_0x3ab361(0x142)]>0x0&&(_0x1ca0f6[_0x3ab361(0x16b)]=_0x3cd831[_0x3ab361(0x1f0)],_0x520922=!![]);_0x3cd831['startAt']!==undefined&&(_0x1ca0f6[_0x3ab361(0x1cb)]=_0x3cd831[_0x3ab361(0x1cf)],_0x520922=!![]);_0x3cd831['endOn']!==undefined&&(_0x1ca0f6[_0x3ab361(0x18e)]=_0x3cd831[_0x3ab361(0x18a)],_0x520922=!![]);_0x3cd831[_0x3ab361(0x191)]&&(_0x1ca0f6[_0x3ab361(0x191)]=_0x3cd831['timezone'],_0x520922=!![]);_0x520922&&(_0x3422e9[_0x3ab361(0x1bc)]=_0x1ca0f6);(_0x3cd831[_0x3ab361(0x1d9)]&&_0x3cd831['notifyOn'][_0x3ab361(0x142)]>0x0||_0x3cd831[_0x3ab361(0x169)]&&_0x3cd831[_0x3ab361(0x169)]['length']>0x0)&&(_0x3422e9[_0x3ab361(0x15c)]={},_0x3cd831[_0x3ab361(0x1d9)]&&_0x3cd831[_0x3ab361(0x1d9)][_0x3ab361(0x142)]>0x0&&(_0x3422e9[_0x3ab361(0x15c)]['notify_on']=_0x3cd831[_0x3ab361(0x1d9)]),_0x3cd831[_0x3ab361(0x169)]&&_0x3cd831['emailRecipients'][_0x3ab361(0x142)]>0x0&&(_0x3422e9[_0x3ab361(0x15c)]['email_recipients']=_0x3cd831[_0x3ab361(0x169)]['map'](_0x7a2793=>{const _0x418284=_0x33d647?.['get'](_0x7a2793);return _0x418284??String(_0x7a2793);})));_0x3cd831['connectorConfig']&&Object['keys'](_0x3cd831[_0x3ab361(0x1ca)])[_0x3ab361(0x142)]>0x0&&(_0x3422e9[_0x3ab361(0x17f)]=normalizeConnectorConfigForYaml(_0x3cd831[_0x3ab361(0x1ca)]));_0x3cd831[_0x3ab361(0x1c2)]&&(_0x3422e9['activation_template_id']=_0x3cd831[_0x3ab361(0x1c2)]);if(_0x3cd831[_0x3ab361(0x186)]){const _0xa76f20={},_0x11a598=_0x3cd831[_0x3ab361(0x186)];_0x11a598[_0x3ab361(0x19a)]&&_0x11a598[_0x3ab361(0x19a)][_0x3ab361(0x142)]>0x0&&(_0xa76f20[_0x3ab361(0x19a)]=_0x11a598[_0x3ab361(0x19a)][_0x3ab361(0x198)](_0x32dd45=>_0x32dd45&&getColumnName(_0x32dd45))[_0x3ab361(0x1f5)](_0x50670f=>({'name':getColumnName(_0x50670f),..._0x50670f[_0x3ab361(0x150)]&&{'type':_0x50670f[_0x3ab361(0x150)]},..._0x50670f[_0x3ab361(0x196)]&&{'visibility':_0x50670f[_0x3ab361(0x196)]}}))),_0x11a598[_0x3ab361(0x1bb)]&&(_0xa76f20['behavior_table']=_0x11a598[_0x3ab361(0x1bb)]),_0x11a598[_0x3ab361(0x17e)]!==undefined&&(_0xa76f20[_0x3ab361(0x1a1)]=_0x11a598[_0x3ab361(0x17e)]),_0x11a598[_0x3ab361(0x1b6)]&&(_0xa76f20[_0x3ab361(0x1d4)]=_0x11a598[_0x3ab361(0x1b6)]),_0x11a598[_0x3ab361(0x1d6)]&&(_0xa76f20[_0x3ab361(0x1d6)]=_0x11a598[_0x3ab361(0x1d6)]),_0x11a598[_0x3ab361(0x1af)]&&_0x11a598[_0x3ab361(0x1af)][_0x3ab361(0x142)]>0x0&&(_0xa76f20['order_by']=_0x11a598[_0x3ab361(0x1af)]),Object[_0x3ab361(0x148)](_0xa76f20)['length']>0x0&&(_0x3422e9[_0x3ab361(0x141)]=_0xa76f20);}return _0x3cd831[_0x3ab361(0x1a7)]&&(_0x3422e9[_0x3ab361(0x18c)]=_0x3cd831[_0x3ab361(0x1a7)]),_0x3cd831['nestedWorkflowName']&&(_0x3422e9[_0x3ab361(0x18d)]=_0x3cd831[_0x3ab361(0x16f)]),_0x3cd831[_0x3ab361(0x166)]!==undefined&&(_0x3422e9[_0x3ab361(0x164)]=_0x3cd831[_0x3ab361(0x166)]),_0x3422e9;}export function journeyActivationStepToYaml(_0x2f3b60,_0x48f0c0,_0x1aaaef){const _0x1029dd=a142_0xfc1175,_0x5af16b=_0x2f3b60['attributes'][_0x1029dd(0x1c3)],_0x5e208a=_0x5af16b['connectionId']||'',_0x575707=_0x1aaaef?.[_0x1029dd(0x1a9)](_0x5e208a)??_0x5e208a,_0x3d973c={'name':_0x5af16b['name']||'','connection':_0x575707};_0x2f3b60[_0x1029dd(0x1eb)][_0x1029dd(0x194)]&&(_0x3d973c['run_after_journey_refresh']=!![]);_0x5af16b[_0x1029dd(0x1f2)]&&(_0x3d973c[_0x1029dd(0x1f2)]=_0x5af16b['description']);let _0x6242c7=[];_0x5af16b[_0x1029dd(0x19a)]&&_0x5af16b['columns'][_0x1029dd(0x142)]>0x0&&(_0x6242c7=_0x5af16b[_0x1029dd(0x19a)][_0x1029dd(0x198)](_0x4a5223=>_0x4a5223&&getColumnName(_0x4a5223))[_0x1029dd(0x1f5)](_0x47d8d0=>{const _0x2f4129=_0x1029dd,_0x5897dc=getColumnName(_0x47d8d0);if(_0x47d8d0[_0x2f4129(0x150)]||_0x47d8d0[_0x2f4129(0x196)])return{'name':_0x5897dc,..._0x47d8d0[_0x2f4129(0x150)]&&{'type':_0x47d8d0[_0x2f4129(0x150)]},..._0x47d8d0['visibility']&&{'visibility':_0x47d8d0[_0x2f4129(0x196)]}};return _0x5897dc;}));_0x6242c7[_0x1029dd(0x142)]>0x0&&(_0x3d973c[_0x1029dd(0x19a)]=_0x6242c7);_0x5af16b[_0x1029dd(0x193)]!==undefined&&(_0x5af16b['allColumns']===![]&&_0x6242c7['length']===0x0?_0x3d973c[_0x1029dd(0x16a)]=!![]:_0x3d973c[_0x1029dd(0x16a)]=_0x5af16b[_0x1029dd(0x193)]);const _0x3dfdb5={};let _0x40e9f1=![];_0x5af16b[_0x1029dd(0x1c6)]&&(_0x3dfdb5[_0x1029dd(0x150)]=_0x5af16b['scheduleType'],_0x40e9f1=!![]);_0x5af16b[_0x1029dd(0x1f3)]&&(_0x3dfdb5[_0x1029dd(0x19c)]=_0x5af16b[_0x1029dd(0x1f3)],_0x40e9f1=!![]);_0x5af16b[_0x1029dd(0x159)]!==undefined&&_0x5af16b['repeatFrequency']!==null&&(_0x3dfdb5['repeat_frequency']=_0x5af16b[_0x1029dd(0x159)],_0x40e9f1=!![]);_0x5af16b['startAt']!==undefined&&(_0x3dfdb5['start_at']=_0x5af16b[_0x1029dd(0x1cf)],_0x40e9f1=!![]);_0x5af16b[_0x1029dd(0x18a)]!==undefined&&(_0x3dfdb5[_0x1029dd(0x18e)]=_0x5af16b[_0x1029dd(0x18a)],_0x40e9f1=!![]);_0x5af16b[_0x1029dd(0x191)]&&(_0x3dfdb5[_0x1029dd(0x191)]=_0x5af16b[_0x1029dd(0x191)],_0x40e9f1=!![]);_0x40e9f1&&(_0x3d973c[_0x1029dd(0x1bc)]=_0x3dfdb5);(_0x5af16b[_0x1029dd(0x1d9)]&&_0x5af16b[_0x1029dd(0x1d9)][_0x1029dd(0x142)]>0x0||_0x5af16b[_0x1029dd(0x169)]&&_0x5af16b['emailRecipients'][_0x1029dd(0x142)]>0x0)&&(_0x3d973c[_0x1029dd(0x15c)]={},_0x5af16b['notifyOn']&&_0x5af16b['notifyOn']['length']>0x0&&(_0x3d973c[_0x1029dd(0x15c)][_0x1029dd(0x1c0)]=_0x5af16b[_0x1029dd(0x1d9)]),_0x5af16b[_0x1029dd(0x169)]&&_0x5af16b[_0x1029dd(0x169)][_0x1029dd(0x142)]>0x0&&(_0x3d973c[_0x1029dd(0x15c)][_0x1029dd(0x14c)]=_0x5af16b[_0x1029dd(0x169)][_0x1029dd(0x1f5)](_0x505846=>{const _0x441fed=_0x1029dd,_0x4d9ba3=_0x48f0c0?.[_0x441fed(0x1a9)](_0x505846);return _0x4d9ba3??String(_0x505846);})));_0x5af16b[_0x1029dd(0x1ca)]&&Object['keys'](_0x5af16b[_0x1029dd(0x1ca)])[_0x1029dd(0x142)]>0x0&&(_0x3d973c[_0x1029dd(0x17f)]=normalizeConnectorConfigForYaml(_0x5af16b[_0x1029dd(0x1ca)]));_0x5af16b[_0x1029dd(0x1c2)]&&(_0x3d973c[_0x1029dd(0x1ab)]=_0x5af16b[_0x1029dd(0x1c2)]);if(_0x5af16b['syndicationBehavior']){const _0x135431={},_0x193793=_0x5af16b[_0x1029dd(0x186)];_0x193793[_0x1029dd(0x19a)]&&_0x193793[_0x1029dd(0x19a)][_0x1029dd(0x142)]>0x0&&(_0x135431['columns']=_0x193793[_0x1029dd(0x19a)]['filter'](_0x53acf9=>_0x53acf9&&getColumnName(_0x53acf9))[_0x1029dd(0x1f5)](_0x447b24=>({'name':getColumnName(_0x447b24),..._0x447b24['type']&&{'type':_0x447b24[_0x1029dd(0x150)]},..._0x447b24[_0x1029dd(0x196)]&&{'visibility':_0x447b24[_0x1029dd(0x196)]}}))),_0x193793[_0x1029dd(0x1bb)]&&(_0x135431[_0x1029dd(0x18b)]=_0x193793[_0x1029dd(0x1bb)]),_0x193793[_0x1029dd(0x17e)]!==undefined&&(_0x135431[_0x1029dd(0x1a1)]=_0x193793[_0x1029dd(0x17e)]),_0x193793['joinStrategy']&&(_0x135431[_0x1029dd(0x1d4)]=_0x193793[_0x1029dd(0x1b6)]),_0x193793['formatting']&&(_0x135431[_0x1029dd(0x1d6)]=_0x193793['formatting']),_0x193793[_0x1029dd(0x1af)]&&_0x193793['orderBy'][_0x1029dd(0x142)]>0x0&&(_0x135431[_0x1029dd(0x149)]=_0x193793[_0x1029dd(0x1af)]),Object[_0x1029dd(0x148)](_0x135431)[_0x1029dd(0x142)]>0x0&&(_0x3d973c[_0x1029dd(0x141)]=_0x135431);}return _0x3d973c;}export function segmentWithActivationsToYaml(_0x3637ac,_0x75bfb7,_0x57cc8b,_0x16436c,_0x577187){const _0x234949=a142_0xfc1175,_0x8032f8=segmentResponseToDefSync(_0x3637ac,_0x57cc8b);return _0x75bfb7[_0x234949(0x142)]>0x0&&(_0x8032f8[_0x234949(0x154)]=_0x75bfb7['map'](_0x527a09=>activationResponseToDef(_0x527a09,_0x16436c,_0x577187))),_0x8032f8;}function normalizeColumn(_0x3a0c94){const _0x1c64f2=a142_0xfc1175;if(typeof _0x3a0c94===_0x1c64f2(0x1da))return{'column':_0x3a0c94,'source':{'column':_0x3a0c94}};return{'column':_0x3a0c94['name'],'source':{'column':_0x3a0c94[_0x1c64f2(0x1b1)]},..._0x3a0c94['type']&&{'type':_0x3a0c94[_0x1c64f2(0x150)]},..._0x3a0c94['visibility']&&{'visibility':_0x3a0c94[_0x1c64f2(0x196)]}};}const KNOWN_ACTIVATION_FIELDS=new Set(Object[a142_0xfc1175(0x148)](ActivationDefSchema[a142_0xfc1175(0x15a)]));export function warnUnrecognizedActivationFields(_0x221435,_0x2684cc){const _0x1c806b=a142_0xfc1175,_0x12e0be=Object[_0x1c806b(0x148)](_0x221435)[_0x1c806b(0x198)](_0x3ea270=>!KNOWN_ACTIVATION_FIELDS[_0x1c806b(0x1a2)](_0x3ea270));if(_0x12e0be['length']>0x0){const _0x5f0fab=_0x12e0be['map'](_0x4026aa=>_0x1c806b(0x1a5)+_0x4026aa+'\x22')[_0x1c806b(0x16e)]('\x0a');console[_0x1c806b(0x163)]('Warning:\x20activation\x20\x22'+_0x2684cc+_0x1c806b(0x1e4)+_0x5f0fab);}}export async function activationDefToCreateRequest(_0x317258,_0x4076bc){const _0x38a4f2=a142_0xfc1175;warnUnrecognizedActivationFields(_0x317258,_0x317258['name']);const _0x5b02ed=_0x4076bc?.['emailToIdMap'],_0x406369=_0x4076bc?.[_0x38a4f2(0x1e2)],_0x32fabf=_0x317258[_0x38a4f2(0x1f6)];let _0x26c0c3;const _0x133fe9=parseInt(_0x32fabf,0xa);if(!isNaN(_0x133fe9)&&String(_0x133fe9)===_0x32fabf)_0x26c0c3=_0x133fe9;else{const _0x745d64=_0x406369?.[_0x38a4f2(0x1a9)](_0x32fabf);if(_0x745d64===undefined)throw new SDKError(ErrorCode[_0x38a4f2(0x1ea)],_0x38a4f2(0x1ce)+_0x32fabf,undefined,{'helpText':_0x38a4f2(0x1a4)});_0x26c0c3=_0x745d64;}const _0x2bf3ac={'name':_0x317258[_0x38a4f2(0x1b1)],'connectionId':_0x26c0c3};_0x317258['description']&&(_0x2bf3ac[_0x38a4f2(0x1f2)]=_0x317258[_0x38a4f2(0x1f2)]);let _0x3255da=[];_0x317258[_0x38a4f2(0x19a)]&&_0x317258[_0x38a4f2(0x19a)][_0x38a4f2(0x142)]>0x0&&(_0x3255da=_0x317258[_0x38a4f2(0x19a)][_0x38a4f2(0x198)](_0x271f44=>_0x271f44!=null)[_0x38a4f2(0x1f5)](normalizeColumn));_0x3255da[_0x38a4f2(0x142)]>0x0&&(_0x2bf3ac['columns']=_0x3255da);_0x317258[_0x38a4f2(0x16a)]!==undefined&&(_0x317258[_0x38a4f2(0x16a)]===![]&&_0x3255da[_0x38a4f2(0x142)]===0x0?_0x2bf3ac[_0x38a4f2(0x193)]=!![]:_0x2bf3ac[_0x38a4f2(0x193)]=_0x317258[_0x38a4f2(0x16a)]);if(_0x317258[_0x38a4f2(0x1bc)]){const _0x542fda=_0x317258[_0x38a4f2(0x1bc)],_0x3d2eaf=_0x542fda[_0x38a4f2(0x150)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x542fda[_0x38a4f2(0x19c)]];_0x3d2eaf&&(_0x2bf3ac[_0x38a4f2(0x1c6)]=_0x3d2eaf);const _0x147fdb=_0x542fda['repeat_unit']??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x542fda[_0x38a4f2(0x150)]];_0x147fdb&&(_0x2bf3ac[_0x38a4f2(0x1f3)]=_0x147fdb);_0x542fda[_0x38a4f2(0x195)]!==undefined&&(_0x2bf3ac[_0x38a4f2(0x159)]=_0x542fda[_0x38a4f2(0x195)]);_0x542fda['repeat_sub_frequency']&&(_0x2bf3ac[_0x38a4f2(0x1f0)]=_0x542fda[_0x38a4f2(0x16b)]);_0x542fda[_0x38a4f2(0x1cb)]!==undefined&&(_0x2bf3ac[_0x38a4f2(0x1cf)]=_0x542fda[_0x38a4f2(0x1cb)]);_0x542fda[_0x38a4f2(0x18e)]!==undefined&&(_0x2bf3ac[_0x38a4f2(0x18a)]=_0x542fda[_0x38a4f2(0x18e)]);_0x542fda['timezone']&&(_0x2bf3ac[_0x38a4f2(0x191)]=_0x542fda[_0x38a4f2(0x191)]);if(_0x3d2eaf&&_0x3d2eaf!==_0x38a4f2(0x1d7)&&_0x3d2eaf!==_0x38a4f2(0x17b)&&_0x542fda[_0x38a4f2(0x1cb)]){const _0x2d4852=_0x542fda[_0x38a4f2(0x1cb)]['match'](/T(\d{2}:\d{2})/);_0x2d4852&&(_0x2bf3ac[_0x38a4f2(0x1df)]=_0x2d4852[0x1]);}}_0x317258[_0x38a4f2(0x15c)]&&(_0x317258['notification'][_0x38a4f2(0x1c0)]&&(_0x2bf3ac['notifyOn']=_0x317258['notification'][_0x38a4f2(0x1c0)]),_0x317258[_0x38a4f2(0x15c)][_0x38a4f2(0x14c)]&&(_0x2bf3ac[_0x38a4f2(0x169)]=_0x317258[_0x38a4f2(0x15c)]['email_recipients'][_0x38a4f2(0x1f5)](_0x2fce1d=>{const _0x2e7654=_0x38a4f2,_0x4d8f7f=Number(_0x2fce1d);if(!isNaN(_0x4d8f7f)&&String(_0x4d8f7f)===_0x2fce1d)return _0x4d8f7f;const _0x2bf237=_0x5b02ed?.[_0x2e7654(0x1a9)](_0x2fce1d[_0x2e7654(0x15f)]());if(_0x2bf237===undefined)throw new SDKError(ErrorCode[_0x2e7654(0x1f1)],_0x2e7654(0x183)+_0x2fce1d+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x2bf237;})));if(_0x317258[_0x38a4f2(0x17f)]){const _0x900897=_0x4076bc?.[_0x38a4f2(0x1d3)]?.[_0x38a4f2(0x1a9)](_0x32fabf);if(_0x900897&&_0x4076bc?.['getSchema'])try{const _0x29208b=await _0x4076bc[_0x38a4f2(0x152)](_0x900897),_0x3a7ad5=validateConnectorConfig(_0x317258[_0x38a4f2(0x17f)],_0x29208b);if(!_0x3a7ad5[_0x38a4f2(0x14a)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0x38a4f2(0x1b3)+_0x317258['name']+_0x38a4f2(0x1cd)+formatValidationErrors(_0x3a7ad5[_0x38a4f2(0x1ac)]),undefined,{'helpText':'Connector:\x20'+_0x900897+_0x38a4f2(0x1e6)+formatSchemaAsHelp(_0x29208b)});if(_0x3a7ad5[_0x38a4f2(0x1d1)][_0x38a4f2(0x142)]>0x0){const _0x251718=formatValidationWarnings(_0x3a7ad5[_0x38a4f2(0x1d1)]);console['warn'](_0x38a4f2(0x19d)+_0x317258['name']+_0x38a4f2(0x1cd)+_0x251718);}_0x2bf3ac[_0x38a4f2(0x1ca)]=transformConfigToLegacy(_0x317258[_0x38a4f2(0x17f)],_0x29208b);}catch(_0x3d996d){if(_0x3d996d instanceof SDKError&&_0x3d996d['code']===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x2bf3ac[_0x38a4f2(0x1ca)]=_0x317258[_0x38a4f2(0x17f)];else throw _0x3d996d;}else _0x2bf3ac[_0x38a4f2(0x1ca)]=_0x317258[_0x38a4f2(0x17f)];}_0x317258[_0x38a4f2(0x1ab)]!==undefined&&(_0x2bf3ac[_0x38a4f2(0x1c2)]=_0x317258['activation_template_id']);if(_0x317258['behavior']){const _0x6065dd=_0x317258['behavior'],_0x458457={};if(_0x6065dd['columns']&&_0x6065dd['columns']['length']>0x0){const _0x47f271=_0x6065dd[_0x38a4f2(0x19a)][_0x38a4f2(0x198)](_0x47b634=>_0x47b634&&_0x47b634[_0x38a4f2(0x1b1)])['map'](normalizeColumn);_0x47f271[_0x38a4f2(0x142)]>0x0&&(_0x458457[_0x38a4f2(0x19a)]=_0x47f271);}_0x6065dd['behavior_table']&&(_0x458457[_0x38a4f2(0x1bb)]=_0x6065dd[_0x38a4f2(0x18b)]);_0x6065dd[_0x38a4f2(0x1d4)]&&(_0x458457[_0x38a4f2(0x1b6)]=_0x6065dd[_0x38a4f2(0x1d4)]);if(_0x6065dd[_0x38a4f2(0x1a1)]!==undefined)_0x458457[_0x38a4f2(0x17e)]=_0x6065dd[_0x38a4f2(0x1a1)];else{if(_0x6065dd[_0x38a4f2(0x1d4)]===_0x38a4f2(0x170)||_0x6065dd[_0x38a4f2(0x1d4)]===_0x38a4f2(0x1d2))_0x458457['joinRow']=0x1;else _0x6065dd[_0x38a4f2(0x1d4)]===_0x38a4f2(0x143)&&(_0x458457[_0x38a4f2(0x17e)]=null);}_0x6065dd[_0x38a4f2(0x1d6)]&&(_0x458457['formatting']=_0x6065dd[_0x38a4f2(0x1d6)]),_0x6065dd[_0x38a4f2(0x149)]&&(_0x458457['orderBy']=_0x6065dd[_0x38a4f2(0x149)]),_0x2bf3ac[_0x38a4f2(0x186)]=_0x458457;}return _0x317258[_0x38a4f2(0x18c)]&&(_0x2bf3ac[_0x38a4f2(0x1a7)]=_0x317258[_0x38a4f2(0x18c)]),_0x317258['nested_workflow_name']&&(_0x2bf3ac[_0x38a4f2(0x16f)]=_0x317258[_0x38a4f2(0x18d)]),_0x317258['lock_enabled']!==undefined&&(_0x2bf3ac[_0x38a4f2(0x166)]=_0x317258['lock_enabled']),_0x2bf3ac;}export async function activationDefToUpdateRequest(_0x1d7fd5,_0x405202){return activationDefToCreateRequest(_0x1d7fd5,_0x405202);}export function deepSortObject(_0x133d62){const _0x4736b1=a142_0xfc1175;if(_0x133d62===null||typeof _0x133d62!=='object')return _0x133d62;if(Array[_0x4736b1(0x1b5)](_0x133d62))return _0x133d62[_0x4736b1(0x1f5)](deepSortObject)[_0x4736b1(0x199)]((_0x24fbee,_0x3277ee)=>JSON[_0x4736b1(0x1a3)](_0x24fbee)['localeCompare'](JSON[_0x4736b1(0x1a3)](_0x3277ee)));const _0x108117={};for(const _0x248483 of Object['keys'](_0x133d62)[_0x4736b1(0x199)]()){_0x108117[_0x248483]=deepSortObject(_0x133d62[_0x248483]);}return _0x108117;}export function serializeRule(_0x4954a3){const _0x1822a9=a142_0xfc1175;return JSON[_0x1822a9(0x1a3)](deepSortObject(_0x4954a3));}export function normalizeRuleForMatching(_0x33ae66){return normalizeConditionsForMatching(_0x33ae66);}function normalizeConditionsForMatching(_0x4e4ca5){const _0x16603e=a142_0xfc1175;if(_0x4e4ca5===null||typeof _0x4e4ca5!==_0x16603e(0x190))return _0x4e4ca5;if(Array[_0x16603e(0x1b5)](_0x4e4ca5))return _0x4e4ca5[_0x16603e(0x1f5)](normalizeConditionsForMatching);const _0x51c3dd=_0x4e4ca5;if((_0x51c3dd[_0x16603e(0x150)]===_0x16603e(0x15e)||_0x51c3dd[_0x16603e(0x150)]==='exclude')&&typeof _0x51c3dd[_0x16603e(0x14f)]===_0x16603e(0x1da))return{..._0x51c3dd,'segment':_0x16603e(0x1c4)};const _0x52a669={};for(const _0x58a808 of Object['keys'](_0x51c3dd)){_0x52a669[_0x58a808]=normalizeConditionsForMatching(_0x51c3dd[_0x58a808]);}return _0x52a669;}export function serializeRuleForMatching(_0x53b7d9){return JSON['stringify'](deepSortObject(normalizeRuleForMatching(_0x53b7d9)));}export function expandSegmentReferences(_0x583e07,_0x593466,_0x6e7562=new Set()){return expandConditions(_0x583e07,_0x593466,_0x6e7562);}function expandConditions(_0x1b7cce,_0x48b302,_0x15d6a2){const _0x5af23b=a142_0xfc1175;if(_0x1b7cce===null||typeof _0x1b7cce!==_0x5af23b(0x190))return _0x1b7cce;if(Array[_0x5af23b(0x1b5)](_0x1b7cce))return _0x1b7cce[_0x5af23b(0x1f5)](_0x38aebb=>expandConditions(_0x38aebb,_0x48b302,_0x15d6a2));const _0x2ff256=_0x1b7cce;if((_0x2ff256[_0x5af23b(0x150)]===_0x5af23b(0x15e)||_0x2ff256[_0x5af23b(0x150)]===_0x5af23b(0x153))&&typeof _0x2ff256[_0x5af23b(0x14f)]===_0x5af23b(0x1da)){const _0x14349a=_0x2ff256[_0x5af23b(0x14f)],_0x41fd1a=_0x48b302[_0x5af23b(0x1a9)](_0x14349a);if(_0x41fd1a&&!_0x15d6a2[_0x5af23b(0x1a2)](_0x14349a)){const _0x205de4=new Set(_0x15d6a2);_0x205de4['add'](_0x14349a);const _0x52c59d=expandConditions(_0x41fd1a,_0x48b302,_0x205de4);return{'type':_0x2ff256[_0x5af23b(0x150)],'expanded_rule':_0x52c59d};}return{'type':_0x2ff256[_0x5af23b(0x150)],'expanded_rule':_0x5af23b(0x177)};}const _0x3788c2={};for(const _0x4d7f6d of Object[_0x5af23b(0x148)](_0x2ff256)){_0x3788c2[_0x4d7f6d]=expandConditions(_0x2ff256[_0x4d7f6d],_0x48b302,_0x15d6a2);}return _0x3788c2;}export function serializeExpandedRule(_0x2fed3e,_0xee4418){const _0x38c20a=a142_0xfc1175,_0x30c8e1=expandSegmentReferences(_0x2fed3e,_0xee4418);return JSON[_0x38c20a(0x1a3)](deepSortObject(_0x30c8e1));}export function createSegmentNameContext(_0x46a684){const _0x1874c8=a142_0xfc1175,_0x3fff01=new Set(),_0xd0c08a=new Map(),_0x53571b=new Map();if(_0x46a684)for(const [_0x12b961,_0x166275]of Object['entries'](_0x46a684)){if(_0x166275['rule']){const _0x3de6e7=serializeRule(_0x166275[_0x1874c8(0x179)]);_0x53571b[_0x1874c8(0x165)](_0x3de6e7,_0x12b961),_0x3fff01['add'](_0x12b961);}}return{'usedNames':_0x3fff01,'ruleHashToName':_0xd0c08a,'localRuleToName':_0x46a684?_0x53571b:undefined};}export function resolveSegmentName(_0x5ee812,_0x13ecd5,_0x116d19,_0x105916){const _0x277bbb=a142_0xfc1175,_0x177b4a=serializeRule(_0x13ecd5);if(_0x116d19[_0x277bbb(0x168)]){const _0x1208b9=_0x116d19[_0x277bbb(0x168)]['get'](_0x177b4a);if(_0x1208b9)return{'name':_0x1208b9,'isDuplicate':![],'isLocalMatch':!![]};}const _0x1eddf1=_0x116d19[_0x277bbb(0x1a8)][_0x277bbb(0x1a9)](_0x177b4a);if(_0x1eddf1)return{'name':_0x1eddf1,'isDuplicate':!![],'isLocalMatch':![]};const _0x37541b=_0x105916(_0x5ee812);let _0x70d4d1=_0x37541b||_0x5ee812,_0x22a6fd=_0x70d4d1,_0x41e366=0x2;while(_0x116d19[_0x277bbb(0x176)][_0x277bbb(0x1a2)](_0x22a6fd)){_0x22a6fd=_0x70d4d1+'_'+_0x41e366,_0x41e366++;}return _0x116d19[_0x277bbb(0x176)][_0x277bbb(0x175)](_0x22a6fd),_0x116d19[_0x277bbb(0x1a8)][_0x277bbb(0x165)](_0x177b4a,_0x22a6fd),{'name':_0x22a6fd,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x5ac6d5){const _0x11e833=[],_0x2875ad=_0x1bfaba=>{const _0x31e551=a142_0x4889;if(!_0x1bfaba||typeof _0x1bfaba!==_0x31e551(0x190))return;if(Array[_0x31e551(0x1b5)](_0x1bfaba)){_0x1bfaba[_0x31e551(0x144)](_0x2875ad);return;}const _0x2da45f=_0x1bfaba;(_0x2da45f[_0x31e551(0x150)]===_0x31e551(0x15e)||_0x2da45f[_0x31e551(0x150)]===_0x31e551(0x153))&&typeof _0x2da45f[_0x31e551(0x14f)]===_0x31e551(0x1da)&&_0x11e833[_0x31e551(0x156)](_0x2da45f[_0x31e551(0x14f)]);for(const _0xfea57e of Object[_0x31e551(0x1e1)](_0x2da45f)){_0x2875ad(_0xfea57e);}};return _0x2875ad(_0x5ac6d5),_0x11e833;}export function validateSegmentRule(_0x1fbe5b,_0x584013){const _0x1e3d9e=a142_0xfc1175;if(!_0x584013||!_0x584013['conditions'])return;for(let _0x9ba82=0x0;_0x9ba82<_0x584013[_0x1e3d9e(0x146)][_0x1e3d9e(0x142)];_0x9ba82++){const _0x3a967c=_0x584013[_0x1e3d9e(0x146)][_0x9ba82];if('type'in _0x3a967c&&_0x3a967c['type']===_0x1e3d9e(0x1ec)){const _0x103f6c=_0x3a967c,_0x8ae90d=_0x103f6c['source']||_0x103f6c['aggregation'];if((!_0x103f6c['attribute']||_0x103f6c[_0x1e3d9e(0x167)]==='')&&!_0x8ae90d)throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x1e3d9e(0x1db)+_0x1fbe5b+_0x1e3d9e(0x185)+(_0x1e3d9e(0x192)+_0x9ba82+_0x1e3d9e(0x173))+_0x1e3d9e(0x162));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a143_0xd472(){const _0x4a72d8=['default','12ZmdfiV','get','column_type','1930sTyPEI','parentTableName','trim','slice','4020468XueTkw','tableName','execute','YES','information_schema','map','replace','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','varchar','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','Fetching\x20schema...','\x20\x20\x20\x20','columns','localeCompare','verbose','type','source','684803QvvDpZ','1211185DjxAWs','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','matrixTableName','18807SMLrZD','100GjdSkx','error','10909idQefo','dim','groupingName','behaviorName','null','size','matrixColumnName','extra','parentColumn','set','4473rrmLue','displayName','Unknown','38DStBsI','filter','7895767ygUugn','column_name','push','sort','query','24pDpSCw','fields','setJobId','name','entries','data','some','Schema\x20query:\x0a','Attributes','bold'];a143_0xd472=function(){return _0x4a72d8;};return a143_0xd472();}function a143_0x3900(_0x34e04d,_0x522a84){_0x34e04d=_0x34e04d-0xee;const _0xd47274=a143_0xd472();let _0x3900ae=_0xd47274[_0x34e04d];return _0x3900ae;}(function(_0x6e1068,_0x47727f){const _0x30d125=a143_0x3900,_0x29f001=_0x6e1068();while(!![]){try{const _0x1d1fb3=-parseInt(_0x30d125(0x10e))/0x1*(-parseInt(_0x30d125(0x11b))/0x2)+parseInt(_0x30d125(0x10b))/0x3*(parseInt(_0x30d125(0x10c))/0x4)+parseInt(_0x30d125(0x108))/0x5+-parseInt(_0x30d125(0xf6))/0x6+-parseInt(_0x30d125(0x107))/0x7*(parseInt(_0x30d125(0x122))/0x8)+parseInt(_0x30d125(0x118))/0x9*(parseInt(_0x30d125(0xf2))/0xa)+parseInt(_0x30d125(0x11d))/0xb*(parseInt(_0x30d125(0xef))/0xc);if(_0x1d1fb3===_0x47727f)break;else _0x29f001['push'](_0x29f001['shift']());}catch(_0x261258){_0x29f001['push'](_0x29f001['shift']());}}}(a143_0xd472,0x6f6c2));import a143_0xd5fdab from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x4d2af2){const _0x222308=a143_0x3900,_0x4f03fd=_0x4d2af2[_0x222308(0x102)][_0x222308(0xfb)](_0x49fc5a=>({'column_name':_0x49fc5a[_0x222308(0x125)],'column_type':_0x49fc5a[_0x222308(0x105)],'null':_0x222308(0xf9),'key':null,'default':null,'extra':null}));return{..._0x4d2af2,'columns':[{'name':_0x222308(0x11e),'type':'varchar'},{'name':_0x222308(0xf1),'type':_0x222308(0xfe)},{'name':_0x222308(0x112),'type':'varchar'},{'name':'key','type':_0x222308(0xfe)},{'name':_0x222308(0xee),'type':_0x222308(0xfe)},{'name':_0x222308(0x115),'type':_0x222308(0xfe)}],'data':_0x4f03fd};}export async function executeSchemaQuery(_0x3b6661,_0x42c722,_0x4efe84){const _0x4cc00b=a143_0x3900,_0x358214=_0x3b6661[_0x4cc00b(0xf4)]()[_0x4cc00b(0xfc)](/;+$/,''),_0x50f019='SELECT\x20*\x20FROM\x20(\x0a'+_0x358214+_0x4cc00b(0xff);_0x4efe84[_0x4cc00b(0x104)]&&console[_0x4cc00b(0x10d)](_0x4cc00b(0x129)+_0x50f019);const _0x3f6f9e=await withProgressSpinner(_0x4cc00b(0x100),async _0x3b73ce=>{const _0x464686=_0x4cc00b,_0x532b5b=await _0x42c722[_0x464686(0x121)][_0x464686(0xf8)](_0x50f019,{'catalog':'td','schema':_0x464686(0xfa),'onJobId':_0x30c3bd=>{const _0xe040dd=_0x464686;_0x3b73ce[_0xe040dd(0x124)](_0x30c3bd);}});return _0x532b5b;},{'verbose':_0x4efe84[_0x4cc00b(0x104)]});return buildSchemaResult(_0x3f6f9e[_0x4cc00b(0x127)]);}function columnName(_0xdda267){const _0x289c75=a143_0x3900;return _0xdda267[_0x289c75(0x114)]||_0xdda267[_0x289c75(0x116)]||_0xdda267[_0x289c75(0x125)];}function formatFieldLine(_0xdfe0b4,_0x1b0769,_0x16f5ed){const _0x47d34b=a143_0x3900,_0x16b1d2=_0xdfe0b4!==_0x1b0769?'\x20'+a143_0xd5fdab[_0x47d34b(0x10f)]('('+_0x1b0769+')'):'';return _0x47d34b(0x101)+_0xdfe0b4+_0x16b1d2+':\x20'+a143_0xd5fdab['cyan'](_0x16f5ed);}function sortByColumnName(_0x13c620){const _0x4121f0=a143_0x3900;return[..._0x13c620][_0x4121f0(0x120)]((_0x33ad60,_0x4b90f6)=>columnName(_0x33ad60)[_0x4121f0(0x103)](columnName(_0x4b90f6)));}export function displayFieldsHumanReadable(_0x33cf6d,_0x448d61){const _0x178eed=a143_0x3900,_0x377d5d=_0x33cf6d['filter'](_0x5e3484=>_0x5e3484[_0x178eed(0x106)]==='attribute'),_0x1314e2=_0x33cf6d[_0x178eed(0x11c)](_0x3d13d9=>_0x3d13d9[_0x178eed(0x106)]==='behavior'),_0x1a7e68=new Map();for(const _0xe80072 of _0x377d5d){const _0x3fc4c5=_0xe80072[_0x178eed(0x110)]||_0xe80072[_0x178eed(0xf3)]||_0x178eed(0x11a),_0x32114d=_0x1a7e68[_0x178eed(0xf0)](_0x3fc4c5);_0x32114d?_0x32114d['fields']['push'](_0xe80072):_0x1a7e68[_0x178eed(0x117)](_0x3fc4c5,{'displayName':_0x3fc4c5,'tableName':_0xe80072['parentTableName'],'fields':[_0xe80072]});}const _0x619bfb=new Map();for(const _0x137fd0 of _0x1314e2){const _0x1fb2c8=_0x137fd0[_0x178eed(0x111)]||_0x178eed(0x11a),_0x153ff4=_0x619bfb[_0x178eed(0xf0)](_0x1fb2c8)||[];_0x153ff4[_0x178eed(0x11f)](_0x137fd0),_0x619bfb[_0x178eed(0x117)](_0x1fb2c8,_0x153ff4);}console[_0x178eed(0x10d)]('\x0a'+a143_0xd5fdab[_0x178eed(0x12b)](_0x448d61));if(_0x1a7e68[_0x178eed(0x113)]>0x0){console[_0x178eed(0x10d)]('\x0a'+a143_0xd5fdab[_0x178eed(0x10f)](_0x178eed(0x12a)));const _0xf49145=[..._0x1a7e68['entries']()][_0x178eed(0x120)]((_0x1a0df1,_0x549771)=>_0x1a0df1[0x0][_0x178eed(0x103)](_0x549771[0x0]));for(const [,_0x251e01]of _0xf49145){const _0x23fbd8=_0x251e01['tableName']&&_0x251e01['tableName']!==_0x251e01[_0x178eed(0x119)]?'\x20'+a143_0xd5fdab[_0x178eed(0x10f)]('('+_0x251e01[_0x178eed(0xf7)]+')'):'';console[_0x178eed(0x10d)]('\x20\x20'+a143_0xd5fdab['bold'](_0x251e01[_0x178eed(0x119)])+_0x23fbd8);for(const _0x10b764 of sortByColumnName(_0x251e01[_0x178eed(0x123)])){console[_0x178eed(0x10d)](formatFieldLine(columnName(_0x10b764),_0x10b764['name'],_0x10b764['type']));}}}if(_0x619bfb[_0x178eed(0x113)]>0x0){console['error']('\x0a'+a143_0xd5fdab[_0x178eed(0x10f)]('Behaviors'));const _0x1532d0=[..._0x619bfb[_0x178eed(0x126)]()][_0x178eed(0x120)]((_0x2f91f9,_0x25c8de)=>_0x2f91f9[0x0][_0x178eed(0x103)](_0x25c8de[0x0]));for(const [_0x5bae14,_0x26d42d]of _0x1532d0){const _0x17fb33=_0x26d42d[0x0],_0x10a4b9=_0x17fb33?.[_0x178eed(0x10a)];if(_0x10a4b9){const _0x57977d=_0x10a4b9!==_0x5bae14?'\x20'+a143_0xd5fdab[_0x178eed(0x10f)]('('+_0x5bae14+')'):'';console[_0x178eed(0x10d)]('\x20\x20'+a143_0xd5fdab['bold'](_0x10a4b9)+_0x57977d);}else{const _0x275403=_0x17fb33?.[_0x178eed(0xf3)]||'';console[_0x178eed(0x10d)]('\x20\x20'+a143_0xd5fdab['bold'](_0x5bae14)+(_0x275403?'\x20'+a143_0xd5fdab[_0x178eed(0x10f)]('('+_0x275403+')'):''));}for(const _0x2a2b62 of sortByColumnName(_0x26d42d)){const _0x18a48d=_0x2a2b62['name']['startsWith'](_0x5bae14+'.')?_0x2a2b62[_0x178eed(0x125)][_0x178eed(0xf5)](_0x5bae14['length']+0x1):_0x2a2b62['name'];console[_0x178eed(0x10d)](formatFieldLine(columnName(_0x2a2b62),_0x18a48d,_0x2a2b62[_0x178eed(0x105)]));}}}const _0x337db5=_0x33cf6d[_0x178eed(0x128)](_0x556b19=>_0x556b19[_0x178eed(0x114)]||_0x556b19[_0x178eed(0x10a)]);_0x337db5&&(console[_0x178eed(0x10d)]('\x0a'+a143_0xd5fdab[_0x178eed(0x10f)](_0x178eed(0xfd))),console[_0x178eed(0x10d)](a143_0xd5fdab['dim'](_0x178eed(0x109)))),console[_0x178eed(0x10d)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e5a56,_0x441b8a){const _0x41a623=a144_0x5867,_0x3c18c8=_0x1e5a56();while(!![]){try{const _0x4e3546=-parseInt(_0x41a623(0xb4))/0x1*(parseInt(_0x41a623(0xaf))/0x2)+-parseInt(_0x41a623(0xa9))/0x3+parseInt(_0x41a623(0xa7))/0x4*(-parseInt(_0x41a623(0xa5))/0x5)+parseInt(_0x41a623(0xb8))/0x6+parseInt(_0x41a623(0xac))/0x7*(-parseInt(_0x41a623(0xb6))/0x8)+-parseInt(_0x41a623(0xb2))/0x9*(parseInt(_0x41a623(0xa8))/0xa)+parseInt(_0x41a623(0xb3))/0xb*(parseInt(_0x41a623(0xae))/0xc);if(_0x4e3546===_0x441b8a)break;else _0x3c18c8['push'](_0x3c18c8['shift']());}catch(_0x126a1b){_0x3c18c8['push'](_0x3c18c8['shift']());}}}(a144_0x3dda,0x2e014));import{readdirSync,statSync}from'fs';import a144_0x3882ef from'path';export function findYamlFiles(_0x14c373){const _0x3cba78=[];function _0x442025(_0x363d22){const _0x6b43dd=a144_0x5867,_0x35e2dd=readdirSync(_0x363d22,{'withFileTypes':!![]});for(const _0x1fea53 of _0x35e2dd){const _0x458a63=a144_0x3882ef[_0x6b43dd(0xb0)](_0x363d22,_0x1fea53['name']);if(_0x1fea53[_0x6b43dd(0xaa)]())_0x442025(_0x458a63);else(_0x1fea53[_0x6b43dd(0xad)][_0x6b43dd(0xab)](_0x6b43dd(0xa6))||_0x1fea53[_0x6b43dd(0xad)][_0x6b43dd(0xab)]('.yaml'))&&_0x3cba78[_0x6b43dd(0xb5)](_0x458a63);}}return _0x442025(_0x14c373),_0x3cba78;}export function discoverYamlFiles(_0x54200c){const _0x216093=a144_0x5867,_0x594e9e=findYamlFiles(_0x54200c);return _0x594e9e[_0x216093(0xb9)](_0x302d3c=>{const _0x1815ac=_0x216093,_0x421e23=a144_0x3882ef['relative'](_0x54200c,_0x302d3c),_0x100ad0=a144_0x3882ef[_0x1815ac(0xb1)](_0x421e23);return{'absolutePath':_0x302d3c,'relativePath':_0x421e23,'folderPath':_0x100ad0==='.'?'':_0x100ad0[_0x1815ac(0xbb)](/\\/g,'/')};});}function a144_0x5867(_0x51159a,_0x525143){_0x51159a=_0x51159a-0xa4;const _0x3ddaa3=a144_0x3dda();let _0x5867ff=_0x3ddaa3[_0x51159a];return _0x5867ff;}export function isYamlFile(_0x2c4c28){const _0x35fdd6=a144_0x5867;try{const _0x336e98=statSync(_0x2c4c28);if(!_0x336e98['isFile']())return![];const _0x150aae=a144_0x3882ef[_0x35fdd6(0xb7)](_0x2c4c28)[_0x35fdd6(0xa4)]();return _0x150aae===_0x35fdd6(0xa6)||_0x150aae===_0x35fdd6(0xba);}catch{return![];}}function a144_0x3dda(){const _0x11c556=['extname','1497654XrSJLx','map','.yaml','replace','toLowerCase','4145nzeXKm','.yml','1316eyPnmc','45790dWFThS','303069SNRkIW','isDirectory','endsWith','1337SHOTYG','name','12cCAdMh','2unhQeZ','join','dirname','225xUSdwb','8804477bdzGMF','159994kRWmsz','push','8936IWeqxX'];a144_0x3dda=function(){return _0x11c556;};return a144_0x3dda();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x282b34,_0x27435a){const _0x256529=a145_0x5b95,_0x2b8a4a=_0x282b34();while(!![]){try{const _0x2a1d19=-parseInt(_0x256529(0x1fd))/0x1+-parseInt(_0x256529(0x1fe))/0x2*(-parseInt(_0x256529(0x222))/0x3)+parseInt(_0x256529(0x22d))/0x4+parseInt(_0x256529(0x207))/0x5*(parseInt(_0x256529(0x236))/0x6)+-parseInt(_0x256529(0x20f))/0x7*(-parseInt(_0x256529(0x21a))/0x8)+-parseInt(_0x256529(0x21b))/0x9+-parseInt(_0x256529(0x237))/0xa*(parseInt(_0x256529(0x23f))/0xb);if(_0x2a1d19===_0x27435a)break;else _0x2b8a4a['push'](_0x2b8a4a['shift']());}catch(_0x2cb90c){_0x2b8a4a['push'](_0x2b8a4a['shift']());}}}(a145_0x1b57,0x19c28));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x16880c){const _0x2f4348=a145_0x5b95;return _0x16880c[_0x2f4348(0x1f6)]()[_0x2f4348(0x238)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x2f4348(0x238)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x47fe36){const _0x47b154=a145_0x5b95,_0x1f8d0c=_0x47fe36[_0x47b154(0x22c)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1f8d0c){const _0x252a14=_0x1f8d0c[0x1][_0x47b154(0x1f6)](),_0x209120=_0x1f8d0c[0x2],_0x56488e=_0x209120[_0x47b154(0x238)](/-/g,'')[_0x47b154(0x217)](0x0,0x4)[_0x47b154(0x1f6)]();return _0x252a14+'_'+_0x56488e;}const _0x1db826=_0x47fe36[_0x47b154(0x22c)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x1db826){const _0xd4b6fe=_0x1db826[0x1],_0x2e7f96=_0x1db826[0x2][_0x47b154(0x1f6)](),_0x4f35eb=_0xd4b6fe[_0x47b154(0x238)](/-/g,'')['slice'](0x0,0x4)[_0x47b154(0x1f6)]();return _0x2e7f96+'_'+_0x4f35eb;}return undefined;}function stableStringify(_0x1ef0d4){const _0x42187b=a145_0x5b95;if(Array['isArray'](_0x1ef0d4))return'['+_0x1ef0d4['map'](_0x153e3d=>stableStringify(_0x153e3d))[_0x42187b(0x230)](',')+']';if(_0x1ef0d4&&typeof _0x1ef0d4===_0x42187b(0x235)){const _0x68f56=_0x1ef0d4,_0x5dea6f=Object[_0x42187b(0x215)](_0x68f56)[_0x42187b(0x233)](),_0x48aa21=_0x5dea6f[_0x42187b(0x1fc)](_0x4aff2f=>'\x22'+_0x4aff2f+'\x22:'+stableStringify(_0x68f56[_0x4aff2f]));return'{'+_0x48aa21['join'](',')+'}';}const _0x4b0da0=JSON['stringify'](_0x1ef0d4);return _0x4b0da0===undefined?_0x42187b(0x22f):_0x4b0da0;}export function consolidateActivationsByContent(_0x32031e){const _0x583b68=a145_0x5b95,_0x124b21={},_0x14f0da=new Map(),_0x2c7612=new Map();for(const _0x581e27 of _0x32031e){if(!_0x581e27)continue;for(const [_0x15f851,_0x38589d]of Object['entries'](_0x581e27)){const _0x581487={'name':_0x38589d[_0x583b68(0x221)],'connection':_0x38589d[_0x583b68(0x220)],..._0x38589d[_0x583b68(0x203)]!==undefined&&{'all_columns':_0x38589d[_0x583b68(0x203)]},..._0x38589d[_0x583b68(0x229)]!==undefined&&{'columns':_0x38589d['columns']},..._0x38589d[_0x583b68(0x218)]!==undefined&&{'behavior':_0x38589d[_0x583b68(0x218)]},..._0x38589d[_0x583b68(0x20d)]!==undefined&&{'schedule':_0x38589d['schedule']},..._0x38589d[_0x583b68(0x225)]!==undefined&&{'notification':_0x38589d[_0x583b68(0x225)]},..._0x38589d[_0x583b68(0x210)]!==undefined&&{'connector_config':_0x38589d[_0x583b68(0x210)]},..._0x38589d[_0x583b68(0x21c)]!==undefined&&{'activation_template_id':_0x38589d[_0x583b68(0x21c)]}},_0x45f08d=stableStringify(_0x581487),_0x2a5add=_0x2c7612[_0x583b68(0x20e)](_0x45f08d);_0x2a5add?_0x14f0da[_0x583b68(0x209)](_0x15f851,_0x2a5add):(_0x124b21[_0x15f851]=_0x38589d,_0x14f0da[_0x583b68(0x209)](_0x15f851,_0x15f851),_0x2c7612[_0x583b68(0x209)](_0x45f08d,_0x15f851));}}return{'merged':_0x124b21,'nameMapping':_0x14f0da};}export function updateActivationReferences(_0x5795ac,_0x27d869){const _0x2a52af=a145_0x5b95;if(!_0x5795ac)return;for(const _0x5336f6 of _0x5795ac){if(!_0x5336f6[_0x2a52af(0x241)])continue;for(const _0x1b0ed7 of _0x5336f6[_0x2a52af(0x241)]){if(_0x1b0ed7[_0x2a52af(0x216)]==='activation'&&_0x1b0ed7[_0x2a52af(0x23d)]?.[_0x2a52af(0x1f5)]){const _0x28a9ac=_0x27d869[_0x2a52af(0x20e)](_0x1b0ed7['with']['activation']);_0x28a9ac&&_0x28a9ac!==_0x1b0ed7[_0x2a52af(0x23d)]['activation']&&(_0x1b0ed7[_0x2a52af(0x23d)]['activation']=_0x28a9ac);}}}}function a145_0x5b95(_0x589c72,_0x12af8e){_0x589c72=_0x589c72-0x1f1;const _0x1b57b2=a145_0x1b57();let _0x5b9571=_0x1b57b2[_0x589c72];return _0x5b9571;}export function consolidateSegmentsByContent(_0x15cd74,_0x5e067e){const _0x175f13=a145_0x5b95,_0x336f57={},_0x41e354=new Map(),_0xf9af51=new Map();for(const _0x6d76c7 of _0x15cd74){if(!_0x6d76c7)continue;for(const [_0x486e6e,_0x207cb3]of Object[_0x175f13(0x1f8)](_0x6d76c7)){if(!_0x207cb3[_0x175f13(0x1f9)]){_0x336f57[_0x486e6e]=_0x207cb3,_0x41e354[_0x175f13(0x209)](_0x486e6e,_0x486e6e);continue;}const _0x39c4f5=_0x207cb3[_0x175f13(0x1f4)]&&_0x207cb3[_0x175f13(0x1f4)][_0x175f13(0x232)]()?_0x207cb3[_0x175f13(0x1f4)]:undefined,_0x33180e=JSON[_0x175f13(0x244)]({'description':_0x39c4f5,'rule':deepSortObject(_0x207cb3[_0x175f13(0x1f9)])}),_0x57f31c=_0xf9af51[_0x175f13(0x20e)](_0x33180e);if(_0x57f31c){const _0x20fee0={..._0x207cb3['description']!==undefined&&{'description':_0x207cb3[_0x175f13(0x1f4)]},'rule':_0x207cb3[_0x175f13(0x1f9)]?deepSortObject(_0x207cb3[_0x175f13(0x1f9)]):_0x207cb3[_0x175f13(0x1f9)]};if(_0x486e6e<_0x57f31c){_0x336f57[_0x486e6e]=_0x20fee0,delete _0x336f57[_0x57f31c];for(const [_0x23e977,_0x471f33]of _0x41e354[_0x175f13(0x1f8)]()){_0x471f33===_0x57f31c&&_0x41e354[_0x175f13(0x209)](_0x23e977,_0x486e6e);}_0x41e354['set'](_0x486e6e,_0x486e6e),_0xf9af51[_0x175f13(0x209)](_0x33180e,_0x486e6e);}else _0x336f57[_0x57f31c]=_0x20fee0,_0x41e354['set'](_0x486e6e,_0x57f31c);}else{let _0x1c9918=_0x486e6e;if(_0x5e067e){const _0x33efd1=_0x5e067e[_0x175f13(0x20e)](_0x33180e);_0x33efd1&&_0x33efd1[_0x175f13(0x245)]>0x0&&(_0x1c9918=_0x33efd1[_0x175f13(0x217)]()[_0x175f13(0x233)]()[0x0]);}const _0x45e52f={..._0x207cb3[_0x175f13(0x1f4)]!==undefined&&{'description':_0x207cb3['description']},'rule':_0x207cb3[_0x175f13(0x1f9)]?deepSortObject(_0x207cb3[_0x175f13(0x1f9)]):_0x207cb3[_0x175f13(0x1f9)]};_0x336f57[_0x1c9918]=_0x45e52f,_0x41e354[_0x175f13(0x209)](_0x486e6e,_0x1c9918),_0xf9af51['set'](_0x33180e,_0x1c9918);}}}return{'merged':_0x336f57,'nameMapping':_0x41e354};}export function updateSegmentReferences(_0xfcff5b,_0x2221aa){const _0x4d12ed=a145_0x5b95;if(!_0xfcff5b)return;for(const _0x31b466 of _0xfcff5b){if(_0x31b466[_0x4d12ed(0x1fb)]?.[_0x4d12ed(0x231)]){const _0x544a0a=_0x2221aa[_0x4d12ed(0x20e)](_0x31b466[_0x4d12ed(0x1fb)]['segment']);_0x544a0a&&(_0x31b466[_0x4d12ed(0x1fb)][_0x4d12ed(0x231)]=_0x544a0a);}if(_0x31b466['exit_criteria'])for(const _0x1a692f of _0x31b466['exit_criteria']){if(_0x1a692f[_0x4d12ed(0x231)]){const _0x568fd7=_0x2221aa[_0x4d12ed(0x20e)](_0x1a692f['segment']);_0x568fd7&&(_0x1a692f[_0x4d12ed(0x231)]=_0x568fd7);}}if(_0x31b466['milestone']?.[_0x4d12ed(0x231)]){const _0x176977=_0x2221aa[_0x4d12ed(0x20e)](_0x31b466[_0x4d12ed(0x212)][_0x4d12ed(0x231)]);_0x176977&&(_0x31b466[_0x4d12ed(0x212)][_0x4d12ed(0x231)]=_0x176977);}if(_0x31b466[_0x4d12ed(0x241)])for(const _0x44c02b of _0x31b466['steps']){if(_0x44c02b[_0x4d12ed(0x216)]===_0x4d12ed(0x242)&&_0x44c02b[_0x4d12ed(0x23d)]?.[_0x4d12ed(0x21e)])for(const _0x6dc58a of _0x44c02b[_0x4d12ed(0x23d)][_0x4d12ed(0x21e)]){if(_0x6dc58a[_0x4d12ed(0x231)]){const _0x139037=_0x2221aa[_0x4d12ed(0x20e)](_0x6dc58a[_0x4d12ed(0x231)]);_0x139037&&(_0x6dc58a[_0x4d12ed(0x231)]=_0x139037);}}if(_0x44c02b[_0x4d12ed(0x216)]===_0x4d12ed(0x21f)&&_0x44c02b[_0x4d12ed(0x23d)]?.[_0x4d12ed(0x206)]?.['segment']){const _0x3fecd5=_0x2221aa[_0x4d12ed(0x20e)](_0x44c02b['with']['condition'][_0x4d12ed(0x231)]);_0x3fecd5&&(_0x44c02b[_0x4d12ed(0x23d)]['condition'][_0x4d12ed(0x231)]=_0x3fecd5);}}}}export function updateSegmentRefsInSegments(_0x530e6b,_0x4da3d2){const _0x42f1a1=a145_0x5b95;for(const _0x174637 of Object[_0x42f1a1(0x22b)](_0x530e6b)){_0x174637['rule']&&updateSegmentRefsInRule(_0x174637['rule'],_0x4da3d2);}}function updateSegmentRefsInRule(_0x16d6c6,_0x33d9b3){const _0x11dd2b=a145_0x5b95;if(_0x16d6c6===null||typeof _0x16d6c6!==_0x11dd2b(0x235))return;if(Array['isArray'](_0x16d6c6)){for(const _0x39f3cb of _0x16d6c6){updateSegmentRefsInRule(_0x39f3cb,_0x33d9b3);}return;}const _0x4f487c=_0x16d6c6;if((_0x4f487c[_0x11dd2b(0x216)]===_0x11dd2b(0x227)||_0x4f487c['type']===_0x11dd2b(0x1f3))&&typeof _0x4f487c['segment']===_0x11dd2b(0x224)){const _0x8d564d=_0x33d9b3[_0x11dd2b(0x20e)](_0x4f487c[_0x11dd2b(0x231)]);_0x8d564d&&(_0x4f487c[_0x11dd2b(0x231)]=_0x8d564d);}if(_0x4f487c[_0x11dd2b(0x200)]&&Array[_0x11dd2b(0x202)](_0x4f487c[_0x11dd2b(0x200)]))for(const _0x23eb74 of _0x4f487c['conditions']){updateSegmentRefsInRule(_0x23eb74,_0x33d9b3);}}export function buildJourneysArray(_0x48a0f8,_0x1fd1ad){return _0x48a0f8['map'](_0x20e46c=>{const _0x4d9d2e=a145_0x5b95,_0x4f1414=_0x1fd1ad?_0x20e46c[_0x4d9d2e(0x213)]['id']===_0x1fd1ad:_0x48a0f8['length']===0x1,_0x1895e6=_0x20e46c['yaml']['journeys']?.[0x0],_0x1cf94a=_0x1895e6?.[_0x4d9d2e(0x22a)]||_0x20e46c[_0x4d9d2e(0x21d)]['goal'],_0x59da0b={'version':_0x1895e6?.[_0x4d9d2e(0x204)]||_0x20e46c[_0x4d9d2e(0x21d)][_0x4d9d2e(0x204)]||_0x20e46c[_0x4d9d2e(0x213)]['name'],'state':_0x20e46c[_0x4d9d2e(0x213)][_0x4d9d2e(0x1f7)]===_0x4d9d2e(0x201)?_0x4d9d2e(0x201):'draft','stages':_0x1895e6?.[_0x4d9d2e(0x1ff)]||_0x20e46c[_0x4d9d2e(0x21d)][_0x4d9d2e(0x1ff)]||[],'id':_0x1895e6?.['id']||_0x20e46c[_0x4d9d2e(0x21d)]['id'],'version_number':_0x1895e6?.[_0x4d9d2e(0x223)]||_0x20e46c[_0x4d9d2e(0x21d)]['version_number']};return _0x1cf94a&&(_0x59da0b[_0x4d9d2e(0x22a)]=_0x1cf94a),_0x4f1414&&(_0x59da0b[_0x4d9d2e(0x20b)]=!![]),_0x59da0b;});}export function buildMergedJourneyDef(_0x4f683e,_0x8cbbdd,_0x5ccd7d){const _0x48651c=a145_0x5b95,_0xfe2dd4=_0x4f683e[0x0]['yaml'],_0x27887d=buildJourneysArray(_0x4f683e,_0x5ccd7d),{merged:_0xf2a2be,nameMapping:_0x144a82}=consolidateSegmentsByContent(_0x4f683e[_0x48651c(0x1fc)](_0x1d0f72=>_0x1d0f72[_0x48651c(0x21d)][_0x48651c(0x1f2)]),_0x8cbbdd);updateSegmentRefsInSegments(_0xf2a2be,_0x144a82);const _0x370ff7=Array[_0x48651c(0x240)](_0x144a82[_0x48651c(0x1f8)]())['some'](([_0x45226f,_0x307124])=>_0x45226f!==_0x307124&&_0x45226f[_0x48651c(0x23b)](_0x48651c(0x1fb)));let _0x3df099=_0xf2a2be,_0x41216e=new Map();if(_0x370ff7){const _0x3fb4aa=consolidateSegmentsByContent([_0xf2a2be],_0x8cbbdd);_0x3df099=_0x3fb4aa[_0x48651c(0x234)],_0x41216e=_0x3fb4aa[_0x48651c(0x23e)];}const _0x3f90da=new Map(_0x144a82);for(const [_0x5c552f,_0x291e8b]of _0x41216e[_0x48651c(0x1f8)]()){_0x3f90da[_0x48651c(0x209)](_0x5c552f,_0x291e8b);}for(const [_0x5c8b6e,_0x54766e]of _0x3f90da[_0x48651c(0x1f8)]()){let _0x132e11=_0x54766e,_0x529823=0x0;while(_0x3f90da[_0x48651c(0x1fa)](_0x132e11)&&_0x3f90da['get'](_0x132e11)!==_0x132e11&&_0x529823<MAX_MAPPING_CHAIN_DEPTH){_0x132e11=_0x3f90da[_0x48651c(0x20e)](_0x132e11),_0x529823++;}_0x132e11!==_0x54766e&&_0x3f90da[_0x48651c(0x209)](_0x5c8b6e,_0x132e11);}for(const _0x1073d4 of _0x27887d){updateSegmentReferences(_0x1073d4[_0x48651c(0x1ff)],_0x3f90da);}const {merged:_0x35b0c9,nameMapping:_0x275484}=consolidateActivationsByContent(_0x4f683e['map'](_0x3b37ec=>_0x3b37ec[_0x48651c(0x21d)][_0x48651c(0x246)]));for(const _0x22f8dc of _0x27887d){updateActivationReferences(_0x22f8dc[_0x48651c(0x1ff)],_0x275484);}let _0x39a858=_0xfe2dd4[_0x48651c(0x22a)];if(_0x39a858?.['segment']){const _0x4435bc=_0x3f90da[_0x48651c(0x20e)](_0x39a858[_0x48651c(0x231)]);_0x4435bc&&(_0x39a858={..._0x39a858,'segment':_0x4435bc});}for(const _0x148c49 of _0x27887d){if(_0x148c49['goal']?.[_0x48651c(0x231)]){const _0x4fd8c2=_0x3f90da[_0x48651c(0x20e)](_0x148c49['goal']['segment']);_0x4fd8c2&&(_0x148c49[_0x48651c(0x22a)]={..._0x148c49[_0x48651c(0x22a)],'segment':_0x4fd8c2});}}return _0x27887d[_0x48651c(0x228)](_0x2af8b0=>_0x2af8b0[_0x48651c(0x22a)])&&(_0x39a858=undefined),{'type':_0x48651c(0x23c),'name':_0xfe2dd4[_0x48651c(0x221)],'description':_0xfe2dd4[_0x48651c(0x1f4)],'goal':_0x39a858,'reentry':_0xfe2dd4['reentry'],'segments':Object[_0x48651c(0x215)](_0x3df099)[_0x48651c(0x245)]>0x0?_0x3df099:undefined,'activations':Object['keys'](_0x35b0c9)[_0x48651c(0x245)]>0x0?_0x35b0c9:undefined,'journeys':_0x27887d,'bundle_id':_0xfe2dd4[_0x48651c(0x205)],'bundle_name':_0xfe2dd4[_0x48651c(0x239)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x45a6cf,_0x21f85e,_0x2a8071,_0x339be6){const _0x4748ec=a145_0x5b95,_0x598241=_0x45a6cf+':'+_0x21f85e,_0x30ce3b=_0x2a8071[_0x4748ec(0x20e)](_0x598241);if(_0x30ce3b)return _0x30ce3b;const _0x54d4f8=await _0x339be6(_0x45a6cf),_0x2a8f03=_0x54d4f8[_0x4748ec(0x226)][_0x4748ec(0x211)]||_0x54d4f8[_0x4748ec(0x226)][_0x4748ec(0x221)],_0x549080=_0x54d4f8[_0x4748ec(0x226)][_0x4748ec(0x1f1)][_0x4748ec(0x247)](_0x11194a=>String(_0x11194a['id'])===String(_0x21f85e)),_0x3ccf8d=_0x549080?.[_0x4748ec(0x221)]||_0x21f85e,_0x3470a7={'journeyName':_0x2a8f03,'stageName':_0x3ccf8d};return _0x2a8071[_0x4748ec(0x209)](_0x598241,_0x3470a7),_0x3470a7;}function a145_0x1b57(){const _0x3a6ab7=['stringify','length','activations','find','journeyStages','segments','exclude','description','activation','toLowerCase','state','entries','rule','has','entry_criteria','map','189423uLGtba','910otPald','stages','conditions','launched','isArray','all_columns','version','bundle_id','condition','48220rYOkoG','journeys','set','index','latest','push','schedule','get','7PMzeiv','connector_config','journeyBundleName','milestone','item','versions','keys','type','slice','behavior','endsWith','557000ZhCRcY','1377684EhCWog','activation_template_id','yaml','branches','wait','connection','name','933HyURgW','version_number','string','notification','attributes','include','some','columns','goal','values','match','464348qpFSxG','exit_criteria','null','join','segment','trim','sort','merged','object','78JdIVhm','10NrskFr','replace','bundle_name','.yaml','startsWith','journey','with','nameMapping','50358mIwSeB','from','steps','decision_point','.yml'];a145_0x1b57=function(){return _0x3a6ab7;};return a145_0x1b57();}export function formatApiJourneyName(_0x238e37,_0xdf0f76){return _0xdf0f76+'\x20('+_0x238e37+')';}export function isLocalJourneyRef(_0x14dec2){const _0x1f7411=a145_0x5b95;return _0x14dec2[_0x1f7411(0x219)](_0x1f7411(0x243))||_0x14dec2['endsWith'](_0x1f7411(0x23a));}export function buildLocalRuleToNameMapping(_0x5584f7){const _0x6664a8=a145_0x5b95,_0x51254c=new Map();if(!_0x5584f7)return _0x51254c;for(const [_0xd25e0a,_0x2a26ac]of Object[_0x6664a8(0x1f8)](_0x5584f7)){if(_0x2a26ac[_0x6664a8(0x1f9)]){const _0x27c562=serializeRule(_0x2a26ac['rule']),_0x3e4dd5=_0x51254c[_0x6664a8(0x20e)](_0x27c562)||[];_0x3e4dd5['push'](_0xd25e0a),_0x51254c[_0x6664a8(0x209)](_0x27c562,_0x3e4dd5);}}return _0x51254c;}export function buildLocalRuleToNameMappingFromJourney(_0x280183){const _0x5c63be=a145_0x5b95,_0x1cff73=_0x280183[_0x5c63be(0x1f2)];if(!_0x1cff73)return new Map();const _0x56a732=collectSegmentUsageCounts(_0x280183),_0x34ec86=new Map();let _0x1329a8=0x0;for(const [_0x2cac88,_0x320e13]of Object[_0x5c63be(0x1f8)](_0x1cff73)){if(!_0x320e13[_0x5c63be(0x1f9)]){_0x1329a8++;continue;}const _0x25b66c=serializeRule(_0x320e13['rule']),_0x27e9c0=_0x34ec86[_0x5c63be(0x20e)](_0x25b66c)||[];_0x27e9c0[_0x5c63be(0x20c)]({'name':_0x2cac88,'index':_0x1329a8}),_0x34ec86[_0x5c63be(0x209)](_0x25b66c,_0x27e9c0),_0x1329a8++;}const _0x26d524=new Map();for(const [_0x33e0df,_0x21d2e8]of _0x34ec86){const _0x3bac25=_0x21d2e8[_0x5c63be(0x217)]()[_0x5c63be(0x233)]((_0x1be86b,_0x3b454a)=>{const _0x51bb11=_0x5c63be,_0x47f401=_0x56a732[_0x51bb11(0x20e)](_0x1be86b[_0x51bb11(0x221)])||0x0,_0x2e380a=_0x56a732[_0x51bb11(0x20e)](_0x3b454a[_0x51bb11(0x221)])||0x0;if(_0x47f401!==_0x2e380a)return _0x2e380a-_0x47f401;return _0x1be86b[_0x51bb11(0x20a)]-_0x3b454a['index'];})['map'](_0x3145a0=>_0x3145a0['name']);_0x26d524[_0x5c63be(0x209)](_0x33e0df,_0x3bac25);}return _0x26d524;}export function collectSegmentUsageCounts(_0x23d81e){const _0x96a2ce=a145_0x5b95,_0x4fcb39=new Map(),_0x332ba1=_0x22aeb2=>{const _0x441940=a145_0x5b95;if(!_0x22aeb2)return;_0x4fcb39[_0x441940(0x209)](_0x22aeb2,(_0x4fcb39['get'](_0x22aeb2)||0x0)+0x1);},_0x3523b9=_0x57345d=>{const _0x582850=a145_0x5b95;for(const _0x11990b of _0x57345d){_0x332ba1(_0x11990b[_0x582850(0x1fb)]?.[_0x582850(0x231)]);if(_0x11990b[_0x582850(0x22e)])for(const _0xc43c80 of _0x11990b[_0x582850(0x22e)]){_0x332ba1(_0xc43c80['segment']);}_0x332ba1(_0x11990b[_0x582850(0x212)]?.[_0x582850(0x231)]);if(_0x11990b['steps'])for(const _0x45fbb1 of _0x11990b[_0x582850(0x241)]){if(_0x45fbb1[_0x582850(0x216)]==='decision_point')for(const _0x35696a of _0x45fbb1[_0x582850(0x23d)][_0x582850(0x21e)]){_0x332ba1(_0x35696a[_0x582850(0x231)]);}else _0x45fbb1['type']===_0x582850(0x21f)&&_0x332ba1(_0x45fbb1[_0x582850(0x23d)]['condition']?.['segment']);}}};_0x332ba1(_0x23d81e['goal']?.[_0x96a2ce(0x231)]);if(_0x23d81e[_0x96a2ce(0x208)])for(const _0x43c8f2 of _0x23d81e[_0x96a2ce(0x208)]){_0x332ba1(_0x43c8f2[_0x96a2ce(0x22a)]?.[_0x96a2ce(0x231)]),_0x3523b9(_0x43c8f2[_0x96a2ce(0x1ff)]);}_0x23d81e[_0x96a2ce(0x1ff)]&&_0x3523b9(_0x23d81e['stages']);if(_0x23d81e['versions'])for(const _0x2b28b1 of _0x23d81e[_0x96a2ce(0x214)]){_0x3523b9(_0x2b28b1[_0x96a2ce(0x1ff)]);}return _0x4fcb39;}
|
|
1
|
+
(function(_0x4f657a,_0x223d51){const _0x4bb4b2=a145_0x40fa,_0x154c08=_0x4f657a();while(!![]){try{const _0x135175=-parseInt(_0x4bb4b2(0x81))/0x1*(-parseInt(_0x4bb4b2(0x8c))/0x2)+parseInt(_0x4bb4b2(0x97))/0x3*(-parseInt(_0x4bb4b2(0x90))/0x4)+-parseInt(_0x4bb4b2(0xab))/0x5*(parseInt(_0x4bb4b2(0x88))/0x6)+-parseInt(_0x4bb4b2(0xc2))/0x7*(parseInt(_0x4bb4b2(0xc3))/0x8)+parseInt(_0x4bb4b2(0x9f))/0x9+parseInt(_0x4bb4b2(0xb5))/0xa+-parseInt(_0x4bb4b2(0xb2))/0xb*(-parseInt(_0x4bb4b2(0x85))/0xc);if(_0x135175===_0x223d51)break;else _0x154c08['push'](_0x154c08['shift']());}catch(_0x30444c){_0x154c08['push'](_0x154c08['shift']());}}}(a145_0x2a51,0x82c52));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x10a071){const _0x5d42be=a145_0x40fa;return _0x10a071[_0x5d42be(0xc8)]()[_0x5d42be(0xac)](/\s+/g,'_')[_0x5d42be(0xac)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x5d42be(0xac)](/_+/g,'_')[_0x5d42be(0xac)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x8c03dc){const _0x54cb34=a145_0x40fa,_0x25a9ab=_0x8c03dc[_0x54cb34(0xa1)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x25a9ab){const _0x8b871c=_0x25a9ab[0x1][_0x54cb34(0xc8)](),_0x4aea92=_0x25a9ab[0x2],_0x4a9389=_0x4aea92['replace'](/-/g,'')[_0x54cb34(0xc5)](0x0,0x4)[_0x54cb34(0xc8)]();return _0x8b871c+'_'+_0x4a9389;}const _0x22a4e6=_0x8c03dc[_0x54cb34(0xa1)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x22a4e6){const _0x2629b3=_0x22a4e6[0x1],_0x4a5a39=_0x22a4e6[0x2][_0x54cb34(0xc8)](),_0x97cb5d=_0x2629b3['replace'](/-/g,'')['slice'](0x0,0x4)[_0x54cb34(0xc8)]();return _0x4a5a39+'_'+_0x97cb5d;}return undefined;}function stableStringify(_0x533307){const _0x11db55=a145_0x40fa;if(Array[_0x11db55(0x98)](_0x533307))return'['+_0x533307[_0x11db55(0xc9)](_0x10b8ba=>stableStringify(_0x10b8ba))[_0x11db55(0x9d)](',')+']';if(_0x533307&&typeof _0x533307===_0x11db55(0x9b)){const _0x25c940=_0x533307,_0x2c8981=Object[_0x11db55(0xa3)](_0x25c940)['sort'](),_0x18ecfc=_0x2c8981[_0x11db55(0xc9)](_0x1fa141=>'\x22'+_0x1fa141+'\x22:'+stableStringify(_0x25c940[_0x1fa141]));return'{'+_0x18ecfc[_0x11db55(0x9d)](',')+'}';}const _0x46b957=JSON['stringify'](_0x533307);return _0x46b957===undefined?'null':_0x46b957;}export function consolidateActivationsByContent(_0x18fef6){const _0x352d36=a145_0x40fa,_0x699a1={},_0x5e9c4b=new Map(),_0x21f2a5=new Map();for(const _0x2affa1 of _0x18fef6){if(!_0x2affa1)continue;for(const [_0x4fc87f,_0x1cc37d]of Object[_0x352d36(0xcd)](_0x2affa1)){const _0x4356c1={'name':_0x1cc37d['name'],'connection':_0x1cc37d['connection'],..._0x1cc37d[_0x352d36(0x91)]!==undefined&&{'all_columns':_0x1cc37d[_0x352d36(0x91)]},..._0x1cc37d[_0x352d36(0xbe)]!==undefined&&{'columns':_0x1cc37d[_0x352d36(0xbe)]},..._0x1cc37d[_0x352d36(0xaf)]!==undefined&&{'behavior':_0x1cc37d['behavior']},..._0x1cc37d['schedule']!==undefined&&{'schedule':_0x1cc37d['schedule']},..._0x1cc37d['notification']!==undefined&&{'notification':_0x1cc37d[_0x352d36(0xb1)]},..._0x1cc37d[_0x352d36(0x8f)]!==undefined&&{'connector_config':_0x1cc37d[_0x352d36(0x8f)]},..._0x1cc37d[_0x352d36(0xbc)]!==undefined&&{'activation_template_id':_0x1cc37d['activation_template_id']}},_0x46f2ee=stableStringify(_0x4356c1),_0x596f06=_0x21f2a5[_0x352d36(0x89)](_0x46f2ee);_0x596f06?_0x5e9c4b[_0x352d36(0xaa)](_0x4fc87f,_0x596f06):(_0x699a1[_0x4fc87f]=_0x1cc37d,_0x5e9c4b[_0x352d36(0xaa)](_0x4fc87f,_0x4fc87f),_0x21f2a5['set'](_0x46f2ee,_0x4fc87f));}}return{'merged':_0x699a1,'nameMapping':_0x5e9c4b};}export function updateActivationReferences(_0x2fc174,_0x10fd25){const _0x3df58e=a145_0x40fa;if(!_0x2fc174)return;for(const _0x1ac941 of _0x2fc174){if(!_0x1ac941[_0x3df58e(0xae)])continue;for(const _0x1035b3 of _0x1ac941[_0x3df58e(0xae)]){if(_0x1035b3['type']===_0x3df58e(0xa9)&&_0x1035b3[_0x3df58e(0x93)]?.[_0x3df58e(0xa9)]){const _0x2ec921=_0x10fd25[_0x3df58e(0x89)](_0x1035b3['with']['activation']);_0x2ec921&&_0x2ec921!==_0x1035b3[_0x3df58e(0x93)][_0x3df58e(0xa9)]&&(_0x1035b3[_0x3df58e(0x93)][_0x3df58e(0xa9)]=_0x2ec921);}}}}export function consolidateSegmentsByContent(_0x34ef2e,_0x4415a8){const _0x309d20=a145_0x40fa,_0x3038f6={},_0x12030c=new Map(),_0x1ecb6b=new Map();for(const _0x21c571 of _0x34ef2e){if(!_0x21c571)continue;for(const [_0x2d6e12,_0x1fefcd]of Object[_0x309d20(0xcd)](_0x21c571)){if(!_0x1fefcd[_0x309d20(0xb9)]){_0x3038f6[_0x2d6e12]=_0x1fefcd,_0x12030c[_0x309d20(0xaa)](_0x2d6e12,_0x2d6e12);continue;}const _0x535446=_0x1fefcd[_0x309d20(0x99)]&&_0x1fefcd['description'][_0x309d20(0xa5)]()?_0x1fefcd['description']:undefined,_0x2a5ab7=JSON[_0x309d20(0xb6)]({'description':_0x535446,'rule':deepSortObject(_0x1fefcd[_0x309d20(0xb9)])}),_0x502a8e=_0x1ecb6b['get'](_0x2a5ab7);if(_0x502a8e){const _0x3db812={..._0x1fefcd[_0x309d20(0x99)]!==undefined&&{'description':_0x1fefcd[_0x309d20(0x99)]},'rule':_0x1fefcd[_0x309d20(0xb9)]?deepSortObject(_0x1fefcd[_0x309d20(0xb9)]):_0x1fefcd[_0x309d20(0xb9)]};if(_0x2d6e12<_0x502a8e){_0x3038f6[_0x2d6e12]=_0x3db812,delete _0x3038f6[_0x502a8e];for(const [_0x5516c1,_0x1b391a]of _0x12030c['entries']()){_0x1b391a===_0x502a8e&&_0x12030c[_0x309d20(0xaa)](_0x5516c1,_0x2d6e12);}_0x12030c[_0x309d20(0xaa)](_0x2d6e12,_0x2d6e12),_0x1ecb6b[_0x309d20(0xaa)](_0x2a5ab7,_0x2d6e12);}else _0x3038f6[_0x502a8e]=_0x3db812,_0x12030c[_0x309d20(0xaa)](_0x2d6e12,_0x502a8e);}else{let _0x2ee70e=_0x2d6e12;if(_0x4415a8){const _0xe5151b=_0x4415a8[_0x309d20(0x89)](_0x2a5ab7);_0xe5151b&&_0xe5151b[_0x309d20(0x86)]>0x0&&(_0x2ee70e=_0xe5151b[_0x309d20(0xc5)]()['sort']()[0x0]);}const _0x174648={..._0x1fefcd[_0x309d20(0x99)]!==undefined&&{'description':_0x1fefcd[_0x309d20(0x99)]},'rule':_0x1fefcd[_0x309d20(0xb9)]?deepSortObject(_0x1fefcd[_0x309d20(0xb9)]):_0x1fefcd[_0x309d20(0xb9)]};_0x3038f6[_0x2ee70e]=_0x174648,_0x12030c[_0x309d20(0xaa)](_0x2d6e12,_0x2ee70e),_0x1ecb6b[_0x309d20(0xaa)](_0x2a5ab7,_0x2ee70e);}}}return{'merged':_0x3038f6,'nameMapping':_0x12030c};}function a145_0x40fa(_0x3c8d82,_0x4f1dd2){_0x3c8d82=_0x3c8d82-0x81;const _0x2a5124=a145_0x2a51();let _0x40faee=_0x2a5124[_0x3c8d82];return _0x40faee;}export function updateSegmentReferences(_0x266aa5,_0x371e0e){const _0x35e484=a145_0x40fa;if(!_0x266aa5)return;for(const _0x3a80d3 of _0x266aa5){if(_0x3a80d3['entry_criteria']?.[_0x35e484(0x8a)]){const _0x2321fa=_0x371e0e[_0x35e484(0x89)](_0x3a80d3[_0x35e484(0xbf)]['segment']);_0x2321fa&&(_0x3a80d3[_0x35e484(0xbf)][_0x35e484(0x8a)]=_0x2321fa);}if(_0x3a80d3[_0x35e484(0xcc)])for(const _0x56f1de of _0x3a80d3[_0x35e484(0xcc)]){if(_0x56f1de[_0x35e484(0x8a)]){const _0x3718d7=_0x371e0e[_0x35e484(0x89)](_0x56f1de['segment']);_0x3718d7&&(_0x56f1de[_0x35e484(0x8a)]=_0x3718d7);}}if(_0x3a80d3['milestone']?.[_0x35e484(0x8a)]){const _0x32e890=_0x371e0e[_0x35e484(0x89)](_0x3a80d3[_0x35e484(0xb0)][_0x35e484(0x8a)]);_0x32e890&&(_0x3a80d3[_0x35e484(0xb0)]['segment']=_0x32e890);}if(_0x3a80d3[_0x35e484(0xae)])for(const _0x380532 of _0x3a80d3['steps']){if(_0x380532[_0x35e484(0xbb)]==='decision_point'&&_0x380532['with']?.[_0x35e484(0xce)])for(const _0x2d00e8 of _0x380532[_0x35e484(0x93)]['branches']){if(_0x2d00e8[_0x35e484(0x8a)]){const _0x124dcc=_0x371e0e['get'](_0x2d00e8['segment']);_0x124dcc&&(_0x2d00e8[_0x35e484(0x8a)]=_0x124dcc);}}if(_0x380532[_0x35e484(0xbb)]===_0x35e484(0xc7)&&_0x380532[_0x35e484(0x93)]?.['condition']?.[_0x35e484(0x8a)]){const _0x4448d0=_0x371e0e[_0x35e484(0x89)](_0x380532[_0x35e484(0x93)][_0x35e484(0xb4)][_0x35e484(0x8a)]);_0x4448d0&&(_0x380532[_0x35e484(0x93)]['condition'][_0x35e484(0x8a)]=_0x4448d0);}}}}export function updateSegmentRefsInSegments(_0xe15bcb,_0x5a4034){const _0x1cbb29=a145_0x40fa;for(const _0x15a2fa of Object['values'](_0xe15bcb)){_0x15a2fa['rule']&&updateSegmentRefsInRule(_0x15a2fa[_0x1cbb29(0xb9)],_0x5a4034);}}function updateSegmentRefsInRule(_0x2a9ca9,_0x38e6fd){const _0xe21108=a145_0x40fa;if(_0x2a9ca9===null||typeof _0x2a9ca9!==_0xe21108(0x9b))return;if(Array[_0xe21108(0x98)](_0x2a9ca9)){for(const _0x2bd788 of _0x2a9ca9){updateSegmentRefsInRule(_0x2bd788,_0x38e6fd);}return;}const _0x5a4268=_0x2a9ca9;if((_0x5a4268[_0xe21108(0xbb)]===_0xe21108(0x95)||_0x5a4268['type']==='exclude')&&typeof _0x5a4268[_0xe21108(0x8a)]===_0xe21108(0xa6)){const _0x502528=_0x38e6fd['get'](_0x5a4268['segment']);_0x502528&&(_0x5a4268['segment']=_0x502528);}if(_0x5a4268['conditions']&&Array['isArray'](_0x5a4268['conditions']))for(const _0x3e05f3 of _0x5a4268[_0xe21108(0xa0)]){updateSegmentRefsInRule(_0x3e05f3,_0x38e6fd);}}export function buildJourneysArray(_0x289478,_0x1cb505){const _0x2ff9d1=a145_0x40fa;return _0x289478[_0x2ff9d1(0xc9)](_0x1590a3=>{const _0x4319a9=_0x2ff9d1,_0x163344=_0x1cb505?_0x1590a3[_0x4319a9(0xba)]['id']===_0x1cb505:_0x289478[_0x4319a9(0x86)]===0x1,_0x4e01a2=_0x1590a3[_0x4319a9(0xc1)][_0x4319a9(0x87)]?.[0x0],_0x44461e=_0x4e01a2?.[_0x4319a9(0x92)]||_0x1590a3[_0x4319a9(0xc1)][_0x4319a9(0x92)],_0x54a2bd={'version':_0x4e01a2?.['version']||_0x1590a3[_0x4319a9(0xc1)][_0x4319a9(0x94)]||_0x1590a3[_0x4319a9(0xba)][_0x4319a9(0x82)],'state':_0x1590a3['item']['state']===_0x4319a9(0xa7)?'launched':'draft','stages':_0x4e01a2?.[_0x4319a9(0xb7)]||_0x1590a3[_0x4319a9(0xc1)][_0x4319a9(0xb7)]||[],'id':_0x4e01a2?.['id']||_0x1590a3[_0x4319a9(0xc1)]['id'],'version_number':_0x4e01a2?.[_0x4319a9(0xa4)]||_0x1590a3[_0x4319a9(0xc1)][_0x4319a9(0xa4)]};return _0x44461e&&(_0x54a2bd[_0x4319a9(0x92)]=_0x44461e),_0x163344&&(_0x54a2bd[_0x4319a9(0x84)]=!![]),_0x54a2bd;});}export function buildMergedJourneyDef(_0x29ca01,_0x1190ca,_0x5a43ec){const _0x54a196=a145_0x40fa,_0x33f466=_0x29ca01[0x0][_0x54a196(0xc1)],_0x40bbe3=buildJourneysArray(_0x29ca01,_0x5a43ec),{merged:_0x57213a,nameMapping:_0x222bd2}=consolidateSegmentsByContent(_0x29ca01[_0x54a196(0xc9)](_0x23b59b=>_0x23b59b[_0x54a196(0xc1)]['segments']),_0x1190ca);updateSegmentRefsInSegments(_0x57213a,_0x222bd2);const _0x15417d=Array[_0x54a196(0xa2)](_0x222bd2[_0x54a196(0xcd)]())[_0x54a196(0xb3)](([_0x21a152,_0x5a0242])=>_0x21a152!==_0x5a0242&&_0x21a152['startsWith'](_0x54a196(0xbf)));let _0xcb9c1d=_0x57213a,_0x2b772b=new Map();if(_0x15417d){const _0x485b24=consolidateSegmentsByContent([_0x57213a],_0x1190ca);_0xcb9c1d=_0x485b24['merged'],_0x2b772b=_0x485b24[_0x54a196(0x8b)];}const _0x5f501e=new Map(_0x222bd2);for(const [_0x4a19ad,_0x3ea8a0]of _0x2b772b['entries']()){_0x5f501e[_0x54a196(0xaa)](_0x4a19ad,_0x3ea8a0);}for(const [_0x512d14,_0x23ee7a]of _0x5f501e['entries']()){let _0x5c8592=_0x23ee7a,_0x42182c=0x0;while(_0x5f501e[_0x54a196(0xb8)](_0x5c8592)&&_0x5f501e[_0x54a196(0x89)](_0x5c8592)!==_0x5c8592&&_0x42182c<MAX_MAPPING_CHAIN_DEPTH){_0x5c8592=_0x5f501e[_0x54a196(0x89)](_0x5c8592),_0x42182c++;}_0x5c8592!==_0x23ee7a&&_0x5f501e[_0x54a196(0xaa)](_0x512d14,_0x5c8592);}for(const _0x363110 of _0x40bbe3){updateSegmentReferences(_0x363110[_0x54a196(0xb7)],_0x5f501e);}const {merged:_0x2fd3f2,nameMapping:_0x139aba}=consolidateActivationsByContent(_0x29ca01[_0x54a196(0xc9)](_0x45b882=>_0x45b882[_0x54a196(0xc1)][_0x54a196(0xc4)]));for(const _0x5764f2 of _0x40bbe3){updateActivationReferences(_0x5764f2[_0x54a196(0xb7)],_0x139aba);}let _0x3e4781=_0x33f466[_0x54a196(0x92)];if(_0x3e4781?.[_0x54a196(0x8a)]){const _0x26e559=_0x5f501e['get'](_0x3e4781[_0x54a196(0x8a)]);_0x26e559&&(_0x3e4781={..._0x3e4781,'segment':_0x26e559});}for(const _0x85cf8c of _0x40bbe3){if(_0x85cf8c['goal']?.[_0x54a196(0x8a)]){const _0x485c2a=_0x5f501e[_0x54a196(0x89)](_0x85cf8c[_0x54a196(0x92)]['segment']);_0x485c2a&&(_0x85cf8c['goal']={..._0x85cf8c[_0x54a196(0x92)],'segment':_0x485c2a});}}return _0x40bbe3['some'](_0x4088e2=>_0x4088e2[_0x54a196(0x92)])&&(_0x3e4781=undefined),{'type':_0x54a196(0x8e),'name':_0x33f466[_0x54a196(0x82)],'description':_0x33f466[_0x54a196(0x99)],'goal':_0x3e4781,'reentry':_0x33f466['reentry'],'segments':Object[_0x54a196(0xa3)](_0xcb9c1d)[_0x54a196(0x86)]>0x0?_0xcb9c1d:undefined,'activations':Object[_0x54a196(0xa3)](_0x2fd3f2)[_0x54a196(0x86)]>0x0?_0x2fd3f2:undefined,'journeys':_0x40bbe3,'bundle_id':_0x33f466[_0x54a196(0xa8)],'bundle_name':_0x33f466[_0x54a196(0x9e)]};}function a145_0x2a51(){const _0x577a8c=['trim','string','launched','bundle_id','activation','set','10HsolnX','replace','attributes','steps','behavior','milestone','notification','33cTbDXr','some','condition','5182460IuYXmb','stringify','stages','has','rule','item','type','activation_template_id','versions','columns','entry_criteria','find','yaml','420fhySLL','130336jnkkPz','activations','slice','.yaml','wait','toLowerCase','map','push','.yml','exit_criteria','entries','branches','10roOpFU','name','journeyStages','latest','4583700tokDue','length','journeys','799284PsAwqM','get','segment','nameMapping','79526oFMofg','index','journey','connector_config','3725428gUegBB','all_columns','goal','with','version','include','endsWith','3FMGbDR','isArray','description','sort','object','journeyBundleName','join','bundle_name','5842242mvivll','conditions','match','from','keys','version_number'];a145_0x2a51=function(){return _0x577a8c;};return a145_0x2a51();}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x195368,_0x1d5bf6,_0x3d2dcc,_0x133765){const _0x20bfb8=a145_0x40fa,_0x2a4b87=_0x195368+':'+_0x1d5bf6,_0x31bce0=_0x3d2dcc['get'](_0x2a4b87);if(_0x31bce0)return _0x31bce0;const _0x4c2b84=await _0x133765(_0x195368),_0x3b63c4=_0x4c2b84[_0x20bfb8(0xad)][_0x20bfb8(0x9c)]||_0x4c2b84[_0x20bfb8(0xad)]['name'],_0x240f95=_0x4c2b84[_0x20bfb8(0xad)][_0x20bfb8(0x83)][_0x20bfb8(0xc0)](_0x47e8e0=>String(_0x47e8e0['id'])===String(_0x1d5bf6)),_0x18800e=_0x240f95?.['name']||_0x1d5bf6,_0x40eca7={'journeyName':_0x3b63c4,'stageName':_0x18800e};return _0x3d2dcc[_0x20bfb8(0xaa)](_0x2a4b87,_0x40eca7),_0x40eca7;}export function formatApiJourneyName(_0x4f61cd,_0x486de0){return _0x486de0+'\x20('+_0x4f61cd+')';}export function isLocalJourneyRef(_0x4f66c2){const _0x3f2a1f=a145_0x40fa;return _0x4f66c2[_0x3f2a1f(0x96)](_0x3f2a1f(0xcb))||_0x4f66c2['endsWith'](_0x3f2a1f(0xc6));}export function buildLocalRuleToNameMapping(_0x297c94){const _0x246697=a145_0x40fa,_0x34b876=new Map();if(!_0x297c94)return _0x34b876;for(const [_0x11e2bb,_0xe5c8de]of Object[_0x246697(0xcd)](_0x297c94)){if(_0xe5c8de[_0x246697(0xb9)]){const _0x470ab8=serializeRule(_0xe5c8de[_0x246697(0xb9)]),_0x3f5e26=_0x34b876[_0x246697(0x89)](_0x470ab8)||[];_0x3f5e26[_0x246697(0xca)](_0x11e2bb),_0x34b876[_0x246697(0xaa)](_0x470ab8,_0x3f5e26);}}return _0x34b876;}export function buildLocalRuleToNameMappingFromJourney(_0x9db6b5){const _0x4e99a3=a145_0x40fa,_0x452386=_0x9db6b5['segments'];if(!_0x452386)return new Map();const _0x58e49a=collectSegmentUsageCounts(_0x9db6b5),_0x304e0c=new Map();let _0x3b2fa4=0x0;for(const [_0x28e58c,_0x3cbe41]of Object[_0x4e99a3(0xcd)](_0x452386)){if(!_0x3cbe41[_0x4e99a3(0xb9)]){_0x3b2fa4++;continue;}const _0x5321fe=serializeRule(_0x3cbe41[_0x4e99a3(0xb9)]),_0x33da26=_0x304e0c[_0x4e99a3(0x89)](_0x5321fe)||[];_0x33da26[_0x4e99a3(0xca)]({'name':_0x28e58c,'index':_0x3b2fa4}),_0x304e0c[_0x4e99a3(0xaa)](_0x5321fe,_0x33da26),_0x3b2fa4++;}const _0x497a12=new Map();for(const [_0x3691ea,_0x3b85ac]of _0x304e0c){const _0x3d2631=_0x3b85ac[_0x4e99a3(0xc5)]()[_0x4e99a3(0x9a)]((_0x4ecc2b,_0x2bc0f5)=>{const _0x56447b=_0x4e99a3,_0x3bdeee=_0x58e49a[_0x56447b(0x89)](_0x4ecc2b[_0x56447b(0x82)])||0x0,_0xe401d5=_0x58e49a[_0x56447b(0x89)](_0x2bc0f5[_0x56447b(0x82)])||0x0;if(_0x3bdeee!==_0xe401d5)return _0xe401d5-_0x3bdeee;return _0x4ecc2b[_0x56447b(0x8d)]-_0x2bc0f5['index'];})[_0x4e99a3(0xc9)](_0x9b534b=>_0x9b534b[_0x4e99a3(0x82)]);_0x497a12[_0x4e99a3(0xaa)](_0x3691ea,_0x3d2631);}return _0x497a12;}export function collectSegmentUsageCounts(_0x8533eb){const _0xa22711=a145_0x40fa,_0xead7e0=new Map(),_0x34b9c2=_0x3ee9c0=>{if(!_0x3ee9c0)return;_0xead7e0['set'](_0x3ee9c0,(_0xead7e0['get'](_0x3ee9c0)||0x0)+0x1);},_0x4abb10=_0x395a12=>{const _0x4e10f9=a145_0x40fa;for(const _0x1674f2 of _0x395a12){_0x34b9c2(_0x1674f2['entry_criteria']?.['segment']);if(_0x1674f2[_0x4e10f9(0xcc)])for(const _0x8c1f6e of _0x1674f2[_0x4e10f9(0xcc)]){_0x34b9c2(_0x8c1f6e['segment']);}_0x34b9c2(_0x1674f2[_0x4e10f9(0xb0)]?.['segment']);if(_0x1674f2[_0x4e10f9(0xae)])for(const _0x3ff02 of _0x1674f2[_0x4e10f9(0xae)]){if(_0x3ff02['type']==='decision_point')for(const _0xda17b2 of _0x3ff02[_0x4e10f9(0x93)]['branches']){_0x34b9c2(_0xda17b2[_0x4e10f9(0x8a)]);}else _0x3ff02[_0x4e10f9(0xbb)]==='wait'&&_0x34b9c2(_0x3ff02['with'][_0x4e10f9(0xb4)]?.[_0x4e10f9(0x8a)]);}}};_0x34b9c2(_0x8533eb['goal']?.['segment']);if(_0x8533eb[_0xa22711(0x87)])for(const _0x306b4b of _0x8533eb[_0xa22711(0x87)]){_0x34b9c2(_0x306b4b[_0xa22711(0x92)]?.[_0xa22711(0x8a)]),_0x4abb10(_0x306b4b[_0xa22711(0xb7)]);}_0x8533eb['stages']&&_0x4abb10(_0x8533eb[_0xa22711(0xb7)]);if(_0x8533eb[_0xa22711(0xbd)])for(const _0x526a69 of _0x8533eb[_0xa22711(0xbd)]){_0x4abb10(_0x526a69[_0xa22711(0xb7)]);}return _0xead7e0;}
|