@treasuredata/tdx 2026.3.10 → 2026.3.12
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/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.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/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/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(_0x34edea,_0x46b7d0){const _0x2dc63d=a131_0x49ef,_0x41aa83=_0x34edea();while(!![]){try{const _0x616c32=parseInt(_0x2dc63d(0x12e))/0x1+-parseInt(_0x2dc63d(0x151))/0x2*(parseInt(_0x2dc63d(0x11b))/0x3)+parseInt(_0x2dc63d(0x11e))/0x4*(parseInt(_0x2dc63d(0x13c))/0x5)+-parseInt(_0x2dc63d(0x120))/0x6+-parseInt(_0x2dc63d(0x132))/0x7*(parseInt(_0x2dc63d(0x129))/0x8)+-parseInt(_0x2dc63d(0x140))/0x9*(parseInt(_0x2dc63d(0x126))/0xa)+-parseInt(_0x2dc63d(0x13f))/0xb*(-parseInt(_0x2dc63d(0x131))/0xc);if(_0x616c32===_0x46b7d0)break;else _0x41aa83['push'](_0x41aa83['shift']());}catch(_0x481b0f){_0x41aa83['push'](_0x41aa83['shift']());}}}(a131_0x15b5,0x5cc6b));import a131_0x5d80c3 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x17f333){const _0x5764f4=a131_0x49ef,_0x1b00ab=_0x17f333['columns']['map'](_0x37f515=>({'column_name':_0x37f515[_0x5764f4(0x12a)],'column_type':_0x37f515[_0x5764f4(0x137)],'null':_0x5764f4(0x133),'key':null,'default':null,'extra':null}));return{..._0x17f333,'columns':[{'name':_0x5764f4(0x11c),'type':_0x5764f4(0x152)},{'name':_0x5764f4(0x150),'type':'varchar'},{'name':_0x5764f4(0x142),'type':'varchar'},{'name':'key','type':_0x5764f4(0x152)},{'name':_0x5764f4(0x13b),'type':_0x5764f4(0x152)},{'name':_0x5764f4(0x130),'type':'varchar'}],'data':_0x1b00ab};}export async function executeSchemaQuery(_0x37a617,_0x4cd764,_0x2cbba8){const _0x78d23=a131_0x49ef,_0x3ded8f=_0x37a617[_0x78d23(0x118)]()[_0x78d23(0x12f)](/;+$/,''),_0x5b6b7f=_0x78d23(0x11a)+_0x3ded8f+_0x78d23(0x124);_0x2cbba8['verbose']&&console[_0x78d23(0x121)](_0x78d23(0x149)+_0x5b6b7f);const _0x4309d4=await withProgressSpinner(_0x78d23(0x123),async _0x5a843d=>{const _0x111140=_0x78d23,_0x15fb23=await _0x4cd764[_0x111140(0x13a)]['execute'](_0x5b6b7f,{'catalog':'td','schema':'information_schema','onJobId':_0xfbc3d4=>{const _0xed4920=_0x111140;_0x5a843d[_0xed4920(0x11d)](_0xfbc3d4);}});return _0x15fb23;},{'verbose':_0x2cbba8[_0x78d23(0x14a)]});return buildSchemaResult(_0x4309d4[_0x78d23(0x116)]);}function columnName(_0x432bca){const _0x5e2c53=a131_0x49ef;return _0x432bca[_0x5e2c53(0x13e)]||_0x432bca[_0x5e2c53(0x128)]||_0x432bca[_0x5e2c53(0x12a)];}function a131_0x49ef(_0x2fa13f,_0x77169c){_0x2fa13f=_0x2fa13f-0x116;const _0x15b572=a131_0x15b5();let _0x49efce=_0x15b572[_0x2fa13f];return _0x49efce;}function formatFieldLine(_0xcda8eb,_0x32c4d8,_0x23c292){const _0x41d581=a131_0x49ef,_0x380b9a=_0xcda8eb!==_0x32c4d8?'\x20'+a131_0x5d80c3['dim']('('+_0x32c4d8+')'):'';return _0x41d581(0x11f)+_0xcda8eb+_0x380b9a+':\x20'+a131_0x5d80c3['cyan'](_0x23c292);}function sortByColumnName(_0x830f8e){const _0x51b5ae=a131_0x49ef;return[..._0x830f8e]['sort']((_0x96d5d6,_0xa3819a)=>columnName(_0x96d5d6)[_0x51b5ae(0x147)](columnName(_0xa3819a)));}function a131_0x15b5(){const _0xdaf459=['Fetching\x20schema...','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','behaviorName','2284350gGWRNL','filter','parentColumn','17744MguAhY','name','displayName','slice','attribute','167926HHZpVl','replace','extra','4392648OryYqd','112TxnpfS','YES','fields','dim','sort','type','entries','tableName','query','default','422695HzUOys','startsWith','matrixColumnName','44bxsCSX','18YVgsyI','source','null','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','Attributes','matrixTableName','parentTableName','localeCompare','some','Schema\x20query:\x0a','verbose','bold','set','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','size','length','column_type','62934lfVmyo','varchar','data','groupingName','trim','push','SELECT\x20*\x20FROM\x20(\x0a','51UEOCuM','column_name','setJobId','16vousJT','\x20\x20\x20\x20','3377940EWvvSH','error','behavior'];a131_0x15b5=function(){return _0xdaf459;};return a131_0x15b5();}export function displayFieldsHumanReadable(_0x192a95,_0x3a1881){const _0x5772d6=a131_0x49ef,_0x1db932=_0x192a95['filter'](_0x13bab1=>_0x13bab1[_0x5772d6(0x141)]===_0x5772d6(0x12d)),_0x5a5764=_0x192a95[_0x5772d6(0x127)](_0x3f071d=>_0x3f071d[_0x5772d6(0x141)]===_0x5772d6(0x122)),_0x386fa5=new Map();for(const _0xa59d42 of _0x1db932){const _0x4cf5f4=_0xa59d42[_0x5772d6(0x117)]||_0xa59d42[_0x5772d6(0x146)]||'Unknown',_0x32ff30=_0x386fa5['get'](_0x4cf5f4);_0x32ff30?_0x32ff30['fields'][_0x5772d6(0x119)](_0xa59d42):_0x386fa5['set'](_0x4cf5f4,{'displayName':_0x4cf5f4,'tableName':_0xa59d42[_0x5772d6(0x146)],'fields':[_0xa59d42]});}const _0x5978f1=new Map();for(const _0x7fbbf2 of _0x5a5764){const _0xd2c7e9=_0x7fbbf2[_0x5772d6(0x125)]||'Unknown',_0x55e4d6=_0x5978f1['get'](_0xd2c7e9)||[];_0x55e4d6[_0x5772d6(0x119)](_0x7fbbf2),_0x5978f1[_0x5772d6(0x14c)](_0xd2c7e9,_0x55e4d6);}console[_0x5772d6(0x121)]('\x0a'+a131_0x5d80c3[_0x5772d6(0x14b)](_0x3a1881));if(_0x386fa5[_0x5772d6(0x14e)]>0x0){console[_0x5772d6(0x121)]('\x0a'+a131_0x5d80c3[_0x5772d6(0x135)](_0x5772d6(0x144)));const _0x2ad223=[..._0x386fa5[_0x5772d6(0x138)]()][_0x5772d6(0x136)]((_0x40dba1,_0x2ee288)=>_0x40dba1[0x0][_0x5772d6(0x147)](_0x2ee288[0x0]));for(const [,_0x4c45d9]of _0x2ad223){const _0x35f966=_0x4c45d9[_0x5772d6(0x139)]&&_0x4c45d9['tableName']!==_0x4c45d9[_0x5772d6(0x12b)]?'\x20'+a131_0x5d80c3[_0x5772d6(0x135)]('('+_0x4c45d9[_0x5772d6(0x139)]+')'):'';console[_0x5772d6(0x121)]('\x20\x20'+a131_0x5d80c3['bold'](_0x4c45d9[_0x5772d6(0x12b)])+_0x35f966);for(const _0x349f6a of sortByColumnName(_0x4c45d9[_0x5772d6(0x134)])){console[_0x5772d6(0x121)](formatFieldLine(columnName(_0x349f6a),_0x349f6a[_0x5772d6(0x12a)],_0x349f6a[_0x5772d6(0x137)]));}}}if(_0x5978f1[_0x5772d6(0x14e)]>0x0){console['error']('\x0a'+a131_0x5d80c3['dim']('Behaviors'));const _0x5623f0=[..._0x5978f1[_0x5772d6(0x138)]()][_0x5772d6(0x136)]((_0x2ba753,_0x1be002)=>_0x2ba753[0x0][_0x5772d6(0x147)](_0x1be002[0x0]));for(const [_0x8258d5,_0x23578f]of _0x5623f0){const _0x15329c=_0x23578f[0x0],_0x165473=_0x15329c?.[_0x5772d6(0x145)];if(_0x165473){const _0x40b6f9=_0x165473!==_0x8258d5?'\x20'+a131_0x5d80c3[_0x5772d6(0x135)]('('+_0x8258d5+')'):'';console[_0x5772d6(0x121)]('\x20\x20'+a131_0x5d80c3[_0x5772d6(0x14b)](_0x165473)+_0x40b6f9);}else{const _0x27a27f=_0x15329c?.['parentTableName']||'';console[_0x5772d6(0x121)]('\x20\x20'+a131_0x5d80c3[_0x5772d6(0x14b)](_0x8258d5)+(_0x27a27f?'\x20'+a131_0x5d80c3[_0x5772d6(0x135)]('('+_0x27a27f+')'):''));}for(const _0x394aae of sortByColumnName(_0x23578f)){const _0x1f1337=_0x394aae[_0x5772d6(0x12a)][_0x5772d6(0x13d)](_0x8258d5+'.')?_0x394aae[_0x5772d6(0x12a)][_0x5772d6(0x12c)](_0x8258d5[_0x5772d6(0x14f)]+0x1):_0x394aae[_0x5772d6(0x12a)];console[_0x5772d6(0x121)](formatFieldLine(columnName(_0x394aae),_0x1f1337,_0x394aae[_0x5772d6(0x137)]));}}}const _0x31de69=_0x192a95[_0x5772d6(0x148)](_0x5e2758=>_0x5e2758[_0x5772d6(0x13e)]||_0x5e2758['matrixTableName']);_0x31de69&&(console[_0x5772d6(0x121)]('\x0a'+a131_0x5d80c3['dim'](_0x5772d6(0x143))),console[_0x5772d6(0x121)](a131_0x5d80c3[_0x5772d6(0x135)](_0x5772d6(0x14d)))),console[_0x5772d6(0x121)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12e1f5,_0x34c838){const _0x13a24b=a132_0x561c,_0x3f9431=_0x12e1f5();while(!![]){try{const _0x26cc58=parseInt(_0x13a24b(0x106))/0x1*(parseInt(_0x13a24b(0x103))/0x2)+parseInt(_0x13a24b(0x10c))/0x3+-parseInt(_0x13a24b(0x111))/0x4*(-parseInt(_0x13a24b(0x112))/0x5)+parseInt(_0x13a24b(0x100))/0x6+parseInt(_0x13a24b(0x108))/0x7*(parseInt(_0x13a24b(0x113))/0x8)+parseInt(_0x13a24b(0x10e))/0x9*(parseInt(_0x13a24b(0x10b))/0xa)+-parseInt(_0x13a24b(0x10a))/0xb*(parseInt(_0x13a24b(0x116))/0xc);if(_0x26cc58===_0x34c838)break;else _0x3f9431['push'](_0x3f9431['shift']());}catch(_0x42563a){_0x3f9431['push'](_0x3f9431['shift']());}}}(a132_0x5091,0x9fd27));import{readdirSync,statSync}from'fs';function a132_0x5091(){const _0x3fae6c=['3775056vQNWxD','endsWith','extname','4vCCGMI','isDirectory','.yml','219258rdFUPB','dirname','35EqfOpD','relative','1628726JdDpuu','60980WIcIyi','900366BdIzuY','join','117BAmlKD','push','.yaml','40wYMVSe','475865bhNqHY','52168QoUfmz','map','name','144SQHyLj'];a132_0x5091=function(){return _0x3fae6c;};return a132_0x5091();}function a132_0x561c(_0x51dba7,_0x46d8ae){_0x51dba7=_0x51dba7-0x100;const _0x5091e7=a132_0x5091();let _0x561c4e=_0x5091e7[_0x51dba7];return _0x561c4e;}import a132_0x109e60 from'path';export function findYamlFiles(_0x21407b){const _0x3bf551=[];function _0x552a9d(_0x543a93){const _0x1de87c=a132_0x561c,_0x3eeea4=readdirSync(_0x543a93,{'withFileTypes':!![]});for(const _0x8bca81 of _0x3eeea4){const _0x367f75=a132_0x109e60[_0x1de87c(0x10d)](_0x543a93,_0x8bca81[_0x1de87c(0x115)]);if(_0x8bca81[_0x1de87c(0x104)]())_0x552a9d(_0x367f75);else(_0x8bca81[_0x1de87c(0x115)][_0x1de87c(0x101)](_0x1de87c(0x105))||_0x8bca81[_0x1de87c(0x115)][_0x1de87c(0x101)](_0x1de87c(0x110)))&&_0x3bf551[_0x1de87c(0x10f)](_0x367f75);}}return _0x552a9d(_0x21407b),_0x3bf551;}export function discoverYamlFiles(_0x1cd84e){const _0x4277d7=a132_0x561c,_0xf499bf=findYamlFiles(_0x1cd84e);return _0xf499bf[_0x4277d7(0x114)](_0x52b386=>{const _0x4f8211=_0x4277d7,_0x49c7bf=a132_0x109e60[_0x4f8211(0x109)](_0x1cd84e,_0x52b386),_0x475851=a132_0x109e60[_0x4f8211(0x107)](_0x49c7bf);return{'absolutePath':_0x52b386,'relativePath':_0x49c7bf,'folderPath':_0x475851==='.'?'':_0x475851};});}export function isYamlFile(_0x582910){const _0x5693a7=a132_0x561c;try{const _0x5e2182=statSync(_0x582910);if(!_0x5e2182['isFile']())return![];const _0x31d6b6=a132_0x109e60[_0x5693a7(0x102)](_0x582910)['toLowerCase']();return _0x31d6b6===_0x5693a7(0x105)||_0x31d6b6===_0x5693a7(0x110);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1a27a6,_0x1197ca){const _0x3ae490=a133_0xdabb,_0x4a34ff=_0x1a27a6();while(!![]){try{const _0x47af90=-parseInt(_0x3ae490(0xb0))/0x1+parseInt(_0x3ae490(0xe4))/0x2*(-parseInt(_0x3ae490(0xb7))/0x3)+parseInt(_0x3ae490(0xf1))/0x4+-parseInt(_0x3ae490(0xbd))/0x5+parseInt(_0x3ae490(0xd3))/0x6+-parseInt(_0x3ae490(0xd1))/0x7*(-parseInt(_0x3ae490(0xbf))/0x8)+parseInt(_0x3ae490(0xe0))/0x9;if(_0x47af90===_0x1197ca)break;else _0x4a34ff['push'](_0x4a34ff['shift']());}catch(_0x260003){_0x4a34ff['push'](_0x4a34ff['shift']());}}}(a133_0x47b2,0x2b48d));function a133_0xdabb(_0x56e47e,_0x3d3f30){_0x56e47e=_0x56e47e-0xa8;const _0x47b265=a133_0x47b2();let _0xdabb98=_0x47b265[_0x56e47e];return _0xdabb98;}import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x186084){const _0x17cbf1=a133_0xdabb;return _0x186084[_0x17cbf1(0xae)]()['replace'](/\s+/g,'_')[_0x17cbf1(0xe1)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x1e135b){const _0x57252f=a133_0xdabb,_0x3ed8cd=_0x1e135b['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x3ed8cd){const _0x57b9a7=_0x3ed8cd[0x1][_0x57252f(0xae)](),_0x365870=_0x3ed8cd[0x2],_0x1cb8f5=_0x365870[_0x57252f(0xe1)](/-/g,'')[_0x57252f(0xba)](0x0,0x4)[_0x57252f(0xae)]();return _0x57b9a7+'_'+_0x1cb8f5;}const _0x3b2202=_0x1e135b['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x3b2202){const _0x2d5fb1=_0x3b2202[0x1],_0x4dfb73=_0x3b2202[0x2][_0x57252f(0xae)](),_0x38d825=_0x2d5fb1['replace'](/-/g,'')[_0x57252f(0xba)](0x0,0x4)[_0x57252f(0xae)]();return _0x4dfb73+'_'+_0x38d825;}return undefined;}function stableStringify(_0x502137){const _0xfd2eda=a133_0xdabb;if(Array[_0xfd2eda(0xbe)](_0x502137))return'['+_0x502137[_0xfd2eda(0xb9)](_0x10004d=>stableStringify(_0x10004d))[_0xfd2eda(0xe3)](',')+']';if(_0x502137&&typeof _0x502137===_0xfd2eda(0xda)){const _0x4c7a0c=_0x502137,_0x4a170b=Object['keys'](_0x4c7a0c)['sort'](),_0x11010f=_0x4a170b['map'](_0xf29cf8=>'\x22'+_0xf29cf8+'\x22:'+stableStringify(_0x4c7a0c[_0xf29cf8]));return'{'+_0x11010f[_0xfd2eda(0xe3)](',')+'}';}const _0x128384=JSON['stringify'](_0x502137);return _0x128384===undefined?_0xfd2eda(0xcc):_0x128384;}export function consolidateActivationsByContent(_0x3de7f0){const _0x2d188a=a133_0xdabb,_0x117c85={},_0x3898ae=new Map(),_0x21e08e=new Map();for(const _0x326775 of _0x3de7f0){if(!_0x326775)continue;for(const [_0x54cda0,_0x40a1fd]of Object[_0x2d188a(0xc7)](_0x326775)){const _0x2c780a={'name':_0x40a1fd[_0x2d188a(0xe8)],'connection':_0x40a1fd['connection'],..._0x40a1fd['all_columns']!==undefined&&{'all_columns':_0x40a1fd['all_columns']},..._0x40a1fd[_0x2d188a(0xc6)]!==undefined&&{'columns':_0x40a1fd[_0x2d188a(0xc6)]},..._0x40a1fd[_0x2d188a(0xc5)]!==undefined&&{'behavior':_0x40a1fd[_0x2d188a(0xc5)]},..._0x40a1fd[_0x2d188a(0xdf)]!==undefined&&{'schedule':_0x40a1fd['schedule']},..._0x40a1fd[_0x2d188a(0xb1)]!==undefined&&{'notification':_0x40a1fd[_0x2d188a(0xb1)]},..._0x40a1fd[_0x2d188a(0xee)]!==undefined&&{'connector_config':_0x40a1fd[_0x2d188a(0xee)]},..._0x40a1fd[_0x2d188a(0xdc)]!==undefined&&{'activation_template_id':_0x40a1fd[_0x2d188a(0xdc)]}},_0x3ad314=stableStringify(_0x2c780a),_0x1e08ad=_0x21e08e['get'](_0x3ad314);_0x1e08ad?_0x3898ae[_0x2d188a(0xe7)](_0x54cda0,_0x1e08ad):(_0x117c85[_0x54cda0]=_0x40a1fd,_0x3898ae[_0x2d188a(0xe7)](_0x54cda0,_0x54cda0),_0x21e08e[_0x2d188a(0xe7)](_0x3ad314,_0x54cda0));}}return{'merged':_0x117c85,'nameMapping':_0x3898ae};}export function updateActivationReferences(_0x39c22f,_0x5ee735){const _0x36ccd5=a133_0xdabb;if(!_0x39c22f)return;for(const _0x4af5ca of _0x39c22f){if(!_0x4af5ca['steps'])continue;for(const _0x19b0b3 of _0x4af5ca[_0x36ccd5(0xb5)]){if(_0x19b0b3[_0x36ccd5(0xc1)]===_0x36ccd5(0xe9)&&_0x19b0b3[_0x36ccd5(0xb2)]?.['activation']){const _0x34b55d=_0x5ee735['get'](_0x19b0b3[_0x36ccd5(0xb2)]['activation']);_0x34b55d&&_0x34b55d!==_0x19b0b3[_0x36ccd5(0xb2)]['activation']&&(_0x19b0b3['with'][_0x36ccd5(0xe9)]=_0x34b55d);}}}}function a133_0x47b2(){const _0x2cf9cc=['values','stringify','object','some','activation_template_id','rule','branches','schedule','1240092bzXZHN','replace','push','join','2itNWsk','item','attributes','set','name','activation','trim','condition','get','segments','connector_config','bundle_name','journeyStages','354712hpSEXk','string','nameMapping','keys','.yml','activations','journeys','toLowerCase','segment','2522wPqaIV','notification','with','stages','include','steps','.yaml','915477WENMvw','sort','map','slice','merged','description','1292685jyFAQa','isArray','3656hfaWtn','endsWith','type','version_number','entry_criteria','wait','behavior','columns','entries','journeyBundleName','bundle_id','launched','milestone','null','yaml','decision_point','conditions','goal','2870gxUTZs','exit_criteria','1978050kuuDwP','version','draft','versions','length'];a133_0x47b2=function(){return _0x2cf9cc;};return a133_0x47b2();}export function consolidateSegmentsByContent(_0x1836ff,_0x25a3db){const _0x2a0bd7=a133_0xdabb,_0x3a8bb4={},_0x5586aa=new Map(),_0x4a4c31=new Map();for(const _0x200274 of _0x1836ff){if(!_0x200274)continue;for(const [_0x104e59,_0x365c47]of Object[_0x2a0bd7(0xc7)](_0x200274)){if(!_0x365c47[_0x2a0bd7(0xdd)]){_0x3a8bb4[_0x104e59]=_0x365c47,_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0x104e59);continue;}const _0x4bf464=_0x365c47[_0x2a0bd7(0xbc)]&&_0x365c47[_0x2a0bd7(0xbc)][_0x2a0bd7(0xea)]()?_0x365c47['description']:undefined,_0x5e6855=JSON[_0x2a0bd7(0xd9)]({'description':_0x4bf464,'rule':deepSortObject(_0x365c47[_0x2a0bd7(0xdd)])}),_0x3fbcfa=_0x4a4c31[_0x2a0bd7(0xec)](_0x5e6855);if(_0x3fbcfa){const _0x11b847={..._0x365c47[_0x2a0bd7(0xbc)]!==undefined&&{'description':_0x365c47[_0x2a0bd7(0xbc)]},'rule':_0x365c47['rule']?deepSortObject(_0x365c47[_0x2a0bd7(0xdd)]):_0x365c47['rule']};if(_0x104e59<_0x3fbcfa){_0x3a8bb4[_0x104e59]=_0x11b847,delete _0x3a8bb4[_0x3fbcfa];for(const [_0x567b0f,_0x2ebb92]of _0x5586aa[_0x2a0bd7(0xc7)]()){_0x2ebb92===_0x3fbcfa&&_0x5586aa[_0x2a0bd7(0xe7)](_0x567b0f,_0x104e59);}_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0x104e59),_0x4a4c31[_0x2a0bd7(0xe7)](_0x5e6855,_0x104e59);}else _0x3a8bb4[_0x3fbcfa]=_0x11b847,_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0x3fbcfa);}else{let _0xfdafdd=_0x104e59;if(_0x25a3db){const _0x52815d=_0x25a3db[_0x2a0bd7(0xec)](_0x5e6855);_0x52815d&&_0x52815d[_0x2a0bd7(0xd7)]>0x0&&(_0xfdafdd=_0x52815d[_0x2a0bd7(0xba)]()[_0x2a0bd7(0xb8)]()[0x0]);}const _0x290fe1={..._0x365c47[_0x2a0bd7(0xbc)]!==undefined&&{'description':_0x365c47[_0x2a0bd7(0xbc)]},'rule':_0x365c47['rule']?deepSortObject(_0x365c47[_0x2a0bd7(0xdd)]):_0x365c47[_0x2a0bd7(0xdd)]};_0x3a8bb4[_0xfdafdd]=_0x290fe1,_0x5586aa[_0x2a0bd7(0xe7)](_0x104e59,_0xfdafdd),_0x4a4c31[_0x2a0bd7(0xe7)](_0x5e6855,_0xfdafdd);}}}return{'merged':_0x3a8bb4,'nameMapping':_0x5586aa};}export function updateSegmentReferences(_0x453a07,_0xc32543){const _0x22fe08=a133_0xdabb;if(!_0x453a07)return;for(const _0x501501 of _0x453a07){if(_0x501501[_0x22fe08(0xc3)]?.[_0x22fe08(0xaf)]){const _0x40d840=_0xc32543[_0x22fe08(0xec)](_0x501501[_0x22fe08(0xc3)]['segment']);_0x40d840&&(_0x501501[_0x22fe08(0xc3)][_0x22fe08(0xaf)]=_0x40d840);}if(_0x501501[_0x22fe08(0xd2)])for(const _0x32d3ff of _0x501501['exit_criteria']){if(_0x32d3ff[_0x22fe08(0xaf)]){const _0x70af60=_0xc32543['get'](_0x32d3ff[_0x22fe08(0xaf)]);_0x70af60&&(_0x32d3ff[_0x22fe08(0xaf)]=_0x70af60);}}if(_0x501501['milestone']?.[_0x22fe08(0xaf)]){const _0xe3bf52=_0xc32543[_0x22fe08(0xec)](_0x501501[_0x22fe08(0xcb)][_0x22fe08(0xaf)]);_0xe3bf52&&(_0x501501['milestone'][_0x22fe08(0xaf)]=_0xe3bf52);}if(_0x501501[_0x22fe08(0xb5)])for(const _0x50bfcf of _0x501501[_0x22fe08(0xb5)]){if(_0x50bfcf['type']===_0x22fe08(0xce)&&_0x50bfcf[_0x22fe08(0xb2)]?.[_0x22fe08(0xde)])for(const _0x29aed8 of _0x50bfcf['with'][_0x22fe08(0xde)]){if(_0x29aed8[_0x22fe08(0xaf)]){const _0x4a5ab4=_0xc32543['get'](_0x29aed8[_0x22fe08(0xaf)]);_0x4a5ab4&&(_0x29aed8[_0x22fe08(0xaf)]=_0x4a5ab4);}}if(_0x50bfcf['type']===_0x22fe08(0xc4)&&_0x50bfcf['with']?.[_0x22fe08(0xeb)]?.['segment']){const _0x1c9741=_0xc32543[_0x22fe08(0xec)](_0x50bfcf[_0x22fe08(0xb2)][_0x22fe08(0xeb)][_0x22fe08(0xaf)]);_0x1c9741&&(_0x50bfcf[_0x22fe08(0xb2)]['condition'][_0x22fe08(0xaf)]=_0x1c9741);}}}}export function updateSegmentRefsInSegments(_0x1b7303,_0x3fe9ce){const _0x2570d5=a133_0xdabb;for(const _0xb2d1bf of Object[_0x2570d5(0xd8)](_0x1b7303)){_0xb2d1bf[_0x2570d5(0xdd)]&&updateSegmentRefsInRule(_0xb2d1bf[_0x2570d5(0xdd)],_0x3fe9ce);}}function updateSegmentRefsInRule(_0x4e6522,_0x8bc35a){const _0x543328=a133_0xdabb;if(_0x4e6522===null||typeof _0x4e6522!=='object')return;if(Array['isArray'](_0x4e6522)){for(const _0x2e39e9 of _0x4e6522){updateSegmentRefsInRule(_0x2e39e9,_0x8bc35a);}return;}const _0x3114c6=_0x4e6522;if((_0x3114c6['type']===_0x543328(0xb4)||_0x3114c6['type']==='exclude')&&typeof _0x3114c6[_0x543328(0xaf)]===_0x543328(0xa8)){const _0x4c548d=_0x8bc35a['get'](_0x3114c6[_0x543328(0xaf)]);_0x4c548d&&(_0x3114c6[_0x543328(0xaf)]=_0x4c548d);}if(_0x3114c6['conditions']&&Array[_0x543328(0xbe)](_0x3114c6['conditions']))for(const _0x16d807 of _0x3114c6[_0x543328(0xcf)]){updateSegmentRefsInRule(_0x16d807,_0x8bc35a);}}export function buildJourneysArray(_0x54ed67,_0x131981){return _0x54ed67['map'](_0x4eb171=>{const _0x30f08a=a133_0xdabb,_0x4805ae=_0x131981?_0x4eb171[_0x30f08a(0xe5)]['id']===_0x131981:_0x54ed67[_0x30f08a(0xd7)]===0x1,_0x35217b=_0x4eb171['yaml']['journeys']?.[0x0],_0x1463ce=_0x35217b?.['goal']||_0x4eb171['yaml'][_0x30f08a(0xd0)],_0x1eb5ca={'version':_0x35217b?.['version']||_0x4eb171[_0x30f08a(0xcd)][_0x30f08a(0xd4)]||_0x4eb171['item'][_0x30f08a(0xe8)],'state':_0x4eb171[_0x30f08a(0xe5)]['state']===_0x30f08a(0xca)?_0x30f08a(0xca):_0x30f08a(0xd5),'stages':_0x35217b?.[_0x30f08a(0xb3)]||_0x4eb171[_0x30f08a(0xcd)][_0x30f08a(0xb3)]||[],'id':_0x35217b?.['id']||_0x4eb171[_0x30f08a(0xcd)]['id'],'version_number':_0x35217b?.[_0x30f08a(0xc2)]||_0x4eb171[_0x30f08a(0xcd)][_0x30f08a(0xc2)]};return _0x1463ce&&(_0x1eb5ca[_0x30f08a(0xd0)]=_0x1463ce),_0x4805ae&&(_0x1eb5ca['latest']=!![]),_0x1eb5ca;});}export function buildMergedJourneyDef(_0xdeb8c2,_0x17b539,_0x221ec4){const _0x2bb994=a133_0xdabb,_0x11e479=_0xdeb8c2[0x0]['yaml'],_0x927dc9=buildJourneysArray(_0xdeb8c2,_0x221ec4),{merged:_0x4dcd56,nameMapping:_0x367fae}=consolidateSegmentsByContent(_0xdeb8c2[_0x2bb994(0xb9)](_0x11d9c0=>_0x11d9c0['yaml'][_0x2bb994(0xed)]),_0x17b539);updateSegmentRefsInSegments(_0x4dcd56,_0x367fae);const _0x233cf8=Array['from'](_0x367fae[_0x2bb994(0xc7)]())[_0x2bb994(0xdb)](([_0x5233d3,_0x61155f])=>_0x5233d3!==_0x61155f&&_0x5233d3['startsWith'](_0x2bb994(0xc3)));let _0x2100b9=_0x4dcd56,_0x4d7881=new Map();if(_0x233cf8){const _0x18a726=consolidateSegmentsByContent([_0x4dcd56],_0x17b539);_0x2100b9=_0x18a726[_0x2bb994(0xbb)],_0x4d7881=_0x18a726[_0x2bb994(0xa9)];}const _0x5179b7=new Map(_0x367fae);for(const [_0x179381,_0x1aba51]of _0x4d7881[_0x2bb994(0xc7)]()){_0x5179b7[_0x2bb994(0xe7)](_0x179381,_0x1aba51);}for(const [_0x3f42f2,_0x5522c4]of _0x5179b7[_0x2bb994(0xc7)]()){let _0x24ae9c=_0x5522c4,_0x7b3726=0x0;while(_0x5179b7['has'](_0x24ae9c)&&_0x5179b7[_0x2bb994(0xec)](_0x24ae9c)!==_0x24ae9c&&_0x7b3726<MAX_MAPPING_CHAIN_DEPTH){_0x24ae9c=_0x5179b7[_0x2bb994(0xec)](_0x24ae9c),_0x7b3726++;}_0x24ae9c!==_0x5522c4&&_0x5179b7[_0x2bb994(0xe7)](_0x3f42f2,_0x24ae9c);}for(const _0x3adbc7 of _0x927dc9){updateSegmentReferences(_0x3adbc7[_0x2bb994(0xb3)],_0x5179b7);}const {merged:_0x5426ff,nameMapping:_0xd73058}=consolidateActivationsByContent(_0xdeb8c2['map'](_0xe1891f=>_0xe1891f[_0x2bb994(0xcd)][_0x2bb994(0xac)]));for(const _0x197828 of _0x927dc9){updateActivationReferences(_0x197828['stages'],_0xd73058);}let _0x5aafd6=_0x11e479[_0x2bb994(0xd0)];if(_0x5aafd6?.[_0x2bb994(0xaf)]){const _0x4d5697=_0x5179b7[_0x2bb994(0xec)](_0x5aafd6[_0x2bb994(0xaf)]);_0x4d5697&&(_0x5aafd6={..._0x5aafd6,'segment':_0x4d5697});}for(const _0x5b44dd of _0x927dc9){if(_0x5b44dd[_0x2bb994(0xd0)]?.[_0x2bb994(0xaf)]){const _0x5ecbeb=_0x5179b7[_0x2bb994(0xec)](_0x5b44dd[_0x2bb994(0xd0)]['segment']);_0x5ecbeb&&(_0x5b44dd['goal']={..._0x5b44dd[_0x2bb994(0xd0)],'segment':_0x5ecbeb});}}return _0x927dc9['some'](_0x4999c9=>_0x4999c9[_0x2bb994(0xd0)])&&(_0x5aafd6=undefined),{'type':'journey','name':_0x11e479[_0x2bb994(0xe8)],'description':_0x11e479[_0x2bb994(0xbc)],'goal':_0x5aafd6,'reentry':_0x11e479['reentry'],'segments':Object['keys'](_0x2100b9)[_0x2bb994(0xd7)]>0x0?_0x2100b9:undefined,'activations':Object[_0x2bb994(0xaa)](_0x5426ff)['length']>0x0?_0x5426ff:undefined,'journeys':_0x927dc9,'bundle_id':_0x11e479[_0x2bb994(0xc9)],'bundle_name':_0x11e479[_0x2bb994(0xef)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x5e38e5,_0x2ab54b,_0x48d14d,_0x16c564){const _0x3e914b=a133_0xdabb,_0x5ae3ba=_0x5e38e5+':'+_0x2ab54b,_0x58de53=_0x48d14d[_0x3e914b(0xec)](_0x5ae3ba);if(_0x58de53)return _0x58de53;const _0x3f8ee9=await _0x16c564(_0x5e38e5),_0x5a6620=_0x3f8ee9['attributes'][_0x3e914b(0xc8)]||_0x3f8ee9['attributes'][_0x3e914b(0xe8)],_0x43ee6c=_0x3f8ee9[_0x3e914b(0xe6)][_0x3e914b(0xf0)]['find'](_0x3df05b=>String(_0x3df05b['id'])===String(_0x2ab54b)),_0x5cdbe4=_0x43ee6c?.['name']||_0x2ab54b,_0x47b34c={'journeyName':_0x5a6620,'stageName':_0x5cdbe4};return _0x48d14d['set'](_0x5ae3ba,_0x47b34c),_0x47b34c;}export function formatApiJourneyName(_0x9e8c94,_0x46dc5f){return _0x46dc5f+'\x20('+_0x9e8c94+')';}export function isLocalJourneyRef(_0x5db4ad){const _0x28dac2=a133_0xdabb;return _0x5db4ad[_0x28dac2(0xc0)](_0x28dac2(0xab))||_0x5db4ad['endsWith'](_0x28dac2(0xb6));}export function buildLocalRuleToNameMapping(_0x30a786){const _0x30075d=a133_0xdabb,_0x4179e7=new Map();if(!_0x30a786)return _0x4179e7;for(const [_0x3cde30,_0x5e28c5]of Object['entries'](_0x30a786)){if(_0x5e28c5[_0x30075d(0xdd)]){const _0x123de1=serializeRule(_0x5e28c5[_0x30075d(0xdd)]),_0x3de92a=_0x4179e7['get'](_0x123de1)||[];_0x3de92a[_0x30075d(0xe2)](_0x3cde30),_0x4179e7[_0x30075d(0xe7)](_0x123de1,_0x3de92a);}}return _0x4179e7;}export function buildLocalRuleToNameMappingFromJourney(_0x5d459e){const _0x58180b=a133_0xdabb,_0x19a74e=_0x5d459e[_0x58180b(0xed)];if(!_0x19a74e)return new Map();const _0x1021f8=collectSegmentUsageCounts(_0x5d459e),_0x3b1d32=new Map();let _0x537f4b=0x0;for(const [_0x43c8d0,_0x55bb22]of Object[_0x58180b(0xc7)](_0x19a74e)){if(!_0x55bb22['rule']){_0x537f4b++;continue;}const _0x4739bd=serializeRule(_0x55bb22[_0x58180b(0xdd)]),_0x3b0096=_0x3b1d32['get'](_0x4739bd)||[];_0x3b0096['push']({'name':_0x43c8d0,'index':_0x537f4b}),_0x3b1d32[_0x58180b(0xe7)](_0x4739bd,_0x3b0096),_0x537f4b++;}const _0x396c0d=new Map();for(const [_0x251115,_0x56ae7c]of _0x3b1d32){const _0x1c98b8=_0x56ae7c['slice']()[_0x58180b(0xb8)]((_0x233617,_0x543eec)=>{const _0x531993=_0x58180b,_0x6fefbc=_0x1021f8['get'](_0x233617[_0x531993(0xe8)])||0x0,_0x3ab15c=_0x1021f8[_0x531993(0xec)](_0x543eec['name'])||0x0;if(_0x6fefbc!==_0x3ab15c)return _0x3ab15c-_0x6fefbc;return _0x233617['index']-_0x543eec['index'];})[_0x58180b(0xb9)](_0x360fc9=>_0x360fc9[_0x58180b(0xe8)]);_0x396c0d[_0x58180b(0xe7)](_0x251115,_0x1c98b8);}return _0x396c0d;}export function collectSegmentUsageCounts(_0x4c96df){const _0x472238=a133_0xdabb,_0x3f4e7b=new Map(),_0x50cbb0=_0x55327d=>{const _0x1756e0=a133_0xdabb;if(!_0x55327d)return;_0x3f4e7b[_0x1756e0(0xe7)](_0x55327d,(_0x3f4e7b[_0x1756e0(0xec)](_0x55327d)||0x0)+0x1);},_0x472081=_0x41cd67=>{const _0x4a23c8=a133_0xdabb;for(const _0x36d9cf of _0x41cd67){_0x50cbb0(_0x36d9cf[_0x4a23c8(0xc3)]?.['segment']);if(_0x36d9cf[_0x4a23c8(0xd2)])for(const _0x4b02b7 of _0x36d9cf[_0x4a23c8(0xd2)]){_0x50cbb0(_0x4b02b7[_0x4a23c8(0xaf)]);}_0x50cbb0(_0x36d9cf[_0x4a23c8(0xcb)]?.['segment']);if(_0x36d9cf[_0x4a23c8(0xb5)])for(const _0x2d89bd of _0x36d9cf[_0x4a23c8(0xb5)]){if(_0x2d89bd[_0x4a23c8(0xc1)]===_0x4a23c8(0xce))for(const _0x589d59 of _0x2d89bd[_0x4a23c8(0xb2)][_0x4a23c8(0xde)]){_0x50cbb0(_0x589d59[_0x4a23c8(0xaf)]);}else _0x2d89bd[_0x4a23c8(0xc1)]===_0x4a23c8(0xc4)&&_0x50cbb0(_0x2d89bd['with'][_0x4a23c8(0xeb)]?.[_0x4a23c8(0xaf)]);}}};_0x50cbb0(_0x4c96df[_0x472238(0xd0)]?.[_0x472238(0xaf)]);if(_0x4c96df[_0x472238(0xad)])for(const _0x2c52d2 of _0x4c96df['journeys']){_0x50cbb0(_0x2c52d2[_0x472238(0xd0)]?.[_0x472238(0xaf)]),_0x472081(_0x2c52d2[_0x472238(0xb3)]);}_0x4c96df['stages']&&_0x472081(_0x4c96df['stages']);if(_0x4c96df['versions'])for(const _0x8f28e8 of _0x4c96df[_0x472238(0xd6)]){_0x472081(_0x8f28e8[_0x472238(0xb3)]);}return _0x3f4e7b;}
|
|
1
|
+
(function(_0x2c04a9,_0x33abd9){const _0x5652a1=a133_0x3fe2,_0x1ae00f=_0x2c04a9();while(!![]){try{const _0x2d9bbf=-parseInt(_0x5652a1(0x187))/0x1+-parseInt(_0x5652a1(0x182))/0x2*(parseInt(_0x5652a1(0x16a))/0x3)+-parseInt(_0x5652a1(0x179))/0x4+parseInt(_0x5652a1(0x1b1))/0x5+-parseInt(_0x5652a1(0x195))/0x6*(parseInt(_0x5652a1(0x174))/0x7)+parseInt(_0x5652a1(0x19f))/0x8*(-parseInt(_0x5652a1(0x1a4))/0x9)+parseInt(_0x5652a1(0x1b8))/0xa;if(_0x2d9bbf===_0x33abd9)break;else _0x1ae00f['push'](_0x1ae00f['shift']());}catch(_0x37dc96){_0x1ae00f['push'](_0x1ae00f['shift']());}}}(a133_0x5ee3,0x6e9fa));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x490059){const _0x52e82e=a133_0x3fe2;return _0x490059['toLowerCase']()[_0x52e82e(0x18c)](/\s+/g,'_')[_0x52e82e(0x18c)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x52e82e(0x18c)](/_+/g,'_')[_0x52e82e(0x18c)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x13de5f){const _0x5527cb=a133_0x3fe2,_0x3224a7=_0x13de5f[_0x5527cb(0x193)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x3224a7){const _0x47385a=_0x3224a7[0x1][_0x5527cb(0x177)](),_0xfb351d=_0x3224a7[0x2],_0x57a5aa=_0xfb351d[_0x5527cb(0x18c)](/-/g,'')[_0x5527cb(0x18a)](0x0,0x4)[_0x5527cb(0x177)]();return _0x47385a+'_'+_0x57a5aa;}const _0x5f10d0=_0x13de5f[_0x5527cb(0x193)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x5f10d0){const _0x75215=_0x5f10d0[0x1],_0x522623=_0x5f10d0[0x2][_0x5527cb(0x177)](),_0x554887=_0x75215[_0x5527cb(0x18c)](/-/g,'')['slice'](0x0,0x4)[_0x5527cb(0x177)]();return _0x522623+'_'+_0x554887;}return undefined;}function stableStringify(_0x35e882){const _0x56396e=a133_0x3fe2;if(Array[_0x56396e(0x183)](_0x35e882))return'['+_0x35e882[_0x56396e(0x1a3)](_0x5b5426=>stableStringify(_0x5b5426))['join'](',')+']';if(_0x35e882&&typeof _0x35e882==='object'){const _0x33df85=_0x35e882,_0x492046=Object[_0x56396e(0x1b9)](_0x33df85)[_0x56396e(0x175)](),_0x3609fb=_0x492046[_0x56396e(0x1a3)](_0x394048=>'\x22'+_0x394048+'\x22:'+stableStringify(_0x33df85[_0x394048]));return'{'+_0x3609fb['join'](',')+'}';}const _0x58dac6=JSON[_0x56396e(0x18b)](_0x35e882);return _0x58dac6===undefined?'null':_0x58dac6;}export function consolidateActivationsByContent(_0x230fb7){const _0x225b1f=a133_0x3fe2,_0x569757={},_0x2e0db4=new Map(),_0x5c1702=new Map();for(const _0x596157 of _0x230fb7){if(!_0x596157)continue;for(const [_0x3c16b3,_0x50d33f]of Object[_0x225b1f(0x17a)](_0x596157)){const _0x15d016={'name':_0x50d33f[_0x225b1f(0x173)],'connection':_0x50d33f[_0x225b1f(0x169)],..._0x50d33f[_0x225b1f(0x16b)]!==undefined&&{'all_columns':_0x50d33f[_0x225b1f(0x16b)]},..._0x50d33f[_0x225b1f(0x1aa)]!==undefined&&{'columns':_0x50d33f['columns']},..._0x50d33f[_0x225b1f(0x17e)]!==undefined&&{'behavior':_0x50d33f['behavior']},..._0x50d33f[_0x225b1f(0x1ad)]!==undefined&&{'schedule':_0x50d33f[_0x225b1f(0x1ad)]},..._0x50d33f[_0x225b1f(0x194)]!==undefined&&{'notification':_0x50d33f[_0x225b1f(0x194)]},..._0x50d33f[_0x225b1f(0x17b)]!==undefined&&{'connector_config':_0x50d33f['connector_config']},..._0x50d33f[_0x225b1f(0x1a6)]!==undefined&&{'activation_template_id':_0x50d33f[_0x225b1f(0x1a6)]}},_0x5873a7=stableStringify(_0x15d016),_0x3ee72a=_0x5c1702['get'](_0x5873a7);_0x3ee72a?_0x2e0db4[_0x225b1f(0x1b6)](_0x3c16b3,_0x3ee72a):(_0x569757[_0x3c16b3]=_0x50d33f,_0x2e0db4[_0x225b1f(0x1b6)](_0x3c16b3,_0x3c16b3),_0x5c1702[_0x225b1f(0x1b6)](_0x5873a7,_0x3c16b3));}}return{'merged':_0x569757,'nameMapping':_0x2e0db4};}export function updateActivationReferences(_0x26353d,_0x1d8c91){const _0x4902d9=a133_0x3fe2;if(!_0x26353d)return;for(const _0x3da9bd of _0x26353d){if(!_0x3da9bd[_0x4902d9(0x16c)])continue;for(const _0x4574e5 of _0x3da9bd[_0x4902d9(0x16c)]){if(_0x4574e5[_0x4902d9(0x1b4)]==='activation'&&_0x4574e5[_0x4902d9(0x16f)]?.[_0x4902d9(0x1a9)]){const _0xef7a6=_0x1d8c91[_0x4902d9(0x196)](_0x4574e5[_0x4902d9(0x16f)][_0x4902d9(0x1a9)]);_0xef7a6&&_0xef7a6!==_0x4574e5[_0x4902d9(0x16f)][_0x4902d9(0x1a9)]&&(_0x4574e5['with'][_0x4902d9(0x1a9)]=_0xef7a6);}}}}export function consolidateSegmentsByContent(_0x1d12d7,_0x4e2ec5){const _0x5e3419=a133_0x3fe2,_0x2a342c={},_0x43e3be=new Map(),_0x5dd179=new Map();for(const _0x8ff40f of _0x1d12d7){if(!_0x8ff40f)continue;for(const [_0xb2e61a,_0xf72f3b]of Object['entries'](_0x8ff40f)){if(!_0xf72f3b[_0x5e3419(0x18e)]){_0x2a342c[_0xb2e61a]=_0xf72f3b,_0x43e3be['set'](_0xb2e61a,_0xb2e61a);continue;}const _0x33aed0=_0xf72f3b[_0x5e3419(0x1ac)]&&_0xf72f3b['description'][_0x5e3419(0x19a)]()?_0xf72f3b[_0x5e3419(0x1ac)]:undefined,_0x5c316d=JSON[_0x5e3419(0x18b)]({'description':_0x33aed0,'rule':deepSortObject(_0xf72f3b[_0x5e3419(0x18e)])}),_0x1eb6b3=_0x5dd179[_0x5e3419(0x196)](_0x5c316d);if(_0x1eb6b3){const _0x5d582d={..._0xf72f3b[_0x5e3419(0x1ac)]!==undefined&&{'description':_0xf72f3b['description']},'rule':_0xf72f3b[_0x5e3419(0x18e)]?deepSortObject(_0xf72f3b[_0x5e3419(0x18e)]):_0xf72f3b['rule']};if(_0xb2e61a<_0x1eb6b3){_0x2a342c[_0xb2e61a]=_0x5d582d,delete _0x2a342c[_0x1eb6b3];for(const [_0x53ee8c,_0x57c789]of _0x43e3be[_0x5e3419(0x17a)]()){_0x57c789===_0x1eb6b3&&_0x43e3be[_0x5e3419(0x1b6)](_0x53ee8c,_0xb2e61a);}_0x43e3be[_0x5e3419(0x1b6)](_0xb2e61a,_0xb2e61a),_0x5dd179[_0x5e3419(0x1b6)](_0x5c316d,_0xb2e61a);}else _0x2a342c[_0x1eb6b3]=_0x5d582d,_0x43e3be[_0x5e3419(0x1b6)](_0xb2e61a,_0x1eb6b3);}else{let _0x4a4b99=_0xb2e61a;if(_0x4e2ec5){const _0x30035d=_0x4e2ec5[_0x5e3419(0x196)](_0x5c316d);_0x30035d&&_0x30035d[_0x5e3419(0x17f)]>0x0&&(_0x4a4b99=_0x30035d['slice']()[_0x5e3419(0x175)]()[0x0]);}const _0xf254f3={..._0xf72f3b['description']!==undefined&&{'description':_0xf72f3b['description']},'rule':_0xf72f3b[_0x5e3419(0x18e)]?deepSortObject(_0xf72f3b[_0x5e3419(0x18e)]):_0xf72f3b[_0x5e3419(0x18e)]};_0x2a342c[_0x4a4b99]=_0xf254f3,_0x43e3be[_0x5e3419(0x1b6)](_0xb2e61a,_0x4a4b99),_0x5dd179[_0x5e3419(0x1b6)](_0x5c316d,_0x4a4b99);}}}return{'merged':_0x2a342c,'nameMapping':_0x43e3be};}export function updateSegmentReferences(_0x21887b,_0x10d5e7){const _0x69bfb1=a133_0x3fe2;if(!_0x21887b)return;for(const _0x30e427 of _0x21887b){if(_0x30e427[_0x69bfb1(0x189)]?.[_0x69bfb1(0x19d)]){const _0x199ce7=_0x10d5e7['get'](_0x30e427[_0x69bfb1(0x189)][_0x69bfb1(0x19d)]);_0x199ce7&&(_0x30e427[_0x69bfb1(0x189)]['segment']=_0x199ce7);}if(_0x30e427[_0x69bfb1(0x170)])for(const _0xa8e36b of _0x30e427['exit_criteria']){if(_0xa8e36b[_0x69bfb1(0x19d)]){const _0x26272f=_0x10d5e7['get'](_0xa8e36b['segment']);_0x26272f&&(_0xa8e36b['segment']=_0x26272f);}}if(_0x30e427[_0x69bfb1(0x190)]?.[_0x69bfb1(0x19d)]){const _0x4751d6=_0x10d5e7[_0x69bfb1(0x196)](_0x30e427[_0x69bfb1(0x190)][_0x69bfb1(0x19d)]);_0x4751d6&&(_0x30e427[_0x69bfb1(0x190)][_0x69bfb1(0x19d)]=_0x4751d6);}if(_0x30e427[_0x69bfb1(0x16c)])for(const _0x46d879 of _0x30e427[_0x69bfb1(0x16c)]){if(_0x46d879[_0x69bfb1(0x1b4)]===_0x69bfb1(0x16d)&&_0x46d879[_0x69bfb1(0x16f)]?.[_0x69bfb1(0x1af)])for(const _0x2c4680 of _0x46d879['with'][_0x69bfb1(0x1af)]){if(_0x2c4680[_0x69bfb1(0x19d)]){const _0x581a5d=_0x10d5e7[_0x69bfb1(0x196)](_0x2c4680[_0x69bfb1(0x19d)]);_0x581a5d&&(_0x2c4680[_0x69bfb1(0x19d)]=_0x581a5d);}}if(_0x46d879[_0x69bfb1(0x1b4)]==='wait'&&_0x46d879[_0x69bfb1(0x16f)]?.[_0x69bfb1(0x191)]?.[_0x69bfb1(0x19d)]){const _0x2be65d=_0x10d5e7[_0x69bfb1(0x196)](_0x46d879[_0x69bfb1(0x16f)][_0x69bfb1(0x191)][_0x69bfb1(0x19d)]);_0x2be65d&&(_0x46d879[_0x69bfb1(0x16f)]['condition']['segment']=_0x2be65d);}}}}function a133_0x3fe2(_0x4400c4,_0x1e32d3){_0x4400c4=_0x4400c4-0x169;const _0x5ee326=a133_0x5ee3();let _0x3fe27f=_0x5ee326[_0x4400c4];return _0x3fe27f;}export function updateSegmentRefsInSegments(_0x597232,_0x4bce7e){const _0x271da4=a133_0x3fe2;for(const _0x2b63d4 of Object[_0x271da4(0x1b0)](_0x597232)){_0x2b63d4[_0x271da4(0x18e)]&&updateSegmentRefsInRule(_0x2b63d4[_0x271da4(0x18e)],_0x4bce7e);}}function updateSegmentRefsInRule(_0x47dcf2,_0x43846d){const _0x54163e=a133_0x3fe2;if(_0x47dcf2===null||typeof _0x47dcf2!==_0x54163e(0x172))return;if(Array[_0x54163e(0x183)](_0x47dcf2)){for(const _0x100ae9 of _0x47dcf2){updateSegmentRefsInRule(_0x100ae9,_0x43846d);}return;}const _0x4978f0=_0x47dcf2;if((_0x4978f0[_0x54163e(0x1b4)]===_0x54163e(0x197)||_0x4978f0[_0x54163e(0x1b4)]==='exclude')&&typeof _0x4978f0[_0x54163e(0x19d)]===_0x54163e(0x1a2)){const _0x3a4036=_0x43846d[_0x54163e(0x196)](_0x4978f0[_0x54163e(0x19d)]);_0x3a4036&&(_0x4978f0[_0x54163e(0x19d)]=_0x3a4036);}if(_0x4978f0[_0x54163e(0x1b5)]&&Array[_0x54163e(0x183)](_0x4978f0[_0x54163e(0x1b5)]))for(const _0x50d8a7 of _0x4978f0['conditions']){updateSegmentRefsInRule(_0x50d8a7,_0x43846d);}}export function buildJourneysArray(_0xf9d059,_0x49f12b){const _0x4a7e6f=a133_0x3fe2;return _0xf9d059[_0x4a7e6f(0x1a3)](_0x1de37f=>{const _0x52bc53=_0x4a7e6f,_0x210c0b=_0x49f12b?_0x1de37f[_0x52bc53(0x1a8)]['id']===_0x49f12b:_0xf9d059[_0x52bc53(0x17f)]===0x1,_0x4a2882=_0x1de37f[_0x52bc53(0x199)][_0x52bc53(0x185)]?.[0x0],_0x2e2d16=_0x4a2882?.[_0x52bc53(0x1a1)]||_0x1de37f[_0x52bc53(0x199)][_0x52bc53(0x1a1)],_0x4ca6c3={'version':_0x4a2882?.['version']||_0x1de37f[_0x52bc53(0x199)][_0x52bc53(0x1b7)]||_0x1de37f[_0x52bc53(0x1a8)]['name'],'state':_0x1de37f['item']['state']===_0x52bc53(0x1ab)?'launched':_0x52bc53(0x1ae),'stages':_0x4a2882?.[_0x52bc53(0x1a7)]||_0x1de37f['yaml'][_0x52bc53(0x1a7)]||[],'id':_0x4a2882?.['id']||_0x1de37f[_0x52bc53(0x199)]['id'],'version_number':_0x4a2882?.['version_number']||_0x1de37f[_0x52bc53(0x199)][_0x52bc53(0x19e)]};return _0x2e2d16&&(_0x4ca6c3[_0x52bc53(0x1a1)]=_0x2e2d16),_0x210c0b&&(_0x4ca6c3[_0x52bc53(0x178)]=!![]),_0x4ca6c3;});}export function buildMergedJourneyDef(_0x242229,_0x3c8f1c,_0x115234){const _0x307e7c=a133_0x3fe2,_0x276018=_0x242229[0x0][_0x307e7c(0x199)],_0x33ac74=buildJourneysArray(_0x242229,_0x115234),{merged:_0xb1a82f,nameMapping:_0x29e808}=consolidateSegmentsByContent(_0x242229['map'](_0x340014=>_0x340014['yaml'][_0x307e7c(0x180)]),_0x3c8f1c);updateSegmentRefsInSegments(_0xb1a82f,_0x29e808);const _0x4b828e=Array['from'](_0x29e808[_0x307e7c(0x17a)]())[_0x307e7c(0x17c)](([_0x1003d4,_0x30dbbc])=>_0x1003d4!==_0x30dbbc&&_0x1003d4[_0x307e7c(0x19c)](_0x307e7c(0x189)));let _0x274763=_0xb1a82f,_0x3dca38=new Map();if(_0x4b828e){const _0x114039=consolidateSegmentsByContent([_0xb1a82f],_0x3c8f1c);_0x274763=_0x114039[_0x307e7c(0x186)],_0x3dca38=_0x114039[_0x307e7c(0x192)];}const _0x4a0b5d=new Map(_0x29e808);for(const [_0x15e11c,_0x18c0a6]of _0x3dca38['entries']()){_0x4a0b5d[_0x307e7c(0x1b6)](_0x15e11c,_0x18c0a6);}for(const [_0x545b2c,_0x362b76]of _0x4a0b5d['entries']()){let _0x255605=_0x362b76,_0x1acbd4=0x0;while(_0x4a0b5d[_0x307e7c(0x1b2)](_0x255605)&&_0x4a0b5d[_0x307e7c(0x196)](_0x255605)!==_0x255605&&_0x1acbd4<MAX_MAPPING_CHAIN_DEPTH){_0x255605=_0x4a0b5d[_0x307e7c(0x196)](_0x255605),_0x1acbd4++;}_0x255605!==_0x362b76&&_0x4a0b5d['set'](_0x545b2c,_0x255605);}for(const _0x4a76c1 of _0x33ac74){updateSegmentReferences(_0x4a76c1['stages'],_0x4a0b5d);}const {merged:_0x4e03b2,nameMapping:_0x2b51bd}=consolidateActivationsByContent(_0x242229[_0x307e7c(0x1a3)](_0x58c4bd=>_0x58c4bd['yaml'][_0x307e7c(0x181)]));for(const _0x224421 of _0x33ac74){updateActivationReferences(_0x224421[_0x307e7c(0x1a7)],_0x2b51bd);}let _0x1e4817=_0x276018[_0x307e7c(0x1a1)];if(_0x1e4817?.[_0x307e7c(0x19d)]){const _0x3132f0=_0x4a0b5d[_0x307e7c(0x196)](_0x1e4817[_0x307e7c(0x19d)]);_0x3132f0&&(_0x1e4817={..._0x1e4817,'segment':_0x3132f0});}for(const _0x56572b of _0x33ac74){if(_0x56572b[_0x307e7c(0x1a1)]?.[_0x307e7c(0x19d)]){const _0x5e12b6=_0x4a0b5d[_0x307e7c(0x196)](_0x56572b[_0x307e7c(0x1a1)][_0x307e7c(0x19d)]);_0x5e12b6&&(_0x56572b[_0x307e7c(0x1a1)]={..._0x56572b[_0x307e7c(0x1a1)],'segment':_0x5e12b6});}}return _0x33ac74[_0x307e7c(0x17c)](_0x5ac6c3=>_0x5ac6c3[_0x307e7c(0x1a1)])&&(_0x1e4817=undefined),{'type':_0x307e7c(0x1b3),'name':_0x276018['name'],'description':_0x276018[_0x307e7c(0x1ac)],'goal':_0x1e4817,'reentry':_0x276018[_0x307e7c(0x18f)],'segments':Object['keys'](_0x274763)[_0x307e7c(0x17f)]>0x0?_0x274763:undefined,'activations':Object[_0x307e7c(0x1b9)](_0x4e03b2)[_0x307e7c(0x17f)]>0x0?_0x4e03b2:undefined,'journeys':_0x33ac74,'bundle_id':_0x276018[_0x307e7c(0x1a0)],'bundle_name':_0x276018[_0x307e7c(0x171)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x5aae0a,_0x88631b,_0x129a17,_0x58ef10){const _0x14fe4b=a133_0x3fe2,_0x20efb2=_0x5aae0a+':'+_0x88631b,_0x5a30ac=_0x129a17[_0x14fe4b(0x196)](_0x20efb2);if(_0x5a30ac)return _0x5a30ac;const _0x13244a=await _0x58ef10(_0x5aae0a),_0x5a4368=_0x13244a['attributes']['journeyBundleName']||_0x13244a[_0x14fe4b(0x19b)][_0x14fe4b(0x173)],_0x56faca=_0x13244a[_0x14fe4b(0x19b)][_0x14fe4b(0x198)][_0x14fe4b(0x1a5)](_0x15dde4=>String(_0x15dde4['id'])===String(_0x88631b)),_0x16e51f=_0x56faca?.[_0x14fe4b(0x173)]||_0x88631b,_0x24caa1={'journeyName':_0x5a4368,'stageName':_0x16e51f};return _0x129a17['set'](_0x20efb2,_0x24caa1),_0x24caa1;}export function formatApiJourneyName(_0x4cb098,_0x3a0001){return _0x3a0001+'\x20('+_0x4cb098+')';}function a133_0x5ee3(){const _0x140105=['stages','item','activation','columns','launched','description','schedule','draft','branches','values','3637805NnQTIp','has','journey','type','conditions','set','version','25168730YIgcUc','keys','connection','644430IVEzCX','all_columns','steps','decision_point','push','with','exit_criteria','bundle_name','object','name','2118669MpALFt','sort','endsWith','toLowerCase','latest','2876608BymZfs','entries','connector_config','some','wait','behavior','length','segments','activations','4hRpKZK','isArray','.yaml','journeys','merged','491252bgdgxY','index','entry_criteria','slice','stringify','replace','versions','rule','reentry','milestone','condition','nameMapping','match','notification','6HBEast','get','include','journeyStages','yaml','trim','attributes','startsWith','segment','version_number','6789032apbsEb','bundle_id','goal','string','map','9BeLvHl','find','activation_template_id'];a133_0x5ee3=function(){return _0x140105;};return a133_0x5ee3();}export function isLocalJourneyRef(_0x291bd0){const _0x574dbc=a133_0x3fe2;return _0x291bd0[_0x574dbc(0x176)]('.yml')||_0x291bd0[_0x574dbc(0x176)](_0x574dbc(0x184));}export function buildLocalRuleToNameMapping(_0x30f9b1){const _0x2c9e59=a133_0x3fe2,_0xd4da95=new Map();if(!_0x30f9b1)return _0xd4da95;for(const [_0x784223,_0x54eb48]of Object[_0x2c9e59(0x17a)](_0x30f9b1)){if(_0x54eb48[_0x2c9e59(0x18e)]){const _0x105245=serializeRule(_0x54eb48[_0x2c9e59(0x18e)]),_0x2de41f=_0xd4da95[_0x2c9e59(0x196)](_0x105245)||[];_0x2de41f[_0x2c9e59(0x16e)](_0x784223),_0xd4da95['set'](_0x105245,_0x2de41f);}}return _0xd4da95;}export function buildLocalRuleToNameMappingFromJourney(_0x3b70f0){const _0x1b4ded=a133_0x3fe2,_0x541e80=_0x3b70f0[_0x1b4ded(0x180)];if(!_0x541e80)return new Map();const _0x32c1af=collectSegmentUsageCounts(_0x3b70f0),_0x2a7411=new Map();let _0xb08e98=0x0;for(const [_0x53677d,_0x3659f5]of Object[_0x1b4ded(0x17a)](_0x541e80)){if(!_0x3659f5[_0x1b4ded(0x18e)]){_0xb08e98++;continue;}const _0x1f20d0=serializeRule(_0x3659f5[_0x1b4ded(0x18e)]),_0x74ccf9=_0x2a7411[_0x1b4ded(0x196)](_0x1f20d0)||[];_0x74ccf9[_0x1b4ded(0x16e)]({'name':_0x53677d,'index':_0xb08e98}),_0x2a7411[_0x1b4ded(0x1b6)](_0x1f20d0,_0x74ccf9),_0xb08e98++;}const _0x1e8b1b=new Map();for(const [_0x4fa09f,_0x311d16]of _0x2a7411){const _0x5d12d4=_0x311d16['slice']()[_0x1b4ded(0x175)]((_0x56f772,_0x85aa8a)=>{const _0x3f9792=_0x1b4ded,_0x47fcb7=_0x32c1af[_0x3f9792(0x196)](_0x56f772[_0x3f9792(0x173)])||0x0,_0x2463d8=_0x32c1af[_0x3f9792(0x196)](_0x85aa8a[_0x3f9792(0x173)])||0x0;if(_0x47fcb7!==_0x2463d8)return _0x2463d8-_0x47fcb7;return _0x56f772[_0x3f9792(0x188)]-_0x85aa8a[_0x3f9792(0x188)];})['map'](_0x19784e=>_0x19784e[_0x1b4ded(0x173)]);_0x1e8b1b[_0x1b4ded(0x1b6)](_0x4fa09f,_0x5d12d4);}return _0x1e8b1b;}export function collectSegmentUsageCounts(_0x47d2fa){const _0x1e859d=a133_0x3fe2,_0x1f4165=new Map(),_0x6a968f=_0x30e57e=>{const _0xfb8775=a133_0x3fe2;if(!_0x30e57e)return;_0x1f4165[_0xfb8775(0x1b6)](_0x30e57e,(_0x1f4165[_0xfb8775(0x196)](_0x30e57e)||0x0)+0x1);},_0x21616f=_0xe97630=>{const _0x2bb7a8=a133_0x3fe2;for(const _0x4e2dfd of _0xe97630){_0x6a968f(_0x4e2dfd[_0x2bb7a8(0x189)]?.[_0x2bb7a8(0x19d)]);if(_0x4e2dfd[_0x2bb7a8(0x170)])for(const _0x412100 of _0x4e2dfd[_0x2bb7a8(0x170)]){_0x6a968f(_0x412100[_0x2bb7a8(0x19d)]);}_0x6a968f(_0x4e2dfd[_0x2bb7a8(0x190)]?.[_0x2bb7a8(0x19d)]);if(_0x4e2dfd[_0x2bb7a8(0x16c)])for(const _0x53439d of _0x4e2dfd['steps']){if(_0x53439d[_0x2bb7a8(0x1b4)]===_0x2bb7a8(0x16d))for(const _0x1cbcd5 of _0x53439d['with'][_0x2bb7a8(0x1af)]){_0x6a968f(_0x1cbcd5[_0x2bb7a8(0x19d)]);}else _0x53439d[_0x2bb7a8(0x1b4)]===_0x2bb7a8(0x17d)&&_0x6a968f(_0x53439d['with'][_0x2bb7a8(0x191)]?.['segment']);}}};_0x6a968f(_0x47d2fa[_0x1e859d(0x1a1)]?.[_0x1e859d(0x19d)]);if(_0x47d2fa[_0x1e859d(0x185)])for(const _0x10bbb9 of _0x47d2fa[_0x1e859d(0x185)]){_0x6a968f(_0x10bbb9['goal']?.[_0x1e859d(0x19d)]),_0x21616f(_0x10bbb9['stages']);}_0x47d2fa[_0x1e859d(0x1a7)]&&_0x21616f(_0x47d2fa[_0x1e859d(0x1a7)]);if(_0x47d2fa[_0x1e859d(0x18d)])for(const _0x473a9d of _0x47d2fa[_0x1e859d(0x18d)]){_0x21616f(_0x473a9d[_0x1e859d(0x1a7)]);}return _0x1f4165;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x11c0b3,_0x1fe3be){const _0x231d34=a134_0x25f4,_0x2e9f54=_0x11c0b3();while(!![]){try{const _0x33e5dd=parseInt(_0x231d34(0x1ee))/0x1+-parseInt(_0x231d34(0x1c9))/0x2+-parseInt(_0x231d34(0x162))/0x3+-parseInt(_0x231d34(0x178))/0x4*(-parseInt(_0x231d34(0x1c1))/0x5)+-parseInt(_0x231d34(0x15e))/0x6*(parseInt(_0x231d34(0x15a))/0x7)+-parseInt(_0x231d34(0x1ad))/0x8*(-parseInt(_0x231d34(0x16d))/0x9)+parseInt(_0x231d34(0x194))/0xa;if(_0x33e5dd===_0x1fe3be)break;else _0x2e9f54['push'](_0x2e9f54['shift']());}catch(_0x4e7e03){_0x2e9f54['push'](_0x2e9f54['shift']());}}}(a134_0x2b46,0xb6a23));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5a2041,_0x20d0ec,_0x5e19e2,_0x2b17ea,_0x177167,_0x138e33){const _0x5c3f11=a134_0x25f4;return{'level':_0x5a2041,'path':_0x20d0ec,'code':_0x5e19e2,'message':_0x2b17ea,'location':getLocationFromPath(_0x177167[_0x5c3f11(0x1de)],_0x177167[_0x5c3f11(0x1da)],pathToArray(_0x138e33??_0x20d0ec))};}function validateVersionStructure(_0x26a269,_0x58083f){const _0x21dea8=a134_0x25f4,_0x1136a2=[];return _0x26a269[_0x21dea8(0x1f8)]>MAX_STAGES&&_0x1136a2[_0x21dea8(0x1b9)](createIssue('error',_0x21dea8(0x1b2),_0x21dea8(0x16f),_0x21dea8(0x1a0)+_0x26a269[_0x21dea8(0x1f8)]+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x58083f)),_0x1136a2;}function validateStageStructure(_0x4c0bd2,_0x25f40e,_0x42f3ab,_0x3322a6){const _0x38305a=a134_0x25f4,_0x2f176a=[],_0x2726f0=_0x38305a(0x1c2)+_0x25f40e+']';_0x25f40e===0x0&&!_0x4c0bd2[_0x38305a(0x1b7)]&&_0x2f176a[_0x38305a(0x1b9)](createIssue('error',_0x2726f0+_0x38305a(0x1ff),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x4c0bd2[_0x38305a(0x177)]+_0x38305a(0x1cc),_0x3322a6,_0x2726f0));const _0x564036=_0x25f40e===_0x42f3ab-0x1;!_0x564036&&!_0x4c0bd2[_0x38305a(0x211)]&&_0x2f176a[_0x38305a(0x1b9)](createIssue('error',_0x2726f0+'.milestone',_0x38305a(0x1a6),_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x3322a6,_0x2726f0));(!_0x4c0bd2[_0x38305a(0x164)]||_0x4c0bd2[_0x38305a(0x164)][_0x38305a(0x1f8)]===0x0)&&_0x2f176a[_0x38305a(0x1b9)](createIssue(_0x38305a(0x16a),_0x2726f0+_0x38305a(0x1db),'MISSING_EXIT_CRITERIA',_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+_0x38305a(0x1c0),_0x3322a6,_0x2726f0));const _0x4a015c=_0x4c0bd2[_0x38305a(0x1ab)]?.['length']??0x0;if(_0x4a015c===0x0)_0x2f176a['push'](createIssue(_0x38305a(0x1e5),_0x2726f0+'.steps',_0x38305a(0x20f),_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+'\x27\x20has\x20no\x20steps',_0x3322a6,_0x2726f0+'.steps'));else{if(_0x4a015c===0x1)_0x2f176a['push'](createIssue('warning',_0x2726f0+_0x38305a(0x190),_0x38305a(0x20f),'Stage\x20\x27'+_0x4c0bd2['name']+_0x38305a(0x1c8),_0x3322a6,_0x2726f0+_0x38305a(0x190)));else _0x4a015c<=0x3&&_0x2f176a[_0x38305a(0x1b9)](createIssue('warning',_0x2726f0+_0x38305a(0x190),_0x38305a(0x1b6),_0x38305a(0x16c)+_0x4c0bd2[_0x38305a(0x177)]+_0x38305a(0x1c6)+_0x4a015c+_0x38305a(0x175),_0x3322a6,_0x2726f0+_0x38305a(0x190)));}return _0x2f176a;}function validateStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5){const _0x16f2de=a134_0x25f4,_0x1196b9=[];if(_0x1b3129['type']===_0x16f2de(0x206))return _0x1b3129['next']&&_0x1196b9[_0x16f2de(0x1b9)](createIssue(_0x16f2de(0x1e5),_0x347aaa+'.next',_0x16f2de(0x1bc),'End\x20step\x20\x27'+_0x1b3129[_0x16f2de(0x177)]+_0x16f2de(0x193),_0x5b2f6a)),_0x16f2de(0x19d)in _0x1b3129&&_0x1b3129[_0x16f2de(0x19d)]!==undefined&&_0x1196b9['push'](createIssue(_0x16f2de(0x1e5),_0x347aaa+_0x16f2de(0x1a1),_0x16f2de(0x1bc),_0x16f2de(0x181)+_0x1b3129[_0x16f2de(0x177)]+_0x16f2de(0x1a8),_0x5b2f6a)),_0x1196b9;_0x1b3129[_0x16f2de(0x1fd)]&&(_0x5b2f6a['stepNames']&&!_0x5b2f6a[_0x16f2de(0x208)][_0x16f2de(0x18f)](_0x1b3129['next'])&&_0x1196b9[_0x16f2de(0x1b9)](createIssue('error',_0x347aaa+_0x16f2de(0x184),_0x16f2de(0x1a4),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x1b3129[_0x16f2de(0x1fd)]+'\x27',_0x5b2f6a)));switch(_0x1b3129[_0x16f2de(0x165)]){case _0x16f2de(0x17e):_0x1196b9['push'](...validateWaitStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5));break;case'activation':_0x1196b9['push'](...validateActivationStep(_0x1b3129,_0x347aaa,_0x5b2f6a));break;case'decision_point':_0x1196b9['push'](...validateDecisionPointStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5));break;case _0x16f2de(0x1c7):_0x1196b9['push'](...validateAbTestStep(_0x1b3129,_0x347aaa,_0x5b2f6a,_0x474cb5));break;case _0x16f2de(0x159):_0x1196b9[_0x16f2de(0x1b9)](...validateJumpStep(_0x1b3129,_0x347aaa,_0x5b2f6a));break;}return _0x1196b9;}function validateWaitStep(_0x1917fa,_0x2e475c,_0x463e1d,_0x3d9238){const _0x3710f8=a134_0x25f4,_0x1d9363=[];if(!_0x1917fa['with'])return _0x1d9363['push'](createIssue('error',_0x2e475c+_0x3710f8(0x1a1),_0x3710f8(0x15c),_0x3710f8(0x1b4),_0x463e1d,_0x2e475c)),_0x1d9363;if(_0x1917fa['with']['condition']){const _0x187277=_0x1917fa['with'][_0x3710f8(0x182)];if(_0x187277['segment']){_0x463e1d[_0x3710f8(0x188)]?.[_0x3710f8(0x198)](_0x187277[_0x3710f8(0x1f9)]);!_0x187277[_0x3710f8(0x1f9)][_0x3710f8(0x201)](_0x3710f8(0x187))&&(_0x463e1d[_0x3710f8(0x153)]&&!_0x463e1d[_0x3710f8(0x153)][_0x3710f8(0x18f)](_0x187277[_0x3710f8(0x1f9)])&&_0x1d9363[_0x3710f8(0x1b9)](createIssue(_0x3710f8(0x1e5),_0x2e475c+_0x3710f8(0x19a),'MISSING_SEGMENT_REFERENCE',_0x3710f8(0x1e9)+_0x187277['segment']+_0x3710f8(0x1e0),_0x463e1d)));_0x187277[_0x3710f8(0x1fd)]&&_0x463e1d[_0x3710f8(0x208)]&&!_0x463e1d[_0x3710f8(0x208)][_0x3710f8(0x18f)](_0x187277['next'])&&_0x1d9363[_0x3710f8(0x1b9)](createIssue('error',_0x2e475c+_0x3710f8(0x1dc),_0x3710f8(0x1a4),_0x3710f8(0x166)+_0x187277[_0x3710f8(0x1fd)]+'\x27',_0x463e1d));_0x187277['timeout']?.['next']&&_0x463e1d[_0x3710f8(0x208)]&&!_0x463e1d[_0x3710f8(0x208)]['has'](_0x187277[_0x3710f8(0x1cd)][_0x3710f8(0x1fd)])&&_0x1d9363[_0x3710f8(0x1b9)](createIssue(_0x3710f8(0x1e5),_0x2e475c+_0x3710f8(0x1af),_0x3710f8(0x1a4),_0x3710f8(0x1aa)+_0x187277[_0x3710f8(0x1cd)][_0x3710f8(0x1fd)]+'\x27',_0x463e1d));const _0x57fdab=_0x187277[_0x3710f8(0x1fd)]||_0x1917fa[_0x3710f8(0x1fd)],_0x47f861=_0x187277[_0x3710f8(0x1cd)]?.[_0x3710f8(0x1fd)]||_0x1917fa[_0x3710f8(0x1fd)];if(_0x57fdab){const _0x3bd063=_0x3d9238['get'](_0x57fdab);_0x3bd063?.[_0x3710f8(0x165)]===_0x3710f8(0x1ba)&&_0x1d9363[_0x3710f8(0x1b9)](createIssue('warning',_0x2e475c+_0x3710f8(0x1dc),'BRANCH_DIRECTLY_TO_MERGE',_0x3710f8(0x157)+_0x57fdab+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x463e1d,_0x2e475c+'.with.condition'));}if(_0x47f861){const _0x55da1a=_0x3d9238[_0x3710f8(0x167)](_0x47f861);_0x55da1a?.[_0x3710f8(0x165)]===_0x3710f8(0x1ba)&&_0x1d9363[_0x3710f8(0x1b9)](createIssue(_0x3710f8(0x16a),_0x2e475c+'.with.condition.timeout.next',_0x3710f8(0x1ea),_0x3710f8(0x1ec)+_0x47f861+_0x3710f8(0x1c4),_0x463e1d,_0x2e475c+_0x3710f8(0x203)));}}}return _0x1d9363;}function validateActivationStep(_0x2d9436,_0x5320e1,_0x3af0cc){const _0x1d7f8a=a134_0x25f4,_0xfe98ed=[];if(!_0x2d9436[_0x1d7f8a(0x19d)]?.['activation'])return _0xfe98ed[_0x1d7f8a(0x1b9)](createIssue(_0x1d7f8a(0x1e5),_0x5320e1+'.with.activation',_0x1d7f8a(0x1a3),_0x1d7f8a(0x18c),_0x3af0cc,_0x5320e1)),_0xfe98ed;const _0x473f8d=_0x2d9436['with'][_0x1d7f8a(0x1e2)];return _0x3af0cc[_0x1d7f8a(0x197)]&&!_0x473f8d[_0x1d7f8a(0x201)](_0x1d7f8a(0x187))&&(!_0x3af0cc['activationKeys'][_0x1d7f8a(0x18f)](_0x473f8d)&&_0xfe98ed[_0x1d7f8a(0x1b9)](createIssue(_0x1d7f8a(0x1e5),_0x5320e1+_0x1d7f8a(0x20b),_0x1d7f8a(0x1bd),_0x1d7f8a(0x1d2)+_0x473f8d+_0x1d7f8a(0x1e7),_0x3af0cc))),_0xfe98ed;}function validateDecisionPointStep(_0x9279a0,_0x22d400,_0x46cd50,_0x1d3adb){const _0x306038=a134_0x25f4,_0x418c1c=[];if(!_0x9279a0[_0x306038(0x19d)]?.[_0x306038(0x156)]||_0x9279a0[_0x306038(0x19d)][_0x306038(0x156)][_0x306038(0x1f8)]===0x0)return _0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x1e5),_0x22d400+'.with.branches',_0x306038(0x1f0),_0x306038(0x204),_0x46cd50,_0x22d400)),_0x418c1c;for(let _0x3eeb68=0x0;_0x3eeb68<_0x9279a0[_0x306038(0x19d)][_0x306038(0x156)][_0x306038(0x1f8)];_0x3eeb68++){const _0x2990fc=_0x9279a0[_0x306038(0x19d)][_0x306038(0x156)][_0x3eeb68],_0xbcb96a=_0x22d400+_0x306038(0x19f)+_0x3eeb68+']';_0x2990fc[_0x306038(0x1f9)]&&!_0x2990fc[_0x306038(0x1f7)]&&(_0x46cd50[_0x306038(0x188)]?.[_0x306038(0x198)](_0x2990fc[_0x306038(0x1f9)]),!_0x2990fc[_0x306038(0x1f9)][_0x306038(0x201)]('ref:')&&(_0x46cd50[_0x306038(0x153)]&&!_0x46cd50[_0x306038(0x153)][_0x306038(0x18f)](_0x2990fc[_0x306038(0x1f9)])&&_0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x1e5),_0xbcb96a+_0x306038(0x18b),_0x306038(0x1d5),_0x306038(0x16b)+_0x2990fc[_0x306038(0x1f9)]+'\x27',_0x46cd50))));_0x2990fc[_0x306038(0x1fd)]&&_0x46cd50['stepNames']&&!_0x46cd50['stepNames'][_0x306038(0x18f)](_0x2990fc[_0x306038(0x1fd)])&&_0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x1e5),_0xbcb96a+'.next','INVALID_NEXT_REFERENCE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x2990fc['next']+'\x27',_0x46cd50));if(_0x2990fc[_0x306038(0x1fd)]){const _0x5a1124=_0x1d3adb[_0x306038(0x167)](_0x2990fc[_0x306038(0x1fd)]);_0x5a1124?.[_0x306038(0x165)]===_0x306038(0x1ba)&&_0x418c1c[_0x306038(0x1b9)](createIssue(_0x306038(0x16a),_0xbcb96a+_0x306038(0x184),'BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20\x27'+_0x2990fc[_0x306038(0x177)]+_0x306038(0x1d0)+_0x2990fc['next']+_0x306038(0x20a),_0x46cd50));}}return _0x418c1c;}function validateAbTestStep(_0x14e4c3,_0x4f90fe,_0x50c968,_0x114b9c){const _0x3d380a=a134_0x25f4,_0x27fe87=[];if(!_0x14e4c3[_0x3d380a(0x19d)]?.[_0x3d380a(0x1e4)]||_0x14e4c3[_0x3d380a(0x19d)][_0x3d380a(0x1e4)][_0x3d380a(0x1f8)]===0x0)return _0x27fe87[_0x3d380a(0x1b9)](createIssue(_0x3d380a(0x1e5),_0x4f90fe+'.with.variants',_0x3d380a(0x1f0),_0x3d380a(0x200),_0x50c968,_0x4f90fe)),_0x27fe87;const _0x222eac=_0x14e4c3[_0x3d380a(0x19d)][_0x3d380a(0x1e4)]['reduce']((_0x34ce5a,_0x1a879d)=>_0x34ce5a+(_0x1a879d[_0x3d380a(0x1c3)]||0x0),0x0);Math[_0x3d380a(0x1a7)](_0x222eac-0x64)>0.01&&_0x27fe87['push'](createIssue(_0x3d380a(0x1e5),_0x4f90fe+_0x3d380a(0x1fc),_0x3d380a(0x1f3),_0x3d380a(0x168)+_0x222eac+'%)',_0x50c968));for(let _0x167177=0x0;_0x167177<_0x14e4c3[_0x3d380a(0x19d)]['variants'][_0x3d380a(0x1f8)];_0x167177++){const _0x213a9d=_0x14e4c3['with'][_0x3d380a(0x1e4)][_0x167177],_0xb12c75=_0x4f90fe+_0x3d380a(0x19e)+_0x167177+']';_0x213a9d['next']&&_0x50c968[_0x3d380a(0x208)]&&!_0x50c968[_0x3d380a(0x208)]['has'](_0x213a9d[_0x3d380a(0x1fd)])&&_0x27fe87[_0x3d380a(0x1b9)](createIssue(_0x3d380a(0x1e5),_0xb12c75+_0x3d380a(0x184),_0x3d380a(0x1a4),_0x3d380a(0x196)+_0x213a9d[_0x3d380a(0x1fd)]+'\x27',_0x50c968));if(_0x213a9d['next']){const _0x284430=_0x114b9c[_0x3d380a(0x167)](_0x213a9d['next']);_0x284430?.[_0x3d380a(0x165)]===_0x3d380a(0x1ba)&&_0x27fe87[_0x3d380a(0x1b9)](createIssue(_0x3d380a(0x16a),_0xb12c75+_0x3d380a(0x184),_0x3d380a(0x1ea),_0x3d380a(0x174)+_0x213a9d[_0x3d380a(0x177)]+_0x3d380a(0x1d0)+_0x213a9d[_0x3d380a(0x1fd)]+_0x3d380a(0x20a),_0x50c968));}}return _0x27fe87;}function validateJumpStep(_0x230980,_0x283b15,_0x2a6013){const _0x1d722d=a134_0x25f4,_0x4740f7=[];if(!_0x230980[_0x1d722d(0x19d)]?.['target'])return _0x4740f7[_0x1d722d(0x1b9)](createIssue(_0x1d722d(0x1e5),_0x283b15+_0x1d722d(0x170),_0x1d722d(0x15f),'Jump\x20step\x20requires\x20a\x20target',_0x2a6013,_0x283b15)),_0x4740f7;return(!_0x230980[_0x1d722d(0x19d)][_0x1d722d(0x202)][_0x1d722d(0x1d4)]||!_0x230980['with'][_0x1d722d(0x202)][_0x1d722d(0x163)])&&_0x4740f7[_0x1d722d(0x1b9)](createIssue(_0x1d722d(0x1e5),_0x283b15+_0x1d722d(0x170),_0x1d722d(0x15f),_0x1d722d(0x1b5),_0x2a6013)),_0x4740f7;}function buildConvergenceMap(_0x32d2eb){const _0x30ba29=a134_0x25f4,_0x32c565=new Map();function _0x3bd1f0(_0x264f61,_0x1c41d9){const _0x1d8fb1=a134_0x25f4,_0x32fabc=_0x32c565[_0x1d8fb1(0x167)](_0x264f61)||[];_0x32fabc[_0x1d8fb1(0x1b9)](_0x1c41d9),_0x32c565[_0x1d8fb1(0x1a9)](_0x264f61,_0x32fabc);}for(const _0x23d896 of _0x32d2eb){_0x23d896[_0x30ba29(0x1fd)]&&_0x3bd1f0(_0x23d896['next'],{'stepName':_0x23d896[_0x30ba29(0x177)],'description':_0x30ba29(0x1bf)+_0x23d896[_0x30ba29(0x177)]+'\x27'});if(_0x23d896['type']===_0x30ba29(0x17a)&&_0x23d896[_0x30ba29(0x19d)]?.[_0x30ba29(0x156)])for(const _0x34d3cb of _0x23d896['with'][_0x30ba29(0x156)]){_0x34d3cb[_0x30ba29(0x1fd)]&&_0x3bd1f0(_0x34d3cb[_0x30ba29(0x1fd)],{'stepName':_0x23d896['name'],'description':_0x30ba29(0x1f5)+_0x34d3cb[_0x30ba29(0x177)]+_0x30ba29(0x19c)+_0x23d896[_0x30ba29(0x177)]+'\x27'});}if(_0x23d896[_0x30ba29(0x165)]===_0x30ba29(0x1c7)&&_0x23d896[_0x30ba29(0x19d)]?.[_0x30ba29(0x1e4)])for(const _0x27eab3 of _0x23d896[_0x30ba29(0x19d)][_0x30ba29(0x1e4)]){_0x27eab3['next']&&_0x3bd1f0(_0x27eab3['next'],{'stepName':_0x23d896['name'],'description':_0x30ba29(0x1a2)+_0x27eab3[_0x30ba29(0x177)]+_0x30ba29(0x19c)+_0x23d896['name']+'\x27'});}_0x23d896[_0x30ba29(0x165)]==='wait'&&_0x23d896[_0x30ba29(0x19d)]?.[_0x30ba29(0x182)]&&(_0x23d896['with'][_0x30ba29(0x182)]['next']&&_0x3bd1f0(_0x23d896[_0x30ba29(0x19d)]['condition']['next'],{'stepName':_0x23d896[_0x30ba29(0x177)],'description':_0x30ba29(0x1fe)+_0x23d896[_0x30ba29(0x177)]+'\x27'}),_0x23d896['with'][_0x30ba29(0x182)][_0x30ba29(0x1cd)]?.[_0x30ba29(0x1fd)]&&_0x3bd1f0(_0x23d896['with']['condition']['timeout'][_0x30ba29(0x1fd)],{'stepName':_0x23d896['name'],'description':'timeout\x20of\x20\x27'+_0x23d896[_0x30ba29(0x177)]+'\x27'}));}return _0x32c565;}function validateFlowControl(_0x197533,_0x1926a3,_0x13728c){const _0x4ad5f6=a134_0x25f4,_0x9fafb=[],_0x271079=_0x4ad5f6(0x1c2)+_0x1926a3+']',_0x492a4d=_0x197533[_0x4ad5f6(0x1ab)]||[];if(_0x492a4d[_0x4ad5f6(0x1f8)]===0x0)return _0x9fafb;const _0x48f8f6=new Map();for(const _0x553d70 of _0x492a4d){_0x553d70[_0x4ad5f6(0x177)]&&_0x48f8f6[_0x4ad5f6(0x1a9)](_0x553d70[_0x4ad5f6(0x177)],_0x553d70);}const _0x23cd2b=buildConvergenceMap(_0x492a4d),_0x137f2f=_0x492a4d[_0x4ad5f6(0x173)](_0x4f6a18=>_0x4f6a18['type']===_0x4ad5f6(0x206));!_0x137f2f&&_0x9fafb[_0x4ad5f6(0x1b9)](createIssue(_0x4ad5f6(0x1e5),_0x271079+_0x4ad5f6(0x190),_0x4ad5f6(0x179),_0x4ad5f6(0x16c)+_0x197533[_0x4ad5f6(0x177)]+_0x4ad5f6(0x17b),_0x13728c));for(const [_0x5a909d,_0x64dd88]of _0x23cd2b){const _0x335b8a=_0x48f8f6['get'](_0x5a909d);if(!_0x335b8a)continue;if(_0x64dd88['length']>0x1&&_0x335b8a[_0x4ad5f6(0x165)]!==_0x4ad5f6(0x1ba)){const _0x74178b=_0x64dd88[_0x4ad5f6(0x1a5)](_0x321719=>_0x321719['description'])['join'](',\x20');_0x9fafb[_0x4ad5f6(0x1b9)](createIssue(_0x4ad5f6(0x1e5),_0x271079+_0x4ad5f6(0x190),_0x4ad5f6(0x20c),_0x4ad5f6(0x192)+_0x5a909d+_0x4ad5f6(0x18d)+_0x74178b+_0x4ad5f6(0x1f1),_0x13728c));}_0x64dd88[_0x4ad5f6(0x1f8)]===0x1&&_0x335b8a[_0x4ad5f6(0x165)]===_0x4ad5f6(0x1ba)&&_0x9fafb[_0x4ad5f6(0x1b9)](createIssue('warning',_0x271079+'.steps','SINGLE_INPUT_MERGE',_0x4ad5f6(0x1ca)+_0x5a909d+_0x4ad5f6(0x1e1)+_0x64dd88[0x0][_0x4ad5f6(0x172)]+_0x4ad5f6(0x158),_0x13728c));}for(const _0x240804 of _0x492a4d){if(_0x240804[_0x4ad5f6(0x165)]==='merge'&&_0x240804[_0x4ad5f6(0x1fd)]){const _0x1fe135=_0x48f8f6[_0x4ad5f6(0x167)](_0x240804[_0x4ad5f6(0x1fd)]);_0x1fe135?.[_0x4ad5f6(0x165)]==='merge'&&_0x9fafb[_0x4ad5f6(0x1b9)](createIssue(_0x4ad5f6(0x1e5),_0x271079+'.steps',_0x4ad5f6(0x1d7),_0x4ad5f6(0x1ca)+_0x240804[_0x4ad5f6(0x177)]+_0x4ad5f6(0x1d3)+_0x240804[_0x4ad5f6(0x1fd)]+_0x4ad5f6(0x1f4),_0x13728c));}}return _0x9fafb;}function validateCriteria(_0x3ffed0,_0xd363a8,_0x99dee4){const _0x5b909e=a134_0x25f4,_0x5baed1=[];return _0x3ffed0[_0x5b909e(0x1f9)]&&(_0x99dee4[_0x5b909e(0x188)]?.[_0x5b909e(0x198)](_0x3ffed0['segment']),!_0x3ffed0[_0x5b909e(0x1f9)][_0x5b909e(0x201)](_0x5b909e(0x187))&&(_0x99dee4[_0x5b909e(0x153)]&&!_0x99dee4[_0x5b909e(0x153)][_0x5b909e(0x18f)](_0x3ffed0[_0x5b909e(0x1f9)])&&_0x5baed1[_0x5b909e(0x1b9)](createIssue(_0x5b909e(0x1e5),_0xd363a8+_0x5b909e(0x18b),'MISSING_SEGMENT_REFERENCE',_0x5b909e(0x176)+_0x3ffed0[_0x5b909e(0x1f9)]+'\x27',_0x99dee4)))),_0x5baed1;}function validateEmbeddedSegment(_0x1c2cad,_0x3ef688,_0x33b942){const _0xd07865=a134_0x25f4,_0x48d103=[];return _0x1c2cad[_0xd07865(0x17f)]&&_0x48d103[_0xd07865(0x1b9)](...validateRuleDef(_0x1c2cad[_0xd07865(0x17f)],_0x3ef688+_0xd07865(0x16e),_0x33b942)),_0x48d103;}function validateStage(_0x526d5b,_0x151709,_0x210d4a,_0x1befe4){const _0x3d5b59=a134_0x25f4,_0x1cd1da=[],_0x3c6fa2='stages['+_0x151709+']',_0x2a07f5=new Map(),_0x286645=new Map();if(_0x526d5b[_0x3d5b59(0x1ab)]){for(let _0x422e3b=0x0;_0x422e3b<_0x526d5b[_0x3d5b59(0x1ab)][_0x3d5b59(0x1f8)];_0x422e3b++){const _0x6c0364=_0x526d5b[_0x3d5b59(0x1ab)][_0x422e3b];_0x6c0364[_0x3d5b59(0x177)]&&_0x2a07f5[_0x3d5b59(0x1a9)](_0x6c0364[_0x3d5b59(0x177)],_0x6c0364);}for(let _0x5165e7=0x0;_0x5165e7<_0x526d5b[_0x3d5b59(0x1ab)]['length'];_0x5165e7++){const _0x53a8ed=_0x526d5b[_0x3d5b59(0x1ab)][_0x5165e7],_0x5a89c4=_0x3c6fa2+_0x3d5b59(0x171)+_0x5165e7+']';if(_0x53a8ed[_0x3d5b59(0x177)]){if(_0x286645[_0x3d5b59(0x18f)](_0x53a8ed['name'])){const _0x198001=_0x286645[_0x3d5b59(0x167)](_0x53a8ed['name']);_0x1cd1da[_0x3d5b59(0x1b9)](createIssue('error',_0x5a89c4+_0x3d5b59(0x1b1),_0x3d5b59(0x1fa),'Duplicate\x20step\x20name\x20\x27'+_0x53a8ed['name']+_0x3d5b59(0x1b8)+_0x198001+'])',_0x1befe4));}else _0x286645[_0x3d5b59(0x1a9)](_0x53a8ed[_0x3d5b59(0x177)],_0x5165e7);}_0x1cd1da[_0x3d5b59(0x1b9)](...validateStep(_0x53a8ed,_0x5a89c4,_0x1befe4,_0x2a07f5));}}_0x526d5b[_0x3d5b59(0x1b7)]&&_0x1cd1da['push'](...validateCriteria(_0x526d5b[_0x3d5b59(0x1b7)],_0x3c6fa2+_0x3d5b59(0x1ff),_0x1befe4));if(_0x526d5b[_0x3d5b59(0x164)])for(let _0x27fdfe=0x0;_0x27fdfe<_0x526d5b[_0x3d5b59(0x164)][_0x3d5b59(0x1f8)];_0x27fdfe++){_0x1cd1da[_0x3d5b59(0x1b9)](...validateCriteria(_0x526d5b[_0x3d5b59(0x164)][_0x27fdfe],_0x3c6fa2+'.exit_criteria['+_0x27fdfe+']',_0x1befe4));}return _0x526d5b['milestone']&&_0x1cd1da[_0x3d5b59(0x1b9)](...validateCriteria(_0x526d5b['milestone'],_0x3c6fa2+'.milestone',_0x1befe4)),_0x1cd1da[_0x3d5b59(0x1b9)](...validateStageStructure(_0x526d5b,_0x151709,_0x210d4a,_0x1befe4)),_0x1cd1da['push'](...validateFlowControl(_0x526d5b,_0x151709,_0x1befe4)),_0x1cd1da;}function validateStagesForVersion(_0x40dbd3,_0x23912e,_0x288056,_0x4ca941,_0x419068,_0x3aac72,_0x35b6d6){const _0x116282=a134_0x25f4;if(_0x40dbd3[_0x116282(0x1f8)]===0x0){_0x419068[_0x116282(0x1b9)]({'level':_0x116282(0x1e5),'path':_0x4ca941+_0x116282(0x1b2),'code':'MISSING_STAGES','message':_0x116282(0x154),'location':getLocationFromPath(_0x288056[_0x116282(0x1de)],_0x288056[_0x116282(0x1da)],[_0x116282(0x1b2)])});return;}const _0x43f078=new Set();for(const _0x186c9f of _0x40dbd3){if(_0x186c9f['steps'])for(const _0x10dcd4 of _0x186c9f['steps']){_0x10dcd4['name']&&_0x43f078[_0x116282(0x198)](_0x10dcd4[_0x116282(0x177)]);}}const _0x9c566={..._0x288056,'stepNames':_0x43f078},_0x1bcdb2=validateVersionStructure(_0x40dbd3,_0x9c566);for(const _0x3be6e2 of _0x1bcdb2){const _0x26a141=_0x4ca941?{..._0x3be6e2,'path':''+_0x4ca941+_0x3be6e2[_0x116282(0x1df)]}:_0x3be6e2;if(_0x26a141[_0x116282(0x1ef)]===_0x116282(0x1e5))_0x419068[_0x116282(0x1b9)](_0x26a141);else _0x3aac72['push'](_0x26a141);}for(let _0xc20502=0x0;_0xc20502<_0x40dbd3[_0x116282(0x1f8)];_0xc20502++){const _0x2681d8=validateStage(_0x40dbd3[_0xc20502],_0xc20502,_0x40dbd3['length'],_0x9c566);for(const _0x157783 of _0x2681d8){const _0x774375=_0x4ca941?{..._0x157783,'path':''+_0x4ca941+_0x157783['path']}:_0x157783;if(_0x774375[_0x116282(0x1ef)]===_0x116282(0x1e5))_0x419068['push'](_0x774375);else _0x3aac72['push'](_0x774375);}}if(_0x23912e[_0x116282(0x1fb)]){const _0x4ef96d=_0x35b6d6?.[_0x116282(0x1f2)]?_0x116282(0x1fb):_0x4ca941+_0x116282(0x1fb),_0x7cbe48=validateCriteria(_0x23912e['goal'],_0x4ef96d,_0x9c566);for(const _0x4c29c3 of _0x7cbe48){if(_0x4c29c3[_0x116282(0x1ef)]===_0x116282(0x1e5))_0x419068[_0x116282(0x1b9)](_0x4c29c3);else _0x3aac72[_0x116282(0x1b9)](_0x4c29c3);}}}function extractVersionIndex(_0x2dc5b0){const _0x569879=a134_0x25f4,_0x27ca7b=_0x2dc5b0[_0x569879(0x17d)](/^journeys\[(\d+)\]\./);return _0x27ca7b?_0x27ca7b[0x1]:undefined;}function deduplicateAcrossVersions(_0x594700){const _0x5312dd=a134_0x25f4,_0x591c72=new Map();for(let _0x4ffb81=0x0;_0x4ffb81<_0x594700['length'];_0x4ffb81++){const _0x4ceaaf=_0x594700[_0x4ffb81][_0x5312dd(0x1cb)]+':'+_0x594700[_0x4ffb81][_0x5312dd(0x191)],_0x1b82e9=extractVersionIndex(_0x594700[_0x4ffb81]['path']),_0x32299b=_0x591c72['get'](_0x4ceaaf);if(_0x32299b){_0x32299b[_0x5312dd(0x19b)][_0x5312dd(0x1b9)](_0x4ffb81);if(_0x1b82e9)_0x32299b['versions'][_0x5312dd(0x198)](_0x1b82e9);}else _0x591c72[_0x5312dd(0x1a9)](_0x4ceaaf,{'indices':[_0x4ffb81],'versions':new Set(_0x1b82e9?[_0x1b82e9]:[])});}const _0x560426=new Set();for(const {indices:_0x3a290c,versions:_0xc56836}of _0x591c72[_0x5312dd(0x1d9)]()){if(_0xc56836[_0x5312dd(0x160)]<=0x1)continue;const _0x41b6b4=_0x594700[_0x3a290c[0x0]];_0x41b6b4['path']=_0x41b6b4[_0x5312dd(0x1df)][_0x5312dd(0x18a)](/^journeys\[\d+\]\./,''),_0x41b6b4[_0x5312dd(0x191)]=_0x41b6b4['message']+_0x5312dd(0x186)+_0xc56836[_0x5312dd(0x160)]+_0x5312dd(0x169);for(let _0x3951bb=0x1;_0x3951bb<_0x3a290c[_0x5312dd(0x1f8)];_0x3951bb++){_0x560426[_0x5312dd(0x198)](_0x3a290c[_0x3951bb]);}}const _0x1ac262=[..._0x560426][_0x5312dd(0x180)]((_0x5cee2a,_0xe210ae)=>_0xe210ae-_0x5cee2a);for(const _0x489281 of _0x1ac262){_0x594700[_0x5312dd(0x1ac)](_0x489281,0x1);}}export function validateJourneyDef(_0x2c568c,_0x42f8ee={},_0x59ce4b={}){const _0x329694=a134_0x25f4;if(_0x59ce4b[_0x329694(0x20d)])return runJourneySemanticChecks(_0x2c568c,_0x42f8ee);const _0x2c3ef5=JourneyDefSchema['safeParse'](_0x2c568c);if(_0x2c3ef5[_0x329694(0x1f6)])return runJourneySemanticChecks(_0x2c3ef5[_0x329694(0x1dd)],_0x42f8ee);return zodErrorsToJourneyValidationResult(_0x2c3ef5[_0x329694(0x1e5)],_0x42f8ee);}function zodErrorsToJourneyValidationResult(_0x35b5fd,_0xb0c12e){const _0x862413=a134_0x25f4,_0x1505c8=flattenZodIssues(_0x35b5fd[_0x862413(0x1c5)]),_0x55dc6c=_0x1505c8[_0x862413(0x1a5)](_0x441e0d=>{const _0x2818ab=_0x862413,_0x4719e4=formatZodPath(_0x441e0d[_0x2818ab(0x1df)]),_0xb29417=mapJourneyZodIssueToCode(_0x441e0d,_0x4719e4),_0x57516c=getLocationFromPath(_0xb0c12e['document'],_0xb0c12e[_0x2818ab(0x1da)],_0x441e0d[_0x2818ab(0x1df)]['map'](_0x2ee726=>typeof _0x2ee726===_0x2818ab(0x18e)?String(_0x2ee726):_0x2ee726));return{'level':_0x2818ab(0x1e5),'path':_0x4719e4,'code':_0xb29417,'message':_0x441e0d['message'],..._0x57516c&&{'location':_0x57516c}};});return{'valid':![],'errors':_0x55dc6c,'warnings':[]};}function mapJourneyZodIssueToCode(_0x121616,_0x534fb7){const _0x87d3e3=a134_0x25f4;if(_0x534fb7==='name')return _0x87d3e3(0x183);if(_0x534fb7[_0x87d3e3(0x1b3)](_0x87d3e3(0x1bb))&&_0x534fb7['includes'](_0x87d3e3(0x1ab)))return'JOURNEY_SCHEMA_ERROR';if(_0x534fb7===_0x87d3e3(0x1b2)||_0x534fb7[_0x87d3e3(0x1b3)](_0x87d3e3(0x199)))return'MISSING_STAGES';if(_0x534fb7===''&&_0x121616[_0x87d3e3(0x191)][_0x87d3e3(0x1eb)](_0x87d3e3(0x1d6)))return _0x87d3e3(0x195);if(_0x534fb7[_0x87d3e3(0x1eb)](_0x87d3e3(0x1e2)))return'ACTIVATION_SCHEMA_ERROR';return'JOURNEY_SCHEMA_ERROR';}function a134_0x25f4(_0x404221,_0x536c78){_0x404221=_0x404221-0x153;const _0x2b46f=a134_0x2b46();let _0x25f42e=_0x2b46f[_0x404221];return _0x25f42e;}function a134_0x2b46(){const _0x4bc0d8=['issues','\x27\x20has\x20only\x20','ab_test','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','1159290DzMBhz','Merge\x20step\x20\x27','code','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','timeout','keys','journeys','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','versions','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','journey','MISSING_SEGMENT_REFERENCE','journeys,\x20stages,\x20or\x20versions','MERGE_TO_MERGE_CHAIN','every','values','source','.exit_criteria','.with.condition.next','data','document','path','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','activation','DUPLICATE_LATEST','variants','error','filter','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','segments','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','BRANCH_DIRECTLY_TO_MERGE','includes','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Journey\x20can\x20have\x20at\x20most\x20one\x20','625161eBqJBH','level','MISSING_CONDITIONS',').\x20Use\x20a\x20merge\x20step.','goalIsInherited','INVALID_AB_TEST_PERCENTAGES','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','branch\x20\x27','success','excluded','length','segment','DUPLICATE_STEP_NAME','goal','.with.variants','next','condition\x20of\x20\x27','.entry_criteria','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','startsWith','target','.with.condition.timeout','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','state','end','Embedded\x20segment\x20\x27','stepNames','Journey\x20name\x20is\x20required','\x27\x20with\x20no\x20action\x20in\x20between','.with.activation','CONVERGENCE_WITHOUT_MERGE','skipSchema','journeys[','INSUFFICIENT_STEPS','trim','milestone','segments.','embeddedSegments','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','latest','branches','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27',').\x20Merge\x20is\x20unnecessary.','jump','10885JEFefC','version','MISSING_WAIT_PARAMS','journey\x20entry','3588yPeFGr','INVALID_JUMP_TARGET','size','launched','2379183oLtBLa','stage','exit_criteria','type','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','get','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x20versions)','warning','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Stage\x20\x27','116784nnaGNS','.rule','TOO_MANY_STAGES','.with.target','.steps[','description','some','A/B\x20test\x20variant\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','Criteria\x20references\x20undefined\x20segment\x20\x27','name','150704FGWjli','MISSING_END_STEP','decision_point','\x27\x20has\x20no\x20end\x20step','entries','match','wait','rule','sort','End\x20step\x20\x27','condition','MISSING_NAME','.next','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','\x20(across\x20','ref:','referencedSegments','excluded_','replace','.segment','Activation\x20step\x20requires\x20an\x20activation\x20reference','\x27\x20(from:\x20','symbol','has','.steps','message','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','11768460gQHsED','MISSING_STAGES','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','activationKeys','add','.stages','.with.condition.segment','indices','\x27\x20of\x20\x27','with','.with.variants[','.with.branches[','Journey\x20has\x20','.with','variant\x20\x27','MISSING_ACTIVATION_REF','INVALID_NEXT_REFERENCE','map','MISSING_MILESTONE','abs','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','set','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','steps','splice','584iDhykc','MISSING_GOAL','.with.condition.timeout.next','activations','.name','stages','endsWith','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','FEW_STEPS','entry_criteria','\x27\x20(first\x20defined\x20at\x20steps[','push','merge','.type','END_STEP_HAS_NEXT_OR_WITH','MISSING_ACTIVATION_DEFINITION','Journey\x20has\x20no\x20goal\x20defined','step\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','40wNnmhv','stages[','percentage','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.'];a134_0x2b46=function(){return _0x4bc0d8;};return a134_0x2b46();}function runJourneySemanticChecks(_0xe0a5de,_0x5823ab){const _0x211c1c=a134_0x25f4,_0x5c8285=[],_0x3c369d=[];(!_0xe0a5de[_0x211c1c(0x177)]||_0xe0a5de[_0x211c1c(0x177)][_0x211c1c(0x210)]()==='')&&_0x5c8285[_0x211c1c(0x1b9)]({'level':'error','path':_0x211c1c(0x177),'code':_0x211c1c(0x183),'message':_0x211c1c(0x209),'location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],[_0x211c1c(0x177)])});const _0x4db39c=new Set();if(_0xe0a5de[_0x211c1c(0x1e8)])for(const _0x1cb7a0 of Object[_0x211c1c(0x1ce)](_0xe0a5de['segments'])){_0x4db39c[_0x211c1c(0x198)](_0x1cb7a0);}const _0x2cbb91=new Set();if(_0xe0a5de['activations'])for(const _0x327983 of Object[_0x211c1c(0x1ce)](_0xe0a5de[_0x211c1c(0x1b0)])){_0x2cbb91[_0x211c1c(0x198)](_0x327983);}const _0x3aebae=new Set(),_0x52c9e0={..._0x5823ab,'embeddedSegments':_0x4db39c,'referencedSegments':_0x3aebae,'activationKeys':_0x2cbb91[_0x211c1c(0x160)]>0x0?_0x2cbb91:undefined};if(_0xe0a5de[_0x211c1c(0x1e8)])for(const [_0x5d9170,_0x3b77d6]of Object[_0x211c1c(0x17c)](_0xe0a5de['segments'])){const _0x34dfb2=validateEmbeddedSegment(_0x3b77d6,_0x211c1c(0x212)+_0x5d9170,_0x52c9e0);for(const _0x1ee6c5 of _0x34dfb2){if(_0x1ee6c5[_0x211c1c(0x1ef)]===_0x211c1c(0x1e5))_0x5c8285[_0x211c1c(0x1b9)](_0x1ee6c5);else _0x3c369d['push'](_0x1ee6c5);}}const _0x295e09=!!_0xe0a5de['goal'],_0x5f5b32=_0xe0a5de[_0x211c1c(0x1cf)]?.[_0x211c1c(0x1d8)](_0x3fc876=>!!_0x3fc876[_0x211c1c(0x1fb)])??![];!_0x295e09&&!_0x5f5b32&&_0x3c369d[_0x211c1c(0x1b9)]({'level':_0x211c1c(0x16a),'path':_0x211c1c(0x1fb),'code':_0x211c1c(0x1ae),'message':_0x211c1c(0x1be),'location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],['goal'])});const _0x4fa3fe=_0xe0a5de[_0x211c1c(0x1cf)]??_0xe0a5de[_0x211c1c(0x1d1)];if(_0x4fa3fe&&_0x4fa3fe[_0x211c1c(0x1e6)](_0x16157c=>_0x16157c[_0x211c1c(0x155)]===!![])[_0x211c1c(0x1f8)]>0x1){const _0x505370=_0xe0a5de[_0x211c1c(0x1cf)]?_0x211c1c(0x1cf):'versions';_0x5c8285['push']({'level':_0x211c1c(0x1e5),'path':_0x505370,'code':_0x211c1c(0x1e3),'message':_0x211c1c(0x1ed)+(_0x505370===_0x211c1c(0x1cf)?_0x211c1c(0x15d):_0x211c1c(0x15b))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],[_0x505370])});}if(_0xe0a5de['journeys']&&_0xe0a5de['journeys'][_0x211c1c(0x1f8)]>0x0)for(let _0x68c4b0=0x0;_0x68c4b0<_0xe0a5de[_0x211c1c(0x1cf)]['length'];_0x68c4b0++){const _0x457465=_0xe0a5de[_0x211c1c(0x1cf)][_0x68c4b0];if(_0xe0a5de['journeys']['length']>0x1&&_0x457465[_0x211c1c(0x205)]===_0x211c1c(0x161))continue;const _0x3f1e96=_0x457465[_0x211c1c(0x1b2)]||[],_0x2b02a7=_0x211c1c(0x20e)+_0x68c4b0+'].',_0x366856=!!_0x457465['goal'],_0x41409e=_0x366856?{..._0xe0a5de,'goal':_0x457465['goal']}:_0xe0a5de;validateStagesForVersion(_0x3f1e96,_0x41409e,_0x52c9e0,_0x2b02a7,_0x5c8285,_0x3c369d,{'goalIsInherited':!_0x366856});}else{if(_0xe0a5de['versions']&&_0xe0a5de[_0x211c1c(0x1d1)][_0x211c1c(0x1f8)]>0x0)for(let _0x271396=0x0;_0x271396<_0xe0a5de[_0x211c1c(0x1d1)][_0x211c1c(0x1f8)];_0x271396++){const _0xac21b0=_0xe0a5de[_0x211c1c(0x1d1)][_0x271396];if(_0xe0a5de[_0x211c1c(0x1d1)][_0x211c1c(0x1f8)]>0x1&&_0xac21b0['state']===_0x211c1c(0x161))continue;const _0x117680=_0xac21b0[_0x211c1c(0x1b2)]||[],_0x18ed63='versions['+_0x271396+'].';validateStagesForVersion(_0x117680,_0xe0a5de,_0x52c9e0,_0x18ed63,_0x5c8285,_0x3c369d);}else{const _0x2dab5e=_0xe0a5de[_0x211c1c(0x1b2)]||[];validateStagesForVersion(_0x2dab5e,_0xe0a5de,_0x52c9e0,'',_0x5c8285,_0x3c369d);}}_0xe0a5de['journeys']&&_0xe0a5de['journeys'][_0x211c1c(0x1f8)]>0x1&&(deduplicateAcrossVersions(_0x5c8285),deduplicateAcrossVersions(_0x3c369d));for(const _0x3f077d of _0x4db39c){!_0x3aebae[_0x211c1c(0x18f)](_0x3f077d)&&!_0x3f077d[_0x211c1c(0x201)](_0x211c1c(0x189))&&_0x3c369d[_0x211c1c(0x1b9)]({'level':_0x211c1c(0x16a),'path':_0x211c1c(0x212)+_0x3f077d,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x211c1c(0x207)+_0x3f077d+_0x211c1c(0x185),'location':getLocationFromPath(_0x5823ab[_0x211c1c(0x1de)],_0x5823ab[_0x211c1c(0x1da)],[_0x211c1c(0x1e8),_0x3f077d])});}return{'valid':_0x5c8285[_0x211c1c(0x1f8)]===0x0,'errors':_0x5c8285,'warnings':_0x3c369d};}
|
|
1
|
+
(function(_0x50a0b2,_0x1f573f){const _0x16b1c7=a134_0x21c0,_0x20c239=_0x50a0b2();while(!![]){try{const _0x492aa1=-parseInt(_0x16b1c7(0x220))/0x1*(parseInt(_0x16b1c7(0x23f))/0x2)+parseInt(_0x16b1c7(0x255))/0x3+-parseInt(_0x16b1c7(0x282))/0x4*(-parseInt(_0x16b1c7(0x275))/0x5)+parseInt(_0x16b1c7(0x251))/0x6*(parseInt(_0x16b1c7(0x24c))/0x7)+parseInt(_0x16b1c7(0x209))/0x8*(parseInt(_0x16b1c7(0x27d))/0x9)+-parseInt(_0x16b1c7(0x260))/0xa+-parseInt(_0x16b1c7(0x1fb))/0xb*(parseInt(_0x16b1c7(0x1e8))/0xc);if(_0x492aa1===_0x1f573f)break;else _0x20c239['push'](_0x20c239['shift']());}catch(_0x44d391){_0x20c239['push'](_0x20c239['shift']());}}}(a134_0x49bf,0x1cd9d));import{JourneyDefSchema}from'./types/journey-schema.js';function a134_0x49bf(){const _0x28b31a=['.with.target','next','activationKeys','segment','.name','endsWith','.exit_criteria','stage','version','filter','timeout\x20of\x20\x27','\x27\x20has\x20no\x20exit_criteria\x20defined','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','has','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','.with.branches[','\x20versions)','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','target','reduce','Stage\x20\x27','timeout','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.with.variants[','sort','MISSING_END_STEP','286vvQvPR','length','success','merge','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Journey\x20has\x20no\x20goal\x20defined','activation','get','.steps','ref:','DUPLICATE_STEP_NAME','splice','.with.condition','21DViezQ','MISSING_SEGMENT_REFERENCE','jump','Decision\x20branch\x20\x27','journeys[','357234VuAqkC','.with.condition.timeout.next','.with.branches','segments.','301314IOVbxN','Jump\x20step\x20requires\x20a\x20target','steps','.entry_criteria','add','FEW_STEPS','milestone','\x20stages\x20but\x20maximum\x20is\x20','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','DUPLICATE_LATEST','document','88040xndcUe','embeddedSegments','Embedded\x20segment\x20\x27','push','CONVERGENCE_WITHOUT_MERGE','MISSING_EXIT_CRITERIA','Activation\x20step\x20requires\x20an\x20activation\x20reference','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','INSUFFICIENT_STEPS','journeys,\x20stages,\x20or\x20versions','error','description','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','MISSING_WAIT_PARAMS','source','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_NAME','\x27\x20with\x20no\x20action\x20in\x20between','journey','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','trim','195LKIKDe','keys','type','message',').\x20Use\x20a\x20merge\x20step.','\x27\x20has\x20no\x20end\x20step','.with','name','375426kuksPD','safeParse','A/B\x20test\x20variant\x20\x27','latest','state','16692MzNNmc','Duplicate\x20step\x20name\x20\x27','\x27\x20has\x20only\x20','Journey\x20name\x20is\x20required','.segment','segments','Merge\x20step\x20\x27','.with.variants','MISSING_ACTIVATION_REF','startsWith','entry_criteria','versions[','decision_point','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','code','\x27\x20(from:\x20','INVALID_AB_TEST_PERCENTAGES','exit_criteria','size','symbol','Journey\x20has\x20','set','abs','.exit_criteria[','values','.rule','Criteria\x20references\x20undefined\x20segment\x20\x27','24EtiYwB','condition\x20of\x20\x27','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.with.activation','.milestone','condition','JOURNEY_SCHEMA_ERROR','Journey\x20can\x20have\x20at\x20most\x20one\x20','UNUSED_EMBEDDED_SEGMENT','excluded','stages[','step\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','map','INVALID_NEXT_REFERENCE','TOO_MANY_STAGES','MISSING_STAGES','wait','stages','2126454BVhOxD','activations','journeys','versions','rule','replace','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','launched','warning','END_STEP_HAS_NEXT_OR_WITH','\x27\x20has\x20no\x20steps','ab_test','branches','path','24BWLUoJ','referencedSegments','journey\x20entry','Step\x20references\x20non-existent\x20step\x20\x27','ACTIVATION_SCHEMA_ERROR','variants','stepNames','join','.with.condition.next','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','includes','INVALID_JUMP_TARGET','end','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','branch\x20\x27','MISSING_CONDITIONS','MISSING_ACTIVATION_DEFINITION','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','BRANCH_DIRECTLY_TO_MERGE','with','MISSING_MILESTONE','373OriNQn','\x27\x20of\x20\x27','.next','\x20(across\x20','goal'];a134_0x49bf=function(){return _0x28b31a;};return a134_0x49bf();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x19b9d6,_0x282cfb,_0x2e55ee,_0x3fd861,_0x3bb5c8,_0x4da92b){const _0x16c814=a134_0x21c0;return{'level':_0x19b9d6,'path':_0x282cfb,'code':_0x2e55ee,'message':_0x3fd861,'location':getLocationFromPath(_0x3bb5c8[_0x16c814(0x25f)],_0x3bb5c8['source'],pathToArray(_0x4da92b??_0x282cfb))};}function validateVersionStructure(_0x2261f8,_0x4ac4eb){const _0x326648=a134_0x21c0,_0x5c6025=[];return _0x2261f8[_0x326648(0x240)]>MAX_STAGES&&_0x5c6025['push'](createIssue(_0x326648(0x26a),'stages',_0x326648(0x1f7),_0x326648(0x296)+_0x2261f8[_0x326648(0x240)]+_0x326648(0x25c)+MAX_STAGES,_0x4ac4eb)),_0x5c6025;}function validateStageStructure(_0x3e5e43,_0x383268,_0x230293,_0x32a2a7){const _0x65b8d6=a134_0x21c0,_0x38b0d4=[],_0x126786='stages['+_0x383268+']';_0x383268===0x0&&!_0x3e5e43['entry_criteria']&&_0x38b0d4[_0x65b8d6(0x263)](createIssue(_0x65b8d6(0x26a),_0x126786+_0x65b8d6(0x258),'MISSING_ENTRY_CRITERIA',_0x65b8d6(0x239)+_0x3e5e43[_0x65b8d6(0x27c)]+_0x65b8d6(0x21c),_0x32a2a7,_0x126786));const _0x227339=_0x383268===_0x230293-0x1;!_0x227339&&!_0x3e5e43[_0x65b8d6(0x25b)]&&_0x38b0d4['push'](createIssue(_0x65b8d6(0x26a),_0x126786+_0x65b8d6(0x1ec),_0x65b8d6(0x21f),_0x65b8d6(0x239)+_0x3e5e43['name']+_0x65b8d6(0x233),_0x32a2a7,_0x126786));(!_0x3e5e43['exit_criteria']||_0x3e5e43[_0x65b8d6(0x293)][_0x65b8d6(0x240)]===0x0)&&_0x38b0d4[_0x65b8d6(0x263)](createIssue(_0x65b8d6(0x203),_0x126786+_0x65b8d6(0x22b),_0x65b8d6(0x265),_0x65b8d6(0x239)+_0x3e5e43['name']+_0x65b8d6(0x230),_0x32a2a7,_0x126786));const _0x34b6f3=_0x3e5e43[_0x65b8d6(0x257)]?.[_0x65b8d6(0x240)]??0x0;if(_0x34b6f3===0x0)_0x38b0d4[_0x65b8d6(0x263)](createIssue(_0x65b8d6(0x26a),_0x126786+_0x65b8d6(0x247),'INSUFFICIENT_STEPS',_0x65b8d6(0x239)+_0x3e5e43['name']+_0x65b8d6(0x205),_0x32a2a7,_0x126786+_0x65b8d6(0x247)));else{if(_0x34b6f3===0x1)_0x38b0d4[_0x65b8d6(0x263)](createIssue(_0x65b8d6(0x203),_0x126786+'.steps',_0x65b8d6(0x268),_0x65b8d6(0x239)+_0x3e5e43['name']+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x32a2a7,_0x126786+_0x65b8d6(0x247)));else _0x34b6f3<=0x3&&_0x38b0d4[_0x65b8d6(0x263)](createIssue(_0x65b8d6(0x203),_0x126786+_0x65b8d6(0x247),_0x65b8d6(0x25a),'Stage\x20\x27'+_0x3e5e43[_0x65b8d6(0x27c)]+_0x65b8d6(0x284)+_0x34b6f3+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x32a2a7,_0x126786+'.steps'));}return _0x38b0d4;}function a134_0x21c0(_0x35bae3,_0x55bfde){_0x35bae3=_0x35bae3-0x1e8;const _0x49bfce=a134_0x49bf();let _0x21c0e1=_0x49bfce[_0x35bae3];return _0x21c0e1;}function validateStep(_0x188c12,_0x455242,_0x50a6ee,_0x121a63){const _0x2b74c0=a134_0x21c0,_0xf65fc5=[];if(_0x188c12['type']===_0x2b74c0(0x215))return _0x188c12['next']&&_0xf65fc5[_0x2b74c0(0x263)](createIssue(_0x2b74c0(0x26a),_0x455242+'.next','END_STEP_HAS_NEXT_OR_WITH','End\x20step\x20\x27'+_0x188c12[_0x2b74c0(0x27c)]+_0x2b74c0(0x236),_0x50a6ee)),_0x2b74c0(0x21e)in _0x188c12&&_0x188c12[_0x2b74c0(0x21e)]!==undefined&&_0xf65fc5['push'](createIssue(_0x2b74c0(0x26a),_0x455242+_0x2b74c0(0x27b),_0x2b74c0(0x204),'End\x20step\x20\x27'+_0x188c12[_0x2b74c0(0x27c)]+_0x2b74c0(0x23b),_0x50a6ee)),_0xf65fc5;_0x188c12[_0x2b74c0(0x226)]&&(_0x50a6ee[_0x2b74c0(0x20f)]&&!_0x50a6ee[_0x2b74c0(0x20f)][_0x2b74c0(0x232)](_0x188c12[_0x2b74c0(0x226)])&&_0xf65fc5['push'](createIssue(_0x2b74c0(0x26a),_0x455242+_0x2b74c0(0x222),_0x2b74c0(0x1f6),_0x2b74c0(0x20c)+_0x188c12[_0x2b74c0(0x226)]+'\x27',_0x50a6ee)));switch(_0x188c12[_0x2b74c0(0x277)]){case _0x2b74c0(0x1f9):_0xf65fc5[_0x2b74c0(0x263)](...validateWaitStep(_0x188c12,_0x455242,_0x50a6ee,_0x121a63));break;case _0x2b74c0(0x245):_0xf65fc5[_0x2b74c0(0x263)](...validateActivationStep(_0x188c12,_0x455242,_0x50a6ee));break;case _0x2b74c0(0x28e):_0xf65fc5[_0x2b74c0(0x263)](...validateDecisionPointStep(_0x188c12,_0x455242,_0x50a6ee,_0x121a63));break;case _0x2b74c0(0x206):_0xf65fc5[_0x2b74c0(0x263)](...validateAbTestStep(_0x188c12,_0x455242,_0x50a6ee,_0x121a63));break;case _0x2b74c0(0x24e):_0xf65fc5[_0x2b74c0(0x263)](...validateJumpStep(_0x188c12,_0x455242,_0x50a6ee));break;}return _0xf65fc5;}function validateWaitStep(_0x14d007,_0x6c2e05,_0x10cae9,_0x531d15){const _0xadcbe9=a134_0x21c0,_0x45d32e=[];if(!_0x14d007['with'])return _0x45d32e['push'](createIssue(_0xadcbe9(0x26a),_0x6c2e05+_0xadcbe9(0x27b),_0xadcbe9(0x26d),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x10cae9,_0x6c2e05)),_0x45d32e;if(_0x14d007['with'][_0xadcbe9(0x1ed)]){const _0x552d4f=_0x14d007[_0xadcbe9(0x21e)][_0xadcbe9(0x1ed)];if(_0x552d4f[_0xadcbe9(0x228)]){_0x10cae9[_0xadcbe9(0x20a)]?.[_0xadcbe9(0x259)](_0x552d4f['segment']);!_0x552d4f[_0xadcbe9(0x228)][_0xadcbe9(0x28b)]('ref:')&&(_0x10cae9[_0xadcbe9(0x261)]&&!_0x10cae9['embeddedSegments'][_0xadcbe9(0x232)](_0x552d4f['segment'])&&_0x45d32e[_0xadcbe9(0x263)](createIssue(_0xadcbe9(0x26a),_0x6c2e05+'.with.condition.segment',_0xadcbe9(0x24d),_0xadcbe9(0x212)+_0x552d4f['segment']+_0xadcbe9(0x26c),_0x10cae9)));_0x552d4f['next']&&_0x10cae9[_0xadcbe9(0x20f)]&&!_0x10cae9[_0xadcbe9(0x20f)][_0xadcbe9(0x232)](_0x552d4f['next'])&&_0x45d32e[_0xadcbe9(0x263)](createIssue('error',_0x6c2e05+'.with.condition.next',_0xadcbe9(0x1f6),_0xadcbe9(0x243)+_0x552d4f[_0xadcbe9(0x226)]+'\x27',_0x10cae9));_0x552d4f[_0xadcbe9(0x23a)]?.[_0xadcbe9(0x226)]&&_0x10cae9[_0xadcbe9(0x20f)]&&!_0x10cae9[_0xadcbe9(0x20f)]['has'](_0x552d4f[_0xadcbe9(0x23a)][_0xadcbe9(0x226)])&&_0x45d32e['push'](createIssue(_0xadcbe9(0x26a),_0x6c2e05+_0xadcbe9(0x252),_0xadcbe9(0x1f6),_0xadcbe9(0x273)+_0x552d4f[_0xadcbe9(0x23a)][_0xadcbe9(0x226)]+'\x27',_0x10cae9));const _0x492fd1=_0x552d4f[_0xadcbe9(0x226)]||_0x14d007['next'],_0x5a8b43=_0x552d4f['timeout']?.[_0xadcbe9(0x226)]||_0x14d007[_0xadcbe9(0x226)];if(_0x492fd1){const _0x45f50f=_0x531d15[_0xadcbe9(0x246)](_0x492fd1);_0x45f50f?.[_0xadcbe9(0x277)]===_0xadcbe9(0x242)&&_0x45d32e[_0xadcbe9(0x263)](createIssue(_0xadcbe9(0x203),_0x6c2e05+_0xadcbe9(0x211),_0xadcbe9(0x21d),'Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x492fd1+_0xadcbe9(0x28f),_0x10cae9,_0x6c2e05+_0xadcbe9(0x24b)));}if(_0x5a8b43){const _0x147a98=_0x531d15[_0xadcbe9(0x246)](_0x5a8b43);_0x147a98?.[_0xadcbe9(0x277)]===_0xadcbe9(0x242)&&_0x45d32e[_0xadcbe9(0x263)](createIssue('warning',_0x6c2e05+_0xadcbe9(0x252),_0xadcbe9(0x21d),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5a8b43+_0xadcbe9(0x28f),_0x10cae9,_0x6c2e05+'.with.condition.timeout'));}}}return _0x45d32e;}function validateActivationStep(_0x5a0b5b,_0x4c0aae,_0x239faf){const _0x2b93d3=a134_0x21c0,_0x428e65=[];if(!_0x5a0b5b['with']?.[_0x2b93d3(0x245)])return _0x428e65[_0x2b93d3(0x263)](createIssue(_0x2b93d3(0x26a),_0x4c0aae+_0x2b93d3(0x1eb),_0x2b93d3(0x28a),_0x2b93d3(0x266),_0x239faf,_0x4c0aae)),_0x428e65;const _0x17c896=_0x5a0b5b[_0x2b93d3(0x21e)][_0x2b93d3(0x245)];return _0x239faf[_0x2b93d3(0x227)]&&!_0x17c896[_0x2b93d3(0x28b)](_0x2b93d3(0x248))&&(!_0x239faf[_0x2b93d3(0x227)][_0x2b93d3(0x232)](_0x17c896)&&_0x428e65[_0x2b93d3(0x263)](createIssue(_0x2b93d3(0x26a),_0x4c0aae+'.with.activation',_0x2b93d3(0x219),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x17c896+_0x2b93d3(0x216),_0x239faf))),_0x428e65;}function validateDecisionPointStep(_0x548145,_0xd4d517,_0x2fce6d,_0x23bd44){const _0x7a3c46=a134_0x21c0,_0x2a76b6=[];if(!_0x548145[_0x7a3c46(0x21e)]?.[_0x7a3c46(0x207)]||_0x548145['with']['branches'][_0x7a3c46(0x240)]===0x0)return _0x2a76b6[_0x7a3c46(0x263)](createIssue(_0x7a3c46(0x26a),_0xd4d517+_0x7a3c46(0x253),_0x7a3c46(0x218),_0x7a3c46(0x1f4),_0x2fce6d,_0xd4d517)),_0x2a76b6;for(let _0x688629=0x0;_0x688629<_0x548145[_0x7a3c46(0x21e)][_0x7a3c46(0x207)][_0x7a3c46(0x240)];_0x688629++){const _0x1c9f13=_0x548145[_0x7a3c46(0x21e)][_0x7a3c46(0x207)][_0x688629],_0x294638=_0xd4d517+_0x7a3c46(0x234)+_0x688629+']';_0x1c9f13[_0x7a3c46(0x228)]&&!_0x1c9f13[_0x7a3c46(0x1f1)]&&(_0x2fce6d['referencedSegments']?.[_0x7a3c46(0x259)](_0x1c9f13[_0x7a3c46(0x228)]),!_0x1c9f13[_0x7a3c46(0x228)][_0x7a3c46(0x28b)](_0x7a3c46(0x248))&&(_0x2fce6d[_0x7a3c46(0x261)]&&!_0x2fce6d['embeddedSegments']['has'](_0x1c9f13['segment'])&&_0x2a76b6[_0x7a3c46(0x263)](createIssue(_0x7a3c46(0x26a),_0x294638+_0x7a3c46(0x286),_0x7a3c46(0x24d),_0x7a3c46(0x267)+_0x1c9f13[_0x7a3c46(0x228)]+'\x27',_0x2fce6d))));_0x1c9f13[_0x7a3c46(0x226)]&&_0x2fce6d[_0x7a3c46(0x20f)]&&!_0x2fce6d[_0x7a3c46(0x20f)][_0x7a3c46(0x232)](_0x1c9f13[_0x7a3c46(0x226)])&&_0x2a76b6[_0x7a3c46(0x263)](createIssue(_0x7a3c46(0x26a),_0x294638+_0x7a3c46(0x222),_0x7a3c46(0x1f6),'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x1c9f13[_0x7a3c46(0x226)]+'\x27',_0x2fce6d));if(_0x1c9f13['next']){const _0x18d83a=_0x23bd44[_0x7a3c46(0x246)](_0x1c9f13[_0x7a3c46(0x226)]);_0x18d83a?.[_0x7a3c46(0x277)]===_0x7a3c46(0x242)&&_0x2a76b6[_0x7a3c46(0x263)](createIssue('warning',_0x294638+'.next',_0x7a3c46(0x21d),_0x7a3c46(0x24f)+_0x1c9f13[_0x7a3c46(0x27c)]+_0x7a3c46(0x25d)+_0x1c9f13[_0x7a3c46(0x226)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2fce6d));}}return _0x2a76b6;}function validateAbTestStep(_0xf567dc,_0x17a8ae,_0x26e472,_0x20aec7){const _0x2e33e4=a134_0x21c0,_0x133613=[];if(!_0xf567dc[_0x2e33e4(0x21e)]?.['variants']||_0xf567dc[_0x2e33e4(0x21e)]['variants'][_0x2e33e4(0x240)]===0x0)return _0x133613[_0x2e33e4(0x263)](createIssue(_0x2e33e4(0x26a),_0x17a8ae+_0x2e33e4(0x289),_0x2e33e4(0x218),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x26e472,_0x17a8ae)),_0x133613;const _0x3e894e=_0xf567dc[_0x2e33e4(0x21e)]['variants'][_0x2e33e4(0x238)]((_0x49ae4f,_0x3f5625)=>_0x49ae4f+(_0x3f5625['percentage']||0x0),0x0);Math[_0x2e33e4(0x298)](_0x3e894e-0x64)>0.01&&_0x133613[_0x2e33e4(0x263)](createIssue(_0x2e33e4(0x26a),_0x17a8ae+_0x2e33e4(0x289),_0x2e33e4(0x292),_0x2e33e4(0x21b)+_0x3e894e+'%)',_0x26e472));for(let _0x1592de=0x0;_0x1592de<_0xf567dc[_0x2e33e4(0x21e)][_0x2e33e4(0x20e)]['length'];_0x1592de++){const _0x5aa200=_0xf567dc[_0x2e33e4(0x21e)][_0x2e33e4(0x20e)][_0x1592de],_0x2daf9a=_0x17a8ae+_0x2e33e4(0x23c)+_0x1592de+']';_0x5aa200[_0x2e33e4(0x226)]&&_0x26e472['stepNames']&&!_0x26e472[_0x2e33e4(0x20f)][_0x2e33e4(0x232)](_0x5aa200[_0x2e33e4(0x226)])&&_0x133613[_0x2e33e4(0x263)](createIssue(_0x2e33e4(0x26a),_0x2daf9a+_0x2e33e4(0x222),_0x2e33e4(0x1f6),_0x2e33e4(0x26f)+_0x5aa200[_0x2e33e4(0x226)]+'\x27',_0x26e472));if(_0x5aa200['next']){const _0x303c93=_0x20aec7['get'](_0x5aa200['next']);_0x303c93?.[_0x2e33e4(0x277)]===_0x2e33e4(0x242)&&_0x133613[_0x2e33e4(0x263)](createIssue(_0x2e33e4(0x203),_0x2daf9a+_0x2e33e4(0x222),_0x2e33e4(0x21d),_0x2e33e4(0x27f)+_0x5aa200[_0x2e33e4(0x27c)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5aa200[_0x2e33e4(0x226)]+_0x2e33e4(0x271),_0x26e472));}}return _0x133613;}function validateJumpStep(_0x4fa7dc,_0x368fcd,_0x152adc){const _0x58e070=a134_0x21c0,_0x47dfe4=[];if(!_0x4fa7dc[_0x58e070(0x21e)]?.[_0x58e070(0x237)])return _0x47dfe4[_0x58e070(0x263)](createIssue(_0x58e070(0x26a),_0x368fcd+_0x58e070(0x225),_0x58e070(0x214),_0x58e070(0x256),_0x152adc,_0x368fcd)),_0x47dfe4;return(!_0x4fa7dc[_0x58e070(0x21e)][_0x58e070(0x237)][_0x58e070(0x272)]||!_0x4fa7dc[_0x58e070(0x21e)][_0x58e070(0x237)][_0x58e070(0x22c)])&&_0x47dfe4[_0x58e070(0x263)](createIssue(_0x58e070(0x26a),_0x368fcd+_0x58e070(0x225),_0x58e070(0x214),_0x58e070(0x21a),_0x152adc)),_0x47dfe4;}function buildConvergenceMap(_0x15a769){const _0x226834=a134_0x21c0,_0x150e52=new Map();function _0x54650f(_0x360944,_0x33fff0){const _0x26ad75=a134_0x21c0,_0x2de339=_0x150e52[_0x26ad75(0x246)](_0x360944)||[];_0x2de339[_0x26ad75(0x263)](_0x33fff0),_0x150e52[_0x26ad75(0x297)](_0x360944,_0x2de339);}for(const _0x4662ad of _0x15a769){_0x4662ad['next']&&_0x54650f(_0x4662ad['next'],{'stepName':_0x4662ad[_0x226834(0x27c)],'description':_0x226834(0x1f3)+_0x4662ad[_0x226834(0x27c)]+'\x27'});if(_0x4662ad[_0x226834(0x277)]==='decision_point'&&_0x4662ad[_0x226834(0x21e)]?.['branches'])for(const _0x1ada84 of _0x4662ad[_0x226834(0x21e)][_0x226834(0x207)]){_0x1ada84[_0x226834(0x226)]&&_0x54650f(_0x1ada84[_0x226834(0x226)],{'stepName':_0x4662ad[_0x226834(0x27c)],'description':_0x226834(0x217)+_0x1ada84['name']+_0x226834(0x221)+_0x4662ad[_0x226834(0x27c)]+'\x27'});}if(_0x4662ad[_0x226834(0x277)]===_0x226834(0x206)&&_0x4662ad['with']?.[_0x226834(0x20e)])for(const _0x889c7 of _0x4662ad['with'][_0x226834(0x20e)]){_0x889c7[_0x226834(0x226)]&&_0x54650f(_0x889c7[_0x226834(0x226)],{'stepName':_0x4662ad[_0x226834(0x27c)],'description':'variant\x20\x27'+_0x889c7['name']+_0x226834(0x221)+_0x4662ad['name']+'\x27'});}_0x4662ad[_0x226834(0x277)]===_0x226834(0x1f9)&&_0x4662ad[_0x226834(0x21e)]?.[_0x226834(0x1ed)]&&(_0x4662ad[_0x226834(0x21e)][_0x226834(0x1ed)][_0x226834(0x226)]&&_0x54650f(_0x4662ad['with']['condition'][_0x226834(0x226)],{'stepName':_0x4662ad[_0x226834(0x27c)],'description':_0x226834(0x1e9)+_0x4662ad[_0x226834(0x27c)]+'\x27'}),_0x4662ad[_0x226834(0x21e)]['condition'][_0x226834(0x23a)]?.[_0x226834(0x226)]&&_0x54650f(_0x4662ad[_0x226834(0x21e)][_0x226834(0x1ed)][_0x226834(0x23a)]['next'],{'stepName':_0x4662ad['name'],'description':_0x226834(0x22f)+_0x4662ad[_0x226834(0x27c)]+'\x27'}));}return _0x150e52;}function validateFlowControl(_0x4a0c41,_0x25d33a,_0x2ec375){const _0x315914=a134_0x21c0,_0x225544=[],_0x1a4af2='stages['+_0x25d33a+']',_0x54cc41=_0x4a0c41[_0x315914(0x257)]||[];if(_0x54cc41[_0x315914(0x240)]===0x0)return _0x225544;const _0x46910d=new Map();for(const _0x732525 of _0x54cc41){_0x732525[_0x315914(0x27c)]&&_0x46910d[_0x315914(0x297)](_0x732525[_0x315914(0x27c)],_0x732525);}const _0x376952=buildConvergenceMap(_0x54cc41),_0x3008ea=_0x54cc41['some'](_0x14fbff=>_0x14fbff[_0x315914(0x277)]===_0x315914(0x215));!_0x3008ea&&_0x225544[_0x315914(0x263)](createIssue('error',_0x1a4af2+_0x315914(0x247),_0x315914(0x23e),_0x315914(0x239)+_0x4a0c41['name']+_0x315914(0x27a),_0x2ec375));for(const [_0x261b53,_0x28dc43]of _0x376952){const _0x549f42=_0x46910d['get'](_0x261b53);if(!_0x549f42)continue;if(_0x28dc43[_0x315914(0x240)]>0x1&&_0x549f42[_0x315914(0x277)]!=='merge'){const _0x3f08cc=_0x28dc43['map'](_0x16a7d7=>_0x16a7d7[_0x315914(0x26b)])[_0x315914(0x210)](',\x20');_0x225544['push'](createIssue(_0x315914(0x26a),_0x1a4af2+'.steps',_0x315914(0x264),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x261b53+_0x315914(0x291)+_0x3f08cc+_0x315914(0x279),_0x2ec375));}_0x28dc43[_0x315914(0x240)]===0x1&&_0x549f42['type']==='merge'&&_0x225544[_0x315914(0x263)](createIssue(_0x315914(0x203),_0x1a4af2+'.steps','SINGLE_INPUT_MERGE',_0x315914(0x288)+_0x261b53+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x28dc43[0x0][_0x315914(0x26b)]+').\x20Merge\x20is\x20unnecessary.',_0x2ec375));}for(const _0xe640a1 of _0x54cc41){if(_0xe640a1[_0x315914(0x277)]===_0x315914(0x242)&&_0xe640a1[_0x315914(0x226)]){const _0x52e32a=_0x46910d[_0x315914(0x246)](_0xe640a1[_0x315914(0x226)]);_0x52e32a?.[_0x315914(0x277)]===_0x315914(0x242)&&_0x225544[_0x315914(0x263)](createIssue(_0x315914(0x26a),_0x1a4af2+_0x315914(0x247),'MERGE_TO_MERGE_CHAIN',_0x315914(0x288)+_0xe640a1[_0x315914(0x27c)]+_0x315914(0x231)+_0xe640a1[_0x315914(0x226)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x2ec375));}}return _0x225544;}function validateCriteria(_0x2561c6,_0x4fafc9,_0x2c0986){const _0x40ca47=a134_0x21c0,_0x231cd1=[];return _0x2561c6['segment']&&(_0x2c0986['referencedSegments']?.['add'](_0x2561c6[_0x40ca47(0x228)]),!_0x2561c6[_0x40ca47(0x228)]['startsWith'](_0x40ca47(0x248))&&(_0x2c0986[_0x40ca47(0x261)]&&!_0x2c0986[_0x40ca47(0x261)][_0x40ca47(0x232)](_0x2561c6['segment'])&&_0x231cd1[_0x40ca47(0x263)](createIssue('error',_0x4fafc9+_0x40ca47(0x286),_0x40ca47(0x24d),_0x40ca47(0x29c)+_0x2561c6[_0x40ca47(0x228)]+'\x27',_0x2c0986)))),_0x231cd1;}function validateEmbeddedSegment(_0x1d8054,_0x1fd1a8,_0xc0ed9c){const _0x2ea5e0=a134_0x21c0,_0xa6acbe=[];return _0x1d8054[_0x2ea5e0(0x1ff)]&&_0xa6acbe[_0x2ea5e0(0x263)](...validateRuleDef(_0x1d8054[_0x2ea5e0(0x1ff)],_0x1fd1a8+_0x2ea5e0(0x29b),_0xc0ed9c)),_0xa6acbe;}function validateStage(_0x4263c3,_0x27a707,_0x576da3,_0x552539){const _0x3b4a6e=a134_0x21c0,_0xde3e80=[],_0x238718=_0x3b4a6e(0x1f2)+_0x27a707+']',_0x5cf557=new Map(),_0x25d41b=new Map();if(_0x4263c3['steps']){for(let _0xc39078=0x0;_0xc39078<_0x4263c3[_0x3b4a6e(0x257)][_0x3b4a6e(0x240)];_0xc39078++){const _0x44795b=_0x4263c3[_0x3b4a6e(0x257)][_0xc39078];_0x44795b[_0x3b4a6e(0x27c)]&&_0x5cf557[_0x3b4a6e(0x297)](_0x44795b[_0x3b4a6e(0x27c)],_0x44795b);}for(let _0x38397f=0x0;_0x38397f<_0x4263c3[_0x3b4a6e(0x257)][_0x3b4a6e(0x240)];_0x38397f++){const _0x3454da=_0x4263c3['steps'][_0x38397f],_0x400722=_0x238718+'.steps['+_0x38397f+']';if(_0x3454da['name']){if(_0x25d41b['has'](_0x3454da[_0x3b4a6e(0x27c)])){const _0x3f3181=_0x25d41b[_0x3b4a6e(0x246)](_0x3454da[_0x3b4a6e(0x27c)]);_0xde3e80[_0x3b4a6e(0x263)](createIssue('error',_0x400722+_0x3b4a6e(0x229),_0x3b4a6e(0x249),_0x3b4a6e(0x283)+_0x3454da[_0x3b4a6e(0x27c)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x3f3181+'])',_0x552539));}else _0x25d41b['set'](_0x3454da[_0x3b4a6e(0x27c)],_0x38397f);}_0xde3e80[_0x3b4a6e(0x263)](...validateStep(_0x3454da,_0x400722,_0x552539,_0x5cf557));}}_0x4263c3['entry_criteria']&&_0xde3e80[_0x3b4a6e(0x263)](...validateCriteria(_0x4263c3[_0x3b4a6e(0x28c)],_0x238718+'.entry_criteria',_0x552539));if(_0x4263c3[_0x3b4a6e(0x293)])for(let _0x566f62=0x0;_0x566f62<_0x4263c3[_0x3b4a6e(0x293)][_0x3b4a6e(0x240)];_0x566f62++){_0xde3e80[_0x3b4a6e(0x263)](...validateCriteria(_0x4263c3[_0x3b4a6e(0x293)][_0x566f62],_0x238718+_0x3b4a6e(0x299)+_0x566f62+']',_0x552539));}return _0x4263c3['milestone']&&_0xde3e80[_0x3b4a6e(0x263)](...validateCriteria(_0x4263c3[_0x3b4a6e(0x25b)],_0x238718+_0x3b4a6e(0x1ec),_0x552539)),_0xde3e80[_0x3b4a6e(0x263)](...validateStageStructure(_0x4263c3,_0x27a707,_0x576da3,_0x552539)),_0xde3e80[_0x3b4a6e(0x263)](...validateFlowControl(_0x4263c3,_0x27a707,_0x552539)),_0xde3e80;}function validateStagesForVersion(_0x4c6292,_0x1fb466,_0x46bee0,_0x33e9fe,_0x4b7292,_0x59b025,_0x2bc723){const _0x3a8b59=a134_0x21c0;if(_0x4c6292[_0x3a8b59(0x240)]===0x0){_0x4b7292[_0x3a8b59(0x263)]({'level':_0x3a8b59(0x26a),'path':_0x33e9fe+_0x3a8b59(0x1fa),'code':_0x3a8b59(0x1f8),'message':_0x3a8b59(0x201),'location':getLocationFromPath(_0x46bee0[_0x3a8b59(0x25f)],_0x46bee0['source'],[_0x3a8b59(0x1fa)])});return;}const _0x2bad8b=new Set();for(const _0xbb7a91 of _0x4c6292){if(_0xbb7a91[_0x3a8b59(0x257)])for(const _0x4ae6c8 of _0xbb7a91[_0x3a8b59(0x257)]){_0x4ae6c8['name']&&_0x2bad8b['add'](_0x4ae6c8[_0x3a8b59(0x27c)]);}}const _0x4468c6={..._0x46bee0,'stepNames':_0x2bad8b},_0x1aa1e8=validateVersionStructure(_0x4c6292,_0x4468c6);for(const _0x44a6b7 of _0x1aa1e8){const _0x30c542=_0x33e9fe?{..._0x44a6b7,'path':''+_0x33e9fe+_0x44a6b7['path']}:_0x44a6b7;if(_0x30c542['level']==='error')_0x4b7292[_0x3a8b59(0x263)](_0x30c542);else _0x59b025[_0x3a8b59(0x263)](_0x30c542);}for(let _0x432c2b=0x0;_0x432c2b<_0x4c6292[_0x3a8b59(0x240)];_0x432c2b++){const _0x364f11=validateStage(_0x4c6292[_0x432c2b],_0x432c2b,_0x4c6292[_0x3a8b59(0x240)],_0x4468c6);for(const _0x356260 of _0x364f11){const _0x5a50c4=_0x33e9fe?{..._0x356260,'path':''+_0x33e9fe+_0x356260['path']}:_0x356260;if(_0x5a50c4['level']===_0x3a8b59(0x26a))_0x4b7292[_0x3a8b59(0x263)](_0x5a50c4);else _0x59b025[_0x3a8b59(0x263)](_0x5a50c4);}}if(_0x1fb466[_0x3a8b59(0x224)]){const _0xe6c602=_0x2bc723?.['goalIsInherited']?_0x3a8b59(0x224):_0x33e9fe+_0x3a8b59(0x224),_0x40c22f=validateCriteria(_0x1fb466[_0x3a8b59(0x224)],_0xe6c602,_0x4468c6);for(const _0x2bdf77 of _0x40c22f){if(_0x2bdf77['level']===_0x3a8b59(0x26a))_0x4b7292[_0x3a8b59(0x263)](_0x2bdf77);else _0x59b025[_0x3a8b59(0x263)](_0x2bdf77);}}}function extractVersionIndex(_0x2b162c){const _0x2d1821=_0x2b162c['match'](/^journeys\[(\d+)\]\./);return _0x2d1821?_0x2d1821[0x1]:undefined;}function deduplicateAcrossVersions(_0x3c7c73){const _0x54ad6e=a134_0x21c0,_0x148881=new Map();for(let _0x48ac11=0x0;_0x48ac11<_0x3c7c73[_0x54ad6e(0x240)];_0x48ac11++){const _0x167402=_0x3c7c73[_0x48ac11][_0x54ad6e(0x290)]+':'+_0x3c7c73[_0x48ac11][_0x54ad6e(0x278)],_0x474aa0=extractVersionIndex(_0x3c7c73[_0x48ac11][_0x54ad6e(0x208)]),_0x4b404e=_0x148881[_0x54ad6e(0x246)](_0x167402);if(_0x4b404e){_0x4b404e['indices'][_0x54ad6e(0x263)](_0x48ac11);if(_0x474aa0)_0x4b404e[_0x54ad6e(0x1fe)]['add'](_0x474aa0);}else _0x148881['set'](_0x167402,{'indices':[_0x48ac11],'versions':new Set(_0x474aa0?[_0x474aa0]:[])});}const _0x3b1568=new Set();for(const {indices:_0x32ff2f,versions:_0x42f0d1}of _0x148881[_0x54ad6e(0x29a)]()){if(_0x42f0d1['size']<=0x1)continue;const _0x1c1253=_0x3c7c73[_0x32ff2f[0x0]];_0x1c1253[_0x54ad6e(0x208)]=_0x1c1253['path'][_0x54ad6e(0x200)](/^journeys\[\d+\]\./,''),_0x1c1253[_0x54ad6e(0x278)]=_0x1c1253['message']+_0x54ad6e(0x223)+_0x42f0d1[_0x54ad6e(0x294)]+_0x54ad6e(0x235);for(let _0x114ead=0x1;_0x114ead<_0x32ff2f['length'];_0x114ead++){_0x3b1568['add'](_0x32ff2f[_0x114ead]);}}const _0x329e3a=[..._0x3b1568][_0x54ad6e(0x23d)]((_0xf5f5d,_0x2434e3)=>_0x2434e3-_0xf5f5d);for(const _0x443d12 of _0x329e3a){_0x3c7c73[_0x54ad6e(0x24a)](_0x443d12,0x1);}}export function validateJourneyDef(_0x398733,_0xbe659a={},_0x103cd9={}){const _0x151547=a134_0x21c0;if(_0x103cd9['skipSchema'])return runJourneySemanticChecks(_0x398733,_0xbe659a);const _0x2231a3=JourneyDefSchema[_0x151547(0x27e)](_0x398733);if(_0x2231a3[_0x151547(0x241)])return runJourneySemanticChecks(_0x2231a3['data'],_0xbe659a);return zodErrorsToJourneyValidationResult(_0x2231a3[_0x151547(0x26a)],_0xbe659a);}function zodErrorsToJourneyValidationResult(_0x5a292d,_0x224ff7){const _0x144a91=a134_0x21c0,_0x1a3a45=flattenZodIssues(_0x5a292d['issues']),_0x46a3f5=_0x1a3a45[_0x144a91(0x1f5)](_0x1e006c=>{const _0x2342c7=_0x144a91,_0x417a97=formatZodPath(_0x1e006c[_0x2342c7(0x208)]),_0x4deadc=mapJourneyZodIssueToCode(_0x1e006c,_0x417a97),_0x5ccb5e=getLocationFromPath(_0x224ff7[_0x2342c7(0x25f)],_0x224ff7['source'],_0x1e006c[_0x2342c7(0x208)][_0x2342c7(0x1f5)](_0x8c3132=>typeof _0x8c3132===_0x2342c7(0x295)?String(_0x8c3132):_0x8c3132));return{'level':_0x2342c7(0x26a),'path':_0x417a97,'code':_0x4deadc,'message':_0x1e006c[_0x2342c7(0x278)],..._0x5ccb5e&&{'location':_0x5ccb5e}};});return{'valid':![],'errors':_0x46a3f5,'warnings':[]};}function mapJourneyZodIssueToCode(_0x4062af,_0x11d6cd){const _0x50b84c=a134_0x21c0;if(_0x11d6cd===_0x50b84c(0x27c))return _0x50b84c(0x270);if(_0x11d6cd[_0x50b84c(0x22a)]('.type')&&_0x11d6cd[_0x50b84c(0x213)]('steps'))return _0x50b84c(0x1ee);if(_0x11d6cd===_0x50b84c(0x1fa)||_0x11d6cd[_0x50b84c(0x22a)]('.stages'))return _0x50b84c(0x1f8);if(_0x11d6cd===''&&_0x4062af[_0x50b84c(0x278)][_0x50b84c(0x213)](_0x50b84c(0x269)))return _0x50b84c(0x1f8);if(_0x11d6cd[_0x50b84c(0x213)](_0x50b84c(0x245)))return _0x50b84c(0x20d);return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x22cd72,_0x38de4c){const _0x1c3032=a134_0x21c0,_0x560ff5=[],_0x54dbff=[];(!_0x22cd72[_0x1c3032(0x27c)]||_0x22cd72[_0x1c3032(0x27c)][_0x1c3032(0x274)]()==='')&&_0x560ff5['push']({'level':_0x1c3032(0x26a),'path':_0x1c3032(0x27c),'code':'MISSING_NAME','message':_0x1c3032(0x285),'location':getLocationFromPath(_0x38de4c[_0x1c3032(0x25f)],_0x38de4c[_0x1c3032(0x26e)],[_0x1c3032(0x27c)])});const _0x56b59d=new Set();if(_0x22cd72[_0x1c3032(0x287)])for(const _0x1e914c of Object[_0x1c3032(0x276)](_0x22cd72['segments'])){_0x56b59d[_0x1c3032(0x259)](_0x1e914c);}const _0x4692cd=new Set();if(_0x22cd72[_0x1c3032(0x1fc)])for(const _0x4c8cae of Object[_0x1c3032(0x276)](_0x22cd72['activations'])){_0x4692cd[_0x1c3032(0x259)](_0x4c8cae);}const _0x30b23b=new Set(),_0x2dc200={..._0x38de4c,'embeddedSegments':_0x56b59d,'referencedSegments':_0x30b23b,'activationKeys':_0x4692cd[_0x1c3032(0x294)]>0x0?_0x4692cd:undefined};if(_0x22cd72[_0x1c3032(0x287)])for(const [_0x581486,_0x310278]of Object['entries'](_0x22cd72[_0x1c3032(0x287)])){const _0x372e16=validateEmbeddedSegment(_0x310278,_0x1c3032(0x254)+_0x581486,_0x2dc200);for(const _0x3d3fbe of _0x372e16){if(_0x3d3fbe['level']===_0x1c3032(0x26a))_0x560ff5[_0x1c3032(0x263)](_0x3d3fbe);else _0x54dbff['push'](_0x3d3fbe);}}const _0x50221d=!!_0x22cd72[_0x1c3032(0x224)],_0x45208c=_0x22cd72[_0x1c3032(0x1fd)]?.['every'](_0x173e38=>!!_0x173e38[_0x1c3032(0x224)])??![];!_0x50221d&&!_0x45208c&&_0x54dbff['push']({'level':_0x1c3032(0x203),'path':_0x1c3032(0x224),'code':'MISSING_GOAL','message':_0x1c3032(0x244),'location':getLocationFromPath(_0x38de4c[_0x1c3032(0x25f)],_0x38de4c[_0x1c3032(0x26e)],[_0x1c3032(0x224)])});const _0x5db6c7=_0x22cd72[_0x1c3032(0x1fd)]??_0x22cd72[_0x1c3032(0x1fe)];if(_0x5db6c7&&_0x5db6c7[_0x1c3032(0x22e)](_0x2aedde=>_0x2aedde[_0x1c3032(0x280)]===!![])['length']>0x1){const _0x324b14=_0x22cd72[_0x1c3032(0x1fd)]?_0x1c3032(0x1fd):_0x1c3032(0x1fe);_0x560ff5[_0x1c3032(0x263)]({'level':_0x1c3032(0x26a),'path':_0x324b14,'code':_0x1c3032(0x25e),'message':_0x1c3032(0x1ef)+(_0x324b14===_0x1c3032(0x1fd)?_0x1c3032(0x20b):_0x1c3032(0x22d))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x38de4c[_0x1c3032(0x25f)],_0x38de4c[_0x1c3032(0x26e)],[_0x324b14])});}if(_0x22cd72['journeys']&&_0x22cd72[_0x1c3032(0x1fd)][_0x1c3032(0x240)]>0x0)for(let _0x19f15d=0x0;_0x19f15d<_0x22cd72['journeys'][_0x1c3032(0x240)];_0x19f15d++){const _0x502f35=_0x22cd72[_0x1c3032(0x1fd)][_0x19f15d];if(_0x22cd72[_0x1c3032(0x1fd)][_0x1c3032(0x240)]>0x1&&_0x502f35[_0x1c3032(0x281)]===_0x1c3032(0x202))continue;const _0xa2ff46=_0x502f35[_0x1c3032(0x1fa)]||[],_0x1713ea=_0x1c3032(0x250)+_0x19f15d+'].',_0x7b9bc8=!!_0x502f35[_0x1c3032(0x224)],_0x285dc2=_0x7b9bc8?{..._0x22cd72,'goal':_0x502f35[_0x1c3032(0x224)]}:_0x22cd72;validateStagesForVersion(_0xa2ff46,_0x285dc2,_0x2dc200,_0x1713ea,_0x560ff5,_0x54dbff,{'goalIsInherited':!_0x7b9bc8});}else{if(_0x22cd72[_0x1c3032(0x1fe)]&&_0x22cd72[_0x1c3032(0x1fe)][_0x1c3032(0x240)]>0x0)for(let _0x4b08c3=0x0;_0x4b08c3<_0x22cd72['versions'][_0x1c3032(0x240)];_0x4b08c3++){const _0x23c199=_0x22cd72[_0x1c3032(0x1fe)][_0x4b08c3];if(_0x22cd72[_0x1c3032(0x1fe)][_0x1c3032(0x240)]>0x1&&_0x23c199[_0x1c3032(0x281)]===_0x1c3032(0x202))continue;const _0x5d7146=_0x23c199['stages']||[],_0x58a926=_0x1c3032(0x28d)+_0x4b08c3+'].';validateStagesForVersion(_0x5d7146,_0x22cd72,_0x2dc200,_0x58a926,_0x560ff5,_0x54dbff);}else{const _0x14aa65=_0x22cd72[_0x1c3032(0x1fa)]||[];validateStagesForVersion(_0x14aa65,_0x22cd72,_0x2dc200,'',_0x560ff5,_0x54dbff);}}_0x22cd72[_0x1c3032(0x1fd)]&&_0x22cd72[_0x1c3032(0x1fd)][_0x1c3032(0x240)]>0x1&&(deduplicateAcrossVersions(_0x560ff5),deduplicateAcrossVersions(_0x54dbff));for(const _0x4ea65 of _0x56b59d){!_0x30b23b[_0x1c3032(0x232)](_0x4ea65)&&!_0x4ea65[_0x1c3032(0x28b)]('excluded_')&&_0x54dbff['push']({'level':'warning','path':_0x1c3032(0x254)+_0x4ea65,'code':_0x1c3032(0x1f0),'message':_0x1c3032(0x262)+_0x4ea65+_0x1c3032(0x1ea),'location':getLocationFromPath(_0x38de4c[_0x1c3032(0x25f)],_0x38de4c['source'],[_0x1c3032(0x287),_0x4ea65])});}return{'valid':_0x560ff5[_0x1c3032(0x240)]===0x0,'errors':_0x560ff5,'warnings':_0x54dbff};}
|