@treasuredata/tdx 2026.8.3 → 2026.8.4
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.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/p13n-command.d.ts +11 -0
- package/dist/commands/p13n-command.d.ts.map +1 -0
- package/dist/commands/p13n-command.js +1 -0
- package/dist/commands/p13n-command.js.map +1 -0
- 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-move-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/table-deleted.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.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +9 -1
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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/site-mismatch.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.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +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/auth-token.d.ts +42 -6
- package/dist/sdk/auth-token.d.ts.map +1 -1
- package/dist/sdk/auth-token.js +1 -1
- package/dist/sdk/auth-token.js.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.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/cas/validate-files.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.d.ts +6 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +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.d.ts +11 -2
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/oauth-refresh.js.map +1 -1
- package/dist/sdk/client/p13n-studio-api-client.d.ts +19 -0
- package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -0
- package/dist/sdk/client/p13n-studio-api-client.js +1 -0
- package/dist/sdk/client/p13n-studio-api-client.js.map +1 -0
- 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/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.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/always-on-campaign-schema.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.d.ts +6 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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/llm/user-settings.js +1 -1
- package/dist/sdk/p13n-studio.d.ts +13 -0
- package/dist/sdk/p13n-studio.d.ts.map +1 -0
- package/dist/sdk/p13n-studio.js +1 -0
- package/dist/sdk/p13n-studio.js.map +1 -0
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js.map +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.d.ts +2 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/p13n-studio.d.ts +18 -0
- package/dist/sdk/types/p13n-studio.d.ts.map +1 -0
- package/dist/sdk/types/p13n-studio.js +1 -0
- package/dist/sdk/types/p13n-studio.js.map +1 -0
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.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/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.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/proxy-fetch.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(
|
|
1
|
+
function a164_0x1688(){const _0x3d21ec=['.yaml','isFile','4450663JEAjwd','1039378KiPrXk','toLowerCase','endsWith','push','604moXlNL','join','dirname','.yml','1218390euiEPE','165SQqscy','extname','map','602850JXJciK','6rsmbuP','isDirectory','relative','16miCMpY','2820987eAijTd','719185FbOKbC','name','453zrAWzj'];a164_0x1688=function(){return _0x3d21ec;};return a164_0x1688();}(function(_0x5f4c32,_0x190a1a){const _0x2b4e67=a164_0x4118,_0x43df4b=_0x5f4c32();while(!![]){try{const _0x42c6ae=-parseInt(_0x2b4e67(0x176))/0x1+-parseInt(_0x2b4e67(0x17c))/0x2+parseInt(_0x2b4e67(0x178))/0x3*(-parseInt(_0x2b4e67(0x180))/0x4)+parseInt(_0x2b4e67(0x170))/0x5+-parseInt(_0x2b4e67(0x171))/0x6*(-parseInt(_0x2b4e67(0x17b))/0x7)+-parseInt(_0x2b4e67(0x174))/0x8*(parseInt(_0x2b4e67(0x175))/0x9)+parseInt(_0x2b4e67(0x16c))/0xa*(parseInt(_0x2b4e67(0x16d))/0xb);if(_0x42c6ae===_0x190a1a)break;else _0x43df4b['push'](_0x43df4b['shift']());}catch(_0x50c0ee){_0x43df4b['push'](_0x43df4b['shift']());}}}(a164_0x1688,0xa9c6b));import{readdirSync,statSync}from'fs';function a164_0x4118(_0x2cce87,_0x5df1b1){_0x2cce87=_0x2cce87-0x169;const _0x16883f=a164_0x1688();let _0x411815=_0x16883f[_0x2cce87];return _0x411815;}import a164_0x13a5bb from'path';export function findYamlFiles(_0xabb5df){const _0x26ec05=[];function _0x3a118f(_0x1b46f0){const _0x51fbc4=a164_0x4118,_0x364c19=readdirSync(_0x1b46f0,{'withFileTypes':!![]});for(const _0x5045cd of _0x364c19){const _0x1f278a=a164_0x13a5bb[_0x51fbc4(0x169)](_0x1b46f0,_0x5045cd[_0x51fbc4(0x177)]);if(_0x5045cd[_0x51fbc4(0x172)]())_0x3a118f(_0x1f278a);else(_0x5045cd['name']['endsWith'](_0x51fbc4(0x16b))||_0x5045cd['name'][_0x51fbc4(0x17e)](_0x51fbc4(0x179)))&&_0x26ec05[_0x51fbc4(0x17f)](_0x1f278a);}}return _0x3a118f(_0xabb5df),_0x26ec05;}export function discoverYamlFiles(_0x4016d8){const _0x218c3c=a164_0x4118,_0xa95640=findYamlFiles(_0x4016d8);return _0xa95640[_0x218c3c(0x16f)](_0x3faaf3=>{const _0x41568d=_0x218c3c,_0x34cba6=a164_0x13a5bb[_0x41568d(0x173)](_0x4016d8,_0x3faaf3),_0x3653a2=a164_0x13a5bb[_0x41568d(0x16a)](_0x34cba6);return{'absolutePath':_0x3faaf3,'relativePath':_0x34cba6,'folderPath':_0x3653a2==='.'?'':_0x3653a2['replace'](/\\/g,'/')};});}export function isYamlFile(_0x16013){const _0x27ef0c=a164_0x4118;try{const _0x414740=statSync(_0x16013);if(!_0x414740[_0x27ef0c(0x17a)]())return![];const _0x310bed=a164_0x13a5bb[_0x27ef0c(0x16e)](_0x16013)[_0x27ef0c(0x17d)]();return _0x310bed===_0x27ef0c(0x16b)||_0x310bed==='.yaml';}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2189b6,_0x57cbb3){const _0x59ba62=a162_0x4fd9,_0xbd9a1a=_0x2189b6();while(!![]){try{const _0x5e0598=-parseInt(_0x59ba62(0x22f))/0x1+-parseInt(_0x59ba62(0x1fc))/0x2*(parseInt(_0x59ba62(0x223))/0x3)+parseInt(_0x59ba62(0x22c))/0x4+-parseInt(_0x59ba62(0x1ea))/0x5*(parseInt(_0x59ba62(0x1ed))/0x6)+-parseInt(_0x59ba62(0x202))/0x7*(parseInt(_0x59ba62(0x1dd))/0x8)+-parseInt(_0x59ba62(0x1de))/0x9*(-parseInt(_0x59ba62(0x204))/0xa)+parseInt(_0x59ba62(0x227))/0xb*(parseInt(_0x59ba62(0x1ef))/0xc);if(_0x5e0598===_0x57cbb3)break;else _0xbd9a1a['push'](_0xbd9a1a['shift']());}catch(_0x32e2e3){_0xbd9a1a['push'](_0xbd9a1a['shift']());}}}(a162_0x302b,0x3fe4b));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0xb210f2){const _0x1c81d7=a162_0x4fd9;return _0xb210f2[_0x1c81d7(0x1f6)]()[_0x1c81d7(0x205)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x1c81d7(0x205)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x14cd66){const _0x1dd9a8=a162_0x4fd9,_0x2f22f4=_0x14cd66['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2f22f4){const _0x462157=_0x2f22f4[0x1][_0x1dd9a8(0x1f6)](),_0x2e4829=_0x2f22f4[0x2],_0xd66a9d=_0x2e4829[_0x1dd9a8(0x205)](/-/g,'')[_0x1dd9a8(0x229)](0x0,0x4)[_0x1dd9a8(0x1f6)]();return _0x462157+'_'+_0xd66a9d;}const _0x297201=_0x14cd66[_0x1dd9a8(0x201)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x297201){const _0x542fdd=_0x297201[0x1],_0x4c7e24=_0x297201[0x2][_0x1dd9a8(0x1f6)](),_0x2698cc=_0x542fdd[_0x1dd9a8(0x205)](/-/g,'')[_0x1dd9a8(0x229)](0x0,0x4)[_0x1dd9a8(0x1f6)]();return _0x4c7e24+'_'+_0x2698cc;}return undefined;}function stableStringify(_0x312783){const _0x5ce5d1=a162_0x4fd9;if(Array['isArray'](_0x312783))return'['+_0x312783[_0x5ce5d1(0x226)](_0x246381=>stableStringify(_0x246381))[_0x5ce5d1(0x1fa)](',')+']';if(_0x312783&&typeof _0x312783===_0x5ce5d1(0x20c)){const _0x5a9e4c=_0x312783,_0x3879c8=Object[_0x5ce5d1(0x203)](_0x5a9e4c)[_0x5ce5d1(0x21c)](),_0x42d7eb=_0x3879c8[_0x5ce5d1(0x226)](_0xd4cbab=>'\x22'+_0xd4cbab+'\x22:'+stableStringify(_0x5a9e4c[_0xd4cbab]));return'{'+_0x42d7eb[_0x5ce5d1(0x1fa)](',')+'}';}const _0x6998f0=JSON['stringify'](_0x312783);return _0x6998f0===undefined?_0x5ce5d1(0x209):_0x6998f0;}export function consolidateActivationsByContent(_0x45011e){const _0x275463=a162_0x4fd9,_0x47ae54={},_0x236021=new Map(),_0x5b4a81=new Map();for(const _0x3959ee of _0x45011e){if(!_0x3959ee)continue;for(const [_0x2807bd,_0x4b7f01]of Object['entries'](_0x3959ee)){const _0x16f5aa={'name':_0x4b7f01['name'],'connection':_0x4b7f01['connection'],..._0x4b7f01[_0x275463(0x1f5)]!==undefined&&{'all_columns':_0x4b7f01[_0x275463(0x1f5)]},..._0x4b7f01[_0x275463(0x230)]!==undefined&&{'columns':_0x4b7f01[_0x275463(0x230)]},..._0x4b7f01[_0x275463(0x20b)]!==undefined&&{'behavior':_0x4b7f01[_0x275463(0x20b)]},..._0x4b7f01[_0x275463(0x21a)]!==undefined&&{'schedule':_0x4b7f01[_0x275463(0x21a)]},..._0x4b7f01[_0x275463(0x220)]!==undefined&&{'notification':_0x4b7f01[_0x275463(0x220)]},..._0x4b7f01[_0x275463(0x1ec)]!==undefined&&{'connector_config':_0x4b7f01['connector_config']},..._0x4b7f01[_0x275463(0x212)]!==undefined&&{'activation_template_id':_0x4b7f01['activation_template_id']}},_0x83072c=stableStringify(_0x16f5aa),_0x37821d=_0x5b4a81[_0x275463(0x208)](_0x83072c);_0x37821d?_0x236021[_0x275463(0x1e4)](_0x2807bd,_0x37821d):(_0x47ae54[_0x2807bd]=_0x4b7f01,_0x236021['set'](_0x2807bd,_0x2807bd),_0x5b4a81[_0x275463(0x1e4)](_0x83072c,_0x2807bd));}}return{'merged':_0x47ae54,'nameMapping':_0x236021};}export function updateActivationReferences(_0x3ccf48,_0xfecea6){const _0xc012b6=a162_0x4fd9;if(!_0x3ccf48)return;for(const _0x20174e of _0x3ccf48){if(!_0x20174e['steps'])continue;for(const _0x9cdf37 of _0x20174e[_0xc012b6(0x200)]){if(_0x9cdf37[_0xc012b6(0x22a)]==='activation'&&_0x9cdf37['with']?.[_0xc012b6(0x1e2)]){const _0x29e019=_0xfecea6[_0xc012b6(0x208)](_0x9cdf37[_0xc012b6(0x211)][_0xc012b6(0x1e2)]);_0x29e019&&_0x29e019!==_0x9cdf37[_0xc012b6(0x211)][_0xc012b6(0x1e2)]&&(_0x9cdf37[_0xc012b6(0x211)][_0xc012b6(0x1e2)]=_0x29e019);}}}}export function consolidateSegmentsByContent(_0x55ccda,_0x15be4a){const _0x2973f8=a162_0x4fd9,_0x14a298={},_0x2176ea=new Map(),_0x3c209d=new Map();for(const _0x38edcc of _0x55ccda){if(!_0x38edcc)continue;for(const [_0x36c8f3,_0x5e50c3]of Object[_0x2973f8(0x210)](_0x38edcc)){if(!_0x5e50c3['rule']){_0x14a298[_0x36c8f3]=_0x5e50c3,_0x2176ea[_0x2973f8(0x1e4)](_0x36c8f3,_0x36c8f3);continue;}const _0x11b4ce=_0x5e50c3[_0x2973f8(0x1f0)]&&_0x5e50c3[_0x2973f8(0x1f0)][_0x2973f8(0x20d)]()?_0x5e50c3[_0x2973f8(0x1f0)]:undefined,_0x580c21=JSON[_0x2973f8(0x215)]({'description':_0x11b4ce,'rule':deepSortObject(_0x5e50c3[_0x2973f8(0x20e)])}),_0x2d2783=_0x3c209d[_0x2973f8(0x208)](_0x580c21);if(_0x2d2783){const _0x47ce67={..._0x5e50c3[_0x2973f8(0x1f0)]!==undefined&&{'description':_0x5e50c3[_0x2973f8(0x1f0)]},'rule':_0x5e50c3[_0x2973f8(0x20e)]?deepSortObject(_0x5e50c3[_0x2973f8(0x20e)]):_0x5e50c3['rule']};if(_0x36c8f3<_0x2d2783){_0x14a298[_0x36c8f3]=_0x47ce67,delete _0x14a298[_0x2d2783];for(const [_0x25dae1,_0x2cb626]of _0x2176ea[_0x2973f8(0x210)]()){_0x2cb626===_0x2d2783&&_0x2176ea['set'](_0x25dae1,_0x36c8f3);}_0x2176ea[_0x2973f8(0x1e4)](_0x36c8f3,_0x36c8f3),_0x3c209d[_0x2973f8(0x1e4)](_0x580c21,_0x36c8f3);}else _0x14a298[_0x2d2783]=_0x47ce67,_0x2176ea['set'](_0x36c8f3,_0x2d2783);}else{let _0x32f09d=_0x36c8f3;if(_0x15be4a){const _0x57406a=_0x15be4a[_0x2973f8(0x208)](_0x580c21);_0x57406a&&_0x57406a[_0x2973f8(0x1ee)]>0x0&&(_0x32f09d=_0x57406a['slice']()[_0x2973f8(0x21c)]()[0x0]);}const _0xe79886={..._0x5e50c3[_0x2973f8(0x1f0)]!==undefined&&{'description':_0x5e50c3[_0x2973f8(0x1f0)]},'rule':_0x5e50c3[_0x2973f8(0x20e)]?deepSortObject(_0x5e50c3[_0x2973f8(0x20e)]):_0x5e50c3[_0x2973f8(0x20e)]};_0x14a298[_0x32f09d]=_0xe79886,_0x2176ea['set'](_0x36c8f3,_0x32f09d),_0x3c209d[_0x2973f8(0x1e4)](_0x580c21,_0x32f09d);}}}return{'merged':_0x14a298,'nameMapping':_0x2176ea};}export function updateSegmentReferences(_0x19886c,_0x2a2927){const _0x144ea4=a162_0x4fd9;if(!_0x19886c)return;for(const _0x2ceac2 of _0x19886c){if(_0x2ceac2['entry_criteria']?.['segment']){const _0x4cbaf3=_0x2a2927[_0x144ea4(0x208)](_0x2ceac2[_0x144ea4(0x20f)]['segment']);_0x4cbaf3&&(_0x2ceac2['entry_criteria'][_0x144ea4(0x1f2)]=_0x4cbaf3);}if(_0x2ceac2[_0x144ea4(0x1e5)])for(const _0x44aa54 of _0x2ceac2[_0x144ea4(0x1e5)]){if(_0x44aa54[_0x144ea4(0x1f2)]){const _0x5046ba=_0x2a2927[_0x144ea4(0x208)](_0x44aa54[_0x144ea4(0x1f2)]);_0x5046ba&&(_0x44aa54[_0x144ea4(0x1f2)]=_0x5046ba);}}if(_0x2ceac2[_0x144ea4(0x222)]?.['segment']){const _0xd74bab=_0x2a2927[_0x144ea4(0x208)](_0x2ceac2[_0x144ea4(0x222)][_0x144ea4(0x1f2)]);_0xd74bab&&(_0x2ceac2['milestone'][_0x144ea4(0x1f2)]=_0xd74bab);}if(_0x2ceac2[_0x144ea4(0x200)])for(const _0x6e209 of _0x2ceac2[_0x144ea4(0x200)]){if(_0x6e209[_0x144ea4(0x22a)]===_0x144ea4(0x1e7)&&_0x6e209[_0x144ea4(0x211)]?.[_0x144ea4(0x228)])for(const _0x430c35 of _0x6e209[_0x144ea4(0x211)]['branches']){if(_0x430c35[_0x144ea4(0x1f2)]){const _0x4fdb5b=_0x2a2927[_0x144ea4(0x208)](_0x430c35['segment']);_0x4fdb5b&&(_0x430c35[_0x144ea4(0x1f2)]=_0x4fdb5b);}}if(_0x6e209[_0x144ea4(0x22a)]===_0x144ea4(0x21d)&&_0x6e209['with']?.[_0x144ea4(0x1fb)]?.[_0x144ea4(0x1f2)]){const _0x89eb37=_0x2a2927['get'](_0x6e209[_0x144ea4(0x211)][_0x144ea4(0x1fb)][_0x144ea4(0x1f2)]);_0x89eb37&&(_0x6e209[_0x144ea4(0x211)][_0x144ea4(0x1fb)]['segment']=_0x89eb37);}}}}export function updateSegmentRefsInSegments(_0x9e08bc,_0x2118c1){const _0x83e50a=a162_0x4fd9;for(const _0x2f6774 of Object['values'](_0x9e08bc)){_0x2f6774[_0x83e50a(0x20e)]&&updateSegmentRefsInRule(_0x2f6774[_0x83e50a(0x20e)],_0x2118c1);}}function updateSegmentRefsInRule(_0xf92a3e,_0x5eebfb){const _0x3dbe2d=a162_0x4fd9;if(_0xf92a3e===null||typeof _0xf92a3e!==_0x3dbe2d(0x20c))return;if(Array[_0x3dbe2d(0x22e)](_0xf92a3e)){for(const _0x56fddd of _0xf92a3e){updateSegmentRefsInRule(_0x56fddd,_0x5eebfb);}return;}const _0x5a58d7=_0xf92a3e;if((_0x5a58d7[_0x3dbe2d(0x22a)]===_0x3dbe2d(0x217)||_0x5a58d7[_0x3dbe2d(0x22a)]===_0x3dbe2d(0x21b))&&typeof _0x5a58d7[_0x3dbe2d(0x1f2)]===_0x3dbe2d(0x1fe)){const _0x13b12f=_0x5eebfb[_0x3dbe2d(0x208)](_0x5a58d7[_0x3dbe2d(0x1f2)]);_0x13b12f&&(_0x5a58d7[_0x3dbe2d(0x1f2)]=_0x13b12f);}if(_0x5a58d7[_0x3dbe2d(0x1e6)]&&Array[_0x3dbe2d(0x22e)](_0x5a58d7[_0x3dbe2d(0x1e6)]))for(const _0x13bfb1 of _0x5a58d7['conditions']){updateSegmentRefsInRule(_0x13bfb1,_0x5eebfb);}}export function buildJourneysArray(_0x58f3e9,_0xc7be70){const _0x15eded=a162_0x4fd9;return _0x58f3e9[_0x15eded(0x226)](_0x4da7ed=>{const _0x99f22b=_0x15eded,_0x1b5611=_0xc7be70?_0x4da7ed[_0x99f22b(0x221)]['id']===_0xc7be70:_0x58f3e9['length']===0x1,_0x39c437=_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x22b)]?.[0x0],_0x16644e=_0x39c437?.[_0x99f22b(0x219)]||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x219)],_0x331c19={'version':_0x39c437?.[_0x99f22b(0x1f3)]||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x1f3)]||_0x4da7ed[_0x99f22b(0x221)][_0x99f22b(0x1e9)],'state':_0x4da7ed[_0x99f22b(0x221)][_0x99f22b(0x1dc)]===_0x99f22b(0x224)?_0x99f22b(0x224):_0x99f22b(0x206),'stages':_0x39c437?.[_0x99f22b(0x1f7)]||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x1f7)]||[],'id':_0x39c437?.['id']||_0x4da7ed[_0x99f22b(0x216)]['id'],'version_number':_0x39c437?.['version_number']||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x1e8)]};return _0x16644e&&(_0x331c19[_0x99f22b(0x219)]=_0x16644e),_0x1b5611&&(_0x331c19[_0x99f22b(0x207)]=!![]),_0x331c19;});}export function buildMergedJourneyDef(_0x564867,_0x586499,_0x3e1962){const _0x12be82=a162_0x4fd9,_0x39e773=_0x564867[0x0]['yaml'],_0x4d55eb=buildJourneysArray(_0x564867,_0x3e1962),{merged:_0x19b964,nameMapping:_0x128a4e}=consolidateSegmentsByContent(_0x564867['map'](_0x43668d=>_0x43668d[_0x12be82(0x216)][_0x12be82(0x21f)]),_0x586499);updateSegmentRefsInSegments(_0x19b964,_0x128a4e);const _0x1faeaa=Array['from'](_0x128a4e[_0x12be82(0x210)]())[_0x12be82(0x1eb)](([_0x445d44,_0x35e428])=>_0x445d44!==_0x35e428&&_0x445d44[_0x12be82(0x218)](_0x12be82(0x20f)));let _0x250f38=_0x19b964,_0x29cb6f=new Map();if(_0x1faeaa){const _0x3b7fc3=consolidateSegmentsByContent([_0x19b964],_0x586499);_0x250f38=_0x3b7fc3[_0x12be82(0x1ff)],_0x29cb6f=_0x3b7fc3[_0x12be82(0x21e)];}const _0x559bd6=new Map(_0x128a4e);for(const [_0x61edc0,_0x19e2c4]of _0x29cb6f[_0x12be82(0x210)]()){_0x559bd6[_0x12be82(0x1e4)](_0x61edc0,_0x19e2c4);}for(const [_0x1d551c,_0x148e45]of _0x559bd6[_0x12be82(0x210)]()){let _0x19a3f5=_0x148e45,_0x2eea93=0x0;while(_0x559bd6[_0x12be82(0x1f1)](_0x19a3f5)&&_0x559bd6['get'](_0x19a3f5)!==_0x19a3f5&&_0x2eea93<MAX_MAPPING_CHAIN_DEPTH){_0x19a3f5=_0x559bd6[_0x12be82(0x208)](_0x19a3f5),_0x2eea93++;}_0x19a3f5!==_0x148e45&&_0x559bd6[_0x12be82(0x1e4)](_0x1d551c,_0x19a3f5);}for(const _0x429059 of _0x4d55eb){updateSegmentReferences(_0x429059['stages'],_0x559bd6);}const {merged:_0x1976d4,nameMapping:_0x552c07}=consolidateActivationsByContent(_0x564867['map'](_0x4a22b2=>_0x4a22b2['yaml']['activations']));for(const _0xfd5b09 of _0x4d55eb){updateActivationReferences(_0xfd5b09[_0x12be82(0x1f7)],_0x552c07);}let _0x5e3d6c=_0x39e773[_0x12be82(0x219)];if(_0x5e3d6c?.['segment']){const _0x4f1801=_0x559bd6['get'](_0x5e3d6c[_0x12be82(0x1f2)]);_0x4f1801&&(_0x5e3d6c={..._0x5e3d6c,'segment':_0x4f1801});}for(const _0x18a16b of _0x4d55eb){if(_0x18a16b[_0x12be82(0x219)]?.['segment']){const _0x423648=_0x559bd6['get'](_0x18a16b[_0x12be82(0x219)][_0x12be82(0x1f2)]);_0x423648&&(_0x18a16b[_0x12be82(0x219)]={..._0x18a16b['goal'],'segment':_0x423648});}}return _0x4d55eb[_0x12be82(0x1eb)](_0x53f9c4=>_0x53f9c4[_0x12be82(0x219)])&&(_0x5e3d6c=undefined),{'type':'journey','name':_0x39e773[_0x12be82(0x1e9)],'description':_0x39e773[_0x12be82(0x1f0)],'goal':_0x5e3d6c,'reentry':_0x39e773[_0x12be82(0x1e0)],'segments':Object[_0x12be82(0x203)](_0x250f38)[_0x12be82(0x1ee)]>0x0?_0x250f38:undefined,'activations':Object['keys'](_0x1976d4)[_0x12be82(0x1ee)]>0x0?_0x1976d4:undefined,'journeys':_0x4d55eb,'bundle_id':_0x39e773[_0x12be82(0x1df)],'bundle_name':_0x39e773[_0x12be82(0x20a)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x3c6888,_0x27a06c,_0x362bae,_0x3e5748){const _0x39ddbf=a162_0x4fd9,_0x3a749f=_0x3c6888+':'+_0x27a06c,_0x4e5ce6=_0x362bae[_0x39ddbf(0x208)](_0x3a749f);if(_0x4e5ce6)return _0x4e5ce6;const _0x224508=await _0x3e5748(_0x3c6888),_0xb4054e=_0x224508['attributes'][_0x39ddbf(0x1e3)]||_0x224508[_0x39ddbf(0x1fd)][_0x39ddbf(0x1e9)],_0x139314=_0x224508[_0x39ddbf(0x1fd)][_0x39ddbf(0x1f8)][_0x39ddbf(0x213)](_0x31e36d=>String(_0x31e36d['id'])===String(_0x27a06c)),_0x4b9ad6=_0x139314?.[_0x39ddbf(0x1e9)]||_0x27a06c,_0x5356a8={'journeyName':_0xb4054e,'stageName':_0x4b9ad6};return _0x362bae['set'](_0x3a749f,_0x5356a8),_0x5356a8;}function a162_0x302b(){const _0x2b454b=['latest','get','null','bundle_name','behavior','object','trim','rule','entry_criteria','entries','with','activation_template_id','find','endsWith','stringify','yaml','include','startsWith','goal','schedule','exclude','sort','wait','nameMapping','segments','notification','item','milestone','36hwgVVd','launched','index','map','11cAcmTd','branches','slice','type','journeys','1713188fncnBA','.yml','isArray','124117iJthlu','columns','state','32vJiRha','36fAPGaj','bundle_id','reentry','versions','activation','journeyBundleName','set','exit_criteria','conditions','decision_point','version_number','name','25DvSgFH','some','connector_config','119832CBIndU','length','7782228hHggjb','description','has','segment','version','.yaml','all_columns','toLowerCase','stages','journeyStages','push','join','condition','86560ZUrMXV','attributes','string','merged','steps','match','752003ARBvTN','keys','894860ktCDFY','replace','draft'];a162_0x302b=function(){return _0x2b454b;};return a162_0x302b();}export function formatApiJourneyName(_0x11899a,_0x193abe){return _0x193abe+'\x20('+_0x11899a+')';}export function isLocalJourneyRef(_0x2dbc43){const _0x31be42=a162_0x4fd9;return _0x2dbc43[_0x31be42(0x214)](_0x31be42(0x22d))||_0x2dbc43[_0x31be42(0x214)](_0x31be42(0x1f4));}function a162_0x4fd9(_0x738649,_0x9455de){_0x738649=_0x738649-0x1dc;const _0x302b4b=a162_0x302b();let _0x4fd980=_0x302b4b[_0x738649];return _0x4fd980;}export function buildLocalRuleToNameMapping(_0x589ae7){const _0x15ec5a=a162_0x4fd9,_0x5b0003=new Map();if(!_0x589ae7)return _0x5b0003;for(const [_0x5010f7,_0x1f1ebe]of Object[_0x15ec5a(0x210)](_0x589ae7)){if(_0x1f1ebe[_0x15ec5a(0x20e)]){const _0x47e111=serializeRule(_0x1f1ebe[_0x15ec5a(0x20e)]),_0x29190b=_0x5b0003[_0x15ec5a(0x208)](_0x47e111)||[];_0x29190b[_0x15ec5a(0x1f9)](_0x5010f7),_0x5b0003['set'](_0x47e111,_0x29190b);}}return _0x5b0003;}export function buildLocalRuleToNameMappingFromJourney(_0x1b4272){const _0x21b39d=a162_0x4fd9,_0x527b7b=_0x1b4272[_0x21b39d(0x21f)];if(!_0x527b7b)return new Map();const _0x14c18a=collectSegmentUsageCounts(_0x1b4272),_0x545faf=new Map();let _0x9e0ccb=0x0;for(const [_0x5123eb,_0x28d1c5]of Object['entries'](_0x527b7b)){if(!_0x28d1c5['rule']){_0x9e0ccb++;continue;}const _0x401ac8=serializeRule(_0x28d1c5[_0x21b39d(0x20e)]),_0x5a0fe2=_0x545faf[_0x21b39d(0x208)](_0x401ac8)||[];_0x5a0fe2[_0x21b39d(0x1f9)]({'name':_0x5123eb,'index':_0x9e0ccb}),_0x545faf[_0x21b39d(0x1e4)](_0x401ac8,_0x5a0fe2),_0x9e0ccb++;}const _0x5c6d6c=new Map();for(const [_0x422045,_0x41bcac]of _0x545faf){const _0x2de45c=_0x41bcac[_0x21b39d(0x229)]()[_0x21b39d(0x21c)]((_0x524751,_0x11bc63)=>{const _0x3916dc=_0x21b39d,_0x48c6a4=_0x14c18a[_0x3916dc(0x208)](_0x524751[_0x3916dc(0x1e9)])||0x0,_0x4dcac6=_0x14c18a[_0x3916dc(0x208)](_0x11bc63[_0x3916dc(0x1e9)])||0x0;if(_0x48c6a4!==_0x4dcac6)return _0x4dcac6-_0x48c6a4;return _0x524751['index']-_0x11bc63[_0x3916dc(0x225)];})[_0x21b39d(0x226)](_0x3cbfef=>_0x3cbfef[_0x21b39d(0x1e9)]);_0x5c6d6c['set'](_0x422045,_0x2de45c);}return _0x5c6d6c;}export function collectSegmentUsageCounts(_0x24e925){const _0x59d5f5=a162_0x4fd9,_0x45aeb9=new Map(),_0x548d6b=_0x3e5c9e=>{const _0x3820c6=a162_0x4fd9;if(!_0x3e5c9e)return;_0x45aeb9[_0x3820c6(0x1e4)](_0x3e5c9e,(_0x45aeb9[_0x3820c6(0x208)](_0x3e5c9e)||0x0)+0x1);},_0x10d9eb=_0x26cf1c=>{const _0x3f8a15=a162_0x4fd9;for(const _0x6c9b69 of _0x26cf1c){_0x548d6b(_0x6c9b69[_0x3f8a15(0x20f)]?.[_0x3f8a15(0x1f2)]);if(_0x6c9b69[_0x3f8a15(0x1e5)])for(const _0x36cba2 of _0x6c9b69[_0x3f8a15(0x1e5)]){_0x548d6b(_0x36cba2[_0x3f8a15(0x1f2)]);}_0x548d6b(_0x6c9b69[_0x3f8a15(0x222)]?.['segment']);if(_0x6c9b69[_0x3f8a15(0x200)])for(const _0x2bd017 of _0x6c9b69[_0x3f8a15(0x200)]){if(_0x2bd017['type']===_0x3f8a15(0x1e7))for(const _0x38ad37 of _0x2bd017[_0x3f8a15(0x211)][_0x3f8a15(0x228)]){_0x548d6b(_0x38ad37[_0x3f8a15(0x1f2)]);}else _0x2bd017[_0x3f8a15(0x22a)]===_0x3f8a15(0x21d)&&_0x548d6b(_0x2bd017['with'][_0x3f8a15(0x1fb)]?.[_0x3f8a15(0x1f2)]);}}};_0x548d6b(_0x24e925['goal']?.[_0x59d5f5(0x1f2)]);if(_0x24e925[_0x59d5f5(0x22b)])for(const _0x3a93f7 of _0x24e925[_0x59d5f5(0x22b)]){_0x548d6b(_0x3a93f7[_0x59d5f5(0x219)]?.[_0x59d5f5(0x1f2)]),_0x10d9eb(_0x3a93f7[_0x59d5f5(0x1f7)]);}_0x24e925[_0x59d5f5(0x1f7)]&&_0x10d9eb(_0x24e925['stages']);if(_0x24e925['versions'])for(const _0x577d1d of _0x24e925[_0x59d5f5(0x1e1)]){_0x10d9eb(_0x577d1d[_0x59d5f5(0x1f7)]);}return _0x45aeb9;}
|
|
1
|
+
(function(_0x577c54,_0x5369f4){const _0xefaecd=a165_0xaa34,_0x12e8d9=_0x577c54();while(!![]){try{const _0xb4555b=-parseInt(_0xefaecd(0x1aa))/0x1*(parseInt(_0xefaecd(0x189))/0x2)+-parseInt(_0xefaecd(0x1ad))/0x3*(-parseInt(_0xefaecd(0x16f))/0x4)+parseInt(_0xefaecd(0x167))/0x5+parseInt(_0xefaecd(0x19a))/0x6*(-parseInt(_0xefaecd(0x19e))/0x7)+parseInt(_0xefaecd(0x1ac))/0x8*(parseInt(_0xefaecd(0x1a7))/0x9)+parseInt(_0xefaecd(0x16e))/0xa*(parseInt(_0xefaecd(0x19f))/0xb)+parseInt(_0xefaecd(0x176))/0xc;if(_0xb4555b===_0x5369f4)break;else _0x12e8d9['push'](_0x12e8d9['shift']());}catch(_0x4c058e){_0x12e8d9['push'](_0x12e8d9['shift']());}}}(a165_0x4e3d,0x9a13e));function a165_0xaa34(_0x3d67c8,_0x4a4ebc){_0x3d67c8=_0x3d67c8-0x162;const _0x4e3db2=a165_0x4e3d();let _0xaa3455=_0x4e3db2[_0x3d67c8];return _0xaa3455;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x8f5445){const _0x4c7476=a165_0xaa34;return _0x8f5445[_0x4c7476(0x196)]()[_0x4c7476(0x18b)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x4c7476(0x18b)](/_+/g,'_')[_0x4c7476(0x18b)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3a3bf2){const _0x1f0bcb=a165_0xaa34,_0x5b8cac=_0x3a3bf2['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5b8cac){const _0x5b249a=_0x5b8cac[0x1][_0x1f0bcb(0x196)](),_0x29ef33=_0x5b8cac[0x2],_0x474d03=_0x29ef33[_0x1f0bcb(0x18b)](/-/g,'')[_0x1f0bcb(0x175)](0x0,0x4)[_0x1f0bcb(0x196)]();return _0x5b249a+'_'+_0x474d03;}const _0x358358=_0x3a3bf2[_0x1f0bcb(0x183)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x358358){const _0x55703c=_0x358358[0x1],_0x26f87f=_0x358358[0x2][_0x1f0bcb(0x196)](),_0x129067=_0x55703c[_0x1f0bcb(0x18b)](/-/g,'')[_0x1f0bcb(0x175)](0x0,0x4)[_0x1f0bcb(0x196)]();return _0x26f87f+'_'+_0x129067;}return undefined;}function stableStringify(_0xbea595){const _0x35e6cc=a165_0xaa34;if(Array['isArray'](_0xbea595))return'['+_0xbea595['map'](_0x2d2200=>stableStringify(_0x2d2200))[_0x35e6cc(0x1ae)](',')+']';if(_0xbea595&&typeof _0xbea595===_0x35e6cc(0x194)){const _0x4eec07=_0xbea595,_0x8d7b50=Object['keys'](_0x4eec07)[_0x35e6cc(0x16a)](),_0x4739ac=_0x8d7b50['map'](_0x24e0f3=>'\x22'+_0x24e0f3+'\x22:'+stableStringify(_0x4eec07[_0x24e0f3]));return'{'+_0x4739ac[_0x35e6cc(0x1ae)](',')+'}';}const _0x1b38a8=JSON[_0x35e6cc(0x188)](_0xbea595);return _0x1b38a8===undefined?_0x35e6cc(0x164):_0x1b38a8;}export function consolidateActivationsByContent(_0x8438e4){const _0x95aab5=a165_0xaa34,_0x5316a6={},_0x34e99a=new Map(),_0x34027a=new Map();for(const _0x4dd387 of _0x8438e4){if(!_0x4dd387)continue;for(const [_0x1f1146,_0x2eeb63]of Object['entries'](_0x4dd387)){const _0x53e90c={'name':_0x2eeb63['name'],'connection':_0x2eeb63[_0x95aab5(0x18f)],..._0x2eeb63[_0x95aab5(0x162)]!==undefined&&{'all_columns':_0x2eeb63['all_columns']},..._0x2eeb63[_0x95aab5(0x169)]!==undefined&&{'columns':_0x2eeb63[_0x95aab5(0x169)]},..._0x2eeb63['behavior']!==undefined&&{'behavior':_0x2eeb63[_0x95aab5(0x1a9)]},..._0x2eeb63[_0x95aab5(0x178)]!==undefined&&{'schedule':_0x2eeb63[_0x95aab5(0x178)]},..._0x2eeb63[_0x95aab5(0x1a6)]!==undefined&&{'notification':_0x2eeb63[_0x95aab5(0x1a6)]},..._0x2eeb63['connector_config']!==undefined&&{'connector_config':_0x2eeb63['connector_config']},..._0x2eeb63[_0x95aab5(0x1b6)]!==undefined&&{'activation_template_id':_0x2eeb63['activation_template_id']}},_0x40af4a=stableStringify(_0x53e90c),_0x3a724e=_0x34027a['get'](_0x40af4a);_0x3a724e?_0x34e99a[_0x95aab5(0x17f)](_0x1f1146,_0x3a724e):(_0x5316a6[_0x1f1146]=_0x2eeb63,_0x34e99a['set'](_0x1f1146,_0x1f1146),_0x34027a[_0x95aab5(0x17f)](_0x40af4a,_0x1f1146));}}return{'merged':_0x5316a6,'nameMapping':_0x34e99a};}export function updateActivationReferences(_0x517e83,_0x504122){const _0x48aa76=a165_0xaa34;if(!_0x517e83)return;for(const _0x15fb17 of _0x517e83){if(!_0x15fb17['steps'])continue;for(const _0x33083b of _0x15fb17[_0x48aa76(0x1b4)]){if(_0x33083b[_0x48aa76(0x199)]==='activation'&&_0x33083b['with']?.[_0x48aa76(0x1a8)]){const _0x27c67a=_0x504122[_0x48aa76(0x19c)](_0x33083b['with']['activation']);_0x27c67a&&_0x27c67a!==_0x33083b[_0x48aa76(0x198)][_0x48aa76(0x1a8)]&&(_0x33083b[_0x48aa76(0x198)]['activation']=_0x27c67a);}}}}export function consolidateSegmentsByContent(_0x1683d0,_0x34ffb6){const _0x426349=a165_0xaa34,_0x4420ea={},_0x3b2709=new Map(),_0x49e375=new Map();for(const _0x3252da of _0x1683d0){if(!_0x3252da)continue;for(const [_0x538aff,_0x43355]of Object[_0x426349(0x187)](_0x3252da)){if(!_0x43355[_0x426349(0x171)]){_0x4420ea[_0x538aff]=_0x43355,_0x3b2709[_0x426349(0x17f)](_0x538aff,_0x538aff);continue;}const _0x5f25f7=_0x43355[_0x426349(0x165)]&&_0x43355['description'][_0x426349(0x1a3)]()?_0x43355[_0x426349(0x165)]:undefined,_0x237826=JSON[_0x426349(0x188)]({'description':_0x5f25f7,'rule':deepSortObject(_0x43355[_0x426349(0x171)])}),_0x98e0a5=_0x49e375[_0x426349(0x19c)](_0x237826);if(_0x98e0a5){const _0x53acbd={..._0x43355[_0x426349(0x165)]!==undefined&&{'description':_0x43355[_0x426349(0x165)]},'rule':_0x43355[_0x426349(0x171)]?deepSortObject(_0x43355[_0x426349(0x171)]):_0x43355[_0x426349(0x171)]};if(_0x538aff<_0x98e0a5){_0x4420ea[_0x538aff]=_0x53acbd,delete _0x4420ea[_0x98e0a5];for(const [_0x578ec7,_0x153159]of _0x3b2709[_0x426349(0x187)]()){_0x153159===_0x98e0a5&&_0x3b2709['set'](_0x578ec7,_0x538aff);}_0x3b2709[_0x426349(0x17f)](_0x538aff,_0x538aff),_0x49e375[_0x426349(0x17f)](_0x237826,_0x538aff);}else _0x4420ea[_0x98e0a5]=_0x53acbd,_0x3b2709[_0x426349(0x17f)](_0x538aff,_0x98e0a5);}else{let _0x4c0992=_0x538aff;if(_0x34ffb6){const _0x41054d=_0x34ffb6[_0x426349(0x19c)](_0x237826);_0x41054d&&_0x41054d[_0x426349(0x18c)]>0x0&&(_0x4c0992=_0x41054d[_0x426349(0x175)]()[_0x426349(0x16a)]()[0x0]);}const _0x575f99={..._0x43355[_0x426349(0x165)]!==undefined&&{'description':_0x43355[_0x426349(0x165)]},'rule':_0x43355[_0x426349(0x171)]?deepSortObject(_0x43355[_0x426349(0x171)]):_0x43355[_0x426349(0x171)]};_0x4420ea[_0x4c0992]=_0x575f99,_0x3b2709['set'](_0x538aff,_0x4c0992),_0x49e375['set'](_0x237826,_0x4c0992);}}}return{'merged':_0x4420ea,'nameMapping':_0x3b2709};}export function updateSegmentReferences(_0x33a338,_0x4f81bd){const _0x27d11a=a165_0xaa34;if(!_0x33a338)return;for(const _0x208c17 of _0x33a338){if(_0x208c17[_0x27d11a(0x163)]?.[_0x27d11a(0x1b5)]){const _0x3c3c2c=_0x4f81bd['get'](_0x208c17[_0x27d11a(0x163)][_0x27d11a(0x1b5)]);_0x3c3c2c&&(_0x208c17[_0x27d11a(0x163)][_0x27d11a(0x1b5)]=_0x3c3c2c);}if(_0x208c17['exit_criteria'])for(const _0x4860d2 of _0x208c17[_0x27d11a(0x1a1)]){if(_0x4860d2[_0x27d11a(0x1b5)]){const _0x46aeaf=_0x4f81bd[_0x27d11a(0x19c)](_0x4860d2[_0x27d11a(0x1b5)]);_0x46aeaf&&(_0x4860d2[_0x27d11a(0x1b5)]=_0x46aeaf);}}if(_0x208c17[_0x27d11a(0x16d)]?.[_0x27d11a(0x1b5)]){const _0x3d0dff=_0x4f81bd[_0x27d11a(0x19c)](_0x208c17[_0x27d11a(0x16d)][_0x27d11a(0x1b5)]);_0x3d0dff&&(_0x208c17['milestone'][_0x27d11a(0x1b5)]=_0x3d0dff);}if(_0x208c17['steps'])for(const _0x56faed of _0x208c17[_0x27d11a(0x1b4)]){if(_0x56faed[_0x27d11a(0x199)]===_0x27d11a(0x185)&&_0x56faed['with']?.[_0x27d11a(0x17a)])for(const _0x3a201d of _0x56faed['with'][_0x27d11a(0x17a)]){if(_0x3a201d['segment']){const _0x260b30=_0x4f81bd['get'](_0x3a201d[_0x27d11a(0x1b5)]);_0x260b30&&(_0x3a201d[_0x27d11a(0x1b5)]=_0x260b30);}}if(_0x56faed[_0x27d11a(0x199)]===_0x27d11a(0x16c)&&_0x56faed[_0x27d11a(0x198)]?.[_0x27d11a(0x192)]?.[_0x27d11a(0x1b5)]){const _0x5a2b38=_0x4f81bd[_0x27d11a(0x19c)](_0x56faed['with'][_0x27d11a(0x192)][_0x27d11a(0x1b5)]);_0x5a2b38&&(_0x56faed[_0x27d11a(0x198)][_0x27d11a(0x192)][_0x27d11a(0x1b5)]=_0x5a2b38);}}}}function a165_0x4e3d(){const _0x3d4603=['entry_criteria','null','description','include','1423170qqcShK','endsWith','columns','sort','yaml','wait','milestone','10lKeoZu','312212JRPwSn','keys','rule','state','activations','merged','slice','3359952pfbnDw','.yaml','schedule','bundle_name','branches','journey','stages','attributes','map','set','push','has','string','match','journeys','decision_point','values','entries','stringify','6DUNhsO','nameMapping','replace','length','item','version','connection','segments','reentry','condition','version_number','object','.yml','toLowerCase','some','with','type','124638qakqyE','journeyBundleName','get','name','287oLJMBT','12448711RloYNJ','journeyStages','exit_criteria','bundle_id','trim','isArray','draft','notification','1918269leYruc','activation','behavior','343361aCZunF','startsWith','16IxZjCx','15oHeRdM','join','launched','latest','conditions','index','goal','steps','segment','activation_template_id','all_columns'];a165_0x4e3d=function(){return _0x3d4603;};return a165_0x4e3d();}export function updateSegmentRefsInSegments(_0x3047c9,_0x42b166){const _0x55ed90=a165_0xaa34;for(const _0x802c17 of Object[_0x55ed90(0x186)](_0x3047c9)){_0x802c17[_0x55ed90(0x171)]&&updateSegmentRefsInRule(_0x802c17[_0x55ed90(0x171)],_0x42b166);}}function updateSegmentRefsInRule(_0x26dd74,_0x19f341){const _0x5a207f=a165_0xaa34;if(_0x26dd74===null||typeof _0x26dd74!=='object')return;if(Array[_0x5a207f(0x1a4)](_0x26dd74)){for(const _0x32193e of _0x26dd74){updateSegmentRefsInRule(_0x32193e,_0x19f341);}return;}const _0x14b180=_0x26dd74;if((_0x14b180[_0x5a207f(0x199)]===_0x5a207f(0x166)||_0x14b180[_0x5a207f(0x199)]==='exclude')&&typeof _0x14b180['segment']===_0x5a207f(0x182)){const _0x302751=_0x19f341[_0x5a207f(0x19c)](_0x14b180[_0x5a207f(0x1b5)]);_0x302751&&(_0x14b180['segment']=_0x302751);}if(_0x14b180['conditions']&&Array[_0x5a207f(0x1a4)](_0x14b180['conditions']))for(const _0x4d6d5c of _0x14b180[_0x5a207f(0x1b1)]){updateSegmentRefsInRule(_0x4d6d5c,_0x19f341);}}export function buildJourneysArray(_0x480935,_0x47fa76){const _0x4a4b9e=a165_0xaa34;return _0x480935[_0x4a4b9e(0x17e)](_0x1afb58=>{const _0x26f102=_0x4a4b9e,_0x52858f=_0x47fa76?_0x1afb58[_0x26f102(0x18d)]['id']===_0x47fa76:_0x480935[_0x26f102(0x18c)]===0x1,_0x1b0b04=_0x1afb58['yaml']['journeys']?.[0x0],_0x3708d4=_0x1b0b04?.[_0x26f102(0x1b3)]||_0x1afb58[_0x26f102(0x16b)][_0x26f102(0x1b3)],_0x2f7298={'version':_0x1b0b04?.[_0x26f102(0x18e)]||_0x1afb58['yaml'][_0x26f102(0x18e)]||_0x1afb58[_0x26f102(0x18d)][_0x26f102(0x19d)],'state':_0x1afb58[_0x26f102(0x18d)][_0x26f102(0x172)]===_0x26f102(0x1af)?_0x26f102(0x1af):_0x26f102(0x1a5),'stages':_0x1b0b04?.[_0x26f102(0x17c)]||_0x1afb58[_0x26f102(0x16b)][_0x26f102(0x17c)]||[],'id':_0x1b0b04?.['id']||_0x1afb58['yaml']['id'],'version_number':_0x1b0b04?.['version_number']||_0x1afb58[_0x26f102(0x16b)][_0x26f102(0x193)]};return _0x3708d4&&(_0x2f7298[_0x26f102(0x1b3)]=_0x3708d4),_0x52858f&&(_0x2f7298[_0x26f102(0x1b0)]=!![]),_0x2f7298;});}export function buildMergedJourneyDef(_0x28b883,_0x168d26,_0x1f4e8c){const _0x632a9b=a165_0xaa34,_0x5bf3c7=_0x28b883[0x0][_0x632a9b(0x16b)],_0x594218=buildJourneysArray(_0x28b883,_0x1f4e8c),{merged:_0x3c4acb,nameMapping:_0x2674a2}=consolidateSegmentsByContent(_0x28b883['map'](_0x4c1337=>_0x4c1337[_0x632a9b(0x16b)]['segments']),_0x168d26);updateSegmentRefsInSegments(_0x3c4acb,_0x2674a2);const _0xbf22a9=Array['from'](_0x2674a2['entries']())[_0x632a9b(0x197)](([_0x2bffa0,_0x44c438])=>_0x2bffa0!==_0x44c438&&_0x2bffa0[_0x632a9b(0x1ab)]('entry_criteria'));let _0x14c2ea=_0x3c4acb,_0x308e8f=new Map();if(_0xbf22a9){const _0xee5c90=consolidateSegmentsByContent([_0x3c4acb],_0x168d26);_0x14c2ea=_0xee5c90[_0x632a9b(0x174)],_0x308e8f=_0xee5c90[_0x632a9b(0x18a)];}const _0x161a5d=new Map(_0x2674a2);for(const [_0xedd3c8,_0x50c564]of _0x308e8f[_0x632a9b(0x187)]()){_0x161a5d[_0x632a9b(0x17f)](_0xedd3c8,_0x50c564);}for(const [_0x1938a6,_0x5523f1]of _0x161a5d[_0x632a9b(0x187)]()){let _0x1698aa=_0x5523f1,_0x443d58=0x0;while(_0x161a5d[_0x632a9b(0x181)](_0x1698aa)&&_0x161a5d['get'](_0x1698aa)!==_0x1698aa&&_0x443d58<MAX_MAPPING_CHAIN_DEPTH){_0x1698aa=_0x161a5d[_0x632a9b(0x19c)](_0x1698aa),_0x443d58++;}_0x1698aa!==_0x5523f1&&_0x161a5d[_0x632a9b(0x17f)](_0x1938a6,_0x1698aa);}for(const _0x5cf1e2 of _0x594218){updateSegmentReferences(_0x5cf1e2[_0x632a9b(0x17c)],_0x161a5d);}const {merged:_0x5eb8aa,nameMapping:_0x4bc461}=consolidateActivationsByContent(_0x28b883[_0x632a9b(0x17e)](_0x4dc1db=>_0x4dc1db[_0x632a9b(0x16b)][_0x632a9b(0x173)]));for(const _0x3808df of _0x594218){updateActivationReferences(_0x3808df[_0x632a9b(0x17c)],_0x4bc461);}let _0x4dd006=_0x5bf3c7[_0x632a9b(0x1b3)];if(_0x4dd006?.['segment']){const _0x4a2496=_0x161a5d[_0x632a9b(0x19c)](_0x4dd006[_0x632a9b(0x1b5)]);_0x4a2496&&(_0x4dd006={..._0x4dd006,'segment':_0x4a2496});}for(const _0x24e0b9 of _0x594218){if(_0x24e0b9[_0x632a9b(0x1b3)]?.[_0x632a9b(0x1b5)]){const _0x479a15=_0x161a5d[_0x632a9b(0x19c)](_0x24e0b9[_0x632a9b(0x1b3)][_0x632a9b(0x1b5)]);_0x479a15&&(_0x24e0b9[_0x632a9b(0x1b3)]={..._0x24e0b9['goal'],'segment':_0x479a15});}}return _0x594218[_0x632a9b(0x197)](_0x65491=>_0x65491['goal'])&&(_0x4dd006=undefined),{'type':_0x632a9b(0x17b),'name':_0x5bf3c7[_0x632a9b(0x19d)],'description':_0x5bf3c7['description'],'goal':_0x4dd006,'reentry':_0x5bf3c7[_0x632a9b(0x191)],'segments':Object[_0x632a9b(0x170)](_0x14c2ea)[_0x632a9b(0x18c)]>0x0?_0x14c2ea:undefined,'activations':Object['keys'](_0x5eb8aa)[_0x632a9b(0x18c)]>0x0?_0x5eb8aa:undefined,'journeys':_0x594218,'bundle_id':_0x5bf3c7[_0x632a9b(0x1a2)],'bundle_name':_0x5bf3c7[_0x632a9b(0x179)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x175855,_0x1983b0,_0x33a8e8,_0x2fe161){const _0x51159c=a165_0xaa34,_0x31cdbd=_0x175855+':'+_0x1983b0,_0x3b3c64=_0x33a8e8['get'](_0x31cdbd);if(_0x3b3c64)return _0x3b3c64;const _0x4c6d2b=await _0x2fe161(_0x175855),_0x17ea1c=_0x4c6d2b[_0x51159c(0x17d)][_0x51159c(0x19b)]||_0x4c6d2b[_0x51159c(0x17d)][_0x51159c(0x19d)],_0x111fce=_0x4c6d2b[_0x51159c(0x17d)][_0x51159c(0x1a0)]['find'](_0x170ded=>String(_0x170ded['id'])===String(_0x1983b0)),_0x6e2996=_0x111fce?.[_0x51159c(0x19d)]||_0x1983b0,_0xb1718={'journeyName':_0x17ea1c,'stageName':_0x6e2996};return _0x33a8e8[_0x51159c(0x17f)](_0x31cdbd,_0xb1718),_0xb1718;}export function formatApiJourneyName(_0x1332e8,_0x2aaea8){return _0x2aaea8+'\x20('+_0x1332e8+')';}export function isLocalJourneyRef(_0x2d153c){const _0x2d4b6e=a165_0xaa34;return _0x2d153c[_0x2d4b6e(0x168)](_0x2d4b6e(0x195))||_0x2d153c[_0x2d4b6e(0x168)](_0x2d4b6e(0x177));}export function buildLocalRuleToNameMapping(_0x4313dd){const _0x33a1c3=a165_0xaa34,_0x59633a=new Map();if(!_0x4313dd)return _0x59633a;for(const [_0x3c958d,_0xc40ce0]of Object[_0x33a1c3(0x187)](_0x4313dd)){if(_0xc40ce0[_0x33a1c3(0x171)]){const _0x1f0565=serializeRule(_0xc40ce0['rule']),_0x3bf2f3=_0x59633a[_0x33a1c3(0x19c)](_0x1f0565)||[];_0x3bf2f3[_0x33a1c3(0x180)](_0x3c958d),_0x59633a[_0x33a1c3(0x17f)](_0x1f0565,_0x3bf2f3);}}return _0x59633a;}export function buildLocalRuleToNameMappingFromJourney(_0x2ac823){const _0x26dc7d=a165_0xaa34,_0x470ab3=_0x2ac823[_0x26dc7d(0x190)];if(!_0x470ab3)return new Map();const _0x5c9c64=collectSegmentUsageCounts(_0x2ac823),_0xfe5641=new Map();let _0x1ec6fa=0x0;for(const [_0x163c8b,_0x2b4ecd]of Object[_0x26dc7d(0x187)](_0x470ab3)){if(!_0x2b4ecd[_0x26dc7d(0x171)]){_0x1ec6fa++;continue;}const _0x398da5=serializeRule(_0x2b4ecd[_0x26dc7d(0x171)]),_0xcca4a9=_0xfe5641[_0x26dc7d(0x19c)](_0x398da5)||[];_0xcca4a9['push']({'name':_0x163c8b,'index':_0x1ec6fa}),_0xfe5641['set'](_0x398da5,_0xcca4a9),_0x1ec6fa++;}const _0x41f206=new Map();for(const [_0x116db1,_0x1bd54d]of _0xfe5641){const _0x40cee5=_0x1bd54d[_0x26dc7d(0x175)]()[_0x26dc7d(0x16a)]((_0x499174,_0x54022d)=>{const _0x58e7a5=_0x26dc7d,_0x211884=_0x5c9c64[_0x58e7a5(0x19c)](_0x499174[_0x58e7a5(0x19d)])||0x0,_0x249f7b=_0x5c9c64['get'](_0x54022d[_0x58e7a5(0x19d)])||0x0;if(_0x211884!==_0x249f7b)return _0x249f7b-_0x211884;return _0x499174[_0x58e7a5(0x1b2)]-_0x54022d[_0x58e7a5(0x1b2)];})[_0x26dc7d(0x17e)](_0x4c3c34=>_0x4c3c34[_0x26dc7d(0x19d)]);_0x41f206[_0x26dc7d(0x17f)](_0x116db1,_0x40cee5);}return _0x41f206;}export function collectSegmentUsageCounts(_0x44cd8d){const _0x46fa2e=a165_0xaa34,_0x2a7379=new Map(),_0x3c1cf4=_0x2965b8=>{if(!_0x2965b8)return;_0x2a7379['set'](_0x2965b8,(_0x2a7379['get'](_0x2965b8)||0x0)+0x1);},_0x4e4e38=_0xa82e44=>{const _0x409e6a=a165_0xaa34;for(const _0x300cee of _0xa82e44){_0x3c1cf4(_0x300cee['entry_criteria']?.[_0x409e6a(0x1b5)]);if(_0x300cee[_0x409e6a(0x1a1)])for(const _0x2a3436 of _0x300cee[_0x409e6a(0x1a1)]){_0x3c1cf4(_0x2a3436[_0x409e6a(0x1b5)]);}_0x3c1cf4(_0x300cee[_0x409e6a(0x16d)]?.['segment']);if(_0x300cee[_0x409e6a(0x1b4)])for(const _0x584fc3 of _0x300cee['steps']){if(_0x584fc3[_0x409e6a(0x199)]===_0x409e6a(0x185))for(const _0x3f9346 of _0x584fc3[_0x409e6a(0x198)]['branches']){_0x3c1cf4(_0x3f9346[_0x409e6a(0x1b5)]);}else _0x584fc3['type']==='wait'&&_0x3c1cf4(_0x584fc3[_0x409e6a(0x198)][_0x409e6a(0x192)]?.[_0x409e6a(0x1b5)]);}}};_0x3c1cf4(_0x44cd8d[_0x46fa2e(0x1b3)]?.[_0x46fa2e(0x1b5)]);if(_0x44cd8d[_0x46fa2e(0x184)])for(const _0x2ae84a of _0x44cd8d[_0x46fa2e(0x184)]){_0x3c1cf4(_0x2ae84a[_0x46fa2e(0x1b3)]?.[_0x46fa2e(0x1b5)]),_0x4e4e38(_0x2ae84a[_0x46fa2e(0x17c)]);}_0x44cd8d[_0x46fa2e(0x17c)]&&_0x4e4e38(_0x44cd8d[_0x46fa2e(0x17c)]);if(_0x44cd8d['versions'])for(const _0x597a6d of _0x44cd8d['versions']){_0x4e4e38(_0x597a6d['stages']);}return _0x2a7379;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x7dba6a,_0x4a609c){const _0x1a76b9=a163_0x109c,_0x397b0a=_0x7dba6a();while(!![]){try{const _0x3d596f=parseInt(_0x1a76b9(0x1f5))/0x1+parseInt(_0x1a76b9(0x249))/0x2+parseInt(_0x1a76b9(0x265))/0x3+parseInt(_0x1a76b9(0x211))/0x4*(parseInt(_0x1a76b9(0x22c))/0x5)+-parseInt(_0x1a76b9(0x287))/0x6*(-parseInt(_0x1a76b9(0x29d))/0x7)+-parseInt(_0x1a76b9(0x255))/0x8*(-parseInt(_0x1a76b9(0x24b))/0x9)+-parseInt(_0x1a76b9(0x24e))/0xa*(parseInt(_0x1a76b9(0x20e))/0xb);if(_0x3d596f===_0x4a609c)break;else _0x397b0a['push'](_0x397b0a['shift']());}catch(_0xbb0bce){_0x397b0a['push'](_0x397b0a['shift']());}}}(a163_0x2f3e,0xe7842));function a163_0x109c(_0x447920,_0x2b639c){_0x447920=_0x447920-0x1f1;const _0x2f3e9a=a163_0x2f3e();let _0x109ca2=_0x2f3e9a[_0x447920];return _0x109ca2;}import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0xbdfe84,_0x4028f2,_0x133f58,_0x18777f,_0x4866e6,_0x3983a1){const _0x1197dd=a163_0x109c;return{'level':_0xbdfe84,'path':_0x4028f2,'code':_0x133f58,'message':_0x18777f,'location':getLocationFromPath(_0x4866e6[_0x1197dd(0x253)],_0x4866e6['source'],pathToArray(_0x3983a1??_0x4028f2))};}function validateVersionStructure(_0x13fa2e,_0x52bbd1){const _0x2a0800=a163_0x109c,_0x309235=[];return _0x13fa2e[_0x2a0800(0x254)]>MAX_STAGES&&_0x309235['push'](createIssue('error',_0x2a0800(0x247),_0x2a0800(0x2a0),_0x2a0800(0x1f2)+_0x13fa2e[_0x2a0800(0x254)]+_0x2a0800(0x240)+MAX_STAGES,_0x52bbd1)),_0x309235;}function validateStageStructure(_0x445bc2,_0x11cf54,_0x45c361,_0x20e5a5){const _0x4408f0=a163_0x109c,_0x3641ae=[],_0x46f0c2=_0x4408f0(0x285)+_0x11cf54+']';_0x11cf54===0x0&&!_0x445bc2[_0x4408f0(0x279)]&&_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x238),_0x46f0c2+_0x4408f0(0x213),_0x4408f0(0x267),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x1f4),_0x20e5a5,_0x46f0c2));const _0x3352ec=_0x11cf54===_0x45c361-0x1;!_0x3352ec&&!_0x445bc2['milestone']&&_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x238),_0x46f0c2+_0x4408f0(0x22d),_0x4408f0(0x26f),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x29a),_0x20e5a5,_0x46f0c2));(!_0x445bc2[_0x4408f0(0x288)]||_0x445bc2['exit_criteria'][_0x4408f0(0x254)]===0x0)&&_0x3641ae['push'](createIssue(_0x4408f0(0x21a),_0x46f0c2+'.exit_criteria',_0x4408f0(0x278),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x261),_0x20e5a5,_0x46f0c2));const _0x166fab=_0x445bc2['steps']?.[_0x4408f0(0x254)]??0x0;if(_0x166fab===0x0)_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x238),_0x46f0c2+_0x4408f0(0x284),_0x4408f0(0x262),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+'\x27\x20has\x20no\x20steps',_0x20e5a5,_0x46f0c2+_0x4408f0(0x284)));else{if(_0x166fab===0x1)_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x21a),_0x46f0c2+'.steps',_0x4408f0(0x262),'Stage\x20\x27'+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x224),_0x20e5a5,_0x46f0c2+_0x4408f0(0x284)));else _0x166fab<=0x3&&_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x21a),_0x46f0c2+'.steps','FEW_STEPS',_0x4408f0(0x26c)+_0x445bc2['name']+'\x27\x20has\x20only\x20'+_0x166fab+_0x4408f0(0x28d),_0x20e5a5,_0x46f0c2+_0x4408f0(0x284)));}return _0x3641ae;}function validateStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6){const _0x58e636=a163_0x109c,_0x1a4bc6=[];if(_0x44325f['type']==='end')return _0x44325f[_0x58e636(0x233)]&&_0x1a4bc6[_0x58e636(0x234)](createIssue(_0x58e636(0x238),_0x2f32e5+_0x58e636(0x291),_0x58e636(0x27d),_0x58e636(0x266)+_0x44325f['name']+_0x58e636(0x274),_0x2b6407)),_0x58e636(0x271)in _0x44325f&&_0x44325f['with']!==undefined&&_0x1a4bc6[_0x58e636(0x234)](createIssue(_0x58e636(0x238),_0x2f32e5+_0x58e636(0x24a),_0x58e636(0x27d),_0x58e636(0x266)+_0x44325f[_0x58e636(0x24d)]+_0x58e636(0x256),_0x2b6407)),_0x1a4bc6;_0x44325f[_0x58e636(0x233)]&&(_0x2b6407[_0x58e636(0x26e)]&&!_0x2b6407[_0x58e636(0x26e)]['has'](_0x44325f['next'])&&_0x1a4bc6[_0x58e636(0x234)](createIssue(_0x58e636(0x238),_0x2f32e5+_0x58e636(0x291),_0x58e636(0x294),_0x58e636(0x24f)+_0x44325f[_0x58e636(0x233)]+'\x27',_0x2b6407)));switch(_0x44325f[_0x58e636(0x202)]){case _0x58e636(0x270):_0x1a4bc6[_0x58e636(0x234)](...validateWaitStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6));break;case _0x58e636(0x20c):_0x1a4bc6[_0x58e636(0x234)](...validateActivationStep(_0x44325f,_0x2f32e5,_0x2b6407));break;case _0x58e636(0x250):_0x1a4bc6[_0x58e636(0x234)](...validateDecisionPointStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6));break;case _0x58e636(0x225):_0x1a4bc6[_0x58e636(0x234)](...validateAbTestStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6));break;case _0x58e636(0x29b):_0x1a4bc6[_0x58e636(0x234)](...validateJumpStep(_0x44325f,_0x2f32e5,_0x2b6407));break;}return _0x1a4bc6;}function a163_0x2f3e(){const _0x2b5c6f=['448XvxZSc','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','safeParse','BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','A/B\x20test\x20variant\x20\x27','description','\x27\x20(first\x20defined\x20at\x20steps[','segment','.with.target','values','ACTIVATION_SCHEMA_ERROR','\x27\x20has\x20no\x20exit_criteria\x20defined','INSUFFICIENT_STEPS','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','target','132480umRjcq','End\x20step\x20\x27','MISSING_ENTRY_CRITERIA','percentage','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','\x20with\x20latest:\x20true','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Stage\x20\x27','Embedded\x20segment\x20\x27','stepNames','MISSING_MILESTONE','wait','with','splice','.with.activation','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','.with.condition.timeout.next','Jump\x20step\x20requires\x20a\x20target','.with.variants[','MISSING_EXIT_CRITERIA','entry_criteria','MISSING_CONDITIONS','MISSING_STAGES','set','END_STEP_HAS_NEXT_OR_WITH','level','.with.condition','abs','\x20versions)','Journey\x20can\x20have\x20at\x20most\x20one\x20','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.steps','stages[','.with.variants','300BYoyup','exit_criteria','launched','Journey\x20name\x20is\x20required','.segment','add','\x20steps\x20(may\x20be\x20too\x20simple)','ref:','every','size','.next','Merge\x20step\x20\x27','keys','INVALID_NEXT_REFERENCE','entries','.exit_criteria[','Criteria\x20references\x20undefined\x20segment\x20\x27','replace','referencedSegments','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','jump','branches','98658qFBnPv','.with.condition.timeout',').\x20Merge\x20is\x20unnecessary.','TOO_MANY_STAGES','excluded','goalIsInherited','symbol','.with.condition.segment','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','map','variant\x20\x27','message','Journey\x20has\x20','.name','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','1356776oAiFFE','path','\x27\x20has\x20no\x20end\x20step','latest','match','excluded_','segments.','MISSING_SEGMENT_REFERENCE','state','branch\x20\x27','\x27\x20(from:\x20','source','.with.condition.next','type','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','startsWith','timeout',').\x20Use\x20a\x20merge\x20step.','goal','Journey\x20has\x20no\x20goal\x20defined','steps','DUPLICATE_STEP_NAME','activation','end','358721GyctVZ','journey','MISSING_NAME','8GlUoiF','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.entry_criteria','SINGLE_INPUT_MERGE','merge','embeddedSegments','INVALID_AB_TEST_PERCENTAGES','CONVERGENCE_WITHOUT_MERGE','MISSING_END_STEP','warning','MISSING_ACTIVATION_REF','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','versions','INVALID_JUMP_TARGET','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','get','versions[','segments','indices','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','ab_test','journeys,\x20stages,\x20or\x20versions','milestone','.stages','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','timeout\x20of\x20\x27','4143550kMqInh','.milestone','.rule','has','variants','DUPLICATE_LATEST','endsWith','next','push','reduce','\x27\x20of\x20\x27','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','error','rule','includes','code','join','MISSING_WAIT_PARAMS','condition\x20of\x20\x27','journeys','\x20stages\x20but\x20maximum\x20is\x20','condition','.with.branches[','some','JOURNEY_SCHEMA_ERROR','activationKeys','\x27\x20with\x20no\x20action\x20in\x20between','stages','filter','3749056fIDDRm','.with','179271oRNMaq','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','name','1780FKtvtq','Step\x20references\x20non-existent\x20step\x20\x27','decision_point','activations','step\x20\x27','document','length'];a163_0x2f3e=function(){return _0x2b5c6f;};return a163_0x2f3e();}function validateWaitStep(_0x3b7a09,_0xa68dc1,_0x3b90ae,_0x12fa7f){const _0x38d696=a163_0x109c,_0x568f00=[];if(!_0x3b7a09[_0x38d696(0x271)])return _0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x238),_0xa68dc1+_0x38d696(0x24a),_0x38d696(0x23d),_0x38d696(0x24c),_0x3b90ae,_0xa68dc1)),_0x568f00;if(_0x3b7a09[_0x38d696(0x271)][_0x38d696(0x241)]){const _0xf43cbd=_0x3b7a09[_0x38d696(0x271)]['condition'];if(_0xf43cbd[_0x38d696(0x25d)]){_0x3b90ae[_0x38d696(0x299)]?.[_0x38d696(0x28c)](_0xf43cbd[_0x38d696(0x25d)]);!_0xf43cbd['segment']['startsWith'](_0x38d696(0x28e))&&(_0x3b90ae[_0x38d696(0x216)]&&!_0x3b90ae[_0x38d696(0x216)][_0x38d696(0x22f)](_0xf43cbd['segment'])&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x238),_0xa68dc1+_0x38d696(0x2a4),_0x38d696(0x1fc),_0x38d696(0x204)+_0xf43cbd['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x3b90ae)));_0xf43cbd[_0x38d696(0x233)]&&_0x3b90ae[_0x38d696(0x26e)]&&!_0x3b90ae[_0x38d696(0x26e)][_0x38d696(0x22f)](_0xf43cbd[_0x38d696(0x233)])&&_0x568f00[_0x38d696(0x234)](createIssue('error',_0xa68dc1+'.with.condition.next','INVALID_NEXT_REFERENCE',_0x38d696(0x237)+_0xf43cbd[_0x38d696(0x233)]+'\x27',_0x3b90ae));_0xf43cbd['timeout']?.['next']&&_0x3b90ae[_0x38d696(0x26e)]&&!_0x3b90ae[_0x38d696(0x26e)][_0x38d696(0x22f)](_0xf43cbd[_0x38d696(0x206)][_0x38d696(0x233)])&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x238),_0xa68dc1+_0x38d696(0x275),_0x38d696(0x294),_0x38d696(0x229)+_0xf43cbd[_0x38d696(0x206)]['next']+'\x27',_0x3b90ae));const _0x28b18e=_0xf43cbd['next']||_0x3b7a09['next'],_0x548860=_0xf43cbd['timeout']?.[_0x38d696(0x233)]||_0x3b7a09[_0x38d696(0x233)];if(_0x28b18e){const _0x5608d4=_0x12fa7f[_0x38d696(0x220)](_0x28b18e);_0x5608d4?.[_0x38d696(0x202)]==='merge'&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x21a),_0xa68dc1+_0x38d696(0x201),_0x38d696(0x258),_0x38d696(0x22a)+_0x28b18e+_0x38d696(0x2a6),_0x3b90ae,_0xa68dc1+_0x38d696(0x27f)));}if(_0x548860){const _0x2ca749=_0x12fa7f[_0x38d696(0x220)](_0x548860);_0x2ca749?.[_0x38d696(0x202)]===_0x38d696(0x215)&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x21a),_0xa68dc1+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x548860+_0x38d696(0x2a6),_0x3b90ae,_0xa68dc1+_0x38d696(0x29e)));}}}return _0x568f00;}function validateActivationStep(_0x2152dc,_0x211bcf,_0x3f212e){const _0x41b41e=a163_0x109c,_0x456baa=[];if(!_0x2152dc[_0x41b41e(0x271)]?.[_0x41b41e(0x20c)])return _0x456baa[_0x41b41e(0x234)](createIssue('error',_0x211bcf+_0x41b41e(0x273),_0x41b41e(0x21b),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x3f212e,_0x211bcf)),_0x456baa;const _0x321595=_0x2152dc['with'][_0x41b41e(0x20c)];return _0x3f212e['activationKeys']&&!_0x321595[_0x41b41e(0x205)](_0x41b41e(0x28e))&&(!_0x3f212e[_0x41b41e(0x245)][_0x41b41e(0x22f)](_0x321595)&&_0x456baa[_0x41b41e(0x234)](createIssue(_0x41b41e(0x238),_0x211bcf+_0x41b41e(0x273),'MISSING_ACTIVATION_DEFINITION',_0x41b41e(0x21c)+_0x321595+_0x41b41e(0x269),_0x3f212e))),_0x456baa;}function validateDecisionPointStep(_0x5ac215,_0x5328f8,_0x178310,_0x1f0def){const _0x592592=a163_0x109c,_0x4c902e=[];if(!_0x5ac215[_0x592592(0x271)]?.[_0x592592(0x29c)]||_0x5ac215[_0x592592(0x271)][_0x592592(0x29c)][_0x592592(0x254)]===0x0)return _0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x238),_0x5328f8+'.with.branches','MISSING_CONDITIONS','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x178310,_0x5328f8)),_0x4c902e;for(let _0x19ed16=0x0;_0x19ed16<_0x5ac215[_0x592592(0x271)][_0x592592(0x29c)][_0x592592(0x254)];_0x19ed16++){const _0x278ce8=_0x5ac215[_0x592592(0x271)]['branches'][_0x19ed16],_0x5bb675=_0x5328f8+_0x592592(0x242)+_0x19ed16+']';_0x278ce8[_0x592592(0x25d)]&&!_0x278ce8[_0x592592(0x2a1)]&&(_0x178310[_0x592592(0x299)]?.[_0x592592(0x28c)](_0x278ce8[_0x592592(0x25d)]),!_0x278ce8[_0x592592(0x25d)][_0x592592(0x205)](_0x592592(0x28e))&&(_0x178310[_0x592592(0x216)]&&!_0x178310[_0x592592(0x216)]['has'](_0x278ce8[_0x592592(0x25d)])&&_0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x238),_0x5bb675+_0x592592(0x28b),_0x592592(0x1fc),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x278ce8[_0x592592(0x25d)]+'\x27',_0x178310))));_0x278ce8[_0x592592(0x233)]&&_0x178310['stepNames']&&!_0x178310[_0x592592(0x26e)]['has'](_0x278ce8[_0x592592(0x233)])&&_0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x238),_0x5bb675+'.next','INVALID_NEXT_REFERENCE',_0x592592(0x259)+_0x278ce8[_0x592592(0x233)]+'\x27',_0x178310));if(_0x278ce8['next']){const _0x511946=_0x1f0def[_0x592592(0x220)](_0x278ce8['next']);_0x511946?.[_0x592592(0x202)]===_0x592592(0x215)&&_0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x21a),_0x5bb675+_0x592592(0x291),_0x592592(0x258),'Decision\x20branch\x20\x27'+_0x278ce8[_0x592592(0x24d)]+_0x592592(0x26b)+_0x278ce8[_0x592592(0x233)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x178310));}}return _0x4c902e;}function validateAbTestStep(_0xc37e83,_0xee3991,_0x116641,_0x454be3){const _0x31cf07=a163_0x109c,_0x373f7e=[];if(!_0xc37e83['with']?.['variants']||_0xc37e83[_0x31cf07(0x271)][_0x31cf07(0x230)]['length']===0x0)return _0x373f7e[_0x31cf07(0x234)](createIssue(_0x31cf07(0x238),_0xee3991+'.with.variants',_0x31cf07(0x27a),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x116641,_0xee3991)),_0x373f7e;const _0x1490b0=_0xc37e83[_0x31cf07(0x271)]['variants'][_0x31cf07(0x235)]((_0x26b2b7,_0x3afc85)=>_0x26b2b7+(_0x3afc85[_0x31cf07(0x268)]||0x0),0x0);Math[_0x31cf07(0x280)](_0x1490b0-0x64)>0.01&&_0x373f7e['push'](createIssue(_0x31cf07(0x238),_0xee3991+_0x31cf07(0x286),_0x31cf07(0x217),_0x31cf07(0x212)+_0x1490b0+'%)',_0x116641));for(let _0x3f93ba=0x0;_0x3f93ba<_0xc37e83['with'][_0x31cf07(0x230)][_0x31cf07(0x254)];_0x3f93ba++){const _0x28e212=_0xc37e83[_0x31cf07(0x271)][_0x31cf07(0x230)][_0x3f93ba],_0x56b309=_0xee3991+_0x31cf07(0x277)+_0x3f93ba+']';_0x28e212[_0x31cf07(0x233)]&&_0x116641[_0x31cf07(0x26e)]&&!_0x116641[_0x31cf07(0x26e)]['has'](_0x28e212['next'])&&_0x373f7e[_0x31cf07(0x234)](createIssue(_0x31cf07(0x238),_0x56b309+'.next','INVALID_NEXT_REFERENCE',_0x31cf07(0x21f)+_0x28e212[_0x31cf07(0x233)]+'\x27',_0x116641));if(_0x28e212[_0x31cf07(0x233)]){const _0x3acf63=_0x454be3[_0x31cf07(0x220)](_0x28e212[_0x31cf07(0x233)]);_0x3acf63?.[_0x31cf07(0x202)]===_0x31cf07(0x215)&&_0x373f7e[_0x31cf07(0x234)](createIssue(_0x31cf07(0x21a),_0x56b309+_0x31cf07(0x291),_0x31cf07(0x258),_0x31cf07(0x25a)+_0x28e212[_0x31cf07(0x24d)]+_0x31cf07(0x26b)+_0x28e212[_0x31cf07(0x233)]+_0x31cf07(0x246),_0x116641));}}return _0x373f7e;}function validateJumpStep(_0x2efebe,_0x25d8e4,_0x56c012){const _0x231a3e=a163_0x109c,_0xa0e645=[];if(!_0x2efebe['with']?.['target'])return _0xa0e645[_0x231a3e(0x234)](createIssue(_0x231a3e(0x238),_0x25d8e4+'.with.target',_0x231a3e(0x21e),_0x231a3e(0x276),_0x56c012,_0x25d8e4)),_0xa0e645;return(!_0x2efebe[_0x231a3e(0x271)][_0x231a3e(0x264)][_0x231a3e(0x20f)]||!_0x2efebe[_0x231a3e(0x271)][_0x231a3e(0x264)]['stage'])&&_0xa0e645[_0x231a3e(0x234)](createIssue('error',_0x25d8e4+_0x231a3e(0x25e),_0x231a3e(0x21e),_0x231a3e(0x2a5),_0x56c012)),_0xa0e645;}function buildConvergenceMap(_0x131726){const _0x296ca5=a163_0x109c,_0x26ea83=new Map();function _0x1d0290(_0x1f3a0b,_0x29267d){const _0x38cc7a=a163_0x109c,_0x2f8749=_0x26ea83[_0x38cc7a(0x220)](_0x1f3a0b)||[];_0x2f8749['push'](_0x29267d),_0x26ea83['set'](_0x1f3a0b,_0x2f8749);}for(const _0x4523af of _0x131726){_0x4523af[_0x296ca5(0x233)]&&_0x1d0290(_0x4523af['next'],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x252)+_0x4523af['name']+'\x27'});if(_0x4523af[_0x296ca5(0x202)]==='decision_point'&&_0x4523af[_0x296ca5(0x271)]?.[_0x296ca5(0x29c)])for(const _0x4e7b0e of _0x4523af['with']['branches']){_0x4e7b0e[_0x296ca5(0x233)]&&_0x1d0290(_0x4e7b0e[_0x296ca5(0x233)],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x1fe)+_0x4e7b0e[_0x296ca5(0x24d)]+_0x296ca5(0x236)+_0x4523af['name']+'\x27'});}if(_0x4523af[_0x296ca5(0x202)]===_0x296ca5(0x225)&&_0x4523af[_0x296ca5(0x271)]?.[_0x296ca5(0x230)])for(const _0x5d6483 of _0x4523af[_0x296ca5(0x271)]['variants']){_0x5d6483['next']&&_0x1d0290(_0x5d6483[_0x296ca5(0x233)],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x2a8)+_0x5d6483[_0x296ca5(0x24d)]+_0x296ca5(0x236)+_0x4523af[_0x296ca5(0x24d)]+'\x27'});}_0x4523af[_0x296ca5(0x202)]==='wait'&&_0x4523af[_0x296ca5(0x271)]?.[_0x296ca5(0x241)]&&(_0x4523af[_0x296ca5(0x271)][_0x296ca5(0x241)][_0x296ca5(0x233)]&&_0x1d0290(_0x4523af['with'][_0x296ca5(0x241)]['next'],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x23e)+_0x4523af[_0x296ca5(0x24d)]+'\x27'}),_0x4523af[_0x296ca5(0x271)][_0x296ca5(0x241)][_0x296ca5(0x206)]?.[_0x296ca5(0x233)]&&_0x1d0290(_0x4523af['with'][_0x296ca5(0x241)][_0x296ca5(0x206)][_0x296ca5(0x233)],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x22b)+_0x4523af[_0x296ca5(0x24d)]+'\x27'}));}return _0x26ea83;}function validateFlowControl(_0x2a8d4b,_0x1357b3,_0x5d57d4){const _0x344ccc=a163_0x109c,_0x155176=[],_0x5295a1='stages['+_0x1357b3+']',_0x55fbb2=_0x2a8d4b[_0x344ccc(0x20a)]||[];if(_0x55fbb2[_0x344ccc(0x254)]===0x0)return _0x155176;const _0x127b7b=new Map();for(const _0x19e88e of _0x55fbb2){_0x19e88e['name']&&_0x127b7b[_0x344ccc(0x27c)](_0x19e88e[_0x344ccc(0x24d)],_0x19e88e);}const _0x3e8320=buildConvergenceMap(_0x55fbb2),_0x2f576d=_0x55fbb2[_0x344ccc(0x243)](_0x18d8c0=>_0x18d8c0[_0x344ccc(0x202)]===_0x344ccc(0x20d));!_0x2f576d&&_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x238),_0x5295a1+_0x344ccc(0x284),_0x344ccc(0x219),_0x344ccc(0x26c)+_0x2a8d4b['name']+_0x344ccc(0x1f7),_0x5d57d4));for(const [_0x578ac2,_0x493920]of _0x3e8320){const _0x3be3b7=_0x127b7b[_0x344ccc(0x220)](_0x578ac2);if(!_0x3be3b7)continue;if(_0x493920['length']>0x1&&_0x3be3b7[_0x344ccc(0x202)]!==_0x344ccc(0x215)){const _0x53c1a9=_0x493920[_0x344ccc(0x2a7)](_0x286dfa=>_0x286dfa['description'])[_0x344ccc(0x23c)](',\x20');_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x238),_0x5295a1+'.steps',_0x344ccc(0x218),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x578ac2+_0x344ccc(0x1ff)+_0x53c1a9+_0x344ccc(0x207),_0x5d57d4));}_0x493920[_0x344ccc(0x254)]===0x1&&_0x3be3b7[_0x344ccc(0x202)]==='merge'&&_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x21a),_0x5295a1+_0x344ccc(0x284),_0x344ccc(0x214),_0x344ccc(0x292)+_0x578ac2+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x493920[0x0][_0x344ccc(0x25b)]+_0x344ccc(0x29f),_0x5d57d4));}for(const _0x3236d1 of _0x55fbb2){if(_0x3236d1[_0x344ccc(0x202)]===_0x344ccc(0x215)&&_0x3236d1[_0x344ccc(0x233)]){const _0x46fa8a=_0x127b7b[_0x344ccc(0x220)](_0x3236d1['next']);_0x46fa8a?.[_0x344ccc(0x202)]===_0x344ccc(0x215)&&_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x238),_0x5295a1+'.steps','MERGE_TO_MERGE_CHAIN',_0x344ccc(0x292)+_0x3236d1[_0x344ccc(0x24d)]+_0x344ccc(0x263)+_0x3236d1[_0x344ccc(0x233)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x5d57d4));}}return _0x155176;}function validateCriteria(_0x1a7681,_0x581777,_0x4e5f09){const _0x6db63d=a163_0x109c,_0x556ada=[];return _0x1a7681[_0x6db63d(0x25d)]&&(_0x4e5f09['referencedSegments']?.[_0x6db63d(0x28c)](_0x1a7681[_0x6db63d(0x25d)]),!_0x1a7681[_0x6db63d(0x25d)][_0x6db63d(0x205)]('ref:')&&(_0x4e5f09[_0x6db63d(0x216)]&&!_0x4e5f09['embeddedSegments'][_0x6db63d(0x22f)](_0x1a7681[_0x6db63d(0x25d)])&&_0x556ada[_0x6db63d(0x234)](createIssue(_0x6db63d(0x238),_0x581777+_0x6db63d(0x28b),_0x6db63d(0x1fc),_0x6db63d(0x297)+_0x1a7681['segment']+'\x27',_0x4e5f09)))),_0x556ada;}function validateEmbeddedSegment(_0xd331ea,_0x4678ef,_0x3ec61b){const _0x13a6a3=a163_0x109c,_0x2f5677=[];return _0xd331ea[_0x13a6a3(0x239)]&&_0x2f5677[_0x13a6a3(0x234)](...validateRuleDef(_0xd331ea[_0x13a6a3(0x239)],_0x4678ef+_0x13a6a3(0x22e),_0x3ec61b)),_0x2f5677;}function validateStage(_0x589f37,_0x103a1b,_0x298fbb,_0xd8f960){const _0x4b2104=a163_0x109c,_0x56ccb4=[],_0x284208=_0x4b2104(0x285)+_0x103a1b+']',_0x3fd623=new Map(),_0x435732=new Map();if(_0x589f37[_0x4b2104(0x20a)]){for(let _0xd37cff=0x0;_0xd37cff<_0x589f37[_0x4b2104(0x20a)][_0x4b2104(0x254)];_0xd37cff++){const _0x20414c=_0x589f37['steps'][_0xd37cff];_0x20414c[_0x4b2104(0x24d)]&&_0x3fd623['set'](_0x20414c['name'],_0x20414c);}for(let _0x4d8050=0x0;_0x4d8050<_0x589f37[_0x4b2104(0x20a)][_0x4b2104(0x254)];_0x4d8050++){const _0x59858a=_0x589f37[_0x4b2104(0x20a)][_0x4d8050],_0x2b1081=_0x284208+'.steps['+_0x4d8050+']';if(_0x59858a['name']){if(_0x435732[_0x4b2104(0x22f)](_0x59858a[_0x4b2104(0x24d)])){const _0x49d5b4=_0x435732[_0x4b2104(0x220)](_0x59858a['name']);_0x56ccb4[_0x4b2104(0x234)](createIssue(_0x4b2104(0x238),_0x2b1081+_0x4b2104(0x1f3),_0x4b2104(0x20b),'Duplicate\x20step\x20name\x20\x27'+_0x59858a[_0x4b2104(0x24d)]+_0x4b2104(0x25c)+_0x49d5b4+'])',_0xd8f960));}else _0x435732[_0x4b2104(0x27c)](_0x59858a[_0x4b2104(0x24d)],_0x4d8050);}_0x56ccb4[_0x4b2104(0x234)](...validateStep(_0x59858a,_0x2b1081,_0xd8f960,_0x3fd623));}}_0x589f37['entry_criteria']&&_0x56ccb4[_0x4b2104(0x234)](...validateCriteria(_0x589f37[_0x4b2104(0x279)],_0x284208+_0x4b2104(0x213),_0xd8f960));if(_0x589f37[_0x4b2104(0x288)])for(let _0xec7115=0x0;_0xec7115<_0x589f37['exit_criteria'][_0x4b2104(0x254)];_0xec7115++){_0x56ccb4['push'](...validateCriteria(_0x589f37[_0x4b2104(0x288)][_0xec7115],_0x284208+_0x4b2104(0x296)+_0xec7115+']',_0xd8f960));}return _0x589f37['milestone']&&_0x56ccb4[_0x4b2104(0x234)](...validateCriteria(_0x589f37[_0x4b2104(0x227)],_0x284208+'.milestone',_0xd8f960)),_0x56ccb4[_0x4b2104(0x234)](...validateStageStructure(_0x589f37,_0x103a1b,_0x298fbb,_0xd8f960)),_0x56ccb4[_0x4b2104(0x234)](...validateFlowControl(_0x589f37,_0x103a1b,_0xd8f960)),_0x56ccb4;}function validateStagesForVersion(_0x27d653,_0xc87b11,_0x596c75,_0x3a7c6e,_0x8d0ea,_0x5eae83,_0x36997c){const _0xb6efe8=a163_0x109c;if(_0x27d653['length']===0x0){_0x8d0ea[_0xb6efe8(0x234)]({'level':_0xb6efe8(0x238),'path':_0x3a7c6e+'stages','code':_0xb6efe8(0x27b),'message':_0xb6efe8(0x203),'location':getLocationFromPath(_0x596c75[_0xb6efe8(0x253)],_0x596c75[_0xb6efe8(0x200)],[_0xb6efe8(0x247)])});return;}const _0x5f3ad9=new Set();for(const _0x31d079 of _0x27d653){if(_0x31d079[_0xb6efe8(0x20a)])for(const _0x1d5b8a of _0x31d079[_0xb6efe8(0x20a)]){_0x1d5b8a[_0xb6efe8(0x24d)]&&_0x5f3ad9['add'](_0x1d5b8a[_0xb6efe8(0x24d)]);}}const _0x4503a1={..._0x596c75,'stepNames':_0x5f3ad9},_0xb53f74=validateVersionStructure(_0x27d653,_0x4503a1);for(const _0x7291f2 of _0xb53f74){const _0x4c0665=_0x3a7c6e?{..._0x7291f2,'path':''+_0x3a7c6e+_0x7291f2[_0xb6efe8(0x1f6)]}:_0x7291f2;if(_0x4c0665[_0xb6efe8(0x27e)]===_0xb6efe8(0x238))_0x8d0ea[_0xb6efe8(0x234)](_0x4c0665);else _0x5eae83[_0xb6efe8(0x234)](_0x4c0665);}for(let _0x264c63=0x0;_0x264c63<_0x27d653[_0xb6efe8(0x254)];_0x264c63++){const _0x43a889=validateStage(_0x27d653[_0x264c63],_0x264c63,_0x27d653[_0xb6efe8(0x254)],_0x4503a1);for(const _0x509ae1 of _0x43a889){const _0x83883a=_0x3a7c6e?{..._0x509ae1,'path':''+_0x3a7c6e+_0x509ae1[_0xb6efe8(0x1f6)]}:_0x509ae1;if(_0x83883a['level']===_0xb6efe8(0x238))_0x8d0ea[_0xb6efe8(0x234)](_0x83883a);else _0x5eae83[_0xb6efe8(0x234)](_0x83883a);}}if(_0xc87b11[_0xb6efe8(0x208)]){const _0x32cbd1=_0x36997c?.[_0xb6efe8(0x2a2)]?'goal':_0x3a7c6e+_0xb6efe8(0x208),_0x5252b3=validateCriteria(_0xc87b11[_0xb6efe8(0x208)],_0x32cbd1,_0x4503a1);for(const _0x1edfb6 of _0x5252b3){if(_0x1edfb6['level']===_0xb6efe8(0x238))_0x8d0ea[_0xb6efe8(0x234)](_0x1edfb6);else _0x5eae83[_0xb6efe8(0x234)](_0x1edfb6);}}}function extractVersionIndex(_0x50b1ca){const _0x607473=a163_0x109c,_0x1d2468=_0x50b1ca[_0x607473(0x1f9)](/^journeys\[(\d+)\]\./);return _0x1d2468?_0x1d2468[0x1]:undefined;}function deduplicateAcrossVersions(_0x247fea){const _0x156fa0=a163_0x109c,_0x4bbf3e=new Map();for(let _0x32a9ed=0x0;_0x32a9ed<_0x247fea['length'];_0x32a9ed++){const _0x72bd8=_0x247fea[_0x32a9ed][_0x156fa0(0x23b)]+':'+_0x247fea[_0x32a9ed][_0x156fa0(0x1f1)],_0xfb0914=extractVersionIndex(_0x247fea[_0x32a9ed][_0x156fa0(0x1f6)]),_0x20d3db=_0x4bbf3e[_0x156fa0(0x220)](_0x72bd8);if(_0x20d3db){_0x20d3db[_0x156fa0(0x223)][_0x156fa0(0x234)](_0x32a9ed);if(_0xfb0914)_0x20d3db['versions'][_0x156fa0(0x28c)](_0xfb0914);}else _0x4bbf3e[_0x156fa0(0x27c)](_0x72bd8,{'indices':[_0x32a9ed],'versions':new Set(_0xfb0914?[_0xfb0914]:[])});}const _0x28305b=new Set();for(const {indices:_0x2e58d2,versions:_0x4b44de}of _0x4bbf3e[_0x156fa0(0x25f)]()){if(_0x4b44de['size']<=0x1)continue;const _0x4d576d=_0x247fea[_0x2e58d2[0x0]];_0x4d576d[_0x156fa0(0x1f6)]=_0x4d576d[_0x156fa0(0x1f6)][_0x156fa0(0x298)](/^journeys\[\d+\]\./,''),_0x4d576d[_0x156fa0(0x1f1)]=_0x4d576d[_0x156fa0(0x1f1)]+'\x20(across\x20'+_0x4b44de[_0x156fa0(0x290)]+_0x156fa0(0x281);for(let _0x11e604=0x1;_0x11e604<_0x2e58d2['length'];_0x11e604++){_0x28305b['add'](_0x2e58d2[_0x11e604]);}}const _0x4928dd=[..._0x28305b]['sort']((_0x54ec63,_0x293625)=>_0x293625-_0x54ec63);for(const _0x44add0 of _0x4928dd){_0x247fea[_0x156fa0(0x272)](_0x44add0,0x1);}}export function validateJourneyDef(_0x216aa5,_0x55636a={},_0x4d2c40={}){const _0x4db1e7=a163_0x109c;if(_0x4d2c40['skipSchema'])return runJourneySemanticChecks(_0x216aa5,_0x55636a);const _0x66f819=JourneyDefSchema[_0x4db1e7(0x257)](_0x216aa5);if(_0x66f819['success'])return runJourneySemanticChecks(_0x66f819['data'],_0x55636a);return zodErrorsToJourneyValidationResult(_0x66f819[_0x4db1e7(0x238)],_0x55636a);}function zodErrorsToJourneyValidationResult(_0x46fd49,_0x706372){const _0xb3a823=a163_0x109c,_0x440ca5=flattenZodIssues(_0x46fd49['issues']),_0x11ed37=_0x440ca5[_0xb3a823(0x2a7)](_0x55ec97=>{const _0x4b15c9=_0xb3a823,_0x2294d0=formatZodPath(_0x55ec97[_0x4b15c9(0x1f6)]),_0x2ede44=mapJourneyZodIssueToCode(_0x55ec97,_0x2294d0),_0x1fe491=getLocationFromPath(_0x706372[_0x4b15c9(0x253)],_0x706372['source'],_0x55ec97['path'][_0x4b15c9(0x2a7)](_0x45b001=>typeof _0x45b001===_0x4b15c9(0x2a3)?String(_0x45b001):_0x45b001));return{'level':'error','path':_0x2294d0,'code':_0x2ede44,'message':_0x55ec97[_0x4b15c9(0x1f1)],..._0x1fe491&&{'location':_0x1fe491}};});return{'valid':![],'errors':_0x11ed37,'warnings':[]};}function mapJourneyZodIssueToCode(_0xcf9f76,_0x2a8660){const _0x114c73=a163_0x109c;if(_0x2a8660==='name')return _0x114c73(0x210);if(_0x2a8660[_0x114c73(0x232)]('.type')&&_0x2a8660[_0x114c73(0x23a)](_0x114c73(0x20a)))return _0x114c73(0x244);if(_0x2a8660===_0x114c73(0x247)||_0x2a8660[_0x114c73(0x232)](_0x114c73(0x228)))return _0x114c73(0x27b);if(_0x2a8660===''&&_0xcf9f76[_0x114c73(0x1f1)][_0x114c73(0x23a)](_0x114c73(0x226)))return _0x114c73(0x27b);if(_0x2a8660[_0x114c73(0x23a)]('activation'))return _0x114c73(0x260);return _0x114c73(0x244);}function runJourneySemanticChecks(_0x983c0a,_0x160ac5){const _0x5e8dd5=a163_0x109c,_0x4664c9=[],_0x274734=[];(!_0x983c0a['name']||_0x983c0a[_0x5e8dd5(0x24d)]['trim']()==='')&&_0x4664c9[_0x5e8dd5(0x234)]({'level':_0x5e8dd5(0x238),'path':'name','code':_0x5e8dd5(0x210),'message':_0x5e8dd5(0x28a),'location':getLocationFromPath(_0x160ac5[_0x5e8dd5(0x253)],_0x160ac5[_0x5e8dd5(0x200)],[_0x5e8dd5(0x24d)])});const _0x28ba40=new Set();if(_0x983c0a[_0x5e8dd5(0x222)])for(const _0x48f93c of Object[_0x5e8dd5(0x293)](_0x983c0a['segments'])){_0x28ba40[_0x5e8dd5(0x28c)](_0x48f93c);}const _0x18315b=new Set();if(_0x983c0a[_0x5e8dd5(0x251)])for(const _0x204ff2 of Object[_0x5e8dd5(0x293)](_0x983c0a[_0x5e8dd5(0x251)])){_0x18315b[_0x5e8dd5(0x28c)](_0x204ff2);}const _0x49d739=new Set(),_0xc8a812={..._0x160ac5,'embeddedSegments':_0x28ba40,'referencedSegments':_0x49d739,'activationKeys':_0x18315b[_0x5e8dd5(0x290)]>0x0?_0x18315b:undefined};if(_0x983c0a[_0x5e8dd5(0x222)])for(const [_0x42d5ed,_0x8b03d1]of Object[_0x5e8dd5(0x295)](_0x983c0a[_0x5e8dd5(0x222)])){const _0x3ecf70=validateEmbeddedSegment(_0x8b03d1,'segments.'+_0x42d5ed,_0xc8a812);for(const _0x43e843 of _0x3ecf70){if(_0x43e843[_0x5e8dd5(0x27e)]===_0x5e8dd5(0x238))_0x4664c9[_0x5e8dd5(0x234)](_0x43e843);else _0x274734['push'](_0x43e843);}}const _0x2c93cb=!!_0x983c0a[_0x5e8dd5(0x208)],_0x3707dc=_0x983c0a[_0x5e8dd5(0x23f)]?.[_0x5e8dd5(0x28f)](_0x524ec8=>!!_0x524ec8[_0x5e8dd5(0x208)])??![];!_0x2c93cb&&!_0x3707dc&&_0x274734[_0x5e8dd5(0x234)]({'level':'warning','path':_0x5e8dd5(0x208),'code':'MISSING_GOAL','message':_0x5e8dd5(0x209),'location':getLocationFromPath(_0x160ac5['document'],_0x160ac5[_0x5e8dd5(0x200)],[_0x5e8dd5(0x208)])});const _0x2d22d1=_0x983c0a[_0x5e8dd5(0x23f)]??_0x983c0a[_0x5e8dd5(0x21d)];if(_0x2d22d1&&_0x2d22d1[_0x5e8dd5(0x248)](_0x599c13=>_0x599c13[_0x5e8dd5(0x1f8)]===!![])[_0x5e8dd5(0x254)]>0x1){const _0x55aeba=_0x983c0a[_0x5e8dd5(0x23f)]?'journeys':_0x5e8dd5(0x21d);_0x4664c9[_0x5e8dd5(0x234)]({'level':_0x5e8dd5(0x238),'path':_0x55aeba,'code':_0x5e8dd5(0x231),'message':_0x5e8dd5(0x282)+(_0x55aeba===_0x5e8dd5(0x23f)?'journey\x20entry':'version')+_0x5e8dd5(0x26a),'location':getLocationFromPath(_0x160ac5[_0x5e8dd5(0x253)],_0x160ac5[_0x5e8dd5(0x200)],[_0x55aeba])});}if(_0x983c0a['journeys']&&_0x983c0a[_0x5e8dd5(0x23f)]['length']>0x0)for(let _0x39c73d=0x0;_0x39c73d<_0x983c0a[_0x5e8dd5(0x23f)][_0x5e8dd5(0x254)];_0x39c73d++){const _0x178880=_0x983c0a['journeys'][_0x39c73d];if(_0x983c0a[_0x5e8dd5(0x23f)][_0x5e8dd5(0x254)]>0x1&&_0x178880['state']===_0x5e8dd5(0x289))continue;const _0x376152=_0x178880['stages']||[],_0x3a592a='journeys['+_0x39c73d+'].',_0x2b681c=!!_0x178880[_0x5e8dd5(0x208)],_0x71ed15=_0x2b681c?{..._0x983c0a,'goal':_0x178880[_0x5e8dd5(0x208)]}:_0x983c0a;validateStagesForVersion(_0x376152,_0x71ed15,_0xc8a812,_0x3a592a,_0x4664c9,_0x274734,{'goalIsInherited':!_0x2b681c});}else{if(_0x983c0a[_0x5e8dd5(0x21d)]&&_0x983c0a[_0x5e8dd5(0x21d)]['length']>0x0)for(let _0x47414a=0x0;_0x47414a<_0x983c0a['versions'][_0x5e8dd5(0x254)];_0x47414a++){const _0x34b08f=_0x983c0a[_0x5e8dd5(0x21d)][_0x47414a];if(_0x983c0a[_0x5e8dd5(0x21d)]['length']>0x1&&_0x34b08f[_0x5e8dd5(0x1fd)]===_0x5e8dd5(0x289))continue;const _0x23abfb=_0x34b08f['stages']||[],_0x35043e=_0x5e8dd5(0x221)+_0x47414a+'].';validateStagesForVersion(_0x23abfb,_0x983c0a,_0xc8a812,_0x35043e,_0x4664c9,_0x274734);}else{const _0x2585bd=_0x983c0a[_0x5e8dd5(0x247)]||[];validateStagesForVersion(_0x2585bd,_0x983c0a,_0xc8a812,'',_0x4664c9,_0x274734);}}_0x983c0a['journeys']&&_0x983c0a[_0x5e8dd5(0x23f)][_0x5e8dd5(0x254)]>0x1&&(deduplicateAcrossVersions(_0x4664c9),deduplicateAcrossVersions(_0x274734));for(const _0x44bc0d of _0x28ba40){!_0x49d739[_0x5e8dd5(0x22f)](_0x44bc0d)&&!_0x44bc0d['startsWith'](_0x5e8dd5(0x1fa))&&_0x274734['push']({'level':'warning','path':_0x5e8dd5(0x1fb)+_0x44bc0d,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x5e8dd5(0x26d)+_0x44bc0d+_0x5e8dd5(0x283),'location':getLocationFromPath(_0x160ac5['document'],_0x160ac5[_0x5e8dd5(0x200)],[_0x5e8dd5(0x222),_0x44bc0d])});}return{'valid':_0x4664c9[_0x5e8dd5(0x254)]===0x0,'errors':_0x4664c9,'warnings':_0x274734};}
|
|
1
|
+
(function(_0x563e77,_0x10305f){const _0x29b841=a166_0x2e35,_0x44e3f5=_0x563e77();while(!![]){try{const _0x7138a1=parseInt(_0x29b841(0x102))/0x1*(-parseInt(_0x29b841(0x177))/0x2)+parseInt(_0x29b841(0xc9))/0x3*(parseInt(_0x29b841(0xcb))/0x4)+-parseInt(_0x29b841(0x140))/0x5*(parseInt(_0x29b841(0x123))/0x6)+-parseInt(_0x29b841(0xf7))/0x7*(parseInt(_0x29b841(0xd0))/0x8)+parseInt(_0x29b841(0x13a))/0x9+-parseInt(_0x29b841(0x114))/0xa+parseInt(_0x29b841(0x156))/0xb;if(_0x7138a1===_0x10305f)break;else _0x44e3f5['push'](_0x44e3f5['shift']());}catch(_0x3c98a9){_0x44e3f5['push'](_0x44e3f5['shift']());}}}(a166_0x28f5,0x9f694));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x315e97,_0x50e2ba,_0x37bd38,_0xb27aaa,_0x5ba14a,_0x57eb2b){return{'level':_0x315e97,'path':_0x50e2ba,'code':_0x37bd38,'message':_0xb27aaa,'location':getLocationFromPath(_0x5ba14a['document'],_0x5ba14a['source'],pathToArray(_0x57eb2b??_0x50e2ba))};}function validateVersionStructure(_0x297d92,_0x3ea8f4){const _0x534ed6=a166_0x2e35,_0x586b65=[];return _0x297d92[_0x534ed6(0xc6)]>MAX_STAGES&&_0x586b65['push'](createIssue(_0x534ed6(0x10f),_0x534ed6(0x175),_0x534ed6(0x169),_0x534ed6(0xe2)+_0x297d92['length']+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x3ea8f4)),_0x586b65;}function validateStageStructure(_0x4a77a9,_0x2917d9,_0x42be3b,_0x30b496){const _0x3d28ef=a166_0x2e35,_0x447ba8=[],_0x5a83cc='stages['+_0x2917d9+']';_0x2917d9===0x0&&!_0x4a77a9[_0x3d28ef(0xcc)]&&_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x10f),_0x5a83cc+_0x3d28ef(0xcd),_0x3d28ef(0xdc),_0x3d28ef(0xd3)+_0x4a77a9['name']+_0x3d28ef(0x143),_0x30b496,_0x5a83cc));const _0x2614b1=_0x2917d9===_0x42be3b-0x1;!_0x2614b1&&!_0x4a77a9[_0x3d28ef(0xc2)]&&_0x447ba8['push'](createIssue(_0x3d28ef(0x10f),_0x5a83cc+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x4a77a9[_0x3d28ef(0x162)]+_0x3d28ef(0xe5),_0x30b496,_0x5a83cc));(!_0x4a77a9[_0x3d28ef(0x134)]||_0x4a77a9[_0x3d28ef(0x134)][_0x3d28ef(0xc6)]===0x0)&&_0x447ba8[_0x3d28ef(0xed)](createIssue('warning',_0x5a83cc+_0x3d28ef(0x165),_0x3d28ef(0x119),_0x3d28ef(0xd3)+_0x4a77a9[_0x3d28ef(0x162)]+_0x3d28ef(0xf0),_0x30b496,_0x5a83cc));const _0x40597b=_0x4a77a9[_0x3d28ef(0x126)]?.[_0x3d28ef(0xc6)]??0x0;if(_0x40597b===0x0)_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x10f),_0x5a83cc+'.steps',_0x3d28ef(0x11f),_0x3d28ef(0xd3)+_0x4a77a9['name']+_0x3d28ef(0x15b),_0x30b496,_0x5a83cc+_0x3d28ef(0x122)));else{if(_0x40597b===0x1)_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x15c),_0x5a83cc+_0x3d28ef(0x122),'INSUFFICIENT_STEPS',_0x3d28ef(0xd3)+_0x4a77a9[_0x3d28ef(0x162)]+_0x3d28ef(0x179),_0x30b496,_0x5a83cc+_0x3d28ef(0x122)));else _0x40597b<=0x3&&_0x447ba8[_0x3d28ef(0xed)](createIssue(_0x3d28ef(0x15c),_0x5a83cc+_0x3d28ef(0x122),_0x3d28ef(0xc4),_0x3d28ef(0xd3)+_0x4a77a9[_0x3d28ef(0x162)]+'\x27\x20has\x20only\x20'+_0x40597b+_0x3d28ef(0x104),_0x30b496,_0x5a83cc+_0x3d28ef(0x122)));}return _0x447ba8;}function validateStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce){const _0x54cb05=a166_0x2e35,_0xf3c098=[];if(_0x3f5de0[_0x54cb05(0x14e)]===_0x54cb05(0x155))return _0x3f5de0[_0x54cb05(0x12f)]&&_0xf3c098[_0x54cb05(0xed)](createIssue(_0x54cb05(0x10f),_0x6b2eda+_0x54cb05(0x12e),_0x54cb05(0x14a),_0x54cb05(0x14f)+_0x3f5de0['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x53bab7)),_0x54cb05(0x106)in _0x3f5de0&&_0x3f5de0[_0x54cb05(0x106)]!==undefined&&_0xf3c098[_0x54cb05(0xed)](createIssue(_0x54cb05(0x10f),_0x6b2eda+'.with',_0x54cb05(0x14a),_0x54cb05(0x14f)+_0x3f5de0['name']+_0x54cb05(0xdb),_0x53bab7)),_0xf3c098;_0x3f5de0[_0x54cb05(0x12f)]&&(_0x53bab7['stepNames']&&!_0x53bab7['stepNames'][_0x54cb05(0x176)](_0x3f5de0[_0x54cb05(0x12f)])&&_0xf3c098['push'](createIssue(_0x54cb05(0x10f),_0x6b2eda+_0x54cb05(0x12e),_0x54cb05(0xec),_0x54cb05(0xfb)+_0x3f5de0['next']+'\x27',_0x53bab7)));switch(_0x3f5de0[_0x54cb05(0x14e)]){case _0x54cb05(0x172):_0xf3c098[_0x54cb05(0xed)](...validateWaitStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce));break;case _0x54cb05(0x16f):_0xf3c098['push'](...validateActivationStep(_0x3f5de0,_0x6b2eda,_0x53bab7));break;case _0x54cb05(0xef):_0xf3c098[_0x54cb05(0xed)](...validateDecisionPointStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce));break;case _0x54cb05(0x16c):_0xf3c098[_0x54cb05(0xed)](...validateAbTestStep(_0x3f5de0,_0x6b2eda,_0x53bab7,_0x5d79ce));break;case _0x54cb05(0x105):_0xf3c098[_0x54cb05(0xed)](...validateJumpStep(_0x3f5de0,_0x6b2eda,_0x53bab7));break;}return _0xf3c098;}function validateWaitStep(_0x3393ff,_0x1bc5ab,_0x5d61b6,_0xf9c86e){const _0x24766f=a166_0x2e35,_0x4ef672=[];if(!_0x3393ff[_0x24766f(0x106)])return _0x4ef672[_0x24766f(0xed)](createIssue('error',_0x1bc5ab+'.with','MISSING_WAIT_PARAMS',_0x24766f(0x130),_0x5d61b6,_0x1bc5ab)),_0x4ef672;if(_0x3393ff['with'][_0x24766f(0x124)]){const _0x5a9cc0=_0x3393ff['with'][_0x24766f(0x124)];if(_0x5a9cc0[_0x24766f(0x14c)]){_0x5d61b6[_0x24766f(0xcf)]?.[_0x24766f(0x147)](_0x5a9cc0[_0x24766f(0x14c)]);!_0x5a9cc0[_0x24766f(0x14c)][_0x24766f(0x11b)]('ref:')&&(_0x5d61b6['embeddedSegments']&&!_0x5d61b6[_0x24766f(0x103)][_0x24766f(0x176)](_0x5a9cc0[_0x24766f(0x14c)])&&_0x4ef672['push'](createIssue(_0x24766f(0x10f),_0x1bc5ab+_0x24766f(0x158),_0x24766f(0xf9),_0x24766f(0x135)+_0x5a9cc0[_0x24766f(0x14c)]+_0x24766f(0x132),_0x5d61b6)));_0x5a9cc0[_0x24766f(0x12f)]&&_0x5d61b6[_0x24766f(0xd4)]&&!_0x5d61b6['stepNames'][_0x24766f(0x176)](_0x5a9cc0['next'])&&_0x4ef672[_0x24766f(0xed)](createIssue(_0x24766f(0x10f),_0x1bc5ab+_0x24766f(0x154),_0x24766f(0xec),_0x24766f(0x173)+_0x5a9cc0[_0x24766f(0x12f)]+'\x27',_0x5d61b6));_0x5a9cc0[_0x24766f(0x109)]?.[_0x24766f(0x12f)]&&_0x5d61b6['stepNames']&&!_0x5d61b6[_0x24766f(0xd4)][_0x24766f(0x176)](_0x5a9cc0[_0x24766f(0x109)][_0x24766f(0x12f)])&&_0x4ef672['push'](createIssue('error',_0x1bc5ab+'.with.condition.timeout.next',_0x24766f(0xec),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x5a9cc0[_0x24766f(0x109)][_0x24766f(0x12f)]+'\x27',_0x5d61b6));const _0x5d85ac=_0x5a9cc0[_0x24766f(0x12f)]||_0x3393ff[_0x24766f(0x12f)],_0x3ffd9d=_0x5a9cc0[_0x24766f(0x109)]?.['next']||_0x3393ff[_0x24766f(0x12f)];if(_0x5d85ac){const _0x208260=_0xf9c86e[_0x24766f(0x11e)](_0x5d85ac);_0x208260?.[_0x24766f(0x14e)]===_0x24766f(0xd2)&&_0x4ef672[_0x24766f(0xed)](createIssue(_0x24766f(0x15c),_0x1bc5ab+'.with.condition.next',_0x24766f(0xeb),_0x24766f(0x170)+_0x5d85ac+_0x24766f(0x11a),_0x5d61b6,_0x1bc5ab+_0x24766f(0x116)));}if(_0x3ffd9d){const _0x2d7980=_0xf9c86e[_0x24766f(0x11e)](_0x3ffd9d);_0x2d7980?.[_0x24766f(0x14e)]===_0x24766f(0xd2)&&_0x4ef672['push'](createIssue('warning',_0x1bc5ab+_0x24766f(0xe0),_0x24766f(0xeb),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x3ffd9d+_0x24766f(0x11a),_0x5d61b6,_0x1bc5ab+_0x24766f(0xdd)));}}}return _0x4ef672;}function validateActivationStep(_0x89dfcc,_0x54fb76,_0x136c57){const _0x27180f=a166_0x2e35,_0x6aae40=[];if(!_0x89dfcc['with']?.[_0x27180f(0x16f)])return _0x6aae40[_0x27180f(0xed)](createIssue(_0x27180f(0x10f),_0x54fb76+_0x27180f(0x160),_0x27180f(0x11d),_0x27180f(0xd6),_0x136c57,_0x54fb76)),_0x6aae40;const _0x5d1583=_0x89dfcc[_0x27180f(0x106)]['activation'];return _0x136c57['activationKeys']&&!_0x5d1583['startsWith'](_0x27180f(0xf8))&&(!_0x136c57[_0x27180f(0xd8)][_0x27180f(0x176)](_0x5d1583)&&_0x6aae40[_0x27180f(0xed)](createIssue('error',_0x54fb76+'.with.activation','MISSING_ACTIVATION_DEFINITION',_0x27180f(0x107)+_0x5d1583+_0x27180f(0xe6),_0x136c57))),_0x6aae40;}function validateDecisionPointStep(_0x4cf68b,_0x449501,_0x3bedcc,_0xa93821){const _0x375e22=a166_0x2e35,_0x28d639=[];if(!_0x4cf68b[_0x375e22(0x106)]?.[_0x375e22(0x153)]||_0x4cf68b[_0x375e22(0x106)][_0x375e22(0x153)][_0x375e22(0xc6)]===0x0)return _0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x10f),_0x449501+'.with.branches',_0x375e22(0xee),_0x375e22(0xe8),_0x3bedcc,_0x449501)),_0x28d639;for(let _0x17b7de=0x0;_0x17b7de<_0x4cf68b['with'][_0x375e22(0x153)][_0x375e22(0xc6)];_0x17b7de++){const _0x20eefa=_0x4cf68b[_0x375e22(0x106)]['branches'][_0x17b7de],_0x41ab0e=_0x449501+'.with.branches['+_0x17b7de+']';_0x20eefa['segment']&&!_0x20eefa[_0x375e22(0xc5)]&&(_0x3bedcc[_0x375e22(0xcf)]?.[_0x375e22(0x147)](_0x20eefa[_0x375e22(0x14c)]),!_0x20eefa[_0x375e22(0x14c)]['startsWith']('ref:')&&(_0x3bedcc['embeddedSegments']&&!_0x3bedcc['embeddedSegments']['has'](_0x20eefa['segment'])&&_0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x10f),_0x41ab0e+_0x375e22(0xe1),_0x375e22(0xf9),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x20eefa[_0x375e22(0x14c)]+'\x27',_0x3bedcc))));_0x20eefa[_0x375e22(0x12f)]&&_0x3bedcc[_0x375e22(0xd4)]&&!_0x3bedcc[_0x375e22(0xd4)][_0x375e22(0x176)](_0x20eefa[_0x375e22(0x12f)])&&_0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x10f),_0x41ab0e+_0x375e22(0x12e),_0x375e22(0xec),_0x375e22(0x15d)+_0x20eefa[_0x375e22(0x12f)]+'\x27',_0x3bedcc));if(_0x20eefa['next']){const _0x21d2bc=_0xa93821[_0x375e22(0x11e)](_0x20eefa['next']);_0x21d2bc?.[_0x375e22(0x14e)]===_0x375e22(0xd2)&&_0x28d639[_0x375e22(0xed)](createIssue(_0x375e22(0x15c),_0x41ab0e+_0x375e22(0x12e),_0x375e22(0xeb),'Decision\x20branch\x20\x27'+_0x20eefa[_0x375e22(0x162)]+_0x375e22(0x15a)+_0x20eefa[_0x375e22(0x12f)]+_0x375e22(0x167),_0x3bedcc));}}return _0x28d639;}function validateAbTestStep(_0x1418a2,_0x5a34a3,_0x563ddf,_0x29bfb8){const _0x3e15e0=a166_0x2e35,_0x3631b6=[];if(!_0x1418a2[_0x3e15e0(0x106)]?.[_0x3e15e0(0x110)]||_0x1418a2[_0x3e15e0(0x106)][_0x3e15e0(0x110)]['length']===0x0)return _0x3631b6[_0x3e15e0(0xed)](createIssue(_0x3e15e0(0x10f),_0x5a34a3+_0x3e15e0(0x108),_0x3e15e0(0xee),_0x3e15e0(0xf2),_0x563ddf,_0x5a34a3)),_0x3631b6;const _0x3db37d=_0x1418a2['with'][_0x3e15e0(0x110)]['reduce']((_0x7fa27e,_0x40f5b7)=>_0x7fa27e+(_0x40f5b7[_0x3e15e0(0x16b)]||0x0),0x0);Math[_0x3e15e0(0x10c)](_0x3db37d-0x64)>0.01&&_0x3631b6[_0x3e15e0(0xed)](createIssue(_0x3e15e0(0x10f),_0x5a34a3+_0x3e15e0(0x108),_0x3e15e0(0x136),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x3db37d+'%)',_0x563ddf));for(let _0x219f71=0x0;_0x219f71<_0x1418a2[_0x3e15e0(0x106)][_0x3e15e0(0x110)][_0x3e15e0(0xc6)];_0x219f71++){const _0x6f8d67=_0x1418a2[_0x3e15e0(0x106)][_0x3e15e0(0x110)][_0x219f71],_0x395b3f=_0x5a34a3+_0x3e15e0(0xfc)+_0x219f71+']';_0x6f8d67[_0x3e15e0(0x12f)]&&_0x563ddf[_0x3e15e0(0xd4)]&&!_0x563ddf[_0x3e15e0(0xd4)][_0x3e15e0(0x176)](_0x6f8d67[_0x3e15e0(0x12f)])&&_0x3631b6[_0x3e15e0(0xed)](createIssue(_0x3e15e0(0x10f),_0x395b3f+_0x3e15e0(0x12e),_0x3e15e0(0xec),_0x3e15e0(0xbf)+_0x6f8d67[_0x3e15e0(0x12f)]+'\x27',_0x563ddf));if(_0x6f8d67[_0x3e15e0(0x12f)]){const _0x4965a1=_0x29bfb8['get'](_0x6f8d67['next']);_0x4965a1?.[_0x3e15e0(0x14e)]===_0x3e15e0(0xd2)&&_0x3631b6['push'](createIssue('warning',_0x395b3f+_0x3e15e0(0x12e),_0x3e15e0(0xeb),_0x3e15e0(0x12c)+_0x6f8d67[_0x3e15e0(0x162)]+_0x3e15e0(0x15a)+_0x6f8d67[_0x3e15e0(0x12f)]+_0x3e15e0(0x167),_0x563ddf));}}return _0x3631b6;}function validateJumpStep(_0x342f48,_0x154da8,_0x1d48c2){const _0x1e6013=a166_0x2e35,_0x6e9baf=[];if(!_0x342f48[_0x1e6013(0x106)]?.[_0x1e6013(0x157)])return _0x6e9baf['push'](createIssue(_0x1e6013(0x10f),_0x154da8+_0x1e6013(0xff),_0x1e6013(0x148),_0x1e6013(0x137),_0x1d48c2,_0x154da8)),_0x6e9baf;return(!_0x342f48['with'][_0x1e6013(0x157)][_0x1e6013(0x112)]||!_0x342f48[_0x1e6013(0x106)][_0x1e6013(0x157)][_0x1e6013(0x10e)])&&_0x6e9baf[_0x1e6013(0xed)](createIssue(_0x1e6013(0x10f),_0x154da8+_0x1e6013(0xff),'INVALID_JUMP_TARGET',_0x1e6013(0xdf),_0x1d48c2)),_0x6e9baf;}function buildConvergenceMap(_0x224386){const _0x136e4e=a166_0x2e35,_0x13773d=new Map();function _0x340344(_0x498693,_0x28f9a9){const _0x5d62fe=a166_0x2e35,_0x130df9=_0x13773d['get'](_0x498693)||[];_0x130df9[_0x5d62fe(0xed)](_0x28f9a9),_0x13773d['set'](_0x498693,_0x130df9);}for(const _0x5c7be5 of _0x224386){_0x5c7be5['next']&&_0x340344(_0x5c7be5[_0x136e4e(0x12f)],{'stepName':_0x5c7be5[_0x136e4e(0x162)],'description':_0x136e4e(0xf6)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'});if(_0x5c7be5[_0x136e4e(0x14e)]===_0x136e4e(0xef)&&_0x5c7be5['with']?.[_0x136e4e(0x153)])for(const _0x136574 of _0x5c7be5[_0x136e4e(0x106)][_0x136e4e(0x153)]){_0x136574[_0x136e4e(0x12f)]&&_0x340344(_0x136574[_0x136e4e(0x12f)],{'stepName':_0x5c7be5['name'],'description':_0x136e4e(0x150)+_0x136574[_0x136e4e(0x162)]+_0x136e4e(0x142)+_0x5c7be5['name']+'\x27'});}if(_0x5c7be5[_0x136e4e(0x14e)]===_0x136e4e(0x16c)&&_0x5c7be5[_0x136e4e(0x106)]?.[_0x136e4e(0x110)])for(const _0x550f91 of _0x5c7be5[_0x136e4e(0x106)]['variants']){_0x550f91[_0x136e4e(0x12f)]&&_0x340344(_0x550f91['next'],{'stepName':_0x5c7be5['name'],'description':'variant\x20\x27'+_0x550f91[_0x136e4e(0x162)]+_0x136e4e(0x142)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'});}_0x5c7be5[_0x136e4e(0x14e)]===_0x136e4e(0x172)&&_0x5c7be5[_0x136e4e(0x106)]?.[_0x136e4e(0x124)]&&(_0x5c7be5[_0x136e4e(0x106)]['condition'][_0x136e4e(0x12f)]&&_0x340344(_0x5c7be5['with'][_0x136e4e(0x124)][_0x136e4e(0x12f)],{'stepName':_0x5c7be5[_0x136e4e(0x162)],'description':_0x136e4e(0x120)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'}),_0x5c7be5['with'][_0x136e4e(0x124)]['timeout']?.[_0x136e4e(0x12f)]&&_0x340344(_0x5c7be5['with'][_0x136e4e(0x124)][_0x136e4e(0x109)][_0x136e4e(0x12f)],{'stepName':_0x5c7be5[_0x136e4e(0x162)],'description':_0x136e4e(0x10a)+_0x5c7be5[_0x136e4e(0x162)]+'\x27'}));}return _0x13773d;}function validateFlowControl(_0x79b86f,_0x17897a,_0x564b11){const _0x2d0c1b=a166_0x2e35,_0x266a27=[],_0x47cb34=_0x2d0c1b(0x16d)+_0x17897a+']',_0x1711ab=_0x79b86f[_0x2d0c1b(0x126)]||[];if(_0x1711ab[_0x2d0c1b(0xc6)]===0x0)return _0x266a27;const _0x3c904f=new Map();for(const _0x432d20 of _0x1711ab){_0x432d20['name']&&_0x3c904f['set'](_0x432d20['name'],_0x432d20);}const _0x14e7a9=buildConvergenceMap(_0x1711ab),_0x42c48c=_0x1711ab[_0x2d0c1b(0xc3)](_0x7be47c=>_0x7be47c['type']===_0x2d0c1b(0x155));!_0x42c48c&&_0x266a27[_0x2d0c1b(0xed)](createIssue(_0x2d0c1b(0x10f),_0x47cb34+_0x2d0c1b(0x122),_0x2d0c1b(0xf1),'Stage\x20\x27'+_0x79b86f[_0x2d0c1b(0x162)]+_0x2d0c1b(0x101),_0x564b11));for(const [_0x453431,_0x3246c7]of _0x14e7a9){const _0x5b084e=_0x3c904f[_0x2d0c1b(0x11e)](_0x453431);if(!_0x5b084e)continue;if(_0x3246c7[_0x2d0c1b(0xc6)]>0x1&&_0x5b084e[_0x2d0c1b(0x14e)]!==_0x2d0c1b(0xd2)){const _0x4f4f1d=_0x3246c7['map'](_0x3af009=>_0x3af009[_0x2d0c1b(0x149)])[_0x2d0c1b(0x15e)](',\x20');_0x266a27['push'](createIssue('error',_0x47cb34+'.steps',_0x2d0c1b(0xe9),_0x2d0c1b(0xe3)+_0x453431+_0x2d0c1b(0x10d)+_0x4f4f1d+_0x2d0c1b(0x146),_0x564b11));}_0x3246c7[_0x2d0c1b(0xc6)]===0x1&&_0x5b084e[_0x2d0c1b(0x14e)]===_0x2d0c1b(0xd2)&&_0x266a27[_0x2d0c1b(0xed)](createIssue(_0x2d0c1b(0x15c),_0x47cb34+_0x2d0c1b(0x122),_0x2d0c1b(0x164),'Merge\x20step\x20\x27'+_0x453431+_0x2d0c1b(0x15f)+_0x3246c7[0x0][_0x2d0c1b(0x149)]+_0x2d0c1b(0x11c),_0x564b11));}for(const _0x3800a3 of _0x1711ab){if(_0x3800a3[_0x2d0c1b(0x14e)]==='merge'&&_0x3800a3[_0x2d0c1b(0x12f)]){const _0x151371=_0x3c904f[_0x2d0c1b(0x11e)](_0x3800a3[_0x2d0c1b(0x12f)]);_0x151371?.['type']===_0x2d0c1b(0xd2)&&_0x266a27[_0x2d0c1b(0xed)](createIssue(_0x2d0c1b(0x10f),_0x47cb34+_0x2d0c1b(0x122),_0x2d0c1b(0x174),_0x2d0c1b(0xd5)+_0x3800a3[_0x2d0c1b(0x162)]+_0x2d0c1b(0xbd)+_0x3800a3[_0x2d0c1b(0x12f)]+_0x2d0c1b(0x161),_0x564b11));}}return _0x266a27;}function validateCriteria(_0x239f66,_0x5b1e3b,_0x3e135b){const _0x4cfcdf=a166_0x2e35,_0x95abee=[];return _0x239f66[_0x4cfcdf(0x14c)]&&(_0x3e135b[_0x4cfcdf(0xcf)]?.[_0x4cfcdf(0x147)](_0x239f66['segment']),!_0x239f66[_0x4cfcdf(0x14c)][_0x4cfcdf(0x11b)](_0x4cfcdf(0xf8))&&(_0x3e135b[_0x4cfcdf(0x103)]&&!_0x3e135b[_0x4cfcdf(0x103)][_0x4cfcdf(0x176)](_0x239f66[_0x4cfcdf(0x14c)])&&_0x95abee[_0x4cfcdf(0xed)](createIssue(_0x4cfcdf(0x10f),_0x5b1e3b+_0x4cfcdf(0xe1),_0x4cfcdf(0xf9),_0x4cfcdf(0x159)+_0x239f66[_0x4cfcdf(0x14c)]+'\x27',_0x3e135b)))),_0x95abee;}function validateEmbeddedSegment(_0x275d6b,_0x49dfe2,_0x53beaa){const _0x498245=a166_0x2e35,_0x43ac51=[];return _0x275d6b[_0x498245(0x113)]&&_0x43ac51[_0x498245(0xed)](...validateRuleDef(_0x275d6b[_0x498245(0x113)],_0x49dfe2+_0x498245(0x16a),_0x53beaa)),_0x43ac51;}function validateStage(_0x2f8016,_0xbfe1cc,_0x34fc6f,_0x4335b0){const _0x2834cc=a166_0x2e35,_0x42aebc=[],_0xeb78d=_0x2834cc(0x16d)+_0xbfe1cc+']',_0x2c287b=new Map(),_0x383545=new Map();if(_0x2f8016[_0x2834cc(0x126)]){for(let _0x48ee14=0x0;_0x48ee14<_0x2f8016[_0x2834cc(0x126)][_0x2834cc(0xc6)];_0x48ee14++){const _0x5367a0=_0x2f8016[_0x2834cc(0x126)][_0x48ee14];_0x5367a0[_0x2834cc(0x162)]&&_0x2c287b[_0x2834cc(0x13f)](_0x5367a0[_0x2834cc(0x162)],_0x5367a0);}for(let _0x5c5dcd=0x0;_0x5c5dcd<_0x2f8016['steps'][_0x2834cc(0xc6)];_0x5c5dcd++){const _0x5ded0c=_0x2f8016[_0x2834cc(0x126)][_0x5c5dcd],_0x236c91=_0xeb78d+'.steps['+_0x5c5dcd+']';if(_0x5ded0c[_0x2834cc(0x162)]){if(_0x383545[_0x2834cc(0x176)](_0x5ded0c[_0x2834cc(0x162)])){const _0x3f8f84=_0x383545[_0x2834cc(0x11e)](_0x5ded0c[_0x2834cc(0x162)]);_0x42aebc['push'](createIssue(_0x2834cc(0x10f),_0x236c91+'.name',_0x2834cc(0xf4),'Duplicate\x20step\x20name\x20\x27'+_0x5ded0c[_0x2834cc(0x162)]+_0x2834cc(0x152)+_0x3f8f84+'])',_0x4335b0));}else _0x383545['set'](_0x5ded0c[_0x2834cc(0x162)],_0x5c5dcd);}_0x42aebc['push'](...validateStep(_0x5ded0c,_0x236c91,_0x4335b0,_0x2c287b));}}_0x2f8016[_0x2834cc(0xcc)]&&_0x42aebc[_0x2834cc(0xed)](...validateCriteria(_0x2f8016['entry_criteria'],_0xeb78d+'.entry_criteria',_0x4335b0));if(_0x2f8016['exit_criteria'])for(let _0x29e1de=0x0;_0x29e1de<_0x2f8016[_0x2834cc(0x134)][_0x2834cc(0xc6)];_0x29e1de++){_0x42aebc[_0x2834cc(0xed)](...validateCriteria(_0x2f8016[_0x2834cc(0x134)][_0x29e1de],_0xeb78d+'.exit_criteria['+_0x29e1de+']',_0x4335b0));}return _0x2f8016['milestone']&&_0x42aebc[_0x2834cc(0xed)](...validateCriteria(_0x2f8016[_0x2834cc(0xc2)],_0xeb78d+'.milestone',_0x4335b0)),_0x42aebc[_0x2834cc(0xed)](...validateStageStructure(_0x2f8016,_0xbfe1cc,_0x34fc6f,_0x4335b0)),_0x42aebc[_0x2834cc(0xed)](...validateFlowControl(_0x2f8016,_0xbfe1cc,_0x4335b0)),_0x42aebc;}function validateStagesForVersion(_0x382941,_0x572fe3,_0x84e832,_0xde554,_0x40c30c,_0x420bd4,_0x43b7c6){const _0x1592f4=a166_0x2e35;if(_0x382941[_0x1592f4(0xc6)]===0x0){_0x40c30c['push']({'level':_0x1592f4(0x10f),'path':_0xde554+_0x1592f4(0x175),'code':'MISSING_STAGES','message':_0x1592f4(0x117),'location':getLocationFromPath(_0x84e832[_0x1592f4(0x12b)],_0x84e832['source'],['stages'])});return;}const _0x5d195c=new Set();for(const _0x41c266 of _0x382941){if(_0x41c266[_0x1592f4(0x126)])for(const _0x33bd02 of _0x41c266[_0x1592f4(0x126)]){_0x33bd02[_0x1592f4(0x162)]&&_0x5d195c[_0x1592f4(0x147)](_0x33bd02[_0x1592f4(0x162)]);}}const _0x2fb563={..._0x84e832,'stepNames':_0x5d195c},_0x2fb5e1=validateVersionStructure(_0x382941,_0x2fb563);for(const _0x4d199d of _0x2fb5e1){const _0xc77ec4=_0xde554?{..._0x4d199d,'path':''+_0xde554+_0x4d199d[_0x1592f4(0xce)]}:_0x4d199d;if(_0xc77ec4[_0x1592f4(0x138)]===_0x1592f4(0x10f))_0x40c30c[_0x1592f4(0xed)](_0xc77ec4);else _0x420bd4['push'](_0xc77ec4);}for(let _0x4a0a8f=0x0;_0x4a0a8f<_0x382941[_0x1592f4(0xc6)];_0x4a0a8f++){const _0x2659a6=validateStage(_0x382941[_0x4a0a8f],_0x4a0a8f,_0x382941['length'],_0x2fb563);for(const _0x32d753 of _0x2659a6){const _0x361382=_0xde554?{..._0x32d753,'path':''+_0xde554+_0x32d753['path']}:_0x32d753;if(_0x361382[_0x1592f4(0x138)]===_0x1592f4(0x10f))_0x40c30c[_0x1592f4(0xed)](_0x361382);else _0x420bd4['push'](_0x361382);}}if(_0x572fe3[_0x1592f4(0xc1)]){const _0x6cc5bd=_0x43b7c6?.[_0x1592f4(0x16e)]?'goal':_0xde554+'goal',_0x3dcd39=validateCriteria(_0x572fe3['goal'],_0x6cc5bd,_0x2fb563);for(const _0x3e471e of _0x3dcd39){if(_0x3e471e[_0x1592f4(0x138)]==='error')_0x40c30c[_0x1592f4(0xed)](_0x3e471e);else _0x420bd4[_0x1592f4(0xed)](_0x3e471e);}}}function a166_0x2e35(_0x147658,_0x55acab){_0x147658=_0x147658-0xbd;const _0x28f5e8=a166_0x28f5();let _0x2e35ea=_0x28f5e8[_0x147658];return _0x2e35ea;}function extractVersionIndex(_0x246faa){const _0x45a330=a166_0x2e35,_0x11fd28=_0x246faa[_0x45a330(0xca)](/^journeys\[(\d+)\]\./);return _0x11fd28?_0x11fd28[0x1]:undefined;}function deduplicateAcrossVersions(_0x2db332){const _0x2ed01b=a166_0x2e35,_0x1e7c75=new Map();for(let _0x228fdc=0x0;_0x228fdc<_0x2db332['length'];_0x228fdc++){const _0x49b898=_0x2db332[_0x228fdc][_0x2ed01b(0xd1)]+':'+_0x2db332[_0x228fdc][_0x2ed01b(0xfe)],_0x228534=extractVersionIndex(_0x2db332[_0x228fdc][_0x2ed01b(0xce)]),_0x58907e=_0x1e7c75[_0x2ed01b(0x11e)](_0x49b898);if(_0x58907e){_0x58907e['indices'][_0x2ed01b(0xed)](_0x228fdc);if(_0x228534)_0x58907e[_0x2ed01b(0x12a)][_0x2ed01b(0x147)](_0x228534);}else _0x1e7c75[_0x2ed01b(0x13f)](_0x49b898,{'indices':[_0x228fdc],'versions':new Set(_0x228534?[_0x228534]:[])});}const _0x9edc6b=new Set();for(const {indices:_0x331492,versions:_0x12ea75}of _0x1e7c75[_0x2ed01b(0x171)]()){if(_0x12ea75[_0x2ed01b(0xe7)]<=0x1)continue;const _0x2eae29=_0x2db332[_0x331492[0x0]];_0x2eae29[_0x2ed01b(0xce)]=_0x2eae29[_0x2ed01b(0xce)][_0x2ed01b(0x125)](/^journeys\[\d+\]\./,''),_0x2eae29[_0x2ed01b(0xfe)]=_0x2eae29['message']+_0x2ed01b(0xde)+_0x12ea75[_0x2ed01b(0xe7)]+_0x2ed01b(0xc7);for(let _0x4fbf0d=0x1;_0x4fbf0d<_0x331492['length'];_0x4fbf0d++){_0x9edc6b[_0x2ed01b(0x147)](_0x331492[_0x4fbf0d]);}}const _0x26d658=[..._0x9edc6b][_0x2ed01b(0x13d)]((_0x26d92d,_0x5ccf94)=>_0x5ccf94-_0x26d92d);for(const _0x329b55 of _0x26d658){_0x2db332[_0x2ed01b(0x168)](_0x329b55,0x1);}}export function validateJourneyDef(_0x55c4ec,_0x1e3720={},_0x43671a={}){const _0x40006f=a166_0x2e35;if(_0x43671a[_0x40006f(0xfa)])return runJourneySemanticChecks(_0x55c4ec,_0x1e3720);const _0xecbdac=JourneyDefSchema[_0x40006f(0x129)](_0x55c4ec);if(_0xecbdac['success'])return runJourneySemanticChecks(_0xecbdac[_0x40006f(0x121)],_0x1e3720);return zodErrorsToJourneyValidationResult(_0xecbdac[_0x40006f(0x10f)],_0x1e3720);}function zodErrorsToJourneyValidationResult(_0x8e7e4,_0x4952ac){const _0x2e8b1c=a166_0x2e35,_0x59b12d=flattenZodIssues(_0x8e7e4['issues']),_0x2ff1d2=_0x59b12d[_0x2e8b1c(0x133)](_0xa269b7=>{const _0x416299=_0x2e8b1c,_0x48e881=formatZodPath(_0xa269b7['path']),_0x46ad15=mapJourneyZodIssueToCode(_0xa269b7,_0x48e881),_0x430152=getLocationFromPath(_0x4952ac['document'],_0x4952ac[_0x416299(0x145)],_0xa269b7[_0x416299(0xce)][_0x416299(0x133)](_0x5be8d6=>typeof _0x5be8d6===_0x416299(0xbe)?String(_0x5be8d6):_0x5be8d6));return{'level':_0x416299(0x10f),'path':_0x48e881,'code':_0x46ad15,'message':_0xa269b7[_0x416299(0xfe)],..._0x430152&&{'location':_0x430152}};});return{'valid':![],'errors':_0x2ff1d2,'warnings':[]};}function mapJourneyZodIssueToCode(_0x368fa8,_0x14a677){const _0x148ef7=a166_0x2e35;if(_0x14a677==='name')return _0x148ef7(0x131);if(_0x14a677[_0x148ef7(0x13c)](_0x148ef7(0xf5))&&_0x14a677[_0x148ef7(0x13e)](_0x148ef7(0x126)))return'JOURNEY_SCHEMA_ERROR';if(_0x14a677==='stages'||_0x14a677[_0x148ef7(0x13c)](_0x148ef7(0x128)))return _0x148ef7(0x100);if(_0x14a677===''&&_0x368fa8[_0x148ef7(0xfe)][_0x148ef7(0x13e)](_0x148ef7(0xc0)))return _0x148ef7(0x100);if(_0x14a677[_0x148ef7(0x13e)]('activation'))return _0x148ef7(0xea);return _0x148ef7(0x144);}function a166_0x28f5(){const _0x5cf8b0=['stage','error','variants','excluded_','journey','rule','10372180OWtOjG','Journey\x20has\x20no\x20goal\x20defined','.with.condition','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','launched','MISSING_EXIT_CRITERIA','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','startsWith',').\x20Merge\x20is\x20unnecessary.','MISSING_ACTIVATION_REF','get','INSUFFICIENT_STEPS','condition\x20of\x20\x27','data','.steps','6641670uADBLE','condition','replace','steps','state','.stages','safeParse','versions','document','A/B\x20test\x20variant\x20\x27','segments.','.next','next','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','MISSING_NAME','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','map','exit_criteria','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','INVALID_AB_TEST_PERCENTAGES','Jump\x20step\x20requires\x20a\x20target','level','latest','6057846diAylu','journeys[','endsWith','sort','includes','set','5luiYme','entries','\x27\x20of\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','JOURNEY_SCHEMA_ERROR','source',').\x20Use\x20a\x20merge\x20step.','add','INVALID_JUMP_TARGET','description','END_STEP_HAS_NEXT_OR_WITH','keys','segment','journey\x20entry','type','End\x20step\x20\x27','branch\x20\x27','segments','\x27\x20(first\x20defined\x20at\x20steps[','branches','.with.condition.next','end','19099080rKbJwv','target','.with.condition.segment','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20no\x20steps','warning','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','join','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','.with.activation','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','name','Journey\x20can\x20have\x20at\x20most\x20one\x20','SINGLE_INPUT_MERGE','.exit_criteria','\x20with\x20latest:\x20true','\x27\x20with\x20no\x20action\x20in\x20between','splice','TOO_MANY_STAGES','.rule','percentage','ab_test','stages[','goalIsInherited','activation','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','values','wait','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MERGE_TO_MERGE_CHAIN','stages','has','4JQBvUX','Journey\x20name\x20is\x20required','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','symbol','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','journeys,\x20stages,\x20or\x20versions','goal','milestone','some','FEW_STEPS','excluded','length','\x20versions)','journeys','458826QvWAhD','match','12teYSfc','entry_criteria','.entry_criteria','path','referencedSegments','480472AgPsHV','code','merge','Stage\x20\x27','stepNames','Merge\x20step\x20\x27','Activation\x20step\x20requires\x20an\x20activation\x20reference','Embedded\x20segment\x20\x27','activationKeys','every','activations','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','MISSING_ENTRY_CRITERIA','.with.condition.timeout','\x20(across\x20','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','.with.condition.timeout.next','.segment','Journey\x20has\x20','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','versions[','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','size','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','CONVERGENCE_WITHOUT_MERGE','ACTIVATION_SCHEMA_ERROR','BRANCH_DIRECTLY_TO_MERGE','INVALID_NEXT_REFERENCE','push','MISSING_CONDITIONS','decision_point','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_END_STEP','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','DUPLICATE_STEP_NAME','.type','step\x20\x27','7WYdnEx','ref:','MISSING_SEGMENT_REFERENCE','skipSchema','Step\x20references\x20non-existent\x20step\x20\x27','.with.variants[','version','message','.with.target','MISSING_STAGES','\x27\x20has\x20no\x20end\x20step','5515zYkryJ','embeddedSegments','\x20steps\x20(may\x20be\x20too\x20simple)','jump','with','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','.with.variants','timeout','timeout\x20of\x20\x27','MISSING_GOAL','abs','\x27\x20(from:\x20'];a166_0x28f5=function(){return _0x5cf8b0;};return a166_0x28f5();}function runJourneySemanticChecks(_0x4fe596,_0x2664d7){const _0x5aed26=a166_0x2e35,_0x1b11dd=[],_0x5c44be=[];(!_0x4fe596['name']||_0x4fe596[_0x5aed26(0x162)]['trim']()==='')&&_0x1b11dd[_0x5aed26(0xed)]({'level':_0x5aed26(0x10f),'path':_0x5aed26(0x162),'code':_0x5aed26(0x131),'message':_0x5aed26(0x178),'location':getLocationFromPath(_0x2664d7[_0x5aed26(0x12b)],_0x2664d7[_0x5aed26(0x145)],[_0x5aed26(0x162)])});const _0x12e595=new Set();if(_0x4fe596[_0x5aed26(0x151)])for(const _0x1e60fa of Object[_0x5aed26(0x14b)](_0x4fe596[_0x5aed26(0x151)])){_0x12e595[_0x5aed26(0x147)](_0x1e60fa);}const _0x22c24d=new Set();if(_0x4fe596[_0x5aed26(0xda)])for(const _0x28b03c of Object[_0x5aed26(0x14b)](_0x4fe596[_0x5aed26(0xda)])){_0x22c24d['add'](_0x28b03c);}const _0x1e5ef8=new Set(),_0x43d892={..._0x2664d7,'embeddedSegments':_0x12e595,'referencedSegments':_0x1e5ef8,'activationKeys':_0x22c24d[_0x5aed26(0xe7)]>0x0?_0x22c24d:undefined};if(_0x4fe596['segments'])for(const [_0x4a9be0,_0x5ebefa]of Object[_0x5aed26(0x141)](_0x4fe596[_0x5aed26(0x151)])){const _0x2cbe6f=validateEmbeddedSegment(_0x5ebefa,_0x5aed26(0x12d)+_0x4a9be0,_0x43d892);for(const _0x4e45b3 of _0x2cbe6f){if(_0x4e45b3['level']===_0x5aed26(0x10f))_0x1b11dd[_0x5aed26(0xed)](_0x4e45b3);else _0x5c44be[_0x5aed26(0xed)](_0x4e45b3);}}const _0x4f5a58=!!_0x4fe596[_0x5aed26(0xc1)],_0x2b1ee7=_0x4fe596[_0x5aed26(0xc8)]?.[_0x5aed26(0xd9)](_0x1602eb=>!!_0x1602eb[_0x5aed26(0xc1)])??![];!_0x4f5a58&&!_0x2b1ee7&&_0x5c44be[_0x5aed26(0xed)]({'level':_0x5aed26(0x15c),'path':_0x5aed26(0xc1),'code':_0x5aed26(0x10b),'message':_0x5aed26(0x115),'location':getLocationFromPath(_0x2664d7['document'],_0x2664d7[_0x5aed26(0x145)],[_0x5aed26(0xc1)])});const _0x1eb3d1=_0x4fe596[_0x5aed26(0xc8)]??_0x4fe596[_0x5aed26(0x12a)];if(_0x1eb3d1&&_0x1eb3d1['filter'](_0x17f7d6=>_0x17f7d6[_0x5aed26(0x139)]===!![])[_0x5aed26(0xc6)]>0x1){const _0x521e24=_0x4fe596[_0x5aed26(0xc8)]?_0x5aed26(0xc8):_0x5aed26(0x12a);_0x1b11dd[_0x5aed26(0xed)]({'level':_0x5aed26(0x10f),'path':_0x521e24,'code':'DUPLICATE_LATEST','message':_0x5aed26(0x163)+(_0x521e24==='journeys'?_0x5aed26(0x14d):_0x5aed26(0xfd))+_0x5aed26(0x166),'location':getLocationFromPath(_0x2664d7[_0x5aed26(0x12b)],_0x2664d7[_0x5aed26(0x145)],[_0x521e24])});}if(_0x4fe596[_0x5aed26(0xc8)]&&_0x4fe596['journeys'][_0x5aed26(0xc6)]>0x0)for(let _0x2d43a2=0x0;_0x2d43a2<_0x4fe596['journeys']['length'];_0x2d43a2++){const _0x26c7cc=_0x4fe596[_0x5aed26(0xc8)][_0x2d43a2];if(_0x4fe596['journeys']['length']>0x1&&_0x26c7cc[_0x5aed26(0x127)]===_0x5aed26(0x118))continue;const _0x2479a7=_0x26c7cc['stages']||[],_0x3b9191=_0x5aed26(0x13b)+_0x2d43a2+'].',_0xc8e2a5=!!_0x26c7cc['goal'],_0x5e53dc=_0xc8e2a5?{..._0x4fe596,'goal':_0x26c7cc[_0x5aed26(0xc1)]}:_0x4fe596;validateStagesForVersion(_0x2479a7,_0x5e53dc,_0x43d892,_0x3b9191,_0x1b11dd,_0x5c44be,{'goalIsInherited':!_0xc8e2a5});}else{if(_0x4fe596[_0x5aed26(0x12a)]&&_0x4fe596['versions'][_0x5aed26(0xc6)]>0x0)for(let _0x2069a7=0x0;_0x2069a7<_0x4fe596[_0x5aed26(0x12a)][_0x5aed26(0xc6)];_0x2069a7++){const _0x539a1c=_0x4fe596[_0x5aed26(0x12a)][_0x2069a7];if(_0x4fe596[_0x5aed26(0x12a)]['length']>0x1&&_0x539a1c['state']===_0x5aed26(0x118))continue;const _0x20d2d5=_0x539a1c['stages']||[],_0x320fd2=_0x5aed26(0xe4)+_0x2069a7+'].';validateStagesForVersion(_0x20d2d5,_0x4fe596,_0x43d892,_0x320fd2,_0x1b11dd,_0x5c44be);}else{const _0x12eb66=_0x4fe596['stages']||[];validateStagesForVersion(_0x12eb66,_0x4fe596,_0x43d892,'',_0x1b11dd,_0x5c44be);}}_0x4fe596[_0x5aed26(0xc8)]&&_0x4fe596[_0x5aed26(0xc8)]['length']>0x1&&(deduplicateAcrossVersions(_0x1b11dd),deduplicateAcrossVersions(_0x5c44be));for(const _0x494d36 of _0x12e595){!_0x1e5ef8[_0x5aed26(0x176)](_0x494d36)&&!_0x494d36[_0x5aed26(0x11b)](_0x5aed26(0x111))&&_0x5c44be[_0x5aed26(0xed)]({'level':_0x5aed26(0x15c),'path':'segments.'+_0x494d36,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x5aed26(0xd7)+_0x494d36+_0x5aed26(0xf3),'location':getLocationFromPath(_0x2664d7[_0x5aed26(0x12b)],_0x2664d7[_0x5aed26(0x145)],['segments',_0x494d36])});}return{'valid':_0x1b11dd[_0x5aed26(0xc6)]===0x0,'errors':_0x1b11dd,'warnings':_0x5c44be};}
|