@treasuredata/tdx 2026.8.2 → 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.d.ts +9 -3
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +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.d.ts +10 -0
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +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(_0x484178,_0x266901){const _0x3de3d8=a162_0x1c1b,_0x593c15=_0x484178();while(!![]){try{const _0x51d29d=parseInt(_0x3de3d8(0x12a))/0x1+-parseInt(_0x3de3d8(0x160))/0x2*(-parseInt(_0x3de3d8(0x162))/0x3)+-parseInt(_0x3de3d8(0x14b))/0x4+parseInt(_0x3de3d8(0x166))/0x5+parseInt(_0x3de3d8(0x172))/0x6*(parseInt(_0x3de3d8(0x15b))/0x7)+-parseInt(_0x3de3d8(0x139))/0x8*(-parseInt(_0x3de3d8(0x178))/0x9)+-parseInt(_0x3de3d8(0x151))/0xa;if(_0x51d29d===_0x266901)break;else _0x593c15['push'](_0x593c15['shift']());}catch(_0x2f336c){_0x593c15['push'](_0x593c15['shift']());}}}(a162_0x2d5f,0xea977));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x4af027){const _0x55b2a5=a162_0x1c1b;return _0x4af027['toLowerCase']()['replace'](/\s+/g,'_')[_0x55b2a5(0x148)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x55b2a5(0x148)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x244d1f){const _0x8941e5=a162_0x1c1b,_0x2028a9=_0x244d1f[_0x8941e5(0x164)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2028a9){const _0x3dfc9c=_0x2028a9[0x1]['toLowerCase'](),_0x1c0e3e=_0x2028a9[0x2],_0x411e08=_0x1c0e3e['replace'](/-/g,'')[_0x8941e5(0x170)](0x0,0x4)[_0x8941e5(0x143)]();return _0x3dfc9c+'_'+_0x411e08;}const _0x22fa16=_0x244d1f[_0x8941e5(0x164)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x22fa16){const _0x5ccf3a=_0x22fa16[0x1],_0x24a2ff=_0x22fa16[0x2]['toLowerCase'](),_0x471545=_0x5ccf3a[_0x8941e5(0x148)](/-/g,'')['slice'](0x0,0x4)['toLowerCase']();return _0x24a2ff+'_'+_0x471545;}return undefined;}function stableStringify(_0x413b00){const _0x3a55a4=a162_0x1c1b;if(Array[_0x3a55a4(0x179)](_0x413b00))return'['+_0x413b00[_0x3a55a4(0x146)](_0x59f385=>stableStringify(_0x59f385))[_0x3a55a4(0x163)](',')+']';if(_0x413b00&&typeof _0x413b00===_0x3a55a4(0x156)){const _0x48a5d9=_0x413b00,_0x21f00b=Object[_0x3a55a4(0x15a)](_0x48a5d9)[_0x3a55a4(0x155)](),_0x355ad5=_0x21f00b[_0x3a55a4(0x146)](_0x43677a=>'\x22'+_0x43677a+'\x22:'+stableStringify(_0x48a5d9[_0x43677a]));return'{'+_0x355ad5[_0x3a55a4(0x163)](',')+'}';}const _0x579302=JSON[_0x3a55a4(0x144)](_0x413b00);return _0x579302===undefined?_0x3a55a4(0x12c):_0x579302;}export function consolidateActivationsByContent(_0x28ad68){const _0x516efd=a162_0x1c1b,_0x1dad23={},_0x33a149=new Map(),_0x4546fe=new Map();for(const _0x1a153b of _0x28ad68){if(!_0x1a153b)continue;for(const [_0x3f88fd,_0x36e301]of Object['entries'](_0x1a153b)){const _0x25fd9c={'name':_0x36e301['name'],'connection':_0x36e301[_0x516efd(0x145)],..._0x36e301[_0x516efd(0x16b)]!==undefined&&{'all_columns':_0x36e301[_0x516efd(0x16b)]},..._0x36e301[_0x516efd(0x13b)]!==undefined&&{'columns':_0x36e301[_0x516efd(0x13b)]},..._0x36e301[_0x516efd(0x152)]!==undefined&&{'behavior':_0x36e301[_0x516efd(0x152)]},..._0x36e301[_0x516efd(0x16e)]!==undefined&&{'schedule':_0x36e301[_0x516efd(0x16e)]},..._0x36e301[_0x516efd(0x142)]!==undefined&&{'notification':_0x36e301[_0x516efd(0x142)]},..._0x36e301[_0x516efd(0x140)]!==undefined&&{'connector_config':_0x36e301['connector_config']},..._0x36e301[_0x516efd(0x175)]!==undefined&&{'activation_template_id':_0x36e301[_0x516efd(0x175)]}},_0xa4ca52=stableStringify(_0x25fd9c),_0x1f1952=_0x4546fe[_0x516efd(0x168)](_0xa4ca52);_0x1f1952?_0x33a149['set'](_0x3f88fd,_0x1f1952):(_0x1dad23[_0x3f88fd]=_0x36e301,_0x33a149[_0x516efd(0x147)](_0x3f88fd,_0x3f88fd),_0x4546fe[_0x516efd(0x147)](_0xa4ca52,_0x3f88fd));}}return{'merged':_0x1dad23,'nameMapping':_0x33a149};}export function updateActivationReferences(_0x17771b,_0x35279e){const _0x2456c1=a162_0x1c1b;if(!_0x17771b)return;for(const _0x147cbd of _0x17771b){if(!_0x147cbd[_0x2456c1(0x14a)])continue;for(const _0x2aa91a of _0x147cbd[_0x2456c1(0x14a)]){if(_0x2aa91a['type']===_0x2456c1(0x13e)&&_0x2aa91a[_0x2456c1(0x158)]?.[_0x2456c1(0x13e)]){const _0x30b751=_0x35279e['get'](_0x2aa91a['with'][_0x2456c1(0x13e)]);_0x30b751&&_0x30b751!==_0x2aa91a['with'][_0x2456c1(0x13e)]&&(_0x2aa91a[_0x2456c1(0x158)]['activation']=_0x30b751);}}}}export function consolidateSegmentsByContent(_0x309790,_0x3f99cf){const _0x234b67=a162_0x1c1b,_0x171794={},_0x34c644=new Map(),_0x407749=new Map();for(const _0x1fcbcb of _0x309790){if(!_0x1fcbcb)continue;for(const [_0xbecdc0,_0x49e253]of Object[_0x234b67(0x17a)](_0x1fcbcb)){if(!_0x49e253[_0x234b67(0x15d)]){_0x171794[_0xbecdc0]=_0x49e253,_0x34c644['set'](_0xbecdc0,_0xbecdc0);continue;}const _0x528343=_0x49e253[_0x234b67(0x177)]&&_0x49e253[_0x234b67(0x177)][_0x234b67(0x154)]()?_0x49e253['description']:undefined,_0xf0cc7c=JSON[_0x234b67(0x144)]({'description':_0x528343,'rule':deepSortObject(_0x49e253[_0x234b67(0x15d)])}),_0x393c18=_0x407749['get'](_0xf0cc7c);if(_0x393c18){const _0x181baa={..._0x49e253[_0x234b67(0x177)]!==undefined&&{'description':_0x49e253[_0x234b67(0x177)]},'rule':_0x49e253[_0x234b67(0x15d)]?deepSortObject(_0x49e253[_0x234b67(0x15d)]):_0x49e253[_0x234b67(0x15d)]};if(_0xbecdc0<_0x393c18){_0x171794[_0xbecdc0]=_0x181baa,delete _0x171794[_0x393c18];for(const [_0x51cb56,_0xfe5d6e]of _0x34c644['entries']()){_0xfe5d6e===_0x393c18&&_0x34c644[_0x234b67(0x147)](_0x51cb56,_0xbecdc0);}_0x34c644[_0x234b67(0x147)](_0xbecdc0,_0xbecdc0),_0x407749[_0x234b67(0x147)](_0xf0cc7c,_0xbecdc0);}else _0x171794[_0x393c18]=_0x181baa,_0x34c644[_0x234b67(0x147)](_0xbecdc0,_0x393c18);}else{let _0x45429a=_0xbecdc0;if(_0x3f99cf){const _0x277db2=_0x3f99cf[_0x234b67(0x168)](_0xf0cc7c);_0x277db2&&_0x277db2[_0x234b67(0x153)]>0x0&&(_0x45429a=_0x277db2['slice']()['sort']()[0x0]);}const _0x13b453={..._0x49e253['description']!==undefined&&{'description':_0x49e253[_0x234b67(0x177)]},'rule':_0x49e253['rule']?deepSortObject(_0x49e253[_0x234b67(0x15d)]):_0x49e253['rule']};_0x171794[_0x45429a]=_0x13b453,_0x34c644[_0x234b67(0x147)](_0xbecdc0,_0x45429a),_0x407749['set'](_0xf0cc7c,_0x45429a);}}}return{'merged':_0x171794,'nameMapping':_0x34c644};}export function updateSegmentReferences(_0x54cc72,_0x128026){const _0x81ad61=a162_0x1c1b;if(!_0x54cc72)return;for(const _0x23e11f of _0x54cc72){if(_0x23e11f[_0x81ad61(0x130)]?.[_0x81ad61(0x136)]){const _0x1110cd=_0x128026[_0x81ad61(0x168)](_0x23e11f[_0x81ad61(0x130)][_0x81ad61(0x136)]);_0x1110cd&&(_0x23e11f[_0x81ad61(0x130)]['segment']=_0x1110cd);}if(_0x23e11f[_0x81ad61(0x14c)])for(const _0x325a90 of _0x23e11f[_0x81ad61(0x14c)]){if(_0x325a90[_0x81ad61(0x136)]){const _0x43e639=_0x128026[_0x81ad61(0x168)](_0x325a90[_0x81ad61(0x136)]);_0x43e639&&(_0x325a90[_0x81ad61(0x136)]=_0x43e639);}}if(_0x23e11f['milestone']?.['segment']){const _0x559315=_0x128026[_0x81ad61(0x168)](_0x23e11f[_0x81ad61(0x13d)][_0x81ad61(0x136)]);_0x559315&&(_0x23e11f[_0x81ad61(0x13d)][_0x81ad61(0x136)]=_0x559315);}if(_0x23e11f[_0x81ad61(0x14a)])for(const _0x364d47 of _0x23e11f[_0x81ad61(0x14a)]){if(_0x364d47[_0x81ad61(0x137)]===_0x81ad61(0x15e)&&_0x364d47[_0x81ad61(0x158)]?.[_0x81ad61(0x16c)])for(const _0x575c6e of _0x364d47['with'][_0x81ad61(0x16c)]){if(_0x575c6e[_0x81ad61(0x136)]){const _0x4dcb8d=_0x128026['get'](_0x575c6e[_0x81ad61(0x136)]);_0x4dcb8d&&(_0x575c6e[_0x81ad61(0x136)]=_0x4dcb8d);}}if(_0x364d47['type']===_0x81ad61(0x173)&&_0x364d47['with']?.[_0x81ad61(0x13a)]?.[_0x81ad61(0x136)]){const _0x3319f5=_0x128026[_0x81ad61(0x168)](_0x364d47[_0x81ad61(0x158)][_0x81ad61(0x13a)]['segment']);_0x3319f5&&(_0x364d47[_0x81ad61(0x158)][_0x81ad61(0x13a)][_0x81ad61(0x136)]=_0x3319f5);}}}}export function updateSegmentRefsInSegments(_0x598df5,_0xde7c22){const _0x16b3b4=a162_0x1c1b;for(const _0x2a7b7d of Object[_0x16b3b4(0x138)](_0x598df5)){_0x2a7b7d[_0x16b3b4(0x15d)]&&updateSegmentRefsInRule(_0x2a7b7d[_0x16b3b4(0x15d)],_0xde7c22);}}function updateSegmentRefsInRule(_0x50b00d,_0x92edac){const _0x30522a=a162_0x1c1b;if(_0x50b00d===null||typeof _0x50b00d!==_0x30522a(0x156))return;if(Array[_0x30522a(0x179)](_0x50b00d)){for(const _0x193ff6 of _0x50b00d){updateSegmentRefsInRule(_0x193ff6,_0x92edac);}return;}const _0x3f15f6=_0x50b00d;if((_0x3f15f6[_0x30522a(0x137)]===_0x30522a(0x14e)||_0x3f15f6[_0x30522a(0x137)]==='exclude')&&typeof _0x3f15f6[_0x30522a(0x136)]==='string'){const _0x34789f=_0x92edac[_0x30522a(0x168)](_0x3f15f6[_0x30522a(0x136)]);_0x34789f&&(_0x3f15f6['segment']=_0x34789f);}if(_0x3f15f6[_0x30522a(0x14f)]&&Array['isArray'](_0x3f15f6['conditions']))for(const _0x3d1ad2 of _0x3f15f6[_0x30522a(0x14f)]){updateSegmentRefsInRule(_0x3d1ad2,_0x92edac);}}export function buildJourneysArray(_0xd493c7,_0x1783d6){const _0x204bee=a162_0x1c1b;return _0xd493c7[_0x204bee(0x146)](_0x26aae3=>{const _0x584b5e=_0x204bee,_0x200fe0=_0x1783d6?_0x26aae3['item']['id']===_0x1783d6:_0xd493c7[_0x584b5e(0x153)]===0x1,_0x4072c3=_0x26aae3[_0x584b5e(0x169)][_0x584b5e(0x149)]?.[0x0],_0x230414=_0x4072c3?.[_0x584b5e(0x13f)]||_0x26aae3['yaml'][_0x584b5e(0x13f)],_0x35ded4={'version':_0x4072c3?.['version']||_0x26aae3[_0x584b5e(0x169)][_0x584b5e(0x150)]||_0x26aae3[_0x584b5e(0x131)][_0x584b5e(0x134)],'state':_0x26aae3[_0x584b5e(0x131)][_0x584b5e(0x16f)]===_0x584b5e(0x159)?_0x584b5e(0x159):'draft','stages':_0x4072c3?.[_0x584b5e(0x171)]||_0x26aae3[_0x584b5e(0x169)][_0x584b5e(0x171)]||[],'id':_0x4072c3?.['id']||_0x26aae3['yaml']['id'],'version_number':_0x4072c3?.[_0x584b5e(0x165)]||_0x26aae3['yaml'][_0x584b5e(0x165)]};return _0x230414&&(_0x35ded4[_0x584b5e(0x13f)]=_0x230414),_0x200fe0&&(_0x35ded4[_0x584b5e(0x157)]=!![]),_0x35ded4;});}export function buildMergedJourneyDef(_0x377dbe,_0x596c7b,_0x585bed){const _0x1016b0=a162_0x1c1b,_0x14e4d3=_0x377dbe[0x0][_0x1016b0(0x169)],_0x49effd=buildJourneysArray(_0x377dbe,_0x585bed),{merged:_0x25c3c4,nameMapping:_0x5a7bae}=consolidateSegmentsByContent(_0x377dbe[_0x1016b0(0x146)](_0x3903ee=>_0x3903ee[_0x1016b0(0x169)][_0x1016b0(0x141)]),_0x596c7b);updateSegmentRefsInSegments(_0x25c3c4,_0x5a7bae);const _0x4f08a0=Array[_0x1016b0(0x14d)](_0x5a7bae[_0x1016b0(0x17a)]())[_0x1016b0(0x12d)](([_0x175e0b,_0x21cfae])=>_0x175e0b!==_0x21cfae&&_0x175e0b[_0x1016b0(0x12f)]('entry_criteria'));let _0x3e4dce=_0x25c3c4,_0x4caa93=new Map();if(_0x4f08a0){const _0x1c7da2=consolidateSegmentsByContent([_0x25c3c4],_0x596c7b);_0x3e4dce=_0x1c7da2['merged'],_0x4caa93=_0x1c7da2['nameMapping'];}const _0x5e226f=new Map(_0x5a7bae);for(const [_0x3ac062,_0x35d748]of _0x4caa93[_0x1016b0(0x17a)]()){_0x5e226f[_0x1016b0(0x147)](_0x3ac062,_0x35d748);}for(const [_0x12400b,_0x2b17e8]of _0x5e226f[_0x1016b0(0x17a)]()){let _0x2e99cf=_0x2b17e8,_0x309e3a=0x0;while(_0x5e226f[_0x1016b0(0x133)](_0x2e99cf)&&_0x5e226f[_0x1016b0(0x168)](_0x2e99cf)!==_0x2e99cf&&_0x309e3a<MAX_MAPPING_CHAIN_DEPTH){_0x2e99cf=_0x5e226f[_0x1016b0(0x168)](_0x2e99cf),_0x309e3a++;}_0x2e99cf!==_0x2b17e8&&_0x5e226f[_0x1016b0(0x147)](_0x12400b,_0x2e99cf);}for(const _0x392c59 of _0x49effd){updateSegmentReferences(_0x392c59['stages'],_0x5e226f);}const {merged:_0x255dea,nameMapping:_0x17bd63}=consolidateActivationsByContent(_0x377dbe[_0x1016b0(0x146)](_0x18eb4a=>_0x18eb4a[_0x1016b0(0x169)][_0x1016b0(0x132)]));for(const _0x4da413 of _0x49effd){updateActivationReferences(_0x4da413[_0x1016b0(0x171)],_0x17bd63);}let _0x147895=_0x14e4d3['goal'];if(_0x147895?.[_0x1016b0(0x136)]){const _0x4506f0=_0x5e226f[_0x1016b0(0x168)](_0x147895[_0x1016b0(0x136)]);_0x4506f0&&(_0x147895={..._0x147895,'segment':_0x4506f0});}for(const _0x3b0c9b of _0x49effd){if(_0x3b0c9b[_0x1016b0(0x13f)]?.['segment']){const _0x4c3ab9=_0x5e226f[_0x1016b0(0x168)](_0x3b0c9b[_0x1016b0(0x13f)][_0x1016b0(0x136)]);_0x4c3ab9&&(_0x3b0c9b[_0x1016b0(0x13f)]={..._0x3b0c9b[_0x1016b0(0x13f)],'segment':_0x4c3ab9});}}return _0x49effd[_0x1016b0(0x12d)](_0x522653=>_0x522653[_0x1016b0(0x13f)])&&(_0x147895=undefined),{'type':_0x1016b0(0x174),'name':_0x14e4d3[_0x1016b0(0x134)],'description':_0x14e4d3[_0x1016b0(0x177)],'goal':_0x147895,'reentry':_0x14e4d3[_0x1016b0(0x16a)],'segments':Object[_0x1016b0(0x15a)](_0x3e4dce)[_0x1016b0(0x153)]>0x0?_0x3e4dce:undefined,'activations':Object['keys'](_0x255dea)[_0x1016b0(0x153)]>0x0?_0x255dea:undefined,'journeys':_0x49effd,'bundle_id':_0x14e4d3[_0x1016b0(0x12e)],'bundle_name':_0x14e4d3[_0x1016b0(0x161)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x16bb93,_0x8f7612,_0x267c36,_0x4f7d24){const _0x5b0241=a162_0x1c1b,_0x22afcd=_0x16bb93+':'+_0x8f7612,_0x1ed2ae=_0x267c36[_0x5b0241(0x168)](_0x22afcd);if(_0x1ed2ae)return _0x1ed2ae;const _0x4d7eb0=await _0x4f7d24(_0x16bb93),_0xbe0f0f=_0x4d7eb0[_0x5b0241(0x16d)][_0x5b0241(0x13c)]||_0x4d7eb0[_0x5b0241(0x16d)][_0x5b0241(0x134)],_0x470553=_0x4d7eb0[_0x5b0241(0x16d)][_0x5b0241(0x135)][_0x5b0241(0x12b)](_0x146914=>String(_0x146914['id'])===String(_0x8f7612)),_0x50b13f=_0x470553?.[_0x5b0241(0x134)]||_0x8f7612,_0x5bfe15={'journeyName':_0xbe0f0f,'stageName':_0x50b13f};return _0x267c36[_0x5b0241(0x147)](_0x22afcd,_0x5bfe15),_0x5bfe15;}function a162_0x2d5f(){const _0x10bcfd=['match','version_number','16900gdKvwQ','index','get','yaml','reentry','all_columns','branches','attributes','schedule','state','slice','stages','762HLSwkF','wait','journey','activation_template_id','endsWith','description','13842zNxfJP','isArray','entries','804022mFxpIz','find','null','some','bundle_id','startsWith','entry_criteria','item','activations','has','name','journeyStages','segment','type','values','3504HNtWsk','condition','columns','journeyBundleName','milestone','activation','goal','connector_config','segments','notification','toLowerCase','stringify','connection','map','set','replace','journeys','steps','1723796BxLnem','exit_criteria','from','include','conditions','version','28367200OSBmrj','behavior','length','trim','sort','object','latest','with','launched','keys','93387TmoZAR','versions','rule','decision_point','push','278HSbdgF','bundle_name','22731TRDfjQ','join'];a162_0x2d5f=function(){return _0x10bcfd;};return a162_0x2d5f();}export function formatApiJourneyName(_0x5b6c58,_0x48122d){return _0x48122d+'\x20('+_0x5b6c58+')';}function a162_0x1c1b(_0x102c26,_0x1ded8a){_0x102c26=_0x102c26-0x12a;const _0x2d5f5b=a162_0x2d5f();let _0x1c1b58=_0x2d5f5b[_0x102c26];return _0x1c1b58;}export function isLocalJourneyRef(_0x10a929){const _0x38112d=a162_0x1c1b;return _0x10a929['endsWith']('.yml')||_0x10a929[_0x38112d(0x176)]('.yaml');}export function buildLocalRuleToNameMapping(_0x2da439){const _0x44ba0b=a162_0x1c1b,_0x18e0f5=new Map();if(!_0x2da439)return _0x18e0f5;for(const [_0x1fc487,_0x7e8b70]of Object[_0x44ba0b(0x17a)](_0x2da439)){if(_0x7e8b70['rule']){const _0xa24dfd=serializeRule(_0x7e8b70[_0x44ba0b(0x15d)]),_0x5f40f4=_0x18e0f5[_0x44ba0b(0x168)](_0xa24dfd)||[];_0x5f40f4['push'](_0x1fc487),_0x18e0f5[_0x44ba0b(0x147)](_0xa24dfd,_0x5f40f4);}}return _0x18e0f5;}export function buildLocalRuleToNameMappingFromJourney(_0xfe49a8){const _0x544b29=a162_0x1c1b,_0x55b677=_0xfe49a8[_0x544b29(0x141)];if(!_0x55b677)return new Map();const _0x1fe10c=collectSegmentUsageCounts(_0xfe49a8),_0x55a54d=new Map();let _0x2745d0=0x0;for(const [_0xbb2546,_0x48e8c1]of Object[_0x544b29(0x17a)](_0x55b677)){if(!_0x48e8c1[_0x544b29(0x15d)]){_0x2745d0++;continue;}const _0x1a9280=serializeRule(_0x48e8c1[_0x544b29(0x15d)]),_0x595401=_0x55a54d[_0x544b29(0x168)](_0x1a9280)||[];_0x595401[_0x544b29(0x15f)]({'name':_0xbb2546,'index':_0x2745d0}),_0x55a54d[_0x544b29(0x147)](_0x1a9280,_0x595401),_0x2745d0++;}const _0x1750ad=new Map();for(const [_0x4c06fc,_0x48696e]of _0x55a54d){const _0xf980cb=_0x48696e[_0x544b29(0x170)]()['sort']((_0x5c7687,_0x1f3827)=>{const _0x332240=_0x544b29,_0x180d09=_0x1fe10c[_0x332240(0x168)](_0x5c7687['name'])||0x0,_0x27a43f=_0x1fe10c[_0x332240(0x168)](_0x1f3827[_0x332240(0x134)])||0x0;if(_0x180d09!==_0x27a43f)return _0x27a43f-_0x180d09;return _0x5c7687[_0x332240(0x167)]-_0x1f3827[_0x332240(0x167)];})[_0x544b29(0x146)](_0xe474a7=>_0xe474a7[_0x544b29(0x134)]);_0x1750ad[_0x544b29(0x147)](_0x4c06fc,_0xf980cb);}return _0x1750ad;}export function collectSegmentUsageCounts(_0x19ce7a){const _0x13c465=a162_0x1c1b,_0x1a6281=new Map(),_0x46fcdd=_0xa771a8=>{const _0x20b4db=a162_0x1c1b;if(!_0xa771a8)return;_0x1a6281[_0x20b4db(0x147)](_0xa771a8,(_0x1a6281['get'](_0xa771a8)||0x0)+0x1);},_0xa12074=_0x43b7ea=>{const _0x445bb1=a162_0x1c1b;for(const _0x4f4035 of _0x43b7ea){_0x46fcdd(_0x4f4035[_0x445bb1(0x130)]?.['segment']);if(_0x4f4035['exit_criteria'])for(const _0x1d83bf of _0x4f4035[_0x445bb1(0x14c)]){_0x46fcdd(_0x1d83bf['segment']);}_0x46fcdd(_0x4f4035['milestone']?.['segment']);if(_0x4f4035[_0x445bb1(0x14a)])for(const _0x2ec6d4 of _0x4f4035[_0x445bb1(0x14a)]){if(_0x2ec6d4[_0x445bb1(0x137)]===_0x445bb1(0x15e))for(const _0x141065 of _0x2ec6d4[_0x445bb1(0x158)][_0x445bb1(0x16c)]){_0x46fcdd(_0x141065['segment']);}else _0x2ec6d4['type']===_0x445bb1(0x173)&&_0x46fcdd(_0x2ec6d4[_0x445bb1(0x158)][_0x445bb1(0x13a)]?.[_0x445bb1(0x136)]);}}};_0x46fcdd(_0x19ce7a['goal']?.['segment']);if(_0x19ce7a[_0x13c465(0x149)])for(const _0x3bcc16 of _0x19ce7a[_0x13c465(0x149)]){_0x46fcdd(_0x3bcc16['goal']?.[_0x13c465(0x136)]),_0xa12074(_0x3bcc16['stages']);}_0x19ce7a[_0x13c465(0x171)]&&_0xa12074(_0x19ce7a['stages']);if(_0x19ce7a[_0x13c465(0x15c)])for(const _0x560815 of _0x19ce7a[_0x13c465(0x15c)]){_0xa12074(_0x560815[_0x13c465(0x171)]);}return _0x1a6281;}
|
|
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(_0x4987e4,_0x402d5a){const _0x2e975c=a163_0x4d24,_0xbd8f1e=_0x4987e4();while(!![]){try{const _0x1c449=-parseInt(_0x2e975c(0x1b1))/0x1+parseInt(_0x2e975c(0x1ad))/0x2+-parseInt(_0x2e975c(0x205))/0x3+parseInt(_0x2e975c(0x1fa))/0x4+-parseInt(_0x2e975c(0x1b9))/0x5+-parseInt(_0x2e975c(0x179))/0x6*(parseInt(_0x2e975c(0x1fb))/0x7)+parseInt(_0x2e975c(0x1ac))/0x8;if(_0x1c449===_0x402d5a)break;else _0xbd8f1e['push'](_0xbd8f1e['shift']());}catch(_0x4535e3){_0xbd8f1e['push'](_0xbd8f1e['shift']());}}}(a163_0x5259,0xd0e14));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function a163_0x5259(){const _0x3379cb=['INSUFFICIENT_STEPS','success','timeout\x20of\x20\x27','INVALID_AB_TEST_PERCENTAGES','stage','BRANCH_DIRECTLY_TO_MERGE','\x27\x20of\x20\x27',').\x20Use\x20a\x20merge\x20step.','.entry_criteria','entries','name','Stage\x20\x27','MISSING_WAIT_PARAMS','startsWith','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','MISSING_ACTIVATION_DEFINITION','set','embeddedSegments','.with.condition','condition\x20of\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','symbol','endsWith','UNUSED_EMBEDDED_SEGMENT','journeys[','path','Journey\x20has\x20no\x20goal\x20defined','MISSING_GOAL','.with.condition.next','.with.condition.timeout.next','length','\x27\x20(from:\x20','source','error','next','get','Criteria\x20references\x20undefined\x20segment\x20\x27','condition','code','message','.with.variants[','.steps','MISSING_NAME','skipSchema','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','variant\x20\x27','.name','data','338040TsIcYJ','3412787OaSKKo','MISSING_EXIT_CRITERIA','join','includes','issues','state','journeys,\x20stages,\x20or\x20versions','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','variants','\x27\x20has\x20no\x20steps','1240488gaFOOx','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','Step\x20references\x20non-existent\x20step\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','step\x20\x27','ACTIVATION_SCHEMA_ERROR','stages','abs','activation','Merge\x20step\x20\x27','MISSING_END_STEP','milestone','INVALID_JUMP_TARGET','sort','MISSING_STAGES','target','end','.with.branches','INVALID_NEXT_REFERENCE','merge','journey\x20entry','DUPLICATE_STEP_NAME','has','versions[','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','.with.target','version','MISSING_SEGMENT_REFERENCE','\x27\x20has\x20no\x20end\x20step','percentage','.with','rule','\x27\x20has\x20only\x20','\x27\x20with\x20no\x20action\x20in\x20between','\x20(across\x20','12hiIrxC','match','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','launched','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','END_STEP_HAS_NEXT_OR_WITH','level','trim','with','.next','stepNames','End\x20step\x20\x27','steps','segments.','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','wait','JOURNEY_SCHEMA_ERROR','\x27\x20has\x20no\x20exit_criteria\x20defined','activations','MISSING_ENTRY_CRITERIA','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','document','.type','CONVERGENCE_WITHOUT_MERGE','segment','referencedSegments','safeParse','activationKeys','journeys','excluded','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','warning','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.exit_criteria','stages[','FEW_STEPS','MISSING_MILESTONE','every','SINGLE_INPUT_MERGE','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','type','exit_criteria','timeout','.with.branches[','MISSING_CONDITIONS','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','add','ref:','\x27\x20(first\x20defined\x20at\x20steps[','DUPLICATE_LATEST','22603192ODXSoV','1525558dCgAqp','decision_point','segments','size','279505GCqFpC','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','ab_test','push','some','\x20versions)','description','branches','5745165VixFQs','Journey\x20can\x20have\x20at\x20most\x20one\x20','indices','map','\x20with\x20latest:\x20true','MISSING_ACTIVATION_REF','goal','\x20stages\x20but\x20maximum\x20is\x20','versions','.with.condition.timeout','.rule','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','keys','.stages','Jump\x20step\x20requires\x20a\x20target','filter'];a163_0x5259=function(){return _0x3379cb;};return a163_0x5259();}function createIssue(_0x167e7c,_0x24ef74,_0x3c6ee5,_0x49c535,_0xa0d9af,_0x5228ba){const _0x39b0ec=a163_0x4d24;return{'level':_0x167e7c,'path':_0x24ef74,'code':_0x3c6ee5,'message':_0x49c535,'location':getLocationFromPath(_0xa0d9af['document'],_0xa0d9af[_0x39b0ec(0x1ea)],pathToArray(_0x5228ba??_0x24ef74))};}function validateVersionStructure(_0x595e4f,_0x2c33d6){const _0x40d448=a163_0x4d24,_0x46536b=[];return _0x595e4f[_0x40d448(0x1e8)]>MAX_STAGES&&_0x46536b[_0x40d448(0x1b4)](createIssue(_0x40d448(0x1eb),_0x40d448(0x20c),'TOO_MANY_STAGES','Journey\x20has\x20'+_0x595e4f[_0x40d448(0x1e8)]+_0x40d448(0x1c0)+MAX_STAGES,_0x2c33d6)),_0x46536b;}function validateStageStructure(_0x41fef5,_0x1866fb,_0x1a9239,_0x282493){const _0x54ec56=a163_0x4d24,_0x262041=[],_0x7719a2=_0x54ec56(0x19b)+_0x1866fb+']';_0x1866fb===0x0&&!_0x41fef5['entry_criteria']&&_0x262041[_0x54ec56(0x1b4)](createIssue('error',_0x7719a2+_0x54ec56(0x1d1),_0x54ec56(0x18c),_0x54ec56(0x1d4)+_0x41fef5[_0x54ec56(0x1d3)]+_0x54ec56(0x16e),_0x282493,_0x7719a2));const _0x3b194c=_0x1866fb===_0x1a9239-0x1;!_0x3b194c&&!_0x41fef5[_0x54ec56(0x161)]&&_0x262041['push'](createIssue(_0x54ec56(0x1eb),_0x7719a2+'.milestone',_0x54ec56(0x19d),_0x54ec56(0x1d4)+_0x41fef5[_0x54ec56(0x1d3)]+_0x54ec56(0x18d),_0x282493,_0x7719a2));(!_0x41fef5[_0x54ec56(0x1a2)]||_0x41fef5[_0x54ec56(0x1a2)][_0x54ec56(0x1e8)]===0x0)&&_0x262041[_0x54ec56(0x1b4)](createIssue(_0x54ec56(0x198),_0x7719a2+_0x54ec56(0x19a),_0x54ec56(0x1fc),_0x54ec56(0x1d4)+_0x41fef5[_0x54ec56(0x1d3)]+_0x54ec56(0x18a),_0x282493,_0x7719a2));const _0x489386=_0x41fef5[_0x54ec56(0x185)]?.[_0x54ec56(0x1e8)]??0x0;if(_0x489386===0x0)_0x262041[_0x54ec56(0x1b4)](createIssue(_0x54ec56(0x1eb),_0x7719a2+_0x54ec56(0x1f3),_0x54ec56(0x1c9),'Stage\x20\x27'+_0x41fef5[_0x54ec56(0x1d3)]+_0x54ec56(0x204),_0x282493,_0x7719a2+_0x54ec56(0x1f3)));else{if(_0x489386===0x1)_0x262041['push'](createIssue('warning',_0x7719a2+'.steps',_0x54ec56(0x1c9),_0x54ec56(0x1d4)+_0x41fef5[_0x54ec56(0x1d3)]+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x282493,_0x7719a2+'.steps'));else _0x489386<=0x3&&_0x262041[_0x54ec56(0x1b4)](createIssue(_0x54ec56(0x198),_0x7719a2+_0x54ec56(0x1f3),_0x54ec56(0x19c),'Stage\x20\x27'+_0x41fef5[_0x54ec56(0x1d3)]+_0x54ec56(0x176)+_0x489386+_0x54ec56(0x1dd),_0x282493,_0x7719a2+'.steps'));}return _0x262041;}function validateStep(_0x3eb63e,_0x23e8c7,_0x2e5eaa,_0x523048){const _0x2392f1=a163_0x4d24,_0x27c88d=[];if(_0x3eb63e[_0x2392f1(0x1a1)]==='end')return _0x3eb63e['next']&&_0x27c88d[_0x2392f1(0x1b4)](createIssue(_0x2392f1(0x1eb),_0x23e8c7+_0x2392f1(0x182),_0x2392f1(0x17e),_0x2392f1(0x184)+_0x3eb63e[_0x2392f1(0x1d3)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x2e5eaa)),'with'in _0x3eb63e&&_0x3eb63e[_0x2392f1(0x181)]!==undefined&&_0x27c88d['push'](createIssue(_0x2392f1(0x1eb),_0x23e8c7+_0x2392f1(0x174),_0x2392f1(0x17e),_0x2392f1(0x184)+_0x3eb63e['name']+_0x2392f1(0x17d),_0x2e5eaa)),_0x27c88d;_0x3eb63e['next']&&(_0x2e5eaa[_0x2392f1(0x183)]&&!_0x2e5eaa[_0x2392f1(0x183)]['has'](_0x3eb63e[_0x2392f1(0x1ec)])&&_0x27c88d['push'](createIssue(_0x2392f1(0x1eb),_0x23e8c7+'.next',_0x2392f1(0x168),_0x2392f1(0x207)+_0x3eb63e[_0x2392f1(0x1ec)]+'\x27',_0x2e5eaa)));switch(_0x3eb63e[_0x2392f1(0x1a1)]){case'wait':_0x27c88d[_0x2392f1(0x1b4)](...validateWaitStep(_0x3eb63e,_0x23e8c7,_0x2e5eaa,_0x523048));break;case'activation':_0x27c88d[_0x2392f1(0x1b4)](...validateActivationStep(_0x3eb63e,_0x23e8c7,_0x2e5eaa));break;case _0x2392f1(0x1ae):_0x27c88d['push'](...validateDecisionPointStep(_0x3eb63e,_0x23e8c7,_0x2e5eaa,_0x523048));break;case _0x2392f1(0x1b3):_0x27c88d[_0x2392f1(0x1b4)](...validateAbTestStep(_0x3eb63e,_0x23e8c7,_0x2e5eaa,_0x523048));break;case'jump':_0x27c88d[_0x2392f1(0x1b4)](...validateJumpStep(_0x3eb63e,_0x23e8c7,_0x2e5eaa));break;}return _0x27c88d;}function validateWaitStep(_0x20db65,_0x99fb0d,_0x544257,_0x5f35d1){const _0x583ec7=a163_0x4d24,_0x2adad4=[];if(!_0x20db65[_0x583ec7(0x181)])return _0x2adad4[_0x583ec7(0x1b4)](createIssue(_0x583ec7(0x1eb),_0x99fb0d+_0x583ec7(0x174),_0x583ec7(0x1d5),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x544257,_0x99fb0d)),_0x2adad4;if(_0x20db65[_0x583ec7(0x181)]['condition']){const _0x1a21bc=_0x20db65[_0x583ec7(0x181)]['condition'];if(_0x1a21bc[_0x583ec7(0x191)]){_0x544257[_0x583ec7(0x192)]?.[_0x583ec7(0x1a8)](_0x1a21bc[_0x583ec7(0x191)]);!_0x1a21bc[_0x583ec7(0x191)][_0x583ec7(0x1d6)](_0x583ec7(0x1a9))&&(_0x544257['embeddedSegments']&&!_0x544257[_0x583ec7(0x1da)][_0x583ec7(0x16c)](_0x1a21bc[_0x583ec7(0x191)])&&_0x2adad4[_0x583ec7(0x1b4)](createIssue(_0x583ec7(0x1eb),_0x99fb0d+'.with.condition.segment',_0x583ec7(0x171),_0x583ec7(0x197)+_0x1a21bc[_0x583ec7(0x191)]+_0x583ec7(0x1a6),_0x544257)));_0x1a21bc[_0x583ec7(0x1ec)]&&_0x544257[_0x583ec7(0x183)]&&!_0x544257[_0x583ec7(0x183)]['has'](_0x1a21bc[_0x583ec7(0x1ec)])&&_0x2adad4[_0x583ec7(0x1b4)](createIssue(_0x583ec7(0x1eb),_0x99fb0d+'.with.condition.next',_0x583ec7(0x168),_0x583ec7(0x1a7)+_0x1a21bc['next']+'\x27',_0x544257));_0x1a21bc[_0x583ec7(0x1a3)]?.[_0x583ec7(0x1ec)]&&_0x544257[_0x583ec7(0x183)]&&!_0x544257[_0x583ec7(0x183)][_0x583ec7(0x16c)](_0x1a21bc[_0x583ec7(0x1a3)]['next'])&&_0x2adad4[_0x583ec7(0x1b4)](createIssue(_0x583ec7(0x1eb),_0x99fb0d+_0x583ec7(0x1e7),_0x583ec7(0x168),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x1a21bc[_0x583ec7(0x1a3)][_0x583ec7(0x1ec)]+'\x27',_0x544257));const _0x53e8d8=_0x1a21bc[_0x583ec7(0x1ec)]||_0x20db65[_0x583ec7(0x1ec)],_0x368f3e=_0x1a21bc[_0x583ec7(0x1a3)]?.['next']||_0x20db65[_0x583ec7(0x1ec)];if(_0x53e8d8){const _0x3cd18c=_0x5f35d1[_0x583ec7(0x1ed)](_0x53e8d8);_0x3cd18c?.[_0x583ec7(0x1a1)]==='merge'&&_0x2adad4[_0x583ec7(0x1b4)](createIssue(_0x583ec7(0x198),_0x99fb0d+_0x583ec7(0x1e6),_0x583ec7(0x1ce),_0x583ec7(0x1a0)+_0x53e8d8+_0x583ec7(0x1d7),_0x544257,_0x99fb0d+_0x583ec7(0x1db)));}if(_0x368f3e){const _0x3f8e86=_0x5f35d1[_0x583ec7(0x1ed)](_0x368f3e);_0x3f8e86?.[_0x583ec7(0x1a1)]==='merge'&&_0x2adad4[_0x583ec7(0x1b4)](createIssue(_0x583ec7(0x198),_0x99fb0d+_0x583ec7(0x1e7),'BRANCH_DIRECTLY_TO_MERGE',_0x583ec7(0x209)+_0x368f3e+_0x583ec7(0x1d7),_0x544257,_0x99fb0d+_0x583ec7(0x1c2)));}}}return _0x2adad4;}function validateActivationStep(_0x507fa9,_0x496c91,_0x3a251a){const _0x169b71=a163_0x4d24,_0x1bc00a=[];if(!_0x507fa9[_0x169b71(0x181)]?.[_0x169b71(0x20e)])return _0x1bc00a['push'](createIssue(_0x169b71(0x1eb),_0x496c91+'.with.activation',_0x169b71(0x1be),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x3a251a,_0x496c91)),_0x1bc00a;const _0x400b04=_0x507fa9['with'][_0x169b71(0x20e)];return _0x3a251a['activationKeys']&&!_0x400b04[_0x169b71(0x1d6)]('ref:')&&(!_0x3a251a[_0x169b71(0x194)]['has'](_0x400b04)&&_0x1bc00a[_0x169b71(0x1b4)](createIssue(_0x169b71(0x1eb),_0x496c91+'.with.activation',_0x169b71(0x1d8),_0x169b71(0x1de)+_0x400b04+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x3a251a))),_0x1bc00a;}function validateDecisionPointStep(_0x26a873,_0xdd5b85,_0x1765ba,_0x389df1){const _0x3a7d91=a163_0x4d24,_0x3e953a=[];if(!_0x26a873[_0x3a7d91(0x181)]?.[_0x3a7d91(0x1b8)]||_0x26a873['with'][_0x3a7d91(0x1b8)][_0x3a7d91(0x1e8)]===0x0)return _0x3e953a[_0x3a7d91(0x1b4)](createIssue(_0x3a7d91(0x1eb),_0xdd5b85+_0x3a7d91(0x167),'MISSING_CONDITIONS','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x1765ba,_0xdd5b85)),_0x3e953a;for(let _0x5f30c0=0x0;_0x5f30c0<_0x26a873[_0x3a7d91(0x181)]['branches'][_0x3a7d91(0x1e8)];_0x5f30c0++){const _0x4a5500=_0x26a873[_0x3a7d91(0x181)][_0x3a7d91(0x1b8)][_0x5f30c0],_0x4f5483=_0xdd5b85+_0x3a7d91(0x1a4)+_0x5f30c0+']';_0x4a5500[_0x3a7d91(0x191)]&&!_0x4a5500[_0x3a7d91(0x196)]&&(_0x1765ba[_0x3a7d91(0x192)]?.[_0x3a7d91(0x1a8)](_0x4a5500[_0x3a7d91(0x191)]),!_0x4a5500[_0x3a7d91(0x191)][_0x3a7d91(0x1d6)](_0x3a7d91(0x1a9))&&(_0x1765ba[_0x3a7d91(0x1da)]&&!_0x1765ba['embeddedSegments'][_0x3a7d91(0x16c)](_0x4a5500['segment'])&&_0x3e953a[_0x3a7d91(0x1b4)](createIssue(_0x3a7d91(0x1eb),_0x4f5483+'.segment','MISSING_SEGMENT_REFERENCE',_0x3a7d91(0x202)+_0x4a5500[_0x3a7d91(0x191)]+'\x27',_0x1765ba))));_0x4a5500['next']&&_0x1765ba[_0x3a7d91(0x183)]&&!_0x1765ba[_0x3a7d91(0x183)]['has'](_0x4a5500['next'])&&_0x3e953a[_0x3a7d91(0x1b4)](createIssue(_0x3a7d91(0x1eb),_0x4f5483+'.next',_0x3a7d91(0x168),_0x3a7d91(0x17b)+_0x4a5500[_0x3a7d91(0x1ec)]+'\x27',_0x1765ba));if(_0x4a5500[_0x3a7d91(0x1ec)]){const _0x803bd6=_0x389df1[_0x3a7d91(0x1ed)](_0x4a5500['next']);_0x803bd6?.[_0x3a7d91(0x1a1)]===_0x3a7d91(0x169)&&_0x3e953a[_0x3a7d91(0x1b4)](createIssue('warning',_0x4f5483+'.next',_0x3a7d91(0x1ce),'Decision\x20branch\x20\x27'+_0x4a5500['name']+_0x3a7d91(0x187)+_0x4a5500[_0x3a7d91(0x1ec)]+_0x3a7d91(0x177),_0x1765ba));}}return _0x3e953a;}function validateAbTestStep(_0x4cea5e,_0x48d077,_0x38202f,_0x2f2698){const _0xcca7a5=a163_0x4d24,_0x1eb712=[];if(!_0x4cea5e['with']?.[_0xcca7a5(0x203)]||_0x4cea5e[_0xcca7a5(0x181)][_0xcca7a5(0x203)][_0xcca7a5(0x1e8)]===0x0)return _0x1eb712[_0xcca7a5(0x1b4)](createIssue(_0xcca7a5(0x1eb),_0x48d077+'.with.variants',_0xcca7a5(0x1a5),_0xcca7a5(0x1f6),_0x38202f,_0x48d077)),_0x1eb712;const _0x227be0=_0x4cea5e[_0xcca7a5(0x181)][_0xcca7a5(0x203)]['reduce']((_0x333798,_0x5b765b)=>_0x333798+(_0x5b765b[_0xcca7a5(0x173)]||0x0),0x0);Math[_0xcca7a5(0x20d)](_0x227be0-0x64)>0.01&&_0x1eb712[_0xcca7a5(0x1b4)](createIssue(_0xcca7a5(0x1eb),_0x48d077+'.with.variants',_0xcca7a5(0x1cc),_0xcca7a5(0x199)+_0x227be0+'%)',_0x38202f));for(let _0x4cdd42=0x0;_0x4cdd42<_0x4cea5e[_0xcca7a5(0x181)][_0xcca7a5(0x203)][_0xcca7a5(0x1e8)];_0x4cdd42++){const _0xdb4073=_0x4cea5e[_0xcca7a5(0x181)][_0xcca7a5(0x203)][_0x4cdd42],_0x4aa4ec=_0x48d077+_0xcca7a5(0x1f2)+_0x4cdd42+']';_0xdb4073[_0xcca7a5(0x1ec)]&&_0x38202f['stepNames']&&!_0x38202f[_0xcca7a5(0x183)][_0xcca7a5(0x16c)](_0xdb4073[_0xcca7a5(0x1ec)])&&_0x1eb712['push'](createIssue(_0xcca7a5(0x1eb),_0x4aa4ec+_0xcca7a5(0x182),'INVALID_NEXT_REFERENCE',_0xcca7a5(0x1b2)+_0xdb4073[_0xcca7a5(0x1ec)]+'\x27',_0x38202f));if(_0xdb4073[_0xcca7a5(0x1ec)]){const _0xead64e=_0x2f2698['get'](_0xdb4073[_0xcca7a5(0x1ec)]);_0xead64e?.[_0xcca7a5(0x1a1)]===_0xcca7a5(0x169)&&_0x1eb712[_0xcca7a5(0x1b4)](createIssue(_0xcca7a5(0x198),_0x4aa4ec+_0xcca7a5(0x182),'BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20variant\x20\x27'+_0xdb4073[_0xcca7a5(0x1d3)]+_0xcca7a5(0x187)+_0xdb4073['next']+_0xcca7a5(0x177),_0x38202f));}}return _0x1eb712;}function validateJumpStep(_0x4f69ea,_0xb77dec,_0x132ce9){const _0x462295=a163_0x4d24,_0x51415b=[];if(!_0x4f69ea['with']?.[_0x462295(0x165)])return _0x51415b[_0x462295(0x1b4)](createIssue('error',_0xb77dec+_0x462295(0x16f),_0x462295(0x162),_0x462295(0x1c7),_0x132ce9,_0xb77dec)),_0x51415b;return(!_0x4f69ea['with'][_0x462295(0x165)]['journey']||!_0x4f69ea[_0x462295(0x181)][_0x462295(0x165)][_0x462295(0x1cd)])&&_0x51415b[_0x462295(0x1b4)](createIssue(_0x462295(0x1eb),_0xb77dec+_0x462295(0x16f),_0x462295(0x162),_0x462295(0x1c4),_0x132ce9)),_0x51415b;}function buildConvergenceMap(_0x1646fe){const _0x184311=a163_0x4d24,_0x45ea97=new Map();function _0x1c1d58(_0x5d5428,_0x3f4bc8){const _0x8fd701=a163_0x4d24,_0x475190=_0x45ea97[_0x8fd701(0x1ed)](_0x5d5428)||[];_0x475190[_0x8fd701(0x1b4)](_0x3f4bc8),_0x45ea97[_0x8fd701(0x1d9)](_0x5d5428,_0x475190);}for(const _0x2c67ea of _0x1646fe){_0x2c67ea[_0x184311(0x1ec)]&&_0x1c1d58(_0x2c67ea[_0x184311(0x1ec)],{'stepName':_0x2c67ea[_0x184311(0x1d3)],'description':_0x184311(0x20a)+_0x2c67ea['name']+'\x27'});if(_0x2c67ea[_0x184311(0x1a1)]===_0x184311(0x1ae)&&_0x2c67ea['with']?.['branches'])for(const _0x249737 of _0x2c67ea[_0x184311(0x181)]['branches']){_0x249737[_0x184311(0x1ec)]&&_0x1c1d58(_0x249737[_0x184311(0x1ec)],{'stepName':_0x2c67ea[_0x184311(0x1d3)],'description':'branch\x20\x27'+_0x249737[_0x184311(0x1d3)]+_0x184311(0x1cf)+_0x2c67ea['name']+'\x27'});}if(_0x2c67ea[_0x184311(0x1a1)]===_0x184311(0x1b3)&&_0x2c67ea['with']?.[_0x184311(0x203)])for(const _0x3737a4 of _0x2c67ea['with'][_0x184311(0x203)]){_0x3737a4[_0x184311(0x1ec)]&&_0x1c1d58(_0x3737a4[_0x184311(0x1ec)],{'stepName':_0x2c67ea['name'],'description':_0x184311(0x1f7)+_0x3737a4['name']+_0x184311(0x1cf)+_0x2c67ea[_0x184311(0x1d3)]+'\x27'});}_0x2c67ea[_0x184311(0x1a1)]===_0x184311(0x188)&&_0x2c67ea['with']?.[_0x184311(0x1ef)]&&(_0x2c67ea[_0x184311(0x181)]['condition']['next']&&_0x1c1d58(_0x2c67ea[_0x184311(0x181)][_0x184311(0x1ef)][_0x184311(0x1ec)],{'stepName':_0x2c67ea[_0x184311(0x1d3)],'description':_0x184311(0x1dc)+_0x2c67ea[_0x184311(0x1d3)]+'\x27'}),_0x2c67ea[_0x184311(0x181)][_0x184311(0x1ef)][_0x184311(0x1a3)]?.[_0x184311(0x1ec)]&&_0x1c1d58(_0x2c67ea['with'][_0x184311(0x1ef)][_0x184311(0x1a3)]['next'],{'stepName':_0x2c67ea['name'],'description':_0x184311(0x1cb)+_0x2c67ea[_0x184311(0x1d3)]+'\x27'}));}return _0x45ea97;}function validateFlowControl(_0x5b6ee7,_0x4fef52,_0x50a20d){const _0x3c879b=a163_0x4d24,_0x31246b=[],_0x29db24='stages['+_0x4fef52+']',_0x47ce83=_0x5b6ee7[_0x3c879b(0x185)]||[];if(_0x47ce83['length']===0x0)return _0x31246b;const _0x42cbcc=new Map();for(const _0x4693c0 of _0x47ce83){_0x4693c0['name']&&_0x42cbcc['set'](_0x4693c0['name'],_0x4693c0);}const _0x17f2d6=buildConvergenceMap(_0x47ce83),_0x387ea4=_0x47ce83[_0x3c879b(0x1b5)](_0x2a55db=>_0x2a55db['type']===_0x3c879b(0x166));!_0x387ea4&&_0x31246b['push'](createIssue(_0x3c879b(0x1eb),_0x29db24+_0x3c879b(0x1f3),_0x3c879b(0x210),'Stage\x20\x27'+_0x5b6ee7['name']+_0x3c879b(0x172),_0x50a20d));for(const [_0x919059,_0x155b95]of _0x17f2d6){const _0x2142b5=_0x42cbcc[_0x3c879b(0x1ed)](_0x919059);if(!_0x2142b5)continue;if(_0x155b95['length']>0x1&&_0x2142b5['type']!==_0x3c879b(0x169)){const _0x4f2f67=_0x155b95['map'](_0x342680=>_0x342680['description'])[_0x3c879b(0x1fd)](',\x20');_0x31246b[_0x3c879b(0x1b4)](createIssue(_0x3c879b(0x1eb),_0x29db24+_0x3c879b(0x1f3),_0x3c879b(0x190),_0x3c879b(0x208)+_0x919059+_0x3c879b(0x1e9)+_0x4f2f67+_0x3c879b(0x1d0),_0x50a20d));}_0x155b95[_0x3c879b(0x1e8)]===0x1&&_0x2142b5['type']===_0x3c879b(0x169)&&_0x31246b[_0x3c879b(0x1b4)](createIssue('warning',_0x29db24+'.steps',_0x3c879b(0x19f),'Merge\x20step\x20\x27'+_0x919059+_0x3c879b(0x206)+_0x155b95[0x0][_0x3c879b(0x1b7)]+').\x20Merge\x20is\x20unnecessary.',_0x50a20d));}for(const _0x1059d2 of _0x47ce83){if(_0x1059d2[_0x3c879b(0x1a1)]==='merge'&&_0x1059d2['next']){const _0x566e71=_0x42cbcc[_0x3c879b(0x1ed)](_0x1059d2['next']);_0x566e71?.[_0x3c879b(0x1a1)]==='merge'&&_0x31246b[_0x3c879b(0x1b4)](createIssue(_0x3c879b(0x1eb),_0x29db24+_0x3c879b(0x1f3),'MERGE_TO_MERGE_CHAIN',_0x3c879b(0x20f)+_0x1059d2['name']+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x1059d2['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x50a20d));}}return _0x31246b;}function validateCriteria(_0x3295e2,_0x1d885c,_0x11316b){const _0x2f8657=a163_0x4d24,_0x314960=[];return _0x3295e2[_0x2f8657(0x191)]&&(_0x11316b[_0x2f8657(0x192)]?.[_0x2f8657(0x1a8)](_0x3295e2['segment']),!_0x3295e2[_0x2f8657(0x191)]['startsWith'](_0x2f8657(0x1a9))&&(_0x11316b[_0x2f8657(0x1da)]&&!_0x11316b[_0x2f8657(0x1da)][_0x2f8657(0x16c)](_0x3295e2['segment'])&&_0x314960[_0x2f8657(0x1b4)](createIssue(_0x2f8657(0x1eb),_0x1d885c+'.segment','MISSING_SEGMENT_REFERENCE',_0x2f8657(0x1ee)+_0x3295e2[_0x2f8657(0x191)]+'\x27',_0x11316b)))),_0x314960;}function validateEmbeddedSegment(_0x7ad20e,_0x53d552,_0x4aca9c){const _0x361565=a163_0x4d24,_0x18c87e=[];return _0x7ad20e[_0x361565(0x175)]&&_0x18c87e[_0x361565(0x1b4)](...validateRuleDef(_0x7ad20e['rule'],_0x53d552+_0x361565(0x1c3),_0x4aca9c)),_0x18c87e;}function validateStage(_0x570e80,_0xc03fb4,_0x3cea41,_0x7e1a70){const _0x5f2668=a163_0x4d24,_0x1f5e77=[],_0x1fbada='stages['+_0xc03fb4+']',_0xe674fa=new Map(),_0x2c3bb5=new Map();if(_0x570e80[_0x5f2668(0x185)]){for(let _0x4d5dc2=0x0;_0x4d5dc2<_0x570e80[_0x5f2668(0x185)][_0x5f2668(0x1e8)];_0x4d5dc2++){const _0x14a074=_0x570e80[_0x5f2668(0x185)][_0x4d5dc2];_0x14a074[_0x5f2668(0x1d3)]&&_0xe674fa['set'](_0x14a074['name'],_0x14a074);}for(let _0xe1a230=0x0;_0xe1a230<_0x570e80[_0x5f2668(0x185)]['length'];_0xe1a230++){const _0x2f597a=_0x570e80[_0x5f2668(0x185)][_0xe1a230],_0x55211c=_0x1fbada+'.steps['+_0xe1a230+']';if(_0x2f597a[_0x5f2668(0x1d3)]){if(_0x2c3bb5[_0x5f2668(0x16c)](_0x2f597a['name'])){const _0x4a0227=_0x2c3bb5['get'](_0x2f597a[_0x5f2668(0x1d3)]);_0x1f5e77[_0x5f2668(0x1b4)](createIssue(_0x5f2668(0x1eb),_0x55211c+_0x5f2668(0x1f8),_0x5f2668(0x16b),'Duplicate\x20step\x20name\x20\x27'+_0x2f597a[_0x5f2668(0x1d3)]+_0x5f2668(0x1aa)+_0x4a0227+'])',_0x7e1a70));}else _0x2c3bb5[_0x5f2668(0x1d9)](_0x2f597a[_0x5f2668(0x1d3)],_0xe1a230);}_0x1f5e77[_0x5f2668(0x1b4)](...validateStep(_0x2f597a,_0x55211c,_0x7e1a70,_0xe674fa));}}_0x570e80['entry_criteria']&&_0x1f5e77['push'](...validateCriteria(_0x570e80['entry_criteria'],_0x1fbada+'.entry_criteria',_0x7e1a70));if(_0x570e80[_0x5f2668(0x1a2)])for(let _0x55f97b=0x0;_0x55f97b<_0x570e80[_0x5f2668(0x1a2)][_0x5f2668(0x1e8)];_0x55f97b++){_0x1f5e77[_0x5f2668(0x1b4)](...validateCriteria(_0x570e80[_0x5f2668(0x1a2)][_0x55f97b],_0x1fbada+'.exit_criteria['+_0x55f97b+']',_0x7e1a70));}return _0x570e80[_0x5f2668(0x161)]&&_0x1f5e77[_0x5f2668(0x1b4)](...validateCriteria(_0x570e80[_0x5f2668(0x161)],_0x1fbada+'.milestone',_0x7e1a70)),_0x1f5e77[_0x5f2668(0x1b4)](...validateStageStructure(_0x570e80,_0xc03fb4,_0x3cea41,_0x7e1a70)),_0x1f5e77[_0x5f2668(0x1b4)](...validateFlowControl(_0x570e80,_0xc03fb4,_0x7e1a70)),_0x1f5e77;}function validateStagesForVersion(_0x30ab79,_0x16bbe7,_0x3e99b2,_0x198b51,_0x582c5d,_0x2a31bf,_0x579381){const _0x19f1af=a163_0x4d24;if(_0x30ab79['length']===0x0){_0x582c5d[_0x19f1af(0x1b4)]({'level':'error','path':_0x198b51+_0x19f1af(0x20c),'code':_0x19f1af(0x164),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x3e99b2[_0x19f1af(0x18e)],_0x3e99b2['source'],[_0x19f1af(0x20c)])});return;}const _0x42c984=new Set();for(const _0x22f245 of _0x30ab79){if(_0x22f245[_0x19f1af(0x185)])for(const _0x1daf00 of _0x22f245['steps']){_0x1daf00[_0x19f1af(0x1d3)]&&_0x42c984[_0x19f1af(0x1a8)](_0x1daf00[_0x19f1af(0x1d3)]);}}const _0x5a95cb={..._0x3e99b2,'stepNames':_0x42c984},_0x49d193=validateVersionStructure(_0x30ab79,_0x5a95cb);for(const _0x10c9b0 of _0x49d193){const _0x25de24=_0x198b51?{..._0x10c9b0,'path':''+_0x198b51+_0x10c9b0[_0x19f1af(0x1e3)]}:_0x10c9b0;if(_0x25de24[_0x19f1af(0x17f)]===_0x19f1af(0x1eb))_0x582c5d['push'](_0x25de24);else _0x2a31bf[_0x19f1af(0x1b4)](_0x25de24);}for(let _0x1bc00c=0x0;_0x1bc00c<_0x30ab79['length'];_0x1bc00c++){const _0x34c5fe=validateStage(_0x30ab79[_0x1bc00c],_0x1bc00c,_0x30ab79[_0x19f1af(0x1e8)],_0x5a95cb);for(const _0x4541c6 of _0x34c5fe){const _0x271ab0=_0x198b51?{..._0x4541c6,'path':''+_0x198b51+_0x4541c6[_0x19f1af(0x1e3)]}:_0x4541c6;if(_0x271ab0[_0x19f1af(0x17f)]===_0x19f1af(0x1eb))_0x582c5d[_0x19f1af(0x1b4)](_0x271ab0);else _0x2a31bf[_0x19f1af(0x1b4)](_0x271ab0);}}if(_0x16bbe7[_0x19f1af(0x1bf)]){const _0x4eb10f=_0x579381?.['goalIsInherited']?_0x19f1af(0x1bf):_0x198b51+'goal',_0x712ac7=validateCriteria(_0x16bbe7[_0x19f1af(0x1bf)],_0x4eb10f,_0x5a95cb);for(const _0x4d990e of _0x712ac7){if(_0x4d990e[_0x19f1af(0x17f)]==='error')_0x582c5d[_0x19f1af(0x1b4)](_0x4d990e);else _0x2a31bf['push'](_0x4d990e);}}}function a163_0x4d24(_0x2279b8,_0x5f09e2){_0x2279b8=_0x2279b8-0x161;const _0x525975=a163_0x5259();let _0x4d24c5=_0x525975[_0x2279b8];return _0x4d24c5;}function extractVersionIndex(_0xb4ad80){const _0x5a88e7=a163_0x4d24,_0x5ab167=_0xb4ad80[_0x5a88e7(0x17a)](/^journeys\[(\d+)\]\./);return _0x5ab167?_0x5ab167[0x1]:undefined;}function deduplicateAcrossVersions(_0x547be6){const _0x3cbeae=a163_0x4d24,_0x4215e7=new Map();for(let _0x27a4ce=0x0;_0x27a4ce<_0x547be6[_0x3cbeae(0x1e8)];_0x27a4ce++){const _0x566453=_0x547be6[_0x27a4ce][_0x3cbeae(0x1f0)]+':'+_0x547be6[_0x27a4ce][_0x3cbeae(0x1f1)],_0x51fc9f=extractVersionIndex(_0x547be6[_0x27a4ce][_0x3cbeae(0x1e3)]),_0x26b472=_0x4215e7[_0x3cbeae(0x1ed)](_0x566453);if(_0x26b472){_0x26b472[_0x3cbeae(0x1bb)][_0x3cbeae(0x1b4)](_0x27a4ce);if(_0x51fc9f)_0x26b472[_0x3cbeae(0x1c1)][_0x3cbeae(0x1a8)](_0x51fc9f);}else _0x4215e7['set'](_0x566453,{'indices':[_0x27a4ce],'versions':new Set(_0x51fc9f?[_0x51fc9f]:[])});}const _0x36d91d=new Set();for(const {indices:_0x1f2c41,versions:_0x529e2c}of _0x4215e7['values']()){if(_0x529e2c[_0x3cbeae(0x1b0)]<=0x1)continue;const _0x162f62=_0x547be6[_0x1f2c41[0x0]];_0x162f62[_0x3cbeae(0x1e3)]=_0x162f62['path']['replace'](/^journeys\[\d+\]\./,''),_0x162f62[_0x3cbeae(0x1f1)]=_0x162f62[_0x3cbeae(0x1f1)]+_0x3cbeae(0x178)+_0x529e2c['size']+_0x3cbeae(0x1b6);for(let _0xc89f10=0x1;_0xc89f10<_0x1f2c41[_0x3cbeae(0x1e8)];_0xc89f10++){_0x36d91d[_0x3cbeae(0x1a8)](_0x1f2c41[_0xc89f10]);}}const _0x4d6c60=[..._0x36d91d][_0x3cbeae(0x163)]((_0xd9a10c,_0x15c931)=>_0x15c931-_0xd9a10c);for(const _0x3e0911 of _0x4d6c60){_0x547be6['splice'](_0x3e0911,0x1);}}export function validateJourneyDef(_0x4cbf7b,_0x40967c={},_0x5b332b={}){const _0xdb7530=a163_0x4d24;if(_0x5b332b[_0xdb7530(0x1f5)])return runJourneySemanticChecks(_0x4cbf7b,_0x40967c);const _0x444b75=JourneyDefSchema[_0xdb7530(0x193)](_0x4cbf7b);if(_0x444b75[_0xdb7530(0x1ca)])return runJourneySemanticChecks(_0x444b75[_0xdb7530(0x1f9)],_0x40967c);return zodErrorsToJourneyValidationResult(_0x444b75[_0xdb7530(0x1eb)],_0x40967c);}function zodErrorsToJourneyValidationResult(_0x1d67c2,_0x273891){const _0x1e1a71=a163_0x4d24,_0x1ef760=flattenZodIssues(_0x1d67c2[_0x1e1a71(0x1ff)]),_0x29d10f=_0x1ef760[_0x1e1a71(0x1bc)](_0x405e10=>{const _0x41dd85=_0x1e1a71,_0x16e720=formatZodPath(_0x405e10['path']),_0x1a7e63=mapJourneyZodIssueToCode(_0x405e10,_0x16e720),_0x43ce10=getLocationFromPath(_0x273891[_0x41dd85(0x18e)],_0x273891[_0x41dd85(0x1ea)],_0x405e10[_0x41dd85(0x1e3)]['map'](_0x25a018=>typeof _0x25a018===_0x41dd85(0x1df)?String(_0x25a018):_0x25a018));return{'level':_0x41dd85(0x1eb),'path':_0x16e720,'code':_0x1a7e63,'message':_0x405e10[_0x41dd85(0x1f1)],..._0x43ce10&&{'location':_0x43ce10}};});return{'valid':![],'errors':_0x29d10f,'warnings':[]};}function mapJourneyZodIssueToCode(_0x5aefda,_0x3ad6c8){const _0x3b98c5=a163_0x4d24;if(_0x3ad6c8===_0x3b98c5(0x1d3))return _0x3b98c5(0x1f4);if(_0x3ad6c8[_0x3b98c5(0x1e0)](_0x3b98c5(0x18f))&&_0x3ad6c8[_0x3b98c5(0x1fe)](_0x3b98c5(0x185)))return'JOURNEY_SCHEMA_ERROR';if(_0x3ad6c8===_0x3b98c5(0x20c)||_0x3ad6c8[_0x3b98c5(0x1e0)](_0x3b98c5(0x1c6)))return _0x3b98c5(0x164);if(_0x3ad6c8===''&&_0x5aefda[_0x3b98c5(0x1f1)][_0x3b98c5(0x1fe)](_0x3b98c5(0x201)))return'MISSING_STAGES';if(_0x3ad6c8['includes'](_0x3b98c5(0x20e)))return _0x3b98c5(0x20b);return _0x3b98c5(0x189);}function runJourneySemanticChecks(_0x4caa76,_0x2337ad){const _0x50e548=a163_0x4d24,_0x52d6ea=[],_0x1222cd=[];(!_0x4caa76['name']||_0x4caa76[_0x50e548(0x1d3)][_0x50e548(0x180)]()==='')&&_0x52d6ea[_0x50e548(0x1b4)]({'level':_0x50e548(0x1eb),'path':_0x50e548(0x1d3),'code':_0x50e548(0x1f4),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x2337ad['document'],_0x2337ad[_0x50e548(0x1ea)],[_0x50e548(0x1d3)])});const _0x10ff7=new Set();if(_0x4caa76[_0x50e548(0x1af)])for(const _0x5e4de6 of Object[_0x50e548(0x1c5)](_0x4caa76[_0x50e548(0x1af)])){_0x10ff7[_0x50e548(0x1a8)](_0x5e4de6);}const _0x2c7e12=new Set();if(_0x4caa76['activations'])for(const _0x187a13 of Object['keys'](_0x4caa76[_0x50e548(0x18b)])){_0x2c7e12[_0x50e548(0x1a8)](_0x187a13);}const _0x422277=new Set(),_0x59afbb={..._0x2337ad,'embeddedSegments':_0x10ff7,'referencedSegments':_0x422277,'activationKeys':_0x2c7e12['size']>0x0?_0x2c7e12:undefined};if(_0x4caa76[_0x50e548(0x1af)])for(const [_0x4ed4db,_0x474f07]of Object[_0x50e548(0x1d2)](_0x4caa76[_0x50e548(0x1af)])){const _0x5495ac=validateEmbeddedSegment(_0x474f07,_0x50e548(0x186)+_0x4ed4db,_0x59afbb);for(const _0x137b60 of _0x5495ac){if(_0x137b60[_0x50e548(0x17f)]===_0x50e548(0x1eb))_0x52d6ea[_0x50e548(0x1b4)](_0x137b60);else _0x1222cd[_0x50e548(0x1b4)](_0x137b60);}}const _0x55c0e8=!!_0x4caa76['goal'],_0x4dbedf=_0x4caa76[_0x50e548(0x195)]?.[_0x50e548(0x19e)](_0x3d7e96=>!!_0x3d7e96[_0x50e548(0x1bf)])??![];!_0x55c0e8&&!_0x4dbedf&&_0x1222cd[_0x50e548(0x1b4)]({'level':_0x50e548(0x198),'path':_0x50e548(0x1bf),'code':_0x50e548(0x1e5),'message':_0x50e548(0x1e4),'location':getLocationFromPath(_0x2337ad[_0x50e548(0x18e)],_0x2337ad[_0x50e548(0x1ea)],['goal'])});const _0x6dd75a=_0x4caa76[_0x50e548(0x195)]??_0x4caa76[_0x50e548(0x1c1)];if(_0x6dd75a&&_0x6dd75a[_0x50e548(0x1c8)](_0x34bca7=>_0x34bca7['latest']===!![])[_0x50e548(0x1e8)]>0x1){const _0x45e26c=_0x4caa76[_0x50e548(0x195)]?_0x50e548(0x195):'versions';_0x52d6ea[_0x50e548(0x1b4)]({'level':_0x50e548(0x1eb),'path':_0x45e26c,'code':_0x50e548(0x1ab),'message':_0x50e548(0x1ba)+(_0x45e26c===_0x50e548(0x195)?_0x50e548(0x16a):_0x50e548(0x170))+_0x50e548(0x1bd),'location':getLocationFromPath(_0x2337ad[_0x50e548(0x18e)],_0x2337ad['source'],[_0x45e26c])});}if(_0x4caa76[_0x50e548(0x195)]&&_0x4caa76[_0x50e548(0x195)]['length']>0x0)for(let _0x429e53=0x0;_0x429e53<_0x4caa76['journeys'][_0x50e548(0x1e8)];_0x429e53++){const _0x4381c2=_0x4caa76['journeys'][_0x429e53];if(_0x4caa76[_0x50e548(0x195)]['length']>0x1&&_0x4381c2[_0x50e548(0x200)]==='launched')continue;const _0x1c2b5e=_0x4381c2[_0x50e548(0x20c)]||[],_0x2199cf=_0x50e548(0x1e2)+_0x429e53+'].',_0xea4c0=!!_0x4381c2[_0x50e548(0x1bf)],_0x28944f=_0xea4c0?{..._0x4caa76,'goal':_0x4381c2['goal']}:_0x4caa76;validateStagesForVersion(_0x1c2b5e,_0x28944f,_0x59afbb,_0x2199cf,_0x52d6ea,_0x1222cd,{'goalIsInherited':!_0xea4c0});}else{if(_0x4caa76[_0x50e548(0x1c1)]&&_0x4caa76['versions']['length']>0x0)for(let _0x487826=0x0;_0x487826<_0x4caa76[_0x50e548(0x1c1)]['length'];_0x487826++){const _0x134729=_0x4caa76[_0x50e548(0x1c1)][_0x487826];if(_0x4caa76['versions'][_0x50e548(0x1e8)]>0x1&&_0x134729['state']===_0x50e548(0x17c))continue;const _0x21f2e0=_0x134729['stages']||[],_0xc65772=_0x50e548(0x16d)+_0x487826+'].';validateStagesForVersion(_0x21f2e0,_0x4caa76,_0x59afbb,_0xc65772,_0x52d6ea,_0x1222cd);}else{const _0x232833=_0x4caa76[_0x50e548(0x20c)]||[];validateStagesForVersion(_0x232833,_0x4caa76,_0x59afbb,'',_0x52d6ea,_0x1222cd);}}_0x4caa76[_0x50e548(0x195)]&&_0x4caa76['journeys'][_0x50e548(0x1e8)]>0x1&&(deduplicateAcrossVersions(_0x52d6ea),deduplicateAcrossVersions(_0x1222cd));for(const _0x42bd40 of _0x10ff7){!_0x422277[_0x50e548(0x16c)](_0x42bd40)&&!_0x42bd40['startsWith']('excluded_')&&_0x1222cd[_0x50e548(0x1b4)]({'level':_0x50e548(0x198),'path':_0x50e548(0x186)+_0x42bd40,'code':_0x50e548(0x1e1),'message':'Embedded\x20segment\x20\x27'+_0x42bd40+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x2337ad['document'],_0x2337ad['source'],['segments',_0x42bd40])});}return{'valid':_0x52d6ea[_0x50e548(0x1e8)]===0x0,'errors':_0x52d6ea,'warnings':_0x1222cd};}
|
|
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};}
|