@treasuredata/tdx 2026.4.9 → 2026.4.10
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.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +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.d.ts +52 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +14 -0
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.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 +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x10f6bb,_0x3cd7f1){const _0x55ca35=a146_0x4332,_0xf1bdbd=_0x10f6bb();while(!![]){try{const _0x1fa55c=parseInt(_0x55ca35(0x20c))/0x1+parseInt(_0x55ca35(0x25a))/0x2+parseInt(_0x55ca35(0x27c))/0x3+-parseInt(_0x55ca35(0x21a))/0x4*(parseInt(_0x55ca35(0x1ec))/0x5)+-parseInt(_0x55ca35(0x259))/0x6*(-parseInt(_0x55ca35(0x26e))/0x7)+-parseInt(_0x55ca35(0x1e9))/0x8+-parseInt(_0x55ca35(0x217))/0x9;if(_0x1fa55c===_0x3cd7f1)break;else _0xf1bdbd['push'](_0xf1bdbd['shift']());}catch(_0x53425f){_0xf1bdbd['push'](_0xf1bdbd['shift']());}}}(a146_0x3b2b,0x7feb3));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';function a146_0x4332(_0x4e242a,_0x164e9f){_0x4e242a=_0x4e242a-0x1de;const _0x3b2b82=a146_0x3b2b();let _0x4332a0=_0x3b2b82[_0x4e242a];return _0x4332a0;}const MAX_STAGES=0x8;function createIssue(_0x4d1c1e,_0x334107,_0x29f041,_0x33a144,_0x4550a0,_0x50aaae){const _0x4b7ad2=a146_0x4332;return{'level':_0x4d1c1e,'path':_0x334107,'code':_0x29f041,'message':_0x33a144,'location':getLocationFromPath(_0x4550a0[_0x4b7ad2(0x21c)],_0x4550a0[_0x4b7ad2(0x28b)],pathToArray(_0x50aaae??_0x334107))};}function validateVersionStructure(_0x164e71,_0x2cf605){const _0x43cab8=a146_0x4332,_0x2f23d2=[];return _0x164e71[_0x43cab8(0x206)]>MAX_STAGES&&_0x2f23d2[_0x43cab8(0x1ea)](createIssue(_0x43cab8(0x27a),_0x43cab8(0x224),_0x43cab8(0x272),_0x43cab8(0x243)+_0x164e71[_0x43cab8(0x206)]+_0x43cab8(0x28a)+MAX_STAGES,_0x2cf605)),_0x2f23d2;}function validateStageStructure(_0x372743,_0x4f5202,_0x529e3e,_0x3a9578){const _0x566205=a146_0x4332,_0x2c754a=[],_0xa42470=_0x566205(0x26c)+_0x4f5202+']';_0x4f5202===0x0&&!_0x372743[_0x566205(0x1e0)]&&_0x2c754a['push'](createIssue('error',_0xa42470+'.entry_criteria',_0x566205(0x28f),'Stage\x20\x27'+_0x372743['name']+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x3a9578,_0xa42470));const _0x111188=_0x4f5202===_0x529e3e-0x1;!_0x111188&&!_0x372743['milestone']&&_0x2c754a[_0x566205(0x1ea)](createIssue('error',_0xa42470+_0x566205(0x24d),_0x566205(0x266),_0x566205(0x276)+_0x372743[_0x566205(0x264)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x3a9578,_0xa42470));(!_0x372743[_0x566205(0x280)]||_0x372743[_0x566205(0x280)][_0x566205(0x206)]===0x0)&&_0x2c754a['push'](createIssue(_0x566205(0x202),_0xa42470+_0x566205(0x267),'MISSING_EXIT_CRITERIA','Stage\x20\x27'+_0x372743['name']+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x3a9578,_0xa42470));const _0x4bb55f=_0x372743[_0x566205(0x27b)]?.[_0x566205(0x206)]??0x0;if(_0x4bb55f===0x0)_0x2c754a['push'](createIssue(_0x566205(0x27a),_0xa42470+_0x566205(0x28c),'INSUFFICIENT_STEPS',_0x566205(0x276)+_0x372743[_0x566205(0x264)]+'\x27\x20has\x20no\x20steps',_0x3a9578,_0xa42470+'.steps'));else{if(_0x4bb55f===0x1)_0x2c754a[_0x566205(0x1ea)](createIssue(_0x566205(0x202),_0xa42470+_0x566205(0x28c),'INSUFFICIENT_STEPS',_0x566205(0x276)+_0x372743[_0x566205(0x264)]+_0x566205(0x24f),_0x3a9578,_0xa42470+_0x566205(0x28c)));else _0x4bb55f<=0x3&&_0x2c754a[_0x566205(0x1ea)](createIssue('warning',_0xa42470+_0x566205(0x28c),_0x566205(0x227),_0x566205(0x276)+_0x372743[_0x566205(0x264)]+_0x566205(0x27e)+_0x4bb55f+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x3a9578,_0xa42470+'.steps'));}return _0x2c754a;}function validateStep(_0x19017d,_0x150a2e,_0x56a6c7,_0x200cb0){const _0xb054d3=a146_0x4332,_0x18e336=[];if(_0x19017d[_0xb054d3(0x209)]===_0xb054d3(0x249))return _0x19017d[_0xb054d3(0x23c)]&&_0x18e336[_0xb054d3(0x1ea)](createIssue('error',_0x150a2e+'.next',_0xb054d3(0x20b),_0xb054d3(0x1ee)+_0x19017d[_0xb054d3(0x264)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x56a6c7)),_0xb054d3(0x24a)in _0x19017d&&_0x19017d[_0xb054d3(0x24a)]!==undefined&&_0x18e336['push'](createIssue(_0xb054d3(0x27a),_0x150a2e+_0xb054d3(0x1e8),_0xb054d3(0x20b),_0xb054d3(0x1ee)+_0x19017d[_0xb054d3(0x264)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x56a6c7)),_0x18e336;_0x19017d[_0xb054d3(0x23c)]&&(_0x56a6c7[_0xb054d3(0x21d)]&&!_0x56a6c7[_0xb054d3(0x21d)]['has'](_0x19017d[_0xb054d3(0x23c)])&&_0x18e336[_0xb054d3(0x1ea)](createIssue(_0xb054d3(0x27a),_0x150a2e+_0xb054d3(0x232),'INVALID_NEXT_REFERENCE',_0xb054d3(0x21e)+_0x19017d[_0xb054d3(0x23c)]+'\x27',_0x56a6c7)));switch(_0x19017d['type']){case _0xb054d3(0x201):_0x18e336[_0xb054d3(0x1ea)](...validateWaitStep(_0x19017d,_0x150a2e,_0x56a6c7,_0x200cb0));break;case _0xb054d3(0x248):_0x18e336[_0xb054d3(0x1ea)](...validateActivationStep(_0x19017d,_0x150a2e,_0x56a6c7));break;case _0xb054d3(0x20e):_0x18e336[_0xb054d3(0x1ea)](...validateDecisionPointStep(_0x19017d,_0x150a2e,_0x56a6c7,_0x200cb0));break;case _0xb054d3(0x287):_0x18e336[_0xb054d3(0x1ea)](...validateAbTestStep(_0x19017d,_0x150a2e,_0x56a6c7,_0x200cb0));break;case _0xb054d3(0x283):_0x18e336[_0xb054d3(0x1ea)](...validateJumpStep(_0x19017d,_0x150a2e,_0x56a6c7));break;}return _0x18e336;}function validateWaitStep(_0x16949c,_0x320723,_0x1dee66,_0x2ee19f){const _0x1b26e1=a146_0x4332,_0x2ef5dd=[];if(!_0x16949c[_0x1b26e1(0x24a)])return _0x2ef5dd[_0x1b26e1(0x1ea)](createIssue(_0x1b26e1(0x27a),_0x320723+_0x1b26e1(0x1e8),_0x1b26e1(0x289),_0x1b26e1(0x1e1),_0x1dee66,_0x320723)),_0x2ef5dd;if(_0x16949c[_0x1b26e1(0x24a)][_0x1b26e1(0x225)]){const _0x53fee6=_0x16949c[_0x1b26e1(0x24a)][_0x1b26e1(0x225)];if(_0x53fee6[_0x1b26e1(0x223)]){_0x1dee66[_0x1b26e1(0x245)]?.['add'](_0x53fee6[_0x1b26e1(0x223)]);!_0x53fee6['segment']['startsWith'](_0x1b26e1(0x21b))&&(_0x1dee66[_0x1b26e1(0x1de)]&&!_0x1dee66[_0x1b26e1(0x1de)][_0x1b26e1(0x204)](_0x53fee6[_0x1b26e1(0x223)])&&_0x2ef5dd[_0x1b26e1(0x1ea)](createIssue(_0x1b26e1(0x27a),_0x320723+_0x1b26e1(0x221),_0x1b26e1(0x22c),_0x1b26e1(0x27f)+_0x53fee6[_0x1b26e1(0x223)]+_0x1b26e1(0x20a),_0x1dee66)));_0x53fee6[_0x1b26e1(0x23c)]&&_0x1dee66[_0x1b26e1(0x21d)]&&!_0x1dee66[_0x1b26e1(0x21d)][_0x1b26e1(0x204)](_0x53fee6[_0x1b26e1(0x23c)])&&_0x2ef5dd[_0x1b26e1(0x1ea)](createIssue(_0x1b26e1(0x27a),_0x320723+_0x1b26e1(0x236),_0x1b26e1(0x216),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x53fee6[_0x1b26e1(0x23c)]+'\x27',_0x1dee66));_0x53fee6[_0x1b26e1(0x23e)]?.[_0x1b26e1(0x23c)]&&_0x1dee66[_0x1b26e1(0x21d)]&&!_0x1dee66[_0x1b26e1(0x21d)][_0x1b26e1(0x204)](_0x53fee6[_0x1b26e1(0x23e)][_0x1b26e1(0x23c)])&&_0x2ef5dd['push'](createIssue(_0x1b26e1(0x27a),_0x320723+_0x1b26e1(0x1f5),_0x1b26e1(0x216),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x53fee6[_0x1b26e1(0x23e)]['next']+'\x27',_0x1dee66));const _0x5bfdce=_0x53fee6[_0x1b26e1(0x23c)]||_0x16949c[_0x1b26e1(0x23c)],_0x62b757=_0x53fee6['timeout']?.['next']||_0x16949c[_0x1b26e1(0x23c)];if(_0x5bfdce){const _0x43de2b=_0x2ee19f[_0x1b26e1(0x26d)](_0x5bfdce);_0x43de2b?.[_0x1b26e1(0x209)]===_0x1b26e1(0x1f8)&&_0x2ef5dd['push'](createIssue('warning',_0x320723+_0x1b26e1(0x236),_0x1b26e1(0x262),_0x1b26e1(0x219)+_0x5bfdce+_0x1b26e1(0x205),_0x1dee66,_0x320723+_0x1b26e1(0x257)));}if(_0x62b757){const _0x446c2b=_0x2ee19f[_0x1b26e1(0x26d)](_0x62b757);_0x446c2b?.[_0x1b26e1(0x209)]==='merge'&&_0x2ef5dd[_0x1b26e1(0x1ea)](createIssue(_0x1b26e1(0x202),_0x320723+_0x1b26e1(0x1f5),_0x1b26e1(0x262),_0x1b26e1(0x25e)+_0x62b757+_0x1b26e1(0x205),_0x1dee66,_0x320723+_0x1b26e1(0x25f)));}}}return _0x2ef5dd;}function validateActivationStep(_0x77e3d7,_0x38f33f,_0x23d238){const _0x216d7e=a146_0x4332,_0x2a97e2=[];if(!_0x77e3d7['with']?.['activation'])return _0x2a97e2['push'](createIssue(_0x216d7e(0x27a),_0x38f33f+'.with.activation','MISSING_ACTIVATION_REF','Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x23d238,_0x38f33f)),_0x2a97e2;const _0x210192=_0x77e3d7[_0x216d7e(0x24a)][_0x216d7e(0x248)];return _0x23d238[_0x216d7e(0x228)]&&!_0x210192[_0x216d7e(0x22b)]('ref:')&&(!_0x23d238[_0x216d7e(0x228)]['has'](_0x210192)&&_0x2a97e2[_0x216d7e(0x1ea)](createIssue('error',_0x38f33f+_0x216d7e(0x1fe),_0x216d7e(0x241),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x210192+_0x216d7e(0x218),_0x23d238))),_0x2a97e2;}function validateDecisionPointStep(_0x38c258,_0x326ae2,_0x258563,_0x4dcc12){const _0x2e4fa6=a146_0x4332,_0x2bfd9f=[];if(!_0x38c258[_0x2e4fa6(0x24a)]?.['branches']||_0x38c258[_0x2e4fa6(0x24a)][_0x2e4fa6(0x284)][_0x2e4fa6(0x206)]===0x0)return _0x2bfd9f['push'](createIssue('error',_0x326ae2+_0x2e4fa6(0x1f7),_0x2e4fa6(0x222),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x258563,_0x326ae2)),_0x2bfd9f;for(let _0x5c9863=0x0;_0x5c9863<_0x38c258[_0x2e4fa6(0x24a)][_0x2e4fa6(0x284)][_0x2e4fa6(0x206)];_0x5c9863++){const _0x278247=_0x38c258[_0x2e4fa6(0x24a)][_0x2e4fa6(0x284)][_0x5c9863],_0x409394=_0x326ae2+_0x2e4fa6(0x1f4)+_0x5c9863+']';_0x278247[_0x2e4fa6(0x223)]&&!_0x278247[_0x2e4fa6(0x1ff)]&&(_0x258563[_0x2e4fa6(0x245)]?.['add'](_0x278247[_0x2e4fa6(0x223)]),!_0x278247[_0x2e4fa6(0x223)][_0x2e4fa6(0x22b)](_0x2e4fa6(0x21b))&&(_0x258563[_0x2e4fa6(0x1de)]&&!_0x258563[_0x2e4fa6(0x1de)][_0x2e4fa6(0x204)](_0x278247[_0x2e4fa6(0x223)])&&_0x2bfd9f[_0x2e4fa6(0x1ea)](createIssue(_0x2e4fa6(0x27a),_0x409394+_0x2e4fa6(0x20d),_0x2e4fa6(0x22c),_0x2e4fa6(0x244)+_0x278247[_0x2e4fa6(0x223)]+'\x27',_0x258563))));_0x278247['next']&&_0x258563[_0x2e4fa6(0x21d)]&&!_0x258563[_0x2e4fa6(0x21d)][_0x2e4fa6(0x204)](_0x278247[_0x2e4fa6(0x23c)])&&_0x2bfd9f[_0x2e4fa6(0x1ea)](createIssue('error',_0x409394+_0x2e4fa6(0x232),_0x2e4fa6(0x216),_0x2e4fa6(0x270)+_0x278247[_0x2e4fa6(0x23c)]+'\x27',_0x258563));if(_0x278247['next']){const _0x359a02=_0x4dcc12[_0x2e4fa6(0x26d)](_0x278247[_0x2e4fa6(0x23c)]);_0x359a02?.['type']===_0x2e4fa6(0x1f8)&&_0x2bfd9f['push'](createIssue(_0x2e4fa6(0x202),_0x409394+_0x2e4fa6(0x232),_0x2e4fa6(0x262),_0x2e4fa6(0x27d)+_0x278247['name']+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x278247['next']+_0x2e4fa6(0x1ed),_0x258563));}}return _0x2bfd9f;}function validateAbTestStep(_0x17dacd,_0x3052ef,_0x3a44fa,_0x11db8b){const _0x19e7ac=a146_0x4332,_0x19bb55=[];if(!_0x17dacd[_0x19e7ac(0x24a)]?.[_0x19e7ac(0x26f)]||_0x17dacd[_0x19e7ac(0x24a)][_0x19e7ac(0x26f)][_0x19e7ac(0x206)]===0x0)return _0x19bb55['push'](createIssue('error',_0x3052ef+'.with.variants',_0x19e7ac(0x222),_0x19e7ac(0x1fa),_0x3a44fa,_0x3052ef)),_0x19bb55;const _0x5ade90=_0x17dacd[_0x19e7ac(0x24a)][_0x19e7ac(0x26f)][_0x19e7ac(0x23d)]((_0x4183ef,_0x1d924d)=>_0x4183ef+(_0x1d924d[_0x19e7ac(0x25c)]||0x0),0x0);Math[_0x19e7ac(0x22e)](_0x5ade90-0x64)>0.01&&_0x19bb55[_0x19e7ac(0x1ea)](createIssue(_0x19e7ac(0x27a),_0x3052ef+_0x19e7ac(0x220),_0x19e7ac(0x233),_0x19e7ac(0x1fb)+_0x5ade90+'%)',_0x3a44fa));for(let _0x2e01f5=0x0;_0x2e01f5<_0x17dacd[_0x19e7ac(0x24a)][_0x19e7ac(0x26f)]['length'];_0x2e01f5++){const _0x28ed21=_0x17dacd['with'][_0x19e7ac(0x26f)][_0x2e01f5],_0x2df5af=_0x3052ef+_0x19e7ac(0x26b)+_0x2e01f5+']';_0x28ed21['next']&&_0x3a44fa[_0x19e7ac(0x21d)]&&!_0x3a44fa['stepNames'][_0x19e7ac(0x204)](_0x28ed21[_0x19e7ac(0x23c)])&&_0x19bb55[_0x19e7ac(0x1ea)](createIssue(_0x19e7ac(0x27a),_0x2df5af+_0x19e7ac(0x232),_0x19e7ac(0x216),_0x19e7ac(0x200)+_0x28ed21['next']+'\x27',_0x3a44fa));if(_0x28ed21[_0x19e7ac(0x23c)]){const _0xc709db=_0x11db8b[_0x19e7ac(0x26d)](_0x28ed21[_0x19e7ac(0x23c)]);_0xc709db?.[_0x19e7ac(0x209)]===_0x19e7ac(0x1f8)&&_0x19bb55['push'](createIssue(_0x19e7ac(0x202),_0x2df5af+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x19e7ac(0x235)+_0x28ed21[_0x19e7ac(0x264)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x28ed21[_0x19e7ac(0x23c)]+_0x19e7ac(0x1ed),_0x3a44fa));}}return _0x19bb55;}function validateJumpStep(_0x22d254,_0x18cbd3,_0x565289){const _0x2548bc=a146_0x4332,_0x419478=[];if(!_0x22d254[_0x2548bc(0x24a)]?.[_0x2548bc(0x269)])return _0x419478[_0x2548bc(0x1ea)](createIssue(_0x2548bc(0x27a),_0x18cbd3+_0x2548bc(0x20f),_0x2548bc(0x21f),'Jump\x20step\x20requires\x20a\x20target',_0x565289,_0x18cbd3)),_0x419478;return(!_0x22d254[_0x2548bc(0x24a)]['target'][_0x2548bc(0x26a)]||!_0x22d254['with'][_0x2548bc(0x269)][_0x2548bc(0x265)])&&_0x419478[_0x2548bc(0x1ea)](createIssue('error',_0x18cbd3+'.with.target',_0x2548bc(0x21f),_0x2548bc(0x250),_0x565289)),_0x419478;}function buildConvergenceMap(_0x31e089){const _0x44bb43=a146_0x4332,_0x45166a=new Map();function _0x2b021b(_0x46262b,_0x40a544){const _0xd39399=a146_0x4332,_0x3582c8=_0x45166a[_0xd39399(0x26d)](_0x46262b)||[];_0x3582c8[_0xd39399(0x1ea)](_0x40a544),_0x45166a[_0xd39399(0x210)](_0x46262b,_0x3582c8);}for(const _0x3ae737 of _0x31e089){_0x3ae737[_0x44bb43(0x23c)]&&_0x2b021b(_0x3ae737[_0x44bb43(0x23c)],{'stepName':_0x3ae737[_0x44bb43(0x264)],'description':'step\x20\x27'+_0x3ae737[_0x44bb43(0x264)]+'\x27'});if(_0x3ae737[_0x44bb43(0x209)]===_0x44bb43(0x20e)&&_0x3ae737[_0x44bb43(0x24a)]?.[_0x44bb43(0x284)])for(const _0xeaa894 of _0x3ae737['with']['branches']){_0xeaa894[_0x44bb43(0x23c)]&&_0x2b021b(_0xeaa894[_0x44bb43(0x23c)],{'stepName':_0x3ae737[_0x44bb43(0x264)],'description':'branch\x20\x27'+_0xeaa894[_0x44bb43(0x264)]+_0x44bb43(0x23b)+_0x3ae737[_0x44bb43(0x264)]+'\x27'});}if(_0x3ae737[_0x44bb43(0x209)]===_0x44bb43(0x287)&&_0x3ae737['with']?.[_0x44bb43(0x26f)])for(const _0xa17b2 of _0x3ae737[_0x44bb43(0x24a)]['variants']){_0xa17b2['next']&&_0x2b021b(_0xa17b2[_0x44bb43(0x23c)],{'stepName':_0x3ae737[_0x44bb43(0x264)],'description':_0x44bb43(0x1f9)+_0xa17b2['name']+_0x44bb43(0x23b)+_0x3ae737[_0x44bb43(0x264)]+'\x27'});}_0x3ae737[_0x44bb43(0x209)]===_0x44bb43(0x201)&&_0x3ae737[_0x44bb43(0x24a)]?.[_0x44bb43(0x225)]&&(_0x3ae737[_0x44bb43(0x24a)][_0x44bb43(0x225)]['next']&&_0x2b021b(_0x3ae737[_0x44bb43(0x24a)][_0x44bb43(0x225)][_0x44bb43(0x23c)],{'stepName':_0x3ae737[_0x44bb43(0x264)],'description':_0x44bb43(0x230)+_0x3ae737[_0x44bb43(0x264)]+'\x27'}),_0x3ae737[_0x44bb43(0x24a)][_0x44bb43(0x225)][_0x44bb43(0x23e)]?.[_0x44bb43(0x23c)]&&_0x2b021b(_0x3ae737[_0x44bb43(0x24a)][_0x44bb43(0x225)][_0x44bb43(0x23e)][_0x44bb43(0x23c)],{'stepName':_0x3ae737[_0x44bb43(0x264)],'description':_0x44bb43(0x22a)+_0x3ae737['name']+'\x27'}));}return _0x45166a;}function validateFlowControl(_0x12699f,_0x4a6390,_0x515225){const _0x400719=a146_0x4332,_0x22b29d=[],_0x43a070='stages['+_0x4a6390+']',_0x23692c=_0x12699f['steps']||[];if(_0x23692c['length']===0x0)return _0x22b29d;const _0x27f9d1=new Map();for(const _0x489cee of _0x23692c){_0x489cee['name']&&_0x27f9d1[_0x400719(0x210)](_0x489cee[_0x400719(0x264)],_0x489cee);}const _0x4cf5d1=buildConvergenceMap(_0x23692c),_0x3a6e7f=_0x23692c['some'](_0x1aea73=>_0x1aea73['type']===_0x400719(0x249));!_0x3a6e7f&&_0x22b29d['push'](createIssue(_0x400719(0x27a),_0x43a070+_0x400719(0x28c),_0x400719(0x253),_0x400719(0x276)+_0x12699f[_0x400719(0x264)]+_0x400719(0x211),_0x515225));for(const [_0x2b6831,_0x4e3fd6]of _0x4cf5d1){const _0x384a92=_0x27f9d1['get'](_0x2b6831);if(!_0x384a92)continue;if(_0x4e3fd6['length']>0x1&&_0x384a92[_0x400719(0x209)]!=='merge'){const _0xe0c5c5=_0x4e3fd6[_0x400719(0x286)](_0x513abd=>_0x513abd[_0x400719(0x288)])[_0x400719(0x22d)](',\x20');_0x22b29d[_0x400719(0x1ea)](createIssue(_0x400719(0x27a),_0x43a070+_0x400719(0x28c),_0x400719(0x247),_0x400719(0x229)+_0x2b6831+_0x400719(0x1f3)+_0xe0c5c5+_0x400719(0x275),_0x515225));}_0x4e3fd6[_0x400719(0x206)]===0x1&&_0x384a92['type']===_0x400719(0x1f8)&&_0x22b29d['push'](createIssue(_0x400719(0x202),_0x43a070+'.steps','SINGLE_INPUT_MERGE',_0x400719(0x271)+_0x2b6831+_0x400719(0x279)+_0x4e3fd6[0x0][_0x400719(0x288)]+_0x400719(0x1e2),_0x515225));}for(const _0x29536d of _0x23692c){if(_0x29536d[_0x400719(0x209)]===_0x400719(0x1f8)&&_0x29536d[_0x400719(0x23c)]){const _0x21590f=_0x27f9d1[_0x400719(0x26d)](_0x29536d[_0x400719(0x23c)]);_0x21590f?.['type']===_0x400719(0x1f8)&&_0x22b29d[_0x400719(0x1ea)](createIssue('error',_0x43a070+_0x400719(0x28c),'MERGE_TO_MERGE_CHAIN',_0x400719(0x271)+_0x29536d[_0x400719(0x264)]+_0x400719(0x214)+_0x29536d[_0x400719(0x23c)]+_0x400719(0x1fc),_0x515225));}}return _0x22b29d;}function validateCriteria(_0x57f819,_0x5469f,_0x5a8540){const _0x2f2f1f=a146_0x4332,_0xa89337=[];return _0x57f819['segment']&&(_0x5a8540['referencedSegments']?.[_0x2f2f1f(0x212)](_0x57f819[_0x2f2f1f(0x223)]),!_0x57f819['segment'][_0x2f2f1f(0x22b)](_0x2f2f1f(0x21b))&&(_0x5a8540[_0x2f2f1f(0x1de)]&&!_0x5a8540[_0x2f2f1f(0x1de)][_0x2f2f1f(0x204)](_0x57f819[_0x2f2f1f(0x223)])&&_0xa89337['push'](createIssue('error',_0x5469f+_0x2f2f1f(0x20d),_0x2f2f1f(0x22c),_0x2f2f1f(0x282)+_0x57f819[_0x2f2f1f(0x223)]+'\x27',_0x5a8540)))),_0xa89337;}function validateEmbeddedSegment(_0x2c8162,_0x8bb85,_0xf31452){const _0x38bb16=a146_0x4332,_0x4493d8=[];return _0x2c8162[_0x38bb16(0x256)]&&_0x4493d8[_0x38bb16(0x1ea)](...validateRuleDef(_0x2c8162['rule'],_0x8bb85+'.rule',_0xf31452)),_0x4493d8;}function validateStage(_0xe5fef5,_0x198b9b,_0x32a879,_0x4fc81d){const _0x2b8c5a=a146_0x4332,_0x4129ca=[],_0x5c17b2='stages['+_0x198b9b+']',_0x5a752a=new Map(),_0x3fc06e=new Map();if(_0xe5fef5[_0x2b8c5a(0x27b)]){for(let _0x5aa26d=0x0;_0x5aa26d<_0xe5fef5[_0x2b8c5a(0x27b)]['length'];_0x5aa26d++){const _0x39eff4=_0xe5fef5['steps'][_0x5aa26d];_0x39eff4['name']&&_0x5a752a[_0x2b8c5a(0x210)](_0x39eff4['name'],_0x39eff4);}for(let _0xccd8ef=0x0;_0xccd8ef<_0xe5fef5['steps'][_0x2b8c5a(0x206)];_0xccd8ef++){const _0x1aca0d=_0xe5fef5[_0x2b8c5a(0x27b)][_0xccd8ef],_0x222962=_0x5c17b2+_0x2b8c5a(0x263)+_0xccd8ef+']';if(_0x1aca0d['name']){if(_0x3fc06e['has'](_0x1aca0d[_0x2b8c5a(0x264)])){const _0x29618b=_0x3fc06e[_0x2b8c5a(0x26d)](_0x1aca0d[_0x2b8c5a(0x264)]);_0x4129ca['push'](createIssue(_0x2b8c5a(0x27a),_0x222962+_0x2b8c5a(0x1f2),_0x2b8c5a(0x1df),_0x2b8c5a(0x246)+_0x1aca0d[_0x2b8c5a(0x264)]+_0x2b8c5a(0x23a)+_0x29618b+'])',_0x4fc81d));}else _0x3fc06e[_0x2b8c5a(0x210)](_0x1aca0d['name'],_0xccd8ef);}_0x4129ca['push'](...validateStep(_0x1aca0d,_0x222962,_0x4fc81d,_0x5a752a));}}_0xe5fef5[_0x2b8c5a(0x1e0)]&&_0x4129ca[_0x2b8c5a(0x1ea)](...validateCriteria(_0xe5fef5['entry_criteria'],_0x5c17b2+'.entry_criteria',_0x4fc81d));if(_0xe5fef5['exit_criteria'])for(let _0x5386e8=0x0;_0x5386e8<_0xe5fef5['exit_criteria'][_0x2b8c5a(0x206)];_0x5386e8++){_0x4129ca[_0x2b8c5a(0x1ea)](...validateCriteria(_0xe5fef5[_0x2b8c5a(0x280)][_0x5386e8],_0x5c17b2+_0x2b8c5a(0x234)+_0x5386e8+']',_0x4fc81d));}return _0xe5fef5['milestone']&&_0x4129ca['push'](...validateCriteria(_0xe5fef5['milestone'],_0x5c17b2+_0x2b8c5a(0x24d),_0x4fc81d)),_0x4129ca[_0x2b8c5a(0x1ea)](...validateStageStructure(_0xe5fef5,_0x198b9b,_0x32a879,_0x4fc81d)),_0x4129ca['push'](...validateFlowControl(_0xe5fef5,_0x198b9b,_0x4fc81d)),_0x4129ca;}function validateStagesForVersion(_0x4ff956,_0x4413c7,_0x1565f5,_0xdcca0f,_0x39b39b,_0x56003b,_0x19e4e9){const _0x1652ec=a146_0x4332;if(_0x4ff956[_0x1652ec(0x206)]===0x0){_0x39b39b['push']({'level':_0x1652ec(0x27a),'path':_0xdcca0f+_0x1652ec(0x224),'code':_0x1652ec(0x25d),'message':_0x1652ec(0x208),'location':getLocationFromPath(_0x1565f5['document'],_0x1565f5['source'],[_0x1652ec(0x224)])});return;}const _0x550f8c=new Set();for(const _0x3adfa5 of _0x4ff956){if(_0x3adfa5['steps'])for(const _0x1c2749 of _0x3adfa5['steps']){_0x1c2749[_0x1652ec(0x264)]&&_0x550f8c[_0x1652ec(0x212)](_0x1c2749[_0x1652ec(0x264)]);}}const _0xa9ee00={..._0x1565f5,'stepNames':_0x550f8c},_0xa74813=validateVersionStructure(_0x4ff956,_0xa9ee00);for(const _0x13bcf9 of _0xa74813){const _0x2a0b5f=_0xdcca0f?{..._0x13bcf9,'path':''+_0xdcca0f+_0x13bcf9[_0x1652ec(0x277)]}:_0x13bcf9;if(_0x2a0b5f[_0x1652ec(0x24e)]===_0x1652ec(0x27a))_0x39b39b['push'](_0x2a0b5f);else _0x56003b[_0x1652ec(0x1ea)](_0x2a0b5f);}for(let _0x3973ff=0x0;_0x3973ff<_0x4ff956[_0x1652ec(0x206)];_0x3973ff++){const _0x378a33=validateStage(_0x4ff956[_0x3973ff],_0x3973ff,_0x4ff956[_0x1652ec(0x206)],_0xa9ee00);for(const _0x72ca6a of _0x378a33){const _0x22124=_0xdcca0f?{..._0x72ca6a,'path':''+_0xdcca0f+_0x72ca6a[_0x1652ec(0x277)]}:_0x72ca6a;if(_0x22124[_0x1652ec(0x24e)]===_0x1652ec(0x27a))_0x39b39b[_0x1652ec(0x1ea)](_0x22124);else _0x56003b[_0x1652ec(0x1ea)](_0x22124);}}if(_0x4413c7[_0x1652ec(0x1f6)]){const _0x22b593=_0x19e4e9?.[_0x1652ec(0x24b)]?_0x1652ec(0x1f6):_0xdcca0f+_0x1652ec(0x1f6),_0x3733d5=validateCriteria(_0x4413c7[_0x1652ec(0x1f6)],_0x22b593,_0xa9ee00);for(const _0x11d320 of _0x3733d5){if(_0x11d320[_0x1652ec(0x24e)]===_0x1652ec(0x27a))_0x39b39b[_0x1652ec(0x1ea)](_0x11d320);else _0x56003b[_0x1652ec(0x1ea)](_0x11d320);}}}function extractVersionIndex(_0x5585c9){const _0x18e059=_0x5585c9['match'](/^journeys\[(\d+)\]\./);return _0x18e059?_0x18e059[0x1]:undefined;}function deduplicateAcrossVersions(_0x141e6b){const _0x3be72d=a146_0x4332,_0xc14102=new Map();for(let _0x58836c=0x0;_0x58836c<_0x141e6b['length'];_0x58836c++){const _0xddde07=_0x141e6b[_0x58836c][_0x3be72d(0x254)]+':'+_0x141e6b[_0x58836c]['message'],_0x22e6eb=extractVersionIndex(_0x141e6b[_0x58836c][_0x3be72d(0x277)]),_0x285886=_0xc14102[_0x3be72d(0x26d)](_0xddde07);if(_0x285886){_0x285886[_0x3be72d(0x281)][_0x3be72d(0x1ea)](_0x58836c);if(_0x22e6eb)_0x285886['versions'][_0x3be72d(0x212)](_0x22e6eb);}else _0xc14102['set'](_0xddde07,{'indices':[_0x58836c],'versions':new Set(_0x22e6eb?[_0x22e6eb]:[])});}const _0x3b7919=new Set();for(const {indices:_0x50c4a8,versions:_0x5e05fd}of _0xc14102[_0x3be72d(0x231)]()){if(_0x5e05fd[_0x3be72d(0x22f)]<=0x1)continue;const _0x30f404=_0x141e6b[_0x50c4a8[0x0]];_0x30f404[_0x3be72d(0x277)]=_0x30f404[_0x3be72d(0x277)][_0x3be72d(0x25b)](/^journeys\[\d+\]\./,''),_0x30f404['message']=_0x30f404['message']+_0x3be72d(0x274)+_0x5e05fd['size']+_0x3be72d(0x28e);for(let _0x31b432=0x1;_0x31b432<_0x50c4a8[_0x3be72d(0x206)];_0x31b432++){_0x3b7919[_0x3be72d(0x212)](_0x50c4a8[_0x31b432]);}}const _0x307eea=[..._0x3b7919]['sort']((_0x573386,_0x39d4ed)=>_0x39d4ed-_0x573386);for(const _0x100c44 of _0x307eea){_0x141e6b[_0x3be72d(0x242)](_0x100c44,0x1);}}export function validateJourneyDef(_0x5a5395,_0xcf357={},_0x376fe7={}){const _0x11e94c=a146_0x4332;if(_0x376fe7['skipSchema'])return runJourneySemanticChecks(_0x5a5395,_0xcf357);const _0x31f515=JourneyDefSchema[_0x11e94c(0x237)](_0x5a5395);if(_0x31f515[_0x11e94c(0x1e6)])return runJourneySemanticChecks(_0x31f515[_0x11e94c(0x260)],_0xcf357);return zodErrorsToJourneyValidationResult(_0x31f515['error'],_0xcf357);}function zodErrorsToJourneyValidationResult(_0x14e148,_0x497dae){const _0x3801ad=a146_0x4332,_0x30c6bb=flattenZodIssues(_0x14e148['issues']),_0x4ce5ef=_0x30c6bb[_0x3801ad(0x286)](_0x441fc1=>{const _0x34ec32=_0x3801ad,_0x3c54b9=formatZodPath(_0x441fc1[_0x34ec32(0x277)]),_0x1e5c26=mapJourneyZodIssueToCode(_0x441fc1,_0x3c54b9),_0x571b73=getLocationFromPath(_0x497dae[_0x34ec32(0x21c)],_0x497dae['source'],_0x441fc1[_0x34ec32(0x277)]['map'](_0x9a76d7=>typeof _0x9a76d7===_0x34ec32(0x1e7)?String(_0x9a76d7):_0x9a76d7));return{'level':_0x34ec32(0x27a),'path':_0x3c54b9,'code':_0x1e5c26,'message':_0x441fc1[_0x34ec32(0x226)],..._0x571b73&&{'location':_0x571b73}};});return{'valid':![],'errors':_0x4ce5ef,'warnings':[]};}function a146_0x3b2b(){const _0x55b641=['size','condition\x20of\x20\x27','values','.next','INVALID_AB_TEST_PERCENTAGES','.exit_criteria[','A/B\x20test\x20variant\x20\x27','.with.condition.next','safeParse','activations','segments','\x27\x20(first\x20defined\x20at\x20steps[','\x27\x20of\x20\x27','next','reduce','timeout','Embedded\x20segment\x20\x27','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','MISSING_ACTIVATION_DEFINITION','splice','Journey\x20has\x20','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','referencedSegments','Duplicate\x20step\x20name\x20\x27','CONVERGENCE_WITHOUT_MERGE','activation','end','with','goalIsInherited','journeys[','.milestone','level','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','versions','trim','MISSING_END_STEP','code','keys','rule','.with.condition','launched','22020reWfpi','365202zFYJvq','replace','percentage','MISSING_STAGES','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.condition.timeout','data','JOURNEY_SCHEMA_ERROR','BRANCH_DIRECTLY_TO_MERGE','.steps[','name','stage','MISSING_MILESTONE','.exit_criteria','MISSING_GOAL','target','journey','.with.variants[','stages[','get','315PUwAAF','variants','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','Merge\x20step\x20\x27','TOO_MANY_STAGES','endsWith','\x20(across\x20',').\x20Use\x20a\x20merge\x20step.','Stage\x20\x27','path','.stages','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','error','steps','1305936PwXZeq','Decision\x20branch\x20\x27','\x27\x20has\x20only\x20','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','exit_criteria','indices','Criteria\x20references\x20undefined\x20segment\x20\x27','jump','branches','latest','map','ab_test','description','MISSING_WAIT_PARAMS','\x20stages\x20but\x20maximum\x20is\x20','source','.steps','version','\x20versions)','MISSING_ENTRY_CRITERIA','embeddedSegments','DUPLICATE_STEP_NAME','entry_criteria','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',').\x20Merge\x20is\x20unnecessary.','segments.','Journey\x20can\x20have\x20at\x20most\x20one\x20','every','success','symbol','.with','3586488KViXal','push','MISSING_NAME','1005HbENPx','\x27\x20with\x20no\x20action\x20in\x20between','End\x20step\x20\x27','UNUSED_EMBEDDED_SEGMENT','\x20with\x20latest:\x20true','Journey\x20has\x20no\x20goal\x20defined','.name','\x27\x20(from:\x20','.with.branches[','.with.condition.timeout.next','goal','.with.branches','merge','variant\x20\x27','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','state','.with.activation','excluded','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','wait','warning','filter','has','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','length','.type','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','type','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','END_STEP_HAS_NEXT_OR_WITH','791460tiZaLz','.segment','decision_point','.with.target','set','\x27\x20has\x20no\x20end\x20step','add','journeys','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','versions[','INVALID_NEXT_REFERENCE','396720CKNmmW','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','11108EziyOA','ref:','document','stepNames','Step\x20references\x20non-existent\x20step\x20\x27','INVALID_JUMP_TARGET','.with.variants','.with.condition.segment','MISSING_CONDITIONS','segment','stages','condition','message','FEW_STEPS','activationKeys','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','timeout\x20of\x20\x27','startsWith','MISSING_SEGMENT_REFERENCE','join','abs'];a146_0x3b2b=function(){return _0x55b641;};return a146_0x3b2b();}function mapJourneyZodIssueToCode(_0x5ea7e1,_0x4811ff){const _0x33b60b=a146_0x4332;if(_0x4811ff===_0x33b60b(0x264))return _0x33b60b(0x1eb);if(_0x4811ff['endsWith'](_0x33b60b(0x207))&&_0x4811ff['includes']('steps'))return _0x33b60b(0x261);if(_0x4811ff===_0x33b60b(0x224)||_0x4811ff[_0x33b60b(0x273)](_0x33b60b(0x278)))return _0x33b60b(0x25d);if(_0x4811ff===''&&_0x5ea7e1['message']['includes']('journeys,\x20stages,\x20or\x20versions'))return'MISSING_STAGES';if(_0x4811ff['includes'](_0x33b60b(0x248)))return'ACTIVATION_SCHEMA_ERROR';return _0x33b60b(0x261);}function runJourneySemanticChecks(_0x124857,_0x382a88){const _0xa11936=a146_0x4332,_0x59b56b=[],_0x3a7d6a=[];(!_0x124857[_0xa11936(0x264)]||_0x124857[_0xa11936(0x264)][_0xa11936(0x252)]()==='')&&_0x59b56b[_0xa11936(0x1ea)]({'level':_0xa11936(0x27a),'path':'name','code':_0xa11936(0x1eb),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x382a88['document'],_0x382a88[_0xa11936(0x28b)],['name'])});const _0x4afcac=new Set();if(_0x124857['segments'])for(const _0x2c5810 of Object['keys'](_0x124857[_0xa11936(0x239)])){_0x4afcac[_0xa11936(0x212)](_0x2c5810);}const _0x589e1b=new Set();if(_0x124857[_0xa11936(0x238)])for(const _0x10c657 of Object[_0xa11936(0x255)](_0x124857[_0xa11936(0x238)])){_0x589e1b[_0xa11936(0x212)](_0x10c657);}const _0x233fb5=new Set(),_0x1a8654={..._0x382a88,'embeddedSegments':_0x4afcac,'referencedSegments':_0x233fb5,'activationKeys':_0x589e1b[_0xa11936(0x22f)]>0x0?_0x589e1b:undefined};if(_0x124857['segments'])for(const [_0x4e8b43,_0x20a8a5]of Object['entries'](_0x124857[_0xa11936(0x239)])){const _0x1b558b=validateEmbeddedSegment(_0x20a8a5,_0xa11936(0x1e3)+_0x4e8b43,_0x1a8654);for(const _0x25f83c of _0x1b558b){if(_0x25f83c[_0xa11936(0x24e)]===_0xa11936(0x27a))_0x59b56b['push'](_0x25f83c);else _0x3a7d6a[_0xa11936(0x1ea)](_0x25f83c);}}const _0x474dd8=!!_0x124857[_0xa11936(0x1f6)],_0x55cdbb=_0x124857[_0xa11936(0x213)]?.[_0xa11936(0x1e5)](_0x524fdd=>!!_0x524fdd[_0xa11936(0x1f6)])??![];!_0x474dd8&&!_0x55cdbb&&_0x3a7d6a[_0xa11936(0x1ea)]({'level':'warning','path':'goal','code':_0xa11936(0x268),'message':_0xa11936(0x1f1),'location':getLocationFromPath(_0x382a88['document'],_0x382a88[_0xa11936(0x28b)],[_0xa11936(0x1f6)])});const _0x13c7ff=_0x124857['journeys']??_0x124857['versions'];if(_0x13c7ff&&_0x13c7ff[_0xa11936(0x203)](_0x192e0c=>_0x192e0c[_0xa11936(0x285)]===!![])[_0xa11936(0x206)]>0x1){const _0x2917af=_0x124857['journeys']?_0xa11936(0x213):_0xa11936(0x251);_0x59b56b[_0xa11936(0x1ea)]({'level':'error','path':_0x2917af,'code':'DUPLICATE_LATEST','message':_0xa11936(0x1e4)+(_0x2917af===_0xa11936(0x213)?'journey\x20entry':_0xa11936(0x28d))+_0xa11936(0x1f0),'location':getLocationFromPath(_0x382a88[_0xa11936(0x21c)],_0x382a88[_0xa11936(0x28b)],[_0x2917af])});}if(_0x124857[_0xa11936(0x213)]&&_0x124857[_0xa11936(0x213)][_0xa11936(0x206)]>0x0)for(let _0xe125af=0x0;_0xe125af<_0x124857[_0xa11936(0x213)][_0xa11936(0x206)];_0xe125af++){const _0x1d8083=_0x124857[_0xa11936(0x213)][_0xe125af];if(_0x124857[_0xa11936(0x213)][_0xa11936(0x206)]>0x1&&_0x1d8083[_0xa11936(0x1fd)]===_0xa11936(0x258))continue;const _0x4997cd=_0x1d8083[_0xa11936(0x224)]||[],_0x10d786=_0xa11936(0x24c)+_0xe125af+'].',_0x5e7076=!!_0x1d8083[_0xa11936(0x1f6)],_0x4326e9=_0x5e7076?{..._0x124857,'goal':_0x1d8083[_0xa11936(0x1f6)]}:_0x124857;validateStagesForVersion(_0x4997cd,_0x4326e9,_0x1a8654,_0x10d786,_0x59b56b,_0x3a7d6a,{'goalIsInherited':!_0x5e7076});}else{if(_0x124857[_0xa11936(0x251)]&&_0x124857[_0xa11936(0x251)]['length']>0x0)for(let _0x5341e8=0x0;_0x5341e8<_0x124857[_0xa11936(0x251)][_0xa11936(0x206)];_0x5341e8++){const _0x37449f=_0x124857[_0xa11936(0x251)][_0x5341e8];if(_0x124857[_0xa11936(0x251)]['length']>0x1&&_0x37449f[_0xa11936(0x1fd)]===_0xa11936(0x258))continue;const _0x1bdcf0=_0x37449f['stages']||[],_0x577cc3=_0xa11936(0x215)+_0x5341e8+'].';validateStagesForVersion(_0x1bdcf0,_0x124857,_0x1a8654,_0x577cc3,_0x59b56b,_0x3a7d6a);}else{const _0x1066c9=_0x124857[_0xa11936(0x224)]||[];validateStagesForVersion(_0x1066c9,_0x124857,_0x1a8654,'',_0x59b56b,_0x3a7d6a);}}_0x124857['journeys']&&_0x124857['journeys']['length']>0x1&&(deduplicateAcrossVersions(_0x59b56b),deduplicateAcrossVersions(_0x3a7d6a));for(const _0x45f6c8 of _0x4afcac){!_0x233fb5[_0xa11936(0x204)](_0x45f6c8)&&!_0x45f6c8['startsWith']('excluded_')&&_0x3a7d6a[_0xa11936(0x1ea)]({'level':_0xa11936(0x202),'path':'segments.'+_0x45f6c8,'code':_0xa11936(0x1ef),'message':_0xa11936(0x23f)+_0x45f6c8+_0xa11936(0x240),'location':getLocationFromPath(_0x382a88['document'],_0x382a88[_0xa11936(0x28b)],[_0xa11936(0x239),_0x45f6c8])});}return{'valid':_0x59b56b['length']===0x0,'errors':_0x59b56b,'warnings':_0x3a7d6a};}
|
|
1
|
+
function a146_0x2757(_0x36d3e0,_0x1dae20){_0x36d3e0=_0x36d3e0-0x135;const _0x164663=a146_0x1646();let _0x2757be=_0x164663[_0x36d3e0];return _0x2757be;}(function(_0x5a7660,_0x42a2c5){const _0x4c4e28=a146_0x2757,_0x2b2253=_0x5a7660();while(!![]){try{const _0x232f5d=parseInt(_0x4c4e28(0x1e6))/0x1+-parseInt(_0x4c4e28(0x176))/0x2+-parseInt(_0x4c4e28(0x148))/0x3*(-parseInt(_0x4c4e28(0x16c))/0x4)+parseInt(_0x4c4e28(0x16d))/0x5+parseInt(_0x4c4e28(0x18d))/0x6*(-parseInt(_0x4c4e28(0x1bb))/0x7)+parseInt(_0x4c4e28(0x1a2))/0x8+-parseInt(_0x4c4e28(0x14e))/0x9;if(_0x232f5d===_0x42a2c5)break;else _0x2b2253['push'](_0x2b2253['shift']());}catch(_0x253ede){_0x2b2253['push'](_0x2b2253['shift']());}}}(a146_0x1646,0x9e326));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function a146_0x1646(){const _0x310623=['timeout','Decision\x20branch\x20\x27','\x27\x20(first\x20defined\x20at\x20steps[','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','next',').\x20Use\x20a\x20merge\x20step.','FEW_STEPS','ACTIVATION_SCHEMA_ERROR','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','.entry_criteria','.with.target','entry_criteria','\x20steps\x20(may\x20be\x20too\x20simple)','message','milestone','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.condition.timeout','variants','segment','MISSING_MILESTONE','MISSING_ENTRY_CRITERIA','indices','description','stage','\x20(across\x20','CONVERGENCE_WITHOUT_MERGE','merge','filter','every','add','journey\x20entry','899345lRWCZl','referencedSegments','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20has\x20no\x20steps','entries','excluded_','trim','\x27\x20has\x20only\x20','stepNames','.steps','goal','decision_point','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','.with','.with.activation','segments.','latest','branch\x20\x27','target','Journey\x20has\x20','state','with','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.with.variants[','steps','6fspWEU','UNUSED_EMBEDDED_SEGMENT','source','MISSING_SEGMENT_REFERENCE','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','MISSING_ACTIVATION_REF','13148316wVHIzi','DUPLICATE_STEP_NAME','percentage','.milestone','journeys[','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','embeddedSegments','MISSING_NAME','set','\x27\x20of\x20\x27','SINGLE_INPUT_MERGE','.exit_criteria[','jump','Journey\x20name\x20is\x20required','name','versions','\x27\x20(from:\x20','type','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','endsWith','skipSchema','ref:','Stage\x20\x27','INVALID_JUMP_TARGET','level','includes','MISSING_ACTIVATION_DEFINITION','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.name','.type','1249004oFlvZh','3693445RwiSei','segments','condition\x20of\x20\x27','End\x20step\x20\x27','branches','sort','INSUFFICIENT_STEPS','reduce','\x27\x20has\x20no\x20exit_criteria\x20defined','2328496RiCBUb','abs','warning','rule','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','A/B\x20test\x20variant\x20\x27','wait','\x20with\x20latest:\x20true','.segment','safeParse','end','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.rule','path','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','BRANCH_DIRECTLY_TO_MERGE','JOURNEY_SCHEMA_ERROR','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.with.condition.next',').\x20Merge\x20is\x20unnecessary.','code','startsWith','INVALID_NEXT_REFERENCE','18SFSrql','error','activation','has','Embedded\x20segment\x20\x27','DUPLICATE_LATEST','.next','symbol','\x20stages\x20but\x20maximum\x20is\x20','END_STEP_HAS_NEXT_OR_WITH','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','length','match','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','exit_criteria','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','some','activations','version','8932416HfphaM','Merge\x20step\x20\x27','map','get','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','launched','document','Journey\x20has\x20no\x20goal\x20defined','condition','MISSING_STAGES','size','.steps[','ab_test','keys','activationKeys','timeout\x20of\x20\x27','join','.with.condition.segment','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20has\x20no\x20end\x20step','.exit_criteria','stages[','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','stages','MERGE_TO_MERGE_CHAIN','247198sjborL','MISSING_GOAL','step\x20\x27','.with.variants','.with.branches','push','splice','.with.condition.timeout.next','journeys','Activation\x20step\x20requires\x20an\x20activation\x20reference','Jump\x20step\x20requires\x20a\x20target','journeys,\x20stages,\x20or\x20versions'];a146_0x1646=function(){return _0x310623;};return a146_0x1646();}function createIssue(_0x404083,_0x160808,_0x38fc89,_0x3e49d9,_0x2768d4,_0x5b9da6){const _0x1ceb5e=a146_0x2757;return{'level':_0x404083,'path':_0x160808,'code':_0x38fc89,'message':_0x3e49d9,'location':getLocationFromPath(_0x2768d4[_0x1ceb5e(0x1a8)],_0x2768d4[_0x1ceb5e(0x14a)],pathToArray(_0x5b9da6??_0x160808))};}function validateVersionStructure(_0x6a2919,_0x267e0e){const _0x5040e6=a146_0x2757,_0xa6b840=[];return _0x6a2919['length']>MAX_STAGES&&_0xa6b840['push'](createIssue(_0x5040e6(0x18e),'stages','TOO_MANY_STAGES',_0x5040e6(0x142)+_0x6a2919['length']+_0x5040e6(0x195)+MAX_STAGES,_0x267e0e)),_0xa6b840;}function validateStageStructure(_0xf9d9f8,_0x554757,_0x101ef7,_0xd7c96a){const _0x51d88a=a146_0x2757,_0x42e123=[],_0x568902='stages['+_0x554757+']';_0x554757===0x0&&!_0xf9d9f8[_0x51d88a(0x1d2)]&&_0x42e123[_0x51d88a(0x1c0)](createIssue(_0x51d88a(0x18e),_0x568902+_0x51d88a(0x1d0),_0x51d88a(0x1db),_0x51d88a(0x164)+_0xf9d9f8[_0x51d88a(0x15c)]+_0x51d88a(0x160),_0xd7c96a,_0x568902));const _0x32c221=_0x554757===_0x101ef7-0x1;!_0x32c221&&!_0xf9d9f8[_0x51d88a(0x1d5)]&&_0x42e123[_0x51d88a(0x1c0)](createIssue('error',_0x568902+_0x51d88a(0x151),_0x51d88a(0x1da),_0x51d88a(0x164)+_0xf9d9f8[_0x51d88a(0x15c)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0xd7c96a,_0x568902));(!_0xf9d9f8[_0x51d88a(0x19c)]||_0xf9d9f8['exit_criteria'][_0x51d88a(0x198)]===0x0)&&_0x42e123[_0x51d88a(0x1c0)](createIssue(_0x51d88a(0x178),_0x568902+_0x51d88a(0x1b6),'MISSING_EXIT_CRITERIA',_0x51d88a(0x164)+_0xf9d9f8[_0x51d88a(0x15c)]+_0x51d88a(0x175),_0xd7c96a,_0x568902));const _0x50281f=_0xf9d9f8[_0x51d88a(0x147)]?.[_0x51d88a(0x198)]??0x0;if(_0x50281f===0x0)_0x42e123[_0x51d88a(0x1c0)](createIssue(_0x51d88a(0x18e),_0x568902+_0x51d88a(0x138),'INSUFFICIENT_STEPS',_0x51d88a(0x164)+_0xf9d9f8[_0x51d88a(0x15c)]+_0x51d88a(0x1e9),_0xd7c96a,_0x568902+_0x51d88a(0x138)));else{if(_0x50281f===0x1)_0x42e123[_0x51d88a(0x1c0)](createIssue(_0x51d88a(0x178),_0x568902+_0x51d88a(0x138),_0x51d88a(0x173),'Stage\x20\x27'+_0xf9d9f8[_0x51d88a(0x15c)]+_0x51d88a(0x17a),_0xd7c96a,_0x568902+_0x51d88a(0x138)));else _0x50281f<=0x3&&_0x42e123[_0x51d88a(0x1c0)](createIssue(_0x51d88a(0x178),_0x568902+_0x51d88a(0x138),_0x51d88a(0x1cd),'Stage\x20\x27'+_0xf9d9f8[_0x51d88a(0x15c)]+_0x51d88a(0x136)+_0x50281f+_0x51d88a(0x1d3),_0xd7c96a,_0x568902+_0x51d88a(0x138)));}return _0x42e123;}function validateStep(_0x32980c,_0x495645,_0x560603,_0x35fc35){const _0x153658=a146_0x2757,_0x40ca5b=[];if(_0x32980c[_0x153658(0x15f)]===_0x153658(0x180))return _0x32980c[_0x153658(0x1cb)]&&_0x40ca5b[_0x153658(0x1c0)](createIssue(_0x153658(0x18e),_0x495645+_0x153658(0x193),_0x153658(0x196),_0x153658(0x170)+_0x32980c[_0x153658(0x15c)]+_0x153658(0x19a),_0x560603)),'with'in _0x32980c&&_0x32980c['with']!==undefined&&_0x40ca5b[_0x153658(0x1c0)](createIssue(_0x153658(0x18e),_0x495645+_0x153658(0x13c),'END_STEP_HAS_NEXT_OR_WITH','End\x20step\x20\x27'+_0x32980c[_0x153658(0x15c)]+_0x153658(0x145),_0x560603)),_0x40ca5b;_0x32980c[_0x153658(0x1cb)]&&(_0x560603['stepNames']&&!_0x560603[_0x153658(0x137)]['has'](_0x32980c['next'])&&_0x40ca5b[_0x153658(0x1c0)](createIssue(_0x153658(0x18e),_0x495645+_0x153658(0x193),'INVALID_NEXT_REFERENCE','Step\x20references\x20non-existent\x20step\x20\x27'+_0x32980c[_0x153658(0x1cb)]+'\x27',_0x560603)));switch(_0x32980c[_0x153658(0x15f)]){case _0x153658(0x17c):_0x40ca5b[_0x153658(0x1c0)](...validateWaitStep(_0x32980c,_0x495645,_0x560603,_0x35fc35));break;case _0x153658(0x18f):_0x40ca5b[_0x153658(0x1c0)](...validateActivationStep(_0x32980c,_0x495645,_0x560603));break;case _0x153658(0x13a):_0x40ca5b[_0x153658(0x1c0)](...validateDecisionPointStep(_0x32980c,_0x495645,_0x560603,_0x35fc35));break;case _0x153658(0x1ae):_0x40ca5b[_0x153658(0x1c0)](...validateAbTestStep(_0x32980c,_0x495645,_0x560603,_0x35fc35));break;case _0x153658(0x15a):_0x40ca5b[_0x153658(0x1c0)](...validateJumpStep(_0x32980c,_0x495645,_0x560603));break;}return _0x40ca5b;}function validateWaitStep(_0x10a7f1,_0x1bcef9,_0x123088,_0xa8826e){const _0x5f06f4=a146_0x2757,_0x1c4f20=[];if(!_0x10a7f1[_0x5f06f4(0x144)])return _0x1c4f20['push'](createIssue(_0x5f06f4(0x18e),_0x1bcef9+_0x5f06f4(0x13c),'MISSING_WAIT_PARAMS',_0x5f06f4(0x1b8),_0x123088,_0x1bcef9)),_0x1c4f20;if(_0x10a7f1[_0x5f06f4(0x144)][_0x5f06f4(0x1aa)]){const _0x3254ed=_0x10a7f1[_0x5f06f4(0x144)][_0x5f06f4(0x1aa)];if(_0x3254ed['segment']){_0x123088[_0x5f06f4(0x1e7)]?.[_0x5f06f4(0x1e4)](_0x3254ed[_0x5f06f4(0x1d9)]);!_0x3254ed[_0x5f06f4(0x1d9)]['startsWith'](_0x5f06f4(0x163))&&(_0x123088[_0x5f06f4(0x154)]&&!_0x123088['embeddedSegments'][_0x5f06f4(0x190)](_0x3254ed['segment'])&&_0x1c4f20[_0x5f06f4(0x1c0)](createIssue(_0x5f06f4(0x18e),_0x1bcef9+_0x5f06f4(0x1b3),_0x5f06f4(0x14b),_0x5f06f4(0x19b)+_0x3254ed['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x123088)));_0x3254ed[_0x5f06f4(0x1cb)]&&_0x123088[_0x5f06f4(0x137)]&&!_0x123088[_0x5f06f4(0x137)][_0x5f06f4(0x190)](_0x3254ed[_0x5f06f4(0x1cb)])&&_0x1c4f20[_0x5f06f4(0x1c0)](createIssue(_0x5f06f4(0x18e),_0x1bcef9+'.with.condition.next',_0x5f06f4(0x18c),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x3254ed[_0x5f06f4(0x1cb)]+'\x27',_0x123088));_0x3254ed[_0x5f06f4(0x1c7)]?.[_0x5f06f4(0x1cb)]&&_0x123088[_0x5f06f4(0x137)]&&!_0x123088['stepNames'][_0x5f06f4(0x190)](_0x3254ed[_0x5f06f4(0x1c7)][_0x5f06f4(0x1cb)])&&_0x1c4f20[_0x5f06f4(0x1c0)](createIssue(_0x5f06f4(0x18e),_0x1bcef9+_0x5f06f4(0x1c2),_0x5f06f4(0x18c),_0x5f06f4(0x14c)+_0x3254ed[_0x5f06f4(0x1c7)][_0x5f06f4(0x1cb)]+'\x27',_0x123088));const _0x17a25e=_0x3254ed[_0x5f06f4(0x1cb)]||_0x10a7f1['next'],_0x40dd31=_0x3254ed[_0x5f06f4(0x1c7)]?.[_0x5f06f4(0x1cb)]||_0x10a7f1['next'];if(_0x17a25e){const _0x39588e=_0xa8826e['get'](_0x17a25e);_0x39588e?.[_0x5f06f4(0x15f)]===_0x5f06f4(0x1e1)&&_0x1c4f20['push'](createIssue('warning',_0x1bcef9+_0x5f06f4(0x188),'BRANCH_DIRECTLY_TO_MERGE',_0x5f06f4(0x1d6)+_0x17a25e+_0x5f06f4(0x197),_0x123088,_0x1bcef9+'.with.condition'));}if(_0x40dd31){const _0x524eae=_0xa8826e[_0x5f06f4(0x1a5)](_0x40dd31);_0x524eae?.[_0x5f06f4(0x15f)]===_0x5f06f4(0x1e1)&&_0x1c4f20[_0x5f06f4(0x1c0)](createIssue(_0x5f06f4(0x178),_0x1bcef9+_0x5f06f4(0x1c2),_0x5f06f4(0x185),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x40dd31+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x123088,_0x1bcef9+_0x5f06f4(0x1d7)));}}}return _0x1c4f20;}function validateActivationStep(_0x2736b1,_0x311676,_0xdd0e3e){const _0x405e87=a146_0x2757,_0x5d353d=[];if(!_0x2736b1[_0x405e87(0x144)]?.[_0x405e87(0x18f)])return _0x5d353d['push'](createIssue('error',_0x311676+_0x405e87(0x13d),_0x405e87(0x14d),_0x405e87(0x1c4),_0xdd0e3e,_0x311676)),_0x5d353d;const _0xeb49c0=_0x2736b1[_0x405e87(0x144)][_0x405e87(0x18f)];return _0xdd0e3e[_0x405e87(0x1b0)]&&!_0xeb49c0['startsWith'](_0x405e87(0x163))&&(!_0xdd0e3e[_0x405e87(0x1b0)][_0x405e87(0x190)](_0xeb49c0)&&_0x5d353d[_0x405e87(0x1c0)](createIssue(_0x405e87(0x18e),_0x311676+_0x405e87(0x13d),_0x405e87(0x168),_0x405e87(0x1ca)+_0xeb49c0+_0x405e87(0x181),_0xdd0e3e))),_0x5d353d;}function validateDecisionPointStep(_0x19fbef,_0x53a850,_0x292d82,_0x3c2acf){const _0x5da660=a146_0x2757,_0x1b8009=[];if(!_0x19fbef[_0x5da660(0x144)]?.[_0x5da660(0x171)]||_0x19fbef['with'][_0x5da660(0x171)][_0x5da660(0x198)]===0x0)return _0x1b8009['push'](createIssue(_0x5da660(0x18e),_0x53a850+_0x5da660(0x1bf),'MISSING_CONDITIONS',_0x5da660(0x187),_0x292d82,_0x53a850)),_0x1b8009;for(let _0x1cfab7=0x0;_0x1cfab7<_0x19fbef[_0x5da660(0x144)]['branches']['length'];_0x1cfab7++){const _0x3b0057=_0x19fbef[_0x5da660(0x144)][_0x5da660(0x171)][_0x1cfab7],_0xa288a0=_0x53a850+'.with.branches['+_0x1cfab7+']';_0x3b0057['segment']&&!_0x3b0057['excluded']&&(_0x292d82[_0x5da660(0x1e7)]?.[_0x5da660(0x1e4)](_0x3b0057[_0x5da660(0x1d9)]),!_0x3b0057['segment'][_0x5da660(0x18b)](_0x5da660(0x163))&&(_0x292d82[_0x5da660(0x154)]&&!_0x292d82[_0x5da660(0x154)]['has'](_0x3b0057[_0x5da660(0x1d9)])&&_0x1b8009[_0x5da660(0x1c0)](createIssue(_0x5da660(0x18e),_0xa288a0+_0x5da660(0x17e),_0x5da660(0x14b),_0x5da660(0x13b)+_0x3b0057[_0x5da660(0x1d9)]+'\x27',_0x292d82))));_0x3b0057[_0x5da660(0x1cb)]&&_0x292d82['stepNames']&&!_0x292d82['stepNames'][_0x5da660(0x190)](_0x3b0057[_0x5da660(0x1cb)])&&_0x1b8009[_0x5da660(0x1c0)](createIssue(_0x5da660(0x18e),_0xa288a0+_0x5da660(0x193),'INVALID_NEXT_REFERENCE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x3b0057['next']+'\x27',_0x292d82));if(_0x3b0057[_0x5da660(0x1cb)]){const _0x31a513=_0x3c2acf[_0x5da660(0x1a5)](_0x3b0057[_0x5da660(0x1cb)]);_0x31a513?.[_0x5da660(0x15f)]===_0x5da660(0x1e1)&&_0x1b8009[_0x5da660(0x1c0)](createIssue('warning',_0xa288a0+_0x5da660(0x193),'BRANCH_DIRECTLY_TO_MERGE',_0x5da660(0x1c8)+_0x3b0057[_0x5da660(0x15c)]+_0x5da660(0x153)+_0x3b0057[_0x5da660(0x1cb)]+_0x5da660(0x1e8),_0x292d82));}}return _0x1b8009;}function validateAbTestStep(_0x47af44,_0xef22ef,_0x50d21b,_0x38bf3e){const _0x5a055a=a146_0x2757,_0x19e299=[];if(!_0x47af44['with']?.[_0x5a055a(0x1d8)]||_0x47af44['with']['variants']['length']===0x0)return _0x19e299['push'](createIssue(_0x5a055a(0x18e),_0xef22ef+_0x5a055a(0x1be),'MISSING_CONDITIONS',_0x5a055a(0x1a6),_0x50d21b,_0xef22ef)),_0x19e299;const _0x1ee2d7=_0x47af44[_0x5a055a(0x144)][_0x5a055a(0x1d8)][_0x5a055a(0x174)]((_0x28cac9,_0x2c76db)=>_0x28cac9+(_0x2c76db[_0x5a055a(0x150)]||0x0),0x0);Math[_0x5a055a(0x177)](_0x1ee2d7-0x64)>0.01&&_0x19e299[_0x5a055a(0x1c0)](createIssue('error',_0xef22ef+_0x5a055a(0x1be),'INVALID_AB_TEST_PERCENTAGES',_0x5a055a(0x169)+_0x1ee2d7+'%)',_0x50d21b));for(let _0x4fef16=0x0;_0x4fef16<_0x47af44[_0x5a055a(0x144)][_0x5a055a(0x1d8)][_0x5a055a(0x198)];_0x4fef16++){const _0x243eda=_0x47af44['with']['variants'][_0x4fef16],_0x21c0e2=_0xef22ef+_0x5a055a(0x146)+_0x4fef16+']';_0x243eda[_0x5a055a(0x1cb)]&&_0x50d21b[_0x5a055a(0x137)]&&!_0x50d21b[_0x5a055a(0x137)]['has'](_0x243eda['next'])&&_0x19e299[_0x5a055a(0x1c0)](createIssue('error',_0x21c0e2+_0x5a055a(0x193),'INVALID_NEXT_REFERENCE',_0x5a055a(0x184)+_0x243eda[_0x5a055a(0x1cb)]+'\x27',_0x50d21b));if(_0x243eda['next']){const _0x64a25=_0x38bf3e[_0x5a055a(0x1a5)](_0x243eda[_0x5a055a(0x1cb)]);_0x64a25?.[_0x5a055a(0x15f)]==='merge'&&_0x19e299[_0x5a055a(0x1c0)](createIssue(_0x5a055a(0x178),_0x21c0e2+_0x5a055a(0x193),'BRANCH_DIRECTLY_TO_MERGE',_0x5a055a(0x17b)+_0x243eda['name']+_0x5a055a(0x153)+_0x243eda[_0x5a055a(0x1cb)]+_0x5a055a(0x1e8),_0x50d21b));}}return _0x19e299;}function validateJumpStep(_0x53f763,_0x20d918,_0x2ed2b3){const _0x274bf1=a146_0x2757,_0x50f767=[];if(!_0x53f763[_0x274bf1(0x144)]?.[_0x274bf1(0x141)])return _0x50f767[_0x274bf1(0x1c0)](createIssue(_0x274bf1(0x18e),_0x20d918+'.with.target',_0x274bf1(0x165),_0x274bf1(0x1c5),_0x2ed2b3,_0x20d918)),_0x50f767;return(!_0x53f763[_0x274bf1(0x144)][_0x274bf1(0x141)]['journey']||!_0x53f763['with'][_0x274bf1(0x141)][_0x274bf1(0x1de)])&&_0x50f767[_0x274bf1(0x1c0)](createIssue(_0x274bf1(0x18e),_0x20d918+_0x274bf1(0x1d1),'INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x2ed2b3)),_0x50f767;}function buildConvergenceMap(_0x1618d7){const _0x51bcf1=a146_0x2757,_0x71bd4b=new Map();function _0x3595e6(_0x515ff7,_0x4f60c9){const _0x3f79c9=a146_0x2757,_0x1eeeb6=_0x71bd4b[_0x3f79c9(0x1a5)](_0x515ff7)||[];_0x1eeeb6['push'](_0x4f60c9),_0x71bd4b[_0x3f79c9(0x156)](_0x515ff7,_0x1eeeb6);}for(const _0x254f8c of _0x1618d7){_0x254f8c[_0x51bcf1(0x1cb)]&&_0x3595e6(_0x254f8c['next'],{'stepName':_0x254f8c['name'],'description':_0x51bcf1(0x1bd)+_0x254f8c['name']+'\x27'});if(_0x254f8c['type']==='decision_point'&&_0x254f8c['with']?.['branches'])for(const _0x2b20e6 of _0x254f8c['with']['branches']){_0x2b20e6['next']&&_0x3595e6(_0x2b20e6[_0x51bcf1(0x1cb)],{'stepName':_0x254f8c[_0x51bcf1(0x15c)],'description':_0x51bcf1(0x140)+_0x2b20e6[_0x51bcf1(0x15c)]+_0x51bcf1(0x157)+_0x254f8c[_0x51bcf1(0x15c)]+'\x27'});}if(_0x254f8c[_0x51bcf1(0x15f)]===_0x51bcf1(0x1ae)&&_0x254f8c[_0x51bcf1(0x144)]?.[_0x51bcf1(0x1d8)])for(const _0x9d80a7 of _0x254f8c[_0x51bcf1(0x144)][_0x51bcf1(0x1d8)]){_0x9d80a7[_0x51bcf1(0x1cb)]&&_0x3595e6(_0x9d80a7[_0x51bcf1(0x1cb)],{'stepName':_0x254f8c[_0x51bcf1(0x15c)],'description':'variant\x20\x27'+_0x9d80a7[_0x51bcf1(0x15c)]+_0x51bcf1(0x157)+_0x254f8c[_0x51bcf1(0x15c)]+'\x27'});}_0x254f8c['type']===_0x51bcf1(0x17c)&&_0x254f8c[_0x51bcf1(0x144)]?.[_0x51bcf1(0x1aa)]&&(_0x254f8c[_0x51bcf1(0x144)][_0x51bcf1(0x1aa)]['next']&&_0x3595e6(_0x254f8c[_0x51bcf1(0x144)]['condition'][_0x51bcf1(0x1cb)],{'stepName':_0x254f8c['name'],'description':_0x51bcf1(0x16f)+_0x254f8c[_0x51bcf1(0x15c)]+'\x27'}),_0x254f8c['with']['condition'][_0x51bcf1(0x1c7)]?.['next']&&_0x3595e6(_0x254f8c[_0x51bcf1(0x144)][_0x51bcf1(0x1aa)][_0x51bcf1(0x1c7)][_0x51bcf1(0x1cb)],{'stepName':_0x254f8c[_0x51bcf1(0x15c)],'description':_0x51bcf1(0x1b1)+_0x254f8c[_0x51bcf1(0x15c)]+'\x27'}));}return _0x71bd4b;}function validateFlowControl(_0x3d8113,_0x4eb6e1,_0x535992){const _0x582bb5=a146_0x2757,_0x2798e2=[],_0x11032b=_0x582bb5(0x1b7)+_0x4eb6e1+']',_0x5bf7ba=_0x3d8113[_0x582bb5(0x147)]||[];if(_0x5bf7ba[_0x582bb5(0x198)]===0x0)return _0x2798e2;const _0x2d5a43=new Map();for(const _0x5cd79a of _0x5bf7ba){_0x5cd79a[_0x582bb5(0x15c)]&&_0x2d5a43[_0x582bb5(0x156)](_0x5cd79a[_0x582bb5(0x15c)],_0x5cd79a);}const _0x3da87c=buildConvergenceMap(_0x5bf7ba),_0x508e52=_0x5bf7ba[_0x582bb5(0x19f)](_0x45e70=>_0x45e70[_0x582bb5(0x15f)]===_0x582bb5(0x180));!_0x508e52&&_0x2798e2['push'](createIssue(_0x582bb5(0x18e),_0x11032b+_0x582bb5(0x138),'MISSING_END_STEP',_0x582bb5(0x164)+_0x3d8113[_0x582bb5(0x15c)]+_0x582bb5(0x1b5),_0x535992));for(const [_0x3b1cb7,_0x39c19e]of _0x3da87c){const _0x3a9ba1=_0x2d5a43[_0x582bb5(0x1a5)](_0x3b1cb7);if(!_0x3a9ba1)continue;if(_0x39c19e['length']>0x1&&_0x3a9ba1['type']!==_0x582bb5(0x1e1)){const _0xdac524=_0x39c19e['map'](_0x5af7e8=>_0x5af7e8[_0x582bb5(0x1dd)])[_0x582bb5(0x1b2)](',\x20');_0x2798e2[_0x582bb5(0x1c0)](createIssue(_0x582bb5(0x18e),_0x11032b+_0x582bb5(0x138),_0x582bb5(0x1e0),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x3b1cb7+_0x582bb5(0x15e)+_0xdac524+_0x582bb5(0x1cc),_0x535992));}_0x39c19e['length']===0x1&&_0x3a9ba1[_0x582bb5(0x15f)]===_0x582bb5(0x1e1)&&_0x2798e2[_0x582bb5(0x1c0)](createIssue(_0x582bb5(0x178),_0x11032b+'.steps',_0x582bb5(0x158),_0x582bb5(0x1a3)+_0x3b1cb7+_0x582bb5(0x19e)+_0x39c19e[0x0][_0x582bb5(0x1dd)]+_0x582bb5(0x189),_0x535992));}for(const _0x2f571f of _0x5bf7ba){if(_0x2f571f['type']===_0x582bb5(0x1e1)&&_0x2f571f[_0x582bb5(0x1cb)]){const _0x10f017=_0x2d5a43[_0x582bb5(0x1a5)](_0x2f571f['next']);_0x10f017?.[_0x582bb5(0x15f)]===_0x582bb5(0x1e1)&&_0x2798e2[_0x582bb5(0x1c0)](createIssue(_0x582bb5(0x18e),_0x11032b+_0x582bb5(0x138),_0x582bb5(0x1ba),_0x582bb5(0x1a3)+_0x2f571f[_0x582bb5(0x15c)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x2f571f[_0x582bb5(0x1cb)]+_0x582bb5(0x1cf),_0x535992));}}return _0x2798e2;}function validateCriteria(_0x14e0fb,_0x1975f7,_0x3f4b3a){const _0x3d8f61=a146_0x2757,_0x536450=[];return _0x14e0fb[_0x3d8f61(0x1d9)]&&(_0x3f4b3a['referencedSegments']?.[_0x3d8f61(0x1e4)](_0x14e0fb[_0x3d8f61(0x1d9)]),!_0x14e0fb['segment'][_0x3d8f61(0x18b)]('ref:')&&(_0x3f4b3a['embeddedSegments']&&!_0x3f4b3a[_0x3d8f61(0x154)][_0x3d8f61(0x190)](_0x14e0fb[_0x3d8f61(0x1d9)])&&_0x536450[_0x3d8f61(0x1c0)](createIssue(_0x3d8f61(0x18e),_0x1975f7+_0x3d8f61(0x17e),_0x3d8f61(0x14b),_0x3d8f61(0x1b4)+_0x14e0fb[_0x3d8f61(0x1d9)]+'\x27',_0x3f4b3a)))),_0x536450;}function validateEmbeddedSegment(_0x40d853,_0x565746,_0x1a59c0){const _0x28e154=a146_0x2757,_0x3b0f4c=[];return _0x40d853[_0x28e154(0x179)]&&_0x3b0f4c['push'](...validateRuleDef(_0x40d853['rule'],_0x565746+_0x28e154(0x182),_0x1a59c0)),_0x3b0f4c;}function validateStage(_0x54ece4,_0x38ae6a,_0x55732a,_0xc8c2f){const _0x15ddd5=a146_0x2757,_0x44824a=[],_0x5e55e4=_0x15ddd5(0x1b7)+_0x38ae6a+']',_0x3e047c=new Map(),_0x3f9d02=new Map();if(_0x54ece4[_0x15ddd5(0x147)]){for(let _0x4e8a90=0x0;_0x4e8a90<_0x54ece4[_0x15ddd5(0x147)][_0x15ddd5(0x198)];_0x4e8a90++){const _0x3c5a2f=_0x54ece4[_0x15ddd5(0x147)][_0x4e8a90];_0x3c5a2f[_0x15ddd5(0x15c)]&&_0x3e047c['set'](_0x3c5a2f['name'],_0x3c5a2f);}for(let _0x4b00b1=0x0;_0x4b00b1<_0x54ece4[_0x15ddd5(0x147)]['length'];_0x4b00b1++){const _0x4c1599=_0x54ece4['steps'][_0x4b00b1],_0xc18b33=_0x5e55e4+_0x15ddd5(0x1ad)+_0x4b00b1+']';if(_0x4c1599[_0x15ddd5(0x15c)]){if(_0x3f9d02['has'](_0x4c1599[_0x15ddd5(0x15c)])){const _0x55e2da=_0x3f9d02['get'](_0x4c1599[_0x15ddd5(0x15c)]);_0x44824a['push'](createIssue(_0x15ddd5(0x18e),_0xc18b33+_0x15ddd5(0x16a),_0x15ddd5(0x14f),'Duplicate\x20step\x20name\x20\x27'+_0x4c1599[_0x15ddd5(0x15c)]+_0x15ddd5(0x1c9)+_0x55e2da+'])',_0xc8c2f));}else _0x3f9d02[_0x15ddd5(0x156)](_0x4c1599[_0x15ddd5(0x15c)],_0x4b00b1);}_0x44824a[_0x15ddd5(0x1c0)](...validateStep(_0x4c1599,_0xc18b33,_0xc8c2f,_0x3e047c));}}_0x54ece4[_0x15ddd5(0x1d2)]&&_0x44824a['push'](...validateCriteria(_0x54ece4['entry_criteria'],_0x5e55e4+_0x15ddd5(0x1d0),_0xc8c2f));if(_0x54ece4['exit_criteria'])for(let _0x228c3f=0x0;_0x228c3f<_0x54ece4[_0x15ddd5(0x19c)][_0x15ddd5(0x198)];_0x228c3f++){_0x44824a[_0x15ddd5(0x1c0)](...validateCriteria(_0x54ece4[_0x15ddd5(0x19c)][_0x228c3f],_0x5e55e4+_0x15ddd5(0x159)+_0x228c3f+']',_0xc8c2f));}return _0x54ece4[_0x15ddd5(0x1d5)]&&_0x44824a[_0x15ddd5(0x1c0)](...validateCriteria(_0x54ece4['milestone'],_0x5e55e4+_0x15ddd5(0x151),_0xc8c2f)),_0x44824a['push'](...validateStageStructure(_0x54ece4,_0x38ae6a,_0x55732a,_0xc8c2f)),_0x44824a['push'](...validateFlowControl(_0x54ece4,_0x38ae6a,_0xc8c2f)),_0x44824a;}function validateStagesForVersion(_0x6db0b,_0x3511b4,_0x1d4e49,_0x3254e7,_0x1d8092,_0x1d6356,_0x38a11f){const _0x4ad9c0=a146_0x2757;if(_0x6db0b['length']===0x0){_0x1d8092[_0x4ad9c0(0x1c0)]({'level':'error','path':_0x3254e7+_0x4ad9c0(0x1b9),'code':_0x4ad9c0(0x1ab),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x1d4e49[_0x4ad9c0(0x1a8)],_0x1d4e49[_0x4ad9c0(0x14a)],[_0x4ad9c0(0x1b9)])});return;}const _0x329fad=new Set();for(const _0x172d81 of _0x6db0b){if(_0x172d81[_0x4ad9c0(0x147)])for(const _0x298e8c of _0x172d81['steps']){_0x298e8c[_0x4ad9c0(0x15c)]&&_0x329fad[_0x4ad9c0(0x1e4)](_0x298e8c[_0x4ad9c0(0x15c)]);}}const _0x55efda={..._0x1d4e49,'stepNames':_0x329fad},_0x3215b3=validateVersionStructure(_0x6db0b,_0x55efda);for(const _0x3e496e of _0x3215b3){const _0x432692=_0x3254e7?{..._0x3e496e,'path':''+_0x3254e7+_0x3e496e['path']}:_0x3e496e;if(_0x432692['level']===_0x4ad9c0(0x18e))_0x1d8092[_0x4ad9c0(0x1c0)](_0x432692);else _0x1d6356[_0x4ad9c0(0x1c0)](_0x432692);}for(let _0x2f8c70=0x0;_0x2f8c70<_0x6db0b[_0x4ad9c0(0x198)];_0x2f8c70++){const _0x5498a2=validateStage(_0x6db0b[_0x2f8c70],_0x2f8c70,_0x6db0b[_0x4ad9c0(0x198)],_0x55efda);for(const _0x1e94b1 of _0x5498a2){const _0x5bcdea=_0x3254e7?{..._0x1e94b1,'path':''+_0x3254e7+_0x1e94b1[_0x4ad9c0(0x183)]}:_0x1e94b1;if(_0x5bcdea[_0x4ad9c0(0x166)]===_0x4ad9c0(0x18e))_0x1d8092['push'](_0x5bcdea);else _0x1d6356[_0x4ad9c0(0x1c0)](_0x5bcdea);}}if(_0x3511b4[_0x4ad9c0(0x139)]){const _0x3b954e=_0x38a11f?.['goalIsInherited']?_0x4ad9c0(0x139):_0x3254e7+_0x4ad9c0(0x139),_0x35117c=validateCriteria(_0x3511b4[_0x4ad9c0(0x139)],_0x3b954e,_0x55efda);for(const _0x41c138 of _0x35117c){if(_0x41c138['level']===_0x4ad9c0(0x18e))_0x1d8092[_0x4ad9c0(0x1c0)](_0x41c138);else _0x1d6356[_0x4ad9c0(0x1c0)](_0x41c138);}}}function extractVersionIndex(_0xf2cfc9){const _0x5ce4b1=a146_0x2757,_0x39a153=_0xf2cfc9[_0x5ce4b1(0x199)](/^journeys\[(\d+)\]\./);return _0x39a153?_0x39a153[0x1]:undefined;}function deduplicateAcrossVersions(_0x32232b){const _0x4c88d5=a146_0x2757,_0x4ea6f9=new Map();for(let _0x3d60c8=0x0;_0x3d60c8<_0x32232b['length'];_0x3d60c8++){const _0x1406f9=_0x32232b[_0x3d60c8][_0x4c88d5(0x18a)]+':'+_0x32232b[_0x3d60c8][_0x4c88d5(0x1d4)],_0x3e8e47=extractVersionIndex(_0x32232b[_0x3d60c8][_0x4c88d5(0x183)]),_0x19b51b=_0x4ea6f9['get'](_0x1406f9);if(_0x19b51b){_0x19b51b[_0x4c88d5(0x1dc)][_0x4c88d5(0x1c0)](_0x3d60c8);if(_0x3e8e47)_0x19b51b['versions'][_0x4c88d5(0x1e4)](_0x3e8e47);}else _0x4ea6f9[_0x4c88d5(0x156)](_0x1406f9,{'indices':[_0x3d60c8],'versions':new Set(_0x3e8e47?[_0x3e8e47]:[])});}const _0x5d8685=new Set();for(const {indices:_0x902c5a,versions:_0x3a07e1}of _0x4ea6f9['values']()){if(_0x3a07e1[_0x4c88d5(0x1ac)]<=0x1)continue;const _0x23c316=_0x32232b[_0x902c5a[0x0]];_0x23c316[_0x4c88d5(0x183)]=_0x23c316[_0x4c88d5(0x183)]['replace'](/^journeys\[\d+\]\./,''),_0x23c316['message']=_0x23c316[_0x4c88d5(0x1d4)]+_0x4c88d5(0x1df)+_0x3a07e1[_0x4c88d5(0x1ac)]+'\x20versions)';for(let _0x62b3df=0x1;_0x62b3df<_0x902c5a[_0x4c88d5(0x198)];_0x62b3df++){_0x5d8685['add'](_0x902c5a[_0x62b3df]);}}const _0x197e98=[..._0x5d8685][_0x4c88d5(0x172)]((_0x1ba930,_0x5a814b)=>_0x5a814b-_0x1ba930);for(const _0x16b725 of _0x197e98){_0x32232b[_0x4c88d5(0x1c1)](_0x16b725,0x1);}}export function validateJourneyDef(_0x521070,_0x360772={},_0x489853={}){const _0x287333=a146_0x2757;if(_0x489853[_0x287333(0x162)])return runJourneySemanticChecks(_0x521070,_0x360772);const _0x307dc0=JourneyDefSchema[_0x287333(0x17f)](_0x521070);if(_0x307dc0['success'])return runJourneySemanticChecks(_0x307dc0['data'],_0x360772);return zodErrorsToJourneyValidationResult(_0x307dc0[_0x287333(0x18e)],_0x360772);}function zodErrorsToJourneyValidationResult(_0x53dee7,_0xd84428){const _0x199953=a146_0x2757,_0x398164=flattenZodIssues(_0x53dee7['issues']),_0x5061ba=_0x398164[_0x199953(0x1a4)](_0x28ddd3=>{const _0x251ca3=_0x199953,_0x1b3c3b=formatZodPath(_0x28ddd3[_0x251ca3(0x183)]),_0xe99dd2=mapJourneyZodIssueToCode(_0x28ddd3,_0x1b3c3b),_0x44f448=getLocationFromPath(_0xd84428[_0x251ca3(0x1a8)],_0xd84428[_0x251ca3(0x14a)],_0x28ddd3[_0x251ca3(0x183)][_0x251ca3(0x1a4)](_0x204e0f=>typeof _0x204e0f===_0x251ca3(0x194)?String(_0x204e0f):_0x204e0f));return{'level':_0x251ca3(0x18e),'path':_0x1b3c3b,'code':_0xe99dd2,'message':_0x28ddd3[_0x251ca3(0x1d4)],..._0x44f448&&{'location':_0x44f448}};});return{'valid':![],'errors':_0x5061ba,'warnings':[]};}function mapJourneyZodIssueToCode(_0xcf3ec8,_0x19932e){const _0x169dc9=a146_0x2757;if(_0x19932e===_0x169dc9(0x15c))return _0x169dc9(0x155);if(_0x19932e['endsWith'](_0x169dc9(0x16b))&&_0x19932e[_0x169dc9(0x167)]('steps'))return'JOURNEY_SCHEMA_ERROR';if(_0x19932e===_0x169dc9(0x1b9)||_0x19932e[_0x169dc9(0x161)]('.stages'))return _0x169dc9(0x1ab);if(_0x19932e===''&&_0xcf3ec8[_0x169dc9(0x1d4)]['includes'](_0x169dc9(0x1c6)))return'MISSING_STAGES';if(_0x19932e['includes'](_0x169dc9(0x18f)))return _0x169dc9(0x1ce);return _0x169dc9(0x186);}function runJourneySemanticChecks(_0x445b75,_0x597998){const _0x55b1aa=a146_0x2757,_0x56f2f1=[],_0x2eb337=[];(!_0x445b75['name']||_0x445b75[_0x55b1aa(0x15c)][_0x55b1aa(0x135)]()==='')&&_0x56f2f1[_0x55b1aa(0x1c0)]({'level':_0x55b1aa(0x18e),'path':_0x55b1aa(0x15c),'code':_0x55b1aa(0x155),'message':_0x55b1aa(0x15b),'location':getLocationFromPath(_0x597998['document'],_0x597998[_0x55b1aa(0x14a)],[_0x55b1aa(0x15c)])});const _0x4f8d93=new Set();if(_0x445b75['segments'])for(const _0xa19129 of Object[_0x55b1aa(0x1af)](_0x445b75[_0x55b1aa(0x16e)])){_0x4f8d93[_0x55b1aa(0x1e4)](_0xa19129);}const _0x255d0b=new Set();if(_0x445b75[_0x55b1aa(0x1a0)])for(const _0x4fe038 of Object[_0x55b1aa(0x1af)](_0x445b75[_0x55b1aa(0x1a0)])){_0x255d0b[_0x55b1aa(0x1e4)](_0x4fe038);}const _0x9542dc=new Set(),_0x41f7de={..._0x597998,'embeddedSegments':_0x4f8d93,'referencedSegments':_0x9542dc,'activationKeys':_0x255d0b[_0x55b1aa(0x1ac)]>0x0?_0x255d0b:undefined};if(_0x445b75[_0x55b1aa(0x16e)])for(const [_0x20cac3,_0x1701c9]of Object[_0x55b1aa(0x1ea)](_0x445b75[_0x55b1aa(0x16e)])){const _0x5cbb39=validateEmbeddedSegment(_0x1701c9,_0x55b1aa(0x13e)+_0x20cac3,_0x41f7de);for(const _0x1defe7 of _0x5cbb39){if(_0x1defe7[_0x55b1aa(0x166)]===_0x55b1aa(0x18e))_0x56f2f1[_0x55b1aa(0x1c0)](_0x1defe7);else _0x2eb337[_0x55b1aa(0x1c0)](_0x1defe7);}}const _0x2d629d=!!_0x445b75[_0x55b1aa(0x139)],_0x4a61ef=_0x445b75[_0x55b1aa(0x1c3)]?.[_0x55b1aa(0x1e3)](_0x414c28=>!!_0x414c28[_0x55b1aa(0x139)])??![];!_0x2d629d&&!_0x4a61ef&&_0x2eb337[_0x55b1aa(0x1c0)]({'level':'warning','path':_0x55b1aa(0x139),'code':_0x55b1aa(0x1bc),'message':_0x55b1aa(0x1a9),'location':getLocationFromPath(_0x597998[_0x55b1aa(0x1a8)],_0x597998[_0x55b1aa(0x14a)],['goal'])});const _0xf95359=_0x445b75['journeys']??_0x445b75[_0x55b1aa(0x15d)];if(_0xf95359&&_0xf95359[_0x55b1aa(0x1e2)](_0x3adb3a=>_0x3adb3a[_0x55b1aa(0x13f)]===!![])['length']>0x1){const _0x3af04e=_0x445b75[_0x55b1aa(0x1c3)]?_0x55b1aa(0x1c3):'versions';_0x56f2f1[_0x55b1aa(0x1c0)]({'level':_0x55b1aa(0x18e),'path':_0x3af04e,'code':_0x55b1aa(0x192),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x3af04e===_0x55b1aa(0x1c3)?_0x55b1aa(0x1e5):_0x55b1aa(0x1a1))+_0x55b1aa(0x17d),'location':getLocationFromPath(_0x597998['document'],_0x597998[_0x55b1aa(0x14a)],[_0x3af04e])});}if(_0x445b75[_0x55b1aa(0x1c3)]&&_0x445b75['journeys']['length']>0x0)for(let _0x38a046=0x0;_0x38a046<_0x445b75[_0x55b1aa(0x1c3)]['length'];_0x38a046++){const _0xd551b7=_0x445b75[_0x55b1aa(0x1c3)][_0x38a046];if(_0x445b75['journeys']['length']>0x1&&_0xd551b7[_0x55b1aa(0x143)]==='launched')continue;const _0x5ccae2=_0xd551b7[_0x55b1aa(0x1b9)]||[],_0x5806a5=_0x55b1aa(0x152)+_0x38a046+'].',_0xa947a1=!!_0xd551b7[_0x55b1aa(0x139)],_0x41683f=_0xa947a1?{..._0x445b75,'goal':_0xd551b7['goal']}:_0x445b75;validateStagesForVersion(_0x5ccae2,_0x41683f,_0x41f7de,_0x5806a5,_0x56f2f1,_0x2eb337,{'goalIsInherited':!_0xa947a1});}else{if(_0x445b75['versions']&&_0x445b75[_0x55b1aa(0x15d)]['length']>0x0)for(let _0x19847d=0x0;_0x19847d<_0x445b75[_0x55b1aa(0x15d)]['length'];_0x19847d++){const _0x5551c1=_0x445b75[_0x55b1aa(0x15d)][_0x19847d];if(_0x445b75[_0x55b1aa(0x15d)][_0x55b1aa(0x198)]>0x1&&_0x5551c1[_0x55b1aa(0x143)]===_0x55b1aa(0x1a7))continue;const _0x1b4f0f=_0x5551c1[_0x55b1aa(0x1b9)]||[],_0x261d5c='versions['+_0x19847d+'].';validateStagesForVersion(_0x1b4f0f,_0x445b75,_0x41f7de,_0x261d5c,_0x56f2f1,_0x2eb337);}else{const _0x3cbfb1=_0x445b75[_0x55b1aa(0x1b9)]||[];validateStagesForVersion(_0x3cbfb1,_0x445b75,_0x41f7de,'',_0x56f2f1,_0x2eb337);}}_0x445b75['journeys']&&_0x445b75[_0x55b1aa(0x1c3)][_0x55b1aa(0x198)]>0x1&&(deduplicateAcrossVersions(_0x56f2f1),deduplicateAcrossVersions(_0x2eb337));for(const _0x518900 of _0x4f8d93){!_0x9542dc[_0x55b1aa(0x190)](_0x518900)&&!_0x518900[_0x55b1aa(0x18b)](_0x55b1aa(0x1eb))&&_0x2eb337[_0x55b1aa(0x1c0)]({'level':_0x55b1aa(0x178),'path':_0x55b1aa(0x13e)+_0x518900,'code':_0x55b1aa(0x149),'message':_0x55b1aa(0x191)+_0x518900+_0x55b1aa(0x19d),'location':getLocationFromPath(_0x597998[_0x55b1aa(0x1a8)],_0x597998[_0x55b1aa(0x14a)],[_0x55b1aa(0x16e),_0x518900])});}return{'valid':_0x56f2f1[_0x55b1aa(0x198)]===0x0,'errors':_0x56f2f1,'warnings':_0x2eb337};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a147_0x2206(_0x5c105f,_0x2d2432){_0x5c105f=_0x5c105f-0x100;const _0x1f3589=a147_0x1f35();let _0x220621=_0x1f3589[_0x5c105f];return _0x220621;}const a147_0x3891ae=a147_0x2206;(function(_0x440611,_0x3e3a38){const _0x39e81a=a147_0x2206,_0x5234be=_0x440611();while(!![]){try{const _0x7b107=parseInt(_0x39e81a(0x104))/0x1*(parseInt(_0x39e81a(0x1b6))/0x2)+parseInt(_0x39e81a(0x15e))/0x3*(parseInt(_0x39e81a(0x174))/0x4)+parseInt(_0x39e81a(0x17e))/0x5*(parseInt(_0x39e81a(0x188))/0x6)+parseInt(_0x39e81a(0x19f))/0x7+parseInt(_0x39e81a(0x191))/0x8+-parseInt(_0x39e81a(0x168))/0x9*(-parseInt(_0x39e81a(0x135))/0xa)+-parseInt(_0x39e81a(0x1b1))/0xb;if(_0x7b107===_0x3e3a38)break;else _0x5234be['push'](_0x5234be['shift']());}catch(_0xd0245f){_0x5234be['push'](_0x5234be['shift']());}}}(a147_0x1f35,0x1b14a));import*as a147_0x136d49 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x410842){const _0x3f69b6=a147_0x2206,_0x1dbad1=_0x410842[_0x3f69b6(0x144)]();if(_0x1dbad1==='days'||_0x1dbad1==='day')return _0x3f69b6(0x125);if(_0x1dbad1===_0x3f69b6(0x1a9)||_0x1dbad1===_0x3f69b6(0x14c))return _0x3f69b6(0x14c);return _0x410842;}export function journeyResponseToDefSync(_0x2d51c4){const _0x277210=a147_0x2206,_0x1cfc8c=_0x2d51c4[_0x277210(0x16d)],_0x40ef61=_0x1cfc8c[_0x277210(0x117)]||_0x1cfc8c[_0x277210(0x167)],_0x274bf0={'stages':_0x1cfc8c['journeyStages'][_0x277210(0x122)](convertApiStageToYaml),'id':_0x2d51c4['id']};_0x1cfc8c[_0x277210(0x16a)]&&(_0x274bf0['goal']=convertApiCriteriaToYaml(_0x1cfc8c[_0x277210(0x16a)]));_0x1cfc8c[_0x277210(0x167)]&&_0x1cfc8c[_0x277210(0x167)]!==_0x40ef61&&(_0x274bf0['version']=_0x1cfc8c[_0x277210(0x167)]);_0x1cfc8c[_0x277210(0x13e)]!==undefined&&(_0x274bf0[_0x277210(0x156)]=_0x1cfc8c[_0x277210(0x13e)]);_0x1cfc8c[_0x277210(0x141)]&&(_0x274bf0[_0x277210(0x141)]=_0x1cfc8c[_0x277210(0x141)]===_0x277210(0x110)?_0x277210(0x110):_0x277210(0x158));const _0x12f37b={'type':_0x277210(0x107),'name':_0x40ef61,'journeys':[_0x274bf0]};_0x1cfc8c[_0x277210(0x1a7)]&&(_0x12f37b[_0x277210(0x1a7)]=_0x1cfc8c[_0x277210(0x1a7)]);_0x1cfc8c[_0x277210(0x16a)]&&(_0x12f37b[_0x277210(0x16a)]=convertApiCriteriaToYaml(_0x1cfc8c[_0x277210(0x16a)]));if(_0x1cfc8c[_0x277210(0x13c)])_0x12f37b[_0x277210(0x10e)]=_0x1cfc8c[_0x277210(0x13c)];else _0x1cfc8c[_0x277210(0x1b3)]!==undefined&&(_0x12f37b[_0x277210(0x10e)]=_0x1cfc8c[_0x277210(0x1b3)]?_0x277210(0x1a6):_0x277210(0x18a));return _0x1cfc8c['journeyBundleId']&&(_0x12f37b[_0x277210(0x118)]=_0x1cfc8c[_0x277210(0x114)]),_0x1cfc8c[_0x277210(0x117)]&&(_0x12f37b['bundle_name']=_0x1cfc8c['journeyBundleName']),_0x2d51c4[_0x277210(0x109)]?.[_0x277210(0x101)]?.['data']?.['id']&&(_0x12f37b['folder_id']=_0x2d51c4[_0x277210(0x109)][_0x277210(0x101)][_0x277210(0x148)]['id']),_0x12f37b;}export async function journeyResponseToDef(_0x271c5d,_0x11112a){const _0x1082fb=a147_0x2206,_0x50c459=journeyResponseToDefSync(_0x271c5d);if(!_0x11112a)return _0x50c459;const _0x43df54=new Set();collectSegmentIdsFromJourney(_0x50c459,_0x43df54);const _0xa1c7a7=new Set();collectActivationIdsFromJourney(_0x50c459,_0xa1c7a7);const _0x43b7b3={},_0x1d382b=new Map();for(const _0x97efd5 of Array['from'](_0x43df54)[_0x1082fb(0x139)]()){if(_0x11112a[_0x1082fb(0x19c)]){const _0x19d22f=await _0x11112a['resolveSegment'](_0x97efd5);if(_0x19d22f[_0x1082fb(0x153)]){_0x1d382b[_0x1082fb(0x146)](_0x97efd5,_0x19d22f[_0x1082fb(0x167)]);if(_0x19d22f[_0x1082fb(0x149)]){const _0x5c41f0={..._0x19d22f[_0x1082fb(0x149)],'rule':deepSortObject(_0x19d22f[_0x1082fb(0x149)][_0x1082fb(0x1af)])};_0x43b7b3[_0x19d22f[_0x1082fb(0x167)]]=_0x5c41f0;}}else _0x1d382b[_0x1082fb(0x146)](_0x97efd5,makeSegmentRef(_0x19d22f[_0x1082fb(0x167)]));}else{if(_0x11112a['resolveSegmentName']){const _0x5271a2=await _0x11112a[_0x1082fb(0x182)](_0x97efd5);_0x1d382b[_0x1082fb(0x146)](_0x97efd5,_0x5271a2);}}}const _0x261885={},_0x4caf3b=new Map();for(const _0x26a954 of Array[_0x1082fb(0x124)](_0xa1c7a7)[_0x1082fb(0x139)]()){if(_0x11112a[_0x1082fb(0x155)]){const _0xa4a9af=await _0x11112a[_0x1082fb(0x155)](_0x26a954);_0xa4a9af[_0x1082fb(0x153)]?(_0x4caf3b[_0x1082fb(0x146)](_0x26a954,_0xa4a9af['name']),_0xa4a9af[_0x1082fb(0x149)]&&(_0x261885[_0xa4a9af['name']]=_0xa4a9af[_0x1082fb(0x149)])):_0x4caf3b[_0x1082fb(0x146)](_0x26a954,makeSegmentRef(_0xa4a9af[_0x1082fb(0x167)]));}else{if(_0x11112a[_0x1082fb(0x18f)]){const _0x21408b=await _0x11112a[_0x1082fb(0x18f)](_0x26a954);_0x4caf3b[_0x1082fb(0x146)](_0x26a954,_0x21408b);}}}_0x1d382b[_0x1082fb(0x100)]>0x0&&replaceSegmentIdsInJourney(_0x50c459,_0x1d382b);_0x4caf3b['size']>0x0&&replaceActivationIdsInJourney(_0x50c459,_0x4caf3b);if(_0x11112a['resolveJumpTarget']){const _0x1fd142=[];collectJumpTargetsFromJourney(_0x50c459,_0x1fd142);if(_0x1fd142[_0x1082fb(0x1ba)]>0x0){const _0x5c4cbc=new Map();for(const _0x5ab0ef of _0x1fd142){try{const _0x463a27=await _0x11112a[_0x1082fb(0x12c)](_0x5ab0ef['journeyId'],_0x5ab0ef['stageId']);_0x5c4cbc[_0x1082fb(0x146)](_0x5ab0ef[_0x1082fb(0x18e)]+':'+_0x5ab0ef[_0x1082fb(0x187)],_0x463a27);}catch{}}_0x5c4cbc['size']>0x0&&replaceJumpTargetsInJourney(_0x50c459,_0x5c4cbc);}}return Object[_0x1082fb(0x14a)](_0x43b7b3)['length']>0x0&&(_0x50c459[_0x1082fb(0x1b0)]=_0x43b7b3),Object['keys'](_0x261885)['length']>0x0&&(_0x50c459['activations']=_0x261885),_0x50c459;}function collectSegmentIdsFromJourney(_0x35be95,_0x101d95){const _0x14abb4=a147_0x2206;_0x35be95[_0x14abb4(0x16a)]?.[_0x14abb4(0x10d)]&&_0x101d95[_0x14abb4(0x181)](_0x35be95[_0x14abb4(0x16a)][_0x14abb4(0x10d)]);const _0x4b8803=_0x45d9b3=>{const _0x4a69fb=_0x14abb4;for(const _0x4070ef of _0x45d9b3){_0x4070ef[_0x4a69fb(0x128)]?.[_0x4a69fb(0x10d)]&&_0x101d95[_0x4a69fb(0x181)](_0x4070ef[_0x4a69fb(0x128)]['segment']);if(_0x4070ef['exit_criteria'])for(const _0x4f7076 of _0x4070ef[_0x4a69fb(0x108)]){_0x4f7076['segment']&&_0x101d95['add'](_0x4f7076['segment']);}_0x4070ef[_0x4a69fb(0x142)]?.['segment']&&_0x101d95[_0x4a69fb(0x181)](_0x4070ef[_0x4a69fb(0x142)][_0x4a69fb(0x10d)]);if(_0x4070ef[_0x4a69fb(0x111)])for(const _0x2ce2b4 of _0x4070ef[_0x4a69fb(0x111)]){if(_0x2ce2b4[_0x4a69fb(0x19a)]===_0x4a69fb(0x143)){const _0x4cbbae=_0x2ce2b4;for(const _0x5cf2d7 of _0x4cbbae[_0x4a69fb(0x11c)][_0x4a69fb(0x178)]){_0x5cf2d7[_0x4a69fb(0x10d)]&&_0x101d95[_0x4a69fb(0x181)](_0x5cf2d7[_0x4a69fb(0x10d)]);}}else{if(_0x2ce2b4[_0x4a69fb(0x19a)]==='wait'){const _0x326816=_0x2ce2b4;_0x326816[_0x4a69fb(0x11c)]['condition']?.['segment']&&_0x101d95[_0x4a69fb(0x181)](_0x326816[_0x4a69fb(0x11c)][_0x4a69fb(0x19d)][_0x4a69fb(0x10d)]);}}}}};if(_0x35be95['journeys'])for(const _0x39ebfd of _0x35be95[_0x14abb4(0x175)]){_0x39ebfd[_0x14abb4(0x16a)]?.[_0x14abb4(0x10d)]&&_0x101d95[_0x14abb4(0x181)](_0x39ebfd[_0x14abb4(0x16a)][_0x14abb4(0x10d)]),_0x4b8803(_0x39ebfd[_0x14abb4(0x1a1)]);}_0x35be95[_0x14abb4(0x1a1)]&&_0x4b8803(_0x35be95[_0x14abb4(0x1a1)]);if(_0x35be95['versions'])for(const _0x144987 of _0x35be95[_0x14abb4(0x1a2)]){_0x4b8803(_0x144987[_0x14abb4(0x1a1)]);}}function replaceSegmentIdsInJourney(_0x163d45,_0x49a2a2){const _0x1790eb=a147_0x2206,_0x54d0f3=_0x7fc472=>_0x49a2a2[_0x1790eb(0x17a)](_0x7fc472)||_0x7fc472;_0x163d45['goal']?.[_0x1790eb(0x10d)]&&(_0x163d45[_0x1790eb(0x16a)][_0x1790eb(0x10d)]=_0x54d0f3(_0x163d45[_0x1790eb(0x16a)]['segment']));const _0xfde4c3=_0x583999=>{const _0x278b7f=_0x1790eb;for(const _0x106912 of _0x583999){_0x106912['entry_criteria']?.[_0x278b7f(0x10d)]&&(_0x106912[_0x278b7f(0x128)][_0x278b7f(0x10d)]=_0x54d0f3(_0x106912['entry_criteria'][_0x278b7f(0x10d)]));if(_0x106912[_0x278b7f(0x108)])for(const _0x46a5aa of _0x106912[_0x278b7f(0x108)]){_0x46a5aa[_0x278b7f(0x10d)]&&(_0x46a5aa[_0x278b7f(0x10d)]=_0x54d0f3(_0x46a5aa[_0x278b7f(0x10d)]));}_0x106912['milestone']?.[_0x278b7f(0x10d)]&&(_0x106912[_0x278b7f(0x142)][_0x278b7f(0x10d)]=_0x54d0f3(_0x106912[_0x278b7f(0x142)]['segment']));if(_0x106912[_0x278b7f(0x111)])for(const _0x52736e of _0x106912[_0x278b7f(0x111)]){if(_0x52736e[_0x278b7f(0x19a)]===_0x278b7f(0x143)){const _0x33768b=_0x52736e;for(const _0x4e7c07 of _0x33768b[_0x278b7f(0x11c)]['branches']){_0x4e7c07[_0x278b7f(0x10d)]&&(_0x4e7c07[_0x278b7f(0x10d)]=_0x54d0f3(_0x4e7c07[_0x278b7f(0x10d)]));}}else{if(_0x52736e[_0x278b7f(0x19a)]==='wait'){const _0x1bd8aa=_0x52736e;_0x1bd8aa[_0x278b7f(0x11c)][_0x278b7f(0x19d)]?.[_0x278b7f(0x10d)]&&(_0x1bd8aa[_0x278b7f(0x11c)][_0x278b7f(0x19d)][_0x278b7f(0x10d)]=_0x54d0f3(_0x1bd8aa[_0x278b7f(0x11c)][_0x278b7f(0x19d)][_0x278b7f(0x10d)]));}}}}};if(_0x163d45[_0x1790eb(0x175)])for(const _0x5de098 of _0x163d45['journeys']){_0x5de098[_0x1790eb(0x16a)]?.[_0x1790eb(0x10d)]&&(_0x5de098[_0x1790eb(0x16a)][_0x1790eb(0x10d)]=_0x54d0f3(_0x5de098[_0x1790eb(0x16a)][_0x1790eb(0x10d)])),_0xfde4c3(_0x5de098[_0x1790eb(0x1a1)]);}_0x163d45[_0x1790eb(0x1a1)]&&_0xfde4c3(_0x163d45[_0x1790eb(0x1a1)]);if(_0x163d45[_0x1790eb(0x1a2)])for(const _0x198a6c of _0x163d45[_0x1790eb(0x1a2)]){_0xfde4c3(_0x198a6c['stages']);}}function collectActivationIdsFromJourney(_0x1fe608,_0x4b7d2d){const _0x2b6576=a147_0x2206,_0x37bbb0=_0xfd747d=>{const _0x19c2f9=a147_0x2206;for(const _0x37433a of _0xfd747d){if(_0x37433a[_0x19c2f9(0x111)])for(const _0x2d4020 of _0x37433a[_0x19c2f9(0x111)]){if(_0x2d4020[_0x19c2f9(0x19a)]===_0x19c2f9(0x162)){const _0x3c6734=_0x2d4020;_0x3c6734[_0x19c2f9(0x11c)][_0x19c2f9(0x162)]&&/^\d+$/[_0x19c2f9(0x121)](_0x3c6734[_0x19c2f9(0x11c)][_0x19c2f9(0x162)])&&_0x4b7d2d[_0x19c2f9(0x181)](_0x3c6734['with'][_0x19c2f9(0x162)]);}}}};if(_0x1fe608[_0x2b6576(0x175)])for(const _0x317264 of _0x1fe608[_0x2b6576(0x175)]){_0x37bbb0(_0x317264[_0x2b6576(0x1a1)]);}_0x1fe608['stages']&&_0x37bbb0(_0x1fe608[_0x2b6576(0x1a1)]);if(_0x1fe608[_0x2b6576(0x1a2)])for(const _0x1cb5fe of _0x1fe608[_0x2b6576(0x1a2)]){_0x37bbb0(_0x1cb5fe[_0x2b6576(0x1a1)]);}}function replaceActivationIdsInJourney(_0x39bef0,_0x3d5392){const _0x1d23c9=a147_0x2206,_0x2061fa=_0x58c3b9=>_0x3d5392['get'](_0x58c3b9)||_0x58c3b9,_0x32f181=_0x62c1d8=>{const _0x52e6ee=a147_0x2206;for(const _0x2c0ab5 of _0x62c1d8){if(_0x2c0ab5[_0x52e6ee(0x111)])for(const _0x286cc8 of _0x2c0ab5[_0x52e6ee(0x111)]){if(_0x286cc8[_0x52e6ee(0x19a)]===_0x52e6ee(0x162)){const _0x20e3f3=_0x286cc8;_0x20e3f3[_0x52e6ee(0x11c)]['activation']&&(_0x20e3f3['with'][_0x52e6ee(0x162)]=_0x2061fa(_0x20e3f3[_0x52e6ee(0x11c)][_0x52e6ee(0x162)]));}}}};if(_0x39bef0[_0x1d23c9(0x175)])for(const _0x1d0728 of _0x39bef0[_0x1d23c9(0x175)]){_0x32f181(_0x1d0728[_0x1d23c9(0x1a1)]);}_0x39bef0[_0x1d23c9(0x1a1)]&&_0x32f181(_0x39bef0['stages']);if(_0x39bef0[_0x1d23c9(0x1a2)])for(const _0x53241e of _0x39bef0[_0x1d23c9(0x1a2)]){_0x32f181(_0x53241e[_0x1d23c9(0x1a1)]);}}function collectJumpTargetsFromJourney(_0x4de66c,_0x48ff7d){const _0x26219f=a147_0x2206,_0x506e50=new Set(),_0x4f8c78=_0x1a5069=>{const _0x38da56=a147_0x2206;for(const _0xdb0a06 of _0x1a5069){if(_0xdb0a06[_0x38da56(0x111)])for(const _0x1ca36f of _0xdb0a06[_0x38da56(0x111)]){if(_0x1ca36f['type']==='jump'){const _0x4d49ad=_0x1ca36f,_0xa76116=_0x4d49ad[_0x38da56(0x11c)]['target'];if(_0xa76116[_0x38da56(0x107)]&&_0xa76116[_0x38da56(0x14d)]&&/^\d+$/[_0x38da56(0x121)](_0xa76116[_0x38da56(0x107)])&&/^\d+$/[_0x38da56(0x121)](_0xa76116[_0x38da56(0x14d)])){const _0x168a8b=_0xa76116[_0x38da56(0x107)]+':'+_0xa76116[_0x38da56(0x14d)];!_0x506e50[_0x38da56(0x12b)](_0x168a8b)&&(_0x506e50['add'](_0x168a8b),_0x48ff7d[_0x38da56(0x151)]({'journeyId':_0xa76116['journey'],'stageId':_0xa76116[_0x38da56(0x14d)]}));}}}}};if(_0x4de66c[_0x26219f(0x175)])for(const _0x36689c of _0x4de66c[_0x26219f(0x175)]){_0x4f8c78(_0x36689c[_0x26219f(0x1a1)]);}_0x4de66c[_0x26219f(0x1a1)]&&_0x4f8c78(_0x4de66c[_0x26219f(0x1a1)]);if(_0x4de66c[_0x26219f(0x1a2)])for(const _0x483f57 of _0x4de66c[_0x26219f(0x1a2)]){_0x4f8c78(_0x483f57[_0x26219f(0x1a1)]);}}function replaceJumpTargetsInJourney(_0x1e4995,_0x5a330b){const _0x534e96=a147_0x2206,_0x30cbc9=_0x1e4747=>{const _0x1540b0=a147_0x2206;for(const _0x19d02d of _0x1e4747){if(_0x19d02d[_0x1540b0(0x111)])for(const _0x51de62 of _0x19d02d[_0x1540b0(0x111)]){if(_0x51de62[_0x1540b0(0x19a)]==='jump'){const _0x5d649d=_0x51de62,_0x207c2b=_0x5d649d[_0x1540b0(0x11c)][_0x1540b0(0x131)],_0x5e2890=_0x207c2b[_0x1540b0(0x107)]+':'+_0x207c2b[_0x1540b0(0x14d)],_0x4861d7=_0x5a330b[_0x1540b0(0x17a)](_0x5e2890);_0x4861d7&&(_0x207c2b[_0x1540b0(0x107)]=_0x4861d7[_0x1540b0(0x1ab)],_0x207c2b['stage']=_0x4861d7[_0x1540b0(0x197)]);}}}};if(_0x1e4995['journeys'])for(const _0x19ff2b of _0x1e4995[_0x534e96(0x175)]){_0x30cbc9(_0x19ff2b[_0x534e96(0x1a1)]);}_0x1e4995['stages']&&_0x30cbc9(_0x1e4995[_0x534e96(0x1a1)]);if(_0x1e4995[_0x534e96(0x1a2)])for(const _0x2c9c07 of _0x1e4995[_0x534e96(0x1a2)]){_0x30cbc9(_0x2c9c07[_0x534e96(0x1a1)]);}}function generateReadableStepName(_0x823c86,_0x3f1941){const _0x17f0c1=a147_0x2206;if(_0x823c86[_0x17f0c1(0x167)]&&_0x823c86[_0x17f0c1(0x167)]!==_0x823c86['type']){const _0x1778b6=_0x823c86[_0x17f0c1(0x167)][_0x17f0c1(0x123)]();if(_0x1778b6&&/[a-z0-9\p{L}]/iu[_0x17f0c1(0x121)](_0x1778b6))return _0x1778b6;}const _0x5b6a7d=_0x823c86[_0x17f0c1(0x19a)][_0x17f0c1(0x144)]()[_0x17f0c1(0x165)](/step$/i,'');return _0x5b6a7d+'_'+(_0x3f1941+0x1);}function getStepNextRefs(_0x3e0911){const _0x16e94c=a147_0x2206,_0x2b017a=[];if(_0x3e0911[_0x16e94c(0x133)])_0x2b017a[_0x16e94c(0x151)](_0x3e0911[_0x16e94c(0x133)]);if(_0x3e0911[_0x16e94c(0x178)])for(const _0x4479b2 of _0x3e0911[_0x16e94c(0x178)]){if(_0x4479b2[_0x16e94c(0x133)])_0x2b017a['push'](_0x4479b2[_0x16e94c(0x133)]);}if(_0x3e0911[_0x16e94c(0x10f)])for(const _0x15a53f of _0x3e0911['variants']){if(_0x15a53f[_0x16e94c(0x133)])_0x2b017a['push'](_0x15a53f[_0x16e94c(0x133)]);}if(_0x3e0911[_0x16e94c(0x1b8)])for(const _0x56dade of _0x3e0911[_0x16e94c(0x1b8)]){if(_0x56dade[_0x16e94c(0x133)])_0x2b017a['push'](_0x56dade[_0x16e94c(0x133)]);}return _0x2b017a;}function parseJumpTargetDisplayName(_0x55a969){const _0x52d42e=a147_0x2206,_0x2e4e22=_0x55a969[_0x52d42e(0x147)](/^(.+?)\s*\(([^/)]+)/);if(!_0x2e4e22)return undefined;const _0x2ee56d=_0x2e4e22[0x1][_0x52d42e(0x123)](),_0x325cec=_0x2e4e22[0x2][_0x52d42e(0x123)]();if(!_0x2ee56d||!_0x325cec)return undefined;return{'stageName':_0x2ee56d,'journeyName':_0x325cec};}function orderStepsFromRoot(_0x383cc6,_0xebdc6d){const _0x1762b3=a147_0x2206,_0x472db1=Object[_0x1762b3(0x1b5)](_0x383cc6);if(_0x472db1[_0x1762b3(0x1ba)]===0x0)return[];const _0x50ea6f=new Set(_0x472db1[_0x1762b3(0x122)](([_0x47a893])=>_0x47a893)),_0x8daf12=new Set();for(const [,_0x2576db]of _0x472db1){for(const _0x45498d of getStepNextRefs(_0x2576db)){if(_0x50ea6f[_0x1762b3(0x12b)](_0x45498d))_0x8daf12[_0x1762b3(0x181)](_0x45498d);}}let _0x2b4c01=_0xebdc6d&&_0x50ea6f[_0x1762b3(0x12b)](_0xebdc6d)?_0xebdc6d:undefined;if(!_0x2b4c01){const _0x1a6997=_0x472db1[_0x1762b3(0x160)](([_0x4ce77f])=>!_0x8daf12['has'](_0x4ce77f));_0x1a6997[_0x1762b3(0x1ba)]>0x0?_0x2b4c01=_0x1a6997[0x0][0x0]:_0x2b4c01=_0x472db1[0x0][0x0];}const _0xb35190=[],_0x60ee23=new Set(),_0x590de1=[_0x2b4c01];while(_0x590de1['length']>0x0){const _0x1299b6=_0x590de1[_0x1762b3(0x17c)]();if(_0x60ee23[_0x1762b3(0x12b)](_0x1299b6))continue;_0x60ee23[_0x1762b3(0x181)](_0x1299b6);const _0x2aaa93=_0x383cc6[_0x1299b6];if(!_0x2aaa93)continue;_0xb35190['push']({'uuid':_0x1299b6,'step':_0x2aaa93});for(const _0x3abbf5 of getStepNextRefs(_0x2aaa93)){_0x50ea6f[_0x1762b3(0x12b)](_0x3abbf5)&&!_0x60ee23[_0x1762b3(0x12b)](_0x3abbf5)&&_0x590de1['push'](_0x3abbf5);}}for(const [_0x3eef06,_0xac073d]of _0x472db1){!_0x60ee23[_0x1762b3(0x12b)](_0x3eef06)&&_0xb35190[_0x1762b3(0x151)]({'uuid':_0x3eef06,'step':_0xac073d});}return _0xb35190;}function resolveStepReferences(_0x3dd070,_0x25a044,_0x387aa4,_0x568260){const _0x3ec812=a147_0x2206;if(_0x3dd070['type']!==_0x3ec812(0x16b)){_0x3dd070[_0x3ec812(0x133)]&&_0x568260[_0x3ec812(0x12b)](_0x3dd070[_0x3ec812(0x133)])&&(_0x3dd070[_0x3ec812(0x133)]=_0x568260[_0x3ec812(0x17a)](_0x3dd070['next']));const _0x3ca8a8=_0x25a044+0x1;if(_0x3ca8a8<_0x387aa4[_0x3ec812(0x1ba)]){const _0xfecf85=_0x568260[_0x3ec812(0x17a)](_0x387aa4[_0x3ca8a8][_0x3ec812(0x171)]);_0x3dd070['next']===_0xfecf85&&delete _0x3dd070[_0x3ec812(0x133)];}}if(_0x3dd070[_0x3ec812(0x19a)]===_0x3ec812(0x143))for(const _0x539e90 of _0x3dd070[_0x3ec812(0x11c)][_0x3ec812(0x178)]){_0x539e90['next']&&_0x568260['has'](_0x539e90['next'])&&(_0x539e90['next']=_0x568260[_0x3ec812(0x17a)](_0x539e90[_0x3ec812(0x133)]));}if(_0x3dd070[_0x3ec812(0x19a)]===_0x3ec812(0x1a4))for(const _0x2012e0 of _0x3dd070[_0x3ec812(0x11c)][_0x3ec812(0x10f)]){_0x2012e0[_0x3ec812(0x133)]&&_0x568260[_0x3ec812(0x12b)](_0x2012e0[_0x3ec812(0x133)])&&(_0x2012e0['next']=_0x568260[_0x3ec812(0x17a)](_0x2012e0[_0x3ec812(0x133)]));}if(_0x3dd070[_0x3ec812(0x19a)]===_0x3ec812(0x152)&&_0x3dd070['with']['condition']){const _0x99b95c=_0x3dd070[_0x3ec812(0x11c)][_0x3ec812(0x19d)];_0x99b95c[_0x3ec812(0x133)]&&_0x568260[_0x3ec812(0x12b)](_0x99b95c[_0x3ec812(0x133)])&&(_0x99b95c['next']=_0x568260[_0x3ec812(0x17a)](_0x99b95c[_0x3ec812(0x133)])),_0x99b95c['timeout']?.[_0x3ec812(0x133)]&&_0x568260['has'](_0x99b95c[_0x3ec812(0x189)][_0x3ec812(0x133)])&&(_0x99b95c[_0x3ec812(0x189)]['next']=_0x568260[_0x3ec812(0x17a)](_0x99b95c[_0x3ec812(0x189)][_0x3ec812(0x133)]));}}function convertApiStageToYaml(_0x39f372){const _0x321d04=a147_0x2206,_0x449b37={'name':_0x39f372[_0x321d04(0x167)]};_0x39f372['id']&&(_0x449b37['id']=_0x39f372['id']);_0x39f372[_0x321d04(0x1a7)]&&(_0x449b37[_0x321d04(0x1a7)]=_0x39f372[_0x321d04(0x1a7)]);_0x39f372[_0x321d04(0x161)]&&(_0x449b37[_0x321d04(0x128)]=convertApiCriteriaToYaml(_0x39f372['entryCriteria']));_0x39f372[_0x321d04(0x195)]&&_0x39f372['exitCriterias'][_0x321d04(0x1ba)]>0x0&&(_0x449b37['exit_criteria']=_0x39f372[_0x321d04(0x195)][_0x321d04(0x122)](convertApiCriteriaToYaml));_0x39f372[_0x321d04(0x142)]&&(_0x449b37[_0x321d04(0x142)]=convertApiCriteriaToYaml(_0x39f372['milestone']));if(_0x39f372['steps']&&Object[_0x321d04(0x14a)](_0x39f372[_0x321d04(0x111)])['length']>0x0){const _0x4edd06=orderStepsFromRoot(_0x39f372[_0x321d04(0x111)],_0x39f372[_0x321d04(0x119)]),_0x36a235=new Map(),_0x427a44=new Set();for(let _0x36aa90=0x0;_0x36aa90<_0x4edd06['length'];_0x36aa90++){const {uuid:_0x404db9,step:_0x3f211c}=_0x4edd06[_0x36aa90];let _0x2d2518=generateReadableStepName(_0x3f211c,_0x36aa90),_0x3d7d93=_0x2d2518,_0x3f4232=0x2;while(_0x427a44[_0x321d04(0x12b)](_0x3d7d93)){_0x3d7d93=_0x2d2518+'_'+_0x3f4232,_0x3f4232++;}_0x427a44['add'](_0x3d7d93),_0x36a235[_0x321d04(0x146)](_0x404db9,_0x3d7d93);}_0x449b37[_0x321d04(0x111)]=_0x4edd06[_0x321d04(0x122)](({uuid:_0x1b1940,step:_0x3c3273},_0x2c370d)=>{const _0x3e269b=_0x321d04,_0x31b4b1=convertApiStepToYaml(_0x3c3273,_0x36a235[_0x3e269b(0x17a)](_0x1b1940));return resolveStepReferences(_0x31b4b1,_0x2c370d,_0x4edd06,_0x36a235),_0x31b4b1;});}return _0x449b37;}function convertApiCriteriaToYaml(_0x22905e){const _0x3ba0b0=a147_0x2206,_0x185e4a={'name':_0x22905e[_0x3ba0b0(0x167)],'segment':_0x22905e[_0x3ba0b0(0x15a)]};_0x22905e[_0x3ba0b0(0x1a7)]&&(_0x185e4a['description']=_0x22905e[_0x3ba0b0(0x1a7)]);if(_0x22905e[_0x3ba0b0(0x131)]){let _0x39f5a9=_0x22905e[_0x3ba0b0(0x131)][_0x3ba0b0(0x18e)],_0x5f2dc0=_0x22905e[_0x3ba0b0(0x131)][_0x3ba0b0(0x177)];if(_0x22905e[_0x3ba0b0(0x131)]['journeyName']){const _0x2255f6=parseJumpTargetDisplayName(_0x22905e['target'][_0x3ba0b0(0x1ab)]);_0x2255f6&&(_0x5f2dc0=_0x2255f6[_0x3ba0b0(0x197)],_0x39f5a9=_0x2255f6[_0x3ba0b0(0x1ab)]);}_0x185e4a[_0x3ba0b0(0x131)]={'journey':_0x39f5a9,'stage':_0x5f2dc0},_0x22905e[_0x3ba0b0(0x131)][_0x3ba0b0(0x114)]&&(_0x185e4a[_0x3ba0b0(0x131)][_0x3ba0b0(0x118)]=_0x22905e[_0x3ba0b0(0x131)][_0x3ba0b0(0x114)]);}return _0x185e4a;}function convertApiStepToYaml(_0x1a071d,_0xe860){const _0x4d8bfc=a147_0x2206;switch(_0x1a071d['type']){case'WaitStep':{const _0x3a3b38={};if(_0x1a071d[_0x4d8bfc(0x13d)]===_0x4d8bfc(0x11f)&&_0x1a071d[_0x4d8bfc(0x11d)]!==undefined)_0x3a3b38['duration']=_0x1a071d[_0x4d8bfc(0x11d)],_0x3a3b38['unit']=_0x1a071d['waitStepUnit'];else{if(_0x1a071d['waitStepType']===_0x4d8bfc(0x176)&&_0x1a071d[_0x4d8bfc(0x15c)])_0x3a3b38[_0x4d8bfc(0x13b)]=_0x1a071d['waitUntilDate'];else{if(_0x1a071d['waitStepType']==='DaysOfTheWeek'&&_0x1a071d[_0x4d8bfc(0x180)])_0x3a3b38[_0x4d8bfc(0x184)]=_0x1a071d[_0x4d8bfc(0x180)];else{if(_0x1a071d[_0x4d8bfc(0x13d)]==='Condition'){if(_0x1a071d['conditions']&&_0x1a071d['conditions'][_0x4d8bfc(0x1ba)]>0x0){const _0xb9ae1f=_0x1a071d[_0x4d8bfc(0x1b8)][_0x4d8bfc(0x1bb)](_0x147e25=>!_0x147e25['timedOutPath']),_0x4a95d4=_0x1a071d[_0x4d8bfc(0x1b8)]['find'](_0x29d7fa=>_0x29d7fa[_0x4d8bfc(0x1b2)]);_0xb9ae1f?.[_0x4d8bfc(0x15a)]&&(_0x3a3b38['condition']={'segment':_0xb9ae1f[_0x4d8bfc(0x15a)],..._0xb9ae1f['next']?{'next':_0xb9ae1f[_0x4d8bfc(0x133)]}:{}},_0x4a95d4&&_0x4a95d4['moveAfter']!==undefined&&_0x4a95d4[_0x4d8bfc(0x126)]&&(_0x3a3b38[_0x4d8bfc(0x19d)][_0x4d8bfc(0x189)]={'duration':_0x4a95d4[_0x4d8bfc(0x116)],'unit':_0x4a95d4[_0x4d8bfc(0x126)],..._0x4a95d4[_0x4d8bfc(0x133)]?{'next':_0x4a95d4[_0x4d8bfc(0x133)]}:{}}));}else _0x1a071d[_0x4d8bfc(0x170)]&&(_0x3a3b38[_0x4d8bfc(0x19d)]={'segment':_0x1a071d[_0x4d8bfc(0x170)]},_0x1a071d[_0x4d8bfc(0x138)]!==undefined&&_0x1a071d['conditionTimeoutUnit']&&(_0x3a3b38[_0x4d8bfc(0x19d)][_0x4d8bfc(0x189)]={'duration':_0x1a071d[_0x4d8bfc(0x138)],'unit':_0x1a071d[_0x4d8bfc(0x17b)]}));}}}}const _0x40c371={'type':_0x4d8bfc(0x152),'name':_0xe860,..._0x1a071d[_0x4d8bfc(0x133)]?{'next':_0x1a071d[_0x4d8bfc(0x133)]}:{},'with':_0x3a3b38};return _0x40c371;}case _0x4d8bfc(0x18b):{const _0x577e30={'type':_0x4d8bfc(0x162),'name':_0xe860,..._0x1a071d[_0x4d8bfc(0x133)]?{'next':_0x1a071d['next']}:{},'with':{'activation':_0x1a071d['journeyActivationStepId']||''}};return _0x577e30;}case _0x4d8bfc(0x130):{const _0x340c4d={'type':_0x4d8bfc(0x143),'name':_0xe860,..._0x1a071d['next']?{'next':_0x1a071d['next']}:{},'with':{'branches':(_0x1a071d[_0x4d8bfc(0x178)]||[])[_0x4d8bfc(0x122)](_0x15a664=>({'name':_0x15a664[_0x4d8bfc(0x167)],'segment':_0x15a664[_0x4d8bfc(0x15a)],'excluded':_0x15a664[_0x4d8bfc(0x1a3)],..._0x15a664[_0x4d8bfc(0x133)]?{'next':_0x15a664[_0x4d8bfc(0x133)]}:{}}))}};return _0x340c4d;}case _0x4d8bfc(0x190):case _0x4d8bfc(0x19b):case _0x4d8bfc(0x10b):{const _0xdc565c=_0x1a071d[_0x4d8bfc(0x10f)]||(_0x1a071d[_0x4d8bfc(0x178)]||[])[_0x4d8bfc(0x122)](_0x52a530=>({'name':_0x52a530[_0x4d8bfc(0x167)],'percentage':0x0,'next':_0x52a530[_0x4d8bfc(0x133)]})),_0x5c0aed={'type':_0x4d8bfc(0x1a4),'name':_0xe860,..._0x1a071d[_0x4d8bfc(0x133)]?{'next':_0x1a071d['next']}:{},'with':{'customized_split':_0x1a071d[_0x4d8bfc(0x129)],'unique_id':_0x1a071d[_0x4d8bfc(0x157)],'variants':_0xdc565c[_0x4d8bfc(0x122)](_0x45a5d5=>({'name':_0x45a5d5[_0x4d8bfc(0x167)],'percentage':_0x45a5d5[_0x4d8bfc(0x1b7)],..._0x45a5d5[_0x4d8bfc(0x133)]?{'next':_0x45a5d5[_0x4d8bfc(0x133)]}:{}}))}};return _0x5c0aed;}case'Merge':{const _0x214c82={'type':_0x4d8bfc(0x145),'name':_0xe860,..._0x1a071d['next']?{'next':_0x1a071d['next']}:{}};return _0x214c82;}case _0x4d8bfc(0x11e):{let _0x364e8b='',_0x409755='',_0x5e3b82;if(_0x1a071d[_0x4d8bfc(0x131)]){_0x364e8b=_0x1a071d[_0x4d8bfc(0x131)][_0x4d8bfc(0x18e)],_0x409755=_0x1a071d['target'][_0x4d8bfc(0x177)],_0x5e3b82=_0x1a071d['target'][_0x4d8bfc(0x114)];if(_0x1a071d['target'][_0x4d8bfc(0x1ab)]){const _0x48787a=parseJumpTargetDisplayName(_0x1a071d[_0x4d8bfc(0x131)][_0x4d8bfc(0x1ab)]);_0x48787a&&(_0x409755=_0x48787a['stageName'],_0x364e8b=_0x48787a[_0x4d8bfc(0x1ab)]);}}const _0x29422c={'type':_0x4d8bfc(0x1ae),'name':_0xe860,..._0x1a071d['next']?{'next':_0x1a071d['next']}:{},'with':{'target':{'journey':_0x364e8b,'stage':_0x409755,..._0x5e3b82?{'bundle_id':_0x5e3b82}:{}}}};return _0x29422c;}case _0x4d8bfc(0x10a):{const _0x64a290={'type':'end','name':_0xe860};return _0x64a290;}default:{const _0x264d53={'type':'end','name':_0xe860};return _0x264d53;}}}export async function journeyDefToRequest(_0x59bfc0,_0x421aa3,_0x218928){const _0x540e8a=a147_0x2206,_0x12781e=_0x59bfc0[_0x540e8a(0x1a1)]||getActiveStages(_0x59bfc0),_0x38ead8=isJourneysArrayMode(_0x59bfc0)||isMultiVersionMode(_0x59bfc0)?getLatestJourneyEntry(_0x59bfc0):undefined,_0xea9dd9=_0x38ead8?.[_0x540e8a(0x13f)]??_0x59bfc0[_0x540e8a(0x167)],_0x29fd9d=_0x59bfc0[_0x540e8a(0x1b0)]||{},_0x42efd2=_0x59bfc0[_0x540e8a(0x194)]||{},_0x30775f={'type':_0x540e8a(0x107),'attributes':{'name':_0xea9dd9,'audienceId':_0x421aa3,'journeyStages':await Promise[_0x540e8a(0x12f)](_0x12781e[_0x540e8a(0x122)](_0x1cc91b=>convertYamlStageToApi(_0x1cc91b,_0x218928,_0x29fd9d,_0x42efd2)))}},_0x11fd1e=_0x38ead8?.['id']??_0x59bfc0['id'];_0x11fd1e&&(_0x30775f['id']=_0x11fd1e);_0x59bfc0[_0x540e8a(0x1a7)]&&(_0x30775f['attributes']['description']=_0x59bfc0[_0x540e8a(0x1a7)]);const _0x525bfe=getEffectiveGoal(_0x59bfc0);_0x525bfe&&(_0x30775f['attributes']['goal']=await convertYamlCriteriaToApi(_0x525bfe,_0x218928,_0x29fd9d));const _0x5dde6b=getEffectiveReentry(_0x59bfc0);return _0x5dde6b&&(_0x30775f[_0x540e8a(0x16d)][_0x540e8a(0x13c)]=_0x5dde6b,_0x30775f[_0x540e8a(0x16d)][_0x540e8a(0x1b3)]=_0x5dde6b!==_0x540e8a(0x18a)),_0x59bfc0[_0x540e8a(0x16f)]&&(_0x30775f[_0x540e8a(0x109)]={'parentFolder':{'data':{'id':_0x59bfc0['folder_id'],'type':_0x540e8a(0x159)}}}),_0x30775f;}async function convertYamlStageToApi(_0x5e2209,_0x5db314,_0x5f0bfc={},_0x2438d5={}){const _0xb8e17b=a147_0x2206,_0x414ab4={'name':_0x5e2209['name']};_0x5e2209['id']&&(_0x414ab4['id']=_0x5e2209['id']);_0x5e2209['description']&&(_0x414ab4[_0xb8e17b(0x1a7)]=_0x5e2209[_0xb8e17b(0x1a7)]);_0x5e2209[_0xb8e17b(0x128)]&&(_0x414ab4[_0xb8e17b(0x161)]=await convertYamlCriteriaToApi(_0x5e2209[_0xb8e17b(0x128)],_0x5db314,_0x5f0bfc));_0x5e2209[_0xb8e17b(0x108)]&&_0x5e2209[_0xb8e17b(0x108)]['length']>0x0&&(_0x414ab4[_0xb8e17b(0x195)]=await Promise['all'](_0x5e2209['exit_criteria']['map'](_0x4a12b3=>convertYamlCriteriaToApi(_0x4a12b3,_0x5db314,_0x5f0bfc))));_0x5e2209[_0xb8e17b(0x142)]&&(_0x414ab4[_0xb8e17b(0x142)]=await convertYamlCriteriaToApi(_0x5e2209[_0xb8e17b(0x142)],_0x5db314,_0x5f0bfc));if(_0x5e2209[_0xb8e17b(0x111)]&&_0x5e2209['steps'][_0xb8e17b(0x1ba)]>0x0){const _0x3db0c1={},_0x33d1fd=_0x5e2209[_0xb8e17b(0x111)]['map']((_0x584cfa,_0x6ee9ee)=>{const _0x237dfc=_0xb8e17b,_0x5d5407=_0x584cfa['uuid']||generateUUID(),_0x22bae0=_0x584cfa[_0x237dfc(0x167)]||_0x584cfa[_0x237dfc(0x19a)]+'_'+_0x6ee9ee;return _0x3db0c1[_0x22bae0]=_0x5d5407,{..._0x584cfa,'name':_0x22bae0};});_0x414ab4['rootStep']=_0x3db0c1[_0x33d1fd[0x0][_0xb8e17b(0x167)]],_0x414ab4[_0xb8e17b(0x111)]={};for(let _0xaa7558=0x0;_0xaa7558<_0x33d1fd[_0xb8e17b(0x1ba)];_0xaa7558++){const _0x385a80=_0x33d1fd[_0xaa7558],_0x15c491=_0x3db0c1[_0x385a80[_0xb8e17b(0x167)]],_0x4c19c7=!_0x385a80[_0xb8e17b(0x133)]&&_0xaa7558<_0x33d1fd[_0xb8e17b(0x1ba)]-0x1&&_0x385a80[_0xb8e17b(0x19a)]!==_0xb8e17b(0x16b)?_0x33d1fd[_0xaa7558+0x1][_0xb8e17b(0x167)]:_0x385a80['next'],_0x2d67cf=_0x4c19c7!==_0x385a80[_0xb8e17b(0x133)]?{..._0x385a80,'next':_0x4c19c7}:_0x385a80;_0x414ab4[_0xb8e17b(0x111)][_0x15c491]=await convertYamlStepToApi(_0x2d67cf,_0x5db314,_0x5f0bfc,_0x3db0c1,_0x2438d5);}}else _0x5e2209['root_step']&&(_0x414ab4['rootStep']=_0x5e2209[_0xb8e17b(0x12a)]);return _0x414ab4;}async function convertYamlCriteriaToApi(_0x411af7,_0x5296be,_0x13ee78={}){const _0xdfc80e=a147_0x2206;let _0x135950=_0x411af7[_0xdfc80e(0x10d)];if(_0x135950&&!/^\d+$/[_0xdfc80e(0x121)](_0x135950)){const _0x4b1b0b=parseSegmentRef(_0x135950);if(_0x4b1b0b['type']===_0xdfc80e(0x164))_0x5296be?.[_0xdfc80e(0x18c)]&&(_0x135950=await _0x5296be[_0xdfc80e(0x18c)](_0x4b1b0b['name']));else{if(_0x4b1b0b[_0xdfc80e(0x19a)]==='embedded'&&_0x13ee78[_0x4b1b0b[_0xdfc80e(0x167)]])_0x5296be?.['resolveEmbeddedSegmentId']&&(_0x135950=await _0x5296be[_0xdfc80e(0x19e)](_0x4b1b0b[_0xdfc80e(0x167)],_0x13ee78[_0x4b1b0b[_0xdfc80e(0x167)]]));else _0x5296be?.[_0xdfc80e(0x18c)]&&(_0x135950=await _0x5296be[_0xdfc80e(0x18c)](_0x4b1b0b['name']));}}const _0x5d5016={'name':_0x411af7[_0xdfc80e(0x167)],'segmentId':_0x135950};_0x411af7[_0xdfc80e(0x1a7)]&&(_0x5d5016['description']=_0x411af7[_0xdfc80e(0x1a7)]);if(_0x411af7[_0xdfc80e(0x131)]){const _0x272226=_0x411af7[_0xdfc80e(0x131)]['journey'],_0x42392a=_0x411af7[_0xdfc80e(0x131)][_0xdfc80e(0x14d)];let _0x1c46db=_0x411af7['target'][_0xdfc80e(0x107)];_0x5296be?.[_0xdfc80e(0x1b9)]&&!/^\d+$/['test'](_0x1c46db)&&(_0x1c46db=await _0x5296be[_0xdfc80e(0x1b9)](_0x1c46db));let _0x54b6b6=_0x411af7[_0xdfc80e(0x131)][_0xdfc80e(0x14d)];_0x5296be?.[_0xdfc80e(0x140)]&&!/^\d+$/['test'](_0x54b6b6)&&(_0x54b6b6=await _0x5296be['resolveStageId'](_0x1c46db,_0x54b6b6));const _0x50eeeb=!/^\d+$/['test'](_0x272226)&&!isLocalJourneyRef(_0x272226)?formatApiJourneyName(_0x272226,_0x42392a):undefined;_0x5d5016[_0xdfc80e(0x131)]={'journeyId':_0x1c46db,'journeyStageId':_0x54b6b6,'journeyName':_0x50eeeb,'confirmed':!![]},_0x411af7['target'][_0xdfc80e(0x118)]&&(_0x5d5016[_0xdfc80e(0x131)][_0xdfc80e(0x114)]=_0x411af7[_0xdfc80e(0x131)][_0xdfc80e(0x118)]);}return _0x5d5016;}async function convertYamlStepToApi(_0x2576c9,_0x402f8c,_0x55144f={},_0x587ae6={},_0x257e52={}){const _0x50d68f=a147_0x2206,_0x596f79=async _0x5558ce=>{const _0x4fc3bd=a147_0x2206;if(/^\d+$/[_0x4fc3bd(0x121)](_0x5558ce))return _0x5558ce;const _0x1add6f=parseSegmentRef(_0x5558ce);if(_0x1add6f[_0x4fc3bd(0x19a)]===_0x4fc3bd(0x164)){if(_0x402f8c?.[_0x4fc3bd(0x18c)])return await _0x402f8c[_0x4fc3bd(0x18c)](_0x1add6f[_0x4fc3bd(0x167)]);}else{if(_0x1add6f['type']===_0x4fc3bd(0x12d)&&_0x55144f[_0x1add6f[_0x4fc3bd(0x167)]]){if(_0x402f8c?.[_0x4fc3bd(0x19e)])return await _0x402f8c[_0x4fc3bd(0x19e)](_0x1add6f['name'],_0x55144f[_0x1add6f['name']]);}else{if(_0x402f8c?.['resolveSegmentId'])return await _0x402f8c[_0x4fc3bd(0x18c)](_0x1add6f[_0x4fc3bd(0x167)]);}}return _0x5558ce;},_0x2ad5e2=async _0x3bd3a2=>{const _0x360dfd=a147_0x2206;if(/^\d+$/[_0x360dfd(0x121)](_0x3bd3a2))return _0x3bd3a2;const _0x1a02e7=parseSegmentRef(_0x3bd3a2);if(_0x1a02e7[_0x360dfd(0x19a)]===_0x360dfd(0x164)){if(_0x402f8c?.[_0x360dfd(0x120)])return await _0x402f8c[_0x360dfd(0x120)](_0x1a02e7[_0x360dfd(0x167)]);return _0x1a02e7[_0x360dfd(0x167)];}else{if(_0x1a02e7[_0x360dfd(0x19a)]===_0x360dfd(0x12d)&&_0x257e52[_0x1a02e7[_0x360dfd(0x167)]]){if(_0x402f8c?.[_0x360dfd(0x150)])return await _0x402f8c['resolveEmbeddedActivationId'](_0x1a02e7[_0x360dfd(0x167)],_0x257e52[_0x1a02e7[_0x360dfd(0x167)]]);if(_0x402f8c?.[_0x360dfd(0x120)])return await _0x402f8c[_0x360dfd(0x120)](_0x1a02e7[_0x360dfd(0x167)]);}else{if(_0x402f8c?.[_0x360dfd(0x120)])return await _0x402f8c[_0x360dfd(0x120)](_0x1a02e7[_0x360dfd(0x167)]);}}return _0x3bd3a2;},_0x518dd3=_0x10b6d2=>{if(!_0x10b6d2)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x10b6d2))return _0x10b6d2;return _0x587ae6[_0x10b6d2]||_0x10b6d2;};switch(_0x2576c9[_0x50d68f(0x19a)]){case _0x50d68f(0x152):{const _0x3d7e62=_0x2576c9,_0x102f16=_0x3d7e62[_0x50d68f(0x11c)],_0x4b20c8={'type':_0x50d68f(0x193),'name':_0x3d7e62[_0x50d68f(0x167)],'next':_0x518dd3(_0x3d7e62[_0x50d68f(0x133)])};if(_0x102f16['duration']!==undefined&&_0x102f16[_0x50d68f(0x126)])_0x4b20c8['waitStepType']=_0x50d68f(0x11f),_0x4b20c8['waitStep']=_0x102f16['duration'],_0x4b20c8[_0x50d68f(0x11b)]=normalizeWaitUnit(_0x102f16[_0x50d68f(0x126)]);else{if(_0x102f16[_0x50d68f(0x13b)])_0x4b20c8['waitStepType']=_0x50d68f(0x176),_0x4b20c8['waitUntilDate']=_0x102f16[_0x50d68f(0x13b)];else{if(_0x102f16[_0x50d68f(0x184)])_0x4b20c8['waitStepType']=_0x50d68f(0x198),_0x4b20c8[_0x50d68f(0x180)]=_0x102f16[_0x50d68f(0x184)];else{if(_0x102f16[_0x50d68f(0x19d)]){_0x4b20c8[_0x50d68f(0x13d)]='Condition';const _0x110a50=await _0x596f79(_0x102f16['condition'][_0x50d68f(0x10d)]),_0x553fcd=_0x102f16['condition'][_0x50d68f(0x189)]?.['next']!==undefined;if(_0x553fcd){const _0x8c6369=[];_0x8c6369['push']({'id':generateUUID(),'segmentId':_0x110a50,'timedOutPath':![],'name':'Met\x20condition(s)','next':_0x518dd3(_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x133)]??_0x3d7e62[_0x50d68f(0x133)])});if(_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x189)]){const _0x5cf4e6=_0x102f16['condition'][_0x50d68f(0x189)]['duration'],_0x420f18=normalizeWaitUnit(_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x189)]['unit']);_0x8c6369[_0x50d68f(0x151)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x50d68f(0x1aa)+_0x5cf4e6+'\x20'+_0x420f18,'moveAfter':_0x5cf4e6,'unit':_0x420f18,'next':_0x518dd3(_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x189)][_0x50d68f(0x133)])});}_0x4b20c8[_0x50d68f(0x1b8)]=_0x8c6369,delete _0x4b20c8['next'];}else _0x4b20c8[_0x50d68f(0x170)]=_0x110a50,_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x189)]&&(_0x4b20c8[_0x50d68f(0x138)]=_0x102f16['condition'][_0x50d68f(0x189)][_0x50d68f(0x185)],_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x189)][_0x50d68f(0x126)]&&(_0x4b20c8[_0x50d68f(0x17b)]=normalizeWaitUnit(_0x102f16[_0x50d68f(0x19d)][_0x50d68f(0x189)][_0x50d68f(0x126)])));}}}}return _0x4b20c8;}case _0x50d68f(0x162):{const _0x326406=_0x2576c9,_0x2d47d5=_0x326406[_0x50d68f(0x11c)][_0x50d68f(0x162)],_0x1c75a8=await _0x2ad5e2(_0x2d47d5);return{'type':_0x50d68f(0x18b),'name':_0x326406[_0x50d68f(0x167)],'journeyActivationStepId':_0x1c75a8,'next':_0x518dd3(_0x326406['next'])};}case _0x50d68f(0x143):{const _0x2c8b8c=_0x2576c9,_0x80ae53=_0x2c8b8c[_0x50d68f(0x11c)][_0x50d68f(0x178)];return{'type':_0x50d68f(0x130),'name':_0x2c8b8c[_0x50d68f(0x167)],'branches':await Promise['all'](_0x80ae53[_0x50d68f(0x122)](async _0x28f1bc=>{const _0x54cea3=_0x50d68f;let _0x67f70a='';if(!_0x28f1bc[_0x54cea3(0x1ad)]){const _0x53425=_0x28f1bc[_0x54cea3(0x10d)]||_0x28f1bc[_0x54cea3(0x137)]||'';_0x67f70a=_0x53425?await _0x596f79(_0x53425):'';}return{'id':crypto['randomUUID'](),'name':_0x28f1bc[_0x54cea3(0x167)],'description':null,'segmentId':_0x67f70a,'excludedPath':_0x28f1bc[_0x54cea3(0x1ad)]??![],'next':_0x518dd3(_0x28f1bc[_0x54cea3(0x133)])};})),'next':_0x518dd3(_0x2c8b8c['next'])};}case _0x50d68f(0x1a4):{const _0x1c2d04=_0x2576c9,_0x1f5a61=_0x1c2d04[_0x50d68f(0x11c)];return{'type':'ABTest','name':_0x1c2d04[_0x50d68f(0x167)],'customizedSplit':_0x1f5a61[_0x50d68f(0x16c)],'uniqueId':_0x1f5a61[_0x50d68f(0x1a8)],'variants':_0x1f5a61[_0x50d68f(0x10f)]['map'](_0x34d103=>({'id':_0x34d103['id']||generateUUID(),'name':_0x34d103[_0x50d68f(0x167)],'percentage':_0x34d103[_0x50d68f(0x1b7)],'next':_0x518dd3(_0x34d103[_0x50d68f(0x133)])})),'next':_0x518dd3(_0x1c2d04[_0x50d68f(0x133)])};}case'merge':return{'type':'Merge','name':_0x2576c9['name'],'next':_0x518dd3(_0x2576c9[_0x50d68f(0x133)])};case _0x50d68f(0x1ae):{const _0x23b941=_0x2576c9,_0x3017dc=_0x23b941[_0x50d68f(0x11c)]['target'],_0x17415a=_0x3017dc[_0x50d68f(0x107)],_0x3b5591=_0x3017dc[_0x50d68f(0x14d)];let _0x3f4e81=_0x3017dc[_0x50d68f(0x107)];_0x402f8c?.[_0x50d68f(0x1b9)]&&!/^\d+$/[_0x50d68f(0x121)](_0x3f4e81)&&(_0x3f4e81=await _0x402f8c['resolveJourneyId'](_0x3f4e81));let _0x4f6bb5=_0x3017dc[_0x50d68f(0x14d)];_0x402f8c?.[_0x50d68f(0x140)]&&!/^\d+$/[_0x50d68f(0x121)](_0x4f6bb5)&&(_0x4f6bb5=await _0x402f8c[_0x50d68f(0x140)](_0x3f4e81,_0x4f6bb5));const _0x1bd730=!/^\d+$/[_0x50d68f(0x121)](_0x17415a)&&!isLocalJourneyRef(_0x17415a)?formatApiJourneyName(_0x17415a,_0x3b5591):undefined;return{'type':_0x50d68f(0x11e),'name':_0x23b941[_0x50d68f(0x167)],'target':{'journeyId':_0x3f4e81,'journeyStageId':_0x4f6bb5,'journeyBundleId':_0x3017dc[_0x50d68f(0x118)],'journeyName':_0x1bd730,'confirmed':!![]},'next':_0x518dd3(_0x23b941[_0x50d68f(0x133)])};}case'end':return{'type':'End','name':_0x2576c9['name']};default:{const _0x28c565=_0x2576c9;return{'type':_0x50d68f(0x10a),'name':_0x28c565[_0x50d68f(0x167)]};}}}export function toYamlString(_0x3fe74c){const _0xcf11a2=a147_0x2206,_0x3f1f6a=stripInternalFields(_0x3fe74c),_0x378d39=a147_0x136d49[_0xcf11a2(0x1bd)](_0x3f1f6a,{'indent':0x2,'lineWidth':0x0,'nullStr':_0xcf11a2(0x132)}),_0x5aec3d=[_0xcf11a2(0x1ac),_0xcf11a2(0x115),'goal:',_0xcf11a2(0x113),_0xcf11a2(0x169),_0xcf11a2(0x112),_0xcf11a2(0x166)];let _0x471a67=_0x378d39;for(const _0x40c116 of _0x5aec3d){_0x471a67=_0x471a67[_0xcf11a2(0x165)](new RegExp('^('+_0x40c116+')','m'),(_0x2d10d3,_0x5b6977,_0x261036)=>{if(_0x261036===0x0||_0x471a67[_0x261036-0x1]==='\x0a'&&_0x471a67[_0x261036-0x2]==='\x0a')return _0x5b6977;return'\x0a'+_0x5b6977;});}return _0x471a67;}function stripInternalFields(_0x20ee7c){const _0x4bd66f=a147_0x2206,{id:_0x14b7cb,folder_id:_0x6a59d,bundle_id:_0x35d59a,bundle_name:_0x384124,version:_0x405f8e,allow_reentry:_0x1dc78c,..._0x2eeead}=_0x20ee7c;return _0x2eeead[_0x4bd66f(0x175)]&&(_0x2eeead['journeys']=_0x2eeead['journeys']['map'](_0x1888a2=>{const _0x17754b=_0x4bd66f,{id:_0x494b16,..._0x257388}=_0x1888a2;return{..._0x257388,'stages':_0x257388[_0x17754b(0x1a1)][_0x17754b(0x122)](stripStageInternalFields),..._0x1888a2[_0x17754b(0x134)]===!![]?{'latest':!![]}:{},..._0x2eeead[_0x17754b(0x175)]['length']===0x1&&_0x257388[_0x17754b(0x13f)]==='v1'?{'version':undefined}:{}};})),_0x2eeead['stages']&&(_0x2eeead[_0x4bd66f(0x1a1)]=_0x2eeead[_0x4bd66f(0x1a1)][_0x4bd66f(0x122)](stripStageInternalFields)),_0x2eeead[_0x4bd66f(0x1a2)]&&(_0x2eeead[_0x4bd66f(0x1a2)]=_0x2eeead[_0x4bd66f(0x1a2)][_0x4bd66f(0x122)](_0x1beac8=>{const _0x37e81c=_0x4bd66f,{id:_0x46f8ee,..._0x37467b}=_0x1beac8;return{..._0x37467b,'stages':_0x37467b[_0x37e81c(0x1a1)]['map'](stripStageInternalFields),..._0x1beac8['latest']===!![]?{'latest':!![]}:{}};})),_0x2eeead;}function stripStageInternalFields(_0x49fbb4){const {id:_0x12f57a,..._0x380e5b}=_0x49fbb4;return _0x380e5b;}export function parseYamlString(_0x4fdd0b){return safeParseYaml(_0x4fdd0b,JourneyDefSchema);}export function isJourneyDef(_0x353403){const _0x2654a8=a147_0x2206;return typeof _0x353403===_0x2654a8(0x14f)&&_0x353403!==null&&_0x2654a8(0x19a)in _0x353403&&_0x353403[_0x2654a8(0x19a)]===_0x2654a8(0x107);}export function generateTemplate(_0x40e84b,_0x587da3){const _0x5065d9=a147_0x2206,_0x57448c={'type':_0x5065d9(0x107),'name':_0x40e84b,'description':'Journey\x20description','reentry':_0x5065d9(0x18a),'goal':{'name':_0x5065d9(0x1b4),'segment':_0x5065d9(0x186)},'stages':[{'name':_0x5065d9(0x136),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0x587da3},'steps':[{'type':_0x5065d9(0x152),'name':_0x5065d9(0x173),'with':{'duration':0x1,'unit':_0x5065d9(0x125)}},{'type':_0x5065d9(0x162),'name':_0x5065d9(0x1bc),'with':{'activation':_0x5065d9(0x172)}},{'type':_0x5065d9(0x16b),'name':_0x5065d9(0x154)}]}]};return toYamlString(_0x57448c);}function generateUUID(){const _0x3134a0=a147_0x2206;return crypto[_0x3134a0(0x14e)]();}export const SEGMENT_REF_PREFIX=a147_0x3891ae(0x127);export function parseSegmentRef(_0x2f579c){const _0x30b681=a147_0x3891ae;if(_0x2f579c[_0x30b681(0x103)](SEGMENT_REF_PREFIX))return{'type':_0x30b681(0x164),'name':_0x2f579c[_0x30b681(0x15d)](SEGMENT_REF_PREFIX[_0x30b681(0x1ba)])};if(/^\d+$/[_0x30b681(0x121)](_0x2f579c))return{'type':'id','name':_0x2f579c};return{'type':'embedded','name':_0x2f579c};}export function makeSegmentRef(_0x6d5768){return''+SEGMENT_REF_PREFIX+_0x6d5768;}export function isExternalSegmentRef(_0x99f06){return _0x99f06['startsWith'](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x227210){const _0x16ffa0=a147_0x3891ae;return!!(_0x227210[_0x16ffa0(0x175)]&&_0x227210['journeys'][_0x16ffa0(0x1ba)]>0x0);}export function isMultiVersionMode(_0x2792e2){return!!(_0x2792e2['versions']&&_0x2792e2['versions']['length']>0x0);}export function isSingleVersionMode(_0x34e196){const _0x4eaf4d=a147_0x3891ae;return!!(_0x34e196[_0x4eaf4d(0x1a1)]&&_0x34e196['stages'][_0x4eaf4d(0x1ba)]>0x0);}export function hasMultipleVersions(_0x34bce0){const _0x1f64c0=a147_0x3891ae;if(isJourneysArrayMode(_0x34bce0))return(_0x34bce0[_0x1f64c0(0x175)]?.[_0x1f64c0(0x1ba)]||0x0)>0x1;if(isMultiVersionMode(_0x34bce0))return(_0x34bce0[_0x1f64c0(0x1a2)]?.[_0x1f64c0(0x1ba)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x23f913){const _0x25b54b=a147_0x3891ae;if(isJourneysArrayMode(_0x23f913))return _0x23f913;if(isSingleVersionMode(_0x23f913)){const {stages:_0x3dd259,id:_0x7eca34,version:_0x403bca,version_number:_0x452622,..._0x5382bc}=_0x23f913;return{..._0x5382bc,'journeys':[{'version':_0x403bca||'v1','stages':_0x3dd259||[],'id':_0x7eca34,'version_number':_0x452622}]};}if(isMultiVersionMode(_0x23f913)){const {versions:_0x115221,..._0x4057c1}=_0x23f913;return{..._0x4057c1,'journeys':(_0x115221||[])['map'](_0x2adbd3=>({'version':_0x2adbd3[_0x25b54b(0x167)],'state':_0x2adbd3[_0x25b54b(0x141)],'latest':_0x2adbd3[_0x25b54b(0x134)],'stages':_0x2adbd3['stages'],'id':_0x2adbd3['id'],'version_number':_0x2adbd3[_0x25b54b(0x156)]}))};}return _0x23f913;}export function normalizeJourneyDef(_0x4a0bf7,_0xdc245d){const _0xd56c0a=a147_0x3891ae,_0x158189=normalizeToJourneysFormat(_0x4a0bf7),_0x4d4a8a=_0xdc245d?.['segments']?Object[_0xd56c0a(0x14a)](_0xdc245d[_0xd56c0a(0x1b0)]):undefined,_0x124060=_0xdc245d?.[_0xd56c0a(0x194)]?Object[_0xd56c0a(0x14a)](_0xdc245d[_0xd56c0a(0x194)]):undefined;return{'type':_0xd56c0a(0x107),'name':_0x158189[_0xd56c0a(0x167)],..._0x158189[_0xd56c0a(0x1a7)]!==undefined&&{'description':_0x158189[_0xd56c0a(0x1a7)]},..._0x158189[_0xd56c0a(0x16a)]&&{'goal':normalizeJourneyCriteria(_0x158189[_0xd56c0a(0x16a)])},..._0x158189[_0xd56c0a(0x10e)]!==undefined&&{'reentry':_0x158189[_0xd56c0a(0x10e)]},..._0x158189[_0xd56c0a(0x1b0)]&&{'segments':normalizeEmbeddedSegments(_0x158189[_0xd56c0a(0x1b0)],_0x4d4a8a)},..._0x158189['activations']&&{'activations':normalizeEmbeddedActivations(_0x158189[_0xd56c0a(0x194)],_0x124060)},..._0x158189[_0xd56c0a(0x175)]&&{'journeys':_0x158189[_0xd56c0a(0x175)][_0xd56c0a(0x122)](_0xcc68f8=>normalizeJourneyEntry(_0xcc68f8,_0x158189[_0xd56c0a(0x175)][_0xd56c0a(0x1ba)]===0x1))}};}function normalizeJourneyEntry(_0x12cd20,_0x39b0ce){const _0xa5e578=a147_0x3891ae;return{...!_0x39b0ce&&_0x12cd20['version']!==undefined&&{'version':_0x12cd20[_0xa5e578(0x13f)]},..._0x12cd20[_0xa5e578(0x141)]!==undefined&&{'state':_0x12cd20[_0xa5e578(0x141)]},...!_0x39b0ce&&_0x12cd20['latest']!==undefined&&{'latest':_0x12cd20['latest']},..._0x12cd20[_0xa5e578(0x156)]!==undefined&&{'version_number':_0x12cd20[_0xa5e578(0x156)]},..._0x12cd20['goal']&&{'goal':normalizeJourneyCriteria(_0x12cd20[_0xa5e578(0x16a)])},..._0x12cd20[_0xa5e578(0x10e)]!==undefined&&{'reentry':_0x12cd20[_0xa5e578(0x10e)]},'stages':_0x12cd20[_0xa5e578(0x1a1)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x569ebf){const _0x1f5c1f=a147_0x3891ae;return{'name':_0x569ebf['name'],..._0x569ebf[_0x1f5c1f(0x1a7)]!==undefined&&{'description':_0x569ebf[_0x1f5c1f(0x1a7)]},..._0x569ebf['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0x569ebf[_0x1f5c1f(0x128)])},..._0x569ebf[_0x1f5c1f(0x108)]&&{'exit_criteria':_0x569ebf[_0x1f5c1f(0x108)]['map'](normalizeJourneyCriteria)},..._0x569ebf['milestone']&&{'milestone':normalizeJourneyCriteria(_0x569ebf['milestone'])},..._0x569ebf[_0x1f5c1f(0x111)]&&{'steps':normalizeStepsWithImplicitNext(_0x569ebf['steps'])}};}function a147_0x1f35(){const _0x480f3b=['*Max\x20wait\x20','journeyName','segments:','excluded','jump','rule','segments','7645022FtGxPx','timedOutPath','allowReentry','Goal\x20Achieved','entries','12VtmpQX','percentage','conditions','resolveJourneyId','length','find','Send\x20Notification','stringify','isArray','waitCondition','\x27:\x20','size','parentFolder','Expected\x20format:\x0a','startsWith','14836BTdFLU','journeyStages','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','journey','exit_criteria','relationships','End','Variant','schedule','segment','reentry','variants','launched','steps','stages:','reentry:','journeyBundleId','activations:','moveAfter','journeyBundleName','bundle_id','rootStep','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','waitStepUnit','with','waitStep','Jump','Duration','resolveActivationId','test','map','trim','from','day','unit','ref:','entry_criteria','customizedSplit','root_step','has','resolveJumpTarget','embedded','activation_template_id','all','DecisionPoint','target','null','next','latest','13250zVatNY','Stage\x201','segment_id','conditionTimeoutDuration','sort','connection','wait_until','reentryMode','waitStepType','versionNumber','version','resolveStageId','state','milestone','decision_point','toLowerCase','merge','set','match','data','definition','keys','all_columns','week','stage','randomUUID','object','resolveEmbeddedActivationId','push','wait','isJourneyLocal','Stage\x20Complete','resolveActivation','version_number','uniqueId','draft','folder','segmentId','includes','waitUntilDate','slice','317199uZQyzB','Unknown\x20segment\x20\x22','filter','entryCriteria','activation','\x20\x20\x20\x20type:\x20And\x0a','ref','replace','versions:','name','801LZrmML','journeys:','goal','end','customized_split','attributes','behavior','folder_id','conditionSegmentId','uuid','your-activation-name','Wait\x201\x20Day','8neszfl','journeys','Date','journeyStageId','branches','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','get','conditionTimeoutUnit','shift','notification','330reeksl','columns','daysOfWeek','add','resolveSegmentName','connector_config','days_of_week','duration','goal-segment','stageId','8202OwfCrR','timeout','no_reentry','Activation','resolveSegmentId','\x20\x20\x20\x20conditions:\x0a','journeyId','resolveActivationName','ABTest','919360zUPYFi','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','WaitStep','activations','exitCriterias','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','stageName','DaysOfTheWeek','JOURNEY_SYNTAX_ERROR','type','AbTest','resolveSegment','condition','resolveEmbeddedSegmentId','1276625UzuRTa','exitCriteria','stages','versions','excludedPath','ab_test','\x20\x20rule:\x0a','reentry_always','description','unique_id','weeks'];a147_0x1f35=function(){return _0x480f3b;};return a147_0x1f35();}function normalizeStepsWithImplicitNext(_0x433152){const _0x182507=a147_0x3891ae;return _0x433152[_0x182507(0x122)]((_0x5cf39c,_0x4216f5)=>{const _0xfc4c6e=_0x182507,_0x5e37e1=_0x4216f5<_0x433152[_0xfc4c6e(0x1ba)]-0x1?_0x433152[_0x4216f5+0x1][_0xfc4c6e(0x167)]:undefined;return normalizeJourneyStep(_0x5cf39c,_0x5e37e1);});}function normalizeJourneyCriteria(_0x36797e){const _0x2fd50e=a147_0x3891ae;return{'name':_0x36797e[_0x2fd50e(0x167)],..._0x36797e[_0x2fd50e(0x1a7)]!==undefined&&{'description':_0x36797e['description']},'segment':_0x36797e[_0x2fd50e(0x10d)],..._0x36797e['target']&&{'target':normalizeJumpTarget(_0x36797e[_0x2fd50e(0x131)])}};}function normalizeJourneyStep(_0x3b2f92,_0x5143cb){const _0x4efbbb=a147_0x3891ae,_0x1fffce=_0x3b2f92[_0x4efbbb(0x133)]!==undefined&&_0x3b2f92[_0x4efbbb(0x133)]!==_0x5143cb,_0x47df3e={'type':_0x3b2f92[_0x4efbbb(0x19a)],'name':_0x3b2f92[_0x4efbbb(0x167)],..._0x1fffce&&{'next':_0x3b2f92['next']}};if(_0x4efbbb(0x11c)in _0x3b2f92&&_0x3b2f92[_0x4efbbb(0x11c)])return{..._0x47df3e,'with':normalizeStepParams(_0x3b2f92['type'],_0x3b2f92[_0x4efbbb(0x11c)])};return _0x47df3e;}function normalizeStepParams(_0x211267,_0x33644e){const _0x5610c7=a147_0x3891ae;switch(_0x211267){case'wait':{const _0x4a6731=_0x33644e;let _0x566998;return _0x4a6731['condition']&&(_0x566998={'segment':_0x4a6731[_0x5610c7(0x19d)][_0x5610c7(0x10d)],..._0x4a6731[_0x5610c7(0x19d)][_0x5610c7(0x133)]!==undefined&&{'next':_0x4a6731[_0x5610c7(0x19d)][_0x5610c7(0x133)]},..._0x4a6731['condition'][_0x5610c7(0x189)]&&{'timeout':{'duration':_0x4a6731[_0x5610c7(0x19d)][_0x5610c7(0x189)][_0x5610c7(0x185)],'unit':_0x4a6731[_0x5610c7(0x19d)][_0x5610c7(0x189)][_0x5610c7(0x126)],..._0x4a6731[_0x5610c7(0x19d)][_0x5610c7(0x189)][_0x5610c7(0x133)]!==undefined&&{'next':_0x4a6731['condition'][_0x5610c7(0x189)][_0x5610c7(0x133)]}}}}),{..._0x4a6731[_0x5610c7(0x185)]!==undefined&&{'duration':_0x4a6731[_0x5610c7(0x185)]},..._0x4a6731[_0x5610c7(0x126)]!==undefined&&{'unit':_0x4a6731['unit']},..._0x4a6731[_0x5610c7(0x13b)]!==undefined&&{'wait_until':_0x4a6731['wait_until']},..._0x4a6731[_0x5610c7(0x184)]!==undefined&&{'days_of_week':_0x4a6731[_0x5610c7(0x184)]},..._0x566998&&{'condition':_0x566998}};}case _0x5610c7(0x162):{const _0x232c54=_0x33644e;return{'activation':_0x232c54[_0x5610c7(0x162)]};}case'decision_point':{const _0x5c159e=_0x33644e;return{'branches':_0x5c159e[_0x5610c7(0x178)][_0x5610c7(0x122)](normalizeDecisionBranch)};}case _0x5610c7(0x1a4):{const _0x17100a=_0x33644e;return{..._0x17100a['customized_split']!==undefined&&{'customized_split':_0x17100a[_0x5610c7(0x16c)]},..._0x17100a[_0x5610c7(0x1a8)]!==undefined&&{'unique_id':_0x17100a[_0x5610c7(0x1a8)]},'variants':_0x17100a[_0x5610c7(0x10f)][_0x5610c7(0x122)](normalizeAbTestVariant)};}case _0x5610c7(0x1ae):{const _0x16cdb6=_0x33644e;return{'target':normalizeJumpTarget(_0x16cdb6[_0x5610c7(0x131)])};}default:return _0x33644e;}}function normalizeDecisionBranch(_0x275053){const _0x109988=a147_0x3891ae;return{'name':_0x275053[_0x109988(0x167)],..._0x275053[_0x109988(0x10d)]!==undefined&&{'segment':_0x275053[_0x109988(0x10d)]},..._0x275053[_0x109988(0x1ad)]!==undefined&&{'excluded':_0x275053[_0x109988(0x1ad)]},..._0x275053[_0x109988(0x133)]!==undefined&&{'next':_0x275053['next']}};}function normalizeAbTestVariant(_0x301bcd){const _0x56b263=a147_0x3891ae;return{..._0x301bcd['id']!==undefined&&{'id':_0x301bcd['id']},'name':_0x301bcd['name'],'percentage':_0x301bcd['percentage'],..._0x301bcd[_0x56b263(0x133)]!==undefined&&{'next':_0x301bcd[_0x56b263(0x133)]}};}function normalizeJumpTarget(_0x37f98a){const _0x3f1ea1=a147_0x3891ae;return{'journey':_0x37f98a[_0x3f1ea1(0x107)],'stage':_0x37f98a[_0x3f1ea1(0x14d)],..._0x37f98a['bundle_id']!==undefined&&{'bundle_id':_0x37f98a['bundle_id']}};}function normalizeEmbeddedSegments(_0x27b24b,_0x29715e){const _0x3c6e6c=a147_0x3891ae,_0x316e97={},_0x2c7736=Object[_0x3c6e6c(0x14a)](_0x27b24b),_0x2d9b65=_0x29715e?[..._0x29715e[_0x3c6e6c(0x160)](_0x3d9780=>_0x2c7736[_0x3c6e6c(0x15b)](_0x3d9780)),..._0x2c7736['filter'](_0x2d4e97=>!_0x29715e[_0x3c6e6c(0x15b)](_0x2d4e97))[_0x3c6e6c(0x139)]()]:_0x2c7736['sort']();for(const _0x25ffc2 of _0x2d9b65){const _0x3d3ebd=_0x27b24b[_0x25ffc2];if(_0x3d3ebd[_0x3c6e6c(0x1af)]){const _0x2accc1=_0x3d3ebd[_0x3c6e6c(0x1af)];if(_0x2accc1['type']!=='And'&&_0x2accc1[_0x3c6e6c(0x19a)]!=='Or'){const _0x13c102=_0x2accc1[_0x3c6e6c(0x19a)]??'(missing)';throw new SDKError(ErrorCode[_0x3c6e6c(0x199)],_0x3c6e6c(0x179)+_0x25ffc2+_0x3c6e6c(0x1c0)+('rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27'+_0x13c102+'\x27.\x0a')+_0x3c6e6c(0x102)+_0x3c6e6c(0x1a5)+_0x3c6e6c(0x163)+_0x3c6e6c(0x18d)+_0x3c6e6c(0x196)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x3c6e6c(0x11a));}if(!_0x2accc1['conditions']||!Array[_0x3c6e6c(0x1be)](_0x2accc1[_0x3c6e6c(0x1b8)]))throw new SDKError(ErrorCode[_0x3c6e6c(0x199)],_0x3c6e6c(0x179)+_0x25ffc2+'\x27:\x20'+_0x3c6e6c(0x192)+_0x3c6e6c(0x102)+_0x3c6e6c(0x1a5)+('\x20\x20\x20\x20type:\x20'+_0x2accc1[_0x3c6e6c(0x19a)]+'\x0a')+_0x3c6e6c(0x18d)+_0x3c6e6c(0x196)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x3c6e6c(0x11a));}_0x316e97[_0x25ffc2]={..._0x3d3ebd[_0x3c6e6c(0x1a7)]&&_0x3d3ebd[_0x3c6e6c(0x1a7)][_0x3c6e6c(0x123)]()&&{'description':_0x3d3ebd[_0x3c6e6c(0x1a7)]},..._0x3d3ebd[_0x3c6e6c(0x1af)]&&{'rule':deepSortObject(_0x3d3ebd[_0x3c6e6c(0x1af)])}};}return _0x316e97;}function normalizeEmbeddedActivations(_0x3467a4,_0x335a5a){const _0x46931a=a147_0x3891ae,_0x55b013={},_0x1b5831=Object['keys'](_0x3467a4),_0x5e314d=_0x335a5a?[..._0x335a5a[_0x46931a(0x160)](_0x26525c=>_0x1b5831[_0x46931a(0x15b)](_0x26525c)),..._0x1b5831[_0x46931a(0x160)](_0x1308fa=>!_0x335a5a[_0x46931a(0x15b)](_0x1308fa))[_0x46931a(0x139)]()]:_0x1b5831[_0x46931a(0x139)]();for(const _0x582dfb of _0x5e314d){const _0x2bbe1f=_0x3467a4[_0x582dfb];_0x55b013[_0x582dfb]={'name':_0x2bbe1f[_0x46931a(0x167)],'connection':_0x2bbe1f[_0x46931a(0x13a)],..._0x2bbe1f[_0x46931a(0x1a7)]!==undefined&&{'description':_0x2bbe1f[_0x46931a(0x1a7)]},..._0x2bbe1f[_0x46931a(0x14b)]!==undefined&&{'all_columns':_0x2bbe1f['all_columns']},..._0x2bbe1f[_0x46931a(0x17f)]!==undefined&&{'columns':_0x2bbe1f['columns']},..._0x2bbe1f[_0x46931a(0x16e)]!==undefined&&{'behavior':_0x2bbe1f[_0x46931a(0x16e)]},..._0x2bbe1f['schedule']!==undefined&&{'schedule':_0x2bbe1f[_0x46931a(0x10c)]},..._0x2bbe1f[_0x46931a(0x17d)]!==undefined&&{'notification':_0x2bbe1f[_0x46931a(0x17d)]},..._0x2bbe1f[_0x46931a(0x183)]!==undefined&&{'connector_config':_0x2bbe1f[_0x46931a(0x183)]},..._0x2bbe1f[_0x46931a(0x12e)]!==undefined&&{'activation_template_id':_0x2bbe1f['activation_template_id']}};}return _0x55b013;}export function getActiveStages(_0x52a2e0){const _0x475283=a147_0x3891ae;if(isJourneysArrayMode(_0x52a2e0)){const _0x3d92a4=_0x52a2e0['journeys']||[],_0x5db487=_0x3d92a4[_0x475283(0x1bb)](_0x3a9282=>_0x3a9282[_0x475283(0x134)]===!![])||_0x3d92a4[0x0];return _0x5db487?.[_0x475283(0x1a1)]||[];}if(isSingleVersionMode(_0x52a2e0))return _0x52a2e0['stages']||[];if(isMultiVersionMode(_0x52a2e0)){const _0x469dc8=_0x52a2e0[_0x475283(0x1a2)]||[],_0x45d33e=_0x469dc8[_0x475283(0x1bb)](_0x3d83cc=>_0x3d83cc['latest']===!![])||_0x469dc8[0x0];return _0x45d33e?.[_0x475283(0x1a1)]||[];}return[];}export function getLatestJourneyEntry(_0x5ad297){const _0x362798=a147_0x3891ae;if(isJourneysArrayMode(_0x5ad297)){const _0x17762d=_0x5ad297[_0x362798(0x175)]||[];return _0x17762d['find'](_0x3efb77=>_0x3efb77['latest']===!![])||_0x17762d[0x0];}if(isMultiVersionMode(_0x5ad297)){const _0x56fe66=_0x5ad297[_0x362798(0x1a2)]||[],_0x357ce8=_0x56fe66[_0x362798(0x1bb)](_0x1afdd6=>_0x1afdd6[_0x362798(0x134)]===!![])||_0x56fe66[0x0];if(_0x357ce8)return{'version':_0x357ce8[_0x362798(0x167)],'state':_0x357ce8[_0x362798(0x141)],'latest':_0x357ce8[_0x362798(0x134)],'stages':_0x357ce8[_0x362798(0x1a1)],'id':_0x357ce8['id'],'version_number':_0x357ce8[_0x362798(0x156)]};}if(isSingleVersionMode(_0x5ad297))return{'version':_0x5ad297[_0x362798(0x13f)]||'v1','state':'draft','stages':_0x5ad297[_0x362798(0x1a1)]||[],'id':_0x5ad297['id'],'version_number':_0x5ad297['version_number'],'goal':_0x5ad297[_0x362798(0x16a)],'reentry':_0x5ad297['reentry']};return undefined;}export function getLatestVersion(_0x2b741e){const _0x5afefe=a147_0x3891ae;if(!isMultiVersionMode(_0x2b741e))return undefined;const _0x583663=_0x2b741e[_0x5afefe(0x1a2)]||[];return _0x583663[_0x5afefe(0x1bb)](_0x3482d3=>_0x3482d3[_0x5afefe(0x134)]===!![])||_0x583663[0x0];}export function getEffectiveGoal(_0x45f5da){const _0x1fd868=a147_0x3891ae,_0x407ee4=getLatestJourneyEntry(_0x45f5da);return _0x407ee4?.['goal']||_0x45f5da[_0x1fd868(0x16a)];}export function getEffectiveReentry(_0xede86b){const _0x5470f7=a147_0x3891ae,_0x45ea8b=getLatestJourneyEntry(_0xede86b);return _0x45ea8b?.[_0x5470f7(0x10e)]||_0xede86b['reentry'];}export function collectSegmentRefs(_0x51a1d2){const _0x10832a=a147_0x3891ae,_0x848fdd=new Set();_0x51a1d2['goal']?.['segment']&&_0x848fdd[_0x10832a(0x181)](_0x51a1d2[_0x10832a(0x16a)][_0x10832a(0x10d)]);const _0x498e74=_0x59641e=>{const _0x48e89e=_0x10832a;for(const _0x3104ec of _0x59641e){_0x3104ec[_0x48e89e(0x128)]?.['segment']&&_0x848fdd['add'](_0x3104ec[_0x48e89e(0x128)][_0x48e89e(0x10d)]);if(_0x3104ec[_0x48e89e(0x108)])for(const _0x475990 of _0x3104ec[_0x48e89e(0x108)]){_0x475990[_0x48e89e(0x10d)]&&_0x848fdd['add'](_0x475990[_0x48e89e(0x10d)]);}_0x3104ec[_0x48e89e(0x142)]?.[_0x48e89e(0x10d)]&&_0x848fdd['add'](_0x3104ec[_0x48e89e(0x142)][_0x48e89e(0x10d)]);if(_0x3104ec[_0x48e89e(0x111)])for(const _0x348776 of _0x3104ec[_0x48e89e(0x111)]){if(_0x348776[_0x48e89e(0x19a)]==='decision_point'){const _0x36a7c3=_0x348776;for(const _0x51bea6 of _0x36a7c3[_0x48e89e(0x11c)][_0x48e89e(0x178)]){_0x51bea6[_0x48e89e(0x10d)]&&_0x848fdd[_0x48e89e(0x181)](_0x51bea6['segment']);}}else{if(_0x348776[_0x48e89e(0x19a)]===_0x48e89e(0x152)){const _0x233db7=_0x348776;_0x233db7[_0x48e89e(0x11c)][_0x48e89e(0x19d)]?.['segment']&&_0x848fdd[_0x48e89e(0x181)](_0x233db7[_0x48e89e(0x11c)][_0x48e89e(0x19d)][_0x48e89e(0x10d)]);}}}}};_0x51a1d2['stages']&&_0x498e74(_0x51a1d2['stages']);if(_0x51a1d2[_0x10832a(0x1a2)])for(const _0x121937 of _0x51a1d2[_0x10832a(0x1a2)]){_0x498e74(_0x121937['stages']);}return _0x848fdd;}export function validateSegmentRefs(_0x2e7540){const _0x751f89=a147_0x3891ae,_0x4b4cae=[],_0x3df17b=collectSegmentRefs(_0x2e7540),_0x1802d6=new Set(Object[_0x751f89(0x14a)](_0x2e7540[_0x751f89(0x1b0)]||{}));for(const _0x4fe101 of _0x3df17b){const _0x3acb07=parseSegmentRef(_0x4fe101);_0x3acb07[_0x751f89(0x19a)]===_0x751f89(0x12d)&&!_0x1802d6[_0x751f89(0x12b)](_0x3acb07['name'])&&_0x4b4cae[_0x751f89(0x151)](_0x751f89(0x15f)+_0x3acb07[_0x751f89(0x167)]+_0x751f89(0x106)+_0x3acb07['name']+'\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.');}return _0x4b4cae;}export function collectSegmentIdsFromJourneyApi(_0x1dcd16){const _0x27e9f4=a147_0x3891ae,_0x1927e0=new Set();_0x1dcd16[_0x27e9f4(0x16d)][_0x27e9f4(0x16a)]?.['segmentId']&&_0x1927e0['add'](_0x1dcd16[_0x27e9f4(0x16d)][_0x27e9f4(0x16a)]['segmentId']);const _0x16f262=_0x1dcd16[_0x27e9f4(0x16d)][_0x27e9f4(0x105)];if(Array[_0x27e9f4(0x1be)](_0x16f262))for(const _0x433139 of _0x16f262){_0x433139[_0x27e9f4(0x161)]?.[_0x27e9f4(0x15a)]&&_0x1927e0[_0x27e9f4(0x181)](_0x433139[_0x27e9f4(0x161)][_0x27e9f4(0x15a)]);const _0x4ede13=_0x433139[_0x27e9f4(0x195)]??_0x433139[_0x27e9f4(0x1a0)];if(Array['isArray'](_0x4ede13))for(const _0x1fe4d0 of _0x4ede13){_0x1fe4d0[_0x27e9f4(0x15a)]&&_0x1927e0[_0x27e9f4(0x181)](_0x1fe4d0[_0x27e9f4(0x15a)]);}_0x433139[_0x27e9f4(0x142)]?.[_0x27e9f4(0x15a)]&&_0x1927e0[_0x27e9f4(0x181)](_0x433139['milestone'][_0x27e9f4(0x15a)]);if(_0x433139['steps']&&typeof _0x433139[_0x27e9f4(0x111)]==='object'){const _0x589e83=Array[_0x27e9f4(0x1be)](_0x433139[_0x27e9f4(0x111)])?_0x433139[_0x27e9f4(0x111)]:Object['values'](_0x433139[_0x27e9f4(0x111)]);for(const _0x5d4d9c of _0x589e83){_0x5d4d9c[_0x27e9f4(0x1bf)]?.[_0x27e9f4(0x15a)]&&_0x1927e0['add'](_0x5d4d9c['waitCondition'][_0x27e9f4(0x15a)]);const _0x5562cc=_0x5d4d9c;_0x5562cc[_0x27e9f4(0x170)]&&_0x1927e0['add'](_0x5562cc['conditionSegmentId']);if(Array[_0x27e9f4(0x1be)](_0x5562cc[_0x27e9f4(0x1b8)]))for(const _0x28b5d0 of _0x5562cc[_0x27e9f4(0x1b8)]){_0x28b5d0[_0x27e9f4(0x15a)]&&_0x1927e0[_0x27e9f4(0x181)](_0x28b5d0['segmentId']);}if(Array[_0x27e9f4(0x1be)](_0x5d4d9c[_0x27e9f4(0x178)]))for(const _0x19fc9f of _0x5d4d9c[_0x27e9f4(0x178)]){_0x19fc9f[_0x27e9f4(0x15a)]&&_0x1927e0[_0x27e9f4(0x181)](_0x19fc9f[_0x27e9f4(0x15a)]);}}}}return _0x1927e0;}
|
|
1
|
+
const a147_0x50c8cb=a147_0x1ab7;(function(_0x4cca25,_0x93b9a3){const _0x4466db=a147_0x1ab7,_0x3a5a8f=_0x4cca25();while(!![]){try{const _0x11c4f7=parseInt(_0x4466db(0x223))/0x1+parseInt(_0x4466db(0x1fb))/0x2+parseInt(_0x4466db(0x23f))/0x3*(-parseInt(_0x4466db(0x24b))/0x4)+parseInt(_0x4466db(0x234))/0x5*(parseInt(_0x4466db(0x213))/0x6)+parseInt(_0x4466db(0x256))/0x7*(parseInt(_0x4466db(0x1ea))/0x8)+parseInt(_0x4466db(0x23a))/0x9*(parseInt(_0x4466db(0x2a3))/0xa)+-parseInt(_0x4466db(0x22e))/0xb;if(_0x11c4f7===_0x93b9a3)break;else _0x3a5a8f['push'](_0x3a5a8f['shift']());}catch(_0x21c6e6){_0x3a5a8f['push'](_0x3a5a8f['shift']());}}}(a147_0x3a50,0x91f0a));import*as a147_0x2eeb9d from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x11ea56){const _0x55aac3=a147_0x1ab7,_0xf63895=_0x11ea56[_0x55aac3(0x27b)]();if(_0xf63895==='days'||_0xf63895===_0x55aac3(0x247))return _0x55aac3(0x247);if(_0xf63895==='weeks'||_0xf63895===_0x55aac3(0x284))return _0x55aac3(0x284);return _0x11ea56;}export function journeyResponseToDefSync(_0x4beddd){const _0x3f731c=a147_0x1ab7,_0x5560fe=_0x4beddd['attributes'],_0x23a3b6=_0x5560fe[_0x3f731c(0x25e)]||_0x5560fe[_0x3f731c(0x29f)],_0x37a76e={'stages':_0x5560fe[_0x3f731c(0x2a0)][_0x3f731c(0x232)](convertApiStageToYaml),'id':_0x4beddd['id']};_0x5560fe['goal']&&(_0x37a76e['goal']=convertApiCriteriaToYaml(_0x5560fe['goal']));_0x5560fe[_0x3f731c(0x29f)]&&_0x5560fe['name']!==_0x23a3b6&&(_0x37a76e[_0x3f731c(0x205)]=_0x5560fe[_0x3f731c(0x29f)]);_0x5560fe[_0x3f731c(0x224)]!==undefined&&(_0x37a76e[_0x3f731c(0x26f)]=_0x5560fe[_0x3f731c(0x224)]);_0x5560fe['state']&&(_0x37a76e[_0x3f731c(0x243)]=_0x5560fe['state']===_0x3f731c(0x242)?_0x3f731c(0x242):_0x3f731c(0x20a));const _0x11fe56={'type':_0x3f731c(0x2ae),'name':_0x23a3b6,'journeys':[_0x37a76e]};_0x5560fe[_0x3f731c(0x203)]&&(_0x11fe56['description']=_0x5560fe[_0x3f731c(0x203)]);_0x5560fe[_0x3f731c(0x28c)]&&(_0x11fe56[_0x3f731c(0x28c)]=convertApiCriteriaToYaml(_0x5560fe[_0x3f731c(0x28c)]));if(_0x5560fe[_0x3f731c(0x2a7)])_0x11fe56[_0x3f731c(0x2a9)]=_0x5560fe[_0x3f731c(0x2a7)];else _0x5560fe[_0x3f731c(0x1eb)]!==undefined&&(_0x11fe56[_0x3f731c(0x2a9)]=_0x5560fe[_0x3f731c(0x1eb)]?_0x3f731c(0x290):_0x3f731c(0x1f1));return _0x5560fe[_0x3f731c(0x23c)]&&(_0x11fe56[_0x3f731c(0x272)]=_0x5560fe[_0x3f731c(0x23c)]),_0x5560fe[_0x3f731c(0x25e)]&&(_0x11fe56[_0x3f731c(0x269)]=_0x5560fe[_0x3f731c(0x25e)]),_0x4beddd[_0x3f731c(0x273)]?.[_0x3f731c(0x29e)]?.[_0x3f731c(0x254)]?.['id']&&(_0x11fe56[_0x3f731c(0x239)]=_0x4beddd['relationships'][_0x3f731c(0x29e)][_0x3f731c(0x254)]['id']),_0x11fe56;}export async function journeyResponseToDef(_0x432ace,_0x318b26){const _0x39702c=a147_0x1ab7,_0x28a8b9=journeyResponseToDefSync(_0x432ace);if(!_0x318b26)return _0x28a8b9;const _0x26e379=new Set();collectSegmentIdsFromJourney(_0x28a8b9,_0x26e379);const _0x489e5a=new Set();collectActivationIdsFromJourney(_0x28a8b9,_0x489e5a);const _0x276856={},_0x1405a1=new Map();for(const _0x5ae176 of Array['from'](_0x26e379)[_0x39702c(0x222)]()){if(_0x318b26[_0x39702c(0x25d)]){const _0xceb98e=await _0x318b26[_0x39702c(0x25d)](_0x5ae176);if(_0xceb98e[_0x39702c(0x250)]){_0x1405a1[_0x39702c(0x295)](_0x5ae176,_0xceb98e[_0x39702c(0x29f)]);if(_0xceb98e[_0x39702c(0x216)]){const _0x221f82={..._0xceb98e[_0x39702c(0x216)],'rule':deepSortObject(_0xceb98e[_0x39702c(0x216)][_0x39702c(0x248)])};_0x276856[_0xceb98e[_0x39702c(0x29f)]]=_0x221f82;}}else _0x1405a1['set'](_0x5ae176,makeSegmentRef(_0xceb98e[_0x39702c(0x29f)]));}else{if(_0x318b26['resolveSegmentName']){const _0x540d29=await _0x318b26['resolveSegmentName'](_0x5ae176);_0x1405a1[_0x39702c(0x295)](_0x5ae176,_0x540d29);}}}const _0x4ccb16={},_0x1710a2=new Map();for(const _0x3e4623 of Array['from'](_0x489e5a)[_0x39702c(0x222)]()){if(_0x318b26[_0x39702c(0x1f0)]){const _0x15d682=await _0x318b26['resolveActivation'](_0x3e4623);_0x15d682[_0x39702c(0x250)]?(_0x1710a2[_0x39702c(0x295)](_0x3e4623,_0x15d682[_0x39702c(0x29f)]),_0x15d682[_0x39702c(0x216)]&&(_0x4ccb16[_0x15d682[_0x39702c(0x29f)]]=_0x15d682[_0x39702c(0x216)])):_0x1710a2[_0x39702c(0x295)](_0x3e4623,makeSegmentRef(_0x15d682[_0x39702c(0x29f)]));}else{if(_0x318b26[_0x39702c(0x210)]){const _0x58c804=await _0x318b26[_0x39702c(0x210)](_0x3e4623);_0x1710a2[_0x39702c(0x295)](_0x3e4623,_0x58c804);}}}_0x1405a1['size']>0x0&&replaceSegmentIdsInJourney(_0x28a8b9,_0x1405a1);_0x1710a2[_0x39702c(0x260)]>0x0&&replaceActivationIdsInJourney(_0x28a8b9,_0x1710a2);if(_0x318b26['resolveJumpTarget']){const _0x1cb602=[];collectJumpTargetsFromJourney(_0x28a8b9,_0x1cb602);if(_0x1cb602[_0x39702c(0x22d)]>0x0){const _0x2ebfe2=new Map();for(const _0x1515f9 of _0x1cb602){try{const _0xa8bad2=await _0x318b26[_0x39702c(0x208)](_0x1515f9[_0x39702c(0x217)],_0x1515f9['stageId']);_0x2ebfe2[_0x39702c(0x295)](_0x1515f9['journeyId']+':'+_0x1515f9[_0x39702c(0x235)],_0xa8bad2);}catch{}}_0x2ebfe2[_0x39702c(0x260)]>0x0&&replaceJumpTargetsInJourney(_0x28a8b9,_0x2ebfe2);}}return Object[_0x39702c(0x276)](_0x276856)[_0x39702c(0x22d)]>0x0&&(_0x28a8b9[_0x39702c(0x257)]=_0x276856),Object[_0x39702c(0x276)](_0x4ccb16)[_0x39702c(0x22d)]>0x0&&(_0x28a8b9[_0x39702c(0x22a)]=_0x4ccb16),_0x28a8b9;}function collectSegmentIdsFromJourney(_0x2d7213,_0x224896){const _0x46e8d3=a147_0x1ab7;_0x2d7213['goal']?.[_0x46e8d3(0x283)]&&_0x224896[_0x46e8d3(0x1f5)](_0x2d7213[_0x46e8d3(0x28c)][_0x46e8d3(0x283)]);const _0xeaf04c=_0x389ca0=>{const _0x2b9fc5=_0x46e8d3;for(const _0x309fb4 of _0x389ca0){_0x309fb4[_0x2b9fc5(0x230)]?.[_0x2b9fc5(0x283)]&&_0x224896[_0x2b9fc5(0x1f5)](_0x309fb4[_0x2b9fc5(0x230)][_0x2b9fc5(0x283)]);if(_0x309fb4[_0x2b9fc5(0x28f)])for(const _0x26c702 of _0x309fb4[_0x2b9fc5(0x28f)]){_0x26c702[_0x2b9fc5(0x283)]&&_0x224896[_0x2b9fc5(0x1f5)](_0x26c702['segment']);}_0x309fb4['milestone']?.[_0x2b9fc5(0x283)]&&_0x224896[_0x2b9fc5(0x1f5)](_0x309fb4[_0x2b9fc5(0x274)][_0x2b9fc5(0x283)]);if(_0x309fb4[_0x2b9fc5(0x262)])for(const _0x280f66 of _0x309fb4[_0x2b9fc5(0x262)]){if(_0x280f66[_0x2b9fc5(0x281)]===_0x2b9fc5(0x1fd)){const _0xa0baed=_0x280f66;for(const _0x2bcfd9 of _0xa0baed['with']['branches']){_0x2bcfd9['segment']&&_0x224896[_0x2b9fc5(0x1f5)](_0x2bcfd9[_0x2b9fc5(0x283)]);}}else{if(_0x280f66[_0x2b9fc5(0x281)]===_0x2b9fc5(0x22b)){const _0x45a4e2=_0x280f66;_0x45a4e2[_0x2b9fc5(0x28b)][_0x2b9fc5(0x297)]?.['segment']&&_0x224896[_0x2b9fc5(0x1f5)](_0x45a4e2['with'][_0x2b9fc5(0x297)][_0x2b9fc5(0x283)]);}}}}};if(_0x2d7213[_0x46e8d3(0x28a)])for(const _0x92bb8a of _0x2d7213[_0x46e8d3(0x28a)]){_0x92bb8a['goal']?.[_0x46e8d3(0x283)]&&_0x224896['add'](_0x92bb8a[_0x46e8d3(0x28c)]['segment']),_0xeaf04c(_0x92bb8a[_0x46e8d3(0x20c)]);}_0x2d7213[_0x46e8d3(0x20c)]&&_0xeaf04c(_0x2d7213[_0x46e8d3(0x20c)]);if(_0x2d7213[_0x46e8d3(0x2b0)])for(const _0x119b23 of _0x2d7213[_0x46e8d3(0x2b0)]){_0xeaf04c(_0x119b23[_0x46e8d3(0x20c)]);}}function replaceSegmentIdsInJourney(_0x37a9e6,_0x4a6b81){const _0x3f44fa=a147_0x1ab7,_0x4acc79=_0x2ad100=>_0x4a6b81[_0x3f44fa(0x280)](_0x2ad100)||_0x2ad100;_0x37a9e6[_0x3f44fa(0x28c)]?.[_0x3f44fa(0x283)]&&(_0x37a9e6[_0x3f44fa(0x28c)]['segment']=_0x4acc79(_0x37a9e6[_0x3f44fa(0x28c)]['segment']));const _0x2e0fa9=_0x589b5a=>{const _0x390565=_0x3f44fa;for(const _0xa53f34 of _0x589b5a){_0xa53f34[_0x390565(0x230)]?.['segment']&&(_0xa53f34[_0x390565(0x230)][_0x390565(0x283)]=_0x4acc79(_0xa53f34[_0x390565(0x230)][_0x390565(0x283)]));if(_0xa53f34[_0x390565(0x28f)])for(const _0x145a93 of _0xa53f34[_0x390565(0x28f)]){_0x145a93[_0x390565(0x283)]&&(_0x145a93[_0x390565(0x283)]=_0x4acc79(_0x145a93[_0x390565(0x283)]));}_0xa53f34[_0x390565(0x274)]?.['segment']&&(_0xa53f34[_0x390565(0x274)][_0x390565(0x283)]=_0x4acc79(_0xa53f34['milestone'][_0x390565(0x283)]));if(_0xa53f34[_0x390565(0x262)])for(const _0x214b40 of _0xa53f34['steps']){if(_0x214b40['type']===_0x390565(0x1fd)){const _0x593230=_0x214b40;for(const _0x402a42 of _0x593230['with'][_0x390565(0x25a)]){_0x402a42[_0x390565(0x283)]&&(_0x402a42[_0x390565(0x283)]=_0x4acc79(_0x402a42[_0x390565(0x283)]));}}else{if(_0x214b40[_0x390565(0x281)]===_0x390565(0x22b)){const _0x1c8def=_0x214b40;_0x1c8def[_0x390565(0x28b)]['condition']?.['segment']&&(_0x1c8def[_0x390565(0x28b)][_0x390565(0x297)][_0x390565(0x283)]=_0x4acc79(_0x1c8def[_0x390565(0x28b)][_0x390565(0x297)][_0x390565(0x283)]));}}}}};if(_0x37a9e6[_0x3f44fa(0x28a)])for(const _0x42cd7e of _0x37a9e6[_0x3f44fa(0x28a)]){_0x42cd7e[_0x3f44fa(0x28c)]?.['segment']&&(_0x42cd7e[_0x3f44fa(0x28c)][_0x3f44fa(0x283)]=_0x4acc79(_0x42cd7e[_0x3f44fa(0x28c)][_0x3f44fa(0x283)])),_0x2e0fa9(_0x42cd7e[_0x3f44fa(0x20c)]);}_0x37a9e6[_0x3f44fa(0x20c)]&&_0x2e0fa9(_0x37a9e6[_0x3f44fa(0x20c)]);if(_0x37a9e6['versions'])for(const _0x40ebcd of _0x37a9e6[_0x3f44fa(0x2b0)]){_0x2e0fa9(_0x40ebcd[_0x3f44fa(0x20c)]);}}function collectActivationIdsFromJourney(_0xebb90b,_0x41327a){const _0x2226b4=a147_0x1ab7,_0x5b8528=_0x123c34=>{const _0xfe733a=a147_0x1ab7;for(const _0x499088 of _0x123c34){if(_0x499088[_0xfe733a(0x262)])for(const _0x2ef63d of _0x499088[_0xfe733a(0x262)]){if(_0x2ef63d[_0xfe733a(0x281)]===_0xfe733a(0x1ef)){const _0x44e0a4=_0x2ef63d;_0x44e0a4['with']['activation']&&/^\d+$/[_0xfe733a(0x265)](_0x44e0a4[_0xfe733a(0x28b)][_0xfe733a(0x1ef)])&&_0x41327a[_0xfe733a(0x1f5)](_0x44e0a4[_0xfe733a(0x28b)][_0xfe733a(0x1ef)]);}}}};if(_0xebb90b[_0x2226b4(0x28a)])for(const _0x3f52ba of _0xebb90b['journeys']){_0x5b8528(_0x3f52ba[_0x2226b4(0x20c)]);}_0xebb90b[_0x2226b4(0x20c)]&&_0x5b8528(_0xebb90b[_0x2226b4(0x20c)]);if(_0xebb90b[_0x2226b4(0x2b0)])for(const _0x8ad5f1 of _0xebb90b[_0x2226b4(0x2b0)]){_0x5b8528(_0x8ad5f1[_0x2226b4(0x20c)]);}}function replaceActivationIdsInJourney(_0x1384b7,_0x41dff8){const _0x4ef9bf=a147_0x1ab7,_0x3dfe17=_0x3572dd=>_0x41dff8[_0x4ef9bf(0x280)](_0x3572dd)||_0x3572dd,_0x17547b=_0x42dfb3=>{const _0x111373=_0x4ef9bf;for(const _0x3f820d of _0x42dfb3){if(_0x3f820d['steps'])for(const _0x4c9d56 of _0x3f820d['steps']){if(_0x4c9d56[_0x111373(0x281)]===_0x111373(0x1ef)){const _0x123a58=_0x4c9d56;_0x123a58[_0x111373(0x28b)][_0x111373(0x1ef)]&&(_0x123a58[_0x111373(0x28b)][_0x111373(0x1ef)]=_0x3dfe17(_0x123a58[_0x111373(0x28b)][_0x111373(0x1ef)]));}}}};if(_0x1384b7[_0x4ef9bf(0x28a)])for(const _0x531e6c of _0x1384b7['journeys']){_0x17547b(_0x531e6c['stages']);}_0x1384b7[_0x4ef9bf(0x20c)]&&_0x17547b(_0x1384b7[_0x4ef9bf(0x20c)]);if(_0x1384b7['versions'])for(const _0x3fb9ad of _0x1384b7[_0x4ef9bf(0x2b0)]){_0x17547b(_0x3fb9ad[_0x4ef9bf(0x20c)]);}}function collectJumpTargetsFromJourney(_0x6f2d37,_0x3ab58b){const _0x3dcea9=a147_0x1ab7,_0x3a6e43=new Set(),_0x19b9c8=_0x435781=>{const _0x4481ae=a147_0x1ab7;for(const _0x2c59cf of _0x435781){if(_0x2c59cf[_0x4481ae(0x262)])for(const _0x3a7a62 of _0x2c59cf[_0x4481ae(0x262)]){if(_0x3a7a62[_0x4481ae(0x281)]==='jump'){const _0x12b874=_0x3a7a62,_0xc57d3=_0x12b874[_0x4481ae(0x28b)][_0x4481ae(0x207)];if(_0xc57d3[_0x4481ae(0x2ae)]&&_0xc57d3['stage']&&/^\d+$/[_0x4481ae(0x265)](_0xc57d3[_0x4481ae(0x2ae)])&&/^\d+$/['test'](_0xc57d3['stage'])){const _0x1191ae=_0xc57d3[_0x4481ae(0x2ae)]+':'+_0xc57d3['stage'];!_0x3a6e43[_0x4481ae(0x25b)](_0x1191ae)&&(_0x3a6e43['add'](_0x1191ae),_0x3ab58b[_0x4481ae(0x253)]({'journeyId':_0xc57d3[_0x4481ae(0x2ae)],'stageId':_0xc57d3['stage']}));}}}}};if(_0x6f2d37[_0x3dcea9(0x28a)])for(const _0x40b2a3 of _0x6f2d37[_0x3dcea9(0x28a)]){_0x19b9c8(_0x40b2a3[_0x3dcea9(0x20c)]);}_0x6f2d37[_0x3dcea9(0x20c)]&&_0x19b9c8(_0x6f2d37['stages']);if(_0x6f2d37[_0x3dcea9(0x2b0)])for(const _0xf5355e of _0x6f2d37[_0x3dcea9(0x2b0)]){_0x19b9c8(_0xf5355e[_0x3dcea9(0x20c)]);}}function replaceJumpTargetsInJourney(_0x39a221,_0x545043){const _0x1d7b55=a147_0x1ab7,_0x1e94fc=_0x107b64=>{const _0x21d996=a147_0x1ab7;for(const _0x1255ed of _0x107b64){if(_0x1255ed['steps'])for(const _0x21f1db of _0x1255ed[_0x21d996(0x262)]){if(_0x21f1db[_0x21d996(0x281)]===_0x21d996(0x244)){const _0x2e3396=_0x21f1db,_0x4dac70=_0x2e3396[_0x21d996(0x28b)][_0x21d996(0x207)],_0x2b2683=_0x4dac70[_0x21d996(0x2ae)]+':'+_0x4dac70[_0x21d996(0x24e)],_0x34de1f=_0x545043[_0x21d996(0x280)](_0x2b2683);_0x34de1f&&(_0x4dac70[_0x21d996(0x2ae)]=_0x34de1f[_0x21d996(0x2a5)],_0x4dac70[_0x21d996(0x24e)]=_0x34de1f['stageName']);}}}};if(_0x39a221[_0x1d7b55(0x28a)])for(const _0x27bde6 of _0x39a221[_0x1d7b55(0x28a)]){_0x1e94fc(_0x27bde6['stages']);}_0x39a221[_0x1d7b55(0x20c)]&&_0x1e94fc(_0x39a221[_0x1d7b55(0x20c)]);if(_0x39a221[_0x1d7b55(0x2b0)])for(const _0x55586b of _0x39a221[_0x1d7b55(0x2b0)]){_0x1e94fc(_0x55586b[_0x1d7b55(0x20c)]);}}function generateReadableStepName(_0x2c2de4,_0x5c75d5){const _0x3812e9=a147_0x1ab7;if(_0x2c2de4[_0x3812e9(0x29f)]&&_0x2c2de4[_0x3812e9(0x29f)]!==_0x2c2de4[_0x3812e9(0x281)]){const _0x4ebb61=_0x2c2de4[_0x3812e9(0x29f)][_0x3812e9(0x236)]();if(_0x4ebb61&&/[a-z0-9\p{L}]/iu[_0x3812e9(0x265)](_0x4ebb61))return _0x4ebb61;}const _0x2ddf6d=_0x2c2de4[_0x3812e9(0x281)][_0x3812e9(0x27b)]()[_0x3812e9(0x212)](/step$/i,'');return _0x2ddf6d+'_'+(_0x5c75d5+0x1);}function getStepNextRefs(_0x109372){const _0x50fc8d=a147_0x1ab7,_0x220906=[];if(_0x109372[_0x50fc8d(0x258)])_0x220906['push'](_0x109372['next']);if(_0x109372['branches'])for(const _0x4fecd3 of _0x109372[_0x50fc8d(0x25a)]){if(_0x4fecd3[_0x50fc8d(0x258)])_0x220906[_0x50fc8d(0x253)](_0x4fecd3[_0x50fc8d(0x258)]);}if(_0x109372['variants'])for(const _0x4ffc24 of _0x109372[_0x50fc8d(0x1fa)]){if(_0x4ffc24[_0x50fc8d(0x258)])_0x220906[_0x50fc8d(0x253)](_0x4ffc24[_0x50fc8d(0x258)]);}if(_0x109372[_0x50fc8d(0x238)])for(const _0x1ceb22 of _0x109372['conditions']){if(_0x1ceb22['next'])_0x220906[_0x50fc8d(0x253)](_0x1ceb22[_0x50fc8d(0x258)]);}return _0x220906;}function parseJumpTargetDisplayName(_0x4274b4){const _0x4090d6=a147_0x1ab7,_0x28815e=_0x4274b4[_0x4090d6(0x26c)](/^(.+?)\s*\(([^/)]+)/);if(!_0x28815e)return undefined;const _0x1f9a81=_0x28815e[0x1][_0x4090d6(0x236)](),_0x317ae9=_0x28815e[0x2][_0x4090d6(0x236)]();if(!_0x1f9a81||!_0x317ae9)return undefined;return{'stageName':_0x1f9a81,'journeyName':_0x317ae9};}function orderStepsFromRoot(_0x14a387,_0x4137b5){const _0x5467f6=a147_0x1ab7,_0x31cae4=Object[_0x5467f6(0x241)](_0x14a387);if(_0x31cae4[_0x5467f6(0x22d)]===0x0)return[];const _0x256369=new Set(_0x31cae4[_0x5467f6(0x232)](([_0x5a7d32])=>_0x5a7d32)),_0x2d65a1=new Set();for(const [,_0x477ff1]of _0x31cae4){for(const _0xfaa3fd of getStepNextRefs(_0x477ff1)){if(_0x256369[_0x5467f6(0x25b)](_0xfaa3fd))_0x2d65a1['add'](_0xfaa3fd);}}let _0x4d880c=_0x4137b5&&_0x256369[_0x5467f6(0x25b)](_0x4137b5)?_0x4137b5:undefined;if(!_0x4d880c){const _0x48817e=_0x31cae4[_0x5467f6(0x255)](([_0x5f07e1])=>!_0x2d65a1['has'](_0x5f07e1));_0x48817e['length']>0x0?_0x4d880c=_0x48817e[0x0][0x0]:_0x4d880c=_0x31cae4[0x0][0x0];}const _0x5edeb9=[],_0x4511bc=new Set(),_0x478312=[_0x4d880c];while(_0x478312[_0x5467f6(0x22d)]>0x0){const _0x2cba57=_0x478312[_0x5467f6(0x1f2)]();if(_0x4511bc['has'](_0x2cba57))continue;_0x4511bc[_0x5467f6(0x1f5)](_0x2cba57);const _0x51426c=_0x14a387[_0x2cba57];if(!_0x51426c)continue;_0x5edeb9['push']({'uuid':_0x2cba57,'step':_0x51426c});for(const _0x184c93 of getStepNextRefs(_0x51426c)){_0x256369[_0x5467f6(0x25b)](_0x184c93)&&!_0x4511bc[_0x5467f6(0x25b)](_0x184c93)&&_0x478312[_0x5467f6(0x253)](_0x184c93);}}for(const [_0x35ce4c,_0x468f0d]of _0x31cae4){!_0x4511bc[_0x5467f6(0x25b)](_0x35ce4c)&&_0x5edeb9[_0x5467f6(0x253)]({'uuid':_0x35ce4c,'step':_0x468f0d});}return _0x5edeb9;}function resolveStepReferences(_0x24f066,_0x48b61d,_0x554f33,_0x21ad11){const _0x3cb73b=a147_0x1ab7;if(_0x24f066[_0x3cb73b(0x281)]!==_0x3cb73b(0x2a4)){_0x24f066[_0x3cb73b(0x258)]&&_0x21ad11[_0x3cb73b(0x25b)](_0x24f066[_0x3cb73b(0x258)])&&(_0x24f066[_0x3cb73b(0x258)]=_0x21ad11[_0x3cb73b(0x280)](_0x24f066[_0x3cb73b(0x258)]));const _0x1a8740=_0x48b61d+0x1;if(_0x1a8740<_0x554f33[_0x3cb73b(0x22d)]){const _0x5527a3=_0x21ad11[_0x3cb73b(0x280)](_0x554f33[_0x1a8740][_0x3cb73b(0x2a2)]);_0x24f066['next']===_0x5527a3&&delete _0x24f066['next'];}}if(_0x24f066['type']===_0x3cb73b(0x1fd))for(const _0x220190 of _0x24f066[_0x3cb73b(0x28b)]['branches']){_0x220190[_0x3cb73b(0x258)]&&_0x21ad11['has'](_0x220190[_0x3cb73b(0x258)])&&(_0x220190['next']=_0x21ad11[_0x3cb73b(0x280)](_0x220190[_0x3cb73b(0x258)]));}if(_0x24f066[_0x3cb73b(0x281)]===_0x3cb73b(0x1ee))for(const _0x3eb13b of _0x24f066[_0x3cb73b(0x28b)]['variants']){_0x3eb13b[_0x3cb73b(0x258)]&&_0x21ad11['has'](_0x3eb13b[_0x3cb73b(0x258)])&&(_0x3eb13b[_0x3cb73b(0x258)]=_0x21ad11['get'](_0x3eb13b['next']));}if(_0x24f066[_0x3cb73b(0x281)]===_0x3cb73b(0x22b)&&_0x24f066['with'][_0x3cb73b(0x297)]){const _0x1cfb6b=_0x24f066[_0x3cb73b(0x28b)][_0x3cb73b(0x297)];_0x1cfb6b[_0x3cb73b(0x258)]&&_0x21ad11['has'](_0x1cfb6b[_0x3cb73b(0x258)])&&(_0x1cfb6b[_0x3cb73b(0x258)]=_0x21ad11[_0x3cb73b(0x280)](_0x1cfb6b[_0x3cb73b(0x258)])),_0x1cfb6b['timeout']?.[_0x3cb73b(0x258)]&&_0x21ad11[_0x3cb73b(0x25b)](_0x1cfb6b[_0x3cb73b(0x2b2)][_0x3cb73b(0x258)])&&(_0x1cfb6b['timeout'][_0x3cb73b(0x258)]=_0x21ad11[_0x3cb73b(0x280)](_0x1cfb6b[_0x3cb73b(0x2b2)][_0x3cb73b(0x258)]));}}function convertApiStageToYaml(_0x3ec12a){const _0x3b2f09=a147_0x1ab7,_0x21ff05={'name':_0x3ec12a[_0x3b2f09(0x29f)]};_0x3ec12a['id']&&(_0x21ff05['id']=_0x3ec12a['id']);_0x3ec12a[_0x3b2f09(0x203)]&&(_0x21ff05['description']=_0x3ec12a[_0x3b2f09(0x203)]);_0x3ec12a['entryCriteria']&&(_0x21ff05[_0x3b2f09(0x230)]=convertApiCriteriaToYaml(_0x3ec12a[_0x3b2f09(0x1f4)]));_0x3ec12a[_0x3b2f09(0x26a)]&&_0x3ec12a[_0x3b2f09(0x26a)][_0x3b2f09(0x22d)]>0x0&&(_0x21ff05[_0x3b2f09(0x28f)]=_0x3ec12a[_0x3b2f09(0x26a)][_0x3b2f09(0x232)](convertApiCriteriaToYaml));_0x3ec12a[_0x3b2f09(0x274)]&&(_0x21ff05[_0x3b2f09(0x274)]=convertApiCriteriaToYaml(_0x3ec12a[_0x3b2f09(0x274)]));if(_0x3ec12a[_0x3b2f09(0x262)]&&Object[_0x3b2f09(0x276)](_0x3ec12a[_0x3b2f09(0x262)])[_0x3b2f09(0x22d)]>0x0){const _0xb474c7=orderStepsFromRoot(_0x3ec12a[_0x3b2f09(0x262)],_0x3ec12a['rootStep']),_0x121b30=new Map(),_0x5bca79=new Set();for(let _0x4af2e1=0x0;_0x4af2e1<_0xb474c7[_0x3b2f09(0x22d)];_0x4af2e1++){const {uuid:_0x32ec33,step:_0x40819d}=_0xb474c7[_0x4af2e1];let _0x22a445=generateReadableStepName(_0x40819d,_0x4af2e1),_0x586e4d=_0x22a445,_0x28f3ad=0x2;while(_0x5bca79[_0x3b2f09(0x25b)](_0x586e4d)){_0x586e4d=_0x22a445+'_'+_0x28f3ad,_0x28f3ad++;}_0x5bca79[_0x3b2f09(0x1f5)](_0x586e4d),_0x121b30['set'](_0x32ec33,_0x586e4d);}_0x21ff05[_0x3b2f09(0x262)]=_0xb474c7[_0x3b2f09(0x232)](({uuid:_0x4f5885,step:_0x21a6f9},_0x3f93a2)=>{const _0x4a87b7=convertApiStepToYaml(_0x21a6f9,_0x121b30['get'](_0x4f5885));return resolveStepReferences(_0x4a87b7,_0x3f93a2,_0xb474c7,_0x121b30),_0x4a87b7;});}return _0x21ff05;}function convertApiCriteriaToYaml(_0x561120){const _0x351c51=a147_0x1ab7,_0x27e042={'name':_0x561120['name'],'segment':_0x561120['segmentId']};_0x561120[_0x351c51(0x203)]&&(_0x27e042[_0x351c51(0x203)]=_0x561120['description']);if(_0x561120[_0x351c51(0x207)]){let _0x413110=_0x561120['target'][_0x351c51(0x217)],_0x155737=_0x561120[_0x351c51(0x207)][_0x351c51(0x277)];if(_0x561120['target'][_0x351c51(0x2a5)]){const _0x722582=parseJumpTargetDisplayName(_0x561120[_0x351c51(0x207)][_0x351c51(0x2a5)]);_0x722582&&(_0x155737=_0x722582['stageName'],_0x413110=_0x722582['journeyName']);}_0x27e042[_0x351c51(0x207)]={'journey':_0x413110,'stage':_0x155737},_0x561120[_0x351c51(0x207)][_0x351c51(0x23c)]&&(_0x27e042[_0x351c51(0x207)][_0x351c51(0x272)]=_0x561120[_0x351c51(0x207)]['journeyBundleId']);}return _0x27e042;}function convertApiStepToYaml(_0x2a1dd5,_0xb66247){const _0x244d0f=a147_0x1ab7;switch(_0x2a1dd5['type']){case _0x244d0f(0x21e):{const _0x316810={};if(_0x2a1dd5[_0x244d0f(0x268)]===_0x244d0f(0x21d)&&_0x2a1dd5[_0x244d0f(0x209)]!==undefined)_0x316810[_0x244d0f(0x22c)]=_0x2a1dd5[_0x244d0f(0x209)],_0x316810[_0x244d0f(0x2a1)]=_0x2a1dd5[_0x244d0f(0x233)];else{if(_0x2a1dd5[_0x244d0f(0x268)]===_0x244d0f(0x263)&&_0x2a1dd5[_0x244d0f(0x29a)])_0x316810[_0x244d0f(0x21a)]=_0x2a1dd5[_0x244d0f(0x29a)];else{if(_0x2a1dd5[_0x244d0f(0x268)]===_0x244d0f(0x20e)&&_0x2a1dd5[_0x244d0f(0x279)])_0x316810[_0x244d0f(0x252)]=_0x2a1dd5[_0x244d0f(0x279)];else{if(_0x2a1dd5[_0x244d0f(0x268)]===_0x244d0f(0x26e)){if(_0x2a1dd5['conditions']&&_0x2a1dd5['conditions'][_0x244d0f(0x22d)]>0x0){const _0x4fd417=_0x2a1dd5[_0x244d0f(0x238)][_0x244d0f(0x2a8)](_0xf59d9b=>!_0xf59d9b['timedOutPath']),_0x2dbf48=_0x2a1dd5[_0x244d0f(0x238)][_0x244d0f(0x2a8)](_0x41689d=>_0x41689d['timedOutPath']);_0x4fd417?.[_0x244d0f(0x245)]&&(_0x316810[_0x244d0f(0x297)]={'segment':_0x4fd417['segmentId'],..._0x4fd417[_0x244d0f(0x258)]?{'next':_0x4fd417[_0x244d0f(0x258)]}:{}},_0x2dbf48&&_0x2dbf48[_0x244d0f(0x225)]!==undefined&&_0x2dbf48['unit']&&(_0x316810[_0x244d0f(0x297)]['timeout']={'duration':_0x2dbf48[_0x244d0f(0x225)],'unit':_0x2dbf48['unit'],..._0x2dbf48[_0x244d0f(0x258)]?{'next':_0x2dbf48[_0x244d0f(0x258)]}:{}}));}else _0x2a1dd5[_0x244d0f(0x29b)]&&(_0x316810[_0x244d0f(0x297)]={'segment':_0x2a1dd5[_0x244d0f(0x29b)]},_0x2a1dd5[_0x244d0f(0x27a)]!==undefined&&_0x2a1dd5['conditionTimeoutUnit']&&(_0x316810['condition']['timeout']={'duration':_0x2a1dd5[_0x244d0f(0x27a)],'unit':_0x2a1dd5['conditionTimeoutUnit']}));}}}}const _0x3472f7={'type':_0x244d0f(0x22b),'name':_0xb66247,..._0x2a1dd5['next']?{'next':_0x2a1dd5[_0x244d0f(0x258)]}:{},'with':_0x316810};return _0x3472f7;}case _0x244d0f(0x24c):{const _0x5e2131={'type':_0x244d0f(0x1ef),'name':_0xb66247,..._0x2a1dd5[_0x244d0f(0x258)]?{'next':_0x2a1dd5[_0x244d0f(0x258)]}:{},'with':{'activation':_0x2a1dd5['journeyActivationStepId']||''}};return _0x5e2131;}case _0x244d0f(0x221):{const _0x2995e3={'type':_0x244d0f(0x1fd),'name':_0xb66247,..._0x2a1dd5[_0x244d0f(0x258)]?{'next':_0x2a1dd5[_0x244d0f(0x258)]}:{},'with':{'branches':(_0x2a1dd5[_0x244d0f(0x25a)]||[])[_0x244d0f(0x232)](_0x1efab9=>({'name':_0x1efab9[_0x244d0f(0x29f)],'segment':_0x1efab9[_0x244d0f(0x245)],'excluded':_0x1efab9[_0x244d0f(0x25c)],..._0x1efab9[_0x244d0f(0x258)]?{'next':_0x1efab9[_0x244d0f(0x258)]}:{}}))}};return _0x2995e3;}case'ABTest':case _0x244d0f(0x278):case _0x244d0f(0x206):{const _0x594312=_0x2a1dd5[_0x244d0f(0x1fa)]||(_0x2a1dd5[_0x244d0f(0x25a)]||[])[_0x244d0f(0x232)](_0x22dd16=>({'name':_0x22dd16[_0x244d0f(0x29f)],'percentage':0x0,'next':_0x22dd16[_0x244d0f(0x258)]})),_0x2d6db7={'type':_0x244d0f(0x1ee),'name':_0xb66247,..._0x2a1dd5['next']?{'next':_0x2a1dd5[_0x244d0f(0x258)]}:{},'with':{'customized_split':_0x2a1dd5[_0x244d0f(0x227)],'unique_id':_0x2a1dd5[_0x244d0f(0x201)],'variants':_0x594312['map'](_0x3916a0=>({'name':_0x3916a0[_0x244d0f(0x29f)],'percentage':_0x3916a0[_0x244d0f(0x202)],..._0x3916a0['next']?{'next':_0x3916a0['next']}:{}}))}};return _0x2d6db7;}case _0x244d0f(0x231):{const _0x2e2c55={'type':_0x244d0f(0x219),'name':_0xb66247,..._0x2a1dd5[_0x244d0f(0x258)]?{'next':_0x2a1dd5[_0x244d0f(0x258)]}:{}};return _0x2e2c55;}case'Jump':{let _0x548810='',_0x3b07c4='',_0x1e2507;if(_0x2a1dd5['target']){_0x548810=_0x2a1dd5['target'][_0x244d0f(0x217)],_0x3b07c4=_0x2a1dd5[_0x244d0f(0x207)][_0x244d0f(0x277)],_0x1e2507=_0x2a1dd5[_0x244d0f(0x207)][_0x244d0f(0x23c)];if(_0x2a1dd5[_0x244d0f(0x207)][_0x244d0f(0x2a5)]){const _0x3f120b=parseJumpTargetDisplayName(_0x2a1dd5[_0x244d0f(0x207)]['journeyName']);_0x3f120b&&(_0x3b07c4=_0x3f120b[_0x244d0f(0x200)],_0x548810=_0x3f120b[_0x244d0f(0x2a5)]);}}const _0x1507de={'type':_0x244d0f(0x244),'name':_0xb66247,..._0x2a1dd5[_0x244d0f(0x258)]?{'next':_0x2a1dd5['next']}:{},'with':{'target':{'journey':_0x548810,'stage':_0x3b07c4,..._0x1e2507?{'bundle_id':_0x1e2507}:{}}}};return _0x1507de;}case _0x244d0f(0x1f7):{const _0x5af8e3={'type':_0x244d0f(0x2a4),'name':_0xb66247};return _0x5af8e3;}default:{const _0x4761af={'type':_0x244d0f(0x2a4),'name':_0xb66247};return _0x4761af;}}}export async function journeyDefToRequest(_0x31142a,_0x31347a,_0x237ffb){const _0x55ff21=a147_0x1ab7,_0x10f1a5=_0x31142a['stages']||getActiveStages(_0x31142a),_0x54d318=isJourneysArrayMode(_0x31142a)||isMultiVersionMode(_0x31142a)?getLatestJourneyEntry(_0x31142a):undefined,_0x4537b9=_0x54d318?.['version']??_0x31142a[_0x55ff21(0x29f)],_0x2d5b79=_0x31142a[_0x55ff21(0x257)]||{},_0x5559e0=_0x31142a[_0x55ff21(0x22a)]||{},_0x4a8e14={'type':_0x55ff21(0x2ae),'attributes':{'name':_0x4537b9,'audienceId':_0x31347a,'journeyStages':await Promise[_0x55ff21(0x1ff)](_0x10f1a5[_0x55ff21(0x232)](_0x19a227=>convertYamlStageToApi(_0x19a227,_0x237ffb,_0x2d5b79,_0x5559e0)))}},_0x39121f=_0x54d318?.['id']??_0x31142a['id'];_0x39121f&&(_0x4a8e14['id']=_0x39121f);_0x31142a[_0x55ff21(0x203)]&&(_0x4a8e14['attributes'][_0x55ff21(0x203)]=_0x31142a[_0x55ff21(0x203)]);const _0x5e709f=getEffectiveGoal(_0x31142a);_0x5e709f&&(_0x4a8e14[_0x55ff21(0x1fc)][_0x55ff21(0x28c)]=await convertYamlCriteriaToApi(_0x5e709f,_0x237ffb,_0x2d5b79));const _0xda6efc=getEffectiveReentry(_0x31142a);return _0xda6efc&&(_0x4a8e14[_0x55ff21(0x1fc)][_0x55ff21(0x2a7)]=_0xda6efc,_0x4a8e14[_0x55ff21(0x1fc)][_0x55ff21(0x1eb)]=_0xda6efc!==_0x55ff21(0x1f1)),_0x31142a[_0x55ff21(0x239)]&&(_0x4a8e14['relationships']={'parentFolder':{'data':{'id':_0x31142a[_0x55ff21(0x239)],'type':_0x55ff21(0x24f)}}}),_0x4a8e14;}async function convertYamlStageToApi(_0x53870b,_0x109fd8,_0x4d6b66={},_0x54bf6f={}){const _0x1b7638=a147_0x1ab7,_0x349ac0={'name':_0x53870b[_0x1b7638(0x29f)]};_0x53870b['id']&&(_0x349ac0['id']=_0x53870b['id']);_0x53870b['description']&&(_0x349ac0[_0x1b7638(0x203)]=_0x53870b[_0x1b7638(0x203)]);_0x53870b[_0x1b7638(0x230)]&&(_0x349ac0[_0x1b7638(0x1f4)]=await convertYamlCriteriaToApi(_0x53870b[_0x1b7638(0x230)],_0x109fd8,_0x4d6b66));_0x53870b['exit_criteria']&&_0x53870b[_0x1b7638(0x28f)][_0x1b7638(0x22d)]>0x0&&(_0x349ac0[_0x1b7638(0x26a)]=await Promise[_0x1b7638(0x1ff)](_0x53870b[_0x1b7638(0x28f)]['map'](_0x43b5b6=>convertYamlCriteriaToApi(_0x43b5b6,_0x109fd8,_0x4d6b66))));_0x53870b[_0x1b7638(0x274)]&&(_0x349ac0[_0x1b7638(0x274)]=await convertYamlCriteriaToApi(_0x53870b[_0x1b7638(0x274)],_0x109fd8,_0x4d6b66));if(_0x53870b['steps']&&_0x53870b[_0x1b7638(0x262)]['length']>0x0){const _0x38b465={},_0x2f6c14=_0x53870b[_0x1b7638(0x262)][_0x1b7638(0x232)]((_0x42dd75,_0x4f98ec)=>{const _0x2c668a=_0x1b7638,_0x480969=_0x42dd75[_0x2c668a(0x2a2)]||generateUUID(),_0x5623b0=_0x42dd75[_0x2c668a(0x29f)]||_0x42dd75[_0x2c668a(0x281)]+'_'+_0x4f98ec;return _0x38b465[_0x5623b0]=_0x480969,{..._0x42dd75,'name':_0x5623b0};});_0x349ac0[_0x1b7638(0x266)]=_0x38b465[_0x2f6c14[0x0]['name']],_0x349ac0[_0x1b7638(0x262)]={};for(let _0xe71a4c=0x0;_0xe71a4c<_0x2f6c14[_0x1b7638(0x22d)];_0xe71a4c++){const _0x101f6e=_0x2f6c14[_0xe71a4c],_0x2d0fea=_0x38b465[_0x101f6e[_0x1b7638(0x29f)]],_0x28e8e0=!_0x101f6e[_0x1b7638(0x258)]&&_0xe71a4c<_0x2f6c14[_0x1b7638(0x22d)]-0x1&&_0x101f6e[_0x1b7638(0x281)]!==_0x1b7638(0x2a4)?_0x2f6c14[_0xe71a4c+0x1][_0x1b7638(0x29f)]:_0x101f6e['next'],_0x264496=_0x28e8e0!==_0x101f6e['next']?{..._0x101f6e,'next':_0x28e8e0}:_0x101f6e;_0x349ac0['steps'][_0x2d0fea]=await convertYamlStepToApi(_0x264496,_0x109fd8,_0x4d6b66,_0x38b465,_0x54bf6f);}}else _0x53870b[_0x1b7638(0x2b1)]&&(_0x349ac0[_0x1b7638(0x266)]=_0x53870b['root_step']);return _0x349ac0;}async function convertYamlCriteriaToApi(_0x27f316,_0x5016ac,_0x3806fe={}){const _0x317aeb=a147_0x1ab7;let _0x4bb2bc=_0x27f316[_0x317aeb(0x283)];if(_0x4bb2bc&&!/^\d+$/[_0x317aeb(0x265)](_0x4bb2bc)){const _0x4f7a66=parseSegmentRef(_0x4bb2bc);if(_0x4f7a66[_0x317aeb(0x281)]===_0x317aeb(0x21f))_0x5016ac?.['resolveSegmentId']&&(_0x4bb2bc=await _0x5016ac[_0x317aeb(0x226)](_0x4f7a66['name']));else{if(_0x4f7a66[_0x317aeb(0x281)]===_0x317aeb(0x286)&&_0x3806fe[_0x4f7a66[_0x317aeb(0x29f)]])_0x5016ac?.[_0x317aeb(0x251)]&&(_0x4bb2bc=await _0x5016ac[_0x317aeb(0x251)](_0x4f7a66[_0x317aeb(0x29f)],_0x3806fe[_0x4f7a66[_0x317aeb(0x29f)]]));else _0x5016ac?.['resolveSegmentId']&&(_0x4bb2bc=await _0x5016ac[_0x317aeb(0x226)](_0x4f7a66[_0x317aeb(0x29f)]));}}const _0x2a9772={'name':_0x27f316[_0x317aeb(0x29f)],'segmentId':_0x4bb2bc};_0x27f316['description']&&(_0x2a9772['description']=_0x27f316[_0x317aeb(0x203)]);if(_0x27f316['target']){const _0x4e7dc7=_0x27f316[_0x317aeb(0x207)][_0x317aeb(0x2ae)],_0x5a288f=_0x27f316[_0x317aeb(0x207)]['stage'];let _0x5d1ccb=_0x27f316[_0x317aeb(0x207)]['journey'];_0x5016ac?.['resolveJourneyId']&&!/^\d+$/['test'](_0x5d1ccb)&&(_0x5d1ccb=await _0x5016ac[_0x317aeb(0x29c)](_0x5d1ccb));let _0x5afcb0=_0x27f316[_0x317aeb(0x207)][_0x317aeb(0x24e)];_0x5016ac?.['resolveStageId']&&!/^\d+$/[_0x317aeb(0x265)](_0x5afcb0)&&(_0x5afcb0=await _0x5016ac[_0x317aeb(0x21b)](_0x5d1ccb,_0x5afcb0));const _0x20ac02=!/^\d+$/[_0x317aeb(0x265)](_0x4e7dc7)&&!isLocalJourneyRef(_0x4e7dc7)?formatApiJourneyName(_0x4e7dc7,_0x5a288f):undefined;_0x2a9772['target']={'journeyId':_0x5d1ccb,'journeyStageId':_0x5afcb0,'journeyName':_0x20ac02,'confirmed':!![]},_0x27f316['target'][_0x317aeb(0x272)]&&(_0x2a9772[_0x317aeb(0x207)][_0x317aeb(0x23c)]=_0x27f316[_0x317aeb(0x207)][_0x317aeb(0x272)]);}return _0x2a9772;}async function convertYamlStepToApi(_0x4f2f46,_0x472275,_0x466900={},_0x5e36d2={},_0x5c8830={}){const _0x832179=a147_0x1ab7,_0x1168de=async _0x2eb03f=>{const _0x176e29=a147_0x1ab7;if(/^\d+$/[_0x176e29(0x265)](_0x2eb03f))return _0x2eb03f;const _0x2035e3=parseSegmentRef(_0x2eb03f);if(_0x2035e3['type']===_0x176e29(0x21f)){if(_0x472275?.[_0x176e29(0x226)])return await _0x472275[_0x176e29(0x226)](_0x2035e3[_0x176e29(0x29f)]);}else{if(_0x2035e3[_0x176e29(0x281)]==='embedded'&&_0x466900[_0x2035e3[_0x176e29(0x29f)]]){if(_0x472275?.[_0x176e29(0x251)])return await _0x472275[_0x176e29(0x251)](_0x2035e3[_0x176e29(0x29f)],_0x466900[_0x2035e3[_0x176e29(0x29f)]]);}else{if(_0x472275?.[_0x176e29(0x226)])return await _0x472275[_0x176e29(0x226)](_0x2035e3[_0x176e29(0x29f)]);}}return _0x2eb03f;},_0x360747=async _0x134fa8=>{const _0x5f3548=a147_0x1ab7;if(/^\d+$/[_0x5f3548(0x265)](_0x134fa8))return _0x134fa8;const _0x32aa62=parseSegmentRef(_0x134fa8);if(_0x32aa62['type']==='ref'){if(_0x472275?.[_0x5f3548(0x299)])return await _0x472275[_0x5f3548(0x299)](_0x32aa62['name']);return _0x32aa62[_0x5f3548(0x29f)];}else{if(_0x32aa62[_0x5f3548(0x281)]===_0x5f3548(0x286)&&_0x5c8830[_0x32aa62['name']]){if(_0x472275?.['resolveEmbeddedActivationId'])return await _0x472275[_0x5f3548(0x29d)](_0x32aa62[_0x5f3548(0x29f)],_0x5c8830[_0x32aa62[_0x5f3548(0x29f)]]);if(_0x472275?.[_0x5f3548(0x299)])return await _0x472275['resolveActivationId'](_0x32aa62[_0x5f3548(0x29f)]);}else{if(_0x472275?.[_0x5f3548(0x299)])return await _0x472275[_0x5f3548(0x299)](_0x32aa62[_0x5f3548(0x29f)]);}}return _0x134fa8;},_0x57b2aa=_0x1b2caa=>{const _0x18fc8a=a147_0x1ab7;if(!_0x1b2caa)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x18fc8a(0x265)](_0x1b2caa))return _0x1b2caa;return _0x5e36d2[_0x1b2caa]||_0x1b2caa;};switch(_0x4f2f46['type']){case _0x832179(0x22b):{const _0x4dd20e=_0x4f2f46,_0x2795a5=_0x4dd20e[_0x832179(0x28b)],_0x1b4716={'type':_0x832179(0x21e),'name':_0x4dd20e[_0x832179(0x29f)],'next':_0x57b2aa(_0x4dd20e[_0x832179(0x258)])};if(_0x2795a5['duration']!==undefined&&_0x2795a5[_0x832179(0x2a1)])_0x1b4716[_0x832179(0x268)]=_0x832179(0x21d),_0x1b4716['waitStep']=_0x2795a5['duration'],_0x1b4716[_0x832179(0x233)]=normalizeWaitUnit(_0x2795a5[_0x832179(0x2a1)]);else{if(_0x2795a5[_0x832179(0x21a)])_0x1b4716['waitStepType']=_0x832179(0x263),_0x1b4716['waitUntilDate']=_0x2795a5[_0x832179(0x21a)];else{if(_0x2795a5['days_of_week'])_0x1b4716[_0x832179(0x268)]=_0x832179(0x20e),_0x1b4716[_0x832179(0x279)]=_0x2795a5[_0x832179(0x252)];else{if(_0x2795a5[_0x832179(0x297)]){_0x1b4716[_0x832179(0x268)]=_0x832179(0x26e);const _0x42cff7=await _0x1168de(_0x2795a5['condition'][_0x832179(0x283)]),_0x128678=_0x2795a5[_0x832179(0x297)]['timeout']?.['next']!==undefined;if(_0x128678){const _0x91cd97=[];_0x91cd97[_0x832179(0x253)]({'id':generateUUID(),'segmentId':_0x42cff7,'timedOutPath':![],'name':_0x832179(0x291),'next':_0x57b2aa(_0x2795a5[_0x832179(0x297)]['next']??_0x4dd20e[_0x832179(0x258)])});if(_0x2795a5[_0x832179(0x297)][_0x832179(0x2b2)]){const _0xb2600b=_0x2795a5[_0x832179(0x297)][_0x832179(0x2b2)][_0x832179(0x22c)],_0x48ae39=normalizeWaitUnit(_0x2795a5[_0x832179(0x297)]['timeout'][_0x832179(0x2a1)]);_0x91cd97[_0x832179(0x253)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x832179(0x261)+_0xb2600b+'\x20'+_0x48ae39,'moveAfter':_0xb2600b,'unit':_0x48ae39,'next':_0x57b2aa(_0x2795a5[_0x832179(0x297)]['timeout'][_0x832179(0x258)])});}_0x1b4716['conditions']=_0x91cd97,delete _0x1b4716[_0x832179(0x258)];}else _0x1b4716[_0x832179(0x29b)]=_0x42cff7,_0x2795a5['condition'][_0x832179(0x2b2)]&&(_0x1b4716['conditionTimeoutDuration']=_0x2795a5[_0x832179(0x297)]['timeout']['duration'],_0x2795a5[_0x832179(0x297)][_0x832179(0x2b2)][_0x832179(0x2a1)]&&(_0x1b4716[_0x832179(0x218)]=normalizeWaitUnit(_0x2795a5[_0x832179(0x297)][_0x832179(0x2b2)][_0x832179(0x2a1)])));}}}}return _0x1b4716;}case'activation':{const _0x428010=_0x4f2f46,_0x53270a=_0x428010[_0x832179(0x28b)][_0x832179(0x1ef)],_0x579f25=await _0x360747(_0x53270a);return{'type':_0x832179(0x24c),'name':_0x428010[_0x832179(0x29f)],'journeyActivationStepId':_0x579f25,'next':_0x57b2aa(_0x428010[_0x832179(0x258)])};}case _0x832179(0x1fd):{const _0x2f21cb=_0x4f2f46,_0x589725=_0x2f21cb[_0x832179(0x28b)]['branches'];return{'type':'DecisionPoint','name':_0x2f21cb['name'],'branches':await Promise['all'](_0x589725[_0x832179(0x232)](async _0x13b8aa=>{const _0x5e94b7=_0x832179;let _0x303e98='';if(!_0x13b8aa[_0x5e94b7(0x1fe)]){const _0x1a76c8=_0x13b8aa['segment']||_0x13b8aa[_0x5e94b7(0x20b)]||'';_0x303e98=_0x1a76c8?await _0x1168de(_0x1a76c8):'';}return{'id':crypto['randomUUID'](),'name':_0x13b8aa['name'],'description':null,'segmentId':_0x303e98,'excludedPath':_0x13b8aa[_0x5e94b7(0x1fe)]??![],'next':_0x57b2aa(_0x13b8aa[_0x5e94b7(0x258)])};})),'next':_0x57b2aa(_0x2f21cb['next'])};}case _0x832179(0x1ee):{const _0x939502=_0x4f2f46,_0x262eec=_0x939502[_0x832179(0x28b)];return{'type':_0x832179(0x229),'name':_0x939502[_0x832179(0x29f)],'customizedSplit':_0x262eec['customized_split'],'uniqueId':_0x262eec[_0x832179(0x21c)],'variants':_0x262eec[_0x832179(0x1fa)][_0x832179(0x232)](_0x34cd04=>({'id':_0x34cd04['id']||generateUUID(),'name':_0x34cd04[_0x832179(0x29f)],'percentage':_0x34cd04[_0x832179(0x202)],'next':_0x57b2aa(_0x34cd04['next'])})),'next':_0x57b2aa(_0x939502[_0x832179(0x258)])};}case _0x832179(0x219):return{'type':_0x832179(0x231),'name':_0x4f2f46[_0x832179(0x29f)],'next':_0x57b2aa(_0x4f2f46[_0x832179(0x258)])};case'jump':{const _0x3dc84a=_0x4f2f46,_0x51efc6=_0x3dc84a[_0x832179(0x28b)]['target'],_0x9fb558=_0x51efc6[_0x832179(0x2ae)],_0x7e80d2=_0x51efc6[_0x832179(0x24e)];let _0x3c8f9e=_0x51efc6['journey'];_0x472275?.[_0x832179(0x29c)]&&!/^\d+$/['test'](_0x3c8f9e)&&(_0x3c8f9e=await _0x472275[_0x832179(0x29c)](_0x3c8f9e));let _0x53c02f=_0x51efc6[_0x832179(0x24e)];_0x472275?.[_0x832179(0x21b)]&&!/^\d+$/[_0x832179(0x265)](_0x53c02f)&&(_0x53c02f=await _0x472275[_0x832179(0x21b)](_0x3c8f9e,_0x53c02f));const _0xa85b35=!/^\d+$/[_0x832179(0x265)](_0x9fb558)&&!isLocalJourneyRef(_0x9fb558)?formatApiJourneyName(_0x9fb558,_0x7e80d2):undefined;return{'type':_0x832179(0x240),'name':_0x3dc84a['name'],'target':{'journeyId':_0x3c8f9e,'journeyStageId':_0x53c02f,'journeyBundleId':_0x51efc6[_0x832179(0x272)],'journeyName':_0xa85b35,'confirmed':!![]},'next':_0x57b2aa(_0x3dc84a['next'])};}case _0x832179(0x2a4):return{'type':_0x832179(0x1f7),'name':_0x4f2f46[_0x832179(0x29f)]};default:{const _0x2a5c5c=_0x4f2f46;return{'type':_0x832179(0x1f7),'name':_0x2a5c5c[_0x832179(0x29f)]};}}}function a147_0x3a50(){const _0x10df61=['1660712ntVPmS','allowReentry','Expected\x20format:\x0a','\x20\x20\x20\x20conditions:\x0a','ab_test','activation','resolveActivation','no_reentry','shift','activations:','entryCriteria','add','connector_config','End','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','First\x20stage\x20of\x20the\x20journey','variants','1634186IBYVLp','attributes','decision_point','excluded','all','stageName','uniqueId','percentage','description','columns','version','Variant','target','resolveJumpTarget','waitStep','draft','segment_id','stages','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','DaysOfTheWeek','goal-segment','resolveActivationName','(missing)','replace','401106HEHhel','ref:','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','definition','journeyId','conditionTimeoutUnit','merge','wait_until','resolveStageId','unique_id','Duration','WaitStep','ref','notification','DecisionPoint','sort','1158813UqTdaF','versionNumber','moveAfter','resolveSegmentId','customizedSplit','And','ABTest','activations','wait','duration','length','30153299AFhppI','null','entry_criteria','Merge','map','waitStepUnit','50eIISlw','stageId','trim','versions:','conditions','folder_id','16947WxcsOk','Send\x20Notification','journeyBundleId','\x20\x20\x20\x20type:\x20','Journey\x20description','86442AoUEdg','Jump','entries','launched','state','jump','segmentId','startsWith','day','rule','\x20\x20rule:\x0a','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','28cxvNpD','Activation','Stage\x20Complete','stage','folder','isJourneyLocal','resolveEmbeddedSegmentId','days_of_week','push','data','filter','28WigBDd','segments','next','waitCondition','branches','has','excludedPath','resolveSegment','journeyBundleName','includes','size','*Max\x20wait\x20','steps','Date','slice','test','rootStep','\x27:\x20','waitStepType','bundle_name','exitCriterias','values','match','\x20\x20\x20\x20type:\x20And\x0a','Condition','version_number','activation_template_id','stringify','bundle_id','relationships','milestone','schedule','keys','journeyStageId','AbTest','daysOfWeek','conditionTimeoutDuration','toLowerCase','reentry:','all_columns','Unknown\x20segment\x20\x22','object','get','type','stages:','segment','week','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','embedded','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','goal:','customized_split','journeys','with','goal','Wait\x201\x20Day','\x27.\x0a','exit_criteria','reentry_always','Met\x20condition(s)','your-activation-name','Entry\x20Criteria','latest','set','Goal\x20Achieved','condition','journeys:','resolveActivationId','waitUntilDate','conditionSegmentId','resolveJourneyId','resolveEmbeddedActivationId','parentFolder','name','journeyStages','unit','uuid','350NBdyBh','end','journeyName','behavior','reentryMode','find','reentry','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','isArray','connection','journey','randomUUID','versions','root_step','timeout'];a147_0x3a50=function(){return _0x10df61;};return a147_0x3a50();}export function toYamlString(_0x3d931d){const _0x33926d=a147_0x1ab7,_0x1c01f5=stripInternalFields(_0x3d931d),_0x43cb8f=a147_0x2eeb9d[_0x33926d(0x271)](_0x1c01f5,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x33926d(0x22f)}),_0x4d5770=['segments:',_0x33926d(0x1f3),_0x33926d(0x288),_0x33926d(0x27c),_0x33926d(0x298),_0x33926d(0x282),_0x33926d(0x237)];let _0x5cc4ae=_0x43cb8f;for(const _0x92b622 of _0x4d5770){_0x5cc4ae=_0x5cc4ae[_0x33926d(0x212)](new RegExp('^('+_0x92b622+')','m'),(_0x5e4008,_0x2dd9d0,_0x37ab4d)=>{if(_0x37ab4d===0x0||_0x5cc4ae[_0x37ab4d-0x1]==='\x0a'&&_0x5cc4ae[_0x37ab4d-0x2]==='\x0a')return _0x2dd9d0;return'\x0a'+_0x2dd9d0;});}return _0x5cc4ae;}function stripInternalFields(_0x2e2b1c){const _0x19246f=a147_0x1ab7,{id:_0x42970b,folder_id:_0x319377,bundle_id:_0x427d81,bundle_name:_0x3b83e1,version:_0x147838,allow_reentry:_0x550ab8,..._0x6b18dc}=_0x2e2b1c;return _0x6b18dc[_0x19246f(0x28a)]&&(_0x6b18dc[_0x19246f(0x28a)]=_0x6b18dc['journeys']['map'](_0xe4469b=>{const _0x5a0062=_0x19246f,{id:_0x5263c6,..._0x96f94d}=_0xe4469b;return{..._0x96f94d,'stages':_0x96f94d[_0x5a0062(0x20c)]['map'](stripStageInternalFields),..._0xe4469b[_0x5a0062(0x294)]===!![]?{'latest':!![]}:{},..._0x6b18dc[_0x5a0062(0x28a)][_0x5a0062(0x22d)]===0x1&&_0x96f94d[_0x5a0062(0x205)]==='v1'?{'version':undefined}:{}};})),_0x6b18dc[_0x19246f(0x20c)]&&(_0x6b18dc[_0x19246f(0x20c)]=_0x6b18dc[_0x19246f(0x20c)][_0x19246f(0x232)](stripStageInternalFields)),_0x6b18dc[_0x19246f(0x2b0)]&&(_0x6b18dc[_0x19246f(0x2b0)]=_0x6b18dc['versions'][_0x19246f(0x232)](_0x1f45e2=>{const _0x508885=_0x19246f,{id:_0x343cac,..._0x238549}=_0x1f45e2;return{..._0x238549,'stages':_0x238549[_0x508885(0x20c)][_0x508885(0x232)](stripStageInternalFields),..._0x1f45e2['latest']===!![]?{'latest':!![]}:{}};})),_0x6b18dc;}function stripStageInternalFields(_0x878758){const {id:_0x5e8342,..._0x3c56a9}=_0x878758;return _0x3c56a9;}export function parseYamlString(_0x47c2f9){return safeParseYaml(_0x47c2f9,JourneyDefSchema);}export function isJourneyDef(_0x53648f){const _0x598de8=a147_0x1ab7;return typeof _0x53648f===_0x598de8(0x27f)&&_0x53648f!==null&&_0x598de8(0x281)in _0x53648f&&_0x53648f['type']==='journey';}export function generateTemplate(_0x1b9e25,_0x59347b){const _0x5d132b=a147_0x1ab7,_0x582b1e={'type':_0x5d132b(0x2ae),'name':_0x1b9e25,'description':_0x5d132b(0x23e),'reentry':_0x5d132b(0x1f1),'goal':{'name':_0x5d132b(0x296),'segment':_0x5d132b(0x20f)},'stages':[{'name':'Stage\x201','description':_0x5d132b(0x1f9),'entry_criteria':{'name':_0x5d132b(0x293),'segment':_0x59347b},'steps':[{'type':_0x5d132b(0x22b),'name':_0x5d132b(0x28d),'with':{'duration':0x1,'unit':_0x5d132b(0x247)}},{'type':_0x5d132b(0x1ef),'name':_0x5d132b(0x23b),'with':{'activation':_0x5d132b(0x292)}},{'type':_0x5d132b(0x2a4),'name':_0x5d132b(0x24d)}]}]};return toYamlString(_0x582b1e);}function generateUUID(){const _0x46216e=a147_0x1ab7;return crypto[_0x46216e(0x2af)]();}export const SEGMENT_REF_PREFIX=a147_0x50c8cb(0x214);export function parseSegmentRef(_0x2730d6){const _0x79263c=a147_0x50c8cb;if(_0x2730d6[_0x79263c(0x246)](SEGMENT_REF_PREFIX))return{'type':_0x79263c(0x21f),'name':_0x2730d6[_0x79263c(0x264)](SEGMENT_REF_PREFIX[_0x79263c(0x22d)])};if(/^\d+$/[_0x79263c(0x265)](_0x2730d6))return{'type':'id','name':_0x2730d6};return{'type':'embedded','name':_0x2730d6};}export function makeSegmentRef(_0x2fa07c){return''+SEGMENT_REF_PREFIX+_0x2fa07c;}export function isExternalSegmentRef(_0x667dc1){const _0x15d9cb=a147_0x50c8cb;return _0x667dc1[_0x15d9cb(0x246)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x9d52d9){const _0x3e18fd=a147_0x50c8cb;return!!(_0x9d52d9[_0x3e18fd(0x28a)]&&_0x9d52d9['journeys'][_0x3e18fd(0x22d)]>0x0);}export function isMultiVersionMode(_0x35abb0){const _0x1b3f40=a147_0x50c8cb;return!!(_0x35abb0[_0x1b3f40(0x2b0)]&&_0x35abb0[_0x1b3f40(0x2b0)][_0x1b3f40(0x22d)]>0x0);}export function isSingleVersionMode(_0x5b6bfb){const _0x453939=a147_0x50c8cb;return!!(_0x5b6bfb[_0x453939(0x20c)]&&_0x5b6bfb['stages'][_0x453939(0x22d)]>0x0);}function a147_0x1ab7(_0x3ea068,_0x425eea){_0x3ea068=_0x3ea068-0x1ea;const _0x3a5021=a147_0x3a50();let _0x1ab7f6=_0x3a5021[_0x3ea068];return _0x1ab7f6;}export function hasMultipleVersions(_0x11e7a9){const _0x595909=a147_0x50c8cb;if(isJourneysArrayMode(_0x11e7a9))return(_0x11e7a9[_0x595909(0x28a)]?.[_0x595909(0x22d)]||0x0)>0x1;if(isMultiVersionMode(_0x11e7a9))return(_0x11e7a9['versions']?.['length']||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x49bdfd){const _0x3f0440=a147_0x50c8cb;if(isJourneysArrayMode(_0x49bdfd))return _0x49bdfd;if(isSingleVersionMode(_0x49bdfd)){const {stages:_0xd89db7,id:_0x446f1f,version:_0x46e24d,version_number:_0x898318,..._0x8564d}=_0x49bdfd;return{..._0x8564d,'journeys':[{'version':_0x46e24d||'v1','stages':_0xd89db7||[],'id':_0x446f1f,'version_number':_0x898318}]};}if(isMultiVersionMode(_0x49bdfd)){const {versions:_0x39f141,..._0x13c7ce}=_0x49bdfd;return{..._0x13c7ce,'journeys':(_0x39f141||[])[_0x3f0440(0x232)](_0x320441=>({'version':_0x320441[_0x3f0440(0x29f)],'state':_0x320441[_0x3f0440(0x243)],'latest':_0x320441[_0x3f0440(0x294)],'stages':_0x320441[_0x3f0440(0x20c)],'id':_0x320441['id'],'version_number':_0x320441['version_number']}))};}return _0x49bdfd;}export function normalizeJourneyDef(_0x26921c,_0x5776a8){const _0x447055=a147_0x50c8cb,_0x1d7719=normalizeToJourneysFormat(_0x26921c),_0x3a88f4=_0x5776a8?.[_0x447055(0x257)]?Object['keys'](_0x5776a8['segments']):undefined,_0x393ea7=_0x5776a8?.[_0x447055(0x22a)]?Object['keys'](_0x5776a8[_0x447055(0x22a)]):undefined;return{'type':_0x447055(0x2ae),'name':_0x1d7719[_0x447055(0x29f)],..._0x1d7719[_0x447055(0x203)]!==undefined&&{'description':_0x1d7719[_0x447055(0x203)]},..._0x1d7719[_0x447055(0x28c)]&&{'goal':normalizeJourneyCriteria(_0x1d7719[_0x447055(0x28c)])},..._0x1d7719[_0x447055(0x2a9)]!==undefined&&{'reentry':_0x1d7719[_0x447055(0x2a9)]},..._0x1d7719[_0x447055(0x257)]&&{'segments':normalizeEmbeddedSegments(_0x1d7719[_0x447055(0x257)],_0x3a88f4)},..._0x1d7719[_0x447055(0x22a)]&&{'activations':normalizeEmbeddedActivations(_0x1d7719[_0x447055(0x22a)],_0x393ea7)},..._0x1d7719[_0x447055(0x28a)]&&{'journeys':_0x1d7719[_0x447055(0x28a)][_0x447055(0x232)](_0x51c171=>normalizeJourneyEntry(_0x51c171,_0x1d7719['journeys'][_0x447055(0x22d)]===0x1))}};}function normalizeJourneyEntry(_0x1cdc09,_0xc9d6d){const _0x8313be=a147_0x50c8cb;return{...!_0xc9d6d&&_0x1cdc09['version']!==undefined&&{'version':_0x1cdc09['version']},..._0x1cdc09[_0x8313be(0x243)]!==undefined&&{'state':_0x1cdc09[_0x8313be(0x243)]},...!_0xc9d6d&&_0x1cdc09[_0x8313be(0x294)]!==undefined&&{'latest':_0x1cdc09['latest']},..._0x1cdc09['version_number']!==undefined&&{'version_number':_0x1cdc09[_0x8313be(0x26f)]},..._0x1cdc09[_0x8313be(0x28c)]&&{'goal':normalizeJourneyCriteria(_0x1cdc09[_0x8313be(0x28c)])},..._0x1cdc09[_0x8313be(0x2a9)]!==undefined&&{'reentry':_0x1cdc09['reentry']},'stages':_0x1cdc09[_0x8313be(0x20c)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x104cc1){const _0x1d87aa=a147_0x50c8cb;return{'name':_0x104cc1[_0x1d87aa(0x29f)],..._0x104cc1[_0x1d87aa(0x203)]!==undefined&&{'description':_0x104cc1['description']},..._0x104cc1[_0x1d87aa(0x230)]&&{'entry_criteria':normalizeJourneyCriteria(_0x104cc1[_0x1d87aa(0x230)])},..._0x104cc1[_0x1d87aa(0x28f)]&&{'exit_criteria':_0x104cc1[_0x1d87aa(0x28f)][_0x1d87aa(0x232)](normalizeJourneyCriteria)},..._0x104cc1['milestone']&&{'milestone':normalizeJourneyCriteria(_0x104cc1[_0x1d87aa(0x274)])},..._0x104cc1[_0x1d87aa(0x262)]&&{'steps':normalizeStepsWithImplicitNext(_0x104cc1[_0x1d87aa(0x262)])}};}function normalizeStepsWithImplicitNext(_0x1b7f1d){return _0x1b7f1d['map']((_0x241c44,_0x30edcd)=>{const _0xccc2b3=a147_0x1ab7,_0x1e9f26=_0x30edcd<_0x1b7f1d[_0xccc2b3(0x22d)]-0x1?_0x1b7f1d[_0x30edcd+0x1][_0xccc2b3(0x29f)]:undefined;return normalizeJourneyStep(_0x241c44,_0x1e9f26);});}function normalizeJourneyCriteria(_0x1e2055){const _0x9469c9=a147_0x50c8cb;return{'name':_0x1e2055['name'],..._0x1e2055[_0x9469c9(0x203)]!==undefined&&{'description':_0x1e2055['description']},'segment':_0x1e2055['segment'],..._0x1e2055['target']&&{'target':normalizeJumpTarget(_0x1e2055['target'])}};}function normalizeJourneyStep(_0x2c1cd0,_0x4c5b40){const _0x69806c=a147_0x50c8cb,_0x1720cb=_0x2c1cd0['next']!==undefined&&_0x2c1cd0[_0x69806c(0x258)]!==_0x4c5b40,_0x5d54f3={'type':_0x2c1cd0[_0x69806c(0x281)],'name':_0x2c1cd0[_0x69806c(0x29f)],..._0x1720cb&&{'next':_0x2c1cd0[_0x69806c(0x258)]}};if(_0x69806c(0x28b)in _0x2c1cd0&&_0x2c1cd0[_0x69806c(0x28b)])return{..._0x5d54f3,'with':normalizeStepParams(_0x2c1cd0[_0x69806c(0x281)],_0x2c1cd0['with'])};return _0x5d54f3;}function normalizeStepParams(_0x42a2a7,_0x3fd39e){const _0xbcf392=a147_0x50c8cb;switch(_0x42a2a7){case _0xbcf392(0x22b):{const _0x117f7a=_0x3fd39e;let _0x450b67;return _0x117f7a[_0xbcf392(0x297)]&&(_0x450b67={'segment':_0x117f7a[_0xbcf392(0x297)][_0xbcf392(0x283)],..._0x117f7a[_0xbcf392(0x297)][_0xbcf392(0x258)]!==undefined&&{'next':_0x117f7a[_0xbcf392(0x297)]['next']},..._0x117f7a[_0xbcf392(0x297)][_0xbcf392(0x2b2)]&&{'timeout':{'duration':_0x117f7a[_0xbcf392(0x297)][_0xbcf392(0x2b2)][_0xbcf392(0x22c)],'unit':_0x117f7a[_0xbcf392(0x297)][_0xbcf392(0x2b2)][_0xbcf392(0x2a1)],..._0x117f7a['condition'][_0xbcf392(0x2b2)]['next']!==undefined&&{'next':_0x117f7a[_0xbcf392(0x297)][_0xbcf392(0x2b2)][_0xbcf392(0x258)]}}}}),{..._0x117f7a['duration']!==undefined&&{'duration':_0x117f7a[_0xbcf392(0x22c)]},..._0x117f7a[_0xbcf392(0x2a1)]!==undefined&&{'unit':_0x117f7a[_0xbcf392(0x2a1)]},..._0x117f7a[_0xbcf392(0x21a)]!==undefined&&{'wait_until':_0x117f7a[_0xbcf392(0x21a)]},..._0x117f7a[_0xbcf392(0x252)]!==undefined&&{'days_of_week':_0x117f7a[_0xbcf392(0x252)]},..._0x450b67&&{'condition':_0x450b67}};}case _0xbcf392(0x1ef):{const _0x3aad50=_0x3fd39e;return{'activation':_0x3aad50['activation']};}case _0xbcf392(0x1fd):{const _0x823965=_0x3fd39e;return{'branches':_0x823965[_0xbcf392(0x25a)][_0xbcf392(0x232)](normalizeDecisionBranch)};}case _0xbcf392(0x1ee):{const _0x290fb5=_0x3fd39e;return{..._0x290fb5[_0xbcf392(0x289)]!==undefined&&{'customized_split':_0x290fb5[_0xbcf392(0x289)]},..._0x290fb5[_0xbcf392(0x21c)]!==undefined&&{'unique_id':_0x290fb5['unique_id']},'variants':_0x290fb5[_0xbcf392(0x1fa)][_0xbcf392(0x232)](normalizeAbTestVariant)};}case'jump':{const _0x195ba0=_0x3fd39e;return{'target':normalizeJumpTarget(_0x195ba0[_0xbcf392(0x207)])};}default:return _0x3fd39e;}}function normalizeDecisionBranch(_0x324a72){const _0x524892=a147_0x50c8cb;return{'name':_0x324a72[_0x524892(0x29f)],..._0x324a72['segment']!==undefined&&{'segment':_0x324a72[_0x524892(0x283)]},..._0x324a72['excluded']!==undefined&&{'excluded':_0x324a72[_0x524892(0x1fe)]},..._0x324a72['next']!==undefined&&{'next':_0x324a72['next']}};}function normalizeAbTestVariant(_0x21e6b4){const _0x2d0873=a147_0x50c8cb;return{..._0x21e6b4['id']!==undefined&&{'id':_0x21e6b4['id']},'name':_0x21e6b4[_0x2d0873(0x29f)],'percentage':_0x21e6b4[_0x2d0873(0x202)],..._0x21e6b4['next']!==undefined&&{'next':_0x21e6b4['next']}};}function normalizeJumpTarget(_0x131918){const _0x54f559=a147_0x50c8cb;return{'journey':_0x131918[_0x54f559(0x2ae)],'stage':_0x131918[_0x54f559(0x24e)],..._0x131918[_0x54f559(0x272)]!==undefined&&{'bundle_id':_0x131918[_0x54f559(0x272)]}};}function normalizeEmbeddedSegments(_0x100c73,_0x5427ba){const _0x3c3679=a147_0x50c8cb,_0x3a0528={},_0x3c89bb=Object['keys'](_0x100c73),_0xc39f71=_0x5427ba?[..._0x5427ba[_0x3c3679(0x255)](_0x16d374=>_0x3c89bb['includes'](_0x16d374)),..._0x3c89bb[_0x3c3679(0x255)](_0x2748ec=>!_0x5427ba['includes'](_0x2748ec))[_0x3c3679(0x222)]()]:_0x3c89bb[_0x3c3679(0x222)]();for(const _0x184517 of _0xc39f71){const _0x20e5ea=_0x100c73[_0x184517];if(_0x20e5ea[_0x3c3679(0x248)]){const _0x45daf2=_0x20e5ea[_0x3c3679(0x248)];if(_0x45daf2[_0x3c3679(0x281)]!==_0x3c3679(0x228)&&_0x45daf2[_0x3c3679(0x281)]!=='Or'){const _0x401a81=_0x45daf2[_0x3c3679(0x281)]??_0x3c3679(0x211);throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x3c3679(0x2aa)+_0x184517+'\x27:\x20'+(_0x3c3679(0x20d)+_0x401a81+_0x3c3679(0x28e))+'Expected\x20format:\x0a'+'\x20\x20rule:\x0a'+_0x3c3679(0x26d)+_0x3c3679(0x1ed)+_0x3c3679(0x285)+_0x3c3679(0x215)+_0x3c3679(0x1f8));}if(!_0x45daf2[_0x3c3679(0x238)]||!Array['isArray'](_0x45daf2['conditions']))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x3c3679(0x2aa)+_0x184517+_0x3c3679(0x267)+_0x3c3679(0x2ab)+_0x3c3679(0x1ec)+_0x3c3679(0x249)+(_0x3c3679(0x23d)+_0x45daf2[_0x3c3679(0x281)]+'\x0a')+_0x3c3679(0x1ed)+_0x3c3679(0x285)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x3c3679(0x1f8));}_0x3a0528[_0x184517]={..._0x20e5ea[_0x3c3679(0x203)]&&_0x20e5ea[_0x3c3679(0x203)]['trim']()&&{'description':_0x20e5ea[_0x3c3679(0x203)]},..._0x20e5ea[_0x3c3679(0x248)]&&{'rule':deepSortObject(_0x20e5ea['rule'])}};}return _0x3a0528;}function normalizeEmbeddedActivations(_0x53bac1,_0x49713d){const _0x2adb17=a147_0x50c8cb,_0x56291b={},_0x13fa1d=Object[_0x2adb17(0x276)](_0x53bac1),_0x1c3daa=_0x49713d?[..._0x49713d['filter'](_0x345ffb=>_0x13fa1d[_0x2adb17(0x25f)](_0x345ffb)),..._0x13fa1d['filter'](_0x271332=>!_0x49713d[_0x2adb17(0x25f)](_0x271332))[_0x2adb17(0x222)]()]:_0x13fa1d[_0x2adb17(0x222)]();for(const _0x2664bb of _0x1c3daa){const _0x203207=_0x53bac1[_0x2664bb];_0x56291b[_0x2664bb]={'name':_0x203207[_0x2adb17(0x29f)],'connection':_0x203207[_0x2adb17(0x2ad)],..._0x203207[_0x2adb17(0x203)]!==undefined&&{'description':_0x203207[_0x2adb17(0x203)]},..._0x203207[_0x2adb17(0x27d)]!==undefined&&{'all_columns':_0x203207[_0x2adb17(0x27d)]},..._0x203207[_0x2adb17(0x204)]!==undefined&&{'columns':_0x203207['columns']},..._0x203207['behavior']!==undefined&&{'behavior':_0x203207[_0x2adb17(0x2a6)]},..._0x203207[_0x2adb17(0x275)]!==undefined&&{'schedule':_0x203207['schedule']},..._0x203207['notification']!==undefined&&{'notification':_0x203207[_0x2adb17(0x220)]},..._0x203207[_0x2adb17(0x1f6)]!==undefined&&{'connector_config':_0x203207['connector_config']},..._0x203207[_0x2adb17(0x270)]!==undefined&&{'activation_template_id':_0x203207[_0x2adb17(0x270)]}};}return _0x56291b;}export function getActiveStages(_0x1bb184){const _0x1ad4d4=a147_0x50c8cb;if(isJourneysArrayMode(_0x1bb184)){const _0x39cb54=_0x1bb184[_0x1ad4d4(0x28a)]||[],_0x1bab7b=_0x39cb54['find'](_0x4ae918=>_0x4ae918['latest']===!![])||_0x39cb54[0x0];return _0x1bab7b?.[_0x1ad4d4(0x20c)]||[];}if(isSingleVersionMode(_0x1bb184))return _0x1bb184[_0x1ad4d4(0x20c)]||[];if(isMultiVersionMode(_0x1bb184)){const _0x5da44c=_0x1bb184[_0x1ad4d4(0x2b0)]||[],_0xd6b716=_0x5da44c[_0x1ad4d4(0x2a8)](_0x1a8cc5=>_0x1a8cc5[_0x1ad4d4(0x294)]===!![])||_0x5da44c[0x0];return _0xd6b716?.[_0x1ad4d4(0x20c)]||[];}return[];}export function getLatestJourneyEntry(_0x330d1e){const _0x3e4782=a147_0x50c8cb;if(isJourneysArrayMode(_0x330d1e)){const _0x737cd4=_0x330d1e[_0x3e4782(0x28a)]||[];return _0x737cd4['find'](_0x2bd259=>_0x2bd259[_0x3e4782(0x294)]===!![])||_0x737cd4[0x0];}if(isMultiVersionMode(_0x330d1e)){const _0x381fc6=_0x330d1e[_0x3e4782(0x2b0)]||[],_0x2d045f=_0x381fc6['find'](_0x583362=>_0x583362['latest']===!![])||_0x381fc6[0x0];if(_0x2d045f)return{'version':_0x2d045f[_0x3e4782(0x29f)],'state':_0x2d045f[_0x3e4782(0x243)],'latest':_0x2d045f[_0x3e4782(0x294)],'stages':_0x2d045f[_0x3e4782(0x20c)],'id':_0x2d045f['id'],'version_number':_0x2d045f[_0x3e4782(0x26f)]};}if(isSingleVersionMode(_0x330d1e))return{'version':_0x330d1e[_0x3e4782(0x205)]||'v1','state':'draft','stages':_0x330d1e[_0x3e4782(0x20c)]||[],'id':_0x330d1e['id'],'version_number':_0x330d1e[_0x3e4782(0x26f)],'goal':_0x330d1e[_0x3e4782(0x28c)],'reentry':_0x330d1e[_0x3e4782(0x2a9)]};return undefined;}export function getLatestVersion(_0x5e9ada){const _0x1deac4=a147_0x50c8cb;if(!isMultiVersionMode(_0x5e9ada))return undefined;const _0x5080c9=_0x5e9ada[_0x1deac4(0x2b0)]||[];return _0x5080c9['find'](_0x193cf2=>_0x193cf2[_0x1deac4(0x294)]===!![])||_0x5080c9[0x0];}export function getEffectiveGoal(_0x5e5c15){const _0x4a0b68=a147_0x50c8cb,_0x13856a=getLatestJourneyEntry(_0x5e5c15);return _0x13856a?.[_0x4a0b68(0x28c)]||_0x5e5c15[_0x4a0b68(0x28c)];}export function getEffectiveReentry(_0x16ea21){const _0x348e79=a147_0x50c8cb,_0x42085d=getLatestJourneyEntry(_0x16ea21);return _0x42085d?.[_0x348e79(0x2a9)]||_0x16ea21[_0x348e79(0x2a9)];}export function collectSegmentRefs(_0x3509d1){const _0x47e8f6=a147_0x50c8cb,_0x396e9f=new Set();_0x3509d1[_0x47e8f6(0x28c)]?.['segment']&&_0x396e9f[_0x47e8f6(0x1f5)](_0x3509d1[_0x47e8f6(0x28c)]['segment']);const _0x437058=_0xbb7e27=>{const _0x232ad8=_0x47e8f6;for(const _0x480265 of _0xbb7e27){_0x480265[_0x232ad8(0x230)]?.[_0x232ad8(0x283)]&&_0x396e9f[_0x232ad8(0x1f5)](_0x480265['entry_criteria'][_0x232ad8(0x283)]);if(_0x480265['exit_criteria'])for(const _0x5c4386 of _0x480265[_0x232ad8(0x28f)]){_0x5c4386['segment']&&_0x396e9f['add'](_0x5c4386[_0x232ad8(0x283)]);}_0x480265[_0x232ad8(0x274)]?.['segment']&&_0x396e9f[_0x232ad8(0x1f5)](_0x480265[_0x232ad8(0x274)][_0x232ad8(0x283)]);if(_0x480265[_0x232ad8(0x262)])for(const _0x19bad0 of _0x480265['steps']){if(_0x19bad0[_0x232ad8(0x281)]===_0x232ad8(0x1fd)){const _0x55d32b=_0x19bad0;for(const _0xb83229 of _0x55d32b[_0x232ad8(0x28b)][_0x232ad8(0x25a)]){_0xb83229[_0x232ad8(0x283)]&&_0x396e9f[_0x232ad8(0x1f5)](_0xb83229[_0x232ad8(0x283)]);}}else{if(_0x19bad0[_0x232ad8(0x281)]===_0x232ad8(0x22b)){const _0xa86413=_0x19bad0;_0xa86413[_0x232ad8(0x28b)][_0x232ad8(0x297)]?.[_0x232ad8(0x283)]&&_0x396e9f[_0x232ad8(0x1f5)](_0xa86413[_0x232ad8(0x28b)][_0x232ad8(0x297)]['segment']);}}}}};_0x3509d1['stages']&&_0x437058(_0x3509d1[_0x47e8f6(0x20c)]);if(_0x3509d1[_0x47e8f6(0x2b0)])for(const _0x5e2e96 of _0x3509d1[_0x47e8f6(0x2b0)]){_0x437058(_0x5e2e96[_0x47e8f6(0x20c)]);}return _0x396e9f;}export function validateSegmentRefs(_0xdee783){const _0x148f33=a147_0x50c8cb,_0x228caf=[],_0x5bbe6b=collectSegmentRefs(_0xdee783),_0x567f49=new Set(Object[_0x148f33(0x276)](_0xdee783[_0x148f33(0x257)]||{}));for(const _0x2e9585 of _0x5bbe6b){const _0x484e05=parseSegmentRef(_0x2e9585);_0x484e05[_0x148f33(0x281)]===_0x148f33(0x286)&&!_0x567f49[_0x148f33(0x25b)](_0x484e05[_0x148f33(0x29f)])&&_0x228caf[_0x148f33(0x253)](_0x148f33(0x27e)+_0x484e05[_0x148f33(0x29f)]+_0x148f33(0x287)+_0x484e05[_0x148f33(0x29f)]+_0x148f33(0x24a));}return _0x228caf;}export function collectSegmentIdsFromJourneyApi(_0x432c08){const _0xcb26b4=a147_0x50c8cb,_0x2c0bfc=new Set();_0x432c08['attributes'][_0xcb26b4(0x28c)]?.[_0xcb26b4(0x245)]&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x432c08[_0xcb26b4(0x1fc)][_0xcb26b4(0x28c)][_0xcb26b4(0x245)]);const _0x36343a=_0x432c08[_0xcb26b4(0x1fc)][_0xcb26b4(0x2a0)];if(Array['isArray'](_0x36343a))for(const _0x3339ff of _0x36343a){_0x3339ff[_0xcb26b4(0x1f4)]?.[_0xcb26b4(0x245)]&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x3339ff[_0xcb26b4(0x1f4)][_0xcb26b4(0x245)]);const _0x49f549=_0x3339ff[_0xcb26b4(0x26a)]??_0x3339ff['exitCriteria'];if(Array[_0xcb26b4(0x2ac)](_0x49f549))for(const _0x74970f of _0x49f549){_0x74970f[_0xcb26b4(0x245)]&&_0x2c0bfc['add'](_0x74970f[_0xcb26b4(0x245)]);}_0x3339ff[_0xcb26b4(0x274)]?.['segmentId']&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x3339ff[_0xcb26b4(0x274)][_0xcb26b4(0x245)]);if(_0x3339ff[_0xcb26b4(0x262)]&&typeof _0x3339ff['steps']===_0xcb26b4(0x27f)){const _0x2c8852=Array[_0xcb26b4(0x2ac)](_0x3339ff[_0xcb26b4(0x262)])?_0x3339ff[_0xcb26b4(0x262)]:Object[_0xcb26b4(0x26b)](_0x3339ff['steps']);for(const _0x25b995 of _0x2c8852){_0x25b995['waitCondition']?.[_0xcb26b4(0x245)]&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x25b995[_0xcb26b4(0x259)][_0xcb26b4(0x245)]);const _0x5840e9=_0x25b995;_0x5840e9[_0xcb26b4(0x29b)]&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x5840e9[_0xcb26b4(0x29b)]);if(Array[_0xcb26b4(0x2ac)](_0x5840e9['conditions']))for(const _0x30a9de of _0x5840e9[_0xcb26b4(0x238)]){_0x30a9de[_0xcb26b4(0x245)]&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x30a9de[_0xcb26b4(0x245)]);}if(Array[_0xcb26b4(0x2ac)](_0x25b995[_0xcb26b4(0x25a)]))for(const _0x376957 of _0x25b995['branches']){_0x376957[_0xcb26b4(0x245)]&&_0x2c0bfc[_0xcb26b4(0x1f5)](_0x376957[_0xcb26b4(0x245)]);}}}}return _0x2c0bfc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x44bd48=a148_0x160d;(function(_0x3c8903,_0x1b3cc0){const _0x3c3e3e=a148_0x160d,_0x4cb5e3=_0x3c8903();while(!![]){try{const _0x3270a1=-parseInt(_0x3c3e3e(0x218))/0x1*(-parseInt(_0x3c3e3e(0x201))/0x2)+parseInt(_0x3c3e3e(0x203))/0x3+-parseInt(_0x3c3e3e(0x1ff))/0x4*(-parseInt(_0x3c3e3e(0x1ea))/0x5)+-parseInt(_0x3c3e3e(0x1ec))/0x6*(-parseInt(_0x3c3e3e(0x212))/0x7)+-parseInt(_0x3c3e3e(0x215))/0x8+-parseInt(_0x3c3e3e(0x1fc))/0x9+-parseInt(_0x3c3e3e(0x209))/0xa;if(_0x3270a1===_0x1b3cc0)break;else _0x4cb5e3['push'](_0x4cb5e3['shift']());}catch(_0xadb1ba){_0x4cb5e3['push'](_0x4cb5e3['shift']());}}}(a148_0x5b00,0x3756e));export const DEFAULT_TIME_RANGE=a148_0x44bd48(0x20c);export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x1e5fbb,_0x2ca3e5,_0x36d3fe){const _0x28daaa=a148_0x44bd48,_0x2f5b9c=_0x36d3fe&&_0x36d3fe['length']>0x0?_0x36d3fe[_0x28daaa(0x1ef)](',\x20'):'*';return'SELECT\x20'+_0x2f5b9c+_0x28daaa(0x1f5)+_0x1e5fbb+'.'+_0x2ca3e5+_0x28daaa(0x210);}function a148_0x5b00(){const _0x46acaa=['behaviors','forEach','12673LhIBDc','\x20m\x0aJOIN\x20','master','trim','m.*','push','attributes','\x27)\x0a','547035VhDYzx','(all\x20columns)','603510Tcpnej','name','\x20a\x0a\x20\x20ON\x20m.','join','test','find','b.*','source','map','\x20FROM\x20','SELECT\x20*\x20FROM\x20','\x20LIMIT\x20','\x0aSELECT\x20m.','\x20=\x20b.','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','LEFT\x20JOIN\x20','502920OEhrIR','\x0a\x20\x20ON\x20m.','column','4sMjBXc','\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20','6XdWTtl','parent_key','919866jvAAEL','\x0aFROM\x20','\x0aLIMIT\x200\x0a','table','\x20b\x0a\x20\x20ON\x20m.','all_columns','655380nXWIYt','\x0aLIMIT\x20','columns','-1d','database','\x20=\x20a.','child_key','\x20LIMIT\x200','length','7mAKhrr',')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','1652360YhYrLW'];a148_0x5b00=function(){return _0x46acaa;};return a148_0x5b00();}export function generateMasterCountSQL(_0x41e5d0){const _0x22d588=a148_0x44bd48,{database:_0x85cb7a,table:_0x5e1895}=_0x41e5d0[_0x22d588(0x21a)];return _0x22d588(0x214)+_0x85cb7a+'.'+_0x5e1895;}export function generateMasterSampleSQL(_0x5446a9,_0x459a8f=0x5){const _0x115ee3=a148_0x44bd48,{database:_0xa8aeeb,table:_0x25b04a}=_0x5446a9[_0x115ee3(0x21a)];return _0x115ee3(0x1f6)+_0xa8aeeb+'.'+_0x25b04a+_0x115ee3(0x1f7)+_0x459a8f;}export function generateAttributeCoverageSQL(_0x4d895c,_0x178f77){const _0x30705b=a148_0x44bd48,_0x3e074d=_0x4d895c[_0x30705b(0x21a)];return(_0x30705b(0x200)+_0x3e074d['database']+'.'+_0x3e074d['table']+'\x20m\x0aLEFT\x20JOIN\x20'+_0x178f77[_0x30705b(0x1f3)]['database']+'.'+_0x178f77['source'][_0x30705b(0x206)]+_0x30705b(0x1ee)+_0x178f77[_0x30705b(0x1ef)][_0x30705b(0x202)]+_0x30705b(0x20e)+_0x178f77['join']['child_key']+'\x0aWHERE\x20a.'+_0x178f77[_0x30705b(0x1ef)][_0x30705b(0x20f)]+'\x20IS\x20NOT\x20NULL\x0a')[_0x30705b(0x21b)]();}export function generateBehaviorStatsSQL(_0x18a44e,_0x44d275,_0x43394b=DEFAULT_TIME_RANGE){const _0x118d2c=a148_0x44bd48,_0x52c719=_0x18a44e[_0x118d2c(0x21a)];return('\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.'+_0x44d275[_0x118d2c(0x1ef)]['parent_key']+_0x118d2c(0x213)+_0x52c719[_0x118d2c(0x20d)]+'.'+_0x52c719[_0x118d2c(0x206)]+_0x118d2c(0x219)+_0x44d275[_0x118d2c(0x1f3)][_0x118d2c(0x20d)]+'.'+_0x44d275[_0x118d2c(0x1f3)][_0x118d2c(0x206)]+'\x20b\x0a\x20\x20ON\x20m.'+_0x44d275[_0x118d2c(0x1ef)][_0x118d2c(0x202)]+_0x118d2c(0x1f9)+_0x44d275[_0x118d2c(0x1ef)][_0x118d2c(0x20f)]+_0x118d2c(0x1fa)+_0x43394b+_0x118d2c(0x21f))['trim']();}export function generateAttributeSampleSQL(_0x19ea58,_0x4488c1,_0x2f3938=0x5){const _0x43d9f4=a148_0x44bd48,_0x27b452=_0x19ea58[_0x43d9f4(0x21a)],_0x443fbc=_0x4488c1['join'][_0x43d9f4(0x202)],_0x3dfa03=_0x4488c1[_0x43d9f4(0x20b)][_0x43d9f4(0x1f4)](_0x3af688=>'a.'+_0x3af688[_0x43d9f4(0x1fe)])['join'](',\x20');return(_0x43d9f4(0x1f8)+_0x443fbc+',\x20'+_0x3dfa03+_0x43d9f4(0x204)+_0x27b452[_0x43d9f4(0x20d)]+'.'+_0x27b452['table']+_0x43d9f4(0x219)+_0x4488c1[_0x43d9f4(0x1f3)][_0x43d9f4(0x20d)]+'.'+_0x4488c1[_0x43d9f4(0x1f3)][_0x43d9f4(0x206)]+_0x43d9f4(0x1ee)+_0x4488c1[_0x43d9f4(0x1ef)][_0x43d9f4(0x202)]+_0x43d9f4(0x20e)+_0x4488c1[_0x43d9f4(0x1ef)]['child_key']+_0x43d9f4(0x20a)+_0x2f3938+'\x0a')['trim']();}function a148_0x160d(_0x3c9c24,_0x1200b4){_0x3c9c24=_0x3c9c24-0x1ea;const _0x5b00d3=a148_0x5b00();let _0x160d35=_0x5b00d3[_0x3c9c24];return _0x160d35;}export function generateBehaviorSampleSQL(_0x364d79,_0xb6591c,_0x293433=0x5,_0x57d99b=DEFAULT_TIME_RANGE){const _0x52b48c=a148_0x44bd48,_0x35106b=_0x364d79[_0x52b48c(0x21a)],_0x117552=_0xb6591c['join'][_0x52b48c(0x202)];let _0x2fc5e2;if(_0xb6591c[_0x52b48c(0x208)])_0x2fc5e2=_0x52b48c(0x1f2);else _0xb6591c['columns']&&_0xb6591c[_0x52b48c(0x20b)][_0x52b48c(0x211)]>0x0?_0x2fc5e2=_0xb6591c['columns'][_0x52b48c(0x1f4)](_0x4303fb=>'b.'+_0x4303fb['column'])[_0x52b48c(0x1ef)](',\x20'):_0x2fc5e2=_0x52b48c(0x1f2);return(_0x52b48c(0x1f8)+_0x117552+',\x20'+_0x2fc5e2+_0x52b48c(0x204)+_0x35106b[_0x52b48c(0x20d)]+'.'+_0x35106b['table']+'\x20m\x0aJOIN\x20'+_0xb6591c[_0x52b48c(0x1f3)]['database']+'.'+_0xb6591c[_0x52b48c(0x1f3)][_0x52b48c(0x206)]+_0x52b48c(0x207)+_0xb6591c[_0x52b48c(0x1ef)][_0x52b48c(0x202)]+'\x20=\x20b.'+_0xb6591c[_0x52b48c(0x1ef)][_0x52b48c(0x20f)]+_0x52b48c(0x1fa)+_0x57d99b+'\x27)\x0aLIMIT\x20'+_0x293433+'\x0a')[_0x52b48c(0x21b)]();}function quoteIdentifier(_0x97bd6a){const _0x29c7c8=a148_0x44bd48;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/[_0x29c7c8(0x1f0)](_0x97bd6a))return'\x22'+_0x97bd6a['replace'](/"/g,'\x22\x22')+'\x22';return _0x97bd6a;}export function generateEnrichedSQL(_0x108c5a,_0x5932b1=0x5){const _0x2af96f=a148_0x44bd48,_0x2a4693=_0x108c5a[_0x2af96f(0x21a)],_0x42d06b=_0x108c5a[_0x2af96f(0x21e)]||[];if(_0x42d06b[_0x2af96f(0x211)]===0x0)return _0x2af96f(0x1f6)+_0x2a4693[_0x2af96f(0x20d)]+'.'+_0x2a4693[_0x2af96f(0x206)]+_0x2af96f(0x1f7)+_0x5932b1;const _0x152ebc=[_0x2af96f(0x21c)],_0x46b694=[];return _0x42d06b[_0x2af96f(0x217)]((_0x11ab2c,_0x54bff8)=>{const _0xb45ddc=_0x2af96f,_0x516bca='a'+_0x54bff8;_0x11ab2c['columns'][_0xb45ddc(0x217)](_0x94844=>{const _0x502deb=_0xb45ddc,_0x439d2e=quoteIdentifier(_0x94844['label']||_0x94844[_0x502deb(0x1fe)]);_0x152ebc['push'](_0x516bca+'.'+_0x94844[_0x502deb(0x1fe)]+'\x20AS\x20'+_0x439d2e);}),_0x46b694[_0xb45ddc(0x21d)](_0xb45ddc(0x1fb)+_0x11ab2c[_0xb45ddc(0x1f3)][_0xb45ddc(0x20d)]+'.'+_0x11ab2c[_0xb45ddc(0x1f3)][_0xb45ddc(0x206)]+'\x20'+_0x516bca+_0xb45ddc(0x1fd)+_0x11ab2c[_0xb45ddc(0x1ef)][_0xb45ddc(0x202)]+'\x20=\x20'+_0x516bca+'.'+_0x11ab2c[_0xb45ddc(0x1ef)][_0xb45ddc(0x20f)]);}),('\x0aSELECT\x20'+_0x152ebc['join'](',\x20')+'\x0aFROM\x20'+_0x2a4693[_0x2af96f(0x20d)]+'.'+_0x2a4693[_0x2af96f(0x206)]+'\x20m\x0a'+_0x46b694['join']('\x0a')+_0x2af96f(0x20a)+_0x5932b1+'\x0a')[_0x2af96f(0x21b)]();}export function generateAttributeSchemaSQL(_0xd287c5,_0x6686b5){const _0x13ebb5=a148_0x44bd48,_0xfbc57e=_0xd287c5['master'],_0x40a15e=_0x6686b5[_0x13ebb5(0x1ef)]['parent_key'],_0x38ca3b=_0x6686b5[_0x13ebb5(0x20b)]['map'](_0x582bd8=>'a.'+_0x582bd8[_0x13ebb5(0x1fe)])[_0x13ebb5(0x1ef)](',\x20');return(_0x13ebb5(0x1f8)+_0x40a15e+',\x20'+_0x38ca3b+_0x13ebb5(0x204)+_0xfbc57e[_0x13ebb5(0x20d)]+'.'+_0xfbc57e[_0x13ebb5(0x206)]+'\x20m\x0aJOIN\x20'+_0x6686b5[_0x13ebb5(0x1f3)][_0x13ebb5(0x20d)]+'.'+_0x6686b5[_0x13ebb5(0x1f3)][_0x13ebb5(0x206)]+_0x13ebb5(0x1ee)+_0x6686b5[_0x13ebb5(0x1ef)][_0x13ebb5(0x202)]+_0x13ebb5(0x20e)+_0x6686b5[_0x13ebb5(0x1ef)][_0x13ebb5(0x20f)]+_0x13ebb5(0x205))['trim']();}export function generateBehaviorSchemaSQL(_0x1be91c,_0x3851c){const _0x4da4a8=a148_0x44bd48,_0x511e6c=_0x1be91c[_0x4da4a8(0x21a)],_0x1e6e08=_0x3851c[_0x4da4a8(0x1ef)][_0x4da4a8(0x202)];let _0x1606a9;if(_0x3851c['all_columns'])_0x1606a9='b.*';else _0x3851c['columns']&&_0x3851c[_0x4da4a8(0x20b)][_0x4da4a8(0x211)]>0x0?_0x1606a9=_0x3851c[_0x4da4a8(0x20b)]['map'](_0x3c07e0=>'b.'+_0x3c07e0[_0x4da4a8(0x1fe)])['join'](',\x20'):_0x1606a9=_0x4da4a8(0x1f2);return('\x0aSELECT\x20m.'+_0x1e6e08+',\x20'+_0x1606a9+_0x4da4a8(0x204)+_0x511e6c[_0x4da4a8(0x20d)]+'.'+_0x511e6c['table']+'\x20m\x0aJOIN\x20'+_0x3851c[_0x4da4a8(0x1f3)][_0x4da4a8(0x20d)]+'.'+_0x3851c[_0x4da4a8(0x1f3)]['table']+_0x4da4a8(0x207)+_0x3851c[_0x4da4a8(0x1ef)][_0x4da4a8(0x202)]+_0x4da4a8(0x1f9)+_0x3851c[_0x4da4a8(0x1ef)][_0x4da4a8(0x20f)]+_0x4da4a8(0x205))[_0x4da4a8(0x21b)]();}export function getAttributeColumns(_0x3006d7){const _0x2d18dc=a148_0x44bd48;return _0x3006d7[_0x2d18dc(0x20b)]['map'](_0x92fbd1=>({'label':_0x92fbd1['label']||_0x92fbd1['column'],'column':_0x92fbd1[_0x2d18dc(0x1fe)]}));}export function getBehaviorColumns(_0xaa5e51){const _0x405385=a148_0x44bd48;if(_0xaa5e51[_0x405385(0x208)])return[{'label':_0x405385(0x1eb),'column':'*'}];if(_0xaa5e51[_0x405385(0x20b)]&&_0xaa5e51[_0x405385(0x20b)][_0x405385(0x211)]>0x0)return _0xaa5e51['columns'][_0x405385(0x1f4)](_0x1d6a7d=>({'label':_0x1d6a7d['label']||_0x1d6a7d[_0x405385(0x1fe)],'column':_0x1d6a7d[_0x405385(0x1fe)]}));return[{'label':_0x405385(0x1eb),'column':'*'}];}export function findAttributeByName(_0x268239,_0x32df10){const _0x280360=a148_0x44bd48;return _0x268239[_0x280360(0x21e)]?.[_0x280360(0x1f1)](_0x1a9469=>_0x1a9469[_0x280360(0x1ed)]['toLowerCase']()===_0x32df10['toLowerCase']());}export function findBehaviorByName(_0x578bdc,_0x58c367){const _0x3ec97d=a148_0x44bd48;return _0x578bdc[_0x3ec97d(0x216)]?.[_0x3ec97d(0x1f1)](_0x187ce5=>_0x187ce5[_0x3ec97d(0x1ed)]['toLowerCase']()===_0x58c367['toLowerCase']());}
|