@treasuredata/tdx 2026.4.5 → 2026.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +3 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +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.d.ts.map +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/access-tracker.js.map +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +1 -1
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.d.ts +2 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3850d7,_0x1dca80){const _0x49fc69=a146_0x331d,_0x41a4cb=_0x3850d7();while(!![]){try{const _0x2dee95=parseInt(_0x49fc69(0x113))/0x1*(parseInt(_0x49fc69(0x13a))/0x2)+-parseInt(_0x49fc69(0xed))/0x3*(parseInt(_0x49fc69(0x12f))/0x4)+-parseInt(_0x49fc69(0x11d))/0x5*(-parseInt(_0x49fc69(0x102))/0x6)+parseInt(_0x49fc69(0x137))/0x7+-parseInt(_0x49fc69(0x14a))/0x8*(-parseInt(_0x49fc69(0x110))/0x9)+-parseInt(_0x49fc69(0x15b))/0xa+-parseInt(_0x49fc69(0x114))/0xb;if(_0x2dee95===_0x1dca80)break;else _0x41a4cb['push'](_0x41a4cb['shift']());}catch(_0x4b213c){_0x41a4cb['push'](_0x41a4cb['shift']());}}}(a146_0xb678,0x47aed));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0xf231cc,_0x3fd650,_0x10ea5f,_0x21a314,_0x17dce2,_0x3e0c26){const _0x26e734=a146_0x331d;return{'level':_0xf231cc,'path':_0x3fd650,'code':_0x10ea5f,'message':_0x21a314,'location':getLocationFromPath(_0x17dce2[_0x26e734(0x105)],_0x17dce2[_0x26e734(0xfa)],pathToArray(_0x3e0c26??_0x3fd650))};}function validateVersionStructure(_0x480258,_0xf23b0f){const _0x17476d=a146_0x331d,_0xa3f7e2=[];return _0x480258[_0x17476d(0x17d)]>MAX_STAGES&&_0xa3f7e2[_0x17476d(0x15e)](createIssue(_0x17476d(0xd6),'stages',_0x17476d(0x15d),_0x17476d(0x15c)+_0x480258[_0x17476d(0x17d)]+_0x17476d(0x184)+MAX_STAGES,_0xf23b0f)),_0xa3f7e2;}function validateStageStructure(_0x52eac9,_0x29273e,_0x1206c6,_0x3f14e7){const _0x57f3d8=a146_0x331d,_0x4dc632=[],_0x39fc16=_0x57f3d8(0x167)+_0x29273e+']';_0x29273e===0x0&&!_0x52eac9[_0x57f3d8(0xd1)]&&_0x4dc632['push'](createIssue('error',_0x39fc16+_0x57f3d8(0xee),_0x57f3d8(0xec),_0x57f3d8(0x14f)+_0x52eac9[_0x57f3d8(0x138)]+_0x57f3d8(0x12b),_0x3f14e7,_0x39fc16));const _0x4666f7=_0x29273e===_0x1206c6-0x1;!_0x4666f7&&!_0x52eac9['milestone']&&_0x4dc632[_0x57f3d8(0x15e)](createIssue(_0x57f3d8(0xd6),_0x39fc16+'.milestone',_0x57f3d8(0x135),_0x57f3d8(0x14f)+_0x52eac9[_0x57f3d8(0x138)]+_0x57f3d8(0x17b),_0x3f14e7,_0x39fc16));(!_0x52eac9[_0x57f3d8(0x148)]||_0x52eac9[_0x57f3d8(0x148)][_0x57f3d8(0x17d)]===0x0)&&_0x4dc632['push'](createIssue(_0x57f3d8(0x139),_0x39fc16+_0x57f3d8(0x112),_0x57f3d8(0x13c),_0x57f3d8(0x14f)+_0x52eac9[_0x57f3d8(0x138)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x3f14e7,_0x39fc16));const _0x2008a2=_0x52eac9[_0x57f3d8(0x161)]?.[_0x57f3d8(0x17d)]??0x0;if(_0x2008a2===0x0)_0x4dc632['push'](createIssue(_0x57f3d8(0xd6),_0x39fc16+_0x57f3d8(0x136),_0x57f3d8(0xd9),_0x57f3d8(0x14f)+_0x52eac9[_0x57f3d8(0x138)]+_0x57f3d8(0xff),_0x3f14e7,_0x39fc16+_0x57f3d8(0x136)));else{if(_0x2008a2===0x1)_0x4dc632[_0x57f3d8(0x15e)](createIssue(_0x57f3d8(0x139),_0x39fc16+_0x57f3d8(0x136),_0x57f3d8(0xd9),'Stage\x20\x27'+_0x52eac9[_0x57f3d8(0x138)]+_0x57f3d8(0xef),_0x3f14e7,_0x39fc16+_0x57f3d8(0x136)));else _0x2008a2<=0x3&&_0x4dc632[_0x57f3d8(0x15e)](createIssue(_0x57f3d8(0x139),_0x39fc16+_0x57f3d8(0x136),_0x57f3d8(0x12e),_0x57f3d8(0x14f)+_0x52eac9['name']+_0x57f3d8(0x15f)+_0x2008a2+_0x57f3d8(0xf4),_0x3f14e7,_0x39fc16+_0x57f3d8(0x136)));}return _0x4dc632;}function validateStep(_0x1a08f5,_0x28b3cf,_0x5d979a,_0x802fc6){const _0x22aaf5=a146_0x331d,_0x3a19de=[];if(_0x1a08f5[_0x22aaf5(0x101)]===_0x22aaf5(0x178))return _0x1a08f5[_0x22aaf5(0x130)]&&_0x3a19de['push'](createIssue(_0x22aaf5(0xd6),_0x28b3cf+_0x22aaf5(0xfc),'END_STEP_HAS_NEXT_OR_WITH','End\x20step\x20\x27'+_0x1a08f5[_0x22aaf5(0x138)]+_0x22aaf5(0x180),_0x5d979a)),'with'in _0x1a08f5&&_0x1a08f5[_0x22aaf5(0x12c)]!==undefined&&_0x3a19de[_0x22aaf5(0x15e)](createIssue(_0x22aaf5(0xd6),_0x28b3cf+_0x22aaf5(0x171),_0x22aaf5(0x115),'End\x20step\x20\x27'+_0x1a08f5[_0x22aaf5(0x138)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x5d979a)),_0x3a19de;_0x1a08f5[_0x22aaf5(0x130)]&&(_0x5d979a[_0x22aaf5(0x157)]&&!_0x5d979a['stepNames']['has'](_0x1a08f5['next'])&&_0x3a19de[_0x22aaf5(0x15e)](createIssue(_0x22aaf5(0xd6),_0x28b3cf+_0x22aaf5(0xfc),_0x22aaf5(0xfb),_0x22aaf5(0x15a)+_0x1a08f5[_0x22aaf5(0x130)]+'\x27',_0x5d979a)));switch(_0x1a08f5[_0x22aaf5(0x101)]){case'wait':_0x3a19de[_0x22aaf5(0x15e)](...validateWaitStep(_0x1a08f5,_0x28b3cf,_0x5d979a,_0x802fc6));break;case _0x22aaf5(0xd0):_0x3a19de[_0x22aaf5(0x15e)](...validateActivationStep(_0x1a08f5,_0x28b3cf,_0x5d979a));break;case _0x22aaf5(0x16d):_0x3a19de[_0x22aaf5(0x15e)](...validateDecisionPointStep(_0x1a08f5,_0x28b3cf,_0x5d979a,_0x802fc6));break;case'ab_test':_0x3a19de[_0x22aaf5(0x15e)](...validateAbTestStep(_0x1a08f5,_0x28b3cf,_0x5d979a,_0x802fc6));break;case _0x22aaf5(0x10d):_0x3a19de[_0x22aaf5(0x15e)](...validateJumpStep(_0x1a08f5,_0x28b3cf,_0x5d979a));break;}return _0x3a19de;}function validateWaitStep(_0x17bdf1,_0x7ded0e,_0x40df3c,_0x301016){const _0x2ab6a2=a146_0x331d,_0x427ad6=[];if(!_0x17bdf1[_0x2ab6a2(0x12c)])return _0x427ad6[_0x2ab6a2(0x15e)](createIssue(_0x2ab6a2(0xd6),_0x7ded0e+'.with','MISSING_WAIT_PARAMS',_0x2ab6a2(0x177),_0x40df3c,_0x7ded0e)),_0x427ad6;if(_0x17bdf1[_0x2ab6a2(0x12c)]['condition']){const _0x2c2095=_0x17bdf1[_0x2ab6a2(0x12c)][_0x2ab6a2(0x128)];if(_0x2c2095[_0x2ab6a2(0x124)]){_0x40df3c[_0x2ab6a2(0x165)]?.[_0x2ab6a2(0xea)](_0x2c2095[_0x2ab6a2(0x124)]);!_0x2c2095[_0x2ab6a2(0x124)][_0x2ab6a2(0x154)]('ref:')&&(_0x40df3c[_0x2ab6a2(0x121)]&&!_0x40df3c['embeddedSegments'][_0x2ab6a2(0x107)](_0x2c2095[_0x2ab6a2(0x124)])&&_0x427ad6[_0x2ab6a2(0x15e)](createIssue(_0x2ab6a2(0xd6),_0x7ded0e+_0x2ab6a2(0x10a),'MISSING_SEGMENT_REFERENCE',_0x2ab6a2(0x126)+_0x2c2095['segment']+_0x2ab6a2(0x14b),_0x40df3c)));_0x2c2095[_0x2ab6a2(0x130)]&&_0x40df3c[_0x2ab6a2(0x157)]&&!_0x40df3c[_0x2ab6a2(0x157)][_0x2ab6a2(0x107)](_0x2c2095[_0x2ab6a2(0x130)])&&_0x427ad6[_0x2ab6a2(0x15e)](createIssue(_0x2ab6a2(0xd6),_0x7ded0e+'.with.condition.next',_0x2ab6a2(0xfb),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x2c2095[_0x2ab6a2(0x130)]+'\x27',_0x40df3c));_0x2c2095[_0x2ab6a2(0x14e)]?.[_0x2ab6a2(0x130)]&&_0x40df3c[_0x2ab6a2(0x157)]&&!_0x40df3c[_0x2ab6a2(0x157)][_0x2ab6a2(0x107)](_0x2c2095[_0x2ab6a2(0x14e)][_0x2ab6a2(0x130)])&&_0x427ad6[_0x2ab6a2(0x15e)](createIssue(_0x2ab6a2(0xd6),_0x7ded0e+'.with.condition.timeout.next','INVALID_NEXT_REFERENCE',_0x2ab6a2(0xf1)+_0x2c2095[_0x2ab6a2(0x14e)][_0x2ab6a2(0x130)]+'\x27',_0x40df3c));const _0x37118c=_0x2c2095[_0x2ab6a2(0x130)]||_0x17bdf1[_0x2ab6a2(0x130)],_0x4329b3=_0x2c2095[_0x2ab6a2(0x14e)]?.[_0x2ab6a2(0x130)]||_0x17bdf1[_0x2ab6a2(0x130)];if(_0x37118c){const _0x4882bf=_0x301016[_0x2ab6a2(0x17e)](_0x37118c);_0x4882bf?.[_0x2ab6a2(0x101)]===_0x2ab6a2(0xeb)&&_0x427ad6[_0x2ab6a2(0x15e)](createIssue(_0x2ab6a2(0x139),_0x7ded0e+_0x2ab6a2(0x186),'BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x37118c+_0x2ab6a2(0x174),_0x40df3c,_0x7ded0e+_0x2ab6a2(0x172)));}if(_0x4329b3){const _0x3f1c30=_0x301016[_0x2ab6a2(0x17e)](_0x4329b3);_0x3f1c30?.[_0x2ab6a2(0x101)]===_0x2ab6a2(0xeb)&&_0x427ad6[_0x2ab6a2(0x15e)](createIssue(_0x2ab6a2(0x139),_0x7ded0e+_0x2ab6a2(0xe9),'BRANCH_DIRECTLY_TO_MERGE',_0x2ab6a2(0xfe)+_0x4329b3+_0x2ab6a2(0x174),_0x40df3c,_0x7ded0e+'.with.condition.timeout'));}}}return _0x427ad6;}function validateActivationStep(_0x4a5ffe,_0x4d1f9b,_0x3a2330){const _0x5500ae=a146_0x331d,_0x4c298b=[];if(!_0x4a5ffe['with']?.[_0x5500ae(0xd0)])return _0x4c298b['push'](createIssue(_0x5500ae(0xd6),_0x4d1f9b+_0x5500ae(0x11a),'MISSING_ACTIVATION_REF','Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x3a2330,_0x4d1f9b)),_0x4c298b;const _0x2a2b24=_0x4a5ffe[_0x5500ae(0x12c)][_0x5500ae(0xd0)];return _0x3a2330[_0x5500ae(0x13d)]&&!_0x2a2b24['startsWith'](_0x5500ae(0x158))&&(!_0x3a2330[_0x5500ae(0x13d)][_0x5500ae(0x107)](_0x2a2b24)&&_0x4c298b[_0x5500ae(0x15e)](createIssue(_0x5500ae(0xd6),_0x4d1f9b+'.with.activation',_0x5500ae(0x159),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x2a2b24+_0x5500ae(0x129),_0x3a2330))),_0x4c298b;}function validateDecisionPointStep(_0x5dc36f,_0x3fe3fc,_0x290893,_0x13ac4d){const _0x3e8f57=a146_0x331d,_0x316d09=[];if(!_0x5dc36f[_0x3e8f57(0x12c)]?.[_0x3e8f57(0x173)]||_0x5dc36f[_0x3e8f57(0x12c)][_0x3e8f57(0x173)]['length']===0x0)return _0x316d09[_0x3e8f57(0x15e)](createIssue(_0x3e8f57(0xd6),_0x3fe3fc+_0x3e8f57(0x176),_0x3e8f57(0x106),_0x3e8f57(0x104),_0x290893,_0x3fe3fc)),_0x316d09;for(let _0x3670d0=0x0;_0x3670d0<_0x5dc36f[_0x3e8f57(0x12c)]['branches'][_0x3e8f57(0x17d)];_0x3670d0++){const _0x51c572=_0x5dc36f[_0x3e8f57(0x12c)][_0x3e8f57(0x173)][_0x3670d0],_0x2a1cf0=_0x3fe3fc+_0x3e8f57(0x185)+_0x3670d0+']';_0x51c572[_0x3e8f57(0x124)]&&!_0x51c572[_0x3e8f57(0xe1)]&&(_0x290893[_0x3e8f57(0x165)]?.[_0x3e8f57(0xea)](_0x51c572[_0x3e8f57(0x124)]),!_0x51c572[_0x3e8f57(0x124)][_0x3e8f57(0x154)](_0x3e8f57(0x158))&&(_0x290893[_0x3e8f57(0x121)]&&!_0x290893[_0x3e8f57(0x121)][_0x3e8f57(0x107)](_0x51c572[_0x3e8f57(0x124)])&&_0x316d09[_0x3e8f57(0x15e)](createIssue(_0x3e8f57(0xd6),_0x2a1cf0+'.segment','MISSING_SEGMENT_REFERENCE',_0x3e8f57(0x108)+_0x51c572['segment']+'\x27',_0x290893))));_0x51c572[_0x3e8f57(0x130)]&&_0x290893['stepNames']&&!_0x290893['stepNames']['has'](_0x51c572[_0x3e8f57(0x130)])&&_0x316d09[_0x3e8f57(0x15e)](createIssue(_0x3e8f57(0xd6),_0x2a1cf0+_0x3e8f57(0xfc),_0x3e8f57(0xfb),_0x3e8f57(0x14c)+_0x51c572[_0x3e8f57(0x130)]+'\x27',_0x290893));if(_0x51c572['next']){const _0x18a894=_0x13ac4d[_0x3e8f57(0x17e)](_0x51c572[_0x3e8f57(0x130)]);_0x18a894?.[_0x3e8f57(0x101)]==='merge'&&_0x316d09[_0x3e8f57(0x15e)](createIssue('warning',_0x2a1cf0+_0x3e8f57(0xfc),_0x3e8f57(0xdb),_0x3e8f57(0x16c)+_0x51c572['name']+_0x3e8f57(0xe3)+_0x51c572[_0x3e8f57(0x130)]+_0x3e8f57(0x117),_0x290893));}}return _0x316d09;}function validateAbTestStep(_0x2671e0,_0x59ae6d,_0x275040,_0x5c0a07){const _0x4482df=a146_0x331d,_0x1fadb2=[];if(!_0x2671e0[_0x4482df(0x12c)]?.[_0x4482df(0x146)]||_0x2671e0[_0x4482df(0x12c)][_0x4482df(0x146)]['length']===0x0)return _0x1fadb2[_0x4482df(0x15e)](createIssue(_0x4482df(0xd6),_0x59ae6d+'.with.variants','MISSING_CONDITIONS','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x275040,_0x59ae6d)),_0x1fadb2;const _0x103582=_0x2671e0[_0x4482df(0x12c)]['variants'][_0x4482df(0x169)]((_0x45ae6f,_0x13b3cc)=>_0x45ae6f+(_0x13b3cc[_0x4482df(0x164)]||0x0),0x0);Math[_0x4482df(0xf2)](_0x103582-0x64)>0.01&&_0x1fadb2[_0x4482df(0x15e)](createIssue(_0x4482df(0xd6),_0x59ae6d+'.with.variants',_0x4482df(0x103),_0x4482df(0xdf)+_0x103582+'%)',_0x275040));for(let _0x387630=0x0;_0x387630<_0x2671e0[_0x4482df(0x12c)]['variants']['length'];_0x387630++){const _0xf71bbd=_0x2671e0['with']['variants'][_0x387630],_0x250325=_0x59ae6d+'.with.variants['+_0x387630+']';_0xf71bbd[_0x4482df(0x130)]&&_0x275040['stepNames']&&!_0x275040[_0x4482df(0x157)]['has'](_0xf71bbd[_0x4482df(0x130)])&&_0x1fadb2[_0x4482df(0x15e)](createIssue(_0x4482df(0xd6),_0x250325+_0x4482df(0xfc),_0x4482df(0xfb),_0x4482df(0x143)+_0xf71bbd[_0x4482df(0x130)]+'\x27',_0x275040));if(_0xf71bbd[_0x4482df(0x130)]){const _0x2a70af=_0x5c0a07[_0x4482df(0x17e)](_0xf71bbd['next']);_0x2a70af?.['type']===_0x4482df(0xeb)&&_0x1fadb2['push'](createIssue(_0x4482df(0x139),_0x250325+'.next',_0x4482df(0xdb),'A/B\x20test\x20variant\x20\x27'+_0xf71bbd[_0x4482df(0x138)]+_0x4482df(0xe3)+_0xf71bbd[_0x4482df(0x130)]+_0x4482df(0x117),_0x275040));}}return _0x1fadb2;}function validateJumpStep(_0x56b14a,_0x2c508a,_0x4cbb5a){const _0x391657=a146_0x331d,_0x111e23=[];if(!_0x56b14a['with']?.[_0x391657(0xd4)])return _0x111e23['push'](createIssue(_0x391657(0xd6),_0x2c508a+_0x391657(0x17f),_0x391657(0x133),_0x391657(0x147),_0x4cbb5a,_0x2c508a)),_0x111e23;return(!_0x56b14a[_0x391657(0x12c)][_0x391657(0xd4)][_0x391657(0x123)]||!_0x56b14a[_0x391657(0x12c)]['target'][_0x391657(0x131)])&&_0x111e23[_0x391657(0x15e)](createIssue(_0x391657(0xd6),_0x2c508a+_0x391657(0x17f),_0x391657(0x133),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x4cbb5a)),_0x111e23;}function buildConvergenceMap(_0x3f5b77){const _0x51dc0b=a146_0x331d,_0x2ed181=new Map();function _0x4cc7f0(_0x87103b,_0x897419){const _0x5a21b2=a146_0x331d,_0x3ed3fc=_0x2ed181[_0x5a21b2(0x17e)](_0x87103b)||[];_0x3ed3fc[_0x5a21b2(0x15e)](_0x897419),_0x2ed181['set'](_0x87103b,_0x3ed3fc);}for(const _0x9c5ccd of _0x3f5b77){_0x9c5ccd['next']&&_0x4cc7f0(_0x9c5ccd['next'],{'stepName':_0x9c5ccd[_0x51dc0b(0x138)],'description':_0x51dc0b(0x163)+_0x9c5ccd[_0x51dc0b(0x138)]+'\x27'});if(_0x9c5ccd['type']===_0x51dc0b(0x16d)&&_0x9c5ccd[_0x51dc0b(0x12c)]?.[_0x51dc0b(0x173)])for(const _0x14cb30 of _0x9c5ccd[_0x51dc0b(0x12c)][_0x51dc0b(0x173)]){_0x14cb30[_0x51dc0b(0x130)]&&_0x4cc7f0(_0x14cb30[_0x51dc0b(0x130)],{'stepName':_0x9c5ccd[_0x51dc0b(0x138)],'description':_0x51dc0b(0x142)+_0x14cb30['name']+_0x51dc0b(0xe8)+_0x9c5ccd[_0x51dc0b(0x138)]+'\x27'});}if(_0x9c5ccd[_0x51dc0b(0x101)]==='ab_test'&&_0x9c5ccd[_0x51dc0b(0x12c)]?.['variants'])for(const _0x5674d4 of _0x9c5ccd['with'][_0x51dc0b(0x146)]){_0x5674d4[_0x51dc0b(0x130)]&&_0x4cc7f0(_0x5674d4['next'],{'stepName':_0x9c5ccd[_0x51dc0b(0x138)],'description':_0x51dc0b(0xd7)+_0x5674d4[_0x51dc0b(0x138)]+_0x51dc0b(0xe8)+_0x9c5ccd[_0x51dc0b(0x138)]+'\x27'});}_0x9c5ccd['type']===_0x51dc0b(0x166)&&_0x9c5ccd['with']?.[_0x51dc0b(0x128)]&&(_0x9c5ccd['with'][_0x51dc0b(0x128)][_0x51dc0b(0x130)]&&_0x4cc7f0(_0x9c5ccd[_0x51dc0b(0x12c)][_0x51dc0b(0x128)][_0x51dc0b(0x130)],{'stepName':_0x9c5ccd['name'],'description':'condition\x20of\x20\x27'+_0x9c5ccd[_0x51dc0b(0x138)]+'\x27'}),_0x9c5ccd[_0x51dc0b(0x12c)][_0x51dc0b(0x128)][_0x51dc0b(0x14e)]?.[_0x51dc0b(0x130)]&&_0x4cc7f0(_0x9c5ccd[_0x51dc0b(0x12c)][_0x51dc0b(0x128)][_0x51dc0b(0x14e)]['next'],{'stepName':_0x9c5ccd[_0x51dc0b(0x138)],'description':'timeout\x20of\x20\x27'+_0x9c5ccd[_0x51dc0b(0x138)]+'\x27'}));}return _0x2ed181;}function validateFlowControl(_0x2606dc,_0x160b4e,_0x16a0d2){const _0x11fa9a=a146_0x331d,_0x2f1130=[],_0xbd5f89=_0x11fa9a(0x167)+_0x160b4e+']',_0x33df10=_0x2606dc[_0x11fa9a(0x161)]||[];if(_0x33df10[_0x11fa9a(0x17d)]===0x0)return _0x2f1130;const _0x247f6c=new Map();for(const _0x1819a3 of _0x33df10){_0x1819a3[_0x11fa9a(0x138)]&&_0x247f6c[_0x11fa9a(0x16b)](_0x1819a3[_0x11fa9a(0x138)],_0x1819a3);}const _0x28a91b=buildConvergenceMap(_0x33df10),_0x276a73=_0x33df10[_0x11fa9a(0x179)](_0x59fd6b=>_0x59fd6b[_0x11fa9a(0x101)]===_0x11fa9a(0x178));!_0x276a73&&_0x2f1130[_0x11fa9a(0x15e)](createIssue(_0x11fa9a(0xd6),_0xbd5f89+'.steps',_0x11fa9a(0x14d),_0x11fa9a(0x14f)+_0x2606dc['name']+_0x11fa9a(0x160),_0x16a0d2));for(const [_0x2508ee,_0x30966a]of _0x28a91b){const _0x4c4bf3=_0x247f6c['get'](_0x2508ee);if(!_0x4c4bf3)continue;if(_0x30966a['length']>0x1&&_0x4c4bf3[_0x11fa9a(0x101)]!==_0x11fa9a(0xeb)){const _0x74828c=_0x30966a[_0x11fa9a(0x134)](_0x4422c4=>_0x4422c4[_0x11fa9a(0x13e)])[_0x11fa9a(0xe4)](',\x20');_0x2f1130[_0x11fa9a(0x15e)](createIssue(_0x11fa9a(0xd6),_0xbd5f89+'.steps',_0x11fa9a(0xe2),_0x11fa9a(0xf7)+_0x2508ee+_0x11fa9a(0x120)+_0x74828c+').\x20Use\x20a\x20merge\x20step.',_0x16a0d2));}_0x30966a[_0x11fa9a(0x17d)]===0x1&&_0x4c4bf3['type']===_0x11fa9a(0xeb)&&_0x2f1130[_0x11fa9a(0x15e)](createIssue(_0x11fa9a(0x139),_0xbd5f89+_0x11fa9a(0x136),_0x11fa9a(0xe6),'Merge\x20step\x20\x27'+_0x2508ee+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x30966a[0x0][_0x11fa9a(0x13e)]+_0x11fa9a(0x116),_0x16a0d2));}for(const _0x299d99 of _0x33df10){if(_0x299d99[_0x11fa9a(0x101)]===_0x11fa9a(0xeb)&&_0x299d99[_0x11fa9a(0x130)]){const _0x2b5fb5=_0x247f6c[_0x11fa9a(0x17e)](_0x299d99[_0x11fa9a(0x130)]);_0x2b5fb5?.[_0x11fa9a(0x101)]===_0x11fa9a(0xeb)&&_0x2f1130[_0x11fa9a(0x15e)](createIssue(_0x11fa9a(0xd6),_0xbd5f89+_0x11fa9a(0x136),_0x11fa9a(0x10f),'Merge\x20step\x20\x27'+_0x299d99[_0x11fa9a(0x138)]+_0x11fa9a(0x155)+_0x299d99['next']+_0x11fa9a(0x181),_0x16a0d2));}}return _0x2f1130;}function validateCriteria(_0x2ef082,_0x8336d8,_0x17baf0){const _0x56d561=a146_0x331d,_0x20494a=[];return _0x2ef082[_0x56d561(0x124)]&&(_0x17baf0[_0x56d561(0x165)]?.['add'](_0x2ef082['segment']),!_0x2ef082[_0x56d561(0x124)][_0x56d561(0x154)](_0x56d561(0x158))&&(_0x17baf0[_0x56d561(0x121)]&&!_0x17baf0[_0x56d561(0x121)]['has'](_0x2ef082['segment'])&&_0x20494a[_0x56d561(0x15e)](createIssue(_0x56d561(0xd6),_0x8336d8+_0x56d561(0x17a),_0x56d561(0x151),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x2ef082[_0x56d561(0x124)]+'\x27',_0x17baf0)))),_0x20494a;}function validateEmbeddedSegment(_0x4e8776,_0xc89e31,_0x505246){const _0x288913=a146_0x331d,_0x568844=[];return _0x4e8776[_0x288913(0x11b)]&&_0x568844[_0x288913(0x15e)](...validateRuleDef(_0x4e8776[_0x288913(0x11b)],_0xc89e31+'.rule',_0x505246)),_0x568844;}function validateStage(_0x350a1a,_0x3ae956,_0x5d2a8c,_0x2e5523){const _0x49925c=a146_0x331d,_0x38294d=[],_0x5cd045=_0x49925c(0x167)+_0x3ae956+']',_0x32d488=new Map(),_0x3a3a75=new Map();if(_0x350a1a[_0x49925c(0x161)]){for(let _0x5e24f6=0x0;_0x5e24f6<_0x350a1a[_0x49925c(0x161)][_0x49925c(0x17d)];_0x5e24f6++){const _0x135f6c=_0x350a1a[_0x49925c(0x161)][_0x5e24f6];_0x135f6c[_0x49925c(0x138)]&&_0x32d488[_0x49925c(0x16b)](_0x135f6c[_0x49925c(0x138)],_0x135f6c);}for(let _0x3586dc=0x0;_0x3586dc<_0x350a1a[_0x49925c(0x161)][_0x49925c(0x17d)];_0x3586dc++){const _0x4ccc2d=_0x350a1a[_0x49925c(0x161)][_0x3586dc],_0x251e77=_0x5cd045+_0x49925c(0x153)+_0x3586dc+']';if(_0x4ccc2d[_0x49925c(0x138)]){if(_0x3a3a75[_0x49925c(0x107)](_0x4ccc2d[_0x49925c(0x138)])){const _0x4107e9=_0x3a3a75['get'](_0x4ccc2d[_0x49925c(0x138)]);_0x38294d['push'](createIssue('error',_0x251e77+_0x49925c(0x170),_0x49925c(0x16a),_0x49925c(0xdc)+_0x4ccc2d[_0x49925c(0x138)]+_0x49925c(0x13f)+_0x4107e9+'])',_0x2e5523));}else _0x3a3a75[_0x49925c(0x16b)](_0x4ccc2d[_0x49925c(0x138)],_0x3586dc);}_0x38294d[_0x49925c(0x15e)](...validateStep(_0x4ccc2d,_0x251e77,_0x2e5523,_0x32d488));}}_0x350a1a['entry_criteria']&&_0x38294d[_0x49925c(0x15e)](...validateCriteria(_0x350a1a[_0x49925c(0xd1)],_0x5cd045+_0x49925c(0xee),_0x2e5523));if(_0x350a1a[_0x49925c(0x148)])for(let _0xb87212=0x0;_0xb87212<_0x350a1a[_0x49925c(0x148)][_0x49925c(0x17d)];_0xb87212++){_0x38294d[_0x49925c(0x15e)](...validateCriteria(_0x350a1a[_0x49925c(0x148)][_0xb87212],_0x5cd045+_0x49925c(0xf6)+_0xb87212+']',_0x2e5523));}return _0x350a1a[_0x49925c(0xd3)]&&_0x38294d[_0x49925c(0x15e)](...validateCriteria(_0x350a1a['milestone'],_0x5cd045+'.milestone',_0x2e5523)),_0x38294d[_0x49925c(0x15e)](...validateStageStructure(_0x350a1a,_0x3ae956,_0x5d2a8c,_0x2e5523)),_0x38294d[_0x49925c(0x15e)](...validateFlowControl(_0x350a1a,_0x3ae956,_0x2e5523)),_0x38294d;}function validateStagesForVersion(_0x59cb01,_0x597999,_0x1d9723,_0x3c3d89,_0x509c52,_0x244dcc,_0x45856a){const _0x36b516=a146_0x331d;if(_0x59cb01['length']===0x0){_0x509c52['push']({'level':_0x36b516(0xd6),'path':_0x3c3d89+_0x36b516(0x11f),'code':_0x36b516(0x125),'message':_0x36b516(0x12d),'location':getLocationFromPath(_0x1d9723['document'],_0x1d9723[_0x36b516(0xfa)],[_0x36b516(0x11f)])});return;}const _0x4e6b5d=new Set();for(const _0x3bb4df of _0x59cb01){if(_0x3bb4df[_0x36b516(0x161)])for(const _0x380064 of _0x3bb4df['steps']){_0x380064[_0x36b516(0x138)]&&_0x4e6b5d['add'](_0x380064[_0x36b516(0x138)]);}}const _0x587575={..._0x1d9723,'stepNames':_0x4e6b5d},_0x4ca9ef=validateVersionStructure(_0x59cb01,_0x587575);for(const _0x1042e9 of _0x4ca9ef){const _0x3ad34c=_0x3c3d89?{..._0x1042e9,'path':''+_0x3c3d89+_0x1042e9['path']}:_0x1042e9;if(_0x3ad34c[_0x36b516(0x182)]==='error')_0x509c52['push'](_0x3ad34c);else _0x244dcc[_0x36b516(0x15e)](_0x3ad34c);}for(let _0x467101=0x0;_0x467101<_0x59cb01['length'];_0x467101++){const _0x4639c9=validateStage(_0x59cb01[_0x467101],_0x467101,_0x59cb01[_0x36b516(0x17d)],_0x587575);for(const _0x146515 of _0x4639c9){const _0x3a8c14=_0x3c3d89?{..._0x146515,'path':''+_0x3c3d89+_0x146515[_0x36b516(0x152)]}:_0x146515;if(_0x3a8c14[_0x36b516(0x182)]===_0x36b516(0xd6))_0x509c52[_0x36b516(0x15e)](_0x3a8c14);else _0x244dcc[_0x36b516(0x15e)](_0x3a8c14);}}if(_0x597999[_0x36b516(0xd2)]){const _0x2b8581=_0x45856a?.[_0x36b516(0x141)]?_0x36b516(0xd2):_0x3c3d89+'goal',_0x5b0fbf=validateCriteria(_0x597999['goal'],_0x2b8581,_0x587575);for(const _0x293760 of _0x5b0fbf){if(_0x293760[_0x36b516(0x182)]===_0x36b516(0xd6))_0x509c52[_0x36b516(0x15e)](_0x293760);else _0x244dcc[_0x36b516(0x15e)](_0x293760);}}}function a146_0xb678(){const _0x5e4ebc=['.name','.with','.with.condition','branches','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','message','.with.branches','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','end','some','.segment','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','JOURNEY_SCHEMA_ERROR','length','get','.with.target','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','level','journeys,\x20stages,\x20or\x20versions','\x20stages\x20but\x20maximum\x20is\x20','.with.branches[','.with.condition.next','activation','entry_criteria','goal','milestone','target','trim','error','variant\x20\x27','endsWith','INSUFFICIENT_STEPS','sort','BRANCH_DIRECTLY_TO_MERGE','Duplicate\x20step\x20name\x20\x27','segments.','code','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','symbol','excluded','CONVERGENCE_WITHOUT_MERGE','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','join','includes','SINGLE_INPUT_MERGE','launched','\x27\x20of\x20\x27','.with.condition.timeout.next','add','merge','MISSING_ENTRY_CRITERIA','56919fsQbcq','.entry_criteria','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','issues','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','abs','journey\x20entry','\x20steps\x20(may\x20be\x20too\x20simple)','versions[','.exit_criteria[','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','latest','\x20(across\x20','source','INVALID_NEXT_REFERENCE','.next','MISSING_GOAL','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20no\x20steps','journeys','type','138HOocER','INVALID_AB_TEST_PERCENTAGES','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','document','MISSING_CONDITIONS','has','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','entries','.with.condition.segment','activations','filter','jump','state','MERGE_TO_MERGE_CHAIN','4820751qaYywq','versions','.exit_criteria','1GBBXDP','6281704FJLhME','END_STEP_HAS_NEXT_OR_WITH',').\x20Merge\x20is\x20unnecessary.','\x27\x20with\x20no\x20action\x20in\x20between','indices','size','.with.activation','rule','Journey\x20has\x20no\x20goal\x20defined','45875rhlmOY','segments','stages','\x27\x20(from:\x20','embeddedSegments','excluded_','journey','segment','MISSING_STAGES','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','safeParse','condition','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.type','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','with','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','FEW_STEPS','84uqiLxS','next','stage','\x20versions)','INVALID_JUMP_TARGET','map','MISSING_MILESTONE','.steps','876183oMoYSB','name','warning','1073684cHFrsF','\x20with\x20latest:\x20true','MISSING_EXIT_CRITERIA','activationKeys','description','\x27\x20(first\x20defined\x20at\x20steps[','success','goalIsInherited','branch\x20\x27','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','skipSchema','journeys[','variants','Jump\x20step\x20requires\x20a\x20target','exit_criteria','MISSING_NAME','8khClxa','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MISSING_END_STEP','timeout','Stage\x20\x27','match','MISSING_SEGMENT_REFERENCE','path','.steps[','startsWith','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','DUPLICATE_LATEST','stepNames','ref:','MISSING_ACTIVATION_DEFINITION','Step\x20references\x20non-existent\x20step\x20\x27','1455650GzntFv','Journey\x20has\x20','TOO_MANY_STAGES','push','\x27\x20has\x20only\x20','\x27\x20has\x20no\x20end\x20step','steps','every','step\x20\x27','percentage','referencedSegments','wait','stages[','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','reduce','DUPLICATE_STEP_NAME','set','Decision\x20branch\x20\x27','decision_point','Journey\x20can\x20have\x20at\x20most\x20one\x20','replace'];a146_0xb678=function(){return _0x5e4ebc;};return a146_0xb678();}function extractVersionIndex(_0x24d739){const _0x1140d1=a146_0x331d,_0x5e3e82=_0x24d739[_0x1140d1(0x150)](/^journeys\[(\d+)\]\./);return _0x5e3e82?_0x5e3e82[0x1]:undefined;}function deduplicateAcrossVersions(_0x5c068c){const _0x3e52ed=a146_0x331d,_0x4fc061=new Map();for(let _0x37f909=0x0;_0x37f909<_0x5c068c[_0x3e52ed(0x17d)];_0x37f909++){const _0x499d2d=_0x5c068c[_0x37f909][_0x3e52ed(0xde)]+':'+_0x5c068c[_0x37f909]['message'],_0x5d0064=extractVersionIndex(_0x5c068c[_0x37f909]['path']),_0x4ad560=_0x4fc061[_0x3e52ed(0x17e)](_0x499d2d);if(_0x4ad560){_0x4ad560[_0x3e52ed(0x118)][_0x3e52ed(0x15e)](_0x37f909);if(_0x5d0064)_0x4ad560[_0x3e52ed(0x111)][_0x3e52ed(0xea)](_0x5d0064);}else _0x4fc061['set'](_0x499d2d,{'indices':[_0x37f909],'versions':new Set(_0x5d0064?[_0x5d0064]:[])});}const _0x4527c1=new Set();for(const {indices:_0x119cc0,versions:_0x46bfb7}of _0x4fc061['values']()){if(_0x46bfb7[_0x3e52ed(0x119)]<=0x1)continue;const _0x43e343=_0x5c068c[_0x119cc0[0x0]];_0x43e343[_0x3e52ed(0x152)]=_0x43e343[_0x3e52ed(0x152)][_0x3e52ed(0x16f)](/^journeys\[\d+\]\./,''),_0x43e343['message']=_0x43e343[_0x3e52ed(0x175)]+_0x3e52ed(0xf9)+_0x46bfb7[_0x3e52ed(0x119)]+_0x3e52ed(0x132);for(let _0x2793b1=0x1;_0x2793b1<_0x119cc0['length'];_0x2793b1++){_0x4527c1['add'](_0x119cc0[_0x2793b1]);}}const _0x1d5dd3=[..._0x4527c1][_0x3e52ed(0xda)]((_0x3b045a,_0x1542d2)=>_0x1542d2-_0x3b045a);for(const _0x1a0986 of _0x1d5dd3){_0x5c068c['splice'](_0x1a0986,0x1);}}export function validateJourneyDef(_0x4d0f6c,_0x5e6f5f={},_0x3b8f51={}){const _0x22e1e7=a146_0x331d;if(_0x3b8f51[_0x22e1e7(0x144)])return runJourneySemanticChecks(_0x4d0f6c,_0x5e6f5f);const _0x7bf224=JourneyDefSchema[_0x22e1e7(0x127)](_0x4d0f6c);if(_0x7bf224[_0x22e1e7(0x140)])return runJourneySemanticChecks(_0x7bf224['data'],_0x5e6f5f);return zodErrorsToJourneyValidationResult(_0x7bf224['error'],_0x5e6f5f);}function a146_0x331d(_0x3d9f0c,_0x54cd37){_0x3d9f0c=_0x3d9f0c-0xd0;const _0xb67818=a146_0xb678();let _0x331d73=_0xb67818[_0x3d9f0c];return _0x331d73;}function zodErrorsToJourneyValidationResult(_0x5f9396,_0x4d8991){const _0x2fef8b=a146_0x331d,_0x3eb903=flattenZodIssues(_0x5f9396[_0x2fef8b(0xf0)]),_0x5c1021=_0x3eb903[_0x2fef8b(0x134)](_0x49dff0=>{const _0xe8fc28=_0x2fef8b,_0x34ed70=formatZodPath(_0x49dff0['path']),_0x4ec457=mapJourneyZodIssueToCode(_0x49dff0,_0x34ed70),_0x3c93cc=getLocationFromPath(_0x4d8991['document'],_0x4d8991[_0xe8fc28(0xfa)],_0x49dff0['path'][_0xe8fc28(0x134)](_0x4c12d7=>typeof _0x4c12d7===_0xe8fc28(0xe0)?String(_0x4c12d7):_0x4c12d7));return{'level':_0xe8fc28(0xd6),'path':_0x34ed70,'code':_0x4ec457,'message':_0x49dff0['message'],..._0x3c93cc&&{'location':_0x3c93cc}};});return{'valid':![],'errors':_0x5c1021,'warnings':[]};}function mapJourneyZodIssueToCode(_0x3b6576,_0x5555c7){const _0x2441e0=a146_0x331d;if(_0x5555c7===_0x2441e0(0x138))return'MISSING_NAME';if(_0x5555c7[_0x2441e0(0xd8)](_0x2441e0(0x12a))&&_0x5555c7[_0x2441e0(0xe5)](_0x2441e0(0x161)))return _0x2441e0(0x17c);if(_0x5555c7===_0x2441e0(0x11f)||_0x5555c7[_0x2441e0(0xd8)]('.stages'))return'MISSING_STAGES';if(_0x5555c7===''&&_0x3b6576[_0x2441e0(0x175)]['includes'](_0x2441e0(0x183)))return _0x2441e0(0x125);if(_0x5555c7[_0x2441e0(0xe5)](_0x2441e0(0xd0)))return'ACTIVATION_SCHEMA_ERROR';return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x4efc3d,_0x532a0f){const _0x5b0fbc=a146_0x331d,_0x50d036=[],_0x53a5eb=[];(!_0x4efc3d[_0x5b0fbc(0x138)]||_0x4efc3d[_0x5b0fbc(0x138)][_0x5b0fbc(0xd5)]()==='')&&_0x50d036[_0x5b0fbc(0x15e)]({'level':'error','path':_0x5b0fbc(0x138),'code':_0x5b0fbc(0x149),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x532a0f[_0x5b0fbc(0x105)],_0x532a0f[_0x5b0fbc(0xfa)],[_0x5b0fbc(0x138)])});const _0x159032=new Set();if(_0x4efc3d[_0x5b0fbc(0x11e)])for(const _0x25b83b of Object['keys'](_0x4efc3d['segments'])){_0x159032['add'](_0x25b83b);}const _0x13ba87=new Set();if(_0x4efc3d[_0x5b0fbc(0x10b)])for(const _0x1bf7e7 of Object['keys'](_0x4efc3d[_0x5b0fbc(0x10b)])){_0x13ba87['add'](_0x1bf7e7);}const _0x11b174=new Set(),_0x504a0a={..._0x532a0f,'embeddedSegments':_0x159032,'referencedSegments':_0x11b174,'activationKeys':_0x13ba87[_0x5b0fbc(0x119)]>0x0?_0x13ba87:undefined};if(_0x4efc3d[_0x5b0fbc(0x11e)])for(const [_0x5c1e6b,_0x203a85]of Object[_0x5b0fbc(0x109)](_0x4efc3d[_0x5b0fbc(0x11e)])){const _0x258da8=validateEmbeddedSegment(_0x203a85,_0x5b0fbc(0xdd)+_0x5c1e6b,_0x504a0a);for(const _0xeb5c72 of _0x258da8){if(_0xeb5c72[_0x5b0fbc(0x182)]===_0x5b0fbc(0xd6))_0x50d036[_0x5b0fbc(0x15e)](_0xeb5c72);else _0x53a5eb['push'](_0xeb5c72);}}const _0x2789cd=!!_0x4efc3d[_0x5b0fbc(0xd2)],_0x2c659b=_0x4efc3d['journeys']?.[_0x5b0fbc(0x162)](_0x13805d=>!!_0x13805d['goal'])??![];!_0x2789cd&&!_0x2c659b&&_0x53a5eb[_0x5b0fbc(0x15e)]({'level':_0x5b0fbc(0x139),'path':_0x5b0fbc(0xd2),'code':_0x5b0fbc(0xfd),'message':_0x5b0fbc(0x11c),'location':getLocationFromPath(_0x532a0f['document'],_0x532a0f[_0x5b0fbc(0xfa)],[_0x5b0fbc(0xd2)])});const _0x51bc5e=_0x4efc3d[_0x5b0fbc(0x100)]??_0x4efc3d[_0x5b0fbc(0x111)];if(_0x51bc5e&&_0x51bc5e[_0x5b0fbc(0x10c)](_0x1b9bc9=>_0x1b9bc9[_0x5b0fbc(0xf8)]===!![])[_0x5b0fbc(0x17d)]>0x1){const _0x177983=_0x4efc3d[_0x5b0fbc(0x100)]?_0x5b0fbc(0x100):_0x5b0fbc(0x111);_0x50d036[_0x5b0fbc(0x15e)]({'level':_0x5b0fbc(0xd6),'path':_0x177983,'code':_0x5b0fbc(0x156),'message':_0x5b0fbc(0x16e)+(_0x177983==='journeys'?_0x5b0fbc(0xf3):'version')+_0x5b0fbc(0x13b),'location':getLocationFromPath(_0x532a0f[_0x5b0fbc(0x105)],_0x532a0f[_0x5b0fbc(0xfa)],[_0x177983])});}if(_0x4efc3d[_0x5b0fbc(0x100)]&&_0x4efc3d['journeys'][_0x5b0fbc(0x17d)]>0x0)for(let _0xdbb4a6=0x0;_0xdbb4a6<_0x4efc3d[_0x5b0fbc(0x100)][_0x5b0fbc(0x17d)];_0xdbb4a6++){const _0x24f551=_0x4efc3d[_0x5b0fbc(0x100)][_0xdbb4a6];if(_0x4efc3d[_0x5b0fbc(0x100)][_0x5b0fbc(0x17d)]>0x1&&_0x24f551[_0x5b0fbc(0x10e)]===_0x5b0fbc(0xe7))continue;const _0x31a81a=_0x24f551[_0x5b0fbc(0x11f)]||[],_0x995c25=_0x5b0fbc(0x145)+_0xdbb4a6+'].',_0x3c2984=!!_0x24f551[_0x5b0fbc(0xd2)],_0xbe63f8=_0x3c2984?{..._0x4efc3d,'goal':_0x24f551[_0x5b0fbc(0xd2)]}:_0x4efc3d;validateStagesForVersion(_0x31a81a,_0xbe63f8,_0x504a0a,_0x995c25,_0x50d036,_0x53a5eb,{'goalIsInherited':!_0x3c2984});}else{if(_0x4efc3d[_0x5b0fbc(0x111)]&&_0x4efc3d[_0x5b0fbc(0x111)]['length']>0x0)for(let _0x4fcc88=0x0;_0x4fcc88<_0x4efc3d[_0x5b0fbc(0x111)][_0x5b0fbc(0x17d)];_0x4fcc88++){const _0x3aa8a0=_0x4efc3d[_0x5b0fbc(0x111)][_0x4fcc88];if(_0x4efc3d[_0x5b0fbc(0x111)][_0x5b0fbc(0x17d)]>0x1&&_0x3aa8a0[_0x5b0fbc(0x10e)]===_0x5b0fbc(0xe7))continue;const _0x55fd88=_0x3aa8a0[_0x5b0fbc(0x11f)]||[],_0x10b1d8=_0x5b0fbc(0xf5)+_0x4fcc88+'].';validateStagesForVersion(_0x55fd88,_0x4efc3d,_0x504a0a,_0x10b1d8,_0x50d036,_0x53a5eb);}else{const _0x4b6e21=_0x4efc3d[_0x5b0fbc(0x11f)]||[];validateStagesForVersion(_0x4b6e21,_0x4efc3d,_0x504a0a,'',_0x50d036,_0x53a5eb);}}_0x4efc3d['journeys']&&_0x4efc3d['journeys']['length']>0x1&&(deduplicateAcrossVersions(_0x50d036),deduplicateAcrossVersions(_0x53a5eb));for(const _0x4cb50e of _0x159032){!_0x11b174[_0x5b0fbc(0x107)](_0x4cb50e)&&!_0x4cb50e[_0x5b0fbc(0x154)](_0x5b0fbc(0x122))&&_0x53a5eb[_0x5b0fbc(0x15e)]({'level':_0x5b0fbc(0x139),'path':'segments.'+_0x4cb50e,'code':'UNUSED_EMBEDDED_SEGMENT','message':'Embedded\x20segment\x20\x27'+_0x4cb50e+_0x5b0fbc(0x168),'location':getLocationFromPath(_0x532a0f[_0x5b0fbc(0x105)],_0x532a0f[_0x5b0fbc(0xfa)],[_0x5b0fbc(0x11e),_0x4cb50e])});}return{'valid':_0x50d036[_0x5b0fbc(0x17d)]===0x0,'errors':_0x50d036,'warnings':_0x53a5eb};}
|
|
1
|
+
(function(_0x5de13c,_0x24002){const _0x193d28=a146_0x6b41,_0x5c7ecf=_0x5de13c();while(!![]){try{const _0x50ff8d=-parseInt(_0x193d28(0x25a))/0x1+-parseInt(_0x193d28(0x247))/0x2+parseInt(_0x193d28(0x22b))/0x3+-parseInt(_0x193d28(0x24b))/0x4+-parseInt(_0x193d28(0x1ed))/0x5*(parseInt(_0x193d28(0x219))/0x6)+-parseInt(_0x193d28(0x1e7))/0x7+-parseInt(_0x193d28(0x218))/0x8*(-parseInt(_0x193d28(0x220))/0x9);if(_0x50ff8d===_0x24002)break;else _0x5c7ecf['push'](_0x5c7ecf['shift']());}catch(_0x4fdb1d){_0x5c7ecf['push'](_0x5c7ecf['shift']());}}}(a146_0x3f87,0xb7bb8));function a146_0x6b41(_0x45a2de,_0x547802){_0x45a2de=_0x45a2de-0x1d9;const _0x3f875e=a146_0x3f87();let _0x6b41=_0x3f875e[_0x45a2de];return _0x6b41;}import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x4ee100,_0xefba18,_0x73951f,_0x587dba,_0x4208c7,_0x203d4a){const _0x28c61d=a146_0x6b41;return{'level':_0x4ee100,'path':_0xefba18,'code':_0x73951f,'message':_0x587dba,'location':getLocationFromPath(_0x4208c7[_0x28c61d(0x245)],_0x4208c7[_0x28c61d(0x23a)],pathToArray(_0x203d4a??_0xefba18))};}function validateVersionStructure(_0xf6bcdb,_0x51ceee){const _0x472163=a146_0x6b41,_0x2e1b47=[];return _0xf6bcdb[_0x472163(0x1fc)]>MAX_STAGES&&_0x2e1b47[_0x472163(0x1e9)](createIssue('error',_0x472163(0x27a),_0x472163(0x200),'Journey\x20has\x20'+_0xf6bcdb[_0x472163(0x1fc)]+_0x472163(0x250)+MAX_STAGES,_0x51ceee)),_0x2e1b47;}function validateStageStructure(_0x1fbd77,_0x5be744,_0x7bc5df,_0x393098){const _0xea9667=a146_0x6b41,_0x56a8dd=[],_0x3ab4b0=_0xea9667(0x1ff)+_0x5be744+']';_0x5be744===0x0&&!_0x1fbd77[_0xea9667(0x21d)]&&_0x56a8dd[_0xea9667(0x1e9)](createIssue('error',_0x3ab4b0+_0xea9667(0x279),_0xea9667(0x1ec),_0xea9667(0x239)+_0x1fbd77[_0xea9667(0x21f)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x393098,_0x3ab4b0));const _0x3daf44=_0x5be744===_0x7bc5df-0x1;!_0x3daf44&&!_0x1fbd77[_0xea9667(0x1f5)]&&_0x56a8dd[_0xea9667(0x1e9)](createIssue('error',_0x3ab4b0+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x1fbd77['name']+_0xea9667(0x27f),_0x393098,_0x3ab4b0));(!_0x1fbd77[_0xea9667(0x1e2)]||_0x1fbd77[_0xea9667(0x1e2)]['length']===0x0)&&_0x56a8dd['push'](createIssue(_0xea9667(0x1f4),_0x3ab4b0+'.exit_criteria',_0xea9667(0x267),_0xea9667(0x239)+_0x1fbd77[_0xea9667(0x21f)]+_0xea9667(0x25f),_0x393098,_0x3ab4b0));const _0x9a546=_0x1fbd77['steps']?.['length']??0x0;if(_0x9a546===0x0)_0x56a8dd[_0xea9667(0x1e9)](createIssue(_0xea9667(0x225),_0x3ab4b0+_0xea9667(0x224),_0xea9667(0x280),'Stage\x20\x27'+_0x1fbd77[_0xea9667(0x21f)]+_0xea9667(0x288),_0x393098,_0x3ab4b0+_0xea9667(0x224)));else{if(_0x9a546===0x1)_0x56a8dd[_0xea9667(0x1e9)](createIssue(_0xea9667(0x1f4),_0x3ab4b0+'.steps',_0xea9667(0x280),_0xea9667(0x239)+_0x1fbd77[_0xea9667(0x21f)]+_0xea9667(0x275),_0x393098,_0x3ab4b0+_0xea9667(0x224)));else _0x9a546<=0x3&&_0x56a8dd['push'](createIssue('warning',_0x3ab4b0+'.steps','FEW_STEPS',_0xea9667(0x239)+_0x1fbd77[_0xea9667(0x21f)]+'\x27\x20has\x20only\x20'+_0x9a546+_0xea9667(0x231),_0x393098,_0x3ab4b0+_0xea9667(0x224)));}return _0x56a8dd;}function validateStep(_0x3a3d16,_0x50118f,_0x59ff80,_0x2f219b){const _0x580906=a146_0x6b41,_0x337cc4=[];if(_0x3a3d16['type']==='end')return _0x3a3d16[_0x580906(0x238)]&&_0x337cc4[_0x580906(0x1e9)](createIssue(_0x580906(0x225),_0x50118f+_0x580906(0x209),'END_STEP_HAS_NEXT_OR_WITH',_0x580906(0x1ef)+_0x3a3d16[_0x580906(0x21f)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x59ff80)),'with'in _0x3a3d16&&_0x3a3d16[_0x580906(0x1e1)]!==undefined&&_0x337cc4[_0x580906(0x1e9)](createIssue(_0x580906(0x225),_0x50118f+_0x580906(0x27c),_0x580906(0x269),_0x580906(0x1ef)+_0x3a3d16[_0x580906(0x21f)]+_0x580906(0x235),_0x59ff80)),_0x337cc4;_0x3a3d16[_0x580906(0x238)]&&(_0x59ff80[_0x580906(0x254)]&&!_0x59ff80[_0x580906(0x254)][_0x580906(0x204)](_0x3a3d16[_0x580906(0x238)])&&_0x337cc4[_0x580906(0x1e9)](createIssue('error',_0x50118f+_0x580906(0x209),'INVALID_NEXT_REFERENCE','Step\x20references\x20non-existent\x20step\x20\x27'+_0x3a3d16['next']+'\x27',_0x59ff80)));switch(_0x3a3d16[_0x580906(0x287)]){case _0x580906(0x27e):_0x337cc4[_0x580906(0x1e9)](...validateWaitStep(_0x3a3d16,_0x50118f,_0x59ff80,_0x2f219b));break;case'activation':_0x337cc4['push'](...validateActivationStep(_0x3a3d16,_0x50118f,_0x59ff80));break;case'decision_point':_0x337cc4[_0x580906(0x1e9)](...validateDecisionPointStep(_0x3a3d16,_0x50118f,_0x59ff80,_0x2f219b));break;case _0x580906(0x24a):_0x337cc4[_0x580906(0x1e9)](...validateAbTestStep(_0x3a3d16,_0x50118f,_0x59ff80,_0x2f219b));break;case'jump':_0x337cc4[_0x580906(0x1e9)](...validateJumpStep(_0x3a3d16,_0x50118f,_0x59ff80));break;}return _0x337cc4;}function validateWaitStep(_0x1d1968,_0x54d636,_0x84727e,_0x41c4ef){const _0x195429=a146_0x6b41,_0xdf66a8=[];if(!_0x1d1968[_0x195429(0x1e1)])return _0xdf66a8['push'](createIssue(_0x195429(0x225),_0x54d636+'.with','MISSING_WAIT_PARAMS','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x84727e,_0x54d636)),_0xdf66a8;if(_0x1d1968['with'][_0x195429(0x215)]){const _0x204c0a=_0x1d1968[_0x195429(0x1e1)][_0x195429(0x215)];if(_0x204c0a[_0x195429(0x258)]){_0x84727e[_0x195429(0x20a)]?.[_0x195429(0x27d)](_0x204c0a['segment']);!_0x204c0a[_0x195429(0x258)][_0x195429(0x1e6)](_0x195429(0x20c))&&(_0x84727e[_0x195429(0x263)]&&!_0x84727e[_0x195429(0x263)][_0x195429(0x204)](_0x204c0a[_0x195429(0x258)])&&_0xdf66a8[_0x195429(0x1e9)](createIssue(_0x195429(0x225),_0x54d636+_0x195429(0x266),_0x195429(0x232),_0x195429(0x21e)+_0x204c0a[_0x195429(0x258)]+_0x195429(0x1d9),_0x84727e)));_0x204c0a['next']&&_0x84727e[_0x195429(0x254)]&&!_0x84727e[_0x195429(0x254)][_0x195429(0x204)](_0x204c0a[_0x195429(0x238)])&&_0xdf66a8[_0x195429(0x1e9)](createIssue(_0x195429(0x225),_0x54d636+_0x195429(0x23f),_0x195429(0x240),_0x195429(0x210)+_0x204c0a[_0x195429(0x238)]+'\x27',_0x84727e));_0x204c0a[_0x195429(0x20f)]?.[_0x195429(0x238)]&&_0x84727e[_0x195429(0x254)]&&!_0x84727e[_0x195429(0x254)][_0x195429(0x204)](_0x204c0a[_0x195429(0x20f)][_0x195429(0x238)])&&_0xdf66a8[_0x195429(0x1e9)](createIssue(_0x195429(0x225),_0x54d636+'.with.condition.timeout.next','INVALID_NEXT_REFERENCE','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x204c0a[_0x195429(0x20f)][_0x195429(0x238)]+'\x27',_0x84727e));const _0x4b8161=_0x204c0a[_0x195429(0x238)]||_0x1d1968['next'],_0x2b58d3=_0x204c0a[_0x195429(0x20f)]?.[_0x195429(0x238)]||_0x1d1968['next'];if(_0x4b8161){const _0xd8d75d=_0x41c4ef['get'](_0x4b8161);_0xd8d75d?.[_0x195429(0x287)]===_0x195429(0x277)&&_0xdf66a8[_0x195429(0x1e9)](createIssue('warning',_0x54d636+_0x195429(0x23f),'BRANCH_DIRECTLY_TO_MERGE',_0x195429(0x252)+_0x4b8161+_0x195429(0x237),_0x84727e,_0x54d636+_0x195429(0x230)));}if(_0x2b58d3){const _0x3e58d9=_0x41c4ef[_0x195429(0x241)](_0x2b58d3);_0x3e58d9?.[_0x195429(0x287)]===_0x195429(0x277)&&_0xdf66a8['push'](createIssue(_0x195429(0x1f4),_0x54d636+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE',_0x195429(0x23e)+_0x2b58d3+_0x195429(0x237),_0x84727e,_0x54d636+_0x195429(0x249)));}}}return _0xdf66a8;}function a146_0x3f87(){const _0x25e70a=['\x27\x20has\x20no\x20end\x20step','\x20(across\x20','152ZANUbb','8068938moNNKw','.with.branches[','variant\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','entry_criteria','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','name','2606913GBOhrx','.segment','BRANCH_DIRECTLY_TO_MERGE','size','.steps','error','match','segments','.rule','level','.steps[','3083325uumTdY','A/B\x20test\x20variant\x20\x27','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','.milestone','state','.with.condition','\x20steps\x20(may\x20be\x20too\x20simple)','MISSING_SEGMENT_REFERENCE','journey\x20entry','excluded','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','next','Stage\x20\x27','source','message','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','CONVERGENCE_WITHOUT_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.condition.next','INVALID_NEXT_REFERENCE','get','percentage','MISSING_GOAL','segments.','document','Activation\x20step\x20requires\x20an\x20activation\x20reference','2985230FfFkro','join','.with.condition.timeout','ab_test','4385424GhEHYU','every','sort','Embedded\x20segment\x20\x27','keys','\x20stages\x20but\x20maximum\x20is\x20','steps','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Journey\x20name\x20is\x20required','stepNames','decision_point','MISSING_NAME','Criteria\x20references\x20undefined\x20segment\x20\x27','segment','includes','378410YkbpqL','DUPLICATE_LATEST','condition\x20of\x20\x27','branches','activationKeys','\x27\x20has\x20no\x20exit_criteria\x20defined','UNUSED_EMBEDDED_SEGMENT','\x27\x20(first\x20defined\x20at\x20steps[','.with.variants','embeddedSegments','goalIsInherited','symbol','.with.condition.segment','MISSING_EXIT_CRITERIA','Journey\x20can\x20have\x20at\x20most\x20one\x20','END_STEP_HAS_NEXT_OR_WITH','.type','\x27\x20with\x20no\x20action\x20in\x20between','launched','MISSING_CONDITIONS','version','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','skipSchema','some','set','\x27\x20(from:\x20','JOURNEY_SCHEMA_ERROR','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.exit_criteria[','merge','Decision\x20branch\x20\x27','.entry_criteria','stages','reduce','.with','add','wait','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','INSUFFICIENT_STEPS','SINGLE_INPUT_MERGE','.with.branches','Merge\x20step\x20\x27','journeys','.with.target','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','type','\x27\x20has\x20no\x20steps','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','entries','issues','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','INVALID_AB_TEST_PERCENTAGES','replace','activation',').\x20Merge\x20is\x20unnecessary.','with','exit_criteria','activations','INVALID_JUMP_TARGET','step\x20\x27','startsWith','10265402tARNgp','target','push','Jump\x20step\x20requires\x20a\x20target','map','MISSING_ENTRY_CRITERIA','5BzASIP','.name','End\x20step\x20\x27','Journey\x20has\x20no\x20goal\x20defined','indices','values','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','warning','milestone','rule','MISSING_ACTIVATION_DEFINITION','versions','.with.activation','MERGE_TO_MERGE_CHAIN','journeys[','length','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','description','stages[','TOO_MANY_STAGES','branch\x20\x27','journey','variants','has','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','success','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','path','.next','referencedSegments','DUPLICATE_STEP_NAME','ref:','goal','trim','timeout','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','splice','abs','MISSING_STAGES','\x20versions)','condition'];a146_0x3f87=function(){return _0x25e70a;};return a146_0x3f87();}function validateActivationStep(_0x3878e4,_0x4c150d,_0x1c5bb9){const _0x435d52=a146_0x6b41,_0x48048f=[];if(!_0x3878e4[_0x435d52(0x1e1)]?.['activation'])return _0x48048f[_0x435d52(0x1e9)](createIssue('error',_0x4c150d+_0x435d52(0x1f9),'MISSING_ACTIVATION_REF',_0x435d52(0x246),_0x1c5bb9,_0x4c150d)),_0x48048f;const _0x2c91c3=_0x3878e4[_0x435d52(0x1e1)][_0x435d52(0x1df)];return _0x1c5bb9[_0x435d52(0x25e)]&&!_0x2c91c3[_0x435d52(0x1e6)](_0x435d52(0x20c))&&(!_0x1c5bb9[_0x435d52(0x25e)]['has'](_0x2c91c3)&&_0x48048f[_0x435d52(0x1e9)](createIssue(_0x435d52(0x225),_0x4c150d+_0x435d52(0x1f9),_0x435d52(0x1f7),_0x435d52(0x26f)+_0x2c91c3+_0x435d52(0x286),_0x1c5bb9))),_0x48048f;}function validateDecisionPointStep(_0xee63d8,_0x3ce6f3,_0x28afcf,_0x120ff6){const _0x3be37a=a146_0x6b41,_0x54a23c=[];if(!_0xee63d8[_0x3be37a(0x1e1)]?.[_0x3be37a(0x25d)]||_0xee63d8[_0x3be37a(0x1e1)][_0x3be37a(0x25d)][_0x3be37a(0x1fc)]===0x0)return _0x54a23c[_0x3be37a(0x1e9)](createIssue(_0x3be37a(0x225),_0x3ce6f3+_0x3be37a(0x282),'MISSING_CONDITIONS',_0x3be37a(0x1fd),_0x28afcf,_0x3ce6f3)),_0x54a23c;for(let _0x2c0820=0x0;_0x2c0820<_0xee63d8[_0x3be37a(0x1e1)][_0x3be37a(0x25d)][_0x3be37a(0x1fc)];_0x2c0820++){const _0x84da2c=_0xee63d8['with'][_0x3be37a(0x25d)][_0x2c0820],_0xbc4a8c=_0x3ce6f3+_0x3be37a(0x21a)+_0x2c0820+']';_0x84da2c['segment']&&!_0x84da2c[_0x3be37a(0x234)]&&(_0x28afcf[_0x3be37a(0x20a)]?.[_0x3be37a(0x27d)](_0x84da2c['segment']),!_0x84da2c['segment']['startsWith'](_0x3be37a(0x20c))&&(_0x28afcf[_0x3be37a(0x263)]&&!_0x28afcf['embeddedSegments']['has'](_0x84da2c[_0x3be37a(0x258)])&&_0x54a23c[_0x3be37a(0x1e9)](createIssue('error',_0xbc4a8c+_0x3be37a(0x221),_0x3be37a(0x232),_0x3be37a(0x236)+_0x84da2c[_0x3be37a(0x258)]+'\x27',_0x28afcf))));_0x84da2c[_0x3be37a(0x238)]&&_0x28afcf[_0x3be37a(0x254)]&&!_0x28afcf[_0x3be37a(0x254)]['has'](_0x84da2c[_0x3be37a(0x238)])&&_0x54a23c['push'](createIssue(_0x3be37a(0x225),_0xbc4a8c+_0x3be37a(0x209),'INVALID_NEXT_REFERENCE',_0x3be37a(0x22d)+_0x84da2c[_0x3be37a(0x238)]+'\x27',_0x28afcf));if(_0x84da2c[_0x3be37a(0x238)]){const _0x5beae2=_0x120ff6[_0x3be37a(0x241)](_0x84da2c['next']);_0x5beae2?.[_0x3be37a(0x287)]==='merge'&&_0x54a23c[_0x3be37a(0x1e9)](createIssue(_0x3be37a(0x1f4),_0xbc4a8c+_0x3be37a(0x209),'BRANCH_DIRECTLY_TO_MERGE',_0x3be37a(0x278)+_0x84da2c['name']+_0x3be37a(0x23c)+_0x84da2c[_0x3be37a(0x238)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x28afcf));}}return _0x54a23c;}function validateAbTestStep(_0x3c17f4,_0x11e188,_0x462e3e,_0x556ff3){const _0x14ce03=a146_0x6b41,_0x97cfda=[];if(!_0x3c17f4['with']?.[_0x14ce03(0x203)]||_0x3c17f4[_0x14ce03(0x1e1)]['variants']['length']===0x0)return _0x97cfda['push'](createIssue(_0x14ce03(0x225),_0x11e188+_0x14ce03(0x262),_0x14ce03(0x26d),_0x14ce03(0x207),_0x462e3e,_0x11e188)),_0x97cfda;const _0xf8b6c2=_0x3c17f4[_0x14ce03(0x1e1)]['variants'][_0x14ce03(0x27b)]((_0x4471d6,_0x5f12ac)=>_0x4471d6+(_0x5f12ac[_0x14ce03(0x242)]||0x0),0x0);Math[_0x14ce03(0x212)](_0xf8b6c2-0x64)>0.01&&_0x97cfda[_0x14ce03(0x1e9)](createIssue(_0x14ce03(0x225),_0x11e188+'.with.variants',_0x14ce03(0x1dd),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0xf8b6c2+'%)',_0x462e3e));for(let _0x37e57c=0x0;_0x37e57c<_0x3c17f4[_0x14ce03(0x1e1)][_0x14ce03(0x203)][_0x14ce03(0x1fc)];_0x37e57c++){const _0x46858d=_0x3c17f4[_0x14ce03(0x1e1)][_0x14ce03(0x203)][_0x37e57c],_0x29dd1d=_0x11e188+'.with.variants['+_0x37e57c+']';_0x46858d[_0x14ce03(0x238)]&&_0x462e3e[_0x14ce03(0x254)]&&!_0x462e3e[_0x14ce03(0x254)][_0x14ce03(0x204)](_0x46858d[_0x14ce03(0x238)])&&_0x97cfda[_0x14ce03(0x1e9)](createIssue(_0x14ce03(0x225),_0x29dd1d+_0x14ce03(0x209),_0x14ce03(0x240),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x46858d[_0x14ce03(0x238)]+'\x27',_0x462e3e));if(_0x46858d[_0x14ce03(0x238)]){const _0x11bc6a=_0x556ff3[_0x14ce03(0x241)](_0x46858d[_0x14ce03(0x238)]);_0x11bc6a?.[_0x14ce03(0x287)]==='merge'&&_0x97cfda[_0x14ce03(0x1e9)](createIssue(_0x14ce03(0x1f4),_0x29dd1d+_0x14ce03(0x209),_0x14ce03(0x222),_0x14ce03(0x22c)+_0x46858d['name']+_0x14ce03(0x23c)+_0x46858d[_0x14ce03(0x238)]+_0x14ce03(0x26b),_0x462e3e));}}return _0x97cfda;}function validateJumpStep(_0x1ac3d4,_0x55a518,_0x2010ac){const _0x5bd453=a146_0x6b41,_0xb5b045=[];if(!_0x1ac3d4[_0x5bd453(0x1e1)]?.[_0x5bd453(0x1e8)])return _0xb5b045[_0x5bd453(0x1e9)](createIssue('error',_0x55a518+_0x5bd453(0x285),_0x5bd453(0x1e4),_0x5bd453(0x1ea),_0x2010ac,_0x55a518)),_0xb5b045;return(!_0x1ac3d4[_0x5bd453(0x1e1)][_0x5bd453(0x1e8)][_0x5bd453(0x202)]||!_0x1ac3d4[_0x5bd453(0x1e1)][_0x5bd453(0x1e8)]['stage'])&&_0xb5b045['push'](createIssue(_0x5bd453(0x225),_0x55a518+_0x5bd453(0x285),'INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x2010ac)),_0xb5b045;}function buildConvergenceMap(_0x53169e){const _0x3d573f=a146_0x6b41,_0x2be9c3=new Map();function _0x21c3c3(_0x116af4,_0x33f86f){const _0x38d3c6=a146_0x6b41,_0x3aad2f=_0x2be9c3['get'](_0x116af4)||[];_0x3aad2f[_0x38d3c6(0x1e9)](_0x33f86f),_0x2be9c3['set'](_0x116af4,_0x3aad2f);}for(const _0x3c024a of _0x53169e){_0x3c024a[_0x3d573f(0x238)]&&_0x21c3c3(_0x3c024a[_0x3d573f(0x238)],{'stepName':_0x3c024a['name'],'description':_0x3d573f(0x1e5)+_0x3c024a[_0x3d573f(0x21f)]+'\x27'});if(_0x3c024a[_0x3d573f(0x287)]===_0x3d573f(0x255)&&_0x3c024a[_0x3d573f(0x1e1)]?.[_0x3d573f(0x25d)])for(const _0x7767e9 of _0x3c024a[_0x3d573f(0x1e1)][_0x3d573f(0x25d)]){_0x7767e9[_0x3d573f(0x238)]&&_0x21c3c3(_0x7767e9[_0x3d573f(0x238)],{'stepName':_0x3c024a['name'],'description':_0x3d573f(0x201)+_0x7767e9[_0x3d573f(0x21f)]+'\x27\x20of\x20\x27'+_0x3c024a[_0x3d573f(0x21f)]+'\x27'});}if(_0x3c024a[_0x3d573f(0x287)]==='ab_test'&&_0x3c024a[_0x3d573f(0x1e1)]?.['variants'])for(const _0x2dd5bf of _0x3c024a[_0x3d573f(0x1e1)]['variants']){_0x2dd5bf[_0x3d573f(0x238)]&&_0x21c3c3(_0x2dd5bf[_0x3d573f(0x238)],{'stepName':_0x3c024a[_0x3d573f(0x21f)],'description':_0x3d573f(0x21b)+_0x2dd5bf['name']+'\x27\x20of\x20\x27'+_0x3c024a[_0x3d573f(0x21f)]+'\x27'});}_0x3c024a[_0x3d573f(0x287)]===_0x3d573f(0x27e)&&_0x3c024a['with']?.[_0x3d573f(0x215)]&&(_0x3c024a[_0x3d573f(0x1e1)]['condition'][_0x3d573f(0x238)]&&_0x21c3c3(_0x3c024a['with'][_0x3d573f(0x215)]['next'],{'stepName':_0x3c024a[_0x3d573f(0x21f)],'description':_0x3d573f(0x25c)+_0x3c024a[_0x3d573f(0x21f)]+'\x27'}),_0x3c024a[_0x3d573f(0x1e1)][_0x3d573f(0x215)][_0x3d573f(0x20f)]?.[_0x3d573f(0x238)]&&_0x21c3c3(_0x3c024a['with'][_0x3d573f(0x215)][_0x3d573f(0x20f)][_0x3d573f(0x238)],{'stepName':_0x3c024a[_0x3d573f(0x21f)],'description':'timeout\x20of\x20\x27'+_0x3c024a['name']+'\x27'}));}return _0x2be9c3;}function validateFlowControl(_0x425128,_0x5bcee2,_0x461857){const _0x3686c0=a146_0x6b41,_0x54d3c8=[],_0x43a6fd='stages['+_0x5bcee2+']',_0x18891c=_0x425128[_0x3686c0(0x251)]||[];if(_0x18891c['length']===0x0)return _0x54d3c8;const _0x3bcb0e=new Map();for(const _0x4d13e9 of _0x18891c){_0x4d13e9[_0x3686c0(0x21f)]&&_0x3bcb0e['set'](_0x4d13e9[_0x3686c0(0x21f)],_0x4d13e9);}const _0x4e683a=buildConvergenceMap(_0x18891c),_0x8d461f=_0x18891c[_0x3686c0(0x271)](_0x427adb=>_0x427adb[_0x3686c0(0x287)]==='end');!_0x8d461f&&_0x54d3c8[_0x3686c0(0x1e9)](createIssue(_0x3686c0(0x225),_0x43a6fd+_0x3686c0(0x224),'MISSING_END_STEP',_0x3686c0(0x239)+_0x425128['name']+_0x3686c0(0x216),_0x461857));for(const [_0x5e06ce,_0x1f022e]of _0x4e683a){const _0x3d6304=_0x3bcb0e[_0x3686c0(0x241)](_0x5e06ce);if(!_0x3d6304)continue;if(_0x1f022e['length']>0x1&&_0x3d6304[_0x3686c0(0x287)]!==_0x3686c0(0x277)){const _0x45846a=_0x1f022e['map'](_0x1b7761=>_0x1b7761[_0x3686c0(0x1fe)])[_0x3686c0(0x248)](',\x20');_0x54d3c8['push'](createIssue('error',_0x43a6fd+_0x3686c0(0x224),_0x3686c0(0x23d),_0x3686c0(0x1dc)+_0x5e06ce+_0x3686c0(0x273)+_0x45846a+').\x20Use\x20a\x20merge\x20step.',_0x461857));}_0x1f022e[_0x3686c0(0x1fc)]===0x1&&_0x3d6304[_0x3686c0(0x287)]===_0x3686c0(0x277)&&_0x54d3c8['push'](createIssue(_0x3686c0(0x1f4),_0x43a6fd+_0x3686c0(0x224),_0x3686c0(0x281),_0x3686c0(0x283)+_0x5e06ce+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x1f022e[0x0]['description']+_0x3686c0(0x1e0),_0x461857));}for(const _0x44bd50 of _0x18891c){if(_0x44bd50[_0x3686c0(0x287)]===_0x3686c0(0x277)&&_0x44bd50[_0x3686c0(0x238)]){const _0x2f269c=_0x3bcb0e['get'](_0x44bd50[_0x3686c0(0x238)]);_0x2f269c?.[_0x3686c0(0x287)]===_0x3686c0(0x277)&&_0x54d3c8[_0x3686c0(0x1e9)](createIssue(_0x3686c0(0x225),_0x43a6fd+_0x3686c0(0x224),_0x3686c0(0x1fa),'Merge\x20step\x20\x27'+_0x44bd50[_0x3686c0(0x21f)]+_0x3686c0(0x205)+_0x44bd50[_0x3686c0(0x238)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x461857));}}return _0x54d3c8;}function validateCriteria(_0x19200e,_0x40f18a,_0x45644f){const _0xd384e2=a146_0x6b41,_0x55ae6e=[];return _0x19200e[_0xd384e2(0x258)]&&(_0x45644f['referencedSegments']?.[_0xd384e2(0x27d)](_0x19200e[_0xd384e2(0x258)]),!_0x19200e[_0xd384e2(0x258)][_0xd384e2(0x1e6)](_0xd384e2(0x20c))&&(_0x45644f[_0xd384e2(0x263)]&&!_0x45644f['embeddedSegments'][_0xd384e2(0x204)](_0x19200e['segment'])&&_0x55ae6e[_0xd384e2(0x1e9)](createIssue(_0xd384e2(0x225),_0x40f18a+'.segment','MISSING_SEGMENT_REFERENCE',_0xd384e2(0x257)+_0x19200e[_0xd384e2(0x258)]+'\x27',_0x45644f)))),_0x55ae6e;}function validateEmbeddedSegment(_0x5d2491,_0x3f081a,_0x1f44b7){const _0x4ac396=a146_0x6b41,_0x3eb63d=[];return _0x5d2491[_0x4ac396(0x1f6)]&&_0x3eb63d[_0x4ac396(0x1e9)](...validateRuleDef(_0x5d2491[_0x4ac396(0x1f6)],_0x3f081a+_0x4ac396(0x228),_0x1f44b7)),_0x3eb63d;}function validateStage(_0x541fef,_0x454f54,_0x59e169,_0x1f577e){const _0x212b01=a146_0x6b41,_0x2c6a0a=[],_0x53445f=_0x212b01(0x1ff)+_0x454f54+']',_0x580657=new Map(),_0x4c6d7d=new Map();if(_0x541fef[_0x212b01(0x251)]){for(let _0x296f90=0x0;_0x296f90<_0x541fef[_0x212b01(0x251)]['length'];_0x296f90++){const _0x56bca7=_0x541fef[_0x212b01(0x251)][_0x296f90];_0x56bca7['name']&&_0x580657['set'](_0x56bca7[_0x212b01(0x21f)],_0x56bca7);}for(let _0x2cde56=0x0;_0x2cde56<_0x541fef[_0x212b01(0x251)][_0x212b01(0x1fc)];_0x2cde56++){const _0x26f184=_0x541fef[_0x212b01(0x251)][_0x2cde56],_0x3a727c=_0x53445f+_0x212b01(0x22a)+_0x2cde56+']';if(_0x26f184['name']){if(_0x4c6d7d[_0x212b01(0x204)](_0x26f184[_0x212b01(0x21f)])){const _0x2a1a8c=_0x4c6d7d[_0x212b01(0x241)](_0x26f184['name']);_0x2c6a0a[_0x212b01(0x1e9)](createIssue(_0x212b01(0x225),_0x3a727c+_0x212b01(0x1ee),_0x212b01(0x20b),'Duplicate\x20step\x20name\x20\x27'+_0x26f184['name']+_0x212b01(0x261)+_0x2a1a8c+'])',_0x1f577e));}else _0x4c6d7d[_0x212b01(0x272)](_0x26f184[_0x212b01(0x21f)],_0x2cde56);}_0x2c6a0a[_0x212b01(0x1e9)](...validateStep(_0x26f184,_0x3a727c,_0x1f577e,_0x580657));}}_0x541fef[_0x212b01(0x21d)]&&_0x2c6a0a[_0x212b01(0x1e9)](...validateCriteria(_0x541fef['entry_criteria'],_0x53445f+_0x212b01(0x279),_0x1f577e));if(_0x541fef[_0x212b01(0x1e2)])for(let _0x2846dd=0x0;_0x2846dd<_0x541fef[_0x212b01(0x1e2)][_0x212b01(0x1fc)];_0x2846dd++){_0x2c6a0a[_0x212b01(0x1e9)](...validateCriteria(_0x541fef[_0x212b01(0x1e2)][_0x2846dd],_0x53445f+_0x212b01(0x276)+_0x2846dd+']',_0x1f577e));}return _0x541fef[_0x212b01(0x1f5)]&&_0x2c6a0a[_0x212b01(0x1e9)](...validateCriteria(_0x541fef[_0x212b01(0x1f5)],_0x53445f+_0x212b01(0x22e),_0x1f577e)),_0x2c6a0a[_0x212b01(0x1e9)](...validateStageStructure(_0x541fef,_0x454f54,_0x59e169,_0x1f577e)),_0x2c6a0a['push'](...validateFlowControl(_0x541fef,_0x454f54,_0x1f577e)),_0x2c6a0a;}function validateStagesForVersion(_0xa172bb,_0x4d7673,_0x583d75,_0x132065,_0x37225b,_0x11c98e,_0x1fc6e7){const _0x4ac453=a146_0x6b41;if(_0xa172bb[_0x4ac453(0x1fc)]===0x0){_0x37225b[_0x4ac453(0x1e9)]({'level':_0x4ac453(0x225),'path':_0x132065+_0x4ac453(0x27a),'code':'MISSING_STAGES','message':_0x4ac453(0x21c),'location':getLocationFromPath(_0x583d75[_0x4ac453(0x245)],_0x583d75['source'],[_0x4ac453(0x27a)])});return;}const _0x5f08a6=new Set();for(const _0x40fa0d of _0xa172bb){if(_0x40fa0d[_0x4ac453(0x251)])for(const _0x4d321f of _0x40fa0d[_0x4ac453(0x251)]){_0x4d321f[_0x4ac453(0x21f)]&&_0x5f08a6[_0x4ac453(0x27d)](_0x4d321f[_0x4ac453(0x21f)]);}}const _0x380dc2={..._0x583d75,'stepNames':_0x5f08a6},_0x3a013a=validateVersionStructure(_0xa172bb,_0x380dc2);for(const _0x5b7725 of _0x3a013a){const _0x3d42e9=_0x132065?{..._0x5b7725,'path':''+_0x132065+_0x5b7725[_0x4ac453(0x208)]}:_0x5b7725;if(_0x3d42e9[_0x4ac453(0x229)]===_0x4ac453(0x225))_0x37225b[_0x4ac453(0x1e9)](_0x3d42e9);else _0x11c98e['push'](_0x3d42e9);}for(let _0xf85ab0=0x0;_0xf85ab0<_0xa172bb[_0x4ac453(0x1fc)];_0xf85ab0++){const _0xcb2764=validateStage(_0xa172bb[_0xf85ab0],_0xf85ab0,_0xa172bb[_0x4ac453(0x1fc)],_0x380dc2);for(const _0x4e5671 of _0xcb2764){const _0xfee5a3=_0x132065?{..._0x4e5671,'path':''+_0x132065+_0x4e5671[_0x4ac453(0x208)]}:_0x4e5671;if(_0xfee5a3[_0x4ac453(0x229)]===_0x4ac453(0x225))_0x37225b['push'](_0xfee5a3);else _0x11c98e[_0x4ac453(0x1e9)](_0xfee5a3);}}if(_0x4d7673['goal']){const _0x3e4abc=_0x1fc6e7?.[_0x4ac453(0x264)]?_0x4ac453(0x20d):_0x132065+_0x4ac453(0x20d),_0x13a1c1=validateCriteria(_0x4d7673[_0x4ac453(0x20d)],_0x3e4abc,_0x380dc2);for(const _0x4ec5a4 of _0x13a1c1){if(_0x4ec5a4['level']==='error')_0x37225b[_0x4ac453(0x1e9)](_0x4ec5a4);else _0x11c98e[_0x4ac453(0x1e9)](_0x4ec5a4);}}}function extractVersionIndex(_0x4f4baf){const _0x34d5a5=a146_0x6b41,_0x3efdfd=_0x4f4baf[_0x34d5a5(0x226)](/^journeys\[(\d+)\]\./);return _0x3efdfd?_0x3efdfd[0x1]:undefined;}function deduplicateAcrossVersions(_0x3e253a){const _0x4f77e5=a146_0x6b41,_0x55f462=new Map();for(let _0x55f11d=0x0;_0x55f11d<_0x3e253a[_0x4f77e5(0x1fc)];_0x55f11d++){const _0x3f6b15=_0x3e253a[_0x55f11d]['code']+':'+_0x3e253a[_0x55f11d]['message'],_0x51590d=extractVersionIndex(_0x3e253a[_0x55f11d][_0x4f77e5(0x208)]),_0x564fec=_0x55f462[_0x4f77e5(0x241)](_0x3f6b15);if(_0x564fec){_0x564fec[_0x4f77e5(0x1f1)][_0x4f77e5(0x1e9)](_0x55f11d);if(_0x51590d)_0x564fec[_0x4f77e5(0x1f8)][_0x4f77e5(0x27d)](_0x51590d);}else _0x55f462['set'](_0x3f6b15,{'indices':[_0x55f11d],'versions':new Set(_0x51590d?[_0x51590d]:[])});}const _0x2b0819=new Set();for(const {indices:_0x544e0d,versions:_0x110d75}of _0x55f462[_0x4f77e5(0x1f2)]()){if(_0x110d75[_0x4f77e5(0x223)]<=0x1)continue;const _0x1a1526=_0x3e253a[_0x544e0d[0x0]];_0x1a1526['path']=_0x1a1526['path'][_0x4f77e5(0x1de)](/^journeys\[\d+\]\./,''),_0x1a1526[_0x4f77e5(0x23b)]=_0x1a1526['message']+_0x4f77e5(0x217)+_0x110d75['size']+_0x4f77e5(0x214);for(let _0x14813b=0x1;_0x14813b<_0x544e0d[_0x4f77e5(0x1fc)];_0x14813b++){_0x2b0819[_0x4f77e5(0x27d)](_0x544e0d[_0x14813b]);}}const _0x1817e8=[..._0x2b0819][_0x4f77e5(0x24d)]((_0x37b622,_0x2b9e4a)=>_0x2b9e4a-_0x37b622);for(const _0x36cf52 of _0x1817e8){_0x3e253a[_0x4f77e5(0x211)](_0x36cf52,0x1);}}export function validateJourneyDef(_0x41843f,_0x92b988={},_0x57b6d3={}){const _0x4c3a12=a146_0x6b41;if(_0x57b6d3[_0x4c3a12(0x270)])return runJourneySemanticChecks(_0x41843f,_0x92b988);const _0x3dd487=JourneyDefSchema['safeParse'](_0x41843f);if(_0x3dd487[_0x4c3a12(0x206)])return runJourneySemanticChecks(_0x3dd487['data'],_0x92b988);return zodErrorsToJourneyValidationResult(_0x3dd487['error'],_0x92b988);}function zodErrorsToJourneyValidationResult(_0x48a421,_0x81f7ee){const _0xd43a05=a146_0x6b41,_0x290d36=flattenZodIssues(_0x48a421[_0xd43a05(0x1db)]),_0x3b602b=_0x290d36[_0xd43a05(0x1eb)](_0x45355b=>{const _0x95efd7=_0xd43a05,_0x222fd2=formatZodPath(_0x45355b[_0x95efd7(0x208)]),_0x1ec88e=mapJourneyZodIssueToCode(_0x45355b,_0x222fd2),_0x30f85e=getLocationFromPath(_0x81f7ee[_0x95efd7(0x245)],_0x81f7ee[_0x95efd7(0x23a)],_0x45355b[_0x95efd7(0x208)]['map'](_0x518962=>typeof _0x518962===_0x95efd7(0x265)?String(_0x518962):_0x518962));return{'level':'error','path':_0x222fd2,'code':_0x1ec88e,'message':_0x45355b[_0x95efd7(0x23b)],..._0x30f85e&&{'location':_0x30f85e}};});return{'valid':![],'errors':_0x3b602b,'warnings':[]};}function mapJourneyZodIssueToCode(_0xd60e60,_0x50598f){const _0x3fe330=a146_0x6b41;if(_0x50598f===_0x3fe330(0x21f))return _0x3fe330(0x256);if(_0x50598f['endsWith'](_0x3fe330(0x26a))&&_0x50598f['includes'](_0x3fe330(0x251)))return _0x3fe330(0x274);if(_0x50598f===_0x3fe330(0x27a)||_0x50598f['endsWith']('.stages'))return _0x3fe330(0x213);if(_0x50598f===''&&_0xd60e60[_0x3fe330(0x23b)][_0x3fe330(0x259)]('journeys,\x20stages,\x20or\x20versions'))return _0x3fe330(0x213);if(_0x50598f[_0x3fe330(0x259)](_0x3fe330(0x1df)))return'ACTIVATION_SCHEMA_ERROR';return _0x3fe330(0x274);}function runJourneySemanticChecks(_0x27f10c,_0x419ab8){const _0x16a650=a146_0x6b41,_0x269558=[],_0x431e70=[];(!_0x27f10c[_0x16a650(0x21f)]||_0x27f10c[_0x16a650(0x21f)][_0x16a650(0x20e)]()==='')&&_0x269558[_0x16a650(0x1e9)]({'level':'error','path':_0x16a650(0x21f),'code':'MISSING_NAME','message':_0x16a650(0x253),'location':getLocationFromPath(_0x419ab8['document'],_0x419ab8[_0x16a650(0x23a)],[_0x16a650(0x21f)])});const _0x5529c1=new Set();if(_0x27f10c[_0x16a650(0x227)])for(const _0x4cef03 of Object[_0x16a650(0x24f)](_0x27f10c['segments'])){_0x5529c1['add'](_0x4cef03);}const _0xa05eb9=new Set();if(_0x27f10c['activations'])for(const _0x1558e8 of Object[_0x16a650(0x24f)](_0x27f10c[_0x16a650(0x1e3)])){_0xa05eb9['add'](_0x1558e8);}const _0x1af38a=new Set(),_0x393a04={..._0x419ab8,'embeddedSegments':_0x5529c1,'referencedSegments':_0x1af38a,'activationKeys':_0xa05eb9[_0x16a650(0x223)]>0x0?_0xa05eb9:undefined};if(_0x27f10c[_0x16a650(0x227)])for(const [_0x2de646,_0x46ab1e]of Object[_0x16a650(0x1da)](_0x27f10c[_0x16a650(0x227)])){const _0xe31007=validateEmbeddedSegment(_0x46ab1e,_0x16a650(0x244)+_0x2de646,_0x393a04);for(const _0x5f3241 of _0xe31007){if(_0x5f3241[_0x16a650(0x229)]===_0x16a650(0x225))_0x269558['push'](_0x5f3241);else _0x431e70[_0x16a650(0x1e9)](_0x5f3241);}}const _0x58aa01=!!_0x27f10c[_0x16a650(0x20d)],_0xc34a2=_0x27f10c['journeys']?.[_0x16a650(0x24c)](_0x16ce02=>!!_0x16ce02[_0x16a650(0x20d)])??![];!_0x58aa01&&!_0xc34a2&&_0x431e70['push']({'level':_0x16a650(0x1f4),'path':'goal','code':_0x16a650(0x243),'message':_0x16a650(0x1f0),'location':getLocationFromPath(_0x419ab8[_0x16a650(0x245)],_0x419ab8[_0x16a650(0x23a)],['goal'])});const _0xc3b84d=_0x27f10c['journeys']??_0x27f10c[_0x16a650(0x1f8)];if(_0xc3b84d&&_0xc3b84d['filter'](_0x50ffcd=>_0x50ffcd['latest']===!![])[_0x16a650(0x1fc)]>0x1){const _0x571836=_0x27f10c['journeys']?_0x16a650(0x284):_0x16a650(0x1f8);_0x269558[_0x16a650(0x1e9)]({'level':_0x16a650(0x225),'path':_0x571836,'code':_0x16a650(0x25b),'message':_0x16a650(0x268)+(_0x571836===_0x16a650(0x284)?_0x16a650(0x233):_0x16a650(0x26e))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x419ab8[_0x16a650(0x245)],_0x419ab8[_0x16a650(0x23a)],[_0x571836])});}if(_0x27f10c[_0x16a650(0x284)]&&_0x27f10c[_0x16a650(0x284)][_0x16a650(0x1fc)]>0x0)for(let _0x58f86e=0x0;_0x58f86e<_0x27f10c[_0x16a650(0x284)][_0x16a650(0x1fc)];_0x58f86e++){const _0x579c98=_0x27f10c[_0x16a650(0x284)][_0x58f86e];if(_0x27f10c[_0x16a650(0x284)]['length']>0x1&&_0x579c98[_0x16a650(0x22f)]===_0x16a650(0x26c))continue;const _0x4ae46f=_0x579c98[_0x16a650(0x27a)]||[],_0x1cd9cd=_0x16a650(0x1fb)+_0x58f86e+'].',_0x523f8d=!!_0x579c98[_0x16a650(0x20d)],_0x23b4e6=_0x523f8d?{..._0x27f10c,'goal':_0x579c98[_0x16a650(0x20d)]}:_0x27f10c;validateStagesForVersion(_0x4ae46f,_0x23b4e6,_0x393a04,_0x1cd9cd,_0x269558,_0x431e70,{'goalIsInherited':!_0x523f8d});}else{if(_0x27f10c[_0x16a650(0x1f8)]&&_0x27f10c[_0x16a650(0x1f8)]['length']>0x0)for(let _0x2dc555=0x0;_0x2dc555<_0x27f10c[_0x16a650(0x1f8)]['length'];_0x2dc555++){const _0x13e45d=_0x27f10c[_0x16a650(0x1f8)][_0x2dc555];if(_0x27f10c[_0x16a650(0x1f8)][_0x16a650(0x1fc)]>0x1&&_0x13e45d[_0x16a650(0x22f)]==='launched')continue;const _0x440958=_0x13e45d['stages']||[],_0x2d752a='versions['+_0x2dc555+'].';validateStagesForVersion(_0x440958,_0x27f10c,_0x393a04,_0x2d752a,_0x269558,_0x431e70);}else{const _0x3bc1b2=_0x27f10c[_0x16a650(0x27a)]||[];validateStagesForVersion(_0x3bc1b2,_0x27f10c,_0x393a04,'',_0x269558,_0x431e70);}}_0x27f10c[_0x16a650(0x284)]&&_0x27f10c[_0x16a650(0x284)][_0x16a650(0x1fc)]>0x1&&(deduplicateAcrossVersions(_0x269558),deduplicateAcrossVersions(_0x431e70));for(const _0x29a898 of _0x5529c1){!_0x1af38a[_0x16a650(0x204)](_0x29a898)&&!_0x29a898['startsWith']('excluded_')&&_0x431e70[_0x16a650(0x1e9)]({'level':_0x16a650(0x1f4),'path':'segments.'+_0x29a898,'code':_0x16a650(0x260),'message':_0x16a650(0x24e)+_0x29a898+_0x16a650(0x1f3),'location':getLocationFromPath(_0x419ab8[_0x16a650(0x245)],_0x419ab8[_0x16a650(0x23a)],[_0x16a650(0x227),_0x29a898])});}return{'valid':_0x269558['length']===0x0,'errors':_0x269558,'warnings':_0x431e70};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a147_0x5c06aa=a147_0x2e98;(function(_0x57014c,_0x24c804){const _0x38b7ab=a147_0x2e98,_0x61de37=_0x57014c();while(!![]){try{const _0x4daa8e=parseInt(_0x38b7ab(0x214))/0x1*(-parseInt(_0x38b7ab(0x1a4))/0x2)+parseInt(_0x38b7ab(0x16c))/0x3*(-parseInt(_0x38b7ab(0x17f))/0x4)+parseInt(_0x38b7ab(0x1e1))/0x5*(parseInt(_0x38b7ab(0x17c))/0x6)+parseInt(_0x38b7ab(0x1ce))/0x7+-parseInt(_0x38b7ab(0x1bb))/0x8+parseInt(_0x38b7ab(0x195))/0x9*(parseInt(_0x38b7ab(0x1d6))/0xa)+parseInt(_0x38b7ab(0x1a3))/0xb;if(_0x4daa8e===_0x24c804)break;else _0x61de37['push'](_0x61de37['shift']());}catch(_0x3dc150){_0x61de37['push'](_0x61de37['shift']());}}}(a147_0x262e,0x8c4e8));import*as a147_0x177f2f 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(_0x303eac){const _0x493df8=a147_0x2e98,_0x299020=_0x303eac[_0x493df8(0x1b9)]();if(_0x299020==='days'||_0x299020===_0x493df8(0x209))return'day';if(_0x299020===_0x493df8(0x1ca)||_0x299020===_0x493df8(0x1f6))return _0x493df8(0x1f6);return _0x303eac;}export function journeyResponseToDefSync(_0x37dbd4){const _0x1c4cbb=a147_0x2e98,_0x25d5b8=_0x37dbd4['attributes'],_0x431afe=_0x25d5b8[_0x1c4cbb(0x190)]||_0x25d5b8[_0x1c4cbb(0x1a2)],_0x3484bb={'stages':_0x25d5b8['journeyStages'][_0x1c4cbb(0x1a9)](convertApiStageToYaml),'id':_0x37dbd4['id']};_0x25d5b8[_0x1c4cbb(0x1a1)]&&(_0x3484bb[_0x1c4cbb(0x1a1)]=convertApiCriteriaToYaml(_0x25d5b8[_0x1c4cbb(0x1a1)]));_0x25d5b8[_0x1c4cbb(0x1a2)]&&_0x25d5b8[_0x1c4cbb(0x1a2)]!==_0x431afe&&(_0x3484bb[_0x1c4cbb(0x173)]=_0x25d5b8[_0x1c4cbb(0x1a2)]);_0x25d5b8[_0x1c4cbb(0x1bf)]!==undefined&&(_0x3484bb[_0x1c4cbb(0x1c8)]=_0x25d5b8[_0x1c4cbb(0x1bf)]);_0x25d5b8[_0x1c4cbb(0x182)]&&(_0x3484bb[_0x1c4cbb(0x182)]=_0x25d5b8[_0x1c4cbb(0x182)]===_0x1c4cbb(0x212)?_0x1c4cbb(0x212):_0x1c4cbb(0x15f));const _0x57a27b={'type':'journey','name':_0x431afe,'journeys':[_0x3484bb]};_0x25d5b8[_0x1c4cbb(0x1c2)]&&(_0x57a27b[_0x1c4cbb(0x1c2)]=_0x25d5b8[_0x1c4cbb(0x1c2)]);_0x25d5b8[_0x1c4cbb(0x1a1)]&&(_0x57a27b[_0x1c4cbb(0x1a1)]=convertApiCriteriaToYaml(_0x25d5b8[_0x1c4cbb(0x1a1)]));if(_0x25d5b8[_0x1c4cbb(0x18a)])_0x57a27b[_0x1c4cbb(0x1c3)]=_0x25d5b8['reentryMode'];else _0x25d5b8['allowReentry']!==undefined&&(_0x57a27b[_0x1c4cbb(0x1c3)]=_0x25d5b8[_0x1c4cbb(0x196)]?_0x1c4cbb(0x1e7):_0x1c4cbb(0x199));return _0x25d5b8[_0x1c4cbb(0x17b)]&&(_0x57a27b[_0x1c4cbb(0x1aa)]=_0x25d5b8['journeyBundleId']),_0x25d5b8[_0x1c4cbb(0x190)]&&(_0x57a27b[_0x1c4cbb(0x1b3)]=_0x25d5b8[_0x1c4cbb(0x190)]),_0x37dbd4[_0x1c4cbb(0x1f9)]?.[_0x1c4cbb(0x1e9)]?.[_0x1c4cbb(0x1ae)]?.['id']&&(_0x57a27b[_0x1c4cbb(0x1de)]=_0x37dbd4[_0x1c4cbb(0x1f9)][_0x1c4cbb(0x1e9)]['data']['id']),_0x57a27b;}export async function journeyResponseToDef(_0x51567f,_0x39a5ce){const _0x385d55=a147_0x2e98,_0x25b5ad=journeyResponseToDefSync(_0x51567f);if(!_0x39a5ce)return _0x25b5ad;const _0xabce8f=new Set();collectSegmentIdsFromJourney(_0x25b5ad,_0xabce8f);const _0x1cd0a6=new Set();collectActivationIdsFromJourney(_0x25b5ad,_0x1cd0a6);const _0x3b136e={},_0x22ef3c=new Map();for(const _0x1035a0 of Array[_0x385d55(0x20b)](_0xabce8f)[_0x385d55(0x1fc)]()){if(_0x39a5ce[_0x385d55(0x1cb)]){const _0x5cf061=await _0x39a5ce[_0x385d55(0x1cb)](_0x1035a0);if(_0x5cf061[_0x385d55(0x1b8)]){_0x22ef3c[_0x385d55(0x1df)](_0x1035a0,_0x5cf061[_0x385d55(0x1a2)]);if(_0x5cf061['definition']){const _0x5e4028={..._0x5cf061[_0x385d55(0x1fd)],'rule':deepSortObject(_0x5cf061[_0x385d55(0x1fd)][_0x385d55(0x1e8)])};_0x3b136e[_0x5cf061[_0x385d55(0x1a2)]]=_0x5e4028;}}else _0x22ef3c[_0x385d55(0x1df)](_0x1035a0,makeSegmentRef(_0x5cf061['name']));}else{if(_0x39a5ce[_0x385d55(0x207)]){const _0x4cda27=await _0x39a5ce[_0x385d55(0x207)](_0x1035a0);_0x22ef3c[_0x385d55(0x1df)](_0x1035a0,_0x4cda27);}}}const _0x346200={},_0x2920b5=new Map();for(const _0x1a5d95 of Array[_0x385d55(0x20b)](_0x1cd0a6)[_0x385d55(0x1fc)]()){if(_0x39a5ce[_0x385d55(0x1f3)]){const _0x493fae=await _0x39a5ce[_0x385d55(0x1f3)](_0x1a5d95);_0x493fae['isJourneyLocal']?(_0x2920b5[_0x385d55(0x1df)](_0x1a5d95,_0x493fae[_0x385d55(0x1a2)]),_0x493fae[_0x385d55(0x1fd)]&&(_0x346200[_0x493fae['name']]=_0x493fae[_0x385d55(0x1fd)])):_0x2920b5['set'](_0x1a5d95,makeSegmentRef(_0x493fae['name']));}else{if(_0x39a5ce[_0x385d55(0x1a7)]){const _0x11fd91=await _0x39a5ce[_0x385d55(0x1a7)](_0x1a5d95);_0x2920b5[_0x385d55(0x1df)](_0x1a5d95,_0x11fd91);}}}_0x22ef3c[_0x385d55(0x166)]>0x0&&replaceSegmentIdsInJourney(_0x25b5ad,_0x22ef3c);_0x2920b5[_0x385d55(0x166)]>0x0&&replaceActivationIdsInJourney(_0x25b5ad,_0x2920b5);if(_0x39a5ce[_0x385d55(0x20d)]){const _0x305aed=[];collectJumpTargetsFromJourney(_0x25b5ad,_0x305aed);if(_0x305aed[_0x385d55(0x16f)]>0x0){const _0x51d77f=new Map();for(const _0x23ff9e of _0x305aed){try{const _0x1e9efc=await _0x39a5ce['resolveJumpTarget'](_0x23ff9e[_0x385d55(0x1a8)],_0x23ff9e[_0x385d55(0x1d2)]);_0x51d77f[_0x385d55(0x1df)](_0x23ff9e[_0x385d55(0x1a8)]+':'+_0x23ff9e[_0x385d55(0x1d2)],_0x1e9efc);}catch{}}_0x51d77f[_0x385d55(0x166)]>0x0&&replaceJumpTargetsInJourney(_0x25b5ad,_0x51d77f);}}return Object[_0x385d55(0x1e6)](_0x3b136e)['length']>0x0&&(_0x25b5ad['segments']=_0x3b136e),Object[_0x385d55(0x1e6)](_0x346200)[_0x385d55(0x16f)]>0x0&&(_0x25b5ad[_0x385d55(0x1b6)]=_0x346200),_0x25b5ad;}function collectSegmentIdsFromJourney(_0x371557,_0x22ba3b){const _0xbe1403=a147_0x2e98;_0x371557[_0xbe1403(0x1a1)]?.['segment']&&_0x22ba3b[_0xbe1403(0x1c9)](_0x371557[_0xbe1403(0x1a1)][_0xbe1403(0x16d)]);const _0x557a78=_0x40dc5c=>{const _0x4b7019=_0xbe1403;for(const _0x2ae24c of _0x40dc5c){_0x2ae24c['entry_criteria']?.[_0x4b7019(0x16d)]&&_0x22ba3b['add'](_0x2ae24c[_0x4b7019(0x1e5)][_0x4b7019(0x16d)]);if(_0x2ae24c['exit_criteria'])for(const _0x3ecb8b of _0x2ae24c['exit_criteria']){_0x3ecb8b[_0x4b7019(0x16d)]&&_0x22ba3b[_0x4b7019(0x1c9)](_0x3ecb8b[_0x4b7019(0x16d)]);}_0x2ae24c[_0x4b7019(0x1f8)]?.[_0x4b7019(0x16d)]&&_0x22ba3b[_0x4b7019(0x1c9)](_0x2ae24c[_0x4b7019(0x1f8)]['segment']);if(_0x2ae24c['steps'])for(const _0x294368 of _0x2ae24c[_0x4b7019(0x1ac)]){if(_0x294368[_0x4b7019(0x210)]===_0x4b7019(0x160)){const _0x339048=_0x294368;for(const _0x2969f5 of _0x339048[_0x4b7019(0x176)]['branches']){_0x2969f5[_0x4b7019(0x16d)]&&_0x22ba3b[_0x4b7019(0x1c9)](_0x2969f5['segment']);}}else{if(_0x294368[_0x4b7019(0x210)]===_0x4b7019(0x183)){const _0x283f5b=_0x294368;_0x283f5b[_0x4b7019(0x176)][_0x4b7019(0x1f5)]?.['segment']&&_0x22ba3b[_0x4b7019(0x1c9)](_0x283f5b[_0x4b7019(0x176)][_0x4b7019(0x1f5)][_0x4b7019(0x16d)]);}}}}};if(_0x371557[_0xbe1403(0x1f4)])for(const _0x14658c of _0x371557[_0xbe1403(0x1f4)]){_0x14658c['goal']?.[_0xbe1403(0x16d)]&&_0x22ba3b[_0xbe1403(0x1c9)](_0x14658c[_0xbe1403(0x1a1)][_0xbe1403(0x16d)]),_0x557a78(_0x14658c[_0xbe1403(0x1d9)]);}_0x371557[_0xbe1403(0x1d9)]&&_0x557a78(_0x371557[_0xbe1403(0x1d9)]);if(_0x371557['versions'])for(const _0x209c67 of _0x371557[_0xbe1403(0x17a)]){_0x557a78(_0x209c67[_0xbe1403(0x1d9)]);}}function replaceSegmentIdsInJourney(_0x55f0ab,_0x32193f){const _0x31f648=a147_0x2e98,_0x54037=_0x313761=>_0x32193f[_0x31f648(0x1b0)](_0x313761)||_0x313761;_0x55f0ab[_0x31f648(0x1a1)]?.[_0x31f648(0x16d)]&&(_0x55f0ab['goal'][_0x31f648(0x16d)]=_0x54037(_0x55f0ab['goal']['segment']));const _0x970216=_0x214235=>{const _0x275154=_0x31f648;for(const _0x514b9f of _0x214235){_0x514b9f[_0x275154(0x1e5)]?.[_0x275154(0x16d)]&&(_0x514b9f['entry_criteria'][_0x275154(0x16d)]=_0x54037(_0x514b9f[_0x275154(0x1e5)][_0x275154(0x16d)]));if(_0x514b9f[_0x275154(0x15c)])for(const _0x3290c5 of _0x514b9f[_0x275154(0x15c)]){_0x3290c5[_0x275154(0x16d)]&&(_0x3290c5[_0x275154(0x16d)]=_0x54037(_0x3290c5[_0x275154(0x16d)]));}_0x514b9f[_0x275154(0x1f8)]?.['segment']&&(_0x514b9f[_0x275154(0x1f8)]['segment']=_0x54037(_0x514b9f[_0x275154(0x1f8)][_0x275154(0x16d)]));if(_0x514b9f[_0x275154(0x1ac)])for(const _0x33148a of _0x514b9f[_0x275154(0x1ac)]){if(_0x33148a['type']===_0x275154(0x160)){const _0x3d72be=_0x33148a;for(const _0x5b1683 of _0x3d72be[_0x275154(0x176)][_0x275154(0x1c7)]){_0x5b1683[_0x275154(0x16d)]&&(_0x5b1683['segment']=_0x54037(_0x5b1683[_0x275154(0x16d)]));}}else{if(_0x33148a[_0x275154(0x210)]===_0x275154(0x183)){const _0x4be3bf=_0x33148a;_0x4be3bf['with'][_0x275154(0x1f5)]?.['segment']&&(_0x4be3bf[_0x275154(0x176)]['condition'][_0x275154(0x16d)]=_0x54037(_0x4be3bf['with'][_0x275154(0x1f5)]['segment']));}}}}};if(_0x55f0ab[_0x31f648(0x1f4)])for(const _0x5c35fb of _0x55f0ab[_0x31f648(0x1f4)]){_0x5c35fb['goal']?.[_0x31f648(0x16d)]&&(_0x5c35fb[_0x31f648(0x1a1)][_0x31f648(0x16d)]=_0x54037(_0x5c35fb[_0x31f648(0x1a1)][_0x31f648(0x16d)])),_0x970216(_0x5c35fb[_0x31f648(0x1d9)]);}_0x55f0ab[_0x31f648(0x1d9)]&&_0x970216(_0x55f0ab[_0x31f648(0x1d9)]);if(_0x55f0ab[_0x31f648(0x17a)])for(const _0x546877 of _0x55f0ab[_0x31f648(0x17a)]){_0x970216(_0x546877[_0x31f648(0x1d9)]);}}function collectActivationIdsFromJourney(_0x138f2e,_0x15943d){const _0x53b545=a147_0x2e98,_0x3f0758=_0x528650=>{const _0x44d21f=a147_0x2e98;for(const _0x506d01 of _0x528650){if(_0x506d01[_0x44d21f(0x1ac)])for(const _0xbb839b of _0x506d01['steps']){if(_0xbb839b['type']==='activation'){const _0x191dd7=_0xbb839b;_0x191dd7[_0x44d21f(0x176)][_0x44d21f(0x19d)]&&/^\d+$/['test'](_0x191dd7['with'][_0x44d21f(0x19d)])&&_0x15943d[_0x44d21f(0x1c9)](_0x191dd7['with'][_0x44d21f(0x19d)]);}}}};if(_0x138f2e[_0x53b545(0x1f4)])for(const _0xb178cd of _0x138f2e[_0x53b545(0x1f4)]){_0x3f0758(_0xb178cd[_0x53b545(0x1d9)]);}_0x138f2e[_0x53b545(0x1d9)]&&_0x3f0758(_0x138f2e[_0x53b545(0x1d9)]);if(_0x138f2e[_0x53b545(0x17a)])for(const _0xb9056f of _0x138f2e[_0x53b545(0x17a)]){_0x3f0758(_0xb9056f[_0x53b545(0x1d9)]);}}function replaceActivationIdsInJourney(_0x1dad88,_0x2fb602){const _0x512e4b=a147_0x2e98,_0x20d640=_0x2886a8=>_0x2fb602[_0x512e4b(0x1b0)](_0x2886a8)||_0x2886a8,_0x4ec8af=_0x5a7a8a=>{const _0x19cecf=_0x512e4b;for(const _0x492a2e of _0x5a7a8a){if(_0x492a2e['steps'])for(const _0x2084ff of _0x492a2e['steps']){if(_0x2084ff[_0x19cecf(0x210)]===_0x19cecf(0x19d)){const _0x40b251=_0x2084ff;_0x40b251[_0x19cecf(0x176)]['activation']&&(_0x40b251[_0x19cecf(0x176)][_0x19cecf(0x19d)]=_0x20d640(_0x40b251[_0x19cecf(0x176)][_0x19cecf(0x19d)]));}}}};if(_0x1dad88[_0x512e4b(0x1f4)])for(const _0x2588ca of _0x1dad88[_0x512e4b(0x1f4)]){_0x4ec8af(_0x2588ca[_0x512e4b(0x1d9)]);}_0x1dad88[_0x512e4b(0x1d9)]&&_0x4ec8af(_0x1dad88[_0x512e4b(0x1d9)]);if(_0x1dad88[_0x512e4b(0x17a)])for(const _0x15fd2e of _0x1dad88[_0x512e4b(0x17a)]){_0x4ec8af(_0x15fd2e['stages']);}}function collectJumpTargetsFromJourney(_0x359c3f,_0x4e8adf){const _0x561f09=a147_0x2e98,_0x5ccce8=new Set(),_0x20c688=_0x190c9e=>{const _0x4e6f2c=a147_0x2e98;for(const _0x2043b2 of _0x190c9e){if(_0x2043b2[_0x4e6f2c(0x1ac)])for(const _0x5b887c of _0x2043b2[_0x4e6f2c(0x1ac)]){if(_0x5b887c[_0x4e6f2c(0x210)]===_0x4e6f2c(0x20f)){const _0x5b10cb=_0x5b887c,_0x491926=_0x5b10cb[_0x4e6f2c(0x176)][_0x4e6f2c(0x18c)];if(_0x491926[_0x4e6f2c(0x17e)]&&_0x491926[_0x4e6f2c(0x1fa)]&&/^\d+$/[_0x4e6f2c(0x1d0)](_0x491926['journey'])&&/^\d+$/[_0x4e6f2c(0x1d0)](_0x491926[_0x4e6f2c(0x1fa)])){const _0x45fa1c=_0x491926[_0x4e6f2c(0x17e)]+':'+_0x491926['stage'];!_0x5ccce8['has'](_0x45fa1c)&&(_0x5ccce8['add'](_0x45fa1c),_0x4e8adf['push']({'journeyId':_0x491926[_0x4e6f2c(0x17e)],'stageId':_0x491926[_0x4e6f2c(0x1fa)]}));}}}}};if(_0x359c3f[_0x561f09(0x1f4)])for(const _0x93185b of _0x359c3f[_0x561f09(0x1f4)]){_0x20c688(_0x93185b[_0x561f09(0x1d9)]);}_0x359c3f['stages']&&_0x20c688(_0x359c3f[_0x561f09(0x1d9)]);if(_0x359c3f[_0x561f09(0x17a)])for(const _0x41aa1d of _0x359c3f[_0x561f09(0x17a)]){_0x20c688(_0x41aa1d[_0x561f09(0x1d9)]);}}function replaceJumpTargetsInJourney(_0x5d6af4,_0xff3da0){const _0x28ef63=a147_0x2e98,_0x1602d3=_0x84cf1=>{const _0x2f3cd0=a147_0x2e98;for(const _0x2143e1 of _0x84cf1){if(_0x2143e1[_0x2f3cd0(0x1ac)])for(const _0x3f669b of _0x2143e1[_0x2f3cd0(0x1ac)]){if(_0x3f669b[_0x2f3cd0(0x210)]==='jump'){const _0x95c293=_0x3f669b,_0x4c8219=_0x95c293[_0x2f3cd0(0x176)][_0x2f3cd0(0x18c)],_0x457928=_0x4c8219[_0x2f3cd0(0x17e)]+':'+_0x4c8219['stage'],_0x2ad231=_0xff3da0['get'](_0x457928);_0x2ad231&&(_0x4c8219[_0x2f3cd0(0x17e)]=_0x2ad231[_0x2f3cd0(0x167)],_0x4c8219[_0x2f3cd0(0x1fa)]=_0x2ad231['stageName']);}}}};if(_0x5d6af4[_0x28ef63(0x1f4)])for(const _0x455679 of _0x5d6af4[_0x28ef63(0x1f4)]){_0x1602d3(_0x455679[_0x28ef63(0x1d9)]);}_0x5d6af4[_0x28ef63(0x1d9)]&&_0x1602d3(_0x5d6af4[_0x28ef63(0x1d9)]);if(_0x5d6af4[_0x28ef63(0x17a)])for(const _0x15d8da of _0x5d6af4[_0x28ef63(0x17a)]){_0x1602d3(_0x15d8da[_0x28ef63(0x1d9)]);}}function generateReadableStepName(_0x46191a,_0x8f3b81){const _0x57dcc8=a147_0x2e98;if(_0x46191a['name']&&_0x46191a[_0x57dcc8(0x1a2)]!==_0x46191a[_0x57dcc8(0x210)]){const _0x2bc9e6=_0x46191a[_0x57dcc8(0x1a2)][_0x57dcc8(0x185)]();if(_0x2bc9e6&&/[a-z0-9\p{L}]/iu[_0x57dcc8(0x1d0)](_0x2bc9e6))return _0x2bc9e6;}const _0x4c8fd9=_0x46191a[_0x57dcc8(0x210)]['toLowerCase']()['replace'](/step$/i,'');return _0x4c8fd9+'_'+(_0x8f3b81+0x1);}function getStepNextRefs(_0x992cf8){const _0x475845=a147_0x2e98,_0x732f37=[];if(_0x992cf8['next'])_0x732f37[_0x475845(0x1ff)](_0x992cf8[_0x475845(0x1e3)]);if(_0x992cf8[_0x475845(0x1c7)])for(const _0x199136 of _0x992cf8[_0x475845(0x1c7)]){if(_0x199136[_0x475845(0x1e3)])_0x732f37['push'](_0x199136['next']);}if(_0x992cf8[_0x475845(0x205)])for(const _0x11b2c1 of _0x992cf8[_0x475845(0x205)]){if(_0x11b2c1['next'])_0x732f37['push'](_0x11b2c1[_0x475845(0x1e3)]);}if(_0x992cf8[_0x475845(0x184)])for(const _0x525b6c of _0x992cf8['conditions']){if(_0x525b6c[_0x475845(0x1e3)])_0x732f37[_0x475845(0x1ff)](_0x525b6c[_0x475845(0x1e3)]);}return _0x732f37;}function parseJumpTargetDisplayName(_0x5d6ed6){const _0x48c6a5=a147_0x2e98,_0xa698dd=_0x5d6ed6[_0x48c6a5(0x174)](/^(.+?)\s*\(([^/)]+)/);if(!_0xa698dd)return undefined;const _0x1f0349=_0xa698dd[0x1][_0x48c6a5(0x185)](),_0x305bf7=_0xa698dd[0x2][_0x48c6a5(0x185)]();if(!_0x1f0349||!_0x305bf7)return undefined;return{'stageName':_0x1f0349,'journeyName':_0x305bf7};}function orderStepsFromRoot(_0x5000fb,_0x55ff3a){const _0x41ff63=a147_0x2e98,_0x4c7a62=Object['entries'](_0x5000fb);if(_0x4c7a62[_0x41ff63(0x16f)]===0x0)return[];const _0x518d76=new Set(_0x4c7a62[_0x41ff63(0x1a9)](([_0x5370e1])=>_0x5370e1)),_0x5f04f2=new Set();for(const [,_0x1d2a2d]of _0x4c7a62){for(const _0x4e7cf9 of getStepNextRefs(_0x1d2a2d)){if(_0x518d76['has'](_0x4e7cf9))_0x5f04f2[_0x41ff63(0x1c9)](_0x4e7cf9);}}let _0x5ad2ea=_0x55ff3a&&_0x518d76[_0x41ff63(0x1fb)](_0x55ff3a)?_0x55ff3a:undefined;if(!_0x5ad2ea){const _0x42caa3=_0x4c7a62[_0x41ff63(0x197)](([_0x54671f])=>!_0x5f04f2['has'](_0x54671f));_0x42caa3[_0x41ff63(0x16f)]>0x0?_0x5ad2ea=_0x42caa3[0x0][0x0]:_0x5ad2ea=_0x4c7a62[0x0][0x0];}const _0x3061c2=[],_0x2a4259=new Set(),_0x56d6df=[_0x5ad2ea];while(_0x56d6df['length']>0x0){const _0x1adfcb=_0x56d6df['shift']();if(_0x2a4259['has'](_0x1adfcb))continue;_0x2a4259[_0x41ff63(0x1c9)](_0x1adfcb);const _0xc7bf7a=_0x5000fb[_0x1adfcb];if(!_0xc7bf7a)continue;_0x3061c2[_0x41ff63(0x1ff)]({'uuid':_0x1adfcb,'step':_0xc7bf7a});for(const _0x43ef5c of getStepNextRefs(_0xc7bf7a)){_0x518d76[_0x41ff63(0x1fb)](_0x43ef5c)&&!_0x2a4259[_0x41ff63(0x1fb)](_0x43ef5c)&&_0x56d6df[_0x41ff63(0x1ff)](_0x43ef5c);}}for(const [_0x4a36cb,_0x5204ca]of _0x4c7a62){!_0x2a4259['has'](_0x4a36cb)&&_0x3061c2['push']({'uuid':_0x4a36cb,'step':_0x5204ca});}return _0x3061c2;}function resolveStepReferences(_0x33d915,_0x23832f,_0x34e027,_0x3d29c7){const _0xb4cc6f=a147_0x2e98;if(_0x33d915['type']!=='end'){_0x33d915['next']&&_0x3d29c7[_0xb4cc6f(0x1fb)](_0x33d915[_0xb4cc6f(0x1e3)])&&(_0x33d915['next']=_0x3d29c7[_0xb4cc6f(0x1b0)](_0x33d915['next']));const _0x4abaa2=_0x23832f+0x1;if(_0x4abaa2<_0x34e027[_0xb4cc6f(0x16f)]){const _0x362cf7=_0x3d29c7[_0xb4cc6f(0x1b0)](_0x34e027[_0x4abaa2][_0xb4cc6f(0x18f)]);_0x33d915['next']===_0x362cf7&&delete _0x33d915[_0xb4cc6f(0x1e3)];}}if(_0x33d915[_0xb4cc6f(0x210)]===_0xb4cc6f(0x160))for(const _0x1674a2 of _0x33d915['with'][_0xb4cc6f(0x1c7)]){_0x1674a2[_0xb4cc6f(0x1e3)]&&_0x3d29c7[_0xb4cc6f(0x1fb)](_0x1674a2[_0xb4cc6f(0x1e3)])&&(_0x1674a2['next']=_0x3d29c7[_0xb4cc6f(0x1b0)](_0x1674a2[_0xb4cc6f(0x1e3)]));}if(_0x33d915[_0xb4cc6f(0x210)]===_0xb4cc6f(0x170))for(const _0x37ff7f of _0x33d915['with'][_0xb4cc6f(0x205)]){_0x37ff7f[_0xb4cc6f(0x1e3)]&&_0x3d29c7['has'](_0x37ff7f[_0xb4cc6f(0x1e3)])&&(_0x37ff7f['next']=_0x3d29c7[_0xb4cc6f(0x1b0)](_0x37ff7f[_0xb4cc6f(0x1e3)]));}if(_0x33d915['type']==='wait'&&_0x33d915[_0xb4cc6f(0x176)][_0xb4cc6f(0x1f5)]){const _0x1736f1=_0x33d915[_0xb4cc6f(0x176)][_0xb4cc6f(0x1f5)];_0x1736f1[_0xb4cc6f(0x1e3)]&&_0x3d29c7[_0xb4cc6f(0x1fb)](_0x1736f1[_0xb4cc6f(0x1e3)])&&(_0x1736f1[_0xb4cc6f(0x1e3)]=_0x3d29c7[_0xb4cc6f(0x1b0)](_0x1736f1[_0xb4cc6f(0x1e3)])),_0x1736f1[_0xb4cc6f(0x1d1)]?.[_0xb4cc6f(0x1e3)]&&_0x3d29c7[_0xb4cc6f(0x1fb)](_0x1736f1[_0xb4cc6f(0x1d1)]['next'])&&(_0x1736f1[_0xb4cc6f(0x1d1)][_0xb4cc6f(0x1e3)]=_0x3d29c7[_0xb4cc6f(0x1b0)](_0x1736f1[_0xb4cc6f(0x1d1)][_0xb4cc6f(0x1e3)]));}}function a147_0x262e(){const _0x389822=['activation_template_id','reentryMode','includes','target','find','\x20\x20\x20\x20type:\x20And\x0a','uuid','journeyBundleName','WaitStep','duration','Journey\x20description','DaysOfTheWeek','9WjYtoV','allowReentry','filter','randomUUID','no_reentry','wait_until','null','resolveActivationId','activation','goal-segment','excludedPath','rootStep','goal','name','7992930rXPjoK','18bWyWDF','First\x20stage\x20of\x20the\x20journey','waitStepType','resolveActivationName','journeyId','map','bundle_id','journeyStageId','steps','conditionTimeoutUnit','data','customizedSplit','get','waitUntilDate','uniqueId','bundle_name','columns','exitCriterias','activations','attributes','isJourneyLocal','toLowerCase','segments','1165096jNUlda','days_of_week','\x20\x20\x20\x20type:\x20','all','versionNumber','waitCondition','\x20\x20rule:\x0a','description','reentry','Send\x20Notification','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','connector_config','branches','version_number','add','weeks','resolveSegment','percentage','conditionTimeoutDuration','7820862XPktap','Variant','test','timeout','stageId','customized_split','entryCriteria','isArray','651550EDlUXK','exitCriteria','And','stages','notification','embedded','merge','journeyStages','folder_id','set','segmentId','5bjqjFD','schedule','next','Duration','entry_criteria','keys','reentry_always','rule','parentFolder','end','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','resolveStageId','Entry\x20Criteria','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','unique_id','Stage\x20Complete','excluded','conditionSegmentId','resolveActivation','journeys','condition','week','waitStepUnit','milestone','relationships','stage','has','sort','definition','object','push','resolveEmbeddedSegmentId','unit','activations:','ref','startsWith','variants','Stage\x201','resolveSegmentName','Date','day','ABTest','from','JOURNEY_SYNTAX_ERROR','resolveJumpTarget','daysOfWeek','jump','type','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','launched','resolveSegmentId','82333dGdQzw','timedOutPath','exit_criteria','waitStep','reentry:','draft','decision_point','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','\x20\x20\x20\x20conditions:\x0a','journeys:','moveAfter','Met\x20condition(s)','size','journeyName','DecisionPoint','ref:','latest','resolveJourneyId','3daVOnl','segment','End','length','ab_test','\x27:\x20','replace','version','match','Condition','with','\x27.\x0a','all_columns','goal:','versions','journeyBundleId','2641686qoGKUt','Jump','journey','3552008kwmLIv','stageName','behavior','state','wait','conditions','trim','Activation','stringify','journeyActivationStepId'];a147_0x262e=function(){return _0x389822;};return a147_0x262e();}function convertApiStageToYaml(_0x2b746c){const _0x3912ca=a147_0x2e98,_0x10127b={'name':_0x2b746c[_0x3912ca(0x1a2)]};_0x2b746c['id']&&(_0x10127b['id']=_0x2b746c['id']);_0x2b746c[_0x3912ca(0x1c2)]&&(_0x10127b['description']=_0x2b746c[_0x3912ca(0x1c2)]);_0x2b746c['entryCriteria']&&(_0x10127b[_0x3912ca(0x1e5)]=convertApiCriteriaToYaml(_0x2b746c['entryCriteria']));_0x2b746c[_0x3912ca(0x1b5)]&&_0x2b746c['exitCriterias']['length']>0x0&&(_0x10127b[_0x3912ca(0x15c)]=_0x2b746c[_0x3912ca(0x1b5)][_0x3912ca(0x1a9)](convertApiCriteriaToYaml));_0x2b746c[_0x3912ca(0x1f8)]&&(_0x10127b['milestone']=convertApiCriteriaToYaml(_0x2b746c[_0x3912ca(0x1f8)]));if(_0x2b746c[_0x3912ca(0x1ac)]&&Object['keys'](_0x2b746c[_0x3912ca(0x1ac)])[_0x3912ca(0x16f)]>0x0){const _0xbdf91=orderStepsFromRoot(_0x2b746c[_0x3912ca(0x1ac)],_0x2b746c['rootStep']),_0x6bbbfb=new Map(),_0x14bad9=new Set();for(let _0x2dd37e=0x0;_0x2dd37e<_0xbdf91[_0x3912ca(0x16f)];_0x2dd37e++){const {uuid:_0x506c9f,step:_0x30c08e}=_0xbdf91[_0x2dd37e];let _0x4db6cb=generateReadableStepName(_0x30c08e,_0x2dd37e),_0x148c53=_0x4db6cb,_0x5a8e7d=0x2;while(_0x14bad9['has'](_0x148c53)){_0x148c53=_0x4db6cb+'_'+_0x5a8e7d,_0x5a8e7d++;}_0x14bad9[_0x3912ca(0x1c9)](_0x148c53),_0x6bbbfb['set'](_0x506c9f,_0x148c53);}_0x10127b[_0x3912ca(0x1ac)]=_0xbdf91['map'](({uuid:_0x4a6187,step:_0x5d4673},_0x5dde57)=>{const _0x444d50=_0x3912ca,_0x3545c1=convertApiStepToYaml(_0x5d4673,_0x6bbbfb[_0x444d50(0x1b0)](_0x4a6187));return resolveStepReferences(_0x3545c1,_0x5dde57,_0xbdf91,_0x6bbbfb),_0x3545c1;});}return _0x10127b;}function convertApiCriteriaToYaml(_0x3c2c64){const _0x5a7e36=a147_0x2e98,_0x444320={'name':_0x3c2c64[_0x5a7e36(0x1a2)],'segment':_0x3c2c64[_0x5a7e36(0x1e0)]};_0x3c2c64[_0x5a7e36(0x1c2)]&&(_0x444320['description']=_0x3c2c64[_0x5a7e36(0x1c2)]);if(_0x3c2c64['target']){let _0x325302=_0x3c2c64[_0x5a7e36(0x18c)][_0x5a7e36(0x1a8)],_0x10a8f8=_0x3c2c64[_0x5a7e36(0x18c)][_0x5a7e36(0x1ab)];if(_0x3c2c64[_0x5a7e36(0x18c)][_0x5a7e36(0x167)]){const _0x319d6c=parseJumpTargetDisplayName(_0x3c2c64['target']['journeyName']);_0x319d6c&&(_0x10a8f8=_0x319d6c[_0x5a7e36(0x180)],_0x325302=_0x319d6c[_0x5a7e36(0x167)]);}_0x444320[_0x5a7e36(0x18c)]={'journey':_0x325302,'stage':_0x10a8f8},_0x3c2c64[_0x5a7e36(0x18c)][_0x5a7e36(0x17b)]&&(_0x444320[_0x5a7e36(0x18c)]['bundle_id']=_0x3c2c64['target'][_0x5a7e36(0x17b)]);}return _0x444320;}function convertApiStepToYaml(_0x41aaa8,_0xf0d93c){const _0x3f2634=a147_0x2e98;switch(_0x41aaa8[_0x3f2634(0x210)]){case'WaitStep':{const _0x4756f2={};if(_0x41aaa8[_0x3f2634(0x1a6)]===_0x3f2634(0x1e4)&&_0x41aaa8['waitStep']!==undefined)_0x4756f2['duration']=_0x41aaa8[_0x3f2634(0x15d)],_0x4756f2['unit']=_0x41aaa8[_0x3f2634(0x1f7)];else{if(_0x41aaa8['waitStepType']===_0x3f2634(0x208)&&_0x41aaa8['waitUntilDate'])_0x4756f2[_0x3f2634(0x19a)]=_0x41aaa8[_0x3f2634(0x1b1)];else{if(_0x41aaa8['waitStepType']===_0x3f2634(0x194)&&_0x41aaa8[_0x3f2634(0x20e)])_0x4756f2['days_of_week']=_0x41aaa8['daysOfWeek'];else{if(_0x41aaa8[_0x3f2634(0x1a6)]===_0x3f2634(0x175)){if(_0x41aaa8[_0x3f2634(0x184)]&&_0x41aaa8['conditions'][_0x3f2634(0x16f)]>0x0){const _0x333b1f=_0x41aaa8['conditions'][_0x3f2634(0x18d)](_0x5a34d2=>!_0x5a34d2[_0x3f2634(0x215)]),_0x219b8f=_0x41aaa8[_0x3f2634(0x184)][_0x3f2634(0x18d)](_0x48d92d=>_0x48d92d[_0x3f2634(0x215)]);_0x333b1f?.[_0x3f2634(0x1e0)]&&(_0x4756f2[_0x3f2634(0x1f5)]={'segment':_0x333b1f[_0x3f2634(0x1e0)],..._0x333b1f[_0x3f2634(0x1e3)]?{'next':_0x333b1f[_0x3f2634(0x1e3)]}:{}},_0x219b8f&&_0x219b8f[_0x3f2634(0x164)]!==undefined&&_0x219b8f[_0x3f2634(0x201)]&&(_0x4756f2[_0x3f2634(0x1f5)]['timeout']={'duration':_0x219b8f['moveAfter'],'unit':_0x219b8f[_0x3f2634(0x201)],..._0x219b8f['next']?{'next':_0x219b8f[_0x3f2634(0x1e3)]}:{}}));}else _0x41aaa8[_0x3f2634(0x1f2)]&&(_0x4756f2[_0x3f2634(0x1f5)]={'segment':_0x41aaa8[_0x3f2634(0x1f2)]},_0x41aaa8[_0x3f2634(0x1cd)]!==undefined&&_0x41aaa8[_0x3f2634(0x1ad)]&&(_0x4756f2[_0x3f2634(0x1f5)][_0x3f2634(0x1d1)]={'duration':_0x41aaa8[_0x3f2634(0x1cd)],'unit':_0x41aaa8[_0x3f2634(0x1ad)]}));}}}}const _0x1bb332={'type':_0x3f2634(0x183),'name':_0xf0d93c,..._0x41aaa8[_0x3f2634(0x1e3)]?{'next':_0x41aaa8['next']}:{},'with':_0x4756f2};return _0x1bb332;}case _0x3f2634(0x186):{const _0x1c3530={'type':_0x3f2634(0x19d),'name':_0xf0d93c,..._0x41aaa8['next']?{'next':_0x41aaa8[_0x3f2634(0x1e3)]}:{},'with':{'activation':_0x41aaa8[_0x3f2634(0x188)]||''}};return _0x1c3530;}case _0x3f2634(0x168):{const _0x595935={'type':'decision_point','name':_0xf0d93c,..._0x41aaa8[_0x3f2634(0x1e3)]?{'next':_0x41aaa8['next']}:{},'with':{'branches':(_0x41aaa8[_0x3f2634(0x1c7)]||[])[_0x3f2634(0x1a9)](_0x321c4c=>({'name':_0x321c4c['name'],'segment':_0x321c4c[_0x3f2634(0x1e0)],'excluded':_0x321c4c[_0x3f2634(0x19f)],..._0x321c4c[_0x3f2634(0x1e3)]?{'next':_0x321c4c[_0x3f2634(0x1e3)]}:{}}))}};return _0x595935;}case _0x3f2634(0x20a):case'AbTest':case _0x3f2634(0x1cf):{const _0x3479df=_0x41aaa8[_0x3f2634(0x205)]||(_0x41aaa8['branches']||[])[_0x3f2634(0x1a9)](_0x51578f=>({'name':_0x51578f[_0x3f2634(0x1a2)],'percentage':0x0,'next':_0x51578f[_0x3f2634(0x1e3)]})),_0x239033={'type':_0x3f2634(0x170),'name':_0xf0d93c,..._0x41aaa8[_0x3f2634(0x1e3)]?{'next':_0x41aaa8[_0x3f2634(0x1e3)]}:{},'with':{'customized_split':_0x41aaa8[_0x3f2634(0x1af)],'unique_id':_0x41aaa8[_0x3f2634(0x1b2)],'variants':_0x3479df[_0x3f2634(0x1a9)](_0x58855f=>({'name':_0x58855f[_0x3f2634(0x1a2)],'percentage':_0x58855f[_0x3f2634(0x1cc)],..._0x58855f['next']?{'next':_0x58855f['next']}:{}}))}};return _0x239033;}case'Merge':{const _0x5793c1={'type':'merge','name':_0xf0d93c,..._0x41aaa8[_0x3f2634(0x1e3)]?{'next':_0x41aaa8['next']}:{}};return _0x5793c1;}case _0x3f2634(0x17d):{let _0x1318ac='',_0x5ab20f='',_0x292012;if(_0x41aaa8[_0x3f2634(0x18c)]){_0x1318ac=_0x41aaa8[_0x3f2634(0x18c)]['journeyId'],_0x5ab20f=_0x41aaa8['target'][_0x3f2634(0x1ab)],_0x292012=_0x41aaa8[_0x3f2634(0x18c)][_0x3f2634(0x17b)];if(_0x41aaa8[_0x3f2634(0x18c)][_0x3f2634(0x167)]){const _0x1e1c21=parseJumpTargetDisplayName(_0x41aaa8[_0x3f2634(0x18c)][_0x3f2634(0x167)]);_0x1e1c21&&(_0x5ab20f=_0x1e1c21[_0x3f2634(0x180)],_0x1318ac=_0x1e1c21['journeyName']);}}const _0xab8202={'type':_0x3f2634(0x20f),'name':_0xf0d93c,..._0x41aaa8[_0x3f2634(0x1e3)]?{'next':_0x41aaa8[_0x3f2634(0x1e3)]}:{},'with':{'target':{'journey':_0x1318ac,'stage':_0x5ab20f,..._0x292012?{'bundle_id':_0x292012}:{}}}};return _0xab8202;}case'End':{const _0x381986={'type':_0x3f2634(0x1ea),'name':_0xf0d93c};return _0x381986;}default:{const _0x22eddf={'type':'end','name':_0xf0d93c};return _0x22eddf;}}}export async function journeyDefToRequest(_0x5d8f0b,_0x8e3f47,_0x3627af){const _0x2a381b=a147_0x2e98,_0x484de2=_0x5d8f0b[_0x2a381b(0x1d9)]||getActiveStages(_0x5d8f0b),_0x38fbcd=isJourneysArrayMode(_0x5d8f0b)||isMultiVersionMode(_0x5d8f0b)?getLatestJourneyEntry(_0x5d8f0b):undefined,_0x4509db=_0x38fbcd?.[_0x2a381b(0x173)]??_0x5d8f0b['name'],_0x5125a7=_0x5d8f0b[_0x2a381b(0x1ba)]||{},_0x3d0b8e=_0x5d8f0b['activations']||{},_0x13ab8d={'type':_0x2a381b(0x17e),'attributes':{'name':_0x4509db,'audienceId':_0x8e3f47,'journeyStages':await Promise['all'](_0x484de2[_0x2a381b(0x1a9)](_0x5661b7=>convertYamlStageToApi(_0x5661b7,_0x3627af,_0x5125a7,_0x3d0b8e)))}},_0x4c99c9=_0x38fbcd?.['id']??_0x5d8f0b['id'];_0x4c99c9&&(_0x13ab8d['id']=_0x4c99c9);_0x5d8f0b['description']&&(_0x13ab8d['attributes']['description']=_0x5d8f0b[_0x2a381b(0x1c2)]);const _0x2e86ce=getEffectiveGoal(_0x5d8f0b);_0x2e86ce&&(_0x13ab8d[_0x2a381b(0x1b7)][_0x2a381b(0x1a1)]=await convertYamlCriteriaToApi(_0x2e86ce,_0x3627af,_0x5125a7));const _0x401446=getEffectiveReentry(_0x5d8f0b);return _0x401446&&(_0x13ab8d[_0x2a381b(0x1b7)][_0x2a381b(0x18a)]=_0x401446,_0x13ab8d['attributes'][_0x2a381b(0x196)]=_0x401446!==_0x2a381b(0x199)),_0x5d8f0b[_0x2a381b(0x1de)]&&(_0x13ab8d[_0x2a381b(0x1f9)]={'parentFolder':{'data':{'id':_0x5d8f0b[_0x2a381b(0x1de)],'type':'folder'}}}),_0x13ab8d;}async function convertYamlStageToApi(_0x5b3d7d,_0x50b1c4,_0x15030c={},_0x58d125={}){const _0x1396d9=a147_0x2e98,_0x29b90a={'name':_0x5b3d7d[_0x1396d9(0x1a2)]};_0x5b3d7d['id']&&(_0x29b90a['id']=_0x5b3d7d['id']);_0x5b3d7d[_0x1396d9(0x1c2)]&&(_0x29b90a[_0x1396d9(0x1c2)]=_0x5b3d7d['description']);_0x5b3d7d[_0x1396d9(0x1e5)]&&(_0x29b90a[_0x1396d9(0x1d4)]=await convertYamlCriteriaToApi(_0x5b3d7d['entry_criteria'],_0x50b1c4,_0x15030c));_0x5b3d7d[_0x1396d9(0x15c)]&&_0x5b3d7d[_0x1396d9(0x15c)][_0x1396d9(0x16f)]>0x0&&(_0x29b90a[_0x1396d9(0x1b5)]=await Promise['all'](_0x5b3d7d['exit_criteria']['map'](_0x746112=>convertYamlCriteriaToApi(_0x746112,_0x50b1c4,_0x15030c))));_0x5b3d7d[_0x1396d9(0x1f8)]&&(_0x29b90a['milestone']=await convertYamlCriteriaToApi(_0x5b3d7d[_0x1396d9(0x1f8)],_0x50b1c4,_0x15030c));if(_0x5b3d7d[_0x1396d9(0x1ac)]&&_0x5b3d7d[_0x1396d9(0x1ac)]['length']>0x0){const _0x2f11dd={},_0x296d8d=_0x5b3d7d[_0x1396d9(0x1ac)]['map']((_0x2544bb,_0x56b3c1)=>{const _0x2fcd31=_0x1396d9,_0x1b048f=_0x2544bb[_0x2fcd31(0x18f)]||generateUUID(),_0x42deae=_0x2544bb[_0x2fcd31(0x1a2)]||_0x2544bb[_0x2fcd31(0x210)]+'_'+_0x56b3c1;return _0x2f11dd[_0x42deae]=_0x1b048f,{..._0x2544bb,'name':_0x42deae};});_0x29b90a[_0x1396d9(0x1a0)]=_0x2f11dd[_0x296d8d[0x0][_0x1396d9(0x1a2)]],_0x29b90a[_0x1396d9(0x1ac)]={};for(let _0x3dfec9=0x0;_0x3dfec9<_0x296d8d[_0x1396d9(0x16f)];_0x3dfec9++){const _0x36d729=_0x296d8d[_0x3dfec9],_0x1b0924=_0x2f11dd[_0x36d729[_0x1396d9(0x1a2)]],_0x279a1f=!_0x36d729[_0x1396d9(0x1e3)]&&_0x3dfec9<_0x296d8d[_0x1396d9(0x16f)]-0x1&&_0x36d729[_0x1396d9(0x210)]!=='end'?_0x296d8d[_0x3dfec9+0x1][_0x1396d9(0x1a2)]:_0x36d729['next'],_0x2bc4e2=_0x279a1f!==_0x36d729[_0x1396d9(0x1e3)]?{..._0x36d729,'next':_0x279a1f}:_0x36d729;_0x29b90a[_0x1396d9(0x1ac)][_0x1b0924]=await convertYamlStepToApi(_0x2bc4e2,_0x50b1c4,_0x15030c,_0x2f11dd,_0x58d125);}}else _0x5b3d7d['root_step']&&(_0x29b90a[_0x1396d9(0x1a0)]=_0x5b3d7d['root_step']);return _0x29b90a;}async function convertYamlCriteriaToApi(_0x2e73a8,_0x5931f4,_0x3e871a={}){const _0x43d5f2=a147_0x2e98;let _0x4c6659=_0x2e73a8[_0x43d5f2(0x16d)];if(_0x4c6659&&!/^\d+$/[_0x43d5f2(0x1d0)](_0x4c6659)){const _0x3fc5d1=parseSegmentRef(_0x4c6659);if(_0x3fc5d1['type']===_0x43d5f2(0x203))_0x5931f4?.[_0x43d5f2(0x213)]&&(_0x4c6659=await _0x5931f4[_0x43d5f2(0x213)](_0x3fc5d1[_0x43d5f2(0x1a2)]));else{if(_0x3fc5d1[_0x43d5f2(0x210)]===_0x43d5f2(0x1db)&&_0x3e871a[_0x3fc5d1[_0x43d5f2(0x1a2)]])_0x5931f4?.[_0x43d5f2(0x200)]&&(_0x4c6659=await _0x5931f4[_0x43d5f2(0x200)](_0x3fc5d1[_0x43d5f2(0x1a2)],_0x3e871a[_0x3fc5d1['name']]));else _0x5931f4?.[_0x43d5f2(0x213)]&&(_0x4c6659=await _0x5931f4[_0x43d5f2(0x213)](_0x3fc5d1['name']));}}const _0x277ed2={'name':_0x2e73a8[_0x43d5f2(0x1a2)],'segmentId':_0x4c6659};_0x2e73a8['description']&&(_0x277ed2[_0x43d5f2(0x1c2)]=_0x2e73a8[_0x43d5f2(0x1c2)]);if(_0x2e73a8[_0x43d5f2(0x18c)]){const _0x3d5e72=_0x2e73a8[_0x43d5f2(0x18c)][_0x43d5f2(0x17e)],_0x2dea20=_0x2e73a8[_0x43d5f2(0x18c)][_0x43d5f2(0x1fa)];let _0x5c47a6=_0x2e73a8[_0x43d5f2(0x18c)][_0x43d5f2(0x17e)];_0x5931f4?.[_0x43d5f2(0x16b)]&&!/^\d+$/[_0x43d5f2(0x1d0)](_0x5c47a6)&&(_0x5c47a6=await _0x5931f4[_0x43d5f2(0x16b)](_0x5c47a6));let _0x6e3246=_0x2e73a8['target']['stage'];_0x5931f4?.[_0x43d5f2(0x1ec)]&&!/^\d+$/[_0x43d5f2(0x1d0)](_0x6e3246)&&(_0x6e3246=await _0x5931f4[_0x43d5f2(0x1ec)](_0x5c47a6,_0x6e3246));const _0x339634=!/^\d+$/['test'](_0x3d5e72)&&!isLocalJourneyRef(_0x3d5e72)?formatApiJourneyName(_0x3d5e72,_0x2dea20):undefined;_0x277ed2[_0x43d5f2(0x18c)]={'journeyId':_0x5c47a6,'journeyStageId':_0x6e3246,'journeyName':_0x339634,'confirmed':!![]},_0x2e73a8[_0x43d5f2(0x18c)][_0x43d5f2(0x1aa)]&&(_0x277ed2[_0x43d5f2(0x18c)]['journeyBundleId']=_0x2e73a8['target'][_0x43d5f2(0x1aa)]);}return _0x277ed2;}async function convertYamlStepToApi(_0x1e0b14,_0x3af9c4,_0x1b1594={},_0x24fbee={},_0xe590fb={}){const _0x17b879=a147_0x2e98,_0x579cf3=async _0x127702=>{const _0x3c2c61=a147_0x2e98;if(/^\d+$/['test'](_0x127702))return _0x127702;const _0x35cb6a=parseSegmentRef(_0x127702);if(_0x35cb6a['type']===_0x3c2c61(0x203)){if(_0x3af9c4?.[_0x3c2c61(0x213)])return await _0x3af9c4[_0x3c2c61(0x213)](_0x35cb6a[_0x3c2c61(0x1a2)]);}else{if(_0x35cb6a[_0x3c2c61(0x210)]===_0x3c2c61(0x1db)&&_0x1b1594[_0x35cb6a[_0x3c2c61(0x1a2)]]){if(_0x3af9c4?.['resolveEmbeddedSegmentId'])return await _0x3af9c4[_0x3c2c61(0x200)](_0x35cb6a[_0x3c2c61(0x1a2)],_0x1b1594[_0x35cb6a[_0x3c2c61(0x1a2)]]);}else{if(_0x3af9c4?.['resolveSegmentId'])return await _0x3af9c4[_0x3c2c61(0x213)](_0x35cb6a[_0x3c2c61(0x1a2)]);}}return _0x127702;},_0x60dd03=async _0x12e41b=>{const _0x287b14=a147_0x2e98;if(/^\d+$/[_0x287b14(0x1d0)](_0x12e41b))return _0x12e41b;const _0x28cbbc=parseSegmentRef(_0x12e41b);if(_0x28cbbc[_0x287b14(0x210)]===_0x287b14(0x203)){if(_0x3af9c4?.[_0x287b14(0x19c)])return await _0x3af9c4[_0x287b14(0x19c)](_0x28cbbc[_0x287b14(0x1a2)]);return _0x28cbbc['name'];}else{if(_0x28cbbc[_0x287b14(0x210)]==='embedded'&&_0xe590fb[_0x28cbbc[_0x287b14(0x1a2)]]){if(_0x3af9c4?.['resolveEmbeddedActivationId'])return await _0x3af9c4['resolveEmbeddedActivationId'](_0x28cbbc['name'],_0xe590fb[_0x28cbbc[_0x287b14(0x1a2)]]);if(_0x3af9c4?.[_0x287b14(0x19c)])return await _0x3af9c4[_0x287b14(0x19c)](_0x28cbbc[_0x287b14(0x1a2)]);}else{if(_0x3af9c4?.[_0x287b14(0x19c)])return await _0x3af9c4[_0x287b14(0x19c)](_0x28cbbc[_0x287b14(0x1a2)]);}}return _0x12e41b;},_0x1a7518=_0x4b9f51=>{if(!_0x4b9f51)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'](_0x4b9f51))return _0x4b9f51;return _0x24fbee[_0x4b9f51]||_0x4b9f51;};switch(_0x1e0b14[_0x17b879(0x210)]){case _0x17b879(0x183):{const _0x116f98=_0x1e0b14,_0x22b6d1=_0x116f98[_0x17b879(0x176)],_0x18b47b={'type':_0x17b879(0x191),'name':_0x116f98['name'],'next':_0x1a7518(_0x116f98['next'])};if(_0x22b6d1[_0x17b879(0x192)]!==undefined&&_0x22b6d1[_0x17b879(0x201)])_0x18b47b['waitStepType']=_0x17b879(0x1e4),_0x18b47b[_0x17b879(0x15d)]=_0x22b6d1['duration'],_0x18b47b[_0x17b879(0x1f7)]=normalizeWaitUnit(_0x22b6d1[_0x17b879(0x201)]);else{if(_0x22b6d1['wait_until'])_0x18b47b[_0x17b879(0x1a6)]=_0x17b879(0x208),_0x18b47b[_0x17b879(0x1b1)]=_0x22b6d1['wait_until'];else{if(_0x22b6d1[_0x17b879(0x1bc)])_0x18b47b[_0x17b879(0x1a6)]='DaysOfTheWeek',_0x18b47b[_0x17b879(0x20e)]=_0x22b6d1[_0x17b879(0x1bc)];else{if(_0x22b6d1[_0x17b879(0x1f5)]){_0x18b47b[_0x17b879(0x1a6)]=_0x17b879(0x175);const _0x31aa04=await _0x579cf3(_0x22b6d1['condition'][_0x17b879(0x16d)]),_0x54787b=_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1d1)]?.[_0x17b879(0x1e3)]!==undefined;if(_0x54787b){const _0x353f5a=[];_0x353f5a[_0x17b879(0x1ff)]({'id':generateUUID(),'segmentId':_0x31aa04,'timedOutPath':![],'name':_0x17b879(0x165),'next':_0x1a7518(_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1e3)]??_0x116f98[_0x17b879(0x1e3)])});if(_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1d1)]){const _0x45c00f=_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1d1)]['duration'],_0x3f754d=normalizeWaitUnit(_0x22b6d1[_0x17b879(0x1f5)]['timeout'][_0x17b879(0x201)]);_0x353f5a[_0x17b879(0x1ff)]({'id':generateUUID(),'timedOutPath':!![],'name':'*Max\x20wait\x20'+_0x45c00f+'\x20'+_0x3f754d,'moveAfter':_0x45c00f,'unit':_0x3f754d,'next':_0x1a7518(_0x22b6d1[_0x17b879(0x1f5)]['timeout'][_0x17b879(0x1e3)])});}_0x18b47b[_0x17b879(0x184)]=_0x353f5a,delete _0x18b47b[_0x17b879(0x1e3)];}else _0x18b47b[_0x17b879(0x1f2)]=_0x31aa04,_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1d1)]&&(_0x18b47b[_0x17b879(0x1cd)]=_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1d1)][_0x17b879(0x192)],_0x22b6d1[_0x17b879(0x1f5)][_0x17b879(0x1d1)][_0x17b879(0x201)]&&(_0x18b47b[_0x17b879(0x1ad)]=normalizeWaitUnit(_0x22b6d1[_0x17b879(0x1f5)]['timeout']['unit'])));}}}}return _0x18b47b;}case _0x17b879(0x19d):{const _0x232fc3=_0x1e0b14,_0x2e7098=_0x232fc3[_0x17b879(0x176)][_0x17b879(0x19d)],_0x1aa115=await _0x60dd03(_0x2e7098);return{'type':'Activation','name':_0x232fc3[_0x17b879(0x1a2)],'journeyActivationStepId':_0x1aa115,'next':_0x1a7518(_0x232fc3['next'])};}case _0x17b879(0x160):{const _0x1f1d52=_0x1e0b14,_0x35c39b=_0x1f1d52['with'][_0x17b879(0x1c7)];return{'type':_0x17b879(0x168),'name':_0x1f1d52[_0x17b879(0x1a2)],'branches':await Promise[_0x17b879(0x1be)](_0x35c39b[_0x17b879(0x1a9)](async _0x1af7b6=>{const _0x52660f=_0x17b879;let _0x3a3bba='';if(!_0x1af7b6[_0x52660f(0x1f1)]){const _0x412746=_0x1af7b6[_0x52660f(0x16d)]||_0x1af7b6['segment_id']||'';_0x3a3bba=_0x412746?await _0x579cf3(_0x412746):'';}return{'id':crypto['randomUUID'](),'name':_0x1af7b6[_0x52660f(0x1a2)],'description':null,'segmentId':_0x3a3bba,'excludedPath':_0x1af7b6[_0x52660f(0x1f1)]??![],'next':_0x1a7518(_0x1af7b6[_0x52660f(0x1e3)])};})),'next':_0x1a7518(_0x1f1d52[_0x17b879(0x1e3)])};}case _0x17b879(0x170):{const _0x1e0d60=_0x1e0b14,_0x371a4d=_0x1e0d60[_0x17b879(0x176)];return{'type':_0x17b879(0x20a),'name':_0x1e0d60[_0x17b879(0x1a2)],'customizedSplit':_0x371a4d['customized_split'],'uniqueId':_0x371a4d[_0x17b879(0x1ef)],'variants':_0x371a4d['variants'][_0x17b879(0x1a9)](_0x387e6a=>({'id':_0x387e6a['id']||generateUUID(),'name':_0x387e6a[_0x17b879(0x1a2)],'percentage':_0x387e6a['percentage'],'next':_0x1a7518(_0x387e6a['next'])})),'next':_0x1a7518(_0x1e0d60[_0x17b879(0x1e3)])};}case _0x17b879(0x1dc):return{'type':'Merge','name':_0x1e0b14[_0x17b879(0x1a2)],'next':_0x1a7518(_0x1e0b14['next'])};case _0x17b879(0x20f):{const _0x48b26c=_0x1e0b14,_0xf22bdb=_0x48b26c[_0x17b879(0x176)]['target'],_0x201a72=_0xf22bdb[_0x17b879(0x17e)],_0x31a984=_0xf22bdb[_0x17b879(0x1fa)];let _0x517035=_0xf22bdb[_0x17b879(0x17e)];_0x3af9c4?.['resolveJourneyId']&&!/^\d+$/[_0x17b879(0x1d0)](_0x517035)&&(_0x517035=await _0x3af9c4['resolveJourneyId'](_0x517035));let _0x202416=_0xf22bdb[_0x17b879(0x1fa)];_0x3af9c4?.[_0x17b879(0x1ec)]&&!/^\d+$/[_0x17b879(0x1d0)](_0x202416)&&(_0x202416=await _0x3af9c4[_0x17b879(0x1ec)](_0x517035,_0x202416));const _0x15c321=!/^\d+$/[_0x17b879(0x1d0)](_0x201a72)&&!isLocalJourneyRef(_0x201a72)?formatApiJourneyName(_0x201a72,_0x31a984):undefined;return{'type':_0x17b879(0x17d),'name':_0x48b26c[_0x17b879(0x1a2)],'target':{'journeyId':_0x517035,'journeyStageId':_0x202416,'journeyBundleId':_0xf22bdb[_0x17b879(0x1aa)],'journeyName':_0x15c321,'confirmed':!![]},'next':_0x1a7518(_0x48b26c[_0x17b879(0x1e3)])};}case _0x17b879(0x1ea):return{'type':_0x17b879(0x16e),'name':_0x1e0b14[_0x17b879(0x1a2)]};default:{const _0x10c878=_0x1e0b14;return{'type':_0x17b879(0x16e),'name':_0x10c878[_0x17b879(0x1a2)]};}}}export function toYamlString(_0x36d4b3){const _0x1836f4=a147_0x2e98,_0x18c6e=stripInternalFields(_0x36d4b3),_0x5d249e=a147_0x177f2f[_0x1836f4(0x187)](_0x18c6e,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x1836f4(0x19b)}),_0x36f9a8=['segments:',_0x1836f4(0x202),_0x1836f4(0x179),_0x1836f4(0x15e),_0x1836f4(0x163),'stages:','versions:'];let _0x19aa76=_0x5d249e;for(const _0x37fac1 of _0x36f9a8){_0x19aa76=_0x19aa76[_0x1836f4(0x172)](new RegExp('^('+_0x37fac1+')','m'),(_0xcfbea7,_0x32a089,_0x1bca74)=>{if(_0x1bca74===0x0||_0x19aa76[_0x1bca74-0x1]==='\x0a'&&_0x19aa76[_0x1bca74-0x2]==='\x0a')return _0x32a089;return'\x0a'+_0x32a089;});}return _0x19aa76;}function stripInternalFields(_0x3aeb00){const _0x448545=a147_0x2e98,{id:_0x94ff3c,folder_id:_0x5bd557,bundle_id:_0x4f1933,bundle_name:_0xb0c06a,version:_0x4e19c9,allow_reentry:_0x1aa5c8,..._0xb2136f}=_0x3aeb00;return _0xb2136f[_0x448545(0x1f4)]&&(_0xb2136f[_0x448545(0x1f4)]=_0xb2136f[_0x448545(0x1f4)][_0x448545(0x1a9)](_0x3de2d1=>{const _0x268795=_0x448545,{id:_0x56c78a,..._0x5dcaf2}=_0x3de2d1;return{..._0x5dcaf2,'stages':_0x5dcaf2[_0x268795(0x1d9)]['map'](stripStageInternalFields),..._0x3de2d1[_0x268795(0x16a)]===!![]?{'latest':!![]}:{},..._0xb2136f['journeys'][_0x268795(0x16f)]===0x1&&_0x5dcaf2[_0x268795(0x173)]==='v1'?{'version':undefined}:{}};})),_0xb2136f[_0x448545(0x1d9)]&&(_0xb2136f['stages']=_0xb2136f[_0x448545(0x1d9)][_0x448545(0x1a9)](stripStageInternalFields)),_0xb2136f['versions']&&(_0xb2136f[_0x448545(0x17a)]=_0xb2136f[_0x448545(0x17a)][_0x448545(0x1a9)](_0x296dc6=>{const _0x2285a4=_0x448545,{id:_0x247bc5,..._0x5978a6}=_0x296dc6;return{..._0x5978a6,'stages':_0x5978a6[_0x2285a4(0x1d9)]['map'](stripStageInternalFields),..._0x296dc6[_0x2285a4(0x16a)]===!![]?{'latest':!![]}:{}};})),_0xb2136f;}function stripStageInternalFields(_0x2aac2d){const {id:_0x400f56,..._0xdcacbb}=_0x2aac2d;return _0xdcacbb;}export function parseYamlString(_0xac48b3){return safeParseYaml(_0xac48b3,JourneyDefSchema);}export function isJourneyDef(_0x2598e4){const _0x471909=a147_0x2e98;return typeof _0x2598e4==='object'&&_0x2598e4!==null&&_0x471909(0x210)in _0x2598e4&&_0x2598e4['type']==='journey';}export function generateTemplate(_0x3b4443,_0x13cdee){const _0x211f8d=a147_0x2e98,_0x2d0bea={'type':_0x211f8d(0x17e),'name':_0x3b4443,'description':_0x211f8d(0x193),'reentry':_0x211f8d(0x199),'goal':{'name':'Goal\x20Achieved','segment':_0x211f8d(0x19e)},'stages':[{'name':_0x211f8d(0x206),'description':_0x211f8d(0x1a5),'entry_criteria':{'name':_0x211f8d(0x1ed),'segment':_0x13cdee},'steps':[{'type':_0x211f8d(0x183),'name':'Wait\x201\x20Day','with':{'duration':0x1,'unit':'day'}},{'type':_0x211f8d(0x19d),'name':_0x211f8d(0x1c4),'with':{'activation':'your-activation-name'}},{'type':_0x211f8d(0x1ea),'name':_0x211f8d(0x1f0)}]}]};return toYamlString(_0x2d0bea);}function generateUUID(){const _0x4b029a=a147_0x2e98;return crypto[_0x4b029a(0x198)]();}export const SEGMENT_REF_PREFIX=a147_0x5c06aa(0x169);export function parseSegmentRef(_0x21c1a7){const _0x16131f=a147_0x5c06aa;if(_0x21c1a7[_0x16131f(0x204)](SEGMENT_REF_PREFIX))return{'type':_0x16131f(0x203),'name':_0x21c1a7['slice'](SEGMENT_REF_PREFIX[_0x16131f(0x16f)])};if(/^\d+$/[_0x16131f(0x1d0)](_0x21c1a7))return{'type':'id','name':_0x21c1a7};return{'type':_0x16131f(0x1db),'name':_0x21c1a7};}export function makeSegmentRef(_0x1d94ba){return''+SEGMENT_REF_PREFIX+_0x1d94ba;}function a147_0x2e98(_0x256148,_0x1b0c1e){_0x256148=_0x256148-0x15c;const _0x262e7d=a147_0x262e();let _0x2e9858=_0x262e7d[_0x256148];return _0x2e9858;}export function isExternalSegmentRef(_0x1ba2a7){const _0x24398d=a147_0x5c06aa;return _0x1ba2a7[_0x24398d(0x204)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x4a53e4){const _0x53568a=a147_0x5c06aa;return!!(_0x4a53e4[_0x53568a(0x1f4)]&&_0x4a53e4[_0x53568a(0x1f4)][_0x53568a(0x16f)]>0x0);}export function isMultiVersionMode(_0x44a6f3){const _0x4238b7=a147_0x5c06aa;return!!(_0x44a6f3[_0x4238b7(0x17a)]&&_0x44a6f3[_0x4238b7(0x17a)]['length']>0x0);}export function isSingleVersionMode(_0x291a7a){const _0x19f7ca=a147_0x5c06aa;return!!(_0x291a7a[_0x19f7ca(0x1d9)]&&_0x291a7a[_0x19f7ca(0x1d9)]['length']>0x0);}export function hasMultipleVersions(_0x27da6b){const _0x1a9ab3=a147_0x5c06aa;if(isJourneysArrayMode(_0x27da6b))return(_0x27da6b[_0x1a9ab3(0x1f4)]?.[_0x1a9ab3(0x16f)]||0x0)>0x1;if(isMultiVersionMode(_0x27da6b))return(_0x27da6b[_0x1a9ab3(0x17a)]?.[_0x1a9ab3(0x16f)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x2aed9b){const _0x395ad8=a147_0x5c06aa;if(isJourneysArrayMode(_0x2aed9b))return _0x2aed9b;if(isSingleVersionMode(_0x2aed9b)){const {stages:_0xcc97ed,id:_0x3a362a,version:_0x35219b,version_number:_0xbedb7c,..._0x1e5a2b}=_0x2aed9b;return{..._0x1e5a2b,'journeys':[{'version':_0x35219b||'v1','stages':_0xcc97ed||[],'id':_0x3a362a,'version_number':_0xbedb7c}]};}if(isMultiVersionMode(_0x2aed9b)){const {versions:_0x16cfa1,..._0x4441ae}=_0x2aed9b;return{..._0x4441ae,'journeys':(_0x16cfa1||[])[_0x395ad8(0x1a9)](_0x14f5b5=>({'version':_0x14f5b5[_0x395ad8(0x1a2)],'state':_0x14f5b5[_0x395ad8(0x182)],'latest':_0x14f5b5[_0x395ad8(0x16a)],'stages':_0x14f5b5[_0x395ad8(0x1d9)],'id':_0x14f5b5['id'],'version_number':_0x14f5b5[_0x395ad8(0x1c8)]}))};}return _0x2aed9b;}export function normalizeJourneyDef(_0xb6450a,_0x1ae87e){const _0x5edca9=a147_0x5c06aa,_0x557d02=normalizeToJourneysFormat(_0xb6450a),_0x4b285a=_0x1ae87e?.[_0x5edca9(0x1ba)]?Object[_0x5edca9(0x1e6)](_0x1ae87e[_0x5edca9(0x1ba)]):undefined,_0x5a5b7d=_0x1ae87e?.[_0x5edca9(0x1b6)]?Object[_0x5edca9(0x1e6)](_0x1ae87e[_0x5edca9(0x1b6)]):undefined;return{'type':_0x5edca9(0x17e),'name':_0x557d02[_0x5edca9(0x1a2)],..._0x557d02[_0x5edca9(0x1c2)]!==undefined&&{'description':_0x557d02[_0x5edca9(0x1c2)]},..._0x557d02[_0x5edca9(0x1a1)]&&{'goal':normalizeJourneyCriteria(_0x557d02[_0x5edca9(0x1a1)])},..._0x557d02[_0x5edca9(0x1c3)]!==undefined&&{'reentry':_0x557d02[_0x5edca9(0x1c3)]},..._0x557d02[_0x5edca9(0x1ba)]&&{'segments':normalizeEmbeddedSegments(_0x557d02['segments'],_0x4b285a)},..._0x557d02[_0x5edca9(0x1b6)]&&{'activations':normalizeEmbeddedActivations(_0x557d02[_0x5edca9(0x1b6)],_0x5a5b7d)},..._0x557d02[_0x5edca9(0x1f4)]&&{'journeys':_0x557d02[_0x5edca9(0x1f4)]['map'](_0x43614f=>normalizeJourneyEntry(_0x43614f,_0x557d02['journeys'][_0x5edca9(0x16f)]===0x1))}};}function normalizeJourneyEntry(_0x491330,_0x336140){const _0x511b81=a147_0x5c06aa;return{...!_0x336140&&_0x491330[_0x511b81(0x173)]!==undefined&&{'version':_0x491330['version']},..._0x491330['state']!==undefined&&{'state':_0x491330['state']},...!_0x336140&&_0x491330['latest']!==undefined&&{'latest':_0x491330[_0x511b81(0x16a)]},..._0x491330[_0x511b81(0x1c8)]!==undefined&&{'version_number':_0x491330[_0x511b81(0x1c8)]},..._0x491330[_0x511b81(0x1a1)]&&{'goal':normalizeJourneyCriteria(_0x491330['goal'])},..._0x491330['reentry']!==undefined&&{'reentry':_0x491330[_0x511b81(0x1c3)]},'stages':_0x491330[_0x511b81(0x1d9)][_0x511b81(0x1a9)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x34a44e){const _0x33ebc6=a147_0x5c06aa;return{'name':_0x34a44e[_0x33ebc6(0x1a2)],..._0x34a44e[_0x33ebc6(0x1c2)]!==undefined&&{'description':_0x34a44e['description']},..._0x34a44e[_0x33ebc6(0x1e5)]&&{'entry_criteria':normalizeJourneyCriteria(_0x34a44e[_0x33ebc6(0x1e5)])},..._0x34a44e[_0x33ebc6(0x15c)]&&{'exit_criteria':_0x34a44e[_0x33ebc6(0x15c)][_0x33ebc6(0x1a9)](normalizeJourneyCriteria)},..._0x34a44e[_0x33ebc6(0x1f8)]&&{'milestone':normalizeJourneyCriteria(_0x34a44e[_0x33ebc6(0x1f8)])},..._0x34a44e['steps']&&{'steps':normalizeStepsWithImplicitNext(_0x34a44e['steps'])}};}function normalizeStepsWithImplicitNext(_0x3b1312){const _0x1b2119=a147_0x5c06aa;return _0x3b1312[_0x1b2119(0x1a9)]((_0x3e45d0,_0x1f024f)=>{const _0x410c62=_0x1b2119,_0xfdbba5=_0x1f024f<_0x3b1312[_0x410c62(0x16f)]-0x1?_0x3b1312[_0x1f024f+0x1][_0x410c62(0x1a2)]:undefined;return normalizeJourneyStep(_0x3e45d0,_0xfdbba5);});}function normalizeJourneyCriteria(_0x4fdd06){const _0x3beacc=a147_0x5c06aa;return{'name':_0x4fdd06[_0x3beacc(0x1a2)],..._0x4fdd06['description']!==undefined&&{'description':_0x4fdd06[_0x3beacc(0x1c2)]},'segment':_0x4fdd06[_0x3beacc(0x16d)],..._0x4fdd06['target']&&{'target':normalizeJumpTarget(_0x4fdd06['target'])}};}function normalizeJourneyStep(_0x320e63,_0x37bfee){const _0x556f7a=a147_0x5c06aa,_0x59831f=_0x320e63['next']!==undefined&&_0x320e63[_0x556f7a(0x1e3)]!==_0x37bfee,_0x1dece8={'type':_0x320e63[_0x556f7a(0x210)],'name':_0x320e63['name'],..._0x59831f&&{'next':_0x320e63['next']}};if(_0x556f7a(0x176)in _0x320e63&&_0x320e63['with'])return{..._0x1dece8,'with':normalizeStepParams(_0x320e63[_0x556f7a(0x210)],_0x320e63['with'])};return _0x1dece8;}function normalizeStepParams(_0x58e4ae,_0x193e6e){const _0x448379=a147_0x5c06aa;switch(_0x58e4ae){case'wait':{const _0x57b47d=_0x193e6e;let _0x50af6b;return _0x57b47d[_0x448379(0x1f5)]&&(_0x50af6b={'segment':_0x57b47d[_0x448379(0x1f5)][_0x448379(0x16d)],..._0x57b47d['condition'][_0x448379(0x1e3)]!==undefined&&{'next':_0x57b47d[_0x448379(0x1f5)][_0x448379(0x1e3)]},..._0x57b47d['condition']['timeout']&&{'timeout':{'duration':_0x57b47d[_0x448379(0x1f5)][_0x448379(0x1d1)][_0x448379(0x192)],'unit':_0x57b47d['condition'][_0x448379(0x1d1)][_0x448379(0x201)],..._0x57b47d[_0x448379(0x1f5)][_0x448379(0x1d1)]['next']!==undefined&&{'next':_0x57b47d[_0x448379(0x1f5)][_0x448379(0x1d1)]['next']}}}}),{..._0x57b47d[_0x448379(0x192)]!==undefined&&{'duration':_0x57b47d['duration']},..._0x57b47d[_0x448379(0x201)]!==undefined&&{'unit':_0x57b47d[_0x448379(0x201)]},..._0x57b47d[_0x448379(0x19a)]!==undefined&&{'wait_until':_0x57b47d['wait_until']},..._0x57b47d['days_of_week']!==undefined&&{'days_of_week':_0x57b47d[_0x448379(0x1bc)]},..._0x50af6b&&{'condition':_0x50af6b}};}case _0x448379(0x19d):{const _0x45bd8b=_0x193e6e;return{'activation':_0x45bd8b[_0x448379(0x19d)]};}case'decision_point':{const _0x3f02e1=_0x193e6e;return{'branches':_0x3f02e1[_0x448379(0x1c7)][_0x448379(0x1a9)](normalizeDecisionBranch)};}case _0x448379(0x170):{const _0x4f44e8=_0x193e6e;return{..._0x4f44e8['customized_split']!==undefined&&{'customized_split':_0x4f44e8[_0x448379(0x1d3)]},..._0x4f44e8['unique_id']!==undefined&&{'unique_id':_0x4f44e8[_0x448379(0x1ef)]},'variants':_0x4f44e8[_0x448379(0x205)][_0x448379(0x1a9)](normalizeAbTestVariant)};}case _0x448379(0x20f):{const _0x489f9e=_0x193e6e;return{'target':normalizeJumpTarget(_0x489f9e[_0x448379(0x18c)])};}default:return _0x193e6e;}}function normalizeDecisionBranch(_0x5dccff){const _0x4db5db=a147_0x5c06aa;return{'name':_0x5dccff[_0x4db5db(0x1a2)],..._0x5dccff['segment']!==undefined&&{'segment':_0x5dccff['segment']},..._0x5dccff[_0x4db5db(0x1f1)]!==undefined&&{'excluded':_0x5dccff[_0x4db5db(0x1f1)]},..._0x5dccff[_0x4db5db(0x1e3)]!==undefined&&{'next':_0x5dccff['next']}};}function normalizeAbTestVariant(_0x2ba5ea){const _0x536c25=a147_0x5c06aa;return{..._0x2ba5ea['id']!==undefined&&{'id':_0x2ba5ea['id']},'name':_0x2ba5ea['name'],'percentage':_0x2ba5ea[_0x536c25(0x1cc)],..._0x2ba5ea[_0x536c25(0x1e3)]!==undefined&&{'next':_0x2ba5ea[_0x536c25(0x1e3)]}};}function normalizeJumpTarget(_0x300cc5){const _0x471556=a147_0x5c06aa;return{'journey':_0x300cc5['journey'],'stage':_0x300cc5[_0x471556(0x1fa)],..._0x300cc5[_0x471556(0x1aa)]!==undefined&&{'bundle_id':_0x300cc5['bundle_id']}};}function normalizeEmbeddedSegments(_0x4691d9,_0x558d64){const _0x118e60=a147_0x5c06aa,_0x4c4538={},_0x21fd09=Object[_0x118e60(0x1e6)](_0x4691d9),_0x20d67d=_0x558d64?[..._0x558d64[_0x118e60(0x197)](_0x53dfc8=>_0x21fd09[_0x118e60(0x18b)](_0x53dfc8)),..._0x21fd09[_0x118e60(0x197)](_0x454d1e=>!_0x558d64[_0x118e60(0x18b)](_0x454d1e))[_0x118e60(0x1fc)]()]:_0x21fd09['sort']();for(const _0x4e9c2f of _0x20d67d){const _0x4600e4=_0x4691d9[_0x4e9c2f];if(_0x4600e4[_0x118e60(0x1e8)]){const _0xdaabc9=_0x4600e4[_0x118e60(0x1e8)];if(_0xdaabc9[_0x118e60(0x210)]!==_0x118e60(0x1d8)&&_0xdaabc9[_0x118e60(0x210)]!=='Or'){const _0x23aa7c=_0xdaabc9[_0x118e60(0x210)]??'(missing)';throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x118e60(0x211)+_0x4e9c2f+_0x118e60(0x171)+('rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27'+_0x23aa7c+_0x118e60(0x177))+'Expected\x20format:\x0a'+_0x118e60(0x1c1)+_0x118e60(0x18e)+_0x118e60(0x162)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x118e60(0x1ee));}if(!_0xdaabc9[_0x118e60(0x184)]||!Array['isArray'](_0xdaabc9[_0x118e60(0x184)]))throw new SDKError(ErrorCode[_0x118e60(0x20c)],_0x118e60(0x211)+_0x4e9c2f+_0x118e60(0x171)+'rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a'+'Expected\x20format:\x0a'+_0x118e60(0x1c1)+(_0x118e60(0x1bd)+_0xdaabc9['type']+'\x0a')+_0x118e60(0x162)+_0x118e60(0x1c5)+_0x118e60(0x1eb)+_0x118e60(0x1ee));}_0x4c4538[_0x4e9c2f]={..._0x4600e4[_0x118e60(0x1c2)]&&_0x4600e4[_0x118e60(0x1c2)][_0x118e60(0x185)]()&&{'description':_0x4600e4[_0x118e60(0x1c2)]},..._0x4600e4[_0x118e60(0x1e8)]&&{'rule':deepSortObject(_0x4600e4['rule'])}};}return _0x4c4538;}function normalizeEmbeddedActivations(_0x1fa1fa,_0x2bf574){const _0x206e07=a147_0x5c06aa,_0xbb0a9={},_0x1897e1=Object[_0x206e07(0x1e6)](_0x1fa1fa),_0xb40ea9=_0x2bf574?[..._0x2bf574[_0x206e07(0x197)](_0x4c9e1d=>_0x1897e1[_0x206e07(0x18b)](_0x4c9e1d)),..._0x1897e1[_0x206e07(0x197)](_0x2115bd=>!_0x2bf574['includes'](_0x2115bd))['sort']()]:_0x1897e1['sort']();for(const _0x454689 of _0xb40ea9){const _0x24a9e1=_0x1fa1fa[_0x454689];_0xbb0a9[_0x454689]={'name':_0x24a9e1[_0x206e07(0x1a2)],'connection':_0x24a9e1['connection'],..._0x24a9e1[_0x206e07(0x1c2)]!==undefined&&{'description':_0x24a9e1[_0x206e07(0x1c2)]},..._0x24a9e1[_0x206e07(0x178)]!==undefined&&{'all_columns':_0x24a9e1[_0x206e07(0x178)]},..._0x24a9e1[_0x206e07(0x1b4)]!==undefined&&{'columns':_0x24a9e1['columns']},..._0x24a9e1[_0x206e07(0x181)]!==undefined&&{'behavior':_0x24a9e1[_0x206e07(0x181)]},..._0x24a9e1[_0x206e07(0x1e2)]!==undefined&&{'schedule':_0x24a9e1[_0x206e07(0x1e2)]},..._0x24a9e1[_0x206e07(0x1da)]!==undefined&&{'notification':_0x24a9e1[_0x206e07(0x1da)]},..._0x24a9e1[_0x206e07(0x1c6)]!==undefined&&{'connector_config':_0x24a9e1[_0x206e07(0x1c6)]},..._0x24a9e1[_0x206e07(0x189)]!==undefined&&{'activation_template_id':_0x24a9e1['activation_template_id']}};}return _0xbb0a9;}export function getActiveStages(_0x42020d){const _0x54e729=a147_0x5c06aa;if(isJourneysArrayMode(_0x42020d)){const _0x2eac1f=_0x42020d[_0x54e729(0x1f4)]||[],_0x1fcb80=_0x2eac1f[_0x54e729(0x18d)](_0x1b6bf9=>_0x1b6bf9[_0x54e729(0x16a)]===!![])||_0x2eac1f[0x0];return _0x1fcb80?.['stages']||[];}if(isSingleVersionMode(_0x42020d))return _0x42020d[_0x54e729(0x1d9)]||[];if(isMultiVersionMode(_0x42020d)){const _0xcc032d=_0x42020d[_0x54e729(0x17a)]||[],_0x4d932b=_0xcc032d[_0x54e729(0x18d)](_0x1375df=>_0x1375df['latest']===!![])||_0xcc032d[0x0];return _0x4d932b?.[_0x54e729(0x1d9)]||[];}return[];}export function getLatestJourneyEntry(_0x15539c){const _0x2c8871=a147_0x5c06aa;if(isJourneysArrayMode(_0x15539c)){const _0x1548f9=_0x15539c[_0x2c8871(0x1f4)]||[];return _0x1548f9[_0x2c8871(0x18d)](_0xf93f03=>_0xf93f03[_0x2c8871(0x16a)]===!![])||_0x1548f9[0x0];}if(isMultiVersionMode(_0x15539c)){const _0x771d1d=_0x15539c[_0x2c8871(0x17a)]||[],_0x4fef85=_0x771d1d['find'](_0x6d738f=>_0x6d738f[_0x2c8871(0x16a)]===!![])||_0x771d1d[0x0];if(_0x4fef85)return{'version':_0x4fef85[_0x2c8871(0x1a2)],'state':_0x4fef85['state'],'latest':_0x4fef85[_0x2c8871(0x16a)],'stages':_0x4fef85[_0x2c8871(0x1d9)],'id':_0x4fef85['id'],'version_number':_0x4fef85['version_number']};}if(isSingleVersionMode(_0x15539c))return{'version':_0x15539c[_0x2c8871(0x173)]||'v1','state':'draft','stages':_0x15539c[_0x2c8871(0x1d9)]||[],'id':_0x15539c['id'],'version_number':_0x15539c['version_number'],'goal':_0x15539c[_0x2c8871(0x1a1)],'reentry':_0x15539c[_0x2c8871(0x1c3)]};return undefined;}export function getLatestVersion(_0xd2095a){const _0x55ae25=a147_0x5c06aa;if(!isMultiVersionMode(_0xd2095a))return undefined;const _0x844b90=_0xd2095a[_0x55ae25(0x17a)]||[];return _0x844b90['find'](_0xbd63e7=>_0xbd63e7[_0x55ae25(0x16a)]===!![])||_0x844b90[0x0];}export function getEffectiveGoal(_0x4bd90a){const _0x9919b9=a147_0x5c06aa,_0x277b75=getLatestJourneyEntry(_0x4bd90a);return _0x277b75?.[_0x9919b9(0x1a1)]||_0x4bd90a[_0x9919b9(0x1a1)];}export function getEffectiveReentry(_0x26b25f){const _0x5a58f6=a147_0x5c06aa,_0x2eb21e=getLatestJourneyEntry(_0x26b25f);return _0x2eb21e?.[_0x5a58f6(0x1c3)]||_0x26b25f['reentry'];}export function collectSegmentRefs(_0x44a8d7){const _0x7df747=a147_0x5c06aa,_0x309cbd=new Set();_0x44a8d7[_0x7df747(0x1a1)]?.[_0x7df747(0x16d)]&&_0x309cbd[_0x7df747(0x1c9)](_0x44a8d7[_0x7df747(0x1a1)][_0x7df747(0x16d)]);const _0x126fd1=_0x2d55ce=>{const _0x10b095=_0x7df747;for(const _0x31224f of _0x2d55ce){_0x31224f['entry_criteria']?.[_0x10b095(0x16d)]&&_0x309cbd[_0x10b095(0x1c9)](_0x31224f['entry_criteria'][_0x10b095(0x16d)]);if(_0x31224f[_0x10b095(0x15c)])for(const _0x3624a0 of _0x31224f['exit_criteria']){_0x3624a0[_0x10b095(0x16d)]&&_0x309cbd[_0x10b095(0x1c9)](_0x3624a0[_0x10b095(0x16d)]);}_0x31224f[_0x10b095(0x1f8)]?.[_0x10b095(0x16d)]&&_0x309cbd[_0x10b095(0x1c9)](_0x31224f[_0x10b095(0x1f8)]['segment']);if(_0x31224f[_0x10b095(0x1ac)])for(const _0x386b96 of _0x31224f[_0x10b095(0x1ac)]){if(_0x386b96[_0x10b095(0x210)]==='decision_point'){const _0x35ac52=_0x386b96;for(const _0x8d381 of _0x35ac52['with'][_0x10b095(0x1c7)]){_0x8d381[_0x10b095(0x16d)]&&_0x309cbd[_0x10b095(0x1c9)](_0x8d381[_0x10b095(0x16d)]);}}else{if(_0x386b96[_0x10b095(0x210)]===_0x10b095(0x183)){const _0x4ee8d0=_0x386b96;_0x4ee8d0[_0x10b095(0x176)]['condition']?.[_0x10b095(0x16d)]&&_0x309cbd['add'](_0x4ee8d0['with']['condition']['segment']);}}}}};_0x44a8d7[_0x7df747(0x1d9)]&&_0x126fd1(_0x44a8d7['stages']);if(_0x44a8d7[_0x7df747(0x17a)])for(const _0x4d6b97 of _0x44a8d7[_0x7df747(0x17a)]){_0x126fd1(_0x4d6b97[_0x7df747(0x1d9)]);}return _0x309cbd;}export function validateSegmentRefs(_0x1ef762){const _0xd91f92=a147_0x5c06aa,_0x3d846b=[],_0x54ed29=collectSegmentRefs(_0x1ef762),_0x16221d=new Set(Object[_0xd91f92(0x1e6)](_0x1ef762[_0xd91f92(0x1ba)]||{}));for(const _0x162342 of _0x54ed29){const _0x37163e=parseSegmentRef(_0x162342);_0x37163e[_0xd91f92(0x210)]==='embedded'&&!_0x16221d['has'](_0x37163e[_0xd91f92(0x1a2)])&&_0x3d846b[_0xd91f92(0x1ff)]('Unknown\x20segment\x20\x22'+_0x37163e[_0xd91f92(0x1a2)]+'\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:'+_0x37163e[_0xd91f92(0x1a2)]+_0xd91f92(0x161));}return _0x3d846b;}export function collectSegmentIdsFromJourneyApi(_0x413ca6){const _0x3a13e2=a147_0x5c06aa,_0x317327=new Set();_0x413ca6[_0x3a13e2(0x1b7)][_0x3a13e2(0x1a1)]?.['segmentId']&&_0x317327[_0x3a13e2(0x1c9)](_0x413ca6[_0x3a13e2(0x1b7)][_0x3a13e2(0x1a1)]['segmentId']);const _0x304cc0=_0x413ca6[_0x3a13e2(0x1b7)][_0x3a13e2(0x1dd)];if(Array['isArray'](_0x304cc0))for(const _0x1e5159 of _0x304cc0){_0x1e5159[_0x3a13e2(0x1d4)]?.[_0x3a13e2(0x1e0)]&&_0x317327['add'](_0x1e5159[_0x3a13e2(0x1d4)]['segmentId']);const _0x240ff6=_0x1e5159[_0x3a13e2(0x1b5)]??_0x1e5159[_0x3a13e2(0x1d7)];if(Array[_0x3a13e2(0x1d5)](_0x240ff6))for(const _0x27fc57 of _0x240ff6){_0x27fc57[_0x3a13e2(0x1e0)]&&_0x317327['add'](_0x27fc57['segmentId']);}_0x1e5159[_0x3a13e2(0x1f8)]?.['segmentId']&&_0x317327[_0x3a13e2(0x1c9)](_0x1e5159[_0x3a13e2(0x1f8)][_0x3a13e2(0x1e0)]);if(_0x1e5159[_0x3a13e2(0x1ac)]&&typeof _0x1e5159['steps']===_0x3a13e2(0x1fe)){const _0x300538=Array['isArray'](_0x1e5159['steps'])?_0x1e5159[_0x3a13e2(0x1ac)]:Object['values'](_0x1e5159[_0x3a13e2(0x1ac)]);for(const _0x1199c1 of _0x300538){_0x1199c1[_0x3a13e2(0x1c0)]?.[_0x3a13e2(0x1e0)]&&_0x317327[_0x3a13e2(0x1c9)](_0x1199c1[_0x3a13e2(0x1c0)][_0x3a13e2(0x1e0)]);const _0x2429fd=_0x1199c1;_0x2429fd[_0x3a13e2(0x1f2)]&&_0x317327[_0x3a13e2(0x1c9)](_0x2429fd[_0x3a13e2(0x1f2)]);if(Array[_0x3a13e2(0x1d5)](_0x2429fd['conditions']))for(const _0xeda7f2 of _0x2429fd[_0x3a13e2(0x184)]){_0xeda7f2[_0x3a13e2(0x1e0)]&&_0x317327['add'](_0xeda7f2[_0x3a13e2(0x1e0)]);}if(Array[_0x3a13e2(0x1d5)](_0x1199c1[_0x3a13e2(0x1c7)]))for(const _0x2f79d9 of _0x1199c1[_0x3a13e2(0x1c7)]){_0x2f79d9[_0x3a13e2(0x1e0)]&&_0x317327['add'](_0x2f79d9[_0x3a13e2(0x1e0)]);}}}}return _0x317327;}
|
|
1
|
+
(function(_0x21e658,_0x1924c7){const _0x385b77=a147_0x4543,_0x3de1c5=_0x21e658();while(!![]){try{const _0x42c5f5=-parseInt(_0x385b77(0x12d))/0x1+-parseInt(_0x385b77(0x99))/0x2*(parseInt(_0x385b77(0x146))/0x3)+parseInt(_0x385b77(0x134))/0x4*(parseInt(_0x385b77(0x106))/0x5)+parseInt(_0x385b77(0xf4))/0x6+parseInt(_0x385b77(0xdc))/0x7+parseInt(_0x385b77(0xa5))/0x8*(-parseInt(_0x385b77(0xc3))/0x9)+-parseInt(_0x385b77(0x13d))/0xa*(-parseInt(_0x385b77(0x145))/0xb);if(_0x42c5f5===_0x1924c7)break;else _0x3de1c5['push'](_0x3de1c5['shift']());}catch(_0x2463af){_0x3de1c5['push'](_0x3de1c5['shift']());}}}(a147_0x2af7,0x82b14));import*as a147_0x3719d3 from'yaml';function a147_0x2af7(){const _0x863132=['6LlhMcx','goal:','activations:','activation_template_id','jump','get','merge','bundle_id','End','Jump','sort','name','Variant','versions','object','waitStepType','exitCriteria','reentryMode','624688ekDqab','find','timedOutPath','goal','*Max\x20wait\x20','DecisionPoint','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','isArray','resolveStageId','ref','description','segmentId','20624OpMOKC','exitCriterias','Journey\x20description','milestone','stringify','root_step','segment_id','stages:','Send\x20Notification','uniqueId','segments','Goal\x20Achieved','all_columns','end','unique_id','Merge','push','resolveSegmentName','day','filter','journeyStages','set','weeks','has','values','version','And','journey','size','resolveJourneyId','2214ZJXWmC','schedule','\x20\x20rule:\x0a','resolveEmbeddedActivationId','allowReentry','waitCondition','stage','days_of_week','(missing)','data','moveAfter','rootStep','resolveActivationName','wait','all','type','resolveJumpTarget','resolveSegmentId','entry_criteria','folder_id','timeout','Unknown\x20segment\x20\x22','from','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','customizedSplit','897722uATBuC','variants','startsWith','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','reentry:','relationships','activations','versions:','percentage','connector_config','with','journeyActivationStepId','wait_until','\x27.\x0a','state','steps','entryCriteria','keys','randomUUID','entries','ab_test','conditionTimeoutDuration','conditionTimeoutUnit','journeyBundleName','4885182EdUUmM','segment','version_number','slice','latest','waitStepUnit','Activation','no_reentry','waitStep','journeyId','stageName','includes','customized_split','journeyName','journeyStageId','Duration','resolveActivationId','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','6935csezbo','replace','columns','journeyBundleId','rule.type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','week','DaysOfTheWeek','draft','excluded','decision_point','waitUntilDate','versionNumber','\x20\x20\x20\x20conditions:\x0a','test','Condition','length','stageId','reentry_always','branches','condition','match','map','conditionSegmentId','resolveEmbeddedSegmentId','WaitStep','next','\x27:\x20','daysOfWeek','Wait\x201\x20Day','exit_criteria','journeys','activation','add','behavior','definition','reentry','toLowerCase','Expected\x20format:\x0a','stages','611571QKNXrR','unit','JOURNEY_SYNTAX_ERROR','days','duration','isJourneyLocal','embedded','1928dFzPIl','target','trim','attributes','resolveSegment','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','ABTest','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','uuid','20nSirrv','bundle_name','notification','conditions','parentFolder','rule','resolveActivation','Date','4371323iWgxDB'];a147_0x2af7=function(){return _0x863132;};return a147_0x2af7();}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(_0x31f6db){const _0x4cc5bb=a147_0x4543,_0x42bab0=_0x31f6db['toLowerCase']();if(_0x42bab0===_0x4cc5bb(0x130)||_0x42bab0==='day')return'day';if(_0x42bab0===_0x4cc5bb(0xbb)||_0x42bab0===_0x4cc5bb(0x10b))return _0x4cc5bb(0x10b);return _0x31f6db;}export function journeyResponseToDefSync(_0x462161){const _0x4b8077=a147_0x4543,_0x1bae1c=_0x462161[_0x4b8077(0x137)],_0x4a1c7c=_0x1bae1c[_0x4b8077(0xf3)]||_0x1bae1c[_0x4b8077(0x92)],_0x47de29={'stages':_0x1bae1c['journeyStages'][_0x4b8077(0x11b)](convertApiStageToYaml),'id':_0x462161['id']};_0x1bae1c['goal']&&(_0x47de29[_0x4b8077(0x9c)]=convertApiCriteriaToYaml(_0x1bae1c[_0x4b8077(0x9c)]));_0x1bae1c['name']&&_0x1bae1c[_0x4b8077(0x92)]!==_0x4a1c7c&&(_0x47de29[_0x4b8077(0xbe)]=_0x1bae1c[_0x4b8077(0x92)]);_0x1bae1c[_0x4b8077(0x111)]!==undefined&&(_0x47de29[_0x4b8077(0xf6)]=_0x1bae1c[_0x4b8077(0x111)]);_0x1bae1c[_0x4b8077(0xea)]&&(_0x47de29[_0x4b8077(0xea)]=_0x1bae1c[_0x4b8077(0xea)]==='launched'?'launched':_0x4b8077(0x10d));const _0x195308={'type':_0x4b8077(0xc0),'name':_0x4a1c7c,'journeys':[_0x47de29]};_0x1bae1c[_0x4b8077(0xa3)]&&(_0x195308[_0x4b8077(0xa3)]=_0x1bae1c[_0x4b8077(0xa3)]);_0x1bae1c['goal']&&(_0x195308[_0x4b8077(0x9c)]=convertApiCriteriaToYaml(_0x1bae1c[_0x4b8077(0x9c)]));if(_0x1bae1c[_0x4b8077(0x98)])_0x195308[_0x4b8077(0x129)]=_0x1bae1c[_0x4b8077(0x98)];else _0x1bae1c[_0x4b8077(0xc7)]!==undefined&&(_0x195308[_0x4b8077(0x129)]=_0x1bae1c[_0x4b8077(0xc7)]?_0x4b8077(0x117):'no_reentry');return _0x1bae1c[_0x4b8077(0x109)]&&(_0x195308[_0x4b8077(0x8e)]=_0x1bae1c[_0x4b8077(0x109)]),_0x1bae1c['journeyBundleName']&&(_0x195308[_0x4b8077(0x13e)]=_0x1bae1c[_0x4b8077(0xf3)]),_0x462161[_0x4b8077(0xe1)]?.['parentFolder']?.[_0x4b8077(0xcc)]?.['id']&&(_0x195308[_0x4b8077(0xd6)]=_0x462161[_0x4b8077(0xe1)][_0x4b8077(0x141)]['data']['id']),_0x195308;}export async function journeyResponseToDef(_0x50916c,_0x20fead){const _0x325eda=a147_0x4543,_0x17de3d=journeyResponseToDefSync(_0x50916c);if(!_0x20fead)return _0x17de3d;const _0x3c00e6=new Set();collectSegmentIdsFromJourney(_0x17de3d,_0x3c00e6);const _0x5e01d6=new Set();collectActivationIdsFromJourney(_0x17de3d,_0x5e01d6);const _0x4b1c74={},_0x3eca66=new Map();for(const _0x420443 of Array[_0x325eda(0xd9)](_0x3c00e6)['sort']()){if(_0x20fead[_0x325eda(0x138)]){const _0x1f3dfd=await _0x20fead[_0x325eda(0x138)](_0x420443);if(_0x1f3dfd[_0x325eda(0x132)]){_0x3eca66[_0x325eda(0xba)](_0x420443,_0x1f3dfd['name']);if(_0x1f3dfd[_0x325eda(0x128)]){const _0x5e8804={..._0x1f3dfd['definition'],'rule':deepSortObject(_0x1f3dfd[_0x325eda(0x128)][_0x325eda(0x142)])};_0x4b1c74[_0x1f3dfd[_0x325eda(0x92)]]=_0x5e8804;}}else _0x3eca66[_0x325eda(0xba)](_0x420443,makeSegmentRef(_0x1f3dfd[_0x325eda(0x92)]));}else{if(_0x20fead[_0x325eda(0xb6)]){const _0x38ff75=await _0x20fead[_0x325eda(0xb6)](_0x420443);_0x3eca66[_0x325eda(0xba)](_0x420443,_0x38ff75);}}}const _0x293770={},_0x32c119=new Map();for(const _0x1b59f5 of Array[_0x325eda(0xd9)](_0x5e01d6)[_0x325eda(0x91)]()){if(_0x20fead[_0x325eda(0x143)]){const _0x4f4cb2=await _0x20fead[_0x325eda(0x143)](_0x1b59f5);_0x4f4cb2[_0x325eda(0x132)]?(_0x32c119[_0x325eda(0xba)](_0x1b59f5,_0x4f4cb2[_0x325eda(0x92)]),_0x4f4cb2['definition']&&(_0x293770[_0x4f4cb2['name']]=_0x4f4cb2[_0x325eda(0x128)])):_0x32c119[_0x325eda(0xba)](_0x1b59f5,makeSegmentRef(_0x4f4cb2['name']));}else{if(_0x20fead[_0x325eda(0xcf)]){const _0x58375c=await _0x20fead['resolveActivationName'](_0x1b59f5);_0x32c119[_0x325eda(0xba)](_0x1b59f5,_0x58375c);}}}_0x3eca66[_0x325eda(0xc1)]>0x0&&replaceSegmentIdsInJourney(_0x17de3d,_0x3eca66);_0x32c119['size']>0x0&&replaceActivationIdsInJourney(_0x17de3d,_0x32c119);if(_0x20fead[_0x325eda(0xd3)]){const _0x4b6dc0=[];collectJumpTargetsFromJourney(_0x17de3d,_0x4b6dc0);if(_0x4b6dc0[_0x325eda(0x115)]>0x0){const _0x42c2ad=new Map();for(const _0x1c6e8d of _0x4b6dc0){try{const _0x72ca87=await _0x20fead[_0x325eda(0xd3)](_0x1c6e8d[_0x325eda(0xfd)],_0x1c6e8d[_0x325eda(0x116)]);_0x42c2ad['set'](_0x1c6e8d[_0x325eda(0xfd)]+':'+_0x1c6e8d[_0x325eda(0x116)],_0x72ca87);}catch{}}_0x42c2ad[_0x325eda(0xc1)]>0x0&&replaceJumpTargetsInJourney(_0x17de3d,_0x42c2ad);}}return Object[_0x325eda(0xed)](_0x4b1c74)[_0x325eda(0x115)]>0x0&&(_0x17de3d['segments']=_0x4b1c74),Object['keys'](_0x293770)[_0x325eda(0x115)]>0x0&&(_0x17de3d[_0x325eda(0xe2)]=_0x293770),_0x17de3d;}function collectSegmentIdsFromJourney(_0xfcd47e,_0x3aa690){const _0x10340c=a147_0x4543;_0xfcd47e[_0x10340c(0x9c)]?.[_0x10340c(0xf5)]&&_0x3aa690[_0x10340c(0x126)](_0xfcd47e['goal'][_0x10340c(0xf5)]);const _0xe1fb64=_0x21bd41=>{const _0x430c56=_0x10340c;for(const _0x1c7c96 of _0x21bd41){_0x1c7c96[_0x430c56(0xd5)]?.['segment']&&_0x3aa690['add'](_0x1c7c96['entry_criteria'][_0x430c56(0xf5)]);if(_0x1c7c96[_0x430c56(0x123)])for(const _0x414313 of _0x1c7c96[_0x430c56(0x123)]){_0x414313[_0x430c56(0xf5)]&&_0x3aa690['add'](_0x414313[_0x430c56(0xf5)]);}_0x1c7c96[_0x430c56(0xa8)]?.[_0x430c56(0xf5)]&&_0x3aa690[_0x430c56(0x126)](_0x1c7c96[_0x430c56(0xa8)][_0x430c56(0xf5)]);if(_0x1c7c96[_0x430c56(0xeb)])for(const _0x38b972 of _0x1c7c96[_0x430c56(0xeb)]){if(_0x38b972[_0x430c56(0xd2)]===_0x430c56(0x10f)){const _0x2a84d0=_0x38b972;for(const _0x2e4be7 of _0x2a84d0[_0x430c56(0xe6)][_0x430c56(0x118)]){_0x2e4be7[_0x430c56(0xf5)]&&_0x3aa690[_0x430c56(0x126)](_0x2e4be7[_0x430c56(0xf5)]);}}else{if(_0x38b972[_0x430c56(0xd2)]===_0x430c56(0xd0)){const _0x2efa00=_0x38b972;_0x2efa00['with'][_0x430c56(0x119)]?.[_0x430c56(0xf5)]&&_0x3aa690['add'](_0x2efa00[_0x430c56(0xe6)][_0x430c56(0x119)][_0x430c56(0xf5)]);}}}}};if(_0xfcd47e['journeys'])for(const _0x427493 of _0xfcd47e[_0x10340c(0x124)]){_0x427493[_0x10340c(0x9c)]?.[_0x10340c(0xf5)]&&_0x3aa690[_0x10340c(0x126)](_0x427493[_0x10340c(0x9c)][_0x10340c(0xf5)]),_0xe1fb64(_0x427493[_0x10340c(0x12c)]);}_0xfcd47e[_0x10340c(0x12c)]&&_0xe1fb64(_0xfcd47e[_0x10340c(0x12c)]);if(_0xfcd47e[_0x10340c(0x94)])for(const _0x99ae2d of _0xfcd47e[_0x10340c(0x94)]){_0xe1fb64(_0x99ae2d['stages']);}}function replaceSegmentIdsInJourney(_0x47fc62,_0x271dd4){const _0x1548d4=a147_0x4543,_0x39518b=_0x10279d=>_0x271dd4[_0x1548d4(0x14b)](_0x10279d)||_0x10279d;_0x47fc62[_0x1548d4(0x9c)]?.['segment']&&(_0x47fc62['goal'][_0x1548d4(0xf5)]=_0x39518b(_0x47fc62['goal'][_0x1548d4(0xf5)]));const _0x51269b=_0x178c17=>{const _0x303e98=_0x1548d4;for(const _0x328a98 of _0x178c17){_0x328a98[_0x303e98(0xd5)]?.[_0x303e98(0xf5)]&&(_0x328a98[_0x303e98(0xd5)][_0x303e98(0xf5)]=_0x39518b(_0x328a98['entry_criteria'][_0x303e98(0xf5)]));if(_0x328a98[_0x303e98(0x123)])for(const _0x5af766 of _0x328a98[_0x303e98(0x123)]){_0x5af766['segment']&&(_0x5af766[_0x303e98(0xf5)]=_0x39518b(_0x5af766[_0x303e98(0xf5)]));}_0x328a98[_0x303e98(0xa8)]?.[_0x303e98(0xf5)]&&(_0x328a98[_0x303e98(0xa8)][_0x303e98(0xf5)]=_0x39518b(_0x328a98['milestone'][_0x303e98(0xf5)]));if(_0x328a98['steps'])for(const _0x57f3b of _0x328a98[_0x303e98(0xeb)]){if(_0x57f3b['type']===_0x303e98(0x10f)){const _0x47fdda=_0x57f3b;for(const _0xbee3a9 of _0x47fdda[_0x303e98(0xe6)][_0x303e98(0x118)]){_0xbee3a9[_0x303e98(0xf5)]&&(_0xbee3a9[_0x303e98(0xf5)]=_0x39518b(_0xbee3a9['segment']));}}else{if(_0x57f3b['type']===_0x303e98(0xd0)){const _0x1a7fda=_0x57f3b;_0x1a7fda['with']['condition']?.['segment']&&(_0x1a7fda[_0x303e98(0xe6)]['condition'][_0x303e98(0xf5)]=_0x39518b(_0x1a7fda[_0x303e98(0xe6)]['condition'][_0x303e98(0xf5)]));}}}}};if(_0x47fc62['journeys'])for(const _0x16d987 of _0x47fc62[_0x1548d4(0x124)]){_0x16d987['goal']?.[_0x1548d4(0xf5)]&&(_0x16d987[_0x1548d4(0x9c)][_0x1548d4(0xf5)]=_0x39518b(_0x16d987[_0x1548d4(0x9c)][_0x1548d4(0xf5)])),_0x51269b(_0x16d987['stages']);}_0x47fc62[_0x1548d4(0x12c)]&&_0x51269b(_0x47fc62['stages']);if(_0x47fc62['versions'])for(const _0x3df827 of _0x47fc62[_0x1548d4(0x94)]){_0x51269b(_0x3df827[_0x1548d4(0x12c)]);}}function collectActivationIdsFromJourney(_0x14f30f,_0x2a4620){const _0x215c1e=a147_0x4543,_0x875809=_0x2fd81a=>{const _0x335cdb=a147_0x4543;for(const _0x868b1c of _0x2fd81a){if(_0x868b1c[_0x335cdb(0xeb)])for(const _0x54a3bc of _0x868b1c[_0x335cdb(0xeb)]){if(_0x54a3bc[_0x335cdb(0xd2)]==='activation'){const _0x593d3a=_0x54a3bc;_0x593d3a[_0x335cdb(0xe6)][_0x335cdb(0x125)]&&/^\d+$/[_0x335cdb(0x113)](_0x593d3a[_0x335cdb(0xe6)]['activation'])&&_0x2a4620[_0x335cdb(0x126)](_0x593d3a[_0x335cdb(0xe6)][_0x335cdb(0x125)]);}}}};if(_0x14f30f['journeys'])for(const _0x33c1d8 of _0x14f30f['journeys']){_0x875809(_0x33c1d8['stages']);}_0x14f30f['stages']&&_0x875809(_0x14f30f[_0x215c1e(0x12c)]);if(_0x14f30f[_0x215c1e(0x94)])for(const _0x33df71 of _0x14f30f[_0x215c1e(0x94)]){_0x875809(_0x33df71[_0x215c1e(0x12c)]);}}function replaceActivationIdsInJourney(_0x20aa71,_0x1aab5e){const _0x46fbbb=a147_0x4543,_0x46c448=_0x52e12a=>_0x1aab5e[_0x46fbbb(0x14b)](_0x52e12a)||_0x52e12a,_0x218884=_0x3ace6a=>{const _0x509d92=_0x46fbbb;for(const _0x50adb1 of _0x3ace6a){if(_0x50adb1['steps'])for(const _0x3ac785 of _0x50adb1[_0x509d92(0xeb)]){if(_0x3ac785[_0x509d92(0xd2)]===_0x509d92(0x125)){const _0x232906=_0x3ac785;_0x232906[_0x509d92(0xe6)][_0x509d92(0x125)]&&(_0x232906[_0x509d92(0xe6)]['activation']=_0x46c448(_0x232906[_0x509d92(0xe6)]['activation']));}}}};if(_0x20aa71[_0x46fbbb(0x124)])for(const _0x159b49 of _0x20aa71[_0x46fbbb(0x124)]){_0x218884(_0x159b49[_0x46fbbb(0x12c)]);}_0x20aa71[_0x46fbbb(0x12c)]&&_0x218884(_0x20aa71['stages']);if(_0x20aa71[_0x46fbbb(0x94)])for(const _0x500264 of _0x20aa71[_0x46fbbb(0x94)]){_0x218884(_0x500264['stages']);}}function collectJumpTargetsFromJourney(_0x505a5d,_0x585408){const _0x2d4f60=a147_0x4543,_0x352327=new Set(),_0x2733b2=_0x37862c=>{const _0x33faef=a147_0x4543;for(const _0x4ca2a9 of _0x37862c){if(_0x4ca2a9['steps'])for(const _0x271bb8 of _0x4ca2a9['steps']){if(_0x271bb8[_0x33faef(0xd2)]===_0x33faef(0x14a)){const _0x1b7c61=_0x271bb8,_0x14e8cf=_0x1b7c61[_0x33faef(0xe6)]['target'];if(_0x14e8cf[_0x33faef(0xc0)]&&_0x14e8cf[_0x33faef(0xc9)]&&/^\d+$/[_0x33faef(0x113)](_0x14e8cf[_0x33faef(0xc0)])&&/^\d+$/['test'](_0x14e8cf['stage'])){const _0x398584=_0x14e8cf[_0x33faef(0xc0)]+':'+_0x14e8cf['stage'];!_0x352327[_0x33faef(0xbc)](_0x398584)&&(_0x352327[_0x33faef(0x126)](_0x398584),_0x585408[_0x33faef(0xb5)]({'journeyId':_0x14e8cf[_0x33faef(0xc0)],'stageId':_0x14e8cf[_0x33faef(0xc9)]}));}}}}};if(_0x505a5d[_0x2d4f60(0x124)])for(const _0x475f7c of _0x505a5d[_0x2d4f60(0x124)]){_0x2733b2(_0x475f7c['stages']);}_0x505a5d[_0x2d4f60(0x12c)]&&_0x2733b2(_0x505a5d[_0x2d4f60(0x12c)]);if(_0x505a5d[_0x2d4f60(0x94)])for(const _0x2498c9 of _0x505a5d[_0x2d4f60(0x94)]){_0x2733b2(_0x2498c9[_0x2d4f60(0x12c)]);}}function replaceJumpTargetsInJourney(_0x162c08,_0x2597d7){const _0x10575d=a147_0x4543,_0x59313d=_0x4de5b6=>{const _0x5c856d=a147_0x4543;for(const _0x2dfb57 of _0x4de5b6){if(_0x2dfb57[_0x5c856d(0xeb)])for(const _0x3bf7c9 of _0x2dfb57[_0x5c856d(0xeb)]){if(_0x3bf7c9[_0x5c856d(0xd2)]===_0x5c856d(0x14a)){const _0x5ce86a=_0x3bf7c9,_0x325ecc=_0x5ce86a[_0x5c856d(0xe6)][_0x5c856d(0x135)],_0x2694ad=_0x325ecc[_0x5c856d(0xc0)]+':'+_0x325ecc[_0x5c856d(0xc9)],_0x493ac3=_0x2597d7[_0x5c856d(0x14b)](_0x2694ad);_0x493ac3&&(_0x325ecc['journey']=_0x493ac3['journeyName'],_0x325ecc['stage']=_0x493ac3[_0x5c856d(0xfe)]);}}}};if(_0x162c08[_0x10575d(0x124)])for(const _0x22b69e of _0x162c08[_0x10575d(0x124)]){_0x59313d(_0x22b69e[_0x10575d(0x12c)]);}_0x162c08[_0x10575d(0x12c)]&&_0x59313d(_0x162c08[_0x10575d(0x12c)]);if(_0x162c08[_0x10575d(0x94)])for(const _0x2795b7 of _0x162c08[_0x10575d(0x94)]){_0x59313d(_0x2795b7[_0x10575d(0x12c)]);}}function generateReadableStepName(_0x5b8dd5,_0x13ff54){const _0x4bc0ec=a147_0x4543;if(_0x5b8dd5['name']&&_0x5b8dd5[_0x4bc0ec(0x92)]!==_0x5b8dd5[_0x4bc0ec(0xd2)]){const _0x48835d=_0x5b8dd5[_0x4bc0ec(0x92)][_0x4bc0ec(0x136)]();if(_0x48835d&&/[a-z0-9\p{L}]/iu[_0x4bc0ec(0x113)](_0x48835d))return _0x48835d;}const _0x371e9f=_0x5b8dd5[_0x4bc0ec(0xd2)][_0x4bc0ec(0x12a)]()[_0x4bc0ec(0x107)](/step$/i,'');return _0x371e9f+'_'+(_0x13ff54+0x1);}function getStepNextRefs(_0x3be957){const _0x2e1e8a=a147_0x4543,_0x573a46=[];if(_0x3be957['next'])_0x573a46[_0x2e1e8a(0xb5)](_0x3be957[_0x2e1e8a(0x11f)]);if(_0x3be957[_0x2e1e8a(0x118)])for(const _0x3b5469 of _0x3be957[_0x2e1e8a(0x118)]){if(_0x3b5469['next'])_0x573a46[_0x2e1e8a(0xb5)](_0x3b5469[_0x2e1e8a(0x11f)]);}if(_0x3be957[_0x2e1e8a(0xdd)])for(const _0x4c2e08 of _0x3be957[_0x2e1e8a(0xdd)]){if(_0x4c2e08[_0x2e1e8a(0x11f)])_0x573a46[_0x2e1e8a(0xb5)](_0x4c2e08['next']);}if(_0x3be957[_0x2e1e8a(0x140)])for(const _0xd5671f of _0x3be957[_0x2e1e8a(0x140)]){if(_0xd5671f[_0x2e1e8a(0x11f)])_0x573a46['push'](_0xd5671f[_0x2e1e8a(0x11f)]);}return _0x573a46;}function parseJumpTargetDisplayName(_0x398b8d){const _0x49e0fb=a147_0x4543,_0x389f22=_0x398b8d[_0x49e0fb(0x11a)](/^(.+?)\s*\(([^/)]+)/);if(!_0x389f22)return undefined;const _0x8c193d=_0x389f22[0x1][_0x49e0fb(0x136)](),_0x53db59=_0x389f22[0x2][_0x49e0fb(0x136)]();if(!_0x8c193d||!_0x53db59)return undefined;return{'stageName':_0x8c193d,'journeyName':_0x53db59};}function a147_0x4543(_0x6a088f,_0x3fe9da){_0x6a088f=_0x6a088f-0x8e;const _0x2af72a=a147_0x2af7();let _0x454304=_0x2af72a[_0x6a088f];return _0x454304;}function orderStepsFromRoot(_0x282d2a,_0x331d33){const _0x4485c4=a147_0x4543,_0x2bbc49=Object[_0x4485c4(0xef)](_0x282d2a);if(_0x2bbc49['length']===0x0)return[];const _0x2c8dfd=new Set(_0x2bbc49[_0x4485c4(0x11b)](([_0x2a538b])=>_0x2a538b)),_0x30710d=new Set();for(const [,_0x101300]of _0x2bbc49){for(const _0x1524ba of getStepNextRefs(_0x101300)){if(_0x2c8dfd['has'](_0x1524ba))_0x30710d[_0x4485c4(0x126)](_0x1524ba);}}let _0x157e95=_0x331d33&&_0x2c8dfd[_0x4485c4(0xbc)](_0x331d33)?_0x331d33:undefined;if(!_0x157e95){const _0x4c14d1=_0x2bbc49[_0x4485c4(0xb8)](([_0xaec43])=>!_0x30710d[_0x4485c4(0xbc)](_0xaec43));_0x4c14d1[_0x4485c4(0x115)]>0x0?_0x157e95=_0x4c14d1[0x0][0x0]:_0x157e95=_0x2bbc49[0x0][0x0];}const _0x2f5500=[],_0x507d08=new Set(),_0x643504=[_0x157e95];while(_0x643504['length']>0x0){const _0x21b826=_0x643504['shift']();if(_0x507d08[_0x4485c4(0xbc)](_0x21b826))continue;_0x507d08['add'](_0x21b826);const _0x89c0a7=_0x282d2a[_0x21b826];if(!_0x89c0a7)continue;_0x2f5500[_0x4485c4(0xb5)]({'uuid':_0x21b826,'step':_0x89c0a7});for(const _0x2e69f3 of getStepNextRefs(_0x89c0a7)){_0x2c8dfd[_0x4485c4(0xbc)](_0x2e69f3)&&!_0x507d08['has'](_0x2e69f3)&&_0x643504['push'](_0x2e69f3);}}for(const [_0x105333,_0x510e90]of _0x2bbc49){!_0x507d08[_0x4485c4(0xbc)](_0x105333)&&_0x2f5500[_0x4485c4(0xb5)]({'uuid':_0x105333,'step':_0x510e90});}return _0x2f5500;}function resolveStepReferences(_0xf78994,_0x9bff2c,_0x54d330,_0x5e2a02){const _0x2d6957=a147_0x4543;if(_0xf78994[_0x2d6957(0xd2)]!==_0x2d6957(0xb2)){_0xf78994['next']&&_0x5e2a02[_0x2d6957(0xbc)](_0xf78994[_0x2d6957(0x11f)])&&(_0xf78994[_0x2d6957(0x11f)]=_0x5e2a02['get'](_0xf78994['next']));const _0x515ceb=_0x9bff2c+0x1;if(_0x515ceb<_0x54d330[_0x2d6957(0x115)]){const _0x1aba79=_0x5e2a02[_0x2d6957(0x14b)](_0x54d330[_0x515ceb]['uuid']);_0xf78994[_0x2d6957(0x11f)]===_0x1aba79&&delete _0xf78994[_0x2d6957(0x11f)];}}if(_0xf78994[_0x2d6957(0xd2)]==='decision_point')for(const _0x4773e0 of _0xf78994[_0x2d6957(0xe6)][_0x2d6957(0x118)]){_0x4773e0['next']&&_0x5e2a02[_0x2d6957(0xbc)](_0x4773e0[_0x2d6957(0x11f)])&&(_0x4773e0[_0x2d6957(0x11f)]=_0x5e2a02[_0x2d6957(0x14b)](_0x4773e0[_0x2d6957(0x11f)]));}if(_0xf78994[_0x2d6957(0xd2)]===_0x2d6957(0xf0))for(const _0x3ea1d7 of _0xf78994[_0x2d6957(0xe6)]['variants']){_0x3ea1d7[_0x2d6957(0x11f)]&&_0x5e2a02[_0x2d6957(0xbc)](_0x3ea1d7[_0x2d6957(0x11f)])&&(_0x3ea1d7[_0x2d6957(0x11f)]=_0x5e2a02[_0x2d6957(0x14b)](_0x3ea1d7['next']));}if(_0xf78994[_0x2d6957(0xd2)]===_0x2d6957(0xd0)&&_0xf78994[_0x2d6957(0xe6)][_0x2d6957(0x119)]){const _0x1ea9bc=_0xf78994[_0x2d6957(0xe6)][_0x2d6957(0x119)];_0x1ea9bc['next']&&_0x5e2a02['has'](_0x1ea9bc[_0x2d6957(0x11f)])&&(_0x1ea9bc[_0x2d6957(0x11f)]=_0x5e2a02[_0x2d6957(0x14b)](_0x1ea9bc['next'])),_0x1ea9bc[_0x2d6957(0xd7)]?.[_0x2d6957(0x11f)]&&_0x5e2a02['has'](_0x1ea9bc['timeout']['next'])&&(_0x1ea9bc[_0x2d6957(0xd7)][_0x2d6957(0x11f)]=_0x5e2a02[_0x2d6957(0x14b)](_0x1ea9bc[_0x2d6957(0xd7)][_0x2d6957(0x11f)]));}}function convertApiStageToYaml(_0x315675){const _0xc5a10c=a147_0x4543,_0x6463e2={'name':_0x315675[_0xc5a10c(0x92)]};_0x315675['id']&&(_0x6463e2['id']=_0x315675['id']);_0x315675[_0xc5a10c(0xa3)]&&(_0x6463e2[_0xc5a10c(0xa3)]=_0x315675[_0xc5a10c(0xa3)]);_0x315675[_0xc5a10c(0xec)]&&(_0x6463e2['entry_criteria']=convertApiCriteriaToYaml(_0x315675[_0xc5a10c(0xec)]));_0x315675[_0xc5a10c(0xa6)]&&_0x315675[_0xc5a10c(0xa6)][_0xc5a10c(0x115)]>0x0&&(_0x6463e2[_0xc5a10c(0x123)]=_0x315675[_0xc5a10c(0xa6)][_0xc5a10c(0x11b)](convertApiCriteriaToYaml));_0x315675['milestone']&&(_0x6463e2[_0xc5a10c(0xa8)]=convertApiCriteriaToYaml(_0x315675['milestone']));if(_0x315675['steps']&&Object[_0xc5a10c(0xed)](_0x315675[_0xc5a10c(0xeb)])[_0xc5a10c(0x115)]>0x0){const _0x5f1c07=orderStepsFromRoot(_0x315675['steps'],_0x315675[_0xc5a10c(0xce)]),_0x51361a=new Map(),_0x54782a=new Set();for(let _0xffb6ae=0x0;_0xffb6ae<_0x5f1c07[_0xc5a10c(0x115)];_0xffb6ae++){const {uuid:_0x12c218,step:_0x1fcc1a}=_0x5f1c07[_0xffb6ae];let _0x53b814=generateReadableStepName(_0x1fcc1a,_0xffb6ae),_0x3c118b=_0x53b814,_0x1dfdb6=0x2;while(_0x54782a[_0xc5a10c(0xbc)](_0x3c118b)){_0x3c118b=_0x53b814+'_'+_0x1dfdb6,_0x1dfdb6++;}_0x54782a[_0xc5a10c(0x126)](_0x3c118b),_0x51361a[_0xc5a10c(0xba)](_0x12c218,_0x3c118b);}_0x6463e2[_0xc5a10c(0xeb)]=_0x5f1c07['map'](({uuid:_0x27d990,step:_0x302581},_0x4482ae)=>{const _0x7d1ab0=_0xc5a10c,_0x190dac=convertApiStepToYaml(_0x302581,_0x51361a[_0x7d1ab0(0x14b)](_0x27d990));return resolveStepReferences(_0x190dac,_0x4482ae,_0x5f1c07,_0x51361a),_0x190dac;});}return _0x6463e2;}function convertApiCriteriaToYaml(_0xf618f5){const _0x3213ed=a147_0x4543,_0x2f63ae={'name':_0xf618f5['name'],'segment':_0xf618f5[_0x3213ed(0xa4)]};_0xf618f5[_0x3213ed(0xa3)]&&(_0x2f63ae[_0x3213ed(0xa3)]=_0xf618f5[_0x3213ed(0xa3)]);if(_0xf618f5['target']){let _0x564a64=_0xf618f5[_0x3213ed(0x135)][_0x3213ed(0xfd)],_0xede443=_0xf618f5[_0x3213ed(0x135)][_0x3213ed(0x102)];if(_0xf618f5[_0x3213ed(0x135)][_0x3213ed(0x101)]){const _0x5c6a25=parseJumpTargetDisplayName(_0xf618f5['target'][_0x3213ed(0x101)]);_0x5c6a25&&(_0xede443=_0x5c6a25['stageName'],_0x564a64=_0x5c6a25[_0x3213ed(0x101)]);}_0x2f63ae[_0x3213ed(0x135)]={'journey':_0x564a64,'stage':_0xede443},_0xf618f5[_0x3213ed(0x135)]['journeyBundleId']&&(_0x2f63ae[_0x3213ed(0x135)][_0x3213ed(0x8e)]=_0xf618f5[_0x3213ed(0x135)][_0x3213ed(0x109)]);}return _0x2f63ae;}function convertApiStepToYaml(_0x3e36d0,_0x103d85){const _0x2ed851=a147_0x4543;switch(_0x3e36d0[_0x2ed851(0xd2)]){case _0x2ed851(0x11e):{const _0x18a52a={};if(_0x3e36d0[_0x2ed851(0x96)]===_0x2ed851(0x103)&&_0x3e36d0[_0x2ed851(0xfc)]!==undefined)_0x18a52a[_0x2ed851(0x131)]=_0x3e36d0[_0x2ed851(0xfc)],_0x18a52a[_0x2ed851(0x12e)]=_0x3e36d0['waitStepUnit'];else{if(_0x3e36d0[_0x2ed851(0x96)]===_0x2ed851(0x144)&&_0x3e36d0[_0x2ed851(0x110)])_0x18a52a['wait_until']=_0x3e36d0[_0x2ed851(0x110)];else{if(_0x3e36d0[_0x2ed851(0x96)]===_0x2ed851(0x10c)&&_0x3e36d0[_0x2ed851(0x121)])_0x18a52a['days_of_week']=_0x3e36d0[_0x2ed851(0x121)];else{if(_0x3e36d0[_0x2ed851(0x96)]===_0x2ed851(0x114)){if(_0x3e36d0[_0x2ed851(0x140)]&&_0x3e36d0[_0x2ed851(0x140)]['length']>0x0){const _0x5231d5=_0x3e36d0[_0x2ed851(0x140)][_0x2ed851(0x9a)](_0x365728=>!_0x365728[_0x2ed851(0x9b)]),_0x3b8cba=_0x3e36d0[_0x2ed851(0x140)][_0x2ed851(0x9a)](_0x57ebc1=>_0x57ebc1[_0x2ed851(0x9b)]);_0x5231d5?.[_0x2ed851(0xa4)]&&(_0x18a52a[_0x2ed851(0x119)]={'segment':_0x5231d5[_0x2ed851(0xa4)],..._0x5231d5['next']?{'next':_0x5231d5[_0x2ed851(0x11f)]}:{}},_0x3b8cba&&_0x3b8cba[_0x2ed851(0xcd)]!==undefined&&_0x3b8cba[_0x2ed851(0x12e)]&&(_0x18a52a[_0x2ed851(0x119)][_0x2ed851(0xd7)]={'duration':_0x3b8cba[_0x2ed851(0xcd)],'unit':_0x3b8cba[_0x2ed851(0x12e)],..._0x3b8cba[_0x2ed851(0x11f)]?{'next':_0x3b8cba[_0x2ed851(0x11f)]}:{}}));}else _0x3e36d0['conditionSegmentId']&&(_0x18a52a[_0x2ed851(0x119)]={'segment':_0x3e36d0[_0x2ed851(0x11c)]},_0x3e36d0[_0x2ed851(0xf1)]!==undefined&&_0x3e36d0[_0x2ed851(0xf2)]&&(_0x18a52a[_0x2ed851(0x119)][_0x2ed851(0xd7)]={'duration':_0x3e36d0[_0x2ed851(0xf1)],'unit':_0x3e36d0[_0x2ed851(0xf2)]}));}}}}const _0x2e0413={'type':_0x2ed851(0xd0),'name':_0x103d85,..._0x3e36d0[_0x2ed851(0x11f)]?{'next':_0x3e36d0[_0x2ed851(0x11f)]}:{},'with':_0x18a52a};return _0x2e0413;}case'Activation':{const _0x312286={'type':'activation','name':_0x103d85,..._0x3e36d0[_0x2ed851(0x11f)]?{'next':_0x3e36d0[_0x2ed851(0x11f)]}:{},'with':{'activation':_0x3e36d0[_0x2ed851(0xe7)]||''}};return _0x312286;}case _0x2ed851(0x9e):{const _0x55ebcc={'type':_0x2ed851(0x10f),'name':_0x103d85,..._0x3e36d0['next']?{'next':_0x3e36d0[_0x2ed851(0x11f)]}:{},'with':{'branches':(_0x3e36d0[_0x2ed851(0x118)]||[])[_0x2ed851(0x11b)](_0x516a88=>({'name':_0x516a88[_0x2ed851(0x92)],'segment':_0x516a88[_0x2ed851(0xa4)],'excluded':_0x516a88['excludedPath'],..._0x516a88[_0x2ed851(0x11f)]?{'next':_0x516a88['next']}:{}}))}};return _0x55ebcc;}case _0x2ed851(0x13a):case'AbTest':case _0x2ed851(0x93):{const _0x3f7974=_0x3e36d0[_0x2ed851(0xdd)]||(_0x3e36d0[_0x2ed851(0x118)]||[])[_0x2ed851(0x11b)](_0x2ad17d=>({'name':_0x2ad17d[_0x2ed851(0x92)],'percentage':0x0,'next':_0x2ad17d['next']})),_0x45adc6={'type':'ab_test','name':_0x103d85,..._0x3e36d0[_0x2ed851(0x11f)]?{'next':_0x3e36d0[_0x2ed851(0x11f)]}:{},'with':{'customized_split':_0x3e36d0[_0x2ed851(0xdb)],'unique_id':_0x3e36d0[_0x2ed851(0xae)],'variants':_0x3f7974['map'](_0x1115a2=>({'name':_0x1115a2[_0x2ed851(0x92)],'percentage':_0x1115a2[_0x2ed851(0xe4)],..._0x1115a2['next']?{'next':_0x1115a2[_0x2ed851(0x11f)]}:{}}))}};return _0x45adc6;}case'Merge':{const _0x2b829a={'type':'merge','name':_0x103d85,..._0x3e36d0[_0x2ed851(0x11f)]?{'next':_0x3e36d0[_0x2ed851(0x11f)]}:{}};return _0x2b829a;}case _0x2ed851(0x90):{let _0x4e0d03='',_0x4d35b8='',_0x59de2d;if(_0x3e36d0[_0x2ed851(0x135)]){_0x4e0d03=_0x3e36d0['target'][_0x2ed851(0xfd)],_0x4d35b8=_0x3e36d0[_0x2ed851(0x135)][_0x2ed851(0x102)],_0x59de2d=_0x3e36d0[_0x2ed851(0x135)][_0x2ed851(0x109)];if(_0x3e36d0[_0x2ed851(0x135)][_0x2ed851(0x101)]){const _0x57f42d=parseJumpTargetDisplayName(_0x3e36d0[_0x2ed851(0x135)][_0x2ed851(0x101)]);_0x57f42d&&(_0x4d35b8=_0x57f42d[_0x2ed851(0xfe)],_0x4e0d03=_0x57f42d[_0x2ed851(0x101)]);}}const _0x4b9953={'type':_0x2ed851(0x14a),'name':_0x103d85,..._0x3e36d0['next']?{'next':_0x3e36d0[_0x2ed851(0x11f)]}:{},'with':{'target':{'journey':_0x4e0d03,'stage':_0x4d35b8,..._0x59de2d?{'bundle_id':_0x59de2d}:{}}}};return _0x4b9953;}case _0x2ed851(0x8f):{const _0x1e57e7={'type':'end','name':_0x103d85};return _0x1e57e7;}default:{const _0x19accd={'type':'end','name':_0x103d85};return _0x19accd;}}}export async function journeyDefToRequest(_0x371330,_0x5b43b4,_0x1662e3){const _0x112883=a147_0x4543,_0x44ca82=_0x371330[_0x112883(0x12c)]||getActiveStages(_0x371330),_0x4ebbda=isJourneysArrayMode(_0x371330)||isMultiVersionMode(_0x371330)?getLatestJourneyEntry(_0x371330):undefined,_0x2be322=_0x4ebbda?.[_0x112883(0xbe)]??_0x371330['name'],_0x5cf9c4=_0x371330[_0x112883(0xaf)]||{},_0x41e5de=_0x371330['activations']||{},_0x32ba39={'type':_0x112883(0xc0),'attributes':{'name':_0x2be322,'audienceId':_0x5b43b4,'journeyStages':await Promise[_0x112883(0xd1)](_0x44ca82[_0x112883(0x11b)](_0x26ca30=>convertYamlStageToApi(_0x26ca30,_0x1662e3,_0x5cf9c4,_0x41e5de)))}},_0x5c207c=_0x4ebbda?.['id']??_0x371330['id'];_0x5c207c&&(_0x32ba39['id']=_0x5c207c);_0x371330[_0x112883(0xa3)]&&(_0x32ba39[_0x112883(0x137)][_0x112883(0xa3)]=_0x371330[_0x112883(0xa3)]);const _0x4de683=getEffectiveGoal(_0x371330);_0x4de683&&(_0x32ba39['attributes'][_0x112883(0x9c)]=await convertYamlCriteriaToApi(_0x4de683,_0x1662e3,_0x5cf9c4));const _0x421e3e=getEffectiveReentry(_0x371330);return _0x421e3e&&(_0x32ba39[_0x112883(0x137)][_0x112883(0x98)]=_0x421e3e,_0x32ba39[_0x112883(0x137)][_0x112883(0xc7)]=_0x421e3e!==_0x112883(0xfb)),_0x371330[_0x112883(0xd6)]&&(_0x32ba39[_0x112883(0xe1)]={'parentFolder':{'data':{'id':_0x371330[_0x112883(0xd6)],'type':'folder'}}}),_0x32ba39;}async function convertYamlStageToApi(_0x8b7974,_0x4135f5,_0x1e6474={},_0x4a5cd6={}){const _0x3b873e=a147_0x4543,_0x57ce37={'name':_0x8b7974[_0x3b873e(0x92)]};_0x8b7974['id']&&(_0x57ce37['id']=_0x8b7974['id']);_0x8b7974[_0x3b873e(0xa3)]&&(_0x57ce37[_0x3b873e(0xa3)]=_0x8b7974['description']);_0x8b7974[_0x3b873e(0xd5)]&&(_0x57ce37[_0x3b873e(0xec)]=await convertYamlCriteriaToApi(_0x8b7974[_0x3b873e(0xd5)],_0x4135f5,_0x1e6474));_0x8b7974[_0x3b873e(0x123)]&&_0x8b7974['exit_criteria'][_0x3b873e(0x115)]>0x0&&(_0x57ce37['exitCriterias']=await Promise[_0x3b873e(0xd1)](_0x8b7974[_0x3b873e(0x123)][_0x3b873e(0x11b)](_0x1efaaf=>convertYamlCriteriaToApi(_0x1efaaf,_0x4135f5,_0x1e6474))));_0x8b7974['milestone']&&(_0x57ce37[_0x3b873e(0xa8)]=await convertYamlCriteriaToApi(_0x8b7974[_0x3b873e(0xa8)],_0x4135f5,_0x1e6474));if(_0x8b7974[_0x3b873e(0xeb)]&&_0x8b7974['steps'][_0x3b873e(0x115)]>0x0){const _0x214def={},_0x29ab1f=_0x8b7974[_0x3b873e(0xeb)]['map']((_0x52c712,_0x31047e)=>{const _0x226893=_0x3b873e,_0x4b821e=_0x52c712[_0x226893(0x13c)]||generateUUID(),_0x3a9c1e=_0x52c712[_0x226893(0x92)]||_0x52c712[_0x226893(0xd2)]+'_'+_0x31047e;return _0x214def[_0x3a9c1e]=_0x4b821e,{..._0x52c712,'name':_0x3a9c1e};});_0x57ce37[_0x3b873e(0xce)]=_0x214def[_0x29ab1f[0x0]['name']],_0x57ce37[_0x3b873e(0xeb)]={};for(let _0xb64d3c=0x0;_0xb64d3c<_0x29ab1f[_0x3b873e(0x115)];_0xb64d3c++){const _0x18d0ee=_0x29ab1f[_0xb64d3c],_0x2bddcc=_0x214def[_0x18d0ee['name']],_0x3c7f3d=!_0x18d0ee['next']&&_0xb64d3c<_0x29ab1f[_0x3b873e(0x115)]-0x1&&_0x18d0ee['type']!==_0x3b873e(0xb2)?_0x29ab1f[_0xb64d3c+0x1][_0x3b873e(0x92)]:_0x18d0ee[_0x3b873e(0x11f)],_0xddb4aa=_0x3c7f3d!==_0x18d0ee[_0x3b873e(0x11f)]?{..._0x18d0ee,'next':_0x3c7f3d}:_0x18d0ee;_0x57ce37[_0x3b873e(0xeb)][_0x2bddcc]=await convertYamlStepToApi(_0xddb4aa,_0x4135f5,_0x1e6474,_0x214def,_0x4a5cd6);}}else _0x8b7974[_0x3b873e(0xaa)]&&(_0x57ce37[_0x3b873e(0xce)]=_0x8b7974[_0x3b873e(0xaa)]);return _0x57ce37;}async function convertYamlCriteriaToApi(_0x3d7866,_0x3cfce2,_0x5754ca={}){const _0x59d793=a147_0x4543;let _0x4d8317=_0x3d7866['segment'];if(_0x4d8317&&!/^\d+$/[_0x59d793(0x113)](_0x4d8317)){const _0x3d2efa=parseSegmentRef(_0x4d8317);if(_0x3d2efa[_0x59d793(0xd2)]==='ref')_0x3cfce2?.[_0x59d793(0xd4)]&&(_0x4d8317=await _0x3cfce2['resolveSegmentId'](_0x3d2efa[_0x59d793(0x92)]));else{if(_0x3d2efa[_0x59d793(0xd2)]===_0x59d793(0x133)&&_0x5754ca[_0x3d2efa[_0x59d793(0x92)]])_0x3cfce2?.[_0x59d793(0x11d)]&&(_0x4d8317=await _0x3cfce2['resolveEmbeddedSegmentId'](_0x3d2efa[_0x59d793(0x92)],_0x5754ca[_0x3d2efa[_0x59d793(0x92)]]));else _0x3cfce2?.[_0x59d793(0xd4)]&&(_0x4d8317=await _0x3cfce2[_0x59d793(0xd4)](_0x3d2efa[_0x59d793(0x92)]));}}const _0x1e07ed={'name':_0x3d7866['name'],'segmentId':_0x4d8317};_0x3d7866[_0x59d793(0xa3)]&&(_0x1e07ed[_0x59d793(0xa3)]=_0x3d7866['description']);if(_0x3d7866[_0x59d793(0x135)]){const _0x1b87a6=_0x3d7866['target']['journey'],_0x88de3e=_0x3d7866[_0x59d793(0x135)][_0x59d793(0xc9)];let _0x341e5c=_0x3d7866['target'][_0x59d793(0xc0)];_0x3cfce2?.[_0x59d793(0xc2)]&&!/^\d+$/[_0x59d793(0x113)](_0x341e5c)&&(_0x341e5c=await _0x3cfce2[_0x59d793(0xc2)](_0x341e5c));let _0x3573a0=_0x3d7866[_0x59d793(0x135)][_0x59d793(0xc9)];_0x3cfce2?.[_0x59d793(0xa1)]&&!/^\d+$/['test'](_0x3573a0)&&(_0x3573a0=await _0x3cfce2[_0x59d793(0xa1)](_0x341e5c,_0x3573a0));const _0x50cfba=!/^\d+$/[_0x59d793(0x113)](_0x1b87a6)&&!isLocalJourneyRef(_0x1b87a6)?formatApiJourneyName(_0x1b87a6,_0x88de3e):undefined;_0x1e07ed[_0x59d793(0x135)]={'journeyId':_0x341e5c,'journeyStageId':_0x3573a0,'journeyName':_0x50cfba,'confirmed':!![]},_0x3d7866['target'][_0x59d793(0x8e)]&&(_0x1e07ed[_0x59d793(0x135)]['journeyBundleId']=_0x3d7866[_0x59d793(0x135)][_0x59d793(0x8e)]);}return _0x1e07ed;}async function convertYamlStepToApi(_0x3ea9c3,_0x4e56f6,_0x5a4456={},_0xa2c04a={},_0x18684e={}){const _0x42dff8=a147_0x4543,_0x400dcf=async _0x366278=>{const _0x3e4b41=a147_0x4543;if(/^\d+$/[_0x3e4b41(0x113)](_0x366278))return _0x366278;const _0x1f0446=parseSegmentRef(_0x366278);if(_0x1f0446[_0x3e4b41(0xd2)]===_0x3e4b41(0xa2)){if(_0x4e56f6?.[_0x3e4b41(0xd4)])return await _0x4e56f6[_0x3e4b41(0xd4)](_0x1f0446['name']);}else{if(_0x1f0446[_0x3e4b41(0xd2)]==='embedded'&&_0x5a4456[_0x1f0446['name']]){if(_0x4e56f6?.[_0x3e4b41(0x11d)])return await _0x4e56f6[_0x3e4b41(0x11d)](_0x1f0446[_0x3e4b41(0x92)],_0x5a4456[_0x1f0446['name']]);}else{if(_0x4e56f6?.[_0x3e4b41(0xd4)])return await _0x4e56f6[_0x3e4b41(0xd4)](_0x1f0446['name']);}}return _0x366278;},_0x547ed0=async _0x576801=>{const _0x5e3973=a147_0x4543;if(/^\d+$/[_0x5e3973(0x113)](_0x576801))return _0x576801;const _0x39e3a2=parseSegmentRef(_0x576801);if(_0x39e3a2[_0x5e3973(0xd2)]==='ref'){if(_0x4e56f6?.[_0x5e3973(0x104)])return await _0x4e56f6[_0x5e3973(0x104)](_0x39e3a2[_0x5e3973(0x92)]);return _0x39e3a2[_0x5e3973(0x92)];}else{if(_0x39e3a2[_0x5e3973(0xd2)]===_0x5e3973(0x133)&&_0x18684e[_0x39e3a2[_0x5e3973(0x92)]]){if(_0x4e56f6?.[_0x5e3973(0xc6)])return await _0x4e56f6[_0x5e3973(0xc6)](_0x39e3a2[_0x5e3973(0x92)],_0x18684e[_0x39e3a2[_0x5e3973(0x92)]]);if(_0x4e56f6?.[_0x5e3973(0x104)])return await _0x4e56f6[_0x5e3973(0x104)](_0x39e3a2[_0x5e3973(0x92)]);}else{if(_0x4e56f6?.[_0x5e3973(0x104)])return await _0x4e56f6[_0x5e3973(0x104)](_0x39e3a2[_0x5e3973(0x92)]);}}return _0x576801;},_0x192231=_0x2fee81=>{if(!_0x2fee81)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'](_0x2fee81))return _0x2fee81;return _0xa2c04a[_0x2fee81]||_0x2fee81;};switch(_0x3ea9c3[_0x42dff8(0xd2)]){case _0x42dff8(0xd0):{const _0x3a4715=_0x3ea9c3,_0x2d0506=_0x3a4715['with'],_0x280fd0={'type':_0x42dff8(0x11e),'name':_0x3a4715['name'],'next':_0x192231(_0x3a4715[_0x42dff8(0x11f)])};if(_0x2d0506[_0x42dff8(0x131)]!==undefined&&_0x2d0506[_0x42dff8(0x12e)])_0x280fd0[_0x42dff8(0x96)]='Duration',_0x280fd0[_0x42dff8(0xfc)]=_0x2d0506['duration'],_0x280fd0[_0x42dff8(0xf9)]=normalizeWaitUnit(_0x2d0506[_0x42dff8(0x12e)]);else{if(_0x2d0506[_0x42dff8(0xe8)])_0x280fd0['waitStepType']=_0x42dff8(0x144),_0x280fd0[_0x42dff8(0x110)]=_0x2d0506[_0x42dff8(0xe8)];else{if(_0x2d0506[_0x42dff8(0xca)])_0x280fd0[_0x42dff8(0x96)]=_0x42dff8(0x10c),_0x280fd0['daysOfWeek']=_0x2d0506[_0x42dff8(0xca)];else{if(_0x2d0506[_0x42dff8(0x119)]){_0x280fd0[_0x42dff8(0x96)]=_0x42dff8(0x114);const _0x58dd14=await _0x400dcf(_0x2d0506[_0x42dff8(0x119)][_0x42dff8(0xf5)]),_0xa7eb91=_0x2d0506['condition']['timeout']?.['next']!==undefined;if(_0xa7eb91){const _0x292f67=[];_0x292f67[_0x42dff8(0xb5)]({'id':generateUUID(),'segmentId':_0x58dd14,'timedOutPath':![],'name':'Met\x20condition(s)','next':_0x192231(_0x2d0506[_0x42dff8(0x119)][_0x42dff8(0x11f)]??_0x3a4715[_0x42dff8(0x11f)])});if(_0x2d0506['condition'][_0x42dff8(0xd7)]){const _0x5458ee=_0x2d0506[_0x42dff8(0x119)][_0x42dff8(0xd7)]['duration'],_0x91efc0=normalizeWaitUnit(_0x2d0506['condition'][_0x42dff8(0xd7)][_0x42dff8(0x12e)]);_0x292f67[_0x42dff8(0xb5)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x42dff8(0x9d)+_0x5458ee+'\x20'+_0x91efc0,'moveAfter':_0x5458ee,'unit':_0x91efc0,'next':_0x192231(_0x2d0506[_0x42dff8(0x119)][_0x42dff8(0xd7)][_0x42dff8(0x11f)])});}_0x280fd0[_0x42dff8(0x140)]=_0x292f67,delete _0x280fd0['next'];}else _0x280fd0[_0x42dff8(0x11c)]=_0x58dd14,_0x2d0506[_0x42dff8(0x119)][_0x42dff8(0xd7)]&&(_0x280fd0[_0x42dff8(0xf1)]=_0x2d0506[_0x42dff8(0x119)][_0x42dff8(0xd7)][_0x42dff8(0x131)],_0x2d0506[_0x42dff8(0x119)]['timeout']['unit']&&(_0x280fd0[_0x42dff8(0xf2)]=normalizeWaitUnit(_0x2d0506[_0x42dff8(0x119)]['timeout'][_0x42dff8(0x12e)])));}}}}return _0x280fd0;}case'activation':{const _0x1a9faa=_0x3ea9c3,_0x10bdcc=_0x1a9faa['with'][_0x42dff8(0x125)],_0xe958c6=await _0x547ed0(_0x10bdcc);return{'type':_0x42dff8(0xfa),'name':_0x1a9faa['name'],'journeyActivationStepId':_0xe958c6,'next':_0x192231(_0x1a9faa[_0x42dff8(0x11f)])};}case _0x42dff8(0x10f):{const _0x5db9ab=_0x3ea9c3,_0x20458e=_0x5db9ab[_0x42dff8(0xe6)][_0x42dff8(0x118)];return{'type':_0x42dff8(0x9e),'name':_0x5db9ab[_0x42dff8(0x92)],'branches':await Promise[_0x42dff8(0xd1)](_0x20458e[_0x42dff8(0x11b)](async _0x1c57ad=>{const _0x2ed29e=_0x42dff8;let _0x359f09='';if(!_0x1c57ad[_0x2ed29e(0x10e)]){const _0x379927=_0x1c57ad['segment']||_0x1c57ad[_0x2ed29e(0xab)]||'';_0x359f09=_0x379927?await _0x400dcf(_0x379927):'';}return{'id':crypto[_0x2ed29e(0xee)](),'name':_0x1c57ad[_0x2ed29e(0x92)],'description':null,'segmentId':_0x359f09,'excludedPath':_0x1c57ad[_0x2ed29e(0x10e)]??![],'next':_0x192231(_0x1c57ad[_0x2ed29e(0x11f)])};})),'next':_0x192231(_0x5db9ab[_0x42dff8(0x11f)])};}case'ab_test':{const _0x3ff647=_0x3ea9c3,_0x2d964d=_0x3ff647[_0x42dff8(0xe6)];return{'type':_0x42dff8(0x13a),'name':_0x3ff647[_0x42dff8(0x92)],'customizedSplit':_0x2d964d[_0x42dff8(0x100)],'uniqueId':_0x2d964d['unique_id'],'variants':_0x2d964d[_0x42dff8(0xdd)]['map'](_0x5af9fc=>({'id':_0x5af9fc['id']||generateUUID(),'name':_0x5af9fc[_0x42dff8(0x92)],'percentage':_0x5af9fc['percentage'],'next':_0x192231(_0x5af9fc[_0x42dff8(0x11f)])})),'next':_0x192231(_0x3ff647[_0x42dff8(0x11f)])};}case _0x42dff8(0x14c):return{'type':_0x42dff8(0xb4),'name':_0x3ea9c3[_0x42dff8(0x92)],'next':_0x192231(_0x3ea9c3['next'])};case _0x42dff8(0x14a):{const _0x1576b8=_0x3ea9c3,_0x5ad806=_0x1576b8[_0x42dff8(0xe6)]['target'],_0x1241f9=_0x5ad806[_0x42dff8(0xc0)],_0x55a0a3=_0x5ad806[_0x42dff8(0xc9)];let _0x49233f=_0x5ad806[_0x42dff8(0xc0)];_0x4e56f6?.[_0x42dff8(0xc2)]&&!/^\d+$/[_0x42dff8(0x113)](_0x49233f)&&(_0x49233f=await _0x4e56f6[_0x42dff8(0xc2)](_0x49233f));let _0x422c2d=_0x5ad806[_0x42dff8(0xc9)];_0x4e56f6?.[_0x42dff8(0xa1)]&&!/^\d+$/[_0x42dff8(0x113)](_0x422c2d)&&(_0x422c2d=await _0x4e56f6[_0x42dff8(0xa1)](_0x49233f,_0x422c2d));const _0x326f98=!/^\d+$/[_0x42dff8(0x113)](_0x1241f9)&&!isLocalJourneyRef(_0x1241f9)?formatApiJourneyName(_0x1241f9,_0x55a0a3):undefined;return{'type':_0x42dff8(0x90),'name':_0x1576b8['name'],'target':{'journeyId':_0x49233f,'journeyStageId':_0x422c2d,'journeyBundleId':_0x5ad806[_0x42dff8(0x8e)],'journeyName':_0x326f98,'confirmed':!![]},'next':_0x192231(_0x1576b8[_0x42dff8(0x11f)])};}case'end':return{'type':_0x42dff8(0x8f),'name':_0x3ea9c3[_0x42dff8(0x92)]};default:{const _0x44d835=_0x3ea9c3;return{'type':'End','name':_0x44d835[_0x42dff8(0x92)]};}}}export function toYamlString(_0x3ab4d1){const _0x9170c4=a147_0x4543,_0x18045c=stripInternalFields(_0x3ab4d1),_0x5b15e9=a147_0x3719d3[_0x9170c4(0xa9)](_0x18045c,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x3f90e8=['segments:',_0x9170c4(0x148),_0x9170c4(0x147),_0x9170c4(0xe0),'journeys:',_0x9170c4(0xac),_0x9170c4(0xe3)];let _0x2eea5e=_0x5b15e9;for(const _0x338255 of _0x3f90e8){_0x2eea5e=_0x2eea5e[_0x9170c4(0x107)](new RegExp('^('+_0x338255+')','m'),(_0xab3292,_0x3281af,_0x50eb4d)=>{if(_0x50eb4d===0x0||_0x2eea5e[_0x50eb4d-0x1]==='\x0a'&&_0x2eea5e[_0x50eb4d-0x2]==='\x0a')return _0x3281af;return'\x0a'+_0x3281af;});}return _0x2eea5e;}function stripInternalFields(_0x5f4957){const _0x41ac51=a147_0x4543,{id:_0x213a4e,folder_id:_0x49b693,bundle_id:_0x5bf6e7,bundle_name:_0x41e04e,version:_0x2648d0,allow_reentry:_0xc0e20b,..._0x39bd64}=_0x5f4957;return _0x39bd64[_0x41ac51(0x124)]&&(_0x39bd64['journeys']=_0x39bd64[_0x41ac51(0x124)][_0x41ac51(0x11b)](_0x4ea843=>{const _0xbd74c3=_0x41ac51,{id:_0x1f8fd1,..._0x3c58ec}=_0x4ea843;return{..._0x3c58ec,'stages':_0x3c58ec['stages'][_0xbd74c3(0x11b)](stripStageInternalFields),..._0x4ea843[_0xbd74c3(0xf8)]===!![]?{'latest':!![]}:{},..._0x39bd64['journeys'][_0xbd74c3(0x115)]===0x1&&_0x3c58ec[_0xbd74c3(0xbe)]==='v1'?{'version':undefined}:{}};})),_0x39bd64[_0x41ac51(0x12c)]&&(_0x39bd64[_0x41ac51(0x12c)]=_0x39bd64['stages'][_0x41ac51(0x11b)](stripStageInternalFields)),_0x39bd64[_0x41ac51(0x94)]&&(_0x39bd64[_0x41ac51(0x94)]=_0x39bd64[_0x41ac51(0x94)][_0x41ac51(0x11b)](_0x5f3eb0=>{const _0x30f11c=_0x41ac51,{id:_0x2f7053,..._0x5852be}=_0x5f3eb0;return{..._0x5852be,'stages':_0x5852be['stages'][_0x30f11c(0x11b)](stripStageInternalFields),..._0x5f3eb0[_0x30f11c(0xf8)]===!![]?{'latest':!![]}:{}};})),_0x39bd64;}function stripStageInternalFields(_0x170a1a){const {id:_0x271c56,..._0x5f0e14}=_0x170a1a;return _0x5f0e14;}export function parseYamlString(_0x55a555){return safeParseYaml(_0x55a555,JourneyDefSchema);}export function isJourneyDef(_0x4cdc79){const _0x355e02=a147_0x4543;return typeof _0x4cdc79===_0x355e02(0x95)&&_0x4cdc79!==null&&'type'in _0x4cdc79&&_0x4cdc79[_0x355e02(0xd2)]==='journey';}export function generateTemplate(_0xe9cae4,_0x4db760){const _0x30bbc6=a147_0x4543,_0x16ad52={'type':_0x30bbc6(0xc0),'name':_0xe9cae4,'description':_0x30bbc6(0xa7),'reentry':'no_reentry','goal':{'name':_0x30bbc6(0xb0),'segment':'goal-segment'},'stages':[{'name':'Stage\x201','description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0x4db760},'steps':[{'type':_0x30bbc6(0xd0),'name':_0x30bbc6(0x122),'with':{'duration':0x1,'unit':_0x30bbc6(0xb7)}},{'type':_0x30bbc6(0x125),'name':_0x30bbc6(0xad),'with':{'activation':'your-activation-name'}},{'type':_0x30bbc6(0xb2),'name':'Stage\x20Complete'}]}]};return toYamlString(_0x16ad52);}function generateUUID(){const _0x144025=a147_0x4543;return crypto[_0x144025(0xee)]();}export const SEGMENT_REF_PREFIX='ref:';export function parseSegmentRef(_0x495a90){const _0x1119d7=a147_0x4543;if(_0x495a90[_0x1119d7(0xde)](SEGMENT_REF_PREFIX))return{'type':_0x1119d7(0xa2),'name':_0x495a90[_0x1119d7(0xf7)](SEGMENT_REF_PREFIX[_0x1119d7(0x115)])};if(/^\d+$/[_0x1119d7(0x113)](_0x495a90))return{'type':'id','name':_0x495a90};return{'type':_0x1119d7(0x133),'name':_0x495a90};}export function makeSegmentRef(_0xd9e74c){return''+SEGMENT_REF_PREFIX+_0xd9e74c;}export function isExternalSegmentRef(_0x201b7e){return _0x201b7e['startsWith'](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x1c9b58){const _0x20876f=a147_0x4543;return!!(_0x1c9b58[_0x20876f(0x124)]&&_0x1c9b58['journeys'][_0x20876f(0x115)]>0x0);}export function isMultiVersionMode(_0x637986){const _0x3e4ffd=a147_0x4543;return!!(_0x637986['versions']&&_0x637986[_0x3e4ffd(0x94)][_0x3e4ffd(0x115)]>0x0);}export function isSingleVersionMode(_0x319bf1){const _0x27bb92=a147_0x4543;return!!(_0x319bf1[_0x27bb92(0x12c)]&&_0x319bf1['stages']['length']>0x0);}export function hasMultipleVersions(_0x46e919){const _0x5ef47f=a147_0x4543;if(isJourneysArrayMode(_0x46e919))return(_0x46e919[_0x5ef47f(0x124)]?.['length']||0x0)>0x1;if(isMultiVersionMode(_0x46e919))return(_0x46e919[_0x5ef47f(0x94)]?.[_0x5ef47f(0x115)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x1c8b22){const _0x204239=a147_0x4543;if(isJourneysArrayMode(_0x1c8b22))return _0x1c8b22;if(isSingleVersionMode(_0x1c8b22)){const {stages:_0x61c076,id:_0x3f0a68,version:_0x89b8cf,version_number:_0x52be6c,..._0x259ca2}=_0x1c8b22;return{..._0x259ca2,'journeys':[{'version':_0x89b8cf||'v1','stages':_0x61c076||[],'id':_0x3f0a68,'version_number':_0x52be6c}]};}if(isMultiVersionMode(_0x1c8b22)){const {versions:_0x4380d0,..._0x340521}=_0x1c8b22;return{..._0x340521,'journeys':(_0x4380d0||[])[_0x204239(0x11b)](_0x2a1ed6=>({'version':_0x2a1ed6['name'],'state':_0x2a1ed6[_0x204239(0xea)],'latest':_0x2a1ed6[_0x204239(0xf8)],'stages':_0x2a1ed6[_0x204239(0x12c)],'id':_0x2a1ed6['id'],'version_number':_0x2a1ed6[_0x204239(0xf6)]}))};}return _0x1c8b22;}export function normalizeJourneyDef(_0x7af486,_0x17a983){const _0x44d927=a147_0x4543,_0x42e385=normalizeToJourneysFormat(_0x7af486),_0x5d075e=_0x17a983?.['segments']?Object[_0x44d927(0xed)](_0x17a983[_0x44d927(0xaf)]):undefined,_0x2c8371=_0x17a983?.[_0x44d927(0xe2)]?Object['keys'](_0x17a983[_0x44d927(0xe2)]):undefined;return{'type':_0x44d927(0xc0),'name':_0x42e385[_0x44d927(0x92)],..._0x42e385[_0x44d927(0xa3)]!==undefined&&{'description':_0x42e385[_0x44d927(0xa3)]},..._0x42e385['goal']&&{'goal':normalizeJourneyCriteria(_0x42e385[_0x44d927(0x9c)])},..._0x42e385[_0x44d927(0x129)]!==undefined&&{'reentry':_0x42e385[_0x44d927(0x129)]},..._0x42e385[_0x44d927(0xaf)]&&{'segments':normalizeEmbeddedSegments(_0x42e385['segments'],_0x5d075e)},..._0x42e385['activations']&&{'activations':normalizeEmbeddedActivations(_0x42e385[_0x44d927(0xe2)],_0x2c8371)},..._0x42e385[_0x44d927(0x124)]&&{'journeys':_0x42e385['journeys'][_0x44d927(0x11b)](_0x873a62=>normalizeJourneyEntry(_0x873a62,_0x42e385['journeys'][_0x44d927(0x115)]===0x1))}};}function normalizeJourneyEntry(_0x422e35,_0x569582){const _0x18a02d=a147_0x4543;return{...!_0x569582&&_0x422e35[_0x18a02d(0xbe)]!==undefined&&{'version':_0x422e35[_0x18a02d(0xbe)]},..._0x422e35[_0x18a02d(0xea)]!==undefined&&{'state':_0x422e35[_0x18a02d(0xea)]},...!_0x569582&&_0x422e35[_0x18a02d(0xf8)]!==undefined&&{'latest':_0x422e35[_0x18a02d(0xf8)]},..._0x422e35['version_number']!==undefined&&{'version_number':_0x422e35[_0x18a02d(0xf6)]},..._0x422e35['goal']&&{'goal':normalizeJourneyCriteria(_0x422e35['goal'])},..._0x422e35[_0x18a02d(0x129)]!==undefined&&{'reentry':_0x422e35[_0x18a02d(0x129)]},'stages':_0x422e35[_0x18a02d(0x12c)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0x188336){const _0x27d0fc=a147_0x4543;return{'name':_0x188336[_0x27d0fc(0x92)],..._0x188336[_0x27d0fc(0xa3)]!==undefined&&{'description':_0x188336[_0x27d0fc(0xa3)]},..._0x188336[_0x27d0fc(0xd5)]&&{'entry_criteria':normalizeJourneyCriteria(_0x188336[_0x27d0fc(0xd5)])},..._0x188336[_0x27d0fc(0x123)]&&{'exit_criteria':_0x188336[_0x27d0fc(0x123)]['map'](normalizeJourneyCriteria)},..._0x188336[_0x27d0fc(0xa8)]&&{'milestone':normalizeJourneyCriteria(_0x188336[_0x27d0fc(0xa8)])},..._0x188336[_0x27d0fc(0xeb)]&&{'steps':normalizeStepsWithImplicitNext(_0x188336[_0x27d0fc(0xeb)])}};}function normalizeStepsWithImplicitNext(_0x132ff1){const _0x20a422=a147_0x4543;return _0x132ff1[_0x20a422(0x11b)]((_0x4bab0e,_0x209dd6)=>{const _0x33eaf7=_0x20a422,_0x190621=_0x209dd6<_0x132ff1[_0x33eaf7(0x115)]-0x1?_0x132ff1[_0x209dd6+0x1][_0x33eaf7(0x92)]:undefined;return normalizeJourneyStep(_0x4bab0e,_0x190621);});}function normalizeJourneyCriteria(_0x50680f){const _0x2b931a=a147_0x4543;return{'name':_0x50680f[_0x2b931a(0x92)],..._0x50680f[_0x2b931a(0xa3)]!==undefined&&{'description':_0x50680f[_0x2b931a(0xa3)]},'segment':_0x50680f[_0x2b931a(0xf5)],..._0x50680f[_0x2b931a(0x135)]&&{'target':normalizeJumpTarget(_0x50680f[_0x2b931a(0x135)])}};}function normalizeJourneyStep(_0x5c49c5,_0x5813d6){const _0x64ffd9=a147_0x4543,_0x3a6316=_0x5c49c5[_0x64ffd9(0x11f)]!==undefined&&_0x5c49c5[_0x64ffd9(0x11f)]!==_0x5813d6,_0x572a43={'type':_0x5c49c5['type'],'name':_0x5c49c5[_0x64ffd9(0x92)],..._0x3a6316&&{'next':_0x5c49c5['next']}};if(_0x64ffd9(0xe6)in _0x5c49c5&&_0x5c49c5['with'])return{..._0x572a43,'with':normalizeStepParams(_0x5c49c5['type'],_0x5c49c5[_0x64ffd9(0xe6)])};return _0x572a43;}function normalizeStepParams(_0x587a16,_0xb4ecfd){const _0x5dd966=a147_0x4543;switch(_0x587a16){case _0x5dd966(0xd0):{const _0x260c37=_0xb4ecfd;let _0x44a6cb;return _0x260c37[_0x5dd966(0x119)]&&(_0x44a6cb={'segment':_0x260c37[_0x5dd966(0x119)][_0x5dd966(0xf5)],..._0x260c37[_0x5dd966(0x119)]['next']!==undefined&&{'next':_0x260c37[_0x5dd966(0x119)][_0x5dd966(0x11f)]},..._0x260c37[_0x5dd966(0x119)]['timeout']&&{'timeout':{'duration':_0x260c37[_0x5dd966(0x119)][_0x5dd966(0xd7)][_0x5dd966(0x131)],'unit':_0x260c37['condition'][_0x5dd966(0xd7)][_0x5dd966(0x12e)],..._0x260c37[_0x5dd966(0x119)]['timeout'][_0x5dd966(0x11f)]!==undefined&&{'next':_0x260c37[_0x5dd966(0x119)]['timeout']['next']}}}}),{..._0x260c37[_0x5dd966(0x131)]!==undefined&&{'duration':_0x260c37[_0x5dd966(0x131)]},..._0x260c37['unit']!==undefined&&{'unit':_0x260c37[_0x5dd966(0x12e)]},..._0x260c37['wait_until']!==undefined&&{'wait_until':_0x260c37[_0x5dd966(0xe8)]},..._0x260c37[_0x5dd966(0xca)]!==undefined&&{'days_of_week':_0x260c37[_0x5dd966(0xca)]},..._0x44a6cb&&{'condition':_0x44a6cb}};}case _0x5dd966(0x125):{const _0x114229=_0xb4ecfd;return{'activation':_0x114229['activation']};}case _0x5dd966(0x10f):{const _0x352d02=_0xb4ecfd;return{'branches':_0x352d02[_0x5dd966(0x118)][_0x5dd966(0x11b)](normalizeDecisionBranch)};}case _0x5dd966(0xf0):{const _0x407110=_0xb4ecfd;return{..._0x407110[_0x5dd966(0x100)]!==undefined&&{'customized_split':_0x407110[_0x5dd966(0x100)]},..._0x407110['unique_id']!==undefined&&{'unique_id':_0x407110[_0x5dd966(0xb3)]},'variants':_0x407110[_0x5dd966(0xdd)][_0x5dd966(0x11b)](normalizeAbTestVariant)};}case'jump':{const _0x1252ff=_0xb4ecfd;return{'target':normalizeJumpTarget(_0x1252ff[_0x5dd966(0x135)])};}default:return _0xb4ecfd;}}function normalizeDecisionBranch(_0x57c03f){const _0x5b2144=a147_0x4543;return{'name':_0x57c03f[_0x5b2144(0x92)],..._0x57c03f[_0x5b2144(0xf5)]!==undefined&&{'segment':_0x57c03f[_0x5b2144(0xf5)]},..._0x57c03f[_0x5b2144(0x10e)]!==undefined&&{'excluded':_0x57c03f[_0x5b2144(0x10e)]},..._0x57c03f['next']!==undefined&&{'next':_0x57c03f[_0x5b2144(0x11f)]}};}function normalizeAbTestVariant(_0x54f03e){const _0x2a7070=a147_0x4543;return{..._0x54f03e['id']!==undefined&&{'id':_0x54f03e['id']},'name':_0x54f03e[_0x2a7070(0x92)],'percentage':_0x54f03e[_0x2a7070(0xe4)],..._0x54f03e[_0x2a7070(0x11f)]!==undefined&&{'next':_0x54f03e[_0x2a7070(0x11f)]}};}function normalizeJumpTarget(_0x2b63a7){const _0x46a710=a147_0x4543;return{'journey':_0x2b63a7[_0x46a710(0xc0)],'stage':_0x2b63a7[_0x46a710(0xc9)],..._0x2b63a7['bundle_id']!==undefined&&{'bundle_id':_0x2b63a7[_0x46a710(0x8e)]}};}function normalizeEmbeddedSegments(_0x28bcdf,_0x2faf7d){const _0x1b8585=a147_0x4543,_0x3328f6={},_0x2a1950=Object[_0x1b8585(0xed)](_0x28bcdf),_0x1ca058=_0x2faf7d?[..._0x2faf7d[_0x1b8585(0xb8)](_0x5113c7=>_0x2a1950[_0x1b8585(0xff)](_0x5113c7)),..._0x2a1950[_0x1b8585(0xb8)](_0x3f8563=>!_0x2faf7d[_0x1b8585(0xff)](_0x3f8563))[_0x1b8585(0x91)]()]:_0x2a1950[_0x1b8585(0x91)]();for(const _0x401454 of _0x1ca058){const _0x144f71=_0x28bcdf[_0x401454];if(_0x144f71[_0x1b8585(0x142)]){const _0x103830=_0x144f71[_0x1b8585(0x142)];if(_0x103830[_0x1b8585(0xd2)]!==_0x1b8585(0xbf)&&_0x103830[_0x1b8585(0xd2)]!=='Or'){const _0x3d90b0=_0x103830[_0x1b8585(0xd2)]??_0x1b8585(0xcb);throw new SDKError(ErrorCode[_0x1b8585(0x12f)],'Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27'+_0x401454+_0x1b8585(0x120)+(_0x1b8585(0x10a)+_0x3d90b0+_0x1b8585(0xe9))+_0x1b8585(0x12b)+_0x1b8585(0xc5)+'\x20\x20\x20\x20type:\x20And\x0a'+_0x1b8585(0x112)+_0x1b8585(0xda)+_0x1b8585(0xdf)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x103830['conditions']||!Array['isArray'](_0x103830['conditions']))throw new SDKError(ErrorCode[_0x1b8585(0x12f)],'Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27'+_0x401454+'\x27:\x20'+_0x1b8585(0x13b)+'Expected\x20format:\x0a'+'\x20\x20rule:\x0a'+('\x20\x20\x20\x20type:\x20'+_0x103830[_0x1b8585(0xd2)]+'\x0a')+_0x1b8585(0x112)+_0x1b8585(0xda)+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0x1b8585(0x105));}_0x3328f6[_0x401454]={..._0x144f71[_0x1b8585(0xa3)]&&_0x144f71[_0x1b8585(0xa3)]['trim']()&&{'description':_0x144f71[_0x1b8585(0xa3)]},..._0x144f71[_0x1b8585(0x142)]&&{'rule':deepSortObject(_0x144f71[_0x1b8585(0x142)])}};}return _0x3328f6;}function normalizeEmbeddedActivations(_0x2c0559,_0x3026b8){const _0x969a47=a147_0x4543,_0x11a455={},_0x5011ce=Object[_0x969a47(0xed)](_0x2c0559),_0x428fc5=_0x3026b8?[..._0x3026b8[_0x969a47(0xb8)](_0xb7fbd5=>_0x5011ce['includes'](_0xb7fbd5)),..._0x5011ce[_0x969a47(0xb8)](_0x44ae00=>!_0x3026b8[_0x969a47(0xff)](_0x44ae00))[_0x969a47(0x91)]()]:_0x5011ce['sort']();for(const _0x4d03e8 of _0x428fc5){const _0x2dc06f=_0x2c0559[_0x4d03e8];_0x11a455[_0x4d03e8]={'name':_0x2dc06f[_0x969a47(0x92)],'connection':_0x2dc06f['connection'],..._0x2dc06f[_0x969a47(0xa3)]!==undefined&&{'description':_0x2dc06f[_0x969a47(0xa3)]},..._0x2dc06f[_0x969a47(0xb1)]!==undefined&&{'all_columns':_0x2dc06f[_0x969a47(0xb1)]},..._0x2dc06f[_0x969a47(0x108)]!==undefined&&{'columns':_0x2dc06f[_0x969a47(0x108)]},..._0x2dc06f[_0x969a47(0x127)]!==undefined&&{'behavior':_0x2dc06f[_0x969a47(0x127)]},..._0x2dc06f['schedule']!==undefined&&{'schedule':_0x2dc06f[_0x969a47(0xc4)]},..._0x2dc06f[_0x969a47(0x13f)]!==undefined&&{'notification':_0x2dc06f[_0x969a47(0x13f)]},..._0x2dc06f[_0x969a47(0xe5)]!==undefined&&{'connector_config':_0x2dc06f['connector_config']},..._0x2dc06f['activation_template_id']!==undefined&&{'activation_template_id':_0x2dc06f[_0x969a47(0x149)]}};}return _0x11a455;}export function getActiveStages(_0x3e6468){const _0x4d7ef5=a147_0x4543;if(isJourneysArrayMode(_0x3e6468)){const _0x455d2f=_0x3e6468[_0x4d7ef5(0x124)]||[],_0x15fcf1=_0x455d2f[_0x4d7ef5(0x9a)](_0x4e6551=>_0x4e6551[_0x4d7ef5(0xf8)]===!![])||_0x455d2f[0x0];return _0x15fcf1?.[_0x4d7ef5(0x12c)]||[];}if(isSingleVersionMode(_0x3e6468))return _0x3e6468['stages']||[];if(isMultiVersionMode(_0x3e6468)){const _0x1d84d9=_0x3e6468[_0x4d7ef5(0x94)]||[],_0x4fece2=_0x1d84d9[_0x4d7ef5(0x9a)](_0x5ec480=>_0x5ec480[_0x4d7ef5(0xf8)]===!![])||_0x1d84d9[0x0];return _0x4fece2?.[_0x4d7ef5(0x12c)]||[];}return[];}export function getLatestJourneyEntry(_0x37af2e){const _0x2df6b2=a147_0x4543;if(isJourneysArrayMode(_0x37af2e)){const _0x44c53b=_0x37af2e[_0x2df6b2(0x124)]||[];return _0x44c53b[_0x2df6b2(0x9a)](_0x1511c8=>_0x1511c8[_0x2df6b2(0xf8)]===!![])||_0x44c53b[0x0];}if(isMultiVersionMode(_0x37af2e)){const _0x485ba0=_0x37af2e[_0x2df6b2(0x94)]||[],_0x5a44c8=_0x485ba0['find'](_0x1ac793=>_0x1ac793[_0x2df6b2(0xf8)]===!![])||_0x485ba0[0x0];if(_0x5a44c8)return{'version':_0x5a44c8[_0x2df6b2(0x92)],'state':_0x5a44c8['state'],'latest':_0x5a44c8[_0x2df6b2(0xf8)],'stages':_0x5a44c8[_0x2df6b2(0x12c)],'id':_0x5a44c8['id'],'version_number':_0x5a44c8[_0x2df6b2(0xf6)]};}if(isSingleVersionMode(_0x37af2e))return{'version':_0x37af2e[_0x2df6b2(0xbe)]||'v1','state':_0x2df6b2(0x10d),'stages':_0x37af2e[_0x2df6b2(0x12c)]||[],'id':_0x37af2e['id'],'version_number':_0x37af2e[_0x2df6b2(0xf6)],'goal':_0x37af2e[_0x2df6b2(0x9c)],'reentry':_0x37af2e[_0x2df6b2(0x129)]};return undefined;}export function getLatestVersion(_0x4db926){const _0x4d3a3a=a147_0x4543;if(!isMultiVersionMode(_0x4db926))return undefined;const _0x4ebadc=_0x4db926['versions']||[];return _0x4ebadc['find'](_0x57783a=>_0x57783a[_0x4d3a3a(0xf8)]===!![])||_0x4ebadc[0x0];}export function getEffectiveGoal(_0x34fcee){const _0x582f55=getLatestJourneyEntry(_0x34fcee);return _0x582f55?.['goal']||_0x34fcee['goal'];}export function getEffectiveReentry(_0x3c964c){const _0xa3a397=a147_0x4543,_0x4c56a1=getLatestJourneyEntry(_0x3c964c);return _0x4c56a1?.[_0xa3a397(0x129)]||_0x3c964c[_0xa3a397(0x129)];}export function collectSegmentRefs(_0x5191d1){const _0x5a21c6=a147_0x4543,_0xce8dc1=new Set();_0x5191d1[_0x5a21c6(0x9c)]?.[_0x5a21c6(0xf5)]&&_0xce8dc1[_0x5a21c6(0x126)](_0x5191d1[_0x5a21c6(0x9c)][_0x5a21c6(0xf5)]);const _0x5d4a1c=_0x2bfd54=>{const _0x5b61be=_0x5a21c6;for(const _0x1d7a5b of _0x2bfd54){_0x1d7a5b[_0x5b61be(0xd5)]?.[_0x5b61be(0xf5)]&&_0xce8dc1[_0x5b61be(0x126)](_0x1d7a5b[_0x5b61be(0xd5)][_0x5b61be(0xf5)]);if(_0x1d7a5b[_0x5b61be(0x123)])for(const _0x2340e7 of _0x1d7a5b[_0x5b61be(0x123)]){_0x2340e7['segment']&&_0xce8dc1['add'](_0x2340e7[_0x5b61be(0xf5)]);}_0x1d7a5b[_0x5b61be(0xa8)]?.[_0x5b61be(0xf5)]&&_0xce8dc1['add'](_0x1d7a5b[_0x5b61be(0xa8)][_0x5b61be(0xf5)]);if(_0x1d7a5b['steps'])for(const _0x53ade4 of _0x1d7a5b[_0x5b61be(0xeb)]){if(_0x53ade4[_0x5b61be(0xd2)]===_0x5b61be(0x10f)){const _0x1860ef=_0x53ade4;for(const _0x35b8b4 of _0x1860ef['with'][_0x5b61be(0x118)]){_0x35b8b4[_0x5b61be(0xf5)]&&_0xce8dc1['add'](_0x35b8b4[_0x5b61be(0xf5)]);}}else{if(_0x53ade4[_0x5b61be(0xd2)]===_0x5b61be(0xd0)){const _0x440aaf=_0x53ade4;_0x440aaf[_0x5b61be(0xe6)][_0x5b61be(0x119)]?.[_0x5b61be(0xf5)]&&_0xce8dc1[_0x5b61be(0x126)](_0x440aaf[_0x5b61be(0xe6)][_0x5b61be(0x119)][_0x5b61be(0xf5)]);}}}}};_0x5191d1[_0x5a21c6(0x12c)]&&_0x5d4a1c(_0x5191d1[_0x5a21c6(0x12c)]);if(_0x5191d1['versions'])for(const _0x329675 of _0x5191d1[_0x5a21c6(0x94)]){_0x5d4a1c(_0x329675[_0x5a21c6(0x12c)]);}return _0xce8dc1;}export function validateSegmentRefs(_0x2b5088){const _0x343ebc=a147_0x4543,_0x292529=[],_0x1ee138=collectSegmentRefs(_0x2b5088),_0x5865c3=new Set(Object['keys'](_0x2b5088['segments']||{}));for(const _0x3baab1 of _0x1ee138){const _0x13a5b1=parseSegmentRef(_0x3baab1);_0x13a5b1[_0x343ebc(0xd2)]===_0x343ebc(0x133)&&!_0x5865c3[_0x343ebc(0xbc)](_0x13a5b1[_0x343ebc(0x92)])&&_0x292529[_0x343ebc(0xb5)](_0x343ebc(0xd8)+_0x13a5b1[_0x343ebc(0x92)]+_0x343ebc(0x139)+_0x13a5b1['name']+_0x343ebc(0x9f));}return _0x292529;}export function collectSegmentIdsFromJourneyApi(_0x3e207e){const _0x1baab8=a147_0x4543,_0x3e9e53=new Set();_0x3e207e[_0x1baab8(0x137)][_0x1baab8(0x9c)]?.['segmentId']&&_0x3e9e53[_0x1baab8(0x126)](_0x3e207e[_0x1baab8(0x137)][_0x1baab8(0x9c)]['segmentId']);const _0x52a244=_0x3e207e[_0x1baab8(0x137)][_0x1baab8(0xb9)];if(Array[_0x1baab8(0xa0)](_0x52a244))for(const _0x3820c4 of _0x52a244){_0x3820c4[_0x1baab8(0xec)]?.[_0x1baab8(0xa4)]&&_0x3e9e53[_0x1baab8(0x126)](_0x3820c4[_0x1baab8(0xec)]['segmentId']);const _0xce0530=_0x3820c4[_0x1baab8(0xa6)]??_0x3820c4[_0x1baab8(0x97)];if(Array['isArray'](_0xce0530))for(const _0x255c6a of _0xce0530){_0x255c6a[_0x1baab8(0xa4)]&&_0x3e9e53['add'](_0x255c6a[_0x1baab8(0xa4)]);}_0x3820c4[_0x1baab8(0xa8)]?.[_0x1baab8(0xa4)]&&_0x3e9e53[_0x1baab8(0x126)](_0x3820c4['milestone'][_0x1baab8(0xa4)]);if(_0x3820c4[_0x1baab8(0xeb)]&&typeof _0x3820c4[_0x1baab8(0xeb)]==='object'){const _0x97dbfa=Array[_0x1baab8(0xa0)](_0x3820c4['steps'])?_0x3820c4[_0x1baab8(0xeb)]:Object[_0x1baab8(0xbd)](_0x3820c4['steps']);for(const _0x1d8a86 of _0x97dbfa){_0x1d8a86[_0x1baab8(0xc8)]?.[_0x1baab8(0xa4)]&&_0x3e9e53[_0x1baab8(0x126)](_0x1d8a86['waitCondition']['segmentId']);const _0x3b915d=_0x1d8a86;_0x3b915d[_0x1baab8(0x11c)]&&_0x3e9e53[_0x1baab8(0x126)](_0x3b915d[_0x1baab8(0x11c)]);if(Array[_0x1baab8(0xa0)](_0x3b915d[_0x1baab8(0x140)]))for(const _0x19f2d2 of _0x3b915d[_0x1baab8(0x140)]){_0x19f2d2[_0x1baab8(0xa4)]&&_0x3e9e53['add'](_0x19f2d2[_0x1baab8(0xa4)]);}if(Array[_0x1baab8(0xa0)](_0x1d8a86['branches']))for(const _0x531f93 of _0x1d8a86[_0x1baab8(0x118)]){_0x531f93['segmentId']&&_0x3e9e53[_0x1baab8(0x126)](_0x531f93[_0x1baab8(0xa4)]);}}}}return _0x3e9e53;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a148_0x2f98e1=a148_0x2c34;function a148_0x4274(){const _0x49c18=['source','attributes','parent_key','60386xBfZTE','\x20m\x0a','5tIanJC','\x0aSELECT\x20m.','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','\x0aLIMIT\x20','columns','137010fHFGVX','3812094NwBmfp','\x0a\x20\x20ON\x20m.','136xuEtvh',')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20','toLowerCase','label','database','\x27)\x0aLIMIT\x20','\x20m\x0aLEFT\x20JOIN\x20','find','45TyHKov','\x20LIMIT\x200','-1d','\x20=\x20a.','b.*','LEFT\x20JOIN\x20','\x0aLIMIT\x200\x0a','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','\x20LIMIT\x20','\x20a\x0a\x20\x20ON\x20m.','join','forEach','test','all_columns','\x20=\x20b.','child_key','master','1313088YZrOVI','(all\x20columns)','column','SELECT\x20*\x20FROM\x20','\x20b\x0a\x20\x20ON\x20m.','128814mbuTYx','\x20m\x0aJOIN\x20','trim','name','length','map','push','m.*','\x0aFROM\x20','\x20IS\x20NOT\x20NULL\x0a','\x0aWHERE\x20a.','861410sudgAp','414180opauDE','\x20FROM\x20','\x27)\x0a','table'];a148_0x4274=function(){return _0x49c18;};return a148_0x4274();}function a148_0x2c34(_0x25fa0c,_0x1f59a2){_0x25fa0c=_0x25fa0c-0xb2;const _0x427459=a148_0x4274();let _0x2c345e=_0x427459[_0x25fa0c];return _0x2c345e;}(function(_0x3d428c,_0x152c4a){const _0x45556a=a148_0x2c34,_0x9a5e3f=_0x3d428c();while(!![]){try{const _0x558c8e=parseInt(_0x45556a(0xcc))/0x1+parseInt(_0x45556a(0xc4))/0x2*(parseInt(_0x45556a(0xd7))/0x3)+parseInt(_0x45556a(0xbd))/0x4*(parseInt(_0x45556a(0xc6))/0x5)+parseInt(_0x45556a(0xe8))/0x6+-parseInt(_0x45556a(0xed))/0x7*(parseInt(_0x45556a(0xcf))/0x8)+-parseInt(_0x45556a(0xcd))/0x9+parseInt(_0x45556a(0xbc))/0xa;if(_0x558c8e===_0x152c4a)break;else _0x9a5e3f['push'](_0x9a5e3f['shift']());}catch(_0x1aaf2d){_0x9a5e3f['push'](_0x9a5e3f['shift']());}}}(a148_0x4274,0x3ff97));export const DEFAULT_TIME_RANGE=a148_0x2f98e1(0xd9);export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x410c39,_0x3fc41e,_0x409c29){const _0x3c2485=a148_0x2f98e1,_0x41b590=_0x409c29&&_0x409c29[_0x3c2485(0xb5)]>0x0?_0x409c29['join'](',\x20'):'*';return'SELECT\x20'+_0x41b590+_0x3c2485(0xbe)+_0x410c39+'.'+_0x3fc41e+_0x3c2485(0xd8);}export function generateMasterCountSQL(_0x48074e){const _0xe3dbff=a148_0x2f98e1,{database:_0x4580c9,table:_0x5892b9}=_0x48074e[_0xe3dbff(0xe7)];return _0xe3dbff(0xc8)+_0x4580c9+'.'+_0x5892b9;}export function generateMasterSampleSQL(_0x388105,_0x322556=0x5){const _0x240dd4=a148_0x2f98e1,{database:_0x2f5349,table:_0x2993fe}=_0x388105[_0x240dd4(0xe7)];return _0x240dd4(0xeb)+_0x2f5349+'.'+_0x2993fe+_0x240dd4(0xdf)+_0x322556;}export function generateAttributeCoverageSQL(_0x36d68c,_0x235238){const _0x2d3e26=a148_0x2f98e1,_0x5c437e=_0x36d68c[_0x2d3e26(0xe7)];return('\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20'+_0x5c437e[_0x2d3e26(0xd3)]+'.'+_0x5c437e[_0x2d3e26(0xc0)]+_0x2d3e26(0xd5)+_0x235238['source'][_0x2d3e26(0xd3)]+'.'+_0x235238[_0x2d3e26(0xc1)]['table']+'\x20a\x0a\x20\x20ON\x20m.'+_0x235238['join']['parent_key']+'\x20=\x20a.'+_0x235238['join'][_0x2d3e26(0xe6)]+_0x2d3e26(0xbb)+_0x235238[_0x2d3e26(0xe1)][_0x2d3e26(0xe6)]+_0x2d3e26(0xba))[_0x2d3e26(0xb3)]();}export function generateBehaviorStatsSQL(_0xb7c355,_0x42c91b,_0x4a0c6c=DEFAULT_TIME_RANGE){const _0x1d9206=a148_0x2f98e1,_0x5c9701=_0xb7c355['master'];return(_0x1d9206(0xde)+_0x42c91b[_0x1d9206(0xe1)]['parent_key']+_0x1d9206(0xd0)+_0x5c9701[_0x1d9206(0xd3)]+'.'+_0x5c9701[_0x1d9206(0xc0)]+_0x1d9206(0xb2)+_0x42c91b[_0x1d9206(0xc1)][_0x1d9206(0xd3)]+'.'+_0x42c91b[_0x1d9206(0xc1)][_0x1d9206(0xc0)]+_0x1d9206(0xec)+_0x42c91b[_0x1d9206(0xe1)][_0x1d9206(0xc3)]+_0x1d9206(0xe5)+_0x42c91b[_0x1d9206(0xe1)][_0x1d9206(0xe6)]+'\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27'+_0x4a0c6c+_0x1d9206(0xbf))['trim']();}export function generateAttributeSampleSQL(_0x5875cc,_0x3e3e27,_0x24099f=0x5){const _0x3f8b11=a148_0x2f98e1,_0x51ebef=_0x5875cc[_0x3f8b11(0xe7)],_0x26f213=_0x3e3e27[_0x3f8b11(0xe1)][_0x3f8b11(0xc3)],_0x27a28a=_0x3e3e27['columns'][_0x3f8b11(0xb6)](_0x434292=>'a.'+_0x434292[_0x3f8b11(0xea)])[_0x3f8b11(0xe1)](',\x20');return(_0x3f8b11(0xc7)+_0x26f213+',\x20'+_0x27a28a+_0x3f8b11(0xb9)+_0x51ebef[_0x3f8b11(0xd3)]+'.'+_0x51ebef[_0x3f8b11(0xc0)]+_0x3f8b11(0xb2)+_0x3e3e27[_0x3f8b11(0xc1)][_0x3f8b11(0xd3)]+'.'+_0x3e3e27[_0x3f8b11(0xc1)][_0x3f8b11(0xc0)]+_0x3f8b11(0xe0)+_0x3e3e27[_0x3f8b11(0xe1)]['parent_key']+'\x20=\x20a.'+_0x3e3e27[_0x3f8b11(0xe1)][_0x3f8b11(0xe6)]+_0x3f8b11(0xca)+_0x24099f+'\x0a')[_0x3f8b11(0xb3)]();}export function generateBehaviorSampleSQL(_0x2b2367,_0x26d88c,_0x4d9a80=0x5,_0x8d59fa=DEFAULT_TIME_RANGE){const _0x4703e7=a148_0x2f98e1,_0x103705=_0x2b2367[_0x4703e7(0xe7)],_0x7a8e06=_0x26d88c[_0x4703e7(0xe1)][_0x4703e7(0xc3)];let _0x168005;if(_0x26d88c['all_columns'])_0x168005=_0x4703e7(0xdb);else _0x26d88c[_0x4703e7(0xcb)]&&_0x26d88c[_0x4703e7(0xcb)]['length']>0x0?_0x168005=_0x26d88c[_0x4703e7(0xcb)][_0x4703e7(0xb6)](_0x2a7630=>'b.'+_0x2a7630[_0x4703e7(0xea)])[_0x4703e7(0xe1)](',\x20'):_0x168005='b.*';return(_0x4703e7(0xc7)+_0x7a8e06+',\x20'+_0x168005+_0x4703e7(0xb9)+_0x103705['database']+'.'+_0x103705[_0x4703e7(0xc0)]+'\x20m\x0aJOIN\x20'+_0x26d88c[_0x4703e7(0xc1)][_0x4703e7(0xd3)]+'.'+_0x26d88c[_0x4703e7(0xc1)]['table']+'\x20b\x0a\x20\x20ON\x20m.'+_0x26d88c[_0x4703e7(0xe1)][_0x4703e7(0xc3)]+_0x4703e7(0xe5)+_0x26d88c[_0x4703e7(0xe1)][_0x4703e7(0xe6)]+_0x4703e7(0xc9)+_0x8d59fa+_0x4703e7(0xd4)+_0x4d9a80+'\x0a')[_0x4703e7(0xb3)]();}function quoteIdentifier(_0x469e8b){const _0xae7dc4=a148_0x2f98e1;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/[_0xae7dc4(0xe3)](_0x469e8b))return'\x22'+_0x469e8b['replace'](/"/g,'\x22\x22')+'\x22';return _0x469e8b;}export function generateEnrichedSQL(_0x554a06,_0xb31a7c=0x5){const _0x64bdbd=a148_0x2f98e1,_0x12e852=_0x554a06['master'],_0x75083f=_0x554a06['attributes']||[];if(_0x75083f[_0x64bdbd(0xb5)]===0x0)return _0x64bdbd(0xeb)+_0x12e852[_0x64bdbd(0xd3)]+'.'+_0x12e852[_0x64bdbd(0xc0)]+_0x64bdbd(0xdf)+_0xb31a7c;const _0x5ebf91=[_0x64bdbd(0xb8)],_0x2cfd09=[];return _0x75083f[_0x64bdbd(0xe2)]((_0x546ed5,_0x22f8b9)=>{const _0x300a34=_0x64bdbd,_0x1361cf='a'+_0x22f8b9;_0x546ed5[_0x300a34(0xcb)][_0x300a34(0xe2)](_0x1c1cce=>{const _0x5283f6=_0x300a34,_0x3add6a=quoteIdentifier(_0x1c1cce[_0x5283f6(0xd2)]||_0x1c1cce[_0x5283f6(0xea)]);_0x5ebf91[_0x5283f6(0xb7)](_0x1361cf+'.'+_0x1c1cce['column']+'\x20AS\x20'+_0x3add6a);}),_0x2cfd09[_0x300a34(0xb7)](_0x300a34(0xdc)+_0x546ed5[_0x300a34(0xc1)][_0x300a34(0xd3)]+'.'+_0x546ed5[_0x300a34(0xc1)][_0x300a34(0xc0)]+'\x20'+_0x1361cf+_0x300a34(0xce)+_0x546ed5[_0x300a34(0xe1)][_0x300a34(0xc3)]+'\x20=\x20'+_0x1361cf+'.'+_0x546ed5[_0x300a34(0xe1)][_0x300a34(0xe6)]);}),('\x0aSELECT\x20'+_0x5ebf91[_0x64bdbd(0xe1)](',\x20')+'\x0aFROM\x20'+_0x12e852['database']+'.'+_0x12e852[_0x64bdbd(0xc0)]+_0x64bdbd(0xc5)+_0x2cfd09['join']('\x0a')+_0x64bdbd(0xca)+_0xb31a7c+'\x0a')[_0x64bdbd(0xb3)]();}export function generateAttributeSchemaSQL(_0x2061ec,_0x30044f){const _0x297430=a148_0x2f98e1,_0x9017e9=_0x2061ec[_0x297430(0xe7)],_0x508b47=_0x30044f['join']['parent_key'],_0x30b8dd=_0x30044f[_0x297430(0xcb)][_0x297430(0xb6)](_0x159456=>'a.'+_0x159456[_0x297430(0xea)])[_0x297430(0xe1)](',\x20');return(_0x297430(0xc7)+_0x508b47+',\x20'+_0x30b8dd+_0x297430(0xb9)+_0x9017e9[_0x297430(0xd3)]+'.'+_0x9017e9[_0x297430(0xc0)]+_0x297430(0xb2)+_0x30044f[_0x297430(0xc1)]['database']+'.'+_0x30044f[_0x297430(0xc1)]['table']+_0x297430(0xe0)+_0x30044f[_0x297430(0xe1)][_0x297430(0xc3)]+_0x297430(0xda)+_0x30044f[_0x297430(0xe1)][_0x297430(0xe6)]+_0x297430(0xdd))[_0x297430(0xb3)]();}export function generateBehaviorSchemaSQL(_0x2c8455,_0x1602de){const _0x3a2b67=a148_0x2f98e1,_0x4387d2=_0x2c8455[_0x3a2b67(0xe7)],_0x25bd51=_0x1602de[_0x3a2b67(0xe1)][_0x3a2b67(0xc3)];let _0x31c5d7;if(_0x1602de[_0x3a2b67(0xe4)])_0x31c5d7=_0x3a2b67(0xdb);else _0x1602de[_0x3a2b67(0xcb)]&&_0x1602de['columns']['length']>0x0?_0x31c5d7=_0x1602de[_0x3a2b67(0xcb)]['map'](_0x2cff8e=>'b.'+_0x2cff8e['column'])[_0x3a2b67(0xe1)](',\x20'):_0x31c5d7=_0x3a2b67(0xdb);return(_0x3a2b67(0xc7)+_0x25bd51+',\x20'+_0x31c5d7+_0x3a2b67(0xb9)+_0x4387d2[_0x3a2b67(0xd3)]+'.'+_0x4387d2[_0x3a2b67(0xc0)]+_0x3a2b67(0xb2)+_0x1602de[_0x3a2b67(0xc1)][_0x3a2b67(0xd3)]+'.'+_0x1602de[_0x3a2b67(0xc1)][_0x3a2b67(0xc0)]+_0x3a2b67(0xec)+_0x1602de[_0x3a2b67(0xe1)][_0x3a2b67(0xc3)]+_0x3a2b67(0xe5)+_0x1602de[_0x3a2b67(0xe1)]['child_key']+'\x0aLIMIT\x200\x0a')['trim']();}export function getAttributeColumns(_0x5dbe14){const _0x4005a7=a148_0x2f98e1;return _0x5dbe14['columns'][_0x4005a7(0xb6)](_0x52fd2e=>({'label':_0x52fd2e[_0x4005a7(0xd2)]||_0x52fd2e[_0x4005a7(0xea)],'column':_0x52fd2e[_0x4005a7(0xea)]}));}export function getBehaviorColumns(_0x444789){const _0x12aed6=a148_0x2f98e1;if(_0x444789['all_columns'])return[{'label':_0x12aed6(0xe9),'column':'*'}];if(_0x444789['columns']&&_0x444789[_0x12aed6(0xcb)][_0x12aed6(0xb5)]>0x0)return _0x444789['columns'][_0x12aed6(0xb6)](_0x34755b=>({'label':_0x34755b[_0x12aed6(0xd2)]||_0x34755b[_0x12aed6(0xea)],'column':_0x34755b[_0x12aed6(0xea)]}));return[{'label':_0x12aed6(0xe9),'column':'*'}];}export function findAttributeByName(_0x50c80d,_0x2d1698){const _0xd4254e=a148_0x2f98e1;return _0x50c80d[_0xd4254e(0xc2)]?.[_0xd4254e(0xd6)](_0x497031=>_0x497031['name']['toLowerCase']()===_0x2d1698[_0xd4254e(0xd1)]());}export function findBehaviorByName(_0x2a2852,_0x3af079){const _0x3036f2=a148_0x2f98e1;return _0x2a2852['behaviors']?.[_0x3036f2(0xd6)](_0xa375e4=>_0xa375e4[_0x3036f2(0xb4)][_0x3036f2(0xd1)]()===_0x3af079[_0x3036f2(0xd1)]());}
|