@treasuredata/tdx 2026.3.26 → 2026.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/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/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b1d9c,_0xea684e){const _0x32edf2=a133_0x33a8,_0x1a638c=_0x5b1d9c();while(!![]){try{const _0x507153=-parseInt(_0x32edf2(0x211))/0x1+parseInt(_0x32edf2(0x1f4))/0x2+parseInt(_0x32edf2(0x212))/0x3+-parseInt(_0x32edf2(0x218))/0x4+parseInt(_0x32edf2(0x1f2))/0x5+parseInt(_0x32edf2(0x21e))/0x6*(-parseInt(_0x32edf2(0x1ef))/0x7)+parseInt(_0x32edf2(0x214))/0x8*(parseInt(_0x32edf2(0x202))/0x9);if(_0x507153===_0xea684e)break;else _0x1a638c['push'](_0x1a638c['shift']());}catch(_0x2a406b){_0x1a638c['push'](_0x1a638c['shift']());}}}(a133_0x46e2,0xe9c4d));import a133_0x23d543 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a133_0x33a8(_0x248b69,_0x385ffb){_0x248b69=_0x248b69-0x1e8;const _0x46e2de=a133_0x46e2();let _0x33a84d=_0x46e2de[_0x248b69];return _0x33a84d;}export function buildSchemaResult(_0x418570){const _0x3ffa67=a133_0x33a8,_0x2a1215=_0x418570[_0x3ffa67(0x1fe)][_0x3ffa67(0x1fb)](_0x5281f3=>({'column_name':_0x5281f3[_0x3ffa67(0x220)],'column_type':_0x5281f3[_0x3ffa67(0x219)],'null':_0x3ffa67(0x1ec),'key':null,'default':null,'extra':null}));return{..._0x418570,'columns':[{'name':_0x3ffa67(0x204),'type':'varchar'},{'name':'column_type','type':'varchar'},{'name':_0x3ffa67(0x206),'type':_0x3ffa67(0x21a)},{'name':_0x3ffa67(0x20c),'type':_0x3ffa67(0x21a)},{'name':'default','type':'varchar'},{'name':_0x3ffa67(0x203),'type':_0x3ffa67(0x21a)}],'data':_0x2a1215};}export async function executeSchemaQuery(_0x38363f,_0x33d5ee,_0x1a79a3){const _0x1b3c07=a133_0x33a8,_0xcf3ccc=_0x38363f['trim']()[_0x1b3c07(0x21d)](/;+$/,''),_0x54c50f=_0x1b3c07(0x21c)+_0xcf3ccc+_0x1b3c07(0x1f3);_0x1a79a3[_0x1b3c07(0x201)]&&console[_0x1b3c07(0x21b)](_0x1b3c07(0x1eb)+_0x54c50f);const _0x3921cc=await withProgressSpinner(_0x1b3c07(0x216),async _0x5a7f46=>{const _0x3d657c=_0x1b3c07,_0x151b19=await _0x33d5ee[_0x3d657c(0x1f8)]['execute'](_0x54c50f,{'catalog':'td','schema':'information_schema','onJobId':_0x53a9ea=>{_0x5a7f46['setJobId'](_0x53a9ea);}});return _0x151b19;},{'verbose':_0x1a79a3['verbose']});return buildSchemaResult(_0x3921cc['data']);}function a133_0x46e2(){const _0x41ac96=['error','SELECT\x20*\x20FROM\x20(\x0a','replace','18iYKdkT','bold','name','behavior','push','localeCompare','Schema\x20query:\x0a','YES','matrixColumnName','sort','4170446bePhDt','dim','groupingName','9139940Osmcjq','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','355984HodUHc','Behaviors','set','slice','query','source','parentTableName','map','Unknown','\x20\x20\x20\x20','columns','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','behaviorName','verbose','549NLAqZk','extra','column_name','parentColumn','null','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','tableName','cyan','some','displayName','key','fields','attribute','filter','entries','1173683RShxsz','5538432gnArqJ','Attributes','50824vSDPVN','size','Fetching\x20schema...','get','1284492blegAu','type','varchar'];a133_0x46e2=function(){return _0x41ac96;};return a133_0x46e2();}function columnName(_0xe70c0e){const _0x4f2f28=a133_0x33a8;return _0xe70c0e[_0x4f2f28(0x1ed)]||_0xe70c0e[_0x4f2f28(0x205)]||_0xe70c0e['name'];}function formatFieldLine(_0x2dda3a,_0x14a829,_0xee0daa){const _0x5dc867=a133_0x33a8,_0x1c5002=_0x2dda3a!==_0x14a829?'\x20'+a133_0x23d543['dim']('('+_0x14a829+')'):'';return _0x5dc867(0x1fd)+_0x2dda3a+_0x1c5002+':\x20'+a133_0x23d543[_0x5dc867(0x209)](_0xee0daa);}function sortByColumnName(_0x1aa827){const _0x262ae2=a133_0x33a8;return[..._0x1aa827][_0x262ae2(0x1ee)]((_0x451376,_0x279dc5)=>columnName(_0x451376)['localeCompare'](columnName(_0x279dc5)));}export function displayFieldsHumanReadable(_0x3a4202,_0x49d418){const _0x211fe0=a133_0x33a8,_0x2ca40d=_0x3a4202[_0x211fe0(0x20f)](_0x23c4e9=>_0x23c4e9[_0x211fe0(0x1f9)]===_0x211fe0(0x20e)),_0x2bf805=_0x3a4202['filter'](_0x392fc3=>_0x392fc3[_0x211fe0(0x1f9)]===_0x211fe0(0x1e8)),_0x465d9f=new Map();for(const _0x5ed16c of _0x2ca40d){const _0x5cfbc4=_0x5ed16c[_0x211fe0(0x1f1)]||_0x5ed16c[_0x211fe0(0x1fa)]||_0x211fe0(0x1fc),_0xa7265c=_0x465d9f[_0x211fe0(0x217)](_0x5cfbc4);_0xa7265c?_0xa7265c[_0x211fe0(0x20d)][_0x211fe0(0x1e9)](_0x5ed16c):_0x465d9f['set'](_0x5cfbc4,{'displayName':_0x5cfbc4,'tableName':_0x5ed16c['parentTableName'],'fields':[_0x5ed16c]});}const _0x9ee899=new Map();for(const _0x4fc18e of _0x2bf805){const _0x15c2ab=_0x4fc18e[_0x211fe0(0x200)]||_0x211fe0(0x1fc),_0x18f75b=_0x9ee899[_0x211fe0(0x217)](_0x15c2ab)||[];_0x18f75b[_0x211fe0(0x1e9)](_0x4fc18e),_0x9ee899[_0x211fe0(0x1f6)](_0x15c2ab,_0x18f75b);}console['error']('\x0a'+a133_0x23d543['bold'](_0x49d418));if(_0x465d9f[_0x211fe0(0x215)]>0x0){console[_0x211fe0(0x21b)]('\x0a'+a133_0x23d543[_0x211fe0(0x1f0)](_0x211fe0(0x213)));const _0x467f63=[..._0x465d9f[_0x211fe0(0x210)]()]['sort']((_0x47d4f8,_0x557e74)=>_0x47d4f8[0x0][_0x211fe0(0x1ea)](_0x557e74[0x0]));for(const [,_0x3faa89]of _0x467f63){const _0x1563b5=_0x3faa89[_0x211fe0(0x208)]&&_0x3faa89[_0x211fe0(0x208)]!==_0x3faa89[_0x211fe0(0x20b)]?'\x20'+a133_0x23d543[_0x211fe0(0x1f0)]('('+_0x3faa89[_0x211fe0(0x208)]+')'):'';console[_0x211fe0(0x21b)]('\x20\x20'+a133_0x23d543[_0x211fe0(0x21f)](_0x3faa89[_0x211fe0(0x20b)])+_0x1563b5);for(const _0xa5db8f of sortByColumnName(_0x3faa89[_0x211fe0(0x20d)])){console[_0x211fe0(0x21b)](formatFieldLine(columnName(_0xa5db8f),_0xa5db8f[_0x211fe0(0x220)],_0xa5db8f[_0x211fe0(0x219)]));}}}if(_0x9ee899['size']>0x0){console['error']('\x0a'+a133_0x23d543[_0x211fe0(0x1f0)](_0x211fe0(0x1f5)));const _0x3ebd47=[..._0x9ee899[_0x211fe0(0x210)]()][_0x211fe0(0x1ee)]((_0x1e131e,_0xf4e02d)=>_0x1e131e[0x0]['localeCompare'](_0xf4e02d[0x0]));for(const [_0x2af17c,_0x34d44e]of _0x3ebd47){const _0x553cb4=_0x34d44e[0x0],_0x4e5512=_0x553cb4?.['matrixTableName'];if(_0x4e5512){const _0x5e77af=_0x4e5512!==_0x2af17c?'\x20'+a133_0x23d543[_0x211fe0(0x1f0)]('('+_0x2af17c+')'):'';console[_0x211fe0(0x21b)]('\x20\x20'+a133_0x23d543[_0x211fe0(0x21f)](_0x4e5512)+_0x5e77af);}else{const _0x19810a=_0x553cb4?.[_0x211fe0(0x1fa)]||'';console[_0x211fe0(0x21b)]('\x20\x20'+a133_0x23d543[_0x211fe0(0x21f)](_0x2af17c)+(_0x19810a?'\x20'+a133_0x23d543[_0x211fe0(0x1f0)]('('+_0x19810a+')'):''));}for(const _0x5c78d6 of sortByColumnName(_0x34d44e)){const _0x4b6501=_0x5c78d6['name']['startsWith'](_0x2af17c+'.')?_0x5c78d6[_0x211fe0(0x220)][_0x211fe0(0x1f7)](_0x2af17c['length']+0x1):_0x5c78d6[_0x211fe0(0x220)];console[_0x211fe0(0x21b)](formatFieldLine(columnName(_0x5c78d6),_0x4b6501,_0x5c78d6['type']));}}}const _0x39ccc8=_0x3a4202[_0x211fe0(0x20a)](_0x4752a5=>_0x4752a5[_0x211fe0(0x1ed)]||_0x4752a5['matrixTableName']);_0x39ccc8&&(console[_0x211fe0(0x21b)]('\x0a'+a133_0x23d543['dim'](_0x211fe0(0x1ff))),console['error'](a133_0x23d543[_0x211fe0(0x1f0)](_0x211fe0(0x207)))),console[_0x211fe0(0x21b)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42cb87,_0x5c5469){const _0x35aae2=a134_0x27a7,_0x32aaf5=_0x42cb87();while(!![]){try{const _0x2b9125=parseInt(_0x35aae2(0x15a))/0x1*(-parseInt(_0x35aae2(0x16f))/0x2)+-parseInt(_0x35aae2(0x16e))/0x3+parseInt(_0x35aae2(0x15c))/0x4*(-parseInt(_0x35aae2(0x168))/0x5)+parseInt(_0x35aae2(0x160))/0x6*(-parseInt(_0x35aae2(0x15b))/0x7)+-parseInt(_0x35aae2(0x165))/0x8+parseInt(_0x35aae2(0x161))/0x9*(parseInt(_0x35aae2(0x16b))/0xa)+-parseInt(_0x35aae2(0x169))/0xb*(-parseInt(_0x35aae2(0x16a))/0xc);if(_0x2b9125===_0x5c5469)break;else _0x32aaf5['push'](_0x32aaf5['shift']());}catch(_0x59d46d){_0x32aaf5['push'](_0x32aaf5['shift']());}}}(a134_0x49e7,0x20b6d));import{readdirSync,statSync}from'fs';import a134_0x3ee897 from'path';function a134_0x27a7(_0x8d3256,_0x19a0b1){_0x8d3256=_0x8d3256-0x159;const _0x49e744=a134_0x49e7();let _0x27a708=_0x49e744[_0x8d3256];return _0x27a708;}export function findYamlFiles(_0xebd973){const _0x5d507e=[];function _0x220f2f(_0x1223f6){const _0x31463f=a134_0x27a7,_0xc6158c=readdirSync(_0x1223f6,{'withFileTypes':!![]});for(const _0x9c58ff of _0xc6158c){const _0x25c888=a134_0x3ee897[_0x31463f(0x167)](_0x1223f6,_0x9c58ff[_0x31463f(0x163)]);if(_0x9c58ff['isDirectory']())_0x220f2f(_0x25c888);else(_0x9c58ff[_0x31463f(0x163)][_0x31463f(0x15e)](_0x31463f(0x162))||_0x9c58ff[_0x31463f(0x163)]['endsWith'](_0x31463f(0x15f)))&&_0x5d507e[_0x31463f(0x16d)](_0x25c888);}}return _0x220f2f(_0xebd973),_0x5d507e;}export function discoverYamlFiles(_0x10cd92){const _0x38922a=a134_0x27a7,_0x58a692=findYamlFiles(_0x10cd92);return _0x58a692[_0x38922a(0x159)](_0x1681de=>{const _0x41b29c=_0x38922a,_0x18ea7b=a134_0x3ee897[_0x41b29c(0x15d)](_0x10cd92,_0x1681de),_0x4cf92d=a134_0x3ee897[_0x41b29c(0x166)](_0x18ea7b);return{'absolutePath':_0x1681de,'relativePath':_0x18ea7b,'folderPath':_0x4cf92d==='.'?'':_0x4cf92d};});}function a134_0x49e7(){const _0x4f6f80=['name','extname','1906968DoNrtD','dirname','join','1058060WYHoGS','153527eviOGx','852ZZMzdA','390kxnacU','isFile','push','781383BNbwSR','4zqgVoY','map','117534UpIJye','1631BUeSAD','4OetfZo','relative','endsWith','.yaml','1830rwWvSs','36837SkFgap','.yml'];a134_0x49e7=function(){return _0x4f6f80;};return a134_0x49e7();}export function isYamlFile(_0x200328){const _0x4dd069=a134_0x27a7;try{const _0x4f88a7=statSync(_0x200328);if(!_0x4f88a7[_0x4dd069(0x16c)]())return![];const _0x5a6c61=a134_0x3ee897[_0x4dd069(0x164)](_0x200328)['toLowerCase']();return _0x5a6c61==='.yml'||_0x5a6c61===_0x4dd069(0x15f);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x156796,_0xbcffa5){const _0x2fb7e4=a135_0x3cb2,_0x56d42f=_0x156796();while(!![]){try{const _0x1ea5eb=parseInt(_0x2fb7e4(0x109))/0x1+parseInt(_0x2fb7e4(0x10e))/0x2*(parseInt(_0x2fb7e4(0x108))/0x3)+parseInt(_0x2fb7e4(0xe1))/0x4+parseInt(_0x2fb7e4(0x103))/0x5+parseInt(_0x2fb7e4(0xce))/0x6+-parseInt(_0x2fb7e4(0x101))/0x7*(parseInt(_0x2fb7e4(0x113))/0x8)+-parseInt(_0x2fb7e4(0xef))/0x9;if(_0x1ea5eb===_0xbcffa5)break;else _0x56d42f['push'](_0x56d42f['shift']());}catch(_0x2f6c77){_0x56d42f['push'](_0x56d42f['shift']());}}}(a135_0x470a,0xc4795));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x29f899){const _0x2c0618=a135_0x3cb2;return _0x29f899[_0x2c0618(0xe8)]()[_0x2c0618(0xe7)](/\s+/g,'_')[_0x2c0618(0xe7)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x2c0618(0xe7)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3a07d9){const _0x330064=a135_0x3cb2,_0x13dead=_0x3a07d9[_0x330064(0xc6)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x13dead){const _0x6c3b71=_0x13dead[0x1][_0x330064(0xe8)](),_0x5483f9=_0x13dead[0x2],_0x25a3fb=_0x5483f9[_0x330064(0xe7)](/-/g,'')[_0x330064(0xd8)](0x0,0x4)[_0x330064(0xe8)]();return _0x6c3b71+'_'+_0x25a3fb;}const _0x27917c=_0x3a07d9['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x27917c){const _0x4644c0=_0x27917c[0x1],_0x3a17a3=_0x27917c[0x2]['toLowerCase'](),_0x22cc23=_0x4644c0[_0x330064(0xe7)](/-/g,'')[_0x330064(0xd8)](0x0,0x4)[_0x330064(0xe8)]();return _0x3a17a3+'_'+_0x22cc23;}return undefined;}function stableStringify(_0x6402c2){const _0x1e8edc=a135_0x3cb2;if(Array['isArray'](_0x6402c2))return'['+_0x6402c2['map'](_0x1d902e=>stableStringify(_0x1d902e))['join'](',')+']';if(_0x6402c2&&typeof _0x6402c2===_0x1e8edc(0xfe)){const _0x41c9f0=_0x6402c2,_0x2b4c4e=Object['keys'](_0x41c9f0)[_0x1e8edc(0x100)](),_0x55f65b=_0x2b4c4e[_0x1e8edc(0x106)](_0x57f835=>'\x22'+_0x57f835+'\x22:'+stableStringify(_0x41c9f0[_0x57f835]));return'{'+_0x55f65b[_0x1e8edc(0xcd)](',')+'}';}const _0x1451fc=JSON['stringify'](_0x6402c2);return _0x1451fc===undefined?'null':_0x1451fc;}export function consolidateActivationsByContent(_0x148ced){const _0x37fe02=a135_0x3cb2,_0x3bd37c={},_0x448302=new Map(),_0x496bc6=new Map();for(const _0x3c1641 of _0x148ced){if(!_0x3c1641)continue;for(const [_0x4f5b5d,_0x5a3913]of Object[_0x37fe02(0xd0)](_0x3c1641)){const _0x1e66b8={'name':_0x5a3913[_0x37fe02(0x105)],'connection':_0x5a3913[_0x37fe02(0xf9)],..._0x5a3913[_0x37fe02(0x111)]!==undefined&&{'all_columns':_0x5a3913['all_columns']},..._0x5a3913[_0x37fe02(0xd3)]!==undefined&&{'columns':_0x5a3913['columns']},..._0x5a3913[_0x37fe02(0xd9)]!==undefined&&{'behavior':_0x5a3913['behavior']},..._0x5a3913[_0x37fe02(0xdb)]!==undefined&&{'schedule':_0x5a3913['schedule']},..._0x5a3913[_0x37fe02(0xeb)]!==undefined&&{'notification':_0x5a3913['notification']},..._0x5a3913[_0x37fe02(0x114)]!==undefined&&{'connector_config':_0x5a3913[_0x37fe02(0x114)]},..._0x5a3913[_0x37fe02(0xf3)]!==undefined&&{'activation_template_id':_0x5a3913[_0x37fe02(0xf3)]}},_0x1011a7=stableStringify(_0x1e66b8),_0x457bd3=_0x496bc6['get'](_0x1011a7);_0x457bd3?_0x448302['set'](_0x4f5b5d,_0x457bd3):(_0x3bd37c[_0x4f5b5d]=_0x5a3913,_0x448302[_0x37fe02(0xcb)](_0x4f5b5d,_0x4f5b5d),_0x496bc6['set'](_0x1011a7,_0x4f5b5d));}}return{'merged':_0x3bd37c,'nameMapping':_0x448302};}export function updateActivationReferences(_0xbe06e9,_0x5da3a3){const _0x5e3c5f=a135_0x3cb2;if(!_0xbe06e9)return;for(const _0x3d9ace of _0xbe06e9){if(!_0x3d9ace[_0x5e3c5f(0xe6)])continue;for(const _0x9c9da0 of _0x3d9ace[_0x5e3c5f(0xe6)]){if(_0x9c9da0[_0x5e3c5f(0x104)]===_0x5e3c5f(0x112)&&_0x9c9da0[_0x5e3c5f(0x10c)]?.['activation']){const _0x41c596=_0x5da3a3[_0x5e3c5f(0x110)](_0x9c9da0['with'][_0x5e3c5f(0x112)]);_0x41c596&&_0x41c596!==_0x9c9da0[_0x5e3c5f(0x10c)][_0x5e3c5f(0x112)]&&(_0x9c9da0[_0x5e3c5f(0x10c)]['activation']=_0x41c596);}}}}export function consolidateSegmentsByContent(_0x5ac199,_0x4787ef){const _0x310ef0=a135_0x3cb2,_0x3cac05={},_0x11cb32=new Map(),_0x45541d=new Map();for(const _0x7fb2b3 of _0x5ac199){if(!_0x7fb2b3)continue;for(const [_0xd9b14f,_0x4713e1]of Object[_0x310ef0(0xd0)](_0x7fb2b3)){if(!_0x4713e1[_0x310ef0(0xe2)]){_0x3cac05[_0xd9b14f]=_0x4713e1,_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0xd9b14f);continue;}const _0x58e2e1=_0x4713e1[_0x310ef0(0xf7)]&&_0x4713e1[_0x310ef0(0xf7)][_0x310ef0(0xdf)]()?_0x4713e1[_0x310ef0(0xf7)]:undefined,_0x312966=JSON['stringify']({'description':_0x58e2e1,'rule':deepSortObject(_0x4713e1['rule'])}),_0x25284f=_0x45541d['get'](_0x312966);if(_0x25284f){const _0x5a3bea={..._0x4713e1[_0x310ef0(0xf7)]!==undefined&&{'description':_0x4713e1[_0x310ef0(0xf7)]},'rule':_0x4713e1[_0x310ef0(0xe2)]?deepSortObject(_0x4713e1['rule']):_0x4713e1[_0x310ef0(0xe2)]};if(_0xd9b14f<_0x25284f){_0x3cac05[_0xd9b14f]=_0x5a3bea,delete _0x3cac05[_0x25284f];for(const [_0x28ece9,_0x240d02]of _0x11cb32['entries']()){_0x240d02===_0x25284f&&_0x11cb32[_0x310ef0(0xcb)](_0x28ece9,_0xd9b14f);}_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0xd9b14f),_0x45541d[_0x310ef0(0xcb)](_0x312966,_0xd9b14f);}else _0x3cac05[_0x25284f]=_0x5a3bea,_0x11cb32['set'](_0xd9b14f,_0x25284f);}else{let _0x222490=_0xd9b14f;if(_0x4787ef){const _0x4630a9=_0x4787ef[_0x310ef0(0x110)](_0x312966);_0x4630a9&&_0x4630a9[_0x310ef0(0xca)]>0x0&&(_0x222490=_0x4630a9[_0x310ef0(0xd8)]()[_0x310ef0(0x100)]()[0x0]);}const _0x44a038={..._0x4713e1[_0x310ef0(0xf7)]!==undefined&&{'description':_0x4713e1[_0x310ef0(0xf7)]},'rule':_0x4713e1['rule']?deepSortObject(_0x4713e1[_0x310ef0(0xe2)]):_0x4713e1[_0x310ef0(0xe2)]};_0x3cac05[_0x222490]=_0x44a038,_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0x222490),_0x45541d[_0x310ef0(0xcb)](_0x312966,_0x222490);}}}return{'merged':_0x3cac05,'nameMapping':_0x11cb32};}export function updateSegmentReferences(_0x455d21,_0x56729c){const _0x140b04=a135_0x3cb2;if(!_0x455d21)return;for(const _0x35dc18 of _0x455d21){if(_0x35dc18[_0x140b04(0x10d)]?.[_0x140b04(0xfd)]){const _0x5c252d=_0x56729c[_0x140b04(0x110)](_0x35dc18['entry_criteria'][_0x140b04(0xfd)]);_0x5c252d&&(_0x35dc18[_0x140b04(0x10d)][_0x140b04(0xfd)]=_0x5c252d);}if(_0x35dc18[_0x140b04(0xf0)])for(const _0x5d03f8 of _0x35dc18[_0x140b04(0xf0)]){if(_0x5d03f8['segment']){const _0x398505=_0x56729c[_0x140b04(0x110)](_0x5d03f8['segment']);_0x398505&&(_0x5d03f8[_0x140b04(0xfd)]=_0x398505);}}if(_0x35dc18[_0x140b04(0xdd)]?.[_0x140b04(0xfd)]){const _0x34543c=_0x56729c[_0x140b04(0x110)](_0x35dc18[_0x140b04(0xdd)]['segment']);_0x34543c&&(_0x35dc18[_0x140b04(0xdd)][_0x140b04(0xfd)]=_0x34543c);}if(_0x35dc18[_0x140b04(0xe6)])for(const _0x34477e of _0x35dc18[_0x140b04(0xe6)]){if(_0x34477e[_0x140b04(0x104)]===_0x140b04(0xf5)&&_0x34477e[_0x140b04(0x10c)]?.[_0x140b04(0xc9)])for(const _0x52efe9 of _0x34477e[_0x140b04(0x10c)][_0x140b04(0xc9)]){if(_0x52efe9['segment']){const _0x373f09=_0x56729c['get'](_0x52efe9[_0x140b04(0xfd)]);_0x373f09&&(_0x52efe9['segment']=_0x373f09);}}if(_0x34477e[_0x140b04(0x104)]===_0x140b04(0xcf)&&_0x34477e['with']?.[_0x140b04(0xf8)]?.[_0x140b04(0xfd)]){const _0x191e6b=_0x56729c[_0x140b04(0x110)](_0x34477e[_0x140b04(0x10c)][_0x140b04(0xf8)]['segment']);_0x191e6b&&(_0x34477e[_0x140b04(0x10c)][_0x140b04(0xf8)][_0x140b04(0xfd)]=_0x191e6b);}}}}export function updateSegmentRefsInSegments(_0x2a0014,_0x36457c){const _0x3ceddd=a135_0x3cb2;for(const _0x2c9f5e of Object[_0x3ceddd(0xcc)](_0x2a0014)){_0x2c9f5e[_0x3ceddd(0xe2)]&&updateSegmentRefsInRule(_0x2c9f5e[_0x3ceddd(0xe2)],_0x36457c);}}function updateSegmentRefsInRule(_0x1f275b,_0x1972ef){const _0x25987b=a135_0x3cb2;if(_0x1f275b===null||typeof _0x1f275b!=='object')return;if(Array[_0x25987b(0xe4)](_0x1f275b)){for(const _0x34f21e of _0x1f275b){updateSegmentRefsInRule(_0x34f21e,_0x1972ef);}return;}const _0x493f24=_0x1f275b;if((_0x493f24[_0x25987b(0x104)]===_0x25987b(0xdc)||_0x493f24[_0x25987b(0x104)]===_0x25987b(0xff))&&typeof _0x493f24[_0x25987b(0xfd)]===_0x25987b(0xd2)){const _0x563a51=_0x1972ef[_0x25987b(0x110)](_0x493f24[_0x25987b(0xfd)]);_0x563a51&&(_0x493f24[_0x25987b(0xfd)]=_0x563a51);}if(_0x493f24[_0x25987b(0xd6)]&&Array[_0x25987b(0xe4)](_0x493f24[_0x25987b(0xd6)]))for(const _0x122e1d of _0x493f24[_0x25987b(0xd6)]){updateSegmentRefsInRule(_0x122e1d,_0x1972ef);}}export function buildJourneysArray(_0x388409,_0x39e3e4){const _0x39cbfd=a135_0x3cb2;return _0x388409[_0x39cbfd(0x106)](_0x2f1fc8=>{const _0x28bbb9=_0x39cbfd,_0x233a2f=_0x39e3e4?_0x2f1fc8['item']['id']===_0x39e3e4:_0x388409[_0x28bbb9(0xca)]===0x1,_0x1f480d=_0x2f1fc8[_0x28bbb9(0xfa)]['journeys']?.[0x0],_0x3e4b5e=_0x1f480d?.[_0x28bbb9(0xea)]||_0x2f1fc8['yaml']['goal'],_0x2f228c={'version':_0x1f480d?.[_0x28bbb9(0xd1)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0xd1)]||_0x2f1fc8['item'][_0x28bbb9(0x105)],'state':_0x2f1fc8[_0x28bbb9(0xc7)][_0x28bbb9(0xe3)]===_0x28bbb9(0xed)?_0x28bbb9(0xed):'draft','stages':_0x1f480d?.[_0x28bbb9(0xe0)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0xe0)]||[],'id':_0x1f480d?.['id']||_0x2f1fc8['yaml']['id'],'version_number':_0x1f480d?.[_0x28bbb9(0x107)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0x107)]};return _0x3e4b5e&&(_0x2f228c[_0x28bbb9(0xea)]=_0x3e4b5e),_0x233a2f&&(_0x2f228c[_0x28bbb9(0x10a)]=!![]),_0x2f228c;});}function a135_0x470a(){const _0x3850cc=['.yaml','schedule','include','milestone','nameMapping','trim','stages','2492008JpjODB','rule','state','isArray','journeyBundleName','steps','replace','toLowerCase','activations','goal','notification','some','launched','segments','21931992YRqCmW','exit_criteria','journey','startsWith','activation_template_id','merged','decision_point','versions','description','condition','connection','yaml','endsWith','journeys','segment','object','exclude','sort','411019hOAtbk','reentry','6327465GsaQVy','type','name','map','version_number','3IPcLev','114864NDNDra','latest','index','with','entry_criteria','3056306UZaeGx','find','get','all_columns','activation','40xFSGIu','connector_config','attributes','match','item','push','branches','length','set','values','join','22308lvooOB','wait','entries','version','string','columns','bundle_name','keys','conditions','journeyStages','slice','behavior'];a135_0x470a=function(){return _0x3850cc;};return a135_0x470a();}export function buildMergedJourneyDef(_0x39f1bc,_0x1bd2a1,_0x570e6b){const _0x116ff4=a135_0x3cb2,_0x7e912d=_0x39f1bc[0x0][_0x116ff4(0xfa)],_0x355705=buildJourneysArray(_0x39f1bc,_0x570e6b),{merged:_0x39088c,nameMapping:_0xc810bc}=consolidateSegmentsByContent(_0x39f1bc[_0x116ff4(0x106)](_0xe23daa=>_0xe23daa[_0x116ff4(0xfa)][_0x116ff4(0xee)]),_0x1bd2a1);updateSegmentRefsInSegments(_0x39088c,_0xc810bc);const _0x5bb843=Array['from'](_0xc810bc[_0x116ff4(0xd0)]())[_0x116ff4(0xec)](([_0xef2474,_0x2fafa4])=>_0xef2474!==_0x2fafa4&&_0xef2474[_0x116ff4(0xf2)](_0x116ff4(0x10d)));let _0xe7cb62=_0x39088c,_0x43dd94=new Map();if(_0x5bb843){const _0x32de54=consolidateSegmentsByContent([_0x39088c],_0x1bd2a1);_0xe7cb62=_0x32de54[_0x116ff4(0xf4)],_0x43dd94=_0x32de54[_0x116ff4(0xde)];}const _0xae68e2=new Map(_0xc810bc);for(const [_0x4df204,_0xbcfc98]of _0x43dd94['entries']()){_0xae68e2[_0x116ff4(0xcb)](_0x4df204,_0xbcfc98);}for(const [_0x53da5d,_0x5d497a]of _0xae68e2[_0x116ff4(0xd0)]()){let _0x24f7c1=_0x5d497a,_0xfd400d=0x0;while(_0xae68e2['has'](_0x24f7c1)&&_0xae68e2[_0x116ff4(0x110)](_0x24f7c1)!==_0x24f7c1&&_0xfd400d<MAX_MAPPING_CHAIN_DEPTH){_0x24f7c1=_0xae68e2[_0x116ff4(0x110)](_0x24f7c1),_0xfd400d++;}_0x24f7c1!==_0x5d497a&&_0xae68e2[_0x116ff4(0xcb)](_0x53da5d,_0x24f7c1);}for(const _0x28ccea of _0x355705){updateSegmentReferences(_0x28ccea[_0x116ff4(0xe0)],_0xae68e2);}const {merged:_0x5f003b,nameMapping:_0x17f539}=consolidateActivationsByContent(_0x39f1bc[_0x116ff4(0x106)](_0x1c8f5e=>_0x1c8f5e[_0x116ff4(0xfa)][_0x116ff4(0xe9)]));for(const _0x22b9cc of _0x355705){updateActivationReferences(_0x22b9cc[_0x116ff4(0xe0)],_0x17f539);}let _0x557401=_0x7e912d[_0x116ff4(0xea)];if(_0x557401?.[_0x116ff4(0xfd)]){const _0x28151c=_0xae68e2[_0x116ff4(0x110)](_0x557401['segment']);_0x28151c&&(_0x557401={..._0x557401,'segment':_0x28151c});}for(const _0x285783 of _0x355705){if(_0x285783[_0x116ff4(0xea)]?.[_0x116ff4(0xfd)]){const _0x4150a4=_0xae68e2[_0x116ff4(0x110)](_0x285783[_0x116ff4(0xea)]['segment']);_0x4150a4&&(_0x285783[_0x116ff4(0xea)]={..._0x285783['goal'],'segment':_0x4150a4});}}return _0x355705[_0x116ff4(0xec)](_0x3cc21c=>_0x3cc21c['goal'])&&(_0x557401=undefined),{'type':_0x116ff4(0xf1),'name':_0x7e912d[_0x116ff4(0x105)],'description':_0x7e912d[_0x116ff4(0xf7)],'goal':_0x557401,'reentry':_0x7e912d[_0x116ff4(0x102)],'segments':Object['keys'](_0xe7cb62)[_0x116ff4(0xca)]>0x0?_0xe7cb62:undefined,'activations':Object[_0x116ff4(0xd5)](_0x5f003b)['length']>0x0?_0x5f003b:undefined,'journeys':_0x355705,'bundle_id':_0x7e912d['bundle_id'],'bundle_name':_0x7e912d[_0x116ff4(0xd4)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x45f02f,_0x2bda16,_0x9aa672,_0x165def){const _0x56e713=a135_0x3cb2,_0x3a1047=_0x45f02f+':'+_0x2bda16,_0xb53b87=_0x9aa672['get'](_0x3a1047);if(_0xb53b87)return _0xb53b87;const _0x4427be=await _0x165def(_0x45f02f),_0x4e0db5=_0x4427be[_0x56e713(0xc5)][_0x56e713(0xe5)]||_0x4427be[_0x56e713(0xc5)][_0x56e713(0x105)],_0x103d37=_0x4427be[_0x56e713(0xc5)][_0x56e713(0xd7)][_0x56e713(0x10f)](_0x23d535=>String(_0x23d535['id'])===String(_0x2bda16)),_0x3b3476=_0x103d37?.['name']||_0x2bda16,_0x2dac5d={'journeyName':_0x4e0db5,'stageName':_0x3b3476};return _0x9aa672[_0x56e713(0xcb)](_0x3a1047,_0x2dac5d),_0x2dac5d;}export function formatApiJourneyName(_0x2c787a,_0x4c2028){return _0x4c2028+'\x20('+_0x2c787a+')';}export function isLocalJourneyRef(_0x3ef607){const _0x32ae55=a135_0x3cb2;return _0x3ef607['endsWith']('.yml')||_0x3ef607[_0x32ae55(0xfb)](_0x32ae55(0xda));}export function buildLocalRuleToNameMapping(_0x16bb9a){const _0x56661f=a135_0x3cb2,_0x157f1d=new Map();if(!_0x16bb9a)return _0x157f1d;for(const [_0x2362c4,_0x122d7d]of Object[_0x56661f(0xd0)](_0x16bb9a)){if(_0x122d7d[_0x56661f(0xe2)]){const _0x33df81=serializeRule(_0x122d7d['rule']),_0x59b828=_0x157f1d[_0x56661f(0x110)](_0x33df81)||[];_0x59b828[_0x56661f(0xc8)](_0x2362c4),_0x157f1d[_0x56661f(0xcb)](_0x33df81,_0x59b828);}}return _0x157f1d;}function a135_0x3cb2(_0x3ad7c1,_0x1fea78){_0x3ad7c1=_0x3ad7c1-0xc5;const _0x470a2d=a135_0x470a();let _0x3cb242=_0x470a2d[_0x3ad7c1];return _0x3cb242;}export function buildLocalRuleToNameMappingFromJourney(_0x185824){const _0x56d2ec=a135_0x3cb2,_0x4dfb4d=_0x185824[_0x56d2ec(0xee)];if(!_0x4dfb4d)return new Map();const _0x13843f=collectSegmentUsageCounts(_0x185824),_0x2a7764=new Map();let _0x11725f=0x0;for(const [_0x417cdb,_0x17de31]of Object[_0x56d2ec(0xd0)](_0x4dfb4d)){if(!_0x17de31[_0x56d2ec(0xe2)]){_0x11725f++;continue;}const _0x221fe6=serializeRule(_0x17de31['rule']),_0x5a9f88=_0x2a7764['get'](_0x221fe6)||[];_0x5a9f88[_0x56d2ec(0xc8)]({'name':_0x417cdb,'index':_0x11725f}),_0x2a7764['set'](_0x221fe6,_0x5a9f88),_0x11725f++;}const _0x423808=new Map();for(const [_0x406e1f,_0x116bad]of _0x2a7764){const _0x3c4741=_0x116bad['slice']()['sort']((_0x419519,_0x57861c)=>{const _0x54b276=_0x56d2ec,_0x1c7abe=_0x13843f[_0x54b276(0x110)](_0x419519[_0x54b276(0x105)])||0x0,_0x4e121f=_0x13843f[_0x54b276(0x110)](_0x57861c[_0x54b276(0x105)])||0x0;if(_0x1c7abe!==_0x4e121f)return _0x4e121f-_0x1c7abe;return _0x419519[_0x54b276(0x10b)]-_0x57861c[_0x54b276(0x10b)];})['map'](_0x406be9=>_0x406be9[_0x56d2ec(0x105)]);_0x423808['set'](_0x406e1f,_0x3c4741);}return _0x423808;}export function collectSegmentUsageCounts(_0x2c27c9){const _0x4fc91f=a135_0x3cb2,_0x153601=new Map(),_0x3ac6d1=_0x3e2adf=>{const _0x46b63e=a135_0x3cb2;if(!_0x3e2adf)return;_0x153601[_0x46b63e(0xcb)](_0x3e2adf,(_0x153601['get'](_0x3e2adf)||0x0)+0x1);},_0x45905f=_0x3bccc8=>{const _0x410dc8=a135_0x3cb2;for(const _0xa1ff02 of _0x3bccc8){_0x3ac6d1(_0xa1ff02[_0x410dc8(0x10d)]?.[_0x410dc8(0xfd)]);if(_0xa1ff02[_0x410dc8(0xf0)])for(const _0x21319f of _0xa1ff02[_0x410dc8(0xf0)]){_0x3ac6d1(_0x21319f[_0x410dc8(0xfd)]);}_0x3ac6d1(_0xa1ff02[_0x410dc8(0xdd)]?.['segment']);if(_0xa1ff02[_0x410dc8(0xe6)])for(const _0x1bfc21 of _0xa1ff02[_0x410dc8(0xe6)]){if(_0x1bfc21[_0x410dc8(0x104)]==='decision_point')for(const _0x8f9796 of _0x1bfc21[_0x410dc8(0x10c)]['branches']){_0x3ac6d1(_0x8f9796[_0x410dc8(0xfd)]);}else _0x1bfc21[_0x410dc8(0x104)]===_0x410dc8(0xcf)&&_0x3ac6d1(_0x1bfc21[_0x410dc8(0x10c)][_0x410dc8(0xf8)]?.[_0x410dc8(0xfd)]);}}};_0x3ac6d1(_0x2c27c9[_0x4fc91f(0xea)]?.[_0x4fc91f(0xfd)]);if(_0x2c27c9[_0x4fc91f(0xfc)])for(const _0x37b468 of _0x2c27c9[_0x4fc91f(0xfc)]){_0x3ac6d1(_0x37b468[_0x4fc91f(0xea)]?.[_0x4fc91f(0xfd)]),_0x45905f(_0x37b468[_0x4fc91f(0xe0)]);}_0x2c27c9[_0x4fc91f(0xe0)]&&_0x45905f(_0x2c27c9[_0x4fc91f(0xe0)]);if(_0x2c27c9[_0x4fc91f(0xf6)])for(const _0x4cebf6 of _0x2c27c9[_0x4fc91f(0xf6)]){_0x45905f(_0x4cebf6[_0x4fc91f(0xe0)]);}return _0x153601;}
|
|
1
|
+
(function(_0x11a243,_0xb64ba2){const _0x1890b3=a135_0x3dda,_0x3c80d0=_0x11a243();while(!![]){try{const _0x961299=parseInt(_0x1890b3(0x119))/0x1*(parseInt(_0x1890b3(0x115))/0x2)+parseInt(_0x1890b3(0xf4))/0x3+parseInt(_0x1890b3(0x105))/0x4+-parseInt(_0x1890b3(0x116))/0x5*(-parseInt(_0x1890b3(0x121))/0x6)+parseInt(_0x1890b3(0xfd))/0x7*(-parseInt(_0x1890b3(0xdc))/0x8)+-parseInt(_0x1890b3(0xe3))/0x9*(-parseInt(_0x1890b3(0xf6))/0xa)+-parseInt(_0x1890b3(0x120))/0xb;if(_0x961299===_0xb64ba2)break;else _0x3c80d0['push'](_0x3c80d0['shift']());}catch(_0x2ceafa){_0x3c80d0['push'](_0x3c80d0['shift']());}}}(a135_0x27c0,0x7470f));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x1ea2e6){const _0x3ce87a=a135_0x3dda;return _0x1ea2e6[_0x3ce87a(0xd7)]()[_0x3ce87a(0xd4)](/\s+/g,'_')[_0x3ce87a(0xd4)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x3ce87a(0xd4)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3ab21a){const _0x501b13=a135_0x3dda,_0x264fd6=_0x3ab21a[_0x501b13(0x111)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x264fd6){const _0x4a0048=_0x264fd6[0x1][_0x501b13(0xd7)](),_0x55fd52=_0x264fd6[0x2],_0x59dbac=_0x55fd52['replace'](/-/g,'')[_0x501b13(0xe0)](0x0,0x4)[_0x501b13(0xd7)]();return _0x4a0048+'_'+_0x59dbac;}const _0x240f6f=_0x3ab21a[_0x501b13(0x111)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x240f6f){const _0x193eee=_0x240f6f[0x1],_0x28ddbc=_0x240f6f[0x2]['toLowerCase'](),_0x42714f=_0x193eee[_0x501b13(0xd4)](/-/g,'')[_0x501b13(0xe0)](0x0,0x4)[_0x501b13(0xd7)]();return _0x28ddbc+'_'+_0x42714f;}return undefined;}function stableStringify(_0x2e54ef){const _0xdd9c6a=a135_0x3dda;if(Array[_0xdd9c6a(0xf1)](_0x2e54ef))return'['+_0x2e54ef[_0xdd9c6a(0x101)](_0xbd56db=>stableStringify(_0xbd56db))[_0xdd9c6a(0x110)](',')+']';if(_0x2e54ef&&typeof _0x2e54ef===_0xdd9c6a(0xed)){const _0x146bf6=_0x2e54ef,_0x2a3169=Object[_0xdd9c6a(0xd9)](_0x146bf6)[_0xdd9c6a(0x10c)](),_0x2d1cbd=_0x2a3169[_0xdd9c6a(0x101)](_0x542ccd=>'\x22'+_0x542ccd+'\x22:'+stableStringify(_0x146bf6[_0x542ccd]));return'{'+_0x2d1cbd[_0xdd9c6a(0x110)](',')+'}';}const _0x1daaaa=JSON[_0xdd9c6a(0x122)](_0x2e54ef);return _0x1daaaa===undefined?_0xdd9c6a(0xec):_0x1daaaa;}export function consolidateActivationsByContent(_0x2c4be9){const _0x299953=a135_0x3dda,_0x37b335={},_0x5f1f42=new Map(),_0x7ee478=new Map();for(const _0x2cdbd1 of _0x2c4be9){if(!_0x2cdbd1)continue;for(const [_0x742e4e,_0x3630c2]of Object[_0x299953(0xdd)](_0x2cdbd1)){const _0x3c1f52={'name':_0x3630c2[_0x299953(0xfc)],'connection':_0x3630c2[_0x299953(0xe9)],..._0x3630c2[_0x299953(0xff)]!==undefined&&{'all_columns':_0x3630c2['all_columns']},..._0x3630c2[_0x299953(0xf9)]!==undefined&&{'columns':_0x3630c2[_0x299953(0xf9)]},..._0x3630c2['behavior']!==undefined&&{'behavior':_0x3630c2[_0x299953(0xeb)]},..._0x3630c2[_0x299953(0x108)]!==undefined&&{'schedule':_0x3630c2['schedule']},..._0x3630c2['notification']!==undefined&&{'notification':_0x3630c2[_0x299953(0x11c)]},..._0x3630c2[_0x299953(0xd2)]!==undefined&&{'connector_config':_0x3630c2[_0x299953(0xd2)]},..._0x3630c2['activation_template_id']!==undefined&&{'activation_template_id':_0x3630c2[_0x299953(0xfe)]}},_0x1010ad=stableStringify(_0x3c1f52),_0x13ca13=_0x7ee478['get'](_0x1010ad);_0x13ca13?_0x5f1f42['set'](_0x742e4e,_0x13ca13):(_0x37b335[_0x742e4e]=_0x3630c2,_0x5f1f42[_0x299953(0x11e)](_0x742e4e,_0x742e4e),_0x7ee478[_0x299953(0x11e)](_0x1010ad,_0x742e4e));}}return{'merged':_0x37b335,'nameMapping':_0x5f1f42};}export function updateActivationReferences(_0x43b61b,_0x33ec2f){const _0x41e7de=a135_0x3dda;if(!_0x43b61b)return;for(const _0x9648c8 of _0x43b61b){if(!_0x9648c8[_0x41e7de(0x11a)])continue;for(const _0x4ab7f6 of _0x9648c8[_0x41e7de(0x11a)]){if(_0x4ab7f6[_0x41e7de(0xe1)]===_0x41e7de(0x11d)&&_0x4ab7f6['with']?.[_0x41e7de(0x11d)]){const _0x22374e=_0x33ec2f[_0x41e7de(0xf2)](_0x4ab7f6[_0x41e7de(0x104)][_0x41e7de(0x11d)]);_0x22374e&&_0x22374e!==_0x4ab7f6[_0x41e7de(0x104)]['activation']&&(_0x4ab7f6['with']['activation']=_0x22374e);}}}}export function consolidateSegmentsByContent(_0x5ab869,_0x25cb31){const _0x41d250=a135_0x3dda,_0x31e600={},_0x334966=new Map(),_0x377173=new Map();for(const _0x336985 of _0x5ab869){if(!_0x336985)continue;for(const [_0x49a621,_0x2aa469]of Object[_0x41d250(0xdd)](_0x336985)){if(!_0x2aa469[_0x41d250(0x11b)]){_0x31e600[_0x49a621]=_0x2aa469,_0x334966[_0x41d250(0x11e)](_0x49a621,_0x49a621);continue;}const _0xdc21a3=_0x2aa469['description']&&_0x2aa469[_0x41d250(0xe6)][_0x41d250(0x103)]()?_0x2aa469[_0x41d250(0xe6)]:undefined,_0x468646=JSON[_0x41d250(0x122)]({'description':_0xdc21a3,'rule':deepSortObject(_0x2aa469[_0x41d250(0x11b)])}),_0x2c7fe0=_0x377173[_0x41d250(0xf2)](_0x468646);if(_0x2c7fe0){const _0x4cbe5d={..._0x2aa469[_0x41d250(0xe6)]!==undefined&&{'description':_0x2aa469[_0x41d250(0xe6)]},'rule':_0x2aa469[_0x41d250(0x11b)]?deepSortObject(_0x2aa469[_0x41d250(0x11b)]):_0x2aa469[_0x41d250(0x11b)]};if(_0x49a621<_0x2c7fe0){_0x31e600[_0x49a621]=_0x4cbe5d,delete _0x31e600[_0x2c7fe0];for(const [_0x2f06d6,_0x21bec2]of _0x334966[_0x41d250(0xdd)]()){_0x21bec2===_0x2c7fe0&&_0x334966[_0x41d250(0x11e)](_0x2f06d6,_0x49a621);}_0x334966[_0x41d250(0x11e)](_0x49a621,_0x49a621),_0x377173[_0x41d250(0x11e)](_0x468646,_0x49a621);}else _0x31e600[_0x2c7fe0]=_0x4cbe5d,_0x334966[_0x41d250(0x11e)](_0x49a621,_0x2c7fe0);}else{let _0x46aeec=_0x49a621;if(_0x25cb31){const _0x37f6ca=_0x25cb31[_0x41d250(0xf2)](_0x468646);_0x37f6ca&&_0x37f6ca[_0x41d250(0x100)]>0x0&&(_0x46aeec=_0x37f6ca['slice']()[_0x41d250(0x10c)]()[0x0]);}const _0x58f7a4={..._0x2aa469['description']!==undefined&&{'description':_0x2aa469[_0x41d250(0xe6)]},'rule':_0x2aa469[_0x41d250(0x11b)]?deepSortObject(_0x2aa469[_0x41d250(0x11b)]):_0x2aa469[_0x41d250(0x11b)]};_0x31e600[_0x46aeec]=_0x58f7a4,_0x334966[_0x41d250(0x11e)](_0x49a621,_0x46aeec),_0x377173['set'](_0x468646,_0x46aeec);}}}return{'merged':_0x31e600,'nameMapping':_0x334966};}export function updateSegmentReferences(_0x3535b5,_0x1658ff){const _0x95a277=a135_0x3dda;if(!_0x3535b5)return;for(const _0xdbba1d of _0x3535b5){if(_0xdbba1d[_0x95a277(0xf8)]?.[_0x95a277(0xd5)]){const _0x4d2185=_0x1658ff['get'](_0xdbba1d[_0x95a277(0xf8)][_0x95a277(0xd5)]);_0x4d2185&&(_0xdbba1d[_0x95a277(0xf8)][_0x95a277(0xd5)]=_0x4d2185);}if(_0xdbba1d['exit_criteria'])for(const _0x5e34e4 of _0xdbba1d['exit_criteria']){if(_0x5e34e4['segment']){const _0x4f2f6d=_0x1658ff[_0x95a277(0xf2)](_0x5e34e4[_0x95a277(0xd5)]);_0x4f2f6d&&(_0x5e34e4['segment']=_0x4f2f6d);}}if(_0xdbba1d['milestone']?.['segment']){const _0x35a9ee=_0x1658ff[_0x95a277(0xf2)](_0xdbba1d['milestone'][_0x95a277(0xd5)]);_0x35a9ee&&(_0xdbba1d[_0x95a277(0xee)][_0x95a277(0xd5)]=_0x35a9ee);}if(_0xdbba1d[_0x95a277(0x11a)])for(const _0x344a72 of _0xdbba1d[_0x95a277(0x11a)]){if(_0x344a72['type']===_0x95a277(0xdf)&&_0x344a72[_0x95a277(0x104)]?.[_0x95a277(0x114)])for(const _0x370b4e of _0x344a72[_0x95a277(0x104)][_0x95a277(0x114)]){if(_0x370b4e[_0x95a277(0xd5)]){const _0x3b04f7=_0x1658ff[_0x95a277(0xf2)](_0x370b4e[_0x95a277(0xd5)]);_0x3b04f7&&(_0x370b4e[_0x95a277(0xd5)]=_0x3b04f7);}}if(_0x344a72[_0x95a277(0xe1)]===_0x95a277(0x10d)&&_0x344a72[_0x95a277(0x104)]?.[_0x95a277(0x106)]?.[_0x95a277(0xd5)]){const _0x451ff9=_0x1658ff[_0x95a277(0xf2)](_0x344a72[_0x95a277(0x104)][_0x95a277(0x106)][_0x95a277(0xd5)]);_0x451ff9&&(_0x344a72[_0x95a277(0x104)][_0x95a277(0x106)][_0x95a277(0xd5)]=_0x451ff9);}}}}export function updateSegmentRefsInSegments(_0x5adfa7,_0x1c5762){const _0x461607=a135_0x3dda;for(const _0x109b5d of Object['values'](_0x5adfa7)){_0x109b5d[_0x461607(0x11b)]&&updateSegmentRefsInRule(_0x109b5d[_0x461607(0x11b)],_0x1c5762);}}function a135_0x3dda(_0x26d5f8,_0x3c4673){_0x26d5f8=_0x26d5f8-0xd2;const _0x27c0f5=a135_0x27c0();let _0x3ddad2=_0x27c0f5[_0x26d5f8];return _0x3ddad2;}function updateSegmentRefsInRule(_0x3536b9,_0x226b32){const _0x31b803=a135_0x3dda;if(_0x3536b9===null||typeof _0x3536b9!==_0x31b803(0xed))return;if(Array[_0x31b803(0xf1)](_0x3536b9)){for(const _0x4bb44e of _0x3536b9){updateSegmentRefsInRule(_0x4bb44e,_0x226b32);}return;}const _0x30f162=_0x3536b9;if((_0x30f162[_0x31b803(0xe1)]===_0x31b803(0x10e)||_0x30f162[_0x31b803(0xe1)]==='exclude')&&typeof _0x30f162[_0x31b803(0xd5)]===_0x31b803(0xf5)){const _0x18f3dd=_0x226b32[_0x31b803(0xf2)](_0x30f162['segment']);_0x18f3dd&&(_0x30f162['segment']=_0x18f3dd);}if(_0x30f162[_0x31b803(0x125)]&&Array[_0x31b803(0xf1)](_0x30f162[_0x31b803(0x125)]))for(const _0x6dbbeb of _0x30f162[_0x31b803(0x125)]){updateSegmentRefsInRule(_0x6dbbeb,_0x226b32);}}export function buildJourneysArray(_0x360535,_0x5f8b66){return _0x360535['map'](_0x4e1b5c=>{const _0x33354d=a135_0x3dda,_0x3453e2=_0x5f8b66?_0x4e1b5c['item']['id']===_0x5f8b66:_0x360535[_0x33354d(0x100)]===0x1,_0x23bda2=_0x4e1b5c[_0x33354d(0xfb)]['journeys']?.[0x0],_0x3a2be7=_0x23bda2?.[_0x33354d(0x11f)]||_0x4e1b5c['yaml'][_0x33354d(0x11f)],_0x5ed7e4={'version':_0x23bda2?.['version']||_0x4e1b5c[_0x33354d(0xfb)][_0x33354d(0x123)]||_0x4e1b5c[_0x33354d(0x117)]['name'],'state':_0x4e1b5c[_0x33354d(0x117)][_0x33354d(0xe5)]===_0x33354d(0x113)?_0x33354d(0x113):_0x33354d(0x10f),'stages':_0x23bda2?.[_0x33354d(0x10a)]||_0x4e1b5c[_0x33354d(0xfb)][_0x33354d(0x10a)]||[],'id':_0x23bda2?.['id']||_0x4e1b5c[_0x33354d(0xfb)]['id'],'version_number':_0x23bda2?.[_0x33354d(0x102)]||_0x4e1b5c[_0x33354d(0xfb)]['version_number']};return _0x3a2be7&&(_0x5ed7e4[_0x33354d(0x11f)]=_0x3a2be7),_0x3453e2&&(_0x5ed7e4[_0x33354d(0xe4)]=!![]),_0x5ed7e4;});}export function buildMergedJourneyDef(_0xe4875e,_0x37b0b7,_0x42dc75){const _0x4d72d0=a135_0x3dda,_0x5015ae=_0xe4875e[0x0][_0x4d72d0(0xfb)],_0x10840f=buildJourneysArray(_0xe4875e,_0x42dc75),{merged:_0x1e8f7d,nameMapping:_0x320840}=consolidateSegmentsByContent(_0xe4875e['map'](_0x1529b3=>_0x1529b3[_0x4d72d0(0xfb)][_0x4d72d0(0xdb)]),_0x37b0b7);updateSegmentRefsInSegments(_0x1e8f7d,_0x320840);const _0x4c1e19=Array[_0x4d72d0(0xe7)](_0x320840['entries']())[_0x4d72d0(0xd6)](([_0x24951c,_0xeddae0])=>_0x24951c!==_0xeddae0&&_0x24951c['startsWith'](_0x4d72d0(0xf8)));let _0x45fdcc=_0x1e8f7d,_0x568520=new Map();if(_0x4c1e19){const _0x6769b5=consolidateSegmentsByContent([_0x1e8f7d],_0x37b0b7);_0x45fdcc=_0x6769b5[_0x4d72d0(0xd8)],_0x568520=_0x6769b5[_0x4d72d0(0xe2)];}const _0x3757a6=new Map(_0x320840);for(const [_0x13d8a1,_0x37db78]of _0x568520[_0x4d72d0(0xdd)]()){_0x3757a6[_0x4d72d0(0x11e)](_0x13d8a1,_0x37db78);}for(const [_0x3dcf14,_0x530cd6]of _0x3757a6['entries']()){let _0x35ff8b=_0x530cd6,_0x2f12ca=0x0;while(_0x3757a6[_0x4d72d0(0xda)](_0x35ff8b)&&_0x3757a6[_0x4d72d0(0xf2)](_0x35ff8b)!==_0x35ff8b&&_0x2f12ca<MAX_MAPPING_CHAIN_DEPTH){_0x35ff8b=_0x3757a6[_0x4d72d0(0xf2)](_0x35ff8b),_0x2f12ca++;}_0x35ff8b!==_0x530cd6&&_0x3757a6[_0x4d72d0(0x11e)](_0x3dcf14,_0x35ff8b);}for(const _0x4ee2f9 of _0x10840f){updateSegmentReferences(_0x4ee2f9[_0x4d72d0(0x10a)],_0x3757a6);}const {merged:_0xef4073,nameMapping:_0x1c8bc0}=consolidateActivationsByContent(_0xe4875e[_0x4d72d0(0x101)](_0xf656f3=>_0xf656f3['yaml'][_0x4d72d0(0xf0)]));for(const _0x43170c of _0x10840f){updateActivationReferences(_0x43170c[_0x4d72d0(0x10a)],_0x1c8bc0);}let _0x26b25d=_0x5015ae[_0x4d72d0(0x11f)];if(_0x26b25d?.[_0x4d72d0(0xd5)]){const _0x48c0e1=_0x3757a6[_0x4d72d0(0xf2)](_0x26b25d[_0x4d72d0(0xd5)]);_0x48c0e1&&(_0x26b25d={..._0x26b25d,'segment':_0x48c0e1});}for(const _0x3452b1 of _0x10840f){if(_0x3452b1['goal']?.[_0x4d72d0(0xd5)]){const _0x551b91=_0x3757a6[_0x4d72d0(0xf2)](_0x3452b1['goal'][_0x4d72d0(0xd5)]);_0x551b91&&(_0x3452b1[_0x4d72d0(0x11f)]={..._0x3452b1['goal'],'segment':_0x551b91});}}return _0x10840f[_0x4d72d0(0xd6)](_0x5df8ec=>_0x5df8ec[_0x4d72d0(0x11f)])&&(_0x26b25d=undefined),{'type':_0x4d72d0(0x107),'name':_0x5015ae[_0x4d72d0(0xfc)],'description':_0x5015ae['description'],'goal':_0x26b25d,'reentry':_0x5015ae[_0x4d72d0(0x112)],'segments':Object[_0x4d72d0(0xd9)](_0x45fdcc)[_0x4d72d0(0x100)]>0x0?_0x45fdcc:undefined,'activations':Object[_0x4d72d0(0xd9)](_0xef4073)['length']>0x0?_0xef4073:undefined,'journeys':_0x10840f,'bundle_id':_0x5015ae[_0x4d72d0(0xd3)],'bundle_name':_0x5015ae[_0x4d72d0(0xf3)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0xb8c113,_0x3cca2a,_0x4344f3,_0x47f61c){const _0x27f725=a135_0x3dda,_0x5d3a03=_0xb8c113+':'+_0x3cca2a,_0x4ea032=_0x4344f3['get'](_0x5d3a03);if(_0x4ea032)return _0x4ea032;const _0x5bc6d4=await _0x47f61c(_0xb8c113),_0x3b14a1=_0x5bc6d4[_0x27f725(0xf7)][_0x27f725(0x118)]||_0x5bc6d4['attributes'][_0x27f725(0xfc)],_0x11b0be=_0x5bc6d4[_0x27f725(0xf7)][_0x27f725(0xef)]['find'](_0x2e61eb=>String(_0x2e61eb['id'])===String(_0x3cca2a)),_0x1f6ce3=_0x11b0be?.[_0x27f725(0xfc)]||_0x3cca2a,_0x26c368={'journeyName':_0x3b14a1,'stageName':_0x1f6ce3};return _0x4344f3[_0x27f725(0x11e)](_0x5d3a03,_0x26c368),_0x26c368;}export function formatApiJourneyName(_0x1dc1b4,_0x302eba){return _0x302eba+'\x20('+_0x1dc1b4+')';}function a135_0x27c0(){const _0x106ac9=['101652BuzeNL','condition','journey','schedule','push','stages','endsWith','sort','wait','include','draft','join','match','reentry','launched','branches','6wtnLqb','2661645QCtcRm','item','journeyBundleName','115479QsziPZ','steps','rule','notification','activation','set','goal','7783050uWNUpe','6DnZTiS','stringify','version','index','conditions','journeys','connector_config','bundle_id','replace','segment','some','toLowerCase','merged','keys','has','segments','1584184zlhaey','entries','exit_criteria','decision_point','slice','type','nameMapping','15633YSzbBF','latest','state','description','from','versions','connection','.yaml','behavior','null','object','milestone','journeyStages','activations','isArray','get','bundle_name','794103GUNMXJ','string','4650Outsvu','attributes','entry_criteria','columns','.yml','yaml','name','28axfmMn','activation_template_id','all_columns','length','map','version_number','trim','with'];a135_0x27c0=function(){return _0x106ac9;};return a135_0x27c0();}export function isLocalJourneyRef(_0xd52fe8){const _0x37999e=a135_0x3dda;return _0xd52fe8[_0x37999e(0x10b)](_0x37999e(0xfa))||_0xd52fe8['endsWith'](_0x37999e(0xea));}export function buildLocalRuleToNameMapping(_0x2cceae){const _0x65e04c=a135_0x3dda,_0x42b896=new Map();if(!_0x2cceae)return _0x42b896;for(const [_0x2372d9,_0x2d0994]of Object[_0x65e04c(0xdd)](_0x2cceae)){if(_0x2d0994[_0x65e04c(0x11b)]){const _0x4dc7f4=serializeRule(_0x2d0994[_0x65e04c(0x11b)]),_0x3534bd=_0x42b896[_0x65e04c(0xf2)](_0x4dc7f4)||[];_0x3534bd[_0x65e04c(0x109)](_0x2372d9),_0x42b896['set'](_0x4dc7f4,_0x3534bd);}}return _0x42b896;}export function buildLocalRuleToNameMappingFromJourney(_0x5d137f){const _0x32eb54=a135_0x3dda,_0x548eae=_0x5d137f[_0x32eb54(0xdb)];if(!_0x548eae)return new Map();const _0x152664=collectSegmentUsageCounts(_0x5d137f),_0x46e338=new Map();let _0x40bc5d=0x0;for(const [_0x518fd4,_0x4bf4c3]of Object[_0x32eb54(0xdd)](_0x548eae)){if(!_0x4bf4c3['rule']){_0x40bc5d++;continue;}const _0x3f0888=serializeRule(_0x4bf4c3[_0x32eb54(0x11b)]),_0x4bc8c3=_0x46e338[_0x32eb54(0xf2)](_0x3f0888)||[];_0x4bc8c3['push']({'name':_0x518fd4,'index':_0x40bc5d}),_0x46e338[_0x32eb54(0x11e)](_0x3f0888,_0x4bc8c3),_0x40bc5d++;}const _0x33746f=new Map();for(const [_0x28e780,_0x424265]of _0x46e338){const _0x4728bb=_0x424265[_0x32eb54(0xe0)]()[_0x32eb54(0x10c)]((_0x1edc4e,_0x3a12ca)=>{const _0x881906=_0x32eb54,_0x8eab5=_0x152664[_0x881906(0xf2)](_0x1edc4e[_0x881906(0xfc)])||0x0,_0x53fd2b=_0x152664[_0x881906(0xf2)](_0x3a12ca[_0x881906(0xfc)])||0x0;if(_0x8eab5!==_0x53fd2b)return _0x53fd2b-_0x8eab5;return _0x1edc4e['index']-_0x3a12ca[_0x881906(0x124)];})[_0x32eb54(0x101)](_0x531ad3=>_0x531ad3['name']);_0x33746f[_0x32eb54(0x11e)](_0x28e780,_0x4728bb);}return _0x33746f;}export function collectSegmentUsageCounts(_0x21cdba){const _0x376d15=a135_0x3dda,_0x5d9b13=new Map(),_0x104327=_0x2d4fe9=>{const _0x3e0ebe=a135_0x3dda;if(!_0x2d4fe9)return;_0x5d9b13[_0x3e0ebe(0x11e)](_0x2d4fe9,(_0x5d9b13['get'](_0x2d4fe9)||0x0)+0x1);},_0x3cfa19=_0x361284=>{const _0x5dc8d5=a135_0x3dda;for(const _0x501f1b of _0x361284){_0x104327(_0x501f1b[_0x5dc8d5(0xf8)]?.[_0x5dc8d5(0xd5)]);if(_0x501f1b[_0x5dc8d5(0xde)])for(const _0x1d00a5 of _0x501f1b['exit_criteria']){_0x104327(_0x1d00a5[_0x5dc8d5(0xd5)]);}_0x104327(_0x501f1b['milestone']?.[_0x5dc8d5(0xd5)]);if(_0x501f1b[_0x5dc8d5(0x11a)])for(const _0x2523bd of _0x501f1b[_0x5dc8d5(0x11a)]){if(_0x2523bd[_0x5dc8d5(0xe1)]===_0x5dc8d5(0xdf))for(const _0x4d0d3e of _0x2523bd[_0x5dc8d5(0x104)][_0x5dc8d5(0x114)]){_0x104327(_0x4d0d3e['segment']);}else _0x2523bd[_0x5dc8d5(0xe1)]===_0x5dc8d5(0x10d)&&_0x104327(_0x2523bd[_0x5dc8d5(0x104)][_0x5dc8d5(0x106)]?.['segment']);}}};_0x104327(_0x21cdba['goal']?.[_0x376d15(0xd5)]);if(_0x21cdba[_0x376d15(0x126)])for(const _0x36d2b9 of _0x21cdba[_0x376d15(0x126)]){_0x104327(_0x36d2b9['goal']?.['segment']),_0x3cfa19(_0x36d2b9['stages']);}_0x21cdba[_0x376d15(0x10a)]&&_0x3cfa19(_0x21cdba[_0x376d15(0x10a)]);if(_0x21cdba['versions'])for(const _0x592dfb of _0x21cdba[_0x376d15(0xe8)]){_0x3cfa19(_0x592dfb[_0x376d15(0x10a)]);}return _0x5d9b13;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a136_0x13a2(_0x7de224,_0x574ae2){_0x7de224=_0x7de224-0xb9;const _0x12d45f=a136_0x12d4();let _0x13a2d0=_0x12d45f[_0x7de224];return _0x13a2d0;}(function(_0x5a44fd,_0x4a3bf3){const _0x316868=a136_0x13a2,_0x5238c6=_0x5a44fd();while(!![]){try{const _0x2ac50d=parseInt(_0x316868(0xd7))/0x1*(-parseInt(_0x316868(0x165))/0x2)+-parseInt(_0x316868(0x11a))/0x3*(-parseInt(_0x316868(0xdd))/0x4)+parseInt(_0x316868(0x15a))/0x5*(parseInt(_0x316868(0xeb))/0x6)+parseInt(_0x316868(0x105))/0x7*(-parseInt(_0x316868(0x15d))/0x8)+parseInt(_0x316868(0x11d))/0x9*(parseInt(_0x316868(0xf4))/0xa)+-parseInt(_0x316868(0x115))/0xb+parseInt(_0x316868(0x144))/0xc;if(_0x2ac50d===_0x4a3bf3)break;else _0x5238c6['push'](_0x5238c6['shift']());}catch(_0x5d7412){_0x5238c6['push'](_0x5238c6['shift']());}}}(a136_0x12d4,0x247b1));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5e0de4,_0x513b02,_0x4520c0,_0x7bcd1d,_0x507489,_0xc5ec80){const _0x4365e0=a136_0x13a2;return{'level':_0x5e0de4,'path':_0x513b02,'code':_0x4520c0,'message':_0x7bcd1d,'location':getLocationFromPath(_0x507489[_0x4365e0(0xd8)],_0x507489[_0x4365e0(0xff)],pathToArray(_0xc5ec80??_0x513b02))};}function validateVersionStructure(_0x573d48,_0x64e70b){const _0x1d6490=a136_0x13a2,_0x50158e=[];return _0x573d48[_0x1d6490(0xe3)]>MAX_STAGES&&_0x50158e[_0x1d6490(0x160)](createIssue(_0x1d6490(0x152),'stages',_0x1d6490(0x10e),'Journey\x20has\x20'+_0x573d48[_0x1d6490(0xe3)]+_0x1d6490(0x13a)+MAX_STAGES,_0x64e70b)),_0x50158e;}function validateStageStructure(_0x2e87c9,_0x2da397,_0x5be2df,_0x59f70b){const _0x3e7210=a136_0x13a2,_0x4b859d=[],_0x1c09e4=_0x3e7210(0x164)+_0x2da397+']';_0x2da397===0x0&&!_0x2e87c9[_0x3e7210(0xfa)]&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x152),_0x1c09e4+_0x3e7210(0x146),_0x3e7210(0x124),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x59f70b,_0x1c09e4));const _0x5d0fc4=_0x2da397===_0x5be2df-0x1;!_0x5d0fc4&&!_0x2e87c9[_0x3e7210(0x113)]&&_0x4b859d['push'](createIssue(_0x3e7210(0x152),_0x1c09e4+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x2e87c9[_0x3e7210(0x135)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x59f70b,_0x1c09e4));(!_0x2e87c9['exit_criteria']||_0x2e87c9[_0x3e7210(0xce)]['length']===0x0)&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+'.exit_criteria',_0x3e7210(0xbc),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+_0x3e7210(0xec),_0x59f70b,_0x1c09e4));const _0x41dfdd=_0x2e87c9[_0x3e7210(0xfc)]?.[_0x3e7210(0xe3)]??0x0;if(_0x41dfdd===0x0)_0x4b859d[_0x3e7210(0x160)](createIssue('error',_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0xc6),'Stage\x20\x27'+_0x2e87c9['name']+_0x3e7210(0xf6),_0x59f70b,_0x1c09e4+_0x3e7210(0x12f)));else{if(_0x41dfdd===0x1)_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0xc6),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+_0x3e7210(0xe7),_0x59f70b,_0x1c09e4+_0x3e7210(0x12f)));else _0x41dfdd<=0x3&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0x170),_0x3e7210(0x171)+_0x2e87c9['name']+_0x3e7210(0x163)+_0x41dfdd+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x59f70b,_0x1c09e4+'.steps'));}return _0x4b859d;}function validateStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63){const _0x5118ee=a136_0x13a2,_0x3f962f=[];if(_0x28c5fd[_0x5118ee(0x168)]===_0x5118ee(0x102))return _0x28c5fd['next']&&_0x3f962f[_0x5118ee(0x160)](createIssue('error',_0x38547c+_0x5118ee(0xea),_0x5118ee(0x137),'End\x20step\x20\x27'+_0x28c5fd['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x4c4acc)),'with'in _0x28c5fd&&_0x28c5fd[_0x5118ee(0x10a)]!==undefined&&_0x3f962f['push'](createIssue(_0x5118ee(0x152),_0x38547c+'.with',_0x5118ee(0x137),'End\x20step\x20\x27'+_0x28c5fd[_0x5118ee(0x135)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x4c4acc)),_0x3f962f;_0x28c5fd[_0x5118ee(0xc5)]&&(_0x4c4acc[_0x5118ee(0x11e)]&&!_0x4c4acc[_0x5118ee(0x11e)]['has'](_0x28c5fd[_0x5118ee(0xc5)])&&_0x3f962f[_0x5118ee(0x160)](createIssue(_0x5118ee(0x152),_0x38547c+_0x5118ee(0xea),_0x5118ee(0xd1),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x28c5fd[_0x5118ee(0xc5)]+'\x27',_0x4c4acc)));switch(_0x28c5fd['type']){case'wait':_0x3f962f[_0x5118ee(0x160)](...validateWaitStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case _0x5118ee(0x11b):_0x3f962f['push'](...validateActivationStep(_0x28c5fd,_0x38547c,_0x4c4acc));break;case _0x5118ee(0x133):_0x3f962f[_0x5118ee(0x160)](...validateDecisionPointStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case'ab_test':_0x3f962f['push'](...validateAbTestStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case _0x5118ee(0xd0):_0x3f962f[_0x5118ee(0x160)](...validateJumpStep(_0x28c5fd,_0x38547c,_0x4c4acc));break;}return _0x3f962f;}function validateWaitStep(_0xf312de,_0x20b7a8,_0x247fea,_0x4933e1){const _0x4ecbd3=a136_0x13a2,_0x15b37c=[];if(!_0xf312de['with'])return _0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0xee),_0x4ecbd3(0x159),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x247fea,_0x20b7a8)),_0x15b37c;if(_0xf312de[_0x4ecbd3(0x10a)][_0x4ecbd3(0x140)]){const _0x442a79=_0xf312de['with'][_0x4ecbd3(0x140)];if(_0x442a79[_0x4ecbd3(0xcb)]){_0x247fea[_0x4ecbd3(0xcd)]?.[_0x4ecbd3(0x108)](_0x442a79[_0x4ecbd3(0xcb)]);!_0x442a79[_0x4ecbd3(0xcb)][_0x4ecbd3(0x11f)](_0x4ecbd3(0x147))&&(_0x247fea[_0x4ecbd3(0xbf)]&&!_0x247fea[_0x4ecbd3(0xbf)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0xcb)])&&_0x15b37c['push'](createIssue('error',_0x20b7a8+_0x4ecbd3(0xd9),_0x4ecbd3(0xf2),_0x4ecbd3(0x100)+_0x442a79[_0x4ecbd3(0xcb)]+_0x4ecbd3(0x132),_0x247fea)));_0x442a79[_0x4ecbd3(0xc5)]&&_0x247fea[_0x4ecbd3(0x11e)]&&!_0x247fea[_0x4ecbd3(0x11e)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0xc5)])&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0x15b),_0x4ecbd3(0xd1),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x442a79['next']+'\x27',_0x247fea));_0x442a79['timeout']?.[_0x4ecbd3(0xc5)]&&_0x247fea[_0x4ecbd3(0x11e)]&&!_0x247fea[_0x4ecbd3(0x11e)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0x151)][_0x4ecbd3(0xc5)])&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0x156),_0x4ecbd3(0xd1),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x442a79[_0x4ecbd3(0x151)]['next']+'\x27',_0x247fea));const _0x2f8db7=_0x442a79[_0x4ecbd3(0xc5)]||_0xf312de['next'],_0x3be367=_0x442a79[_0x4ecbd3(0x151)]?.[_0x4ecbd3(0xc5)]||_0xf312de['next'];if(_0x2f8db7){const _0x2cadab=_0x4933e1[_0x4ecbd3(0xe2)](_0x2f8db7);_0x2cadab?.[_0x4ecbd3(0x168)]===_0x4ecbd3(0xbd)&&_0x15b37c[_0x4ecbd3(0x160)](createIssue('warning',_0x20b7a8+'.with.condition.next',_0x4ecbd3(0x161),_0x4ecbd3(0x14f)+_0x2f8db7+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x247fea,_0x20b7a8+_0x4ecbd3(0xd3)));}if(_0x3be367){const _0xbcf0d1=_0x4933e1[_0x4ecbd3(0xe2)](_0x3be367);_0xbcf0d1?.['type']==='merge'&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x172),_0x20b7a8+_0x4ecbd3(0x156),_0x4ecbd3(0x161),_0x4ecbd3(0x120)+_0x3be367+_0x4ecbd3(0x12a),_0x247fea,_0x20b7a8+'.with.condition.timeout'));}}}return _0x15b37c;}function validateActivationStep(_0x1ece99,_0x3d3af5,_0x56d1ff){const _0x39b961=a136_0x13a2,_0x520480=[];if(!_0x1ece99['with']?.[_0x39b961(0x11b)])return _0x520480[_0x39b961(0x160)](createIssue(_0x39b961(0x152),_0x3d3af5+_0x39b961(0xe5),'MISSING_ACTIVATION_REF',_0x39b961(0xdf),_0x56d1ff,_0x3d3af5)),_0x520480;const _0x3354ae=_0x1ece99[_0x39b961(0x10a)][_0x39b961(0x11b)];return _0x56d1ff['activationKeys']&&!_0x3354ae[_0x39b961(0x11f)](_0x39b961(0x147))&&(!_0x56d1ff[_0x39b961(0x14d)][_0x39b961(0x169)](_0x3354ae)&&_0x520480[_0x39b961(0x160)](createIssue(_0x39b961(0x152),_0x3d3af5+_0x39b961(0xe5),_0x39b961(0x149),_0x39b961(0x167)+_0x3354ae+_0x39b961(0x104),_0x56d1ff))),_0x520480;}function validateDecisionPointStep(_0x887287,_0x438739,_0x2ce5d5,_0x25e679){const _0x4549ab=a136_0x13a2,_0x2cfd42=[];if(!_0x887287['with']?.[_0x4549ab(0x117)]||_0x887287[_0x4549ab(0x10a)]['branches'][_0x4549ab(0xe3)]===0x0)return _0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x438739+_0x4549ab(0x118),_0x4549ab(0xed),_0x4549ab(0x10c),_0x2ce5d5,_0x438739)),_0x2cfd42;for(let _0x4572a7=0x0;_0x4572a7<_0x887287[_0x4549ab(0x10a)]['branches'][_0x4549ab(0xe3)];_0x4572a7++){const _0x374498=_0x887287['with']['branches'][_0x4572a7],_0x4013f9=_0x438739+_0x4549ab(0x12e)+_0x4572a7+']';_0x374498[_0x4549ab(0xcb)]&&!_0x374498['excluded']&&(_0x2ce5d5['referencedSegments']?.[_0x4549ab(0x108)](_0x374498['segment']),!_0x374498['segment'][_0x4549ab(0x11f)](_0x4549ab(0x147))&&(_0x2ce5d5[_0x4549ab(0xbf)]&&!_0x2ce5d5[_0x4549ab(0xbf)][_0x4549ab(0x169)](_0x374498[_0x4549ab(0xcb)])&&_0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x4013f9+'.segment',_0x4549ab(0xf2),_0x4549ab(0x13b)+_0x374498[_0x4549ab(0xcb)]+'\x27',_0x2ce5d5))));_0x374498['next']&&_0x2ce5d5['stepNames']&&!_0x2ce5d5[_0x4549ab(0x11e)][_0x4549ab(0x169)](_0x374498[_0x4549ab(0xc5)])&&_0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x4013f9+_0x4549ab(0xea),_0x4549ab(0xd1),_0x4549ab(0xba)+_0x374498[_0x4549ab(0xc5)]+'\x27',_0x2ce5d5));if(_0x374498[_0x4549ab(0xc5)]){const _0x46fe62=_0x25e679['get'](_0x374498[_0x4549ab(0xc5)]);_0x46fe62?.[_0x4549ab(0x168)]===_0x4549ab(0xbd)&&_0x2cfd42[_0x4549ab(0x160)](createIssue('warning',_0x4013f9+_0x4549ab(0xea),_0x4549ab(0x161),_0x4549ab(0x116)+_0x374498[_0x4549ab(0x135)]+_0x4549ab(0xe6)+_0x374498[_0x4549ab(0xc5)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2ce5d5));}}return _0x2cfd42;}function validateAbTestStep(_0x1e432a,_0x429a00,_0x21e63f,_0x4fb5fa){const _0x35f92b=a136_0x13a2,_0x191a4f=[];if(!_0x1e432a[_0x35f92b(0x10a)]?.[_0x35f92b(0x13d)]||_0x1e432a[_0x35f92b(0x10a)][_0x35f92b(0x13d)][_0x35f92b(0xe3)]===0x0)return _0x191a4f[_0x35f92b(0x160)](createIssue(_0x35f92b(0x152),_0x429a00+_0x35f92b(0x148),_0x35f92b(0xed),_0x35f92b(0x162),_0x21e63f,_0x429a00)),_0x191a4f;const _0x1ba5dc=_0x1e432a[_0x35f92b(0x10a)]['variants'][_0x35f92b(0x112)]((_0x19a664,_0x936c04)=>_0x19a664+(_0x936c04[_0x35f92b(0x14a)]||0x0),0x0);Math['abs'](_0x1ba5dc-0x64)>0.01&&_0x191a4f[_0x35f92b(0x160)](createIssue('error',_0x429a00+_0x35f92b(0x148),'INVALID_AB_TEST_PERCENTAGES',_0x35f92b(0xf7)+_0x1ba5dc+'%)',_0x21e63f));for(let _0x142ff6=0x0;_0x142ff6<_0x1e432a['with']['variants']['length'];_0x142ff6++){const _0x26e044=_0x1e432a[_0x35f92b(0x10a)]['variants'][_0x142ff6],_0x511fa1=_0x429a00+'.with.variants['+_0x142ff6+']';_0x26e044[_0x35f92b(0xc5)]&&_0x21e63f[_0x35f92b(0x11e)]&&!_0x21e63f[_0x35f92b(0x11e)][_0x35f92b(0x169)](_0x26e044['next'])&&_0x191a4f['push'](createIssue(_0x35f92b(0x152),_0x511fa1+_0x35f92b(0xea),_0x35f92b(0xd1),_0x35f92b(0xef)+_0x26e044[_0x35f92b(0xc5)]+'\x27',_0x21e63f));if(_0x26e044[_0x35f92b(0xc5)]){const _0x3eb2ad=_0x4fb5fa[_0x35f92b(0xe2)](_0x26e044[_0x35f92b(0xc5)]);_0x3eb2ad?.['type']===_0x35f92b(0xbd)&&_0x191a4f[_0x35f92b(0x160)](createIssue(_0x35f92b(0x172),_0x511fa1+_0x35f92b(0xea),'BRANCH_DIRECTLY_TO_MERGE',_0x35f92b(0xe4)+_0x26e044[_0x35f92b(0x135)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x26e044['next']+_0x35f92b(0xc7),_0x21e63f));}}return _0x191a4f;}function validateJumpStep(_0x253b8f,_0x51c842,_0x6a8777){const _0x53bd73=a136_0x13a2,_0x5f5240=[];if(!_0x253b8f[_0x53bd73(0x10a)]?.[_0x53bd73(0x114)])return _0x5f5240[_0x53bd73(0x160)](createIssue(_0x53bd73(0x152),_0x51c842+_0x53bd73(0x127),_0x53bd73(0x143),_0x53bd73(0xc2),_0x6a8777,_0x51c842)),_0x5f5240;return(!_0x253b8f[_0x53bd73(0x10a)][_0x53bd73(0x114)][_0x53bd73(0xfb)]||!_0x253b8f['with'][_0x53bd73(0x114)][_0x53bd73(0xc3)])&&_0x5f5240[_0x53bd73(0x160)](createIssue('error',_0x51c842+_0x53bd73(0x127),_0x53bd73(0x143),_0x53bd73(0xc4),_0x6a8777)),_0x5f5240;}function buildConvergenceMap(_0x586a64){const _0x185d2f=a136_0x13a2,_0x8b091b=new Map();function _0x4da082(_0x3b80f9,_0x512b1f){const _0x52ad36=a136_0x13a2,_0x2e51ff=_0x8b091b[_0x52ad36(0xe2)](_0x3b80f9)||[];_0x2e51ff[_0x52ad36(0x160)](_0x512b1f),_0x8b091b[_0x52ad36(0x16a)](_0x3b80f9,_0x2e51ff);}for(const _0x1c090e of _0x586a64){_0x1c090e[_0x185d2f(0xc5)]&&_0x4da082(_0x1c090e['next'],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0xbb)+_0x1c090e[_0x185d2f(0x135)]+'\x27'});if(_0x1c090e['type']===_0x185d2f(0x133)&&_0x1c090e[_0x185d2f(0x10a)]?.['branches'])for(const _0x3aee88 of _0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x117)]){_0x3aee88[_0x185d2f(0xc5)]&&_0x4da082(_0x3aee88[_0x185d2f(0xc5)],{'stepName':_0x1c090e[_0x185d2f(0x135)],'description':_0x185d2f(0x173)+_0x3aee88[_0x185d2f(0x135)]+_0x185d2f(0xd6)+_0x1c090e['name']+'\x27'});}if(_0x1c090e[_0x185d2f(0x168)]===_0x185d2f(0xc1)&&_0x1c090e[_0x185d2f(0x10a)]?.[_0x185d2f(0x13d)])for(const _0x82edb2 of _0x1c090e['with'][_0x185d2f(0x13d)]){_0x82edb2['next']&&_0x4da082(_0x82edb2[_0x185d2f(0xc5)],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0xe9)+_0x82edb2[_0x185d2f(0x135)]+_0x185d2f(0xd6)+_0x1c090e['name']+'\x27'});}_0x1c090e['type']===_0x185d2f(0x155)&&_0x1c090e[_0x185d2f(0x10a)]?.[_0x185d2f(0x140)]&&(_0x1c090e['with'][_0x185d2f(0x140)]['next']&&_0x4da082(_0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x140)][_0x185d2f(0xc5)],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0x10b)+_0x1c090e[_0x185d2f(0x135)]+'\x27'}),_0x1c090e['with'][_0x185d2f(0x140)][_0x185d2f(0x151)]?.[_0x185d2f(0xc5)]&&_0x4da082(_0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x140)]['timeout'][_0x185d2f(0xc5)],{'stepName':_0x1c090e[_0x185d2f(0x135)],'description':_0x185d2f(0x13f)+_0x1c090e[_0x185d2f(0x135)]+'\x27'}));}return _0x8b091b;}function validateFlowControl(_0x8c2260,_0xb62833,_0x3457be){const _0x1ec21e=a136_0x13a2,_0x1d1109=[],_0x452419=_0x1ec21e(0x164)+_0xb62833+']',_0x3e7e1d=_0x8c2260[_0x1ec21e(0xfc)]||[];if(_0x3e7e1d[_0x1ec21e(0xe3)]===0x0)return _0x1d1109;const _0x4be2ce=new Map();for(const _0x3c22ab of _0x3e7e1d){_0x3c22ab[_0x1ec21e(0x135)]&&_0x4be2ce[_0x1ec21e(0x16a)](_0x3c22ab[_0x1ec21e(0x135)],_0x3c22ab);}const _0x302b6a=buildConvergenceMap(_0x3e7e1d),_0x1d103d=_0x3e7e1d[_0x1ec21e(0x153)](_0x50554b=>_0x50554b['type']===_0x1ec21e(0x102));!_0x1d103d&&_0x1d1109[_0x1ec21e(0x160)](createIssue(_0x1ec21e(0x152),_0x452419+'.steps',_0x1ec21e(0x109),_0x1ec21e(0x171)+_0x8c2260[_0x1ec21e(0x135)]+'\x27\x20has\x20no\x20end\x20step',_0x3457be));for(const [_0x3f24ad,_0x275133]of _0x302b6a){const _0x111a9a=_0x4be2ce[_0x1ec21e(0xe2)](_0x3f24ad);if(!_0x111a9a)continue;if(_0x275133[_0x1ec21e(0xe3)]>0x1&&_0x111a9a[_0x1ec21e(0x168)]!==_0x1ec21e(0xbd)){const _0x5ce961=_0x275133[_0x1ec21e(0x126)](_0x12c0d5=>_0x12c0d5['description'])[_0x1ec21e(0xf8)](',\x20');_0x1d1109[_0x1ec21e(0x160)](createIssue('error',_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x103),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x3f24ad+'\x27\x20(from:\x20'+_0x5ce961+_0x1ec21e(0xd5),_0x3457be));}_0x275133[_0x1ec21e(0xe3)]===0x1&&_0x111a9a[_0x1ec21e(0x168)]===_0x1ec21e(0xbd)&&_0x1d1109[_0x1ec21e(0x160)](createIssue('warning',_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x16e),'Merge\x20step\x20\x27'+_0x3f24ad+_0x1ec21e(0x139)+_0x275133[0x0][_0x1ec21e(0x106)]+_0x1ec21e(0xf5),_0x3457be));}for(const _0x4f9162 of _0x3e7e1d){if(_0x4f9162[_0x1ec21e(0x168)]==='merge'&&_0x4f9162['next']){const _0x375816=_0x4be2ce[_0x1ec21e(0xe2)](_0x4f9162[_0x1ec21e(0xc5)]);_0x375816?.['type']==='merge'&&_0x1d1109[_0x1ec21e(0x160)](createIssue(_0x1ec21e(0x152),_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x14c),_0x1ec21e(0x11c)+_0x4f9162[_0x1ec21e(0x135)]+_0x1ec21e(0x16d)+_0x4f9162[_0x1ec21e(0xc5)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x3457be));}}return _0x1d1109;}function validateCriteria(_0x1f3c73,_0x502daf,_0x397b52){const _0x47bb0f=a136_0x13a2,_0x341c6f=[];return _0x1f3c73[_0x47bb0f(0xcb)]&&(_0x397b52[_0x47bb0f(0xcd)]?.[_0x47bb0f(0x108)](_0x1f3c73['segment']),!_0x1f3c73['segment'][_0x47bb0f(0x11f)](_0x47bb0f(0x147))&&(_0x397b52[_0x47bb0f(0xbf)]&&!_0x397b52['embeddedSegments'][_0x47bb0f(0x169)](_0x1f3c73[_0x47bb0f(0xcb)])&&_0x341c6f[_0x47bb0f(0x160)](createIssue(_0x47bb0f(0x152),_0x502daf+_0x47bb0f(0x119),'MISSING_SEGMENT_REFERENCE',_0x47bb0f(0xcf)+_0x1f3c73[_0x47bb0f(0xcb)]+'\x27',_0x397b52)))),_0x341c6f;}function a136_0x12d4(){const _0x37e600=['end','CONVERGENCE_WITHOUT_MERGE','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','7IbrLmz','description','version','add','MISSING_END_STEP','with','condition\x20of\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','journeys','TOO_MANY_STAGES','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','journeys,\x20stages,\x20or\x20versions','.exit_criteria[','reduce','milestone','target','7722smhjAI','Decision\x20branch\x20\x27','branches','.with.branches','.segment','1869yzaOhK','activation','Merge\x20step\x20\x27','407556DliRaf','stepNames','startsWith','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','includes','\x20with\x20latest:\x20true','DUPLICATE_STEP_NAME','MISSING_ENTRY_CRITERIA','endsWith','map','.with.target','versions','Duplicate\x20step\x20name\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','excluded_','every','DUPLICATE_LATEST','.with.branches[','.steps','ACTIVATION_SCHEMA_ERROR','segments.','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','decision_point','path','name','code','END_STEP_HAS_NEXT_OR_WITH','Embedded\x20segment\x20\x27','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','\x20stages\x20but\x20maximum\x20is\x20','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','variants','values','timeout\x20of\x20\x27','condition','entries','message','INVALID_JUMP_TARGET','911124DUbnrT','goalIsInherited','.entry_criteria','ref:','.with.variants','MISSING_ACTIVATION_DEFINITION','percentage','skipSchema','MERGE_TO_MERGE_CHAIN','activationKeys','replace','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','state','timeout','error','some','\x20(across\x20','wait','.with.condition.timeout.next','sort','goal','MISSING_WAIT_PARAMS','596850wLIzID','.with.condition.next','stages','1148504qZOqav','.rule','indices','push','BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x27\x20has\x20only\x20','stages[','2zLvmyA','trim','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','type','has','set','keys','rule','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','SINGLE_INPUT_MERGE','size','FEW_STEPS','Stage\x20\x27','warning','branch\x20\x27','segments','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','step\x20\x27','MISSING_EXIT_CRITERIA','merge','\x20versions)','embeddedSegments','MISSING_GOAL','ab_test','Jump\x20step\x20requires\x20a\x20target','stage','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','next','INSUFFICIENT_STEPS','\x27\x20with\x20no\x20action\x20in\x20between','.steps[','Journey\x20can\x20have\x20at\x20most\x20one\x20','versions[','segment','journeys[','referencedSegments','exit_criteria','Criteria\x20references\x20undefined\x20segment\x20\x27','jump','INVALID_NEXT_REFERENCE','success','.with.condition','match',').\x20Use\x20a\x20merge\x20step.','\x27\x20of\x20\x27','190522PGXEKu','document','.with.condition.segment','filter','activations','UNUSED_EMBEDDED_SEGMENT','692TmRAHt','JOURNEY_SCHEMA_ERROR','Activation\x20step\x20requires\x20an\x20activation\x20reference','launched','journey\x20entry','get','length','A/B\x20test\x20variant\x20\x27','.with.activation','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.type','variant\x20\x27','.next','6eWLazz','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_CONDITIONS','.with','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','.name','data','MISSING_SEGMENT_REFERENCE','\x27\x20(first\x20defined\x20at\x20steps[','40olttiy',').\x20Merge\x20is\x20unnecessary.','\x27\x20has\x20no\x20steps','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','join','level','entry_criteria','journey','steps','latest','Journey\x20has\x20no\x20goal\x20defined','source','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','MISSING_NAME'];a136_0x12d4=function(){return _0x37e600;};return a136_0x12d4();}function validateEmbeddedSegment(_0x953c7a,_0x572493,_0x1a9d9c){const _0x39ba14=a136_0x13a2,_0x1da567=[];return _0x953c7a['rule']&&_0x1da567[_0x39ba14(0x160)](...validateRuleDef(_0x953c7a[_0x39ba14(0x16c)],_0x572493+_0x39ba14(0x15e),_0x1a9d9c)),_0x1da567;}function validateStage(_0x47919d,_0x57e907,_0x44dc8f,_0x1160da){const _0x57367a=a136_0x13a2,_0x3c1e2c=[],_0x476b20='stages['+_0x57e907+']',_0x308d19=new Map(),_0x2f7487=new Map();if(_0x47919d['steps']){for(let _0x488717=0x0;_0x488717<_0x47919d[_0x57367a(0xfc)]['length'];_0x488717++){const _0x26bc94=_0x47919d[_0x57367a(0xfc)][_0x488717];_0x26bc94[_0x57367a(0x135)]&&_0x308d19['set'](_0x26bc94[_0x57367a(0x135)],_0x26bc94);}for(let _0x11847f=0x0;_0x11847f<_0x47919d[_0x57367a(0xfc)]['length'];_0x11847f++){const _0x599d43=_0x47919d[_0x57367a(0xfc)][_0x11847f],_0x3b26c1=_0x476b20+_0x57367a(0xc8)+_0x11847f+']';if(_0x599d43['name']){if(_0x2f7487[_0x57367a(0x169)](_0x599d43[_0x57367a(0x135)])){const _0x1c8f52=_0x2f7487['get'](_0x599d43['name']);_0x3c1e2c['push'](createIssue(_0x57367a(0x152),_0x3b26c1+_0x57367a(0xf0),_0x57367a(0x123),_0x57367a(0x129)+_0x599d43[_0x57367a(0x135)]+_0x57367a(0xf3)+_0x1c8f52+'])',_0x1160da));}else _0x2f7487['set'](_0x599d43[_0x57367a(0x135)],_0x11847f);}_0x3c1e2c['push'](...validateStep(_0x599d43,_0x3b26c1,_0x1160da,_0x308d19));}}_0x47919d[_0x57367a(0xfa)]&&_0x3c1e2c['push'](...validateCriteria(_0x47919d[_0x57367a(0xfa)],_0x476b20+'.entry_criteria',_0x1160da));if(_0x47919d[_0x57367a(0xce)])for(let _0x3d41a3=0x0;_0x3d41a3<_0x47919d[_0x57367a(0xce)][_0x57367a(0xe3)];_0x3d41a3++){_0x3c1e2c['push'](...validateCriteria(_0x47919d['exit_criteria'][_0x3d41a3],_0x476b20+_0x57367a(0x111)+_0x3d41a3+']',_0x1160da));}return _0x47919d[_0x57367a(0x113)]&&_0x3c1e2c[_0x57367a(0x160)](...validateCriteria(_0x47919d['milestone'],_0x476b20+'.milestone',_0x1160da)),_0x3c1e2c[_0x57367a(0x160)](...validateStageStructure(_0x47919d,_0x57e907,_0x44dc8f,_0x1160da)),_0x3c1e2c[_0x57367a(0x160)](...validateFlowControl(_0x47919d,_0x57e907,_0x1160da)),_0x3c1e2c;}function validateStagesForVersion(_0x30abda,_0x54274a,_0x2356c8,_0x2ce700,_0x437449,_0xcc5117,_0x488799){const _0x329119=a136_0x13a2;if(_0x30abda['length']===0x0){_0x437449['push']({'level':_0x329119(0x152),'path':_0x2ce700+'stages','code':'MISSING_STAGES','message':_0x329119(0x13c),'location':getLocationFromPath(_0x2356c8[_0x329119(0xd8)],_0x2356c8[_0x329119(0xff)],[_0x329119(0x15c)])});return;}const _0x1a8a61=new Set();for(const _0x4a2fe8 of _0x30abda){if(_0x4a2fe8[_0x329119(0xfc)])for(const _0x1d8d91 of _0x4a2fe8[_0x329119(0xfc)]){_0x1d8d91[_0x329119(0x135)]&&_0x1a8a61['add'](_0x1d8d91[_0x329119(0x135)]);}}const _0x2f149c={..._0x2356c8,'stepNames':_0x1a8a61},_0x47c2bb=validateVersionStructure(_0x30abda,_0x2f149c);for(const _0x32acf0 of _0x47c2bb){const _0x3f882d=_0x2ce700?{..._0x32acf0,'path':''+_0x2ce700+_0x32acf0['path']}:_0x32acf0;if(_0x3f882d[_0x329119(0xf9)]===_0x329119(0x152))_0x437449['push'](_0x3f882d);else _0xcc5117[_0x329119(0x160)](_0x3f882d);}for(let _0x21ea69=0x0;_0x21ea69<_0x30abda['length'];_0x21ea69++){const _0x49f1bc=validateStage(_0x30abda[_0x21ea69],_0x21ea69,_0x30abda[_0x329119(0xe3)],_0x2f149c);for(const _0x15a464 of _0x49f1bc){const _0x15a160=_0x2ce700?{..._0x15a464,'path':''+_0x2ce700+_0x15a464[_0x329119(0x134)]}:_0x15a464;if(_0x15a160[_0x329119(0xf9)]===_0x329119(0x152))_0x437449[_0x329119(0x160)](_0x15a160);else _0xcc5117[_0x329119(0x160)](_0x15a160);}}if(_0x54274a[_0x329119(0x158)]){const _0x123cc6=_0x488799?.[_0x329119(0x145)]?'goal':_0x2ce700+_0x329119(0x158),_0x5cc9b3=validateCriteria(_0x54274a[_0x329119(0x158)],_0x123cc6,_0x2f149c);for(const _0x3e226d of _0x5cc9b3){if(_0x3e226d[_0x329119(0xf9)]===_0x329119(0x152))_0x437449[_0x329119(0x160)](_0x3e226d);else _0xcc5117['push'](_0x3e226d);}}}function extractVersionIndex(_0x4a7f07){const _0x40ec26=a136_0x13a2,_0x411926=_0x4a7f07[_0x40ec26(0xd4)](/^journeys\[(\d+)\]\./);return _0x411926?_0x411926[0x1]:undefined;}function deduplicateAcrossVersions(_0x214b6a){const _0x268e7b=a136_0x13a2,_0x1089d5=new Map();for(let _0xfff140=0x0;_0xfff140<_0x214b6a[_0x268e7b(0xe3)];_0xfff140++){const _0x409344=_0x214b6a[_0xfff140][_0x268e7b(0x136)]+':'+_0x214b6a[_0xfff140]['message'],_0x417020=extractVersionIndex(_0x214b6a[_0xfff140][_0x268e7b(0x134)]),_0x320202=_0x1089d5[_0x268e7b(0xe2)](_0x409344);if(_0x320202){_0x320202[_0x268e7b(0x15f)][_0x268e7b(0x160)](_0xfff140);if(_0x417020)_0x320202[_0x268e7b(0x128)][_0x268e7b(0x108)](_0x417020);}else _0x1089d5[_0x268e7b(0x16a)](_0x409344,{'indices':[_0xfff140],'versions':new Set(_0x417020?[_0x417020]:[])});}const _0x33d665=new Set();for(const {indices:_0x574317,versions:_0x438b4d}of _0x1089d5[_0x268e7b(0x13e)]()){if(_0x438b4d['size']<=0x1)continue;const _0x401f57=_0x214b6a[_0x574317[0x0]];_0x401f57[_0x268e7b(0x134)]=_0x401f57[_0x268e7b(0x134)][_0x268e7b(0x14e)](/^journeys\[\d+\]\./,''),_0x401f57['message']=_0x401f57[_0x268e7b(0x142)]+_0x268e7b(0x154)+_0x438b4d[_0x268e7b(0x16f)]+_0x268e7b(0xbe);for(let _0x41b064=0x1;_0x41b064<_0x574317[_0x268e7b(0xe3)];_0x41b064++){_0x33d665[_0x268e7b(0x108)](_0x574317[_0x41b064]);}}const _0x4fd4be=[..._0x33d665][_0x268e7b(0x157)]((_0x183ede,_0x428d35)=>_0x428d35-_0x183ede);for(const _0x578f89 of _0x4fd4be){_0x214b6a['splice'](_0x578f89,0x1);}}export function validateJourneyDef(_0x145096,_0x3300f6={},_0x1c804f={}){const _0x1db158=a136_0x13a2;if(_0x1c804f[_0x1db158(0x14b)])return runJourneySemanticChecks(_0x145096,_0x3300f6);const _0x1fed16=JourneyDefSchema['safeParse'](_0x145096);if(_0x1fed16[_0x1db158(0xd2)])return runJourneySemanticChecks(_0x1fed16[_0x1db158(0xf1)],_0x3300f6);return zodErrorsToJourneyValidationResult(_0x1fed16[_0x1db158(0x152)],_0x3300f6);}function zodErrorsToJourneyValidationResult(_0x3347a8,_0x182c33){const _0x24c353=flattenZodIssues(_0x3347a8['issues']),_0x172fbd=_0x24c353['map'](_0x28b8c9=>{const _0x722a1a=a136_0x13a2,_0x27af04=formatZodPath(_0x28b8c9[_0x722a1a(0x134)]),_0x433587=mapJourneyZodIssueToCode(_0x28b8c9,_0x27af04),_0x2742ef=getLocationFromPath(_0x182c33['document'],_0x182c33[_0x722a1a(0xff)],_0x28b8c9[_0x722a1a(0x134)][_0x722a1a(0x126)](_0x46a7f6=>typeof _0x46a7f6==='symbol'?String(_0x46a7f6):_0x46a7f6));return{'level':_0x722a1a(0x152),'path':_0x27af04,'code':_0x433587,'message':_0x28b8c9[_0x722a1a(0x142)],..._0x2742ef&&{'location':_0x2742ef}};});return{'valid':![],'errors':_0x172fbd,'warnings':[]};}function mapJourneyZodIssueToCode(_0x50e3bf,_0x4b5027){const _0x5856f5=a136_0x13a2;if(_0x4b5027===_0x5856f5(0x135))return _0x5856f5(0x101);if(_0x4b5027[_0x5856f5(0x125)](_0x5856f5(0xe8))&&_0x4b5027[_0x5856f5(0x121)](_0x5856f5(0xfc)))return _0x5856f5(0xde);if(_0x4b5027===_0x5856f5(0x15c)||_0x4b5027[_0x5856f5(0x125)]('.stages'))return'MISSING_STAGES';if(_0x4b5027===''&&_0x50e3bf[_0x5856f5(0x142)]['includes'](_0x5856f5(0x110)))return'MISSING_STAGES';if(_0x4b5027['includes'](_0x5856f5(0x11b)))return _0x5856f5(0x130);return _0x5856f5(0xde);}function runJourneySemanticChecks(_0x24e0f0,_0x3fe184){const _0xb30f3e=a136_0x13a2,_0x1dad6e=[],_0x31604e=[];(!_0x24e0f0['name']||_0x24e0f0['name'][_0xb30f3e(0x166)]()==='')&&_0x1dad6e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x152),'path':_0xb30f3e(0x135),'code':_0xb30f3e(0x101),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],[_0xb30f3e(0x135)])});const _0x2b3963=new Set();if(_0x24e0f0[_0xb30f3e(0xb9)])for(const _0x3d630d of Object[_0xb30f3e(0x16b)](_0x24e0f0['segments'])){_0x2b3963[_0xb30f3e(0x108)](_0x3d630d);}const _0x3e4f97=new Set();if(_0x24e0f0[_0xb30f3e(0xdb)])for(const _0x2353fe of Object[_0xb30f3e(0x16b)](_0x24e0f0['activations'])){_0x3e4f97[_0xb30f3e(0x108)](_0x2353fe);}const _0x3c29c1=new Set(),_0x2ccb08={..._0x3fe184,'embeddedSegments':_0x2b3963,'referencedSegments':_0x3c29c1,'activationKeys':_0x3e4f97[_0xb30f3e(0x16f)]>0x0?_0x3e4f97:undefined};if(_0x24e0f0[_0xb30f3e(0xb9)])for(const [_0x11b99e,_0x24245e]of Object[_0xb30f3e(0x141)](_0x24e0f0[_0xb30f3e(0xb9)])){const _0x44ba2a=validateEmbeddedSegment(_0x24245e,_0xb30f3e(0x131)+_0x11b99e,_0x2ccb08);for(const _0x104107 of _0x44ba2a){if(_0x104107['level']===_0xb30f3e(0x152))_0x1dad6e[_0xb30f3e(0x160)](_0x104107);else _0x31604e[_0xb30f3e(0x160)](_0x104107);}}const _0x3f7c52=!!_0x24e0f0['goal'],_0x3af83d=_0x24e0f0[_0xb30f3e(0x10d)]?.[_0xb30f3e(0x12c)](_0x266764=>!!_0x266764['goal'])??![];!_0x3f7c52&&!_0x3af83d&&_0x31604e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x172),'path':_0xb30f3e(0x158),'code':_0xb30f3e(0xc0),'message':_0xb30f3e(0xfe),'location':getLocationFromPath(_0x3fe184['document'],_0x3fe184['source'],['goal'])});const _0x31cb1e=_0x24e0f0[_0xb30f3e(0x10d)]??_0x24e0f0[_0xb30f3e(0x128)];if(_0x31cb1e&&_0x31cb1e[_0xb30f3e(0xda)](_0x5a77f8=>_0x5a77f8[_0xb30f3e(0xfd)]===!![])['length']>0x1){const _0x17abff=_0x24e0f0[_0xb30f3e(0x10d)]?_0xb30f3e(0x10d):_0xb30f3e(0x128);_0x1dad6e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x152),'path':_0x17abff,'code':_0xb30f3e(0x12d),'message':_0xb30f3e(0xc9)+(_0x17abff===_0xb30f3e(0x10d)?_0xb30f3e(0xe1):_0xb30f3e(0x107))+_0xb30f3e(0x122),'location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],[_0x17abff])});}if(_0x24e0f0[_0xb30f3e(0x10d)]&&_0x24e0f0['journeys'][_0xb30f3e(0xe3)]>0x0)for(let _0x351a12=0x0;_0x351a12<_0x24e0f0['journeys'][_0xb30f3e(0xe3)];_0x351a12++){const _0x58db71=_0x24e0f0[_0xb30f3e(0x10d)][_0x351a12];if(_0x24e0f0[_0xb30f3e(0x10d)]['length']>0x1&&_0x58db71['state']===_0xb30f3e(0xe0))continue;const _0x570bcb=_0x58db71[_0xb30f3e(0x15c)]||[],_0x48babe=_0xb30f3e(0xcc)+_0x351a12+'].',_0x3b839b=!!_0x58db71[_0xb30f3e(0x158)],_0x47a7c0=_0x3b839b?{..._0x24e0f0,'goal':_0x58db71[_0xb30f3e(0x158)]}:_0x24e0f0;validateStagesForVersion(_0x570bcb,_0x47a7c0,_0x2ccb08,_0x48babe,_0x1dad6e,_0x31604e,{'goalIsInherited':!_0x3b839b});}else{if(_0x24e0f0['versions']&&_0x24e0f0[_0xb30f3e(0x128)][_0xb30f3e(0xe3)]>0x0)for(let _0x2bd166=0x0;_0x2bd166<_0x24e0f0['versions']['length'];_0x2bd166++){const _0x4a4512=_0x24e0f0['versions'][_0x2bd166];if(_0x24e0f0[_0xb30f3e(0x128)]['length']>0x1&&_0x4a4512[_0xb30f3e(0x150)]===_0xb30f3e(0xe0))continue;const _0x5e89a6=_0x4a4512[_0xb30f3e(0x15c)]||[],_0x21f407=_0xb30f3e(0xca)+_0x2bd166+'].';validateStagesForVersion(_0x5e89a6,_0x24e0f0,_0x2ccb08,_0x21f407,_0x1dad6e,_0x31604e);}else{const _0x38b0fc=_0x24e0f0['stages']||[];validateStagesForVersion(_0x38b0fc,_0x24e0f0,_0x2ccb08,'',_0x1dad6e,_0x31604e);}}_0x24e0f0[_0xb30f3e(0x10d)]&&_0x24e0f0[_0xb30f3e(0x10d)][_0xb30f3e(0xe3)]>0x1&&(deduplicateAcrossVersions(_0x1dad6e),deduplicateAcrossVersions(_0x31604e));for(const _0x4ea2ad of _0x2b3963){!_0x3c29c1[_0xb30f3e(0x169)](_0x4ea2ad)&&!_0x4ea2ad[_0xb30f3e(0x11f)](_0xb30f3e(0x12b))&&_0x31604e['push']({'level':_0xb30f3e(0x172),'path':_0xb30f3e(0x131)+_0x4ea2ad,'code':_0xb30f3e(0xdc),'message':_0xb30f3e(0x138)+_0x4ea2ad+_0xb30f3e(0x10f),'location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],['segments',_0x4ea2ad])});}return{'valid':_0x1dad6e[_0xb30f3e(0xe3)]===0x0,'errors':_0x1dad6e,'warnings':_0x31604e};}
|
|
1
|
+
(function(_0xbdd9a7,_0x26a06f){const _0x38e89d=a136_0xb97e,_0x6f60e0=_0xbdd9a7();while(!![]){try{const _0x572970=-parseInt(_0x38e89d(0x1b2))/0x1+-parseInt(_0x38e89d(0x20f))/0x2+parseInt(_0x38e89d(0x16c))/0x3*(-parseInt(_0x38e89d(0x177))/0x4)+parseInt(_0x38e89d(0x16f))/0x5*(-parseInt(_0x38e89d(0x1ab))/0x6)+parseInt(_0x38e89d(0x16a))/0x7*(-parseInt(_0x38e89d(0x1c5))/0x8)+parseInt(_0x38e89d(0x15f))/0x9+parseInt(_0x38e89d(0x1f9))/0xa;if(_0x572970===_0x26a06f)break;else _0x6f60e0['push'](_0x6f60e0['shift']());}catch(_0x7c2111){_0x6f60e0['push'](_0x6f60e0['shift']());}}}(a136_0x2a93,0x781da));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1b6935,_0x5ba708,_0x1d794b,_0x4a6534,_0x1b226b,_0x8a8239){const _0x215cf5=a136_0xb97e;return{'level':_0x1b6935,'path':_0x5ba708,'code':_0x1d794b,'message':_0x4a6534,'location':getLocationFromPath(_0x1b226b[_0x215cf5(0x1b1)],_0x1b226b[_0x215cf5(0x17d)],pathToArray(_0x8a8239??_0x5ba708))};}function validateVersionStructure(_0x378419,_0x214ebe){const _0x3c510d=a136_0xb97e,_0x2dcb6e=[];return _0x378419[_0x3c510d(0x16b)]>MAX_STAGES&&_0x2dcb6e[_0x3c510d(0x1b5)](createIssue(_0x3c510d(0x17f),_0x3c510d(0x1b3),_0x3c510d(0x185),'Journey\x20has\x20'+_0x378419[_0x3c510d(0x16b)]+_0x3c510d(0x1c1)+MAX_STAGES,_0x214ebe)),_0x2dcb6e;}function validateStageStructure(_0x342d89,_0x1812d4,_0xdea62b,_0x193c11){const _0x537695=a136_0xb97e,_0x520650=[],_0x4d6598='stages['+_0x1812d4+']';_0x1812d4===0x0&&!_0x342d89[_0x537695(0x1f3)]&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x17f),_0x4d6598+_0x537695(0x1a0),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x342d89[_0x537695(0x161)]+_0x537695(0x1ad),_0x193c11,_0x4d6598));const _0x47885b=_0x1812d4===_0xdea62b-0x1;!_0x47885b&&!_0x342d89[_0x537695(0x1bb)]&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x17f),_0x4d6598+_0x537695(0x203),_0x537695(0x20b),_0x537695(0x1fb)+_0x342d89[_0x537695(0x161)]+_0x537695(0x1c0),_0x193c11,_0x4d6598));(!_0x342d89[_0x537695(0x197)]||_0x342d89[_0x537695(0x197)][_0x537695(0x16b)]===0x0)&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x1e7),_0x4d6598+'.exit_criteria',_0x537695(0x184),_0x537695(0x1fb)+_0x342d89['name']+_0x537695(0x175),_0x193c11,_0x4d6598));const _0x4e0afe=_0x342d89[_0x537695(0x1ea)]?.[_0x537695(0x16b)]??0x0;if(_0x4e0afe===0x0)_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x17f),_0x4d6598+'.steps','INSUFFICIENT_STEPS','Stage\x20\x27'+_0x342d89[_0x537695(0x161)]+_0x537695(0x19a),_0x193c11,_0x4d6598+'.steps'));else{if(_0x4e0afe===0x1)_0x520650['push'](createIssue(_0x537695(0x1e7),_0x4d6598+'.steps','INSUFFICIENT_STEPS','Stage\x20\x27'+_0x342d89[_0x537695(0x161)]+_0x537695(0x1f0),_0x193c11,_0x4d6598+_0x537695(0x206)));else _0x4e0afe<=0x3&&_0x520650[_0x537695(0x1b5)](createIssue(_0x537695(0x1e7),_0x4d6598+_0x537695(0x206),_0x537695(0x1e4),_0x537695(0x1fb)+_0x342d89[_0x537695(0x161)]+_0x537695(0x1eb)+_0x4e0afe+_0x537695(0x1c9),_0x193c11,_0x4d6598+'.steps'));}return _0x520650;}function validateStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03){const _0x3d0913=a136_0xb97e,_0x1448ee=[];if(_0x4644f9[_0x3d0913(0x1e8)]===_0x3d0913(0x199))return _0x4644f9[_0x3d0913(0x1a6)]&&_0x1448ee[_0x3d0913(0x1b5)](createIssue(_0x3d0913(0x17f),_0x5896ac+'.next',_0x3d0913(0x1c3),_0x3d0913(0x191)+_0x4644f9['name']+_0x3d0913(0x1a1),_0x17db13)),_0x3d0913(0x1ca)in _0x4644f9&&_0x4644f9[_0x3d0913(0x1ca)]!==undefined&&_0x1448ee[_0x3d0913(0x1b5)](createIssue(_0x3d0913(0x17f),_0x5896ac+_0x3d0913(0x183),_0x3d0913(0x1c3),_0x3d0913(0x191)+_0x4644f9[_0x3d0913(0x161)]+_0x3d0913(0x19d),_0x17db13)),_0x1448ee;_0x4644f9[_0x3d0913(0x1a6)]&&(_0x17db13[_0x3d0913(0x194)]&&!_0x17db13[_0x3d0913(0x194)]['has'](_0x4644f9[_0x3d0913(0x1a6)])&&_0x1448ee[_0x3d0913(0x1b5)](createIssue(_0x3d0913(0x17f),_0x5896ac+_0x3d0913(0x17b),_0x3d0913(0x1bc),_0x3d0913(0x1cc)+_0x4644f9['next']+'\x27',_0x17db13)));switch(_0x4644f9['type']){case _0x3d0913(0x1a9):_0x1448ee[_0x3d0913(0x1b5)](...validateWaitStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03));break;case _0x3d0913(0x1ba):_0x1448ee[_0x3d0913(0x1b5)](...validateActivationStep(_0x4644f9,_0x5896ac,_0x17db13));break;case _0x3d0913(0x1a8):_0x1448ee['push'](...validateDecisionPointStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03));break;case _0x3d0913(0x1b8):_0x1448ee[_0x3d0913(0x1b5)](...validateAbTestStep(_0x4644f9,_0x5896ac,_0x17db13,_0x5d5e03));break;case _0x3d0913(0x1dc):_0x1448ee[_0x3d0913(0x1b5)](...validateJumpStep(_0x4644f9,_0x5896ac,_0x17db13));break;}return _0x1448ee;}function validateWaitStep(_0x1cae80,_0x587ce1,_0x25b68b,_0x14e134){const _0x3b00ee=a136_0xb97e,_0x46cb10=[];if(!_0x1cae80['with'])return _0x46cb10[_0x3b00ee(0x1b5)](createIssue('error',_0x587ce1+_0x3b00ee(0x183),_0x3b00ee(0x1cb),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x25b68b,_0x587ce1)),_0x46cb10;if(_0x1cae80[_0x3b00ee(0x1ca)][_0x3b00ee(0x1d1)]){const _0x637294=_0x1cae80[_0x3b00ee(0x1ca)][_0x3b00ee(0x1d1)];if(_0x637294[_0x3b00ee(0x1d5)]){_0x25b68b['referencedSegments']?.[_0x3b00ee(0x181)](_0x637294['segment']);!_0x637294[_0x3b00ee(0x1d5)][_0x3b00ee(0x20c)](_0x3b00ee(0x186))&&(_0x25b68b[_0x3b00ee(0x1dd)]&&!_0x25b68b['embeddedSegments'][_0x3b00ee(0x1d0)](_0x637294['segment'])&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue('error',_0x587ce1+_0x3b00ee(0x164),_0x3b00ee(0x1be),_0x3b00ee(0x190)+_0x637294[_0x3b00ee(0x1d5)]+_0x3b00ee(0x1b0),_0x25b68b)));_0x637294[_0x3b00ee(0x1a6)]&&_0x25b68b[_0x3b00ee(0x194)]&&!_0x25b68b['stepNames'][_0x3b00ee(0x1d0)](_0x637294[_0x3b00ee(0x1a6)])&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue(_0x3b00ee(0x17f),_0x587ce1+_0x3b00ee(0x1b6),'INVALID_NEXT_REFERENCE',_0x3b00ee(0x1f2)+_0x637294[_0x3b00ee(0x1a6)]+'\x27',_0x25b68b));_0x637294[_0x3b00ee(0x193)]?.['next']&&_0x25b68b['stepNames']&&!_0x25b68b[_0x3b00ee(0x194)][_0x3b00ee(0x1d0)](_0x637294[_0x3b00ee(0x193)]['next'])&&_0x46cb10['push'](createIssue(_0x3b00ee(0x17f),_0x587ce1+'.with.condition.timeout.next',_0x3b00ee(0x1bc),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x637294[_0x3b00ee(0x193)][_0x3b00ee(0x1a6)]+'\x27',_0x25b68b));const _0x4a1cf0=_0x637294[_0x3b00ee(0x1a6)]||_0x1cae80[_0x3b00ee(0x1a6)],_0x156911=_0x637294[_0x3b00ee(0x193)]?.[_0x3b00ee(0x1a6)]||_0x1cae80['next'];if(_0x4a1cf0){const _0x4f3c57=_0x14e134[_0x3b00ee(0x1d2)](_0x4a1cf0);_0x4f3c57?.[_0x3b00ee(0x1e8)]===_0x3b00ee(0x1de)&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue('warning',_0x587ce1+_0x3b00ee(0x1b6),_0x3b00ee(0x16d),'Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x4a1cf0+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x25b68b,_0x587ce1+_0x3b00ee(0x20e)));}if(_0x156911){const _0x31875c=_0x14e134[_0x3b00ee(0x1d2)](_0x156911);_0x31875c?.['type']==='merge'&&_0x46cb10[_0x3b00ee(0x1b5)](createIssue(_0x3b00ee(0x1e7),_0x587ce1+'.with.condition.timeout.next',_0x3b00ee(0x16d),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x156911+_0x3b00ee(0x20d),_0x25b68b,_0x587ce1+'.with.condition.timeout'));}}}return _0x46cb10;}function validateActivationStep(_0x1b3738,_0x52aa39,_0x449808){const _0x35e07f=a136_0xb97e,_0x7ed071=[];if(!_0x1b3738[_0x35e07f(0x1ca)]?.[_0x35e07f(0x1ba)])return _0x7ed071[_0x35e07f(0x1b5)](createIssue('error',_0x52aa39+_0x35e07f(0x208),'MISSING_ACTIVATION_REF',_0x35e07f(0x1ee),_0x449808,_0x52aa39)),_0x7ed071;const _0x1e0a7e=_0x1b3738[_0x35e07f(0x1ca)]['activation'];return _0x449808[_0x35e07f(0x1c7)]&&!_0x1e0a7e[_0x35e07f(0x20c)](_0x35e07f(0x186))&&(!_0x449808[_0x35e07f(0x1c7)]['has'](_0x1e0a7e)&&_0x7ed071[_0x35e07f(0x1b5)](createIssue('error',_0x52aa39+_0x35e07f(0x208),'MISSING_ACTIVATION_DEFINITION','Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x1e0a7e+_0x35e07f(0x1b4),_0x449808))),_0x7ed071;}function validateDecisionPointStep(_0x251799,_0x506094,_0x3703ba,_0x4f3d01){const _0xeb95b=a136_0xb97e,_0x38d3e2=[];if(!_0x251799[_0xeb95b(0x1ca)]?.[_0xeb95b(0x1a5)]||_0x251799['with']['branches'][_0xeb95b(0x16b)]===0x0)return _0x38d3e2[_0xeb95b(0x1b5)](createIssue(_0xeb95b(0x17f),_0x506094+_0xeb95b(0x18c),'MISSING_CONDITIONS',_0xeb95b(0x16e),_0x3703ba,_0x506094)),_0x38d3e2;for(let _0x36f39c=0x0;_0x36f39c<_0x251799['with']['branches'][_0xeb95b(0x16b)];_0x36f39c++){const _0x37cc3c=_0x251799[_0xeb95b(0x1ca)][_0xeb95b(0x1a5)][_0x36f39c],_0x456314=_0x506094+'.with.branches['+_0x36f39c+']';_0x37cc3c[_0xeb95b(0x1d5)]&&!_0x37cc3c[_0xeb95b(0x1a4)]&&(_0x3703ba[_0xeb95b(0x1ce)]?.[_0xeb95b(0x181)](_0x37cc3c[_0xeb95b(0x1d5)]),!_0x37cc3c[_0xeb95b(0x1d5)][_0xeb95b(0x20c)](_0xeb95b(0x186))&&(_0x3703ba[_0xeb95b(0x1dd)]&&!_0x3703ba['embeddedSegments'][_0xeb95b(0x1d0)](_0x37cc3c[_0xeb95b(0x1d5)])&&_0x38d3e2['push'](createIssue(_0xeb95b(0x17f),_0x456314+'.segment',_0xeb95b(0x1be),_0xeb95b(0x196)+_0x37cc3c[_0xeb95b(0x1d5)]+'\x27',_0x3703ba))));_0x37cc3c[_0xeb95b(0x1a6)]&&_0x3703ba['stepNames']&&!_0x3703ba['stepNames'][_0xeb95b(0x1d0)](_0x37cc3c[_0xeb95b(0x1a6)])&&_0x38d3e2[_0xeb95b(0x1b5)](createIssue(_0xeb95b(0x17f),_0x456314+_0xeb95b(0x17b),_0xeb95b(0x1bc),_0xeb95b(0x18d)+_0x37cc3c[_0xeb95b(0x1a6)]+'\x27',_0x3703ba));if(_0x37cc3c['next']){const _0x3d1f66=_0x4f3d01[_0xeb95b(0x1d2)](_0x37cc3c['next']);_0x3d1f66?.[_0xeb95b(0x1e8)]==='merge'&&_0x38d3e2[_0xeb95b(0x1b5)](createIssue(_0xeb95b(0x1e7),_0x456314+_0xeb95b(0x17b),_0xeb95b(0x16d),'Decision\x20branch\x20\x27'+_0x37cc3c[_0xeb95b(0x161)]+_0xeb95b(0x207)+_0x37cc3c['next']+'\x27\x20with\x20no\x20action\x20in\x20between',_0x3703ba));}}return _0x38d3e2;}function a136_0xb97e(_0x1b0aec,_0xe2369){_0x1b0aec=_0x1b0aec-0x15f;const _0x2a93d2=a136_0x2a93();let _0xb97e9f=_0x2a93d2[_0x1b0aec];return _0xb97e9f;}function validateAbTestStep(_0x4b541e,_0x34f340,_0x4a3d33,_0xd526dd){const _0x3c86cd=a136_0xb97e,_0x1541a9=[];if(!_0x4b541e[_0x3c86cd(0x1ca)]?.['variants']||_0x4b541e[_0x3c86cd(0x1ca)][_0x3c86cd(0x1f5)][_0x3c86cd(0x16b)]===0x0)return _0x1541a9[_0x3c86cd(0x1b5)](createIssue(_0x3c86cd(0x17f),_0x34f340+'.with.variants','MISSING_CONDITIONS',_0x3c86cd(0x172),_0x4a3d33,_0x34f340)),_0x1541a9;const _0x58792d=_0x4b541e[_0x3c86cd(0x1ca)][_0x3c86cd(0x1f5)][_0x3c86cd(0x20a)]((_0x26394d,_0x450f5c)=>_0x26394d+(_0x450f5c[_0x3c86cd(0x1aa)]||0x0),0x0);Math['abs'](_0x58792d-0x64)>0.01&&_0x1541a9[_0x3c86cd(0x1b5)](createIssue(_0x3c86cd(0x17f),_0x34f340+'.with.variants',_0x3c86cd(0x1d8),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x58792d+'%)',_0x4a3d33));for(let _0x2b4f62=0x0;_0x2b4f62<_0x4b541e[_0x3c86cd(0x1ca)][_0x3c86cd(0x1f5)][_0x3c86cd(0x16b)];_0x2b4f62++){const _0x1d8c64=_0x4b541e['with'][_0x3c86cd(0x1f5)][_0x2b4f62],_0x17de47=_0x34f340+_0x3c86cd(0x198)+_0x2b4f62+']';_0x1d8c64[_0x3c86cd(0x1a6)]&&_0x4a3d33['stepNames']&&!_0x4a3d33[_0x3c86cd(0x194)][_0x3c86cd(0x1d0)](_0x1d8c64[_0x3c86cd(0x1a6)])&&_0x1541a9['push'](createIssue(_0x3c86cd(0x17f),_0x17de47+_0x3c86cd(0x17b),_0x3c86cd(0x1bc),_0x3c86cd(0x18a)+_0x1d8c64['next']+'\x27',_0x4a3d33));if(_0x1d8c64[_0x3c86cd(0x1a6)]){const _0xefcc1c=_0xd526dd[_0x3c86cd(0x1d2)](_0x1d8c64['next']);_0xefcc1c?.[_0x3c86cd(0x1e8)]===_0x3c86cd(0x1de)&&_0x1541a9[_0x3c86cd(0x1b5)](createIssue(_0x3c86cd(0x1e7),_0x17de47+_0x3c86cd(0x17b),_0x3c86cd(0x16d),'A/B\x20test\x20variant\x20\x27'+_0x1d8c64[_0x3c86cd(0x161)]+_0x3c86cd(0x207)+_0x1d8c64[_0x3c86cd(0x1a6)]+_0x3c86cd(0x1ed),_0x4a3d33));}}return _0x1541a9;}function validateJumpStep(_0xde5384,_0x49ae44,_0x4a1762){const _0x13d54d=a136_0xb97e,_0x3a0b75=[];if(!_0xde5384['with']?.[_0x13d54d(0x18e)])return _0x3a0b75[_0x13d54d(0x1b5)](createIssue('error',_0x49ae44+'.with.target',_0x13d54d(0x210),_0x13d54d(0x189),_0x4a1762,_0x49ae44)),_0x3a0b75;return(!_0xde5384['with'][_0x13d54d(0x18e)][_0x13d54d(0x1ff)]||!_0xde5384['with'][_0x13d54d(0x18e)][_0x13d54d(0x1ae)])&&_0x3a0b75['push'](createIssue('error',_0x49ae44+_0x13d54d(0x162),_0x13d54d(0x210),_0x13d54d(0x1e0),_0x4a1762)),_0x3a0b75;}function buildConvergenceMap(_0x58bed0){const _0x57ef7e=a136_0xb97e,_0x1ea1cf=new Map();function _0x32a5ad(_0x133531,_0x2b77c3){const _0x127a97=a136_0xb97e,_0x1564cf=_0x1ea1cf['get'](_0x133531)||[];_0x1564cf[_0x127a97(0x1b5)](_0x2b77c3),_0x1ea1cf[_0x127a97(0x166)](_0x133531,_0x1564cf);}for(const _0x2ad3bb of _0x58bed0){_0x2ad3bb['next']&&_0x32a5ad(_0x2ad3bb[_0x57ef7e(0x1a6)],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x202)+_0x2ad3bb['name']+'\x27'});if(_0x2ad3bb[_0x57ef7e(0x1e8)]===_0x57ef7e(0x1a8)&&_0x2ad3bb[_0x57ef7e(0x1ca)]?.[_0x57ef7e(0x1a5)])for(const _0x26d868 of _0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1a5)]){_0x26d868['next']&&_0x32a5ad(_0x26d868['next'],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x201)+_0x26d868[_0x57ef7e(0x161)]+_0x57ef7e(0x1c6)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'});}if(_0x2ad3bb['type']===_0x57ef7e(0x1b8)&&_0x2ad3bb[_0x57ef7e(0x1ca)]?.[_0x57ef7e(0x1f5)])for(const _0x5552d2 of _0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1f5)]){_0x5552d2[_0x57ef7e(0x1a6)]&&_0x32a5ad(_0x5552d2['next'],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':'variant\x20\x27'+_0x5552d2['name']+_0x57ef7e(0x1c6)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'});}_0x2ad3bb[_0x57ef7e(0x1e8)]==='wait'&&_0x2ad3bb[_0x57ef7e(0x1ca)]?.[_0x57ef7e(0x1d1)]&&(_0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1d1)][_0x57ef7e(0x1a6)]&&_0x32a5ad(_0x2ad3bb[_0x57ef7e(0x1ca)]['condition'][_0x57ef7e(0x1a6)],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x1b7)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'}),_0x2ad3bb[_0x57ef7e(0x1ca)][_0x57ef7e(0x1d1)][_0x57ef7e(0x193)]?.['next']&&_0x32a5ad(_0x2ad3bb[_0x57ef7e(0x1ca)]['condition'][_0x57ef7e(0x193)][_0x57ef7e(0x1a6)],{'stepName':_0x2ad3bb[_0x57ef7e(0x161)],'description':_0x57ef7e(0x1f6)+_0x2ad3bb[_0x57ef7e(0x161)]+'\x27'}));}return _0x1ea1cf;}function validateFlowControl(_0x42c604,_0x1c99f7,_0x76c4c8){const _0x5112f6=a136_0xb97e,_0x4bd592=[],_0x5ce7bf=_0x5112f6(0x1f8)+_0x1c99f7+']',_0x48a374=_0x42c604['steps']||[];if(_0x48a374['length']===0x0)return _0x4bd592;const _0x596cbe=new Map();for(const _0xea5c0a of _0x48a374){_0xea5c0a['name']&&_0x596cbe[_0x5112f6(0x166)](_0xea5c0a['name'],_0xea5c0a);}const _0x545812=buildConvergenceMap(_0x48a374),_0x6f0016=_0x48a374[_0x5112f6(0x1f4)](_0x2acda2=>_0x2acda2[_0x5112f6(0x1e8)]===_0x5112f6(0x199));!_0x6f0016&&_0x4bd592[_0x5112f6(0x1b5)](createIssue(_0x5112f6(0x17f),_0x5ce7bf+_0x5112f6(0x206),_0x5112f6(0x1fc),_0x5112f6(0x1fb)+_0x42c604[_0x5112f6(0x161)]+'\x27\x20has\x20no\x20end\x20step',_0x76c4c8));for(const [_0x2b7bd8,_0x303d72]of _0x545812){const _0x450935=_0x596cbe['get'](_0x2b7bd8);if(!_0x450935)continue;if(_0x303d72[_0x5112f6(0x16b)]>0x1&&_0x450935[_0x5112f6(0x1e8)]!==_0x5112f6(0x1de)){const _0x1d2567=_0x303d72[_0x5112f6(0x1df)](_0x232a6a=>_0x232a6a[_0x5112f6(0x1e3)])[_0x5112f6(0x1fa)](',\x20');_0x4bd592['push'](createIssue(_0x5112f6(0x17f),_0x5ce7bf+'.steps',_0x5112f6(0x1f1),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x2b7bd8+_0x5112f6(0x160)+_0x1d2567+_0x5112f6(0x1ef),_0x76c4c8));}_0x303d72['length']===0x1&&_0x450935[_0x5112f6(0x1e8)]===_0x5112f6(0x1de)&&_0x4bd592[_0x5112f6(0x1b5)](createIssue(_0x5112f6(0x1e7),_0x5ce7bf+_0x5112f6(0x206),_0x5112f6(0x178),_0x5112f6(0x180)+_0x2b7bd8+_0x5112f6(0x179)+_0x303d72[0x0][_0x5112f6(0x1e3)]+_0x5112f6(0x19f),_0x76c4c8));}for(const _0x50ce0f of _0x48a374){if(_0x50ce0f[_0x5112f6(0x1e8)]==='merge'&&_0x50ce0f[_0x5112f6(0x1a6)]){const _0x3a834d=_0x596cbe[_0x5112f6(0x1d2)](_0x50ce0f[_0x5112f6(0x1a6)]);_0x3a834d?.[_0x5112f6(0x1e8)]===_0x5112f6(0x1de)&&_0x4bd592[_0x5112f6(0x1b5)](createIssue(_0x5112f6(0x17f),_0x5ce7bf+_0x5112f6(0x206),_0x5112f6(0x1c8),_0x5112f6(0x180)+_0x50ce0f[_0x5112f6(0x161)]+'\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27'+_0x50ce0f[_0x5112f6(0x1a6)]+_0x5112f6(0x167),_0x76c4c8));}}return _0x4bd592;}function validateCriteria(_0x57287b,_0x6b1ce3,_0x267bf4){const _0x2942f9=a136_0xb97e,_0x46fbfb=[];return _0x57287b[_0x2942f9(0x1d5)]&&(_0x267bf4['referencedSegments']?.[_0x2942f9(0x181)](_0x57287b[_0x2942f9(0x1d5)]),!_0x57287b[_0x2942f9(0x1d5)][_0x2942f9(0x20c)](_0x2942f9(0x186))&&(_0x267bf4[_0x2942f9(0x1dd)]&&!_0x267bf4[_0x2942f9(0x1dd)][_0x2942f9(0x1d0)](_0x57287b['segment'])&&_0x46fbfb[_0x2942f9(0x1b5)](createIssue('error',_0x6b1ce3+'.segment',_0x2942f9(0x1be),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x57287b[_0x2942f9(0x1d5)]+'\x27',_0x267bf4)))),_0x46fbfb;}function validateEmbeddedSegment(_0xc7556f,_0x3b541b,_0x24320e){const _0x394db3=a136_0xb97e,_0x3ba3ed=[];return _0xc7556f[_0x394db3(0x1ac)]&&_0x3ba3ed['push'](...validateRuleDef(_0xc7556f[_0x394db3(0x1ac)],_0x3b541b+'.rule',_0x24320e)),_0x3ba3ed;}function a136_0x2a93(){const _0xe2f28f=['every',').\x20Merge\x20is\x20unnecessary.','.entry_criteria','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','MISSING_NAME','MISSING_STAGES','excluded','branches','next','path','decision_point','wait','percentage','3850086wHVWhG','rule','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','stage','.steps[','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','document','187629SueZsV','stages','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','push','.with.condition.next','condition\x20of\x20\x27','ab_test','DUPLICATE_LATEST','activation','milestone','INVALID_NEXT_REFERENCE','trim','MISSING_SEGMENT_REFERENCE','DUPLICATE_STEP_NAME','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','\x20stages\x20but\x20maximum\x20is\x20','replace','END_STEP_HAS_NEXT_OR_WITH','Duplicate\x20step\x20name\x20\x27','56dPIXuJ','\x27\x20of\x20\x27','activationKeys','MERGE_TO_MERGE_CHAIN','\x20steps\x20(may\x20be\x20too\x20simple)','with','MISSING_WAIT_PARAMS','Step\x20references\x20non-existent\x20step\x20\x27','match','referencedSegments','goal','has','condition','get','\x20versions)','issues','segment','level','activations','INVALID_AB_TEST_PERCENTAGES','\x20(across\x20','Journey\x20has\x20no\x20goal\x20defined','latest','jump','embeddedSegments','merge','map','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','journeys[','excluded_','description','FEW_STEPS','.stages','code','warning','type','segments.','steps','\x27\x20has\x20only\x20','sort','\x27\x20with\x20no\x20action\x20in\x20between','Activation\x20step\x20requires\x20an\x20activation\x20reference',').\x20Use\x20a\x20merge\x20step.','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','CONVERGENCE_WITHOUT_MERGE','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','entry_criteria','some','variants','timeout\x20of\x20\x27','symbol','stages[','17788360RxmwVm','join','Stage\x20\x27','MISSING_END_STEP','journey\x20entry','keys','journey','size','branch\x20\x27','step\x20\x27','.milestone','\x20with\x20latest:\x20true','success','.steps','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.activation','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','reduce','MISSING_MILESTONE','startsWith','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','.with.condition','356182hAQbcE','INVALID_JUMP_TARGET','Journey\x20name\x20is\x20required','values','1570086udEvGe','\x27\x20(from:\x20','name','.with.target','includes','.with.condition.segment','versions','set','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','entries','segments','371945VGOUru','length','30RWGMrV','BRANCH_DIRECTLY_TO_MERGE','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','5AmsRGA','JOURNEY_SCHEMA_ERROR','version','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','UNUSED_EMBEDDED_SEGMENT','Embedded\x20segment\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','.name','32780sCqack','SINGLE_INPUT_MERGE','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','data','.next','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','source','journeys,\x20stages,\x20or\x20versions','error','Merge\x20step\x20\x27','add','message','.with','MISSING_EXIT_CRITERIA','TOO_MANY_STAGES','ref:','\x27\x20(first\x20defined\x20at\x20steps[','endsWith','Jump\x20step\x20requires\x20a\x20target','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_GOAL','.with.branches','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','target','safeParse','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','End\x20step\x20\x27','ACTIVATION_SCHEMA_ERROR','timeout','stepNames','journeys','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','exit_criteria','.with.variants[','end','\x27\x20has\x20no\x20steps','launched','state','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field'];a136_0x2a93=function(){return _0xe2f28f;};return a136_0x2a93();}function validateStage(_0x44e517,_0x568a70,_0xbddd19,_0x4e1f13){const _0xead9a7=a136_0xb97e,_0x5afced=[],_0x3bdc81=_0xead9a7(0x1f8)+_0x568a70+']',_0x54ab7a=new Map(),_0x33ec70=new Map();if(_0x44e517[_0xead9a7(0x1ea)]){for(let _0x1f95a2=0x0;_0x1f95a2<_0x44e517[_0xead9a7(0x1ea)][_0xead9a7(0x16b)];_0x1f95a2++){const _0xb12cc=_0x44e517[_0xead9a7(0x1ea)][_0x1f95a2];_0xb12cc['name']&&_0x54ab7a['set'](_0xb12cc[_0xead9a7(0x161)],_0xb12cc);}for(let _0x541758=0x0;_0x541758<_0x44e517[_0xead9a7(0x1ea)][_0xead9a7(0x16b)];_0x541758++){const _0x17b33d=_0x44e517[_0xead9a7(0x1ea)][_0x541758],_0x110ffc=_0x3bdc81+_0xead9a7(0x1af)+_0x541758+']';if(_0x17b33d['name']){if(_0x33ec70[_0xead9a7(0x1d0)](_0x17b33d[_0xead9a7(0x161)])){const _0x171ba4=_0x33ec70[_0xead9a7(0x1d2)](_0x17b33d[_0xead9a7(0x161)]);_0x5afced[_0xead9a7(0x1b5)](createIssue(_0xead9a7(0x17f),_0x110ffc+_0xead9a7(0x176),_0xead9a7(0x1bf),_0xead9a7(0x1c4)+_0x17b33d[_0xead9a7(0x161)]+_0xead9a7(0x187)+_0x171ba4+'])',_0x4e1f13));}else _0x33ec70[_0xead9a7(0x166)](_0x17b33d['name'],_0x541758);}_0x5afced['push'](...validateStep(_0x17b33d,_0x110ffc,_0x4e1f13,_0x54ab7a));}}_0x44e517['entry_criteria']&&_0x5afced[_0xead9a7(0x1b5)](...validateCriteria(_0x44e517[_0xead9a7(0x1f3)],_0x3bdc81+'.entry_criteria',_0x4e1f13));if(_0x44e517[_0xead9a7(0x197)])for(let _0x3ff2b1=0x0;_0x3ff2b1<_0x44e517[_0xead9a7(0x197)]['length'];_0x3ff2b1++){_0x5afced[_0xead9a7(0x1b5)](...validateCriteria(_0x44e517[_0xead9a7(0x197)][_0x3ff2b1],_0x3bdc81+'.exit_criteria['+_0x3ff2b1+']',_0x4e1f13));}return _0x44e517[_0xead9a7(0x1bb)]&&_0x5afced[_0xead9a7(0x1b5)](...validateCriteria(_0x44e517[_0xead9a7(0x1bb)],_0x3bdc81+_0xead9a7(0x203),_0x4e1f13)),_0x5afced[_0xead9a7(0x1b5)](...validateStageStructure(_0x44e517,_0x568a70,_0xbddd19,_0x4e1f13)),_0x5afced['push'](...validateFlowControl(_0x44e517,_0x568a70,_0x4e1f13)),_0x5afced;}function validateStagesForVersion(_0x3a95a4,_0x11ddfa,_0x3c7ffb,_0x31258c,_0x5c1887,_0x1c5152,_0x52e0b5){const _0x3c1e23=a136_0xb97e;if(_0x3a95a4['length']===0x0){_0x5c1887[_0x3c1e23(0x1b5)]({'level':'error','path':_0x31258c+_0x3c1e23(0x1b3),'code':_0x3c1e23(0x1a3),'message':_0x3c1e23(0x17c),'location':getLocationFromPath(_0x3c7ffb[_0x3c1e23(0x1b1)],_0x3c7ffb['source'],['stages'])});return;}const _0x3e23cf=new Set();for(const _0x3cc42a of _0x3a95a4){if(_0x3cc42a[_0x3c1e23(0x1ea)])for(const _0x574435 of _0x3cc42a[_0x3c1e23(0x1ea)]){_0x574435['name']&&_0x3e23cf['add'](_0x574435[_0x3c1e23(0x161)]);}}const _0x221431={..._0x3c7ffb,'stepNames':_0x3e23cf},_0x15fbfb=validateVersionStructure(_0x3a95a4,_0x221431);for(const _0x58aabc of _0x15fbfb){const _0x38d897=_0x31258c?{..._0x58aabc,'path':''+_0x31258c+_0x58aabc[_0x3c1e23(0x1a7)]}:_0x58aabc;if(_0x38d897[_0x3c1e23(0x1d6)]===_0x3c1e23(0x17f))_0x5c1887[_0x3c1e23(0x1b5)](_0x38d897);else _0x1c5152[_0x3c1e23(0x1b5)](_0x38d897);}for(let _0x52ee82=0x0;_0x52ee82<_0x3a95a4['length'];_0x52ee82++){const _0x91cce0=validateStage(_0x3a95a4[_0x52ee82],_0x52ee82,_0x3a95a4[_0x3c1e23(0x16b)],_0x221431);for(const _0x8782b2 of _0x91cce0){const _0x508bb2=_0x31258c?{..._0x8782b2,'path':''+_0x31258c+_0x8782b2[_0x3c1e23(0x1a7)]}:_0x8782b2;if(_0x508bb2['level']==='error')_0x5c1887['push'](_0x508bb2);else _0x1c5152['push'](_0x508bb2);}}if(_0x11ddfa[_0x3c1e23(0x1cf)]){const _0x53272b=_0x52e0b5?.['goalIsInherited']?_0x3c1e23(0x1cf):_0x31258c+_0x3c1e23(0x1cf),_0x2e673b=validateCriteria(_0x11ddfa[_0x3c1e23(0x1cf)],_0x53272b,_0x221431);for(const _0x732c06 of _0x2e673b){if(_0x732c06[_0x3c1e23(0x1d6)]===_0x3c1e23(0x17f))_0x5c1887['push'](_0x732c06);else _0x1c5152[_0x3c1e23(0x1b5)](_0x732c06);}}}function extractVersionIndex(_0x1f454d){const _0x39f960=a136_0xb97e,_0x112ccb=_0x1f454d[_0x39f960(0x1cd)](/^journeys\[(\d+)\]\./);return _0x112ccb?_0x112ccb[0x1]:undefined;}function deduplicateAcrossVersions(_0x2edfaf){const _0x2d002b=a136_0xb97e,_0x169965=new Map();for(let _0x361725=0x0;_0x361725<_0x2edfaf[_0x2d002b(0x16b)];_0x361725++){const _0x3c0ef6=_0x2edfaf[_0x361725][_0x2d002b(0x1e6)]+':'+_0x2edfaf[_0x361725][_0x2d002b(0x182)],_0x1604e8=extractVersionIndex(_0x2edfaf[_0x361725][_0x2d002b(0x1a7)]),_0xe2772f=_0x169965['get'](_0x3c0ef6);if(_0xe2772f){_0xe2772f['indices']['push'](_0x361725);if(_0x1604e8)_0xe2772f[_0x2d002b(0x165)][_0x2d002b(0x181)](_0x1604e8);}else _0x169965[_0x2d002b(0x166)](_0x3c0ef6,{'indices':[_0x361725],'versions':new Set(_0x1604e8?[_0x1604e8]:[])});}const _0x5b35d1=new Set();for(const {indices:_0x50a24b,versions:_0x264b24}of _0x169965[_0x2d002b(0x212)]()){if(_0x264b24[_0x2d002b(0x200)]<=0x1)continue;const _0x5b2c92=_0x2edfaf[_0x50a24b[0x0]];_0x5b2c92[_0x2d002b(0x1a7)]=_0x5b2c92['path'][_0x2d002b(0x1c2)](/^journeys\[\d+\]\./,''),_0x5b2c92['message']=_0x5b2c92[_0x2d002b(0x182)]+_0x2d002b(0x1d9)+_0x264b24[_0x2d002b(0x200)]+_0x2d002b(0x1d3);for(let _0x4d831e=0x1;_0x4d831e<_0x50a24b[_0x2d002b(0x16b)];_0x4d831e++){_0x5b35d1['add'](_0x50a24b[_0x4d831e]);}}const _0xd6e3b0=[..._0x5b35d1][_0x2d002b(0x1ec)]((_0x2a85cc,_0x2406eb)=>_0x2406eb-_0x2a85cc);for(const _0x2c73aa of _0xd6e3b0){_0x2edfaf['splice'](_0x2c73aa,0x1);}}export function validateJourneyDef(_0x1984db,_0x2ef280={},_0x1787a2={}){const _0x3a356c=a136_0xb97e;if(_0x1787a2['skipSchema'])return runJourneySemanticChecks(_0x1984db,_0x2ef280);const _0x3356b1=JourneyDefSchema[_0x3a356c(0x18f)](_0x1984db);if(_0x3356b1[_0x3a356c(0x205)])return runJourneySemanticChecks(_0x3356b1[_0x3a356c(0x17a)],_0x2ef280);return zodErrorsToJourneyValidationResult(_0x3356b1[_0x3a356c(0x17f)],_0x2ef280);}function zodErrorsToJourneyValidationResult(_0x13d2c2,_0x549991){const _0x3a5426=a136_0xb97e,_0x1f0cf2=flattenZodIssues(_0x13d2c2[_0x3a5426(0x1d4)]),_0x4132a1=_0x1f0cf2['map'](_0xa67c5c=>{const _0x357ea9=_0x3a5426,_0x1adce=formatZodPath(_0xa67c5c[_0x357ea9(0x1a7)]),_0x202993=mapJourneyZodIssueToCode(_0xa67c5c,_0x1adce),_0x4e471e=getLocationFromPath(_0x549991['document'],_0x549991[_0x357ea9(0x17d)],_0xa67c5c[_0x357ea9(0x1a7)][_0x357ea9(0x1df)](_0x331cac=>typeof _0x331cac===_0x357ea9(0x1f7)?String(_0x331cac):_0x331cac));return{'level':_0x357ea9(0x17f),'path':_0x1adce,'code':_0x202993,'message':_0xa67c5c[_0x357ea9(0x182)],..._0x4e471e&&{'location':_0x4e471e}};});return{'valid':![],'errors':_0x4132a1,'warnings':[]};}function mapJourneyZodIssueToCode(_0x2d29a9,_0x29744e){const _0x302de7=a136_0xb97e;if(_0x29744e===_0x302de7(0x161))return _0x302de7(0x1a2);if(_0x29744e[_0x302de7(0x188)]('.type')&&_0x29744e[_0x302de7(0x163)](_0x302de7(0x1ea)))return _0x302de7(0x170);if(_0x29744e===_0x302de7(0x1b3)||_0x29744e[_0x302de7(0x188)](_0x302de7(0x1e5)))return'MISSING_STAGES';if(_0x29744e===''&&_0x2d29a9[_0x302de7(0x182)][_0x302de7(0x163)](_0x302de7(0x17e)))return _0x302de7(0x1a3);if(_0x29744e[_0x302de7(0x163)](_0x302de7(0x1ba)))return _0x302de7(0x192);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x57a27f,_0x30e97e){const _0x1d4f67=a136_0xb97e,_0x4f1c3c=[],_0x417608=[];(!_0x57a27f[_0x1d4f67(0x161)]||_0x57a27f[_0x1d4f67(0x161)][_0x1d4f67(0x1bd)]()==='')&&_0x4f1c3c[_0x1d4f67(0x1b5)]({'level':_0x1d4f67(0x17f),'path':_0x1d4f67(0x161),'code':'MISSING_NAME','message':_0x1d4f67(0x211),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x1d4f67(0x161)])});const _0x4c008e=new Set();if(_0x57a27f[_0x1d4f67(0x169)])for(const _0x1cd5b8 of Object['keys'](_0x57a27f['segments'])){_0x4c008e[_0x1d4f67(0x181)](_0x1cd5b8);}const _0x4e91a6=new Set();if(_0x57a27f[_0x1d4f67(0x1d7)])for(const _0x13167a of Object[_0x1d4f67(0x1fe)](_0x57a27f[_0x1d4f67(0x1d7)])){_0x4e91a6[_0x1d4f67(0x181)](_0x13167a);}const _0x4c0948=new Set(),_0x38a9d1={..._0x30e97e,'embeddedSegments':_0x4c008e,'referencedSegments':_0x4c0948,'activationKeys':_0x4e91a6[_0x1d4f67(0x200)]>0x0?_0x4e91a6:undefined};if(_0x57a27f['segments'])for(const [_0x57d906,_0x2718bb]of Object[_0x1d4f67(0x168)](_0x57a27f[_0x1d4f67(0x169)])){const _0x5ecf32=validateEmbeddedSegment(_0x2718bb,_0x1d4f67(0x1e9)+_0x57d906,_0x38a9d1);for(const _0x29a000 of _0x5ecf32){if(_0x29a000[_0x1d4f67(0x1d6)]===_0x1d4f67(0x17f))_0x4f1c3c[_0x1d4f67(0x1b5)](_0x29a000);else _0x417608[_0x1d4f67(0x1b5)](_0x29a000);}}const _0x3ce392=!!_0x57a27f[_0x1d4f67(0x1cf)],_0x2c29f1=_0x57a27f[_0x1d4f67(0x195)]?.[_0x1d4f67(0x19e)](_0x1dcc62=>!!_0x1dcc62[_0x1d4f67(0x1cf)])??![];!_0x3ce392&&!_0x2c29f1&&_0x417608[_0x1d4f67(0x1b5)]({'level':_0x1d4f67(0x1e7),'path':'goal','code':_0x1d4f67(0x18b),'message':_0x1d4f67(0x1da),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x1d4f67(0x1cf)])});const _0x88112d=_0x57a27f[_0x1d4f67(0x195)]??_0x57a27f[_0x1d4f67(0x165)];if(_0x88112d&&_0x88112d['filter'](_0x56fade=>_0x56fade[_0x1d4f67(0x1db)]===!![])[_0x1d4f67(0x16b)]>0x1){const _0x29d3f2=_0x57a27f[_0x1d4f67(0x195)]?_0x1d4f67(0x195):_0x1d4f67(0x165);_0x4f1c3c[_0x1d4f67(0x1b5)]({'level':_0x1d4f67(0x17f),'path':_0x29d3f2,'code':_0x1d4f67(0x1b9),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x29d3f2===_0x1d4f67(0x195)?_0x1d4f67(0x1fd):_0x1d4f67(0x171))+_0x1d4f67(0x204),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x29d3f2])});}if(_0x57a27f['journeys']&&_0x57a27f['journeys'][_0x1d4f67(0x16b)]>0x0)for(let _0x399b47=0x0;_0x399b47<_0x57a27f['journeys'][_0x1d4f67(0x16b)];_0x399b47++){const _0x458037=_0x57a27f[_0x1d4f67(0x195)][_0x399b47];if(_0x57a27f[_0x1d4f67(0x195)][_0x1d4f67(0x16b)]>0x1&&_0x458037[_0x1d4f67(0x19c)]===_0x1d4f67(0x19b))continue;const _0x5ad5f4=_0x458037['stages']||[],_0x1f11ef=_0x1d4f67(0x1e1)+_0x399b47+'].',_0x2b901f=!!_0x458037[_0x1d4f67(0x1cf)],_0x53003e=_0x2b901f?{..._0x57a27f,'goal':_0x458037[_0x1d4f67(0x1cf)]}:_0x57a27f;validateStagesForVersion(_0x5ad5f4,_0x53003e,_0x38a9d1,_0x1f11ef,_0x4f1c3c,_0x417608,{'goalIsInherited':!_0x2b901f});}else{if(_0x57a27f[_0x1d4f67(0x165)]&&_0x57a27f['versions'][_0x1d4f67(0x16b)]>0x0)for(let _0x3ffc7a=0x0;_0x3ffc7a<_0x57a27f[_0x1d4f67(0x165)][_0x1d4f67(0x16b)];_0x3ffc7a++){const _0x4bdabb=_0x57a27f[_0x1d4f67(0x165)][_0x3ffc7a];if(_0x57a27f[_0x1d4f67(0x165)][_0x1d4f67(0x16b)]>0x1&&_0x4bdabb[_0x1d4f67(0x19c)]===_0x1d4f67(0x19b))continue;const _0x12daf6=_0x4bdabb[_0x1d4f67(0x1b3)]||[],_0x11319a='versions['+_0x3ffc7a+'].';validateStagesForVersion(_0x12daf6,_0x57a27f,_0x38a9d1,_0x11319a,_0x4f1c3c,_0x417608);}else{const _0x24dae9=_0x57a27f[_0x1d4f67(0x1b3)]||[];validateStagesForVersion(_0x24dae9,_0x57a27f,_0x38a9d1,'',_0x4f1c3c,_0x417608);}}_0x57a27f[_0x1d4f67(0x195)]&&_0x57a27f[_0x1d4f67(0x195)][_0x1d4f67(0x16b)]>0x1&&(deduplicateAcrossVersions(_0x4f1c3c),deduplicateAcrossVersions(_0x417608));for(const _0x36fcda of _0x4c008e){!_0x4c0948[_0x1d4f67(0x1d0)](_0x36fcda)&&!_0x36fcda[_0x1d4f67(0x20c)](_0x1d4f67(0x1e2))&&_0x417608[_0x1d4f67(0x1b5)]({'level':'warning','path':_0x1d4f67(0x1e9)+_0x36fcda,'code':_0x1d4f67(0x173),'message':_0x1d4f67(0x174)+_0x36fcda+_0x1d4f67(0x209),'location':getLocationFromPath(_0x30e97e[_0x1d4f67(0x1b1)],_0x30e97e[_0x1d4f67(0x17d)],[_0x1d4f67(0x169),_0x36fcda])});}return{'valid':_0x4f1c3c[_0x1d4f67(0x16b)]===0x0,'errors':_0x4f1c3c,'warnings':_0x417608};}
|