@treasuredata/tdx 2026.3.24 → 2026.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.d.ts +5 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +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(_0x1262d2,_0x2c8ef2){const _0x55b074=a133_0x2fad,_0x21c617=_0x1262d2();while(!![]){try{const _0x5750aa=parseInt(_0x55b074(0x1ad))/0x1*(-parseInt(_0x55b074(0x1c5))/0x2)+parseInt(_0x55b074(0x1a1))/0x3+-parseInt(_0x55b074(0x1ce))/0x4+parseInt(_0x55b074(0x1a3))/0x5*(parseInt(_0x55b074(0x1c6))/0x6)+-parseInt(_0x55b074(0x1bb))/0x7*(-parseInt(_0x55b074(0x1a4))/0x8)+parseInt(_0x55b074(0x197))/0x9+-parseInt(_0x55b074(0x1c0))/0xa;if(_0x5750aa===_0x2c8ef2)break;else _0x21c617['push'](_0x21c617['shift']());}catch(_0x3e9f6f){_0x21c617['push'](_0x21c617['shift']());}}}(a133_0x1335,0x82386));import a133_0x51633a from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a133_0x2fad(_0x45bbc4,_0x1bf09d){_0x45bbc4=_0x45bbc4-0x197;const _0x13359a=a133_0x1335();let _0x2fad97=_0x13359a[_0x45bbc4];return _0x2fad97;}function a133_0x1335(){const _0x2af966=['Behaviors','\x20\x20\x20\x20','2501274XDECvp','name','5041095OAyowz','856RRYGYs','extra','cyan','null','set','sort','filter','source','parentColumn','1kyoIZV','some','get','entries','column_type','dim','matrixColumnName','YES','groupingName','matrixTableName','localeCompare','slice','tableName','column_name','18158cTXNZw','Attributes','varchar','displayName','execute','11322170dlqbwB','query','startsWith','error','bold','798736eBafvv','6SNiVfY','attribute','type','trim','Fetching\x20schema...','verbose','size','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','2349204VUijeQ','push','Unknown','4794597mTzTwu','parentTableName','data','key','fields','length','replace','map'];a133_0x1335=function(){return _0x2af966;};return a133_0x1335();}export function buildSchemaResult(_0x2e7542){const _0x1fd647=a133_0x2fad,_0x5ea898=_0x2e7542['columns'][_0x1fd647(0x19e)](_0x28ef41=>({'column_name':_0x28ef41[_0x1fd647(0x1a2)],'column_type':_0x28ef41['type'],'null':_0x1fd647(0x1b4),'key':null,'default':null,'extra':null}));return{..._0x2e7542,'columns':[{'name':_0x1fd647(0x1ba),'type':'varchar'},{'name':_0x1fd647(0x1b1),'type':_0x1fd647(0x1bd)},{'name':_0x1fd647(0x1a7),'type':'varchar'},{'name':_0x1fd647(0x19a),'type':_0x1fd647(0x1bd)},{'name':'default','type':_0x1fd647(0x1bd)},{'name':_0x1fd647(0x1a5),'type':'varchar'}],'data':_0x5ea898};}export async function executeSchemaQuery(_0x12d665,_0x169959,_0x1417c5){const _0x69bc28=a133_0x2fad,_0x21af9c=_0x12d665[_0x69bc28(0x1c9)]()[_0x69bc28(0x19d)](/;+$/,''),_0x58cdb5='SELECT\x20*\x20FROM\x20(\x0a'+_0x21af9c+_0x69bc28(0x1cd);_0x1417c5[_0x69bc28(0x1cb)]&&console[_0x69bc28(0x1c3)]('Schema\x20query:\x0a'+_0x58cdb5);const _0x149b60=await withProgressSpinner(_0x69bc28(0x1ca),async _0x134607=>{const _0x36506b=_0x69bc28,_0x1c82a0=await _0x169959[_0x36506b(0x1c1)][_0x36506b(0x1bf)](_0x58cdb5,{'catalog':'td','schema':'information_schema','onJobId':_0xe23a18=>{_0x134607['setJobId'](_0xe23a18);}});return _0x1c82a0;},{'verbose':_0x1417c5[_0x69bc28(0x1cb)]});return buildSchemaResult(_0x149b60[_0x69bc28(0x199)]);}function columnName(_0xa60323){const _0x31309b=a133_0x2fad;return _0xa60323[_0x31309b(0x1b3)]||_0xa60323[_0x31309b(0x1ac)]||_0xa60323[_0x31309b(0x1a2)];}function formatFieldLine(_0x45c8f9,_0x22a0b8,_0x451175){const _0x1e8f33=a133_0x2fad,_0x4b9e3a=_0x45c8f9!==_0x22a0b8?'\x20'+a133_0x51633a[_0x1e8f33(0x1b2)]('('+_0x22a0b8+')'):'';return _0x1e8f33(0x1a0)+_0x45c8f9+_0x4b9e3a+':\x20'+a133_0x51633a[_0x1e8f33(0x1a6)](_0x451175);}function sortByColumnName(_0x39ba96){const _0x1024c5=a133_0x2fad;return[..._0x39ba96]['sort']((_0x4ddc81,_0x44dcdf)=>columnName(_0x4ddc81)[_0x1024c5(0x1b7)](columnName(_0x44dcdf)));}export function displayFieldsHumanReadable(_0x4c48c0,_0x23e578){const _0x1601d5=a133_0x2fad,_0x5f08ba=_0x4c48c0[_0x1601d5(0x1aa)](_0x5dc907=>_0x5dc907[_0x1601d5(0x1ab)]===_0x1601d5(0x1c7)),_0x358145=_0x4c48c0[_0x1601d5(0x1aa)](_0x4e12df=>_0x4e12df[_0x1601d5(0x1ab)]==='behavior'),_0x500f2f=new Map();for(const _0x29fa9c of _0x5f08ba){const _0x460a7c=_0x29fa9c[_0x1601d5(0x1b5)]||_0x29fa9c[_0x1601d5(0x198)]||_0x1601d5(0x1d0),_0x53dda4=_0x500f2f[_0x1601d5(0x1af)](_0x460a7c);_0x53dda4?_0x53dda4['fields'][_0x1601d5(0x1cf)](_0x29fa9c):_0x500f2f[_0x1601d5(0x1a8)](_0x460a7c,{'displayName':_0x460a7c,'tableName':_0x29fa9c[_0x1601d5(0x198)],'fields':[_0x29fa9c]});}const _0x1275fb=new Map();for(const _0x494e34 of _0x358145){const _0x1a3f29=_0x494e34['behaviorName']||_0x1601d5(0x1d0),_0x579f8c=_0x1275fb[_0x1601d5(0x1af)](_0x1a3f29)||[];_0x579f8c[_0x1601d5(0x1cf)](_0x494e34),_0x1275fb[_0x1601d5(0x1a8)](_0x1a3f29,_0x579f8c);}console[_0x1601d5(0x1c3)]('\x0a'+a133_0x51633a[_0x1601d5(0x1c4)](_0x23e578));if(_0x500f2f[_0x1601d5(0x1cc)]>0x0){console[_0x1601d5(0x1c3)]('\x0a'+a133_0x51633a[_0x1601d5(0x1b2)](_0x1601d5(0x1bc)));const _0x6c8b13=[..._0x500f2f['entries']()][_0x1601d5(0x1a9)]((_0x57a19e,_0x1d68ed)=>_0x57a19e[0x0][_0x1601d5(0x1b7)](_0x1d68ed[0x0]));for(const [,_0x513fe0]of _0x6c8b13){const _0x798d20=_0x513fe0[_0x1601d5(0x1b9)]&&_0x513fe0[_0x1601d5(0x1b9)]!==_0x513fe0[_0x1601d5(0x1be)]?'\x20'+a133_0x51633a[_0x1601d5(0x1b2)]('('+_0x513fe0['tableName']+')'):'';console[_0x1601d5(0x1c3)]('\x20\x20'+a133_0x51633a[_0x1601d5(0x1c4)](_0x513fe0[_0x1601d5(0x1be)])+_0x798d20);for(const _0x55af6c of sortByColumnName(_0x513fe0[_0x1601d5(0x19b)])){console['error'](formatFieldLine(columnName(_0x55af6c),_0x55af6c[_0x1601d5(0x1a2)],_0x55af6c['type']));}}}if(_0x1275fb[_0x1601d5(0x1cc)]>0x0){console['error']('\x0a'+a133_0x51633a[_0x1601d5(0x1b2)](_0x1601d5(0x19f)));const _0x29d1c4=[..._0x1275fb[_0x1601d5(0x1b0)]()][_0x1601d5(0x1a9)]((_0x268e50,_0x479527)=>_0x268e50[0x0][_0x1601d5(0x1b7)](_0x479527[0x0]));for(const [_0x5d388f,_0x3d6dea]of _0x29d1c4){const _0x207bb6=_0x3d6dea[0x0],_0x22a535=_0x207bb6?.[_0x1601d5(0x1b6)];if(_0x22a535){const _0x52c748=_0x22a535!==_0x5d388f?'\x20'+a133_0x51633a[_0x1601d5(0x1b2)]('('+_0x5d388f+')'):'';console[_0x1601d5(0x1c3)]('\x20\x20'+a133_0x51633a[_0x1601d5(0x1c4)](_0x22a535)+_0x52c748);}else{const _0x14c3a1=_0x207bb6?.[_0x1601d5(0x198)]||'';console[_0x1601d5(0x1c3)]('\x20\x20'+a133_0x51633a['bold'](_0x5d388f)+(_0x14c3a1?'\x20'+a133_0x51633a['dim']('('+_0x14c3a1+')'):''));}for(const _0x126731 of sortByColumnName(_0x3d6dea)){const _0x2a0da4=_0x126731[_0x1601d5(0x1a2)][_0x1601d5(0x1c2)](_0x5d388f+'.')?_0x126731[_0x1601d5(0x1a2)][_0x1601d5(0x1b8)](_0x5d388f[_0x1601d5(0x19c)]+0x1):_0x126731[_0x1601d5(0x1a2)];console[_0x1601d5(0x1c3)](formatFieldLine(columnName(_0x126731),_0x2a0da4,_0x126731[_0x1601d5(0x1c8)]));}}}const _0x5213d0=_0x4c48c0[_0x1601d5(0x1ae)](_0x58b5b0=>_0x58b5b0[_0x1601d5(0x1b3)]||_0x58b5b0[_0x1601d5(0x1b6)]);_0x5213d0&&(console[_0x1601d5(0x1c3)]('\x0a'+a133_0x51633a[_0x1601d5(0x1b2)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console['error'](a133_0x51633a[_0x1601d5(0x1b2)]('\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.'))),console[_0x1601d5(0x1c3)]('');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e8406,_0x273206){const _0x37a257=a134_0xcaa7,_0x496660=_0x4e8406();while(!![]){try{const _0x4a7f99=-parseInt(_0x37a257(0x1d8))/0x1*(parseInt(_0x37a257(0x1de))/0x2)+-parseInt(_0x37a257(0x1d6))/0x3+parseInt(_0x37a257(0x1dd))/0x4*(parseInt(_0x37a257(0x1e5))/0x5)+parseInt(_0x37a257(0x1d4))/0x6+-parseInt(_0x37a257(0x1e9))/0x7*(-parseInt(_0x37a257(0x1d7))/0x8)+-parseInt(_0x37a257(0x1d9))/0x9*(parseInt(_0x37a257(0x1dc))/0xa)+-parseInt(_0x37a257(0x1e1))/0xb*(-parseInt(_0x37a257(0x1db))/0xc);if(_0x4a7f99===_0x273206)break;else _0x496660['push'](_0x496660['shift']());}catch(_0x181240){_0x496660['push'](_0x496660['shift']());}}}(a134_0x31f8,0x846d7));import{readdirSync,statSync}from'fs';function a134_0xcaa7(_0x4df764,_0x1ea059){_0x4df764=_0x4df764-0x1d4;const _0x31f805=a134_0x31f8();let _0xcaa72b=_0x31f805[_0x4df764];return _0xcaa72b;}import a134_0x13460e from'path';export function findYamlFiles(_0x42a718){const _0x1f6cc0=[];function _0x4da879(_0x128b6b){const _0xd404e=a134_0xcaa7,_0x39b2ee=readdirSync(_0x128b6b,{'withFileTypes':!![]});for(const _0x28bf26 of _0x39b2ee){const _0x56575f=a134_0x13460e['join'](_0x128b6b,_0x28bf26['name']);if(_0x28bf26[_0xd404e(0x1e3)]())_0x4da879(_0x56575f);else(_0x28bf26[_0xd404e(0x1d5)][_0xd404e(0x1e7)](_0xd404e(0x1da))||_0x28bf26[_0xd404e(0x1d5)][_0xd404e(0x1e7)](_0xd404e(0x1e4)))&&_0x1f6cc0[_0xd404e(0x1ea)](_0x56575f);}}return _0x4da879(_0x42a718),_0x1f6cc0;}function a134_0x31f8(){const _0x205389=['push','1614192IjBukq','name','3170187ilzYxf','6417416Nmrljg','19VLDtxS','253629YsPMKh','.yml','60bnHaUW','230RigMHM','660dKlhEz','108452ZyMBip','isFile','dirname','4522661OcPSbS','relative','isDirectory','.yaml','4565FvFdQY','toLowerCase','endsWith','map','7RTJjbO'];a134_0x31f8=function(){return _0x205389;};return a134_0x31f8();}export function discoverYamlFiles(_0x1c7d2f){const _0x20ba98=a134_0xcaa7,_0x581815=findYamlFiles(_0x1c7d2f);return _0x581815[_0x20ba98(0x1e8)](_0x178633=>{const _0x41826e=_0x20ba98,_0x3138c5=a134_0x13460e[_0x41826e(0x1e2)](_0x1c7d2f,_0x178633),_0xc2464=a134_0x13460e[_0x41826e(0x1e0)](_0x3138c5);return{'absolutePath':_0x178633,'relativePath':_0x3138c5,'folderPath':_0xc2464==='.'?'':_0xc2464};});}export function isYamlFile(_0x27b1a4){const _0x526365=a134_0xcaa7;try{const _0x44401f=statSync(_0x27b1a4);if(!_0x44401f[_0x526365(0x1df)]())return![];const _0x456f0f=a134_0x13460e['extname'](_0x27b1a4)[_0x526365(0x1e6)]();return _0x456f0f===_0x526365(0x1da)||_0x456f0f===_0x526365(0x1e4);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x45992f,_0x1b6e01){const _0x475b1e=a135_0x1d4e,_0x45a5d9=_0x45992f();while(!![]){try{const _0x3baf29=parseInt(_0x475b1e(0x1d4))/0x1+parseInt(_0x475b1e(0x1c2))/0x2+-parseInt(_0x475b1e(0x1e9))/0x3+parseInt(_0x475b1e(0x1cc))/0x4+parseInt(_0x475b1e(0x1f1))/0x5+-parseInt(_0x475b1e(0x1e4))/0x6*(parseInt(_0x475b1e(0x1be))/0x7)+parseInt(_0x475b1e(0x1d7))/0x8;if(_0x3baf29===_0x1b6e01)break;else _0x45a5d9['push'](_0x45a5d9['shift']());}catch(_0x53f52e){_0x45a5d9['push'](_0x45a5d9['shift']());}}}(a135_0xc712,0xbad6f));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x5f3f3b){const _0x546966=a135_0x1d4e;return _0x5f3f3b[_0x546966(0x1ca)]()[_0x546966(0x1cf)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x546966(0x1cf)](/_+/g,'_')[_0x546966(0x1cf)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x4fe8c7){const _0x45bec6=a135_0x1d4e,_0x2ad7f0=_0x4fe8c7['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2ad7f0){const _0x17af61=_0x2ad7f0[0x1]['toLowerCase'](),_0xb9bab2=_0x2ad7f0[0x2],_0x5b1540=_0xb9bab2[_0x45bec6(0x1cf)](/-/g,'')[_0x45bec6(0x1ee)](0x0,0x4)[_0x45bec6(0x1ca)]();return _0x17af61+'_'+_0x5b1540;}const _0x9d62c3=_0x4fe8c7[_0x45bec6(0x1dc)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x9d62c3){const _0x5ef2e4=_0x9d62c3[0x1],_0x4f5c5e=_0x9d62c3[0x2][_0x45bec6(0x1ca)](),_0x4830ff=_0x5ef2e4[_0x45bec6(0x1cf)](/-/g,'')[_0x45bec6(0x1ee)](0x0,0x4)[_0x45bec6(0x1ca)]();return _0x4f5c5e+'_'+_0x4830ff;}return undefined;}function a135_0x1d4e(_0x5a85c6,_0x5431e1){_0x5a85c6=_0x5a85c6-0x1b5;const _0xc7123c=a135_0xc712();let _0x1d4ef3=_0xc7123c[_0x5a85c6];return _0x1d4ef3;}function stableStringify(_0x220dce){const _0x28f1ae=a135_0x1d4e;if(Array['isArray'](_0x220dce))return'['+_0x220dce[_0x28f1ae(0x1f2)](_0x27966b=>stableStringify(_0x27966b))['join'](',')+']';if(_0x220dce&&typeof _0x220dce==='object'){const _0x175abd=_0x220dce,_0x50b258=Object[_0x28f1ae(0x1b6)](_0x175abd)[_0x28f1ae(0x1fd)](),_0x47e226=_0x50b258[_0x28f1ae(0x1f2)](_0x3f6fee=>'\x22'+_0x3f6fee+'\x22:'+stableStringify(_0x175abd[_0x3f6fee]));return'{'+_0x47e226[_0x28f1ae(0x1e3)](',')+'}';}const _0x4018e2=JSON[_0x28f1ae(0x1fb)](_0x220dce);return _0x4018e2===undefined?_0x28f1ae(0x1f6):_0x4018e2;}export function consolidateActivationsByContent(_0x21b939){const _0x34f29c=a135_0x1d4e,_0x5daf4e={},_0x407644=new Map(),_0x223c3e=new Map();for(const _0x4540b3 of _0x21b939){if(!_0x4540b3)continue;for(const [_0x82655a,_0xdd0679]of Object[_0x34f29c(0x1d2)](_0x4540b3)){const _0x23c7cc={'name':_0xdd0679[_0x34f29c(0x1f8)],'connection':_0xdd0679['connection'],..._0xdd0679[_0x34f29c(0x1c8)]!==undefined&&{'all_columns':_0xdd0679['all_columns']},..._0xdd0679['columns']!==undefined&&{'columns':_0xdd0679[_0x34f29c(0x204)]},..._0xdd0679['behavior']!==undefined&&{'behavior':_0xdd0679[_0x34f29c(0x1df)]},..._0xdd0679[_0x34f29c(0x1c4)]!==undefined&&{'schedule':_0xdd0679[_0x34f29c(0x1c4)]},..._0xdd0679[_0x34f29c(0x1c5)]!==undefined&&{'notification':_0xdd0679[_0x34f29c(0x1c5)]},..._0xdd0679[_0x34f29c(0x205)]!==undefined&&{'connector_config':_0xdd0679[_0x34f29c(0x205)]},..._0xdd0679[_0x34f29c(0x1e5)]!==undefined&&{'activation_template_id':_0xdd0679[_0x34f29c(0x1e5)]}},_0x1cd83e=stableStringify(_0x23c7cc),_0x365c74=_0x223c3e[_0x34f29c(0x1ed)](_0x1cd83e);_0x365c74?_0x407644[_0x34f29c(0x1d1)](_0x82655a,_0x365c74):(_0x5daf4e[_0x82655a]=_0xdd0679,_0x407644[_0x34f29c(0x1d1)](_0x82655a,_0x82655a),_0x223c3e[_0x34f29c(0x1d1)](_0x1cd83e,_0x82655a));}}return{'merged':_0x5daf4e,'nameMapping':_0x407644};}export function updateActivationReferences(_0x318289,_0x112e7e){const _0x18850e=a135_0x1d4e;if(!_0x318289)return;for(const _0xba058a of _0x318289){if(!_0xba058a[_0x18850e(0x1bd)])continue;for(const _0x225168 of _0xba058a[_0x18850e(0x1bd)]){if(_0x225168[_0x18850e(0x1ba)]===_0x18850e(0x1d5)&&_0x225168[_0x18850e(0x1cd)]?.[_0x18850e(0x1d5)]){const _0x1b80cc=_0x112e7e[_0x18850e(0x1ed)](_0x225168[_0x18850e(0x1cd)][_0x18850e(0x1d5)]);_0x1b80cc&&_0x1b80cc!==_0x225168['with'][_0x18850e(0x1d5)]&&(_0x225168[_0x18850e(0x1cd)]['activation']=_0x1b80cc);}}}}export function consolidateSegmentsByContent(_0x45ca87,_0x569cad){const _0x40c6dc=a135_0x1d4e,_0x290716={},_0xab7728=new Map(),_0x3478bc=new Map();for(const _0x44fa83 of _0x45ca87){if(!_0x44fa83)continue;for(const [_0x4f1f91,_0x5dca0a]of Object[_0x40c6dc(0x1d2)](_0x44fa83)){if(!_0x5dca0a[_0x40c6dc(0x1e7)]){_0x290716[_0x4f1f91]=_0x5dca0a,_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x4f1f91);continue;}const _0x4a986c=_0x5dca0a[_0x40c6dc(0x1d3)]&&_0x5dca0a[_0x40c6dc(0x1d3)][_0x40c6dc(0x1c9)]()?_0x5dca0a[_0x40c6dc(0x1d3)]:undefined,_0x4d227b=JSON['stringify']({'description':_0x4a986c,'rule':deepSortObject(_0x5dca0a['rule'])}),_0x2319f3=_0x3478bc['get'](_0x4d227b);if(_0x2319f3){const _0x4154c5={..._0x5dca0a[_0x40c6dc(0x1d3)]!==undefined&&{'description':_0x5dca0a[_0x40c6dc(0x1d3)]},'rule':_0x5dca0a['rule']?deepSortObject(_0x5dca0a[_0x40c6dc(0x1e7)]):_0x5dca0a[_0x40c6dc(0x1e7)]};if(_0x4f1f91<_0x2319f3){_0x290716[_0x4f1f91]=_0x4154c5,delete _0x290716[_0x2319f3];for(const [_0x18b295,_0x224779]of _0xab7728[_0x40c6dc(0x1d2)]()){_0x224779===_0x2319f3&&_0xab7728['set'](_0x18b295,_0x4f1f91);}_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x4f1f91),_0x3478bc['set'](_0x4d227b,_0x4f1f91);}else _0x290716[_0x2319f3]=_0x4154c5,_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x2319f3);}else{let _0x3a4dec=_0x4f1f91;if(_0x569cad){const _0x45c784=_0x569cad[_0x40c6dc(0x1ed)](_0x4d227b);_0x45c784&&_0x45c784[_0x40c6dc(0x1bc)]>0x0&&(_0x3a4dec=_0x45c784[_0x40c6dc(0x1ee)]()[_0x40c6dc(0x1fd)]()[0x0]);}const _0x48ba0b={..._0x5dca0a[_0x40c6dc(0x1d3)]!==undefined&&{'description':_0x5dca0a[_0x40c6dc(0x1d3)]},'rule':_0x5dca0a[_0x40c6dc(0x1e7)]?deepSortObject(_0x5dca0a[_0x40c6dc(0x1e7)]):_0x5dca0a[_0x40c6dc(0x1e7)]};_0x290716[_0x3a4dec]=_0x48ba0b,_0xab7728[_0x40c6dc(0x1d1)](_0x4f1f91,_0x3a4dec),_0x3478bc[_0x40c6dc(0x1d1)](_0x4d227b,_0x3a4dec);}}}return{'merged':_0x290716,'nameMapping':_0xab7728};}export function updateSegmentReferences(_0x4a99f6,_0x5dad0a){const _0x47bc07=a135_0x1d4e;if(!_0x4a99f6)return;for(const _0x1acf1d of _0x4a99f6){if(_0x1acf1d[_0x47bc07(0x1ef)]?.['segment']){const _0x246bd8=_0x5dad0a['get'](_0x1acf1d[_0x47bc07(0x1ef)][_0x47bc07(0x203)]);_0x246bd8&&(_0x1acf1d['entry_criteria'][_0x47bc07(0x203)]=_0x246bd8);}if(_0x1acf1d['exit_criteria'])for(const _0x1a326c of _0x1acf1d[_0x47bc07(0x1f5)]){if(_0x1a326c[_0x47bc07(0x203)]){const _0x211db2=_0x5dad0a[_0x47bc07(0x1ed)](_0x1a326c[_0x47bc07(0x203)]);_0x211db2&&(_0x1a326c[_0x47bc07(0x203)]=_0x211db2);}}if(_0x1acf1d[_0x47bc07(0x1b7)]?.['segment']){const _0x2f0999=_0x5dad0a[_0x47bc07(0x1ed)](_0x1acf1d[_0x47bc07(0x1b7)]['segment']);_0x2f0999&&(_0x1acf1d[_0x47bc07(0x1b7)][_0x47bc07(0x203)]=_0x2f0999);}if(_0x1acf1d[_0x47bc07(0x1bd)])for(const _0x22cb4f of _0x1acf1d[_0x47bc07(0x1bd)]){if(_0x22cb4f[_0x47bc07(0x1ba)]===_0x47bc07(0x1bb)&&_0x22cb4f[_0x47bc07(0x1cd)]?.['branches'])for(const _0xef23d1 of _0x22cb4f[_0x47bc07(0x1cd)][_0x47bc07(0x1b8)]){if(_0xef23d1['segment']){const _0x325f0b=_0x5dad0a['get'](_0xef23d1[_0x47bc07(0x203)]);_0x325f0b&&(_0xef23d1[_0x47bc07(0x203)]=_0x325f0b);}}if(_0x22cb4f[_0x47bc07(0x1ba)]===_0x47bc07(0x1c6)&&_0x22cb4f[_0x47bc07(0x1cd)]?.[_0x47bc07(0x1fe)]?.[_0x47bc07(0x203)]){const _0x3561c3=_0x5dad0a[_0x47bc07(0x1ed)](_0x22cb4f[_0x47bc07(0x1cd)][_0x47bc07(0x1fe)][_0x47bc07(0x203)]);_0x3561c3&&(_0x22cb4f[_0x47bc07(0x1cd)][_0x47bc07(0x1fe)][_0x47bc07(0x203)]=_0x3561c3);}}}}export function updateSegmentRefsInSegments(_0x5a5dde,_0x5b7ff7){const _0x111fee=a135_0x1d4e;for(const _0x59c424 of Object[_0x111fee(0x1d8)](_0x5a5dde)){_0x59c424['rule']&&updateSegmentRefsInRule(_0x59c424['rule'],_0x5b7ff7);}}function updateSegmentRefsInRule(_0x1e3643,_0x438426){const _0x2b8844=a135_0x1d4e;if(_0x1e3643===null||typeof _0x1e3643!==_0x2b8844(0x1f3))return;if(Array[_0x2b8844(0x1d9)](_0x1e3643)){for(const _0x12b1de of _0x1e3643){updateSegmentRefsInRule(_0x12b1de,_0x438426);}return;}const _0x5a872f=_0x1e3643;if((_0x5a872f[_0x2b8844(0x1ba)]===_0x2b8844(0x1c1)||_0x5a872f[_0x2b8844(0x1ba)]==='exclude')&&typeof _0x5a872f[_0x2b8844(0x203)]===_0x2b8844(0x1f7)){const _0x3c1732=_0x438426['get'](_0x5a872f[_0x2b8844(0x203)]);_0x3c1732&&(_0x5a872f['segment']=_0x3c1732);}if(_0x5a872f[_0x2b8844(0x1db)]&&Array[_0x2b8844(0x1d9)](_0x5a872f[_0x2b8844(0x1db)]))for(const _0x3c36f3 of _0x5a872f[_0x2b8844(0x1db)]){updateSegmentRefsInRule(_0x3c36f3,_0x438426);}}export function buildJourneysArray(_0x11c169,_0x50a1f4){const _0x514d4d=a135_0x1d4e;return _0x11c169[_0x514d4d(0x1f2)](_0x26af10=>{const _0x5da277=_0x514d4d,_0x1e4251=_0x50a1f4?_0x26af10['item']['id']===_0x50a1f4:_0x11c169['length']===0x1,_0x32dfc5=_0x26af10[_0x5da277(0x1cb)]['journeys']?.[0x0],_0x3a42e4=_0x32dfc5?.[_0x5da277(0x1f4)]||_0x26af10['yaml'][_0x5da277(0x1f4)],_0x26d772={'version':_0x32dfc5?.[_0x5da277(0x1c0)]||_0x26af10['yaml'][_0x5da277(0x1c0)]||_0x26af10[_0x5da277(0x1f0)][_0x5da277(0x1f8)],'state':_0x26af10[_0x5da277(0x1f0)][_0x5da277(0x1dd)]===_0x5da277(0x1eb)?_0x5da277(0x1eb):_0x5da277(0x1f9),'stages':_0x32dfc5?.[_0x5da277(0x1ce)]||_0x26af10[_0x5da277(0x1cb)][_0x5da277(0x1ce)]||[],'id':_0x32dfc5?.['id']||_0x26af10[_0x5da277(0x1cb)]['id'],'version_number':_0x32dfc5?.[_0x5da277(0x1e1)]||_0x26af10[_0x5da277(0x1cb)]['version_number']};return _0x3a42e4&&(_0x26d772[_0x5da277(0x1f4)]=_0x3a42e4),_0x1e4251&&(_0x26d772['latest']=!![]),_0x26d772;});}export function buildMergedJourneyDef(_0x503b72,_0x5f2602,_0x1748b8){const _0x2b8b9a=a135_0x1d4e,_0x5ad76e=_0x503b72[0x0][_0x2b8b9a(0x1cb)],_0x3f88f8=buildJourneysArray(_0x503b72,_0x1748b8),{merged:_0x48aefa,nameMapping:_0x2f9d83}=consolidateSegmentsByContent(_0x503b72['map'](_0x4f7f85=>_0x4f7f85['yaml']['segments']),_0x5f2602);updateSegmentRefsInSegments(_0x48aefa,_0x2f9d83);const _0x54dc2f=Array['from'](_0x2f9d83[_0x2b8b9a(0x1d2)]())[_0x2b8b9a(0x1ff)](([_0x3afa42,_0x442e85])=>_0x3afa42!==_0x442e85&&_0x3afa42[_0x2b8b9a(0x1ea)]('entry_criteria'));let _0x4cbe6e=_0x48aefa,_0x221268=new Map();if(_0x54dc2f){const _0x55cd80=consolidateSegmentsByContent([_0x48aefa],_0x5f2602);_0x4cbe6e=_0x55cd80[_0x2b8b9a(0x1e2)],_0x221268=_0x55cd80[_0x2b8b9a(0x202)];}const _0x1cfd88=new Map(_0x2f9d83);for(const [_0x355f82,_0x241539]of _0x221268[_0x2b8b9a(0x1d2)]()){_0x1cfd88[_0x2b8b9a(0x1d1)](_0x355f82,_0x241539);}for(const [_0x2e2627,_0xe44073]of _0x1cfd88[_0x2b8b9a(0x1d2)]()){let _0x3d5aae=_0xe44073,_0xcbbdb8=0x0;while(_0x1cfd88[_0x2b8b9a(0x1d0)](_0x3d5aae)&&_0x1cfd88[_0x2b8b9a(0x1ed)](_0x3d5aae)!==_0x3d5aae&&_0xcbbdb8<MAX_MAPPING_CHAIN_DEPTH){_0x3d5aae=_0x1cfd88[_0x2b8b9a(0x1ed)](_0x3d5aae),_0xcbbdb8++;}_0x3d5aae!==_0xe44073&&_0x1cfd88[_0x2b8b9a(0x1d1)](_0x2e2627,_0x3d5aae);}for(const _0x368982 of _0x3f88f8){updateSegmentReferences(_0x368982['stages'],_0x1cfd88);}const {merged:_0x4275a6,nameMapping:_0x38fe27}=consolidateActivationsByContent(_0x503b72[_0x2b8b9a(0x1f2)](_0x41f5d7=>_0x41f5d7[_0x2b8b9a(0x1cb)][_0x2b8b9a(0x1de)]));for(const _0x585ae1 of _0x3f88f8){updateActivationReferences(_0x585ae1[_0x2b8b9a(0x1ce)],_0x38fe27);}let _0x1de5cc=_0x5ad76e[_0x2b8b9a(0x1f4)];if(_0x1de5cc?.[_0x2b8b9a(0x203)]){const _0xa4a877=_0x1cfd88['get'](_0x1de5cc[_0x2b8b9a(0x203)]);_0xa4a877&&(_0x1de5cc={..._0x1de5cc,'segment':_0xa4a877});}for(const _0x2d57dc of _0x3f88f8){if(_0x2d57dc[_0x2b8b9a(0x1f4)]?.[_0x2b8b9a(0x203)]){const _0x1c9910=_0x1cfd88['get'](_0x2d57dc[_0x2b8b9a(0x1f4)][_0x2b8b9a(0x203)]);_0x1c9910&&(_0x2d57dc[_0x2b8b9a(0x1f4)]={..._0x2d57dc[_0x2b8b9a(0x1f4)],'segment':_0x1c9910});}}return _0x3f88f8[_0x2b8b9a(0x1ff)](_0xb56694=>_0xb56694[_0x2b8b9a(0x1f4)])&&(_0x1de5cc=undefined),{'type':_0x2b8b9a(0x1d6),'name':_0x5ad76e[_0x2b8b9a(0x1f8)],'description':_0x5ad76e[_0x2b8b9a(0x1d3)],'goal':_0x1de5cc,'reentry':_0x5ad76e[_0x2b8b9a(0x1b9)],'segments':Object[_0x2b8b9a(0x1b6)](_0x4cbe6e)[_0x2b8b9a(0x1bc)]>0x0?_0x4cbe6e:undefined,'activations':Object[_0x2b8b9a(0x1b6)](_0x4275a6)[_0x2b8b9a(0x1bc)]>0x0?_0x4275a6:undefined,'journeys':_0x3f88f8,'bundle_id':_0x5ad76e[_0x2b8b9a(0x1bf)],'bundle_name':_0x5ad76e[_0x2b8b9a(0x1fa)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x1a99f9,_0x476019,_0x59df8b,_0x3b69fb){const _0x337e17=a135_0x1d4e,_0x48c78b=_0x1a99f9+':'+_0x476019,_0xce7fe0=_0x59df8b['get'](_0x48c78b);if(_0xce7fe0)return _0xce7fe0;const _0x2bc6b9=await _0x3b69fb(_0x1a99f9),_0x4b4999=_0x2bc6b9[_0x337e17(0x1c3)][_0x337e17(0x1e0)]||_0x2bc6b9[_0x337e17(0x1c3)][_0x337e17(0x1f8)],_0x2682ff=_0x2bc6b9[_0x337e17(0x1c3)][_0x337e17(0x1da)][_0x337e17(0x1e6)](_0x1a7c88=>String(_0x1a7c88['id'])===String(_0x476019)),_0x5296b2=_0x2682ff?.[_0x337e17(0x1f8)]||_0x476019,_0x10d560={'journeyName':_0x4b4999,'stageName':_0x5296b2};return _0x59df8b[_0x337e17(0x1d1)](_0x48c78b,_0x10d560),_0x10d560;}export function formatApiJourneyName(_0x20c2d8,_0x148ecf){return _0x148ecf+'\x20('+_0x20c2d8+')';}export function isLocalJourneyRef(_0x52a35d){const _0x205764=a135_0x1d4e;return _0x52a35d[_0x205764(0x1fc)](_0x205764(0x200))||_0x52a35d[_0x205764(0x1fc)]('.yaml');}export function buildLocalRuleToNameMapping(_0x5ef646){const _0x5a1353=a135_0x1d4e,_0x129e58=new Map();if(!_0x5ef646)return _0x129e58;for(const [_0x519edc,_0x4aa517]of Object['entries'](_0x5ef646)){if(_0x4aa517[_0x5a1353(0x1e7)]){const _0x431e61=serializeRule(_0x4aa517[_0x5a1353(0x1e7)]),_0x296115=_0x129e58[_0x5a1353(0x1ed)](_0x431e61)||[];_0x296115['push'](_0x519edc),_0x129e58[_0x5a1353(0x1d1)](_0x431e61,_0x296115);}}return _0x129e58;}function a135_0xc712(){const _0x1289cf=['exit_criteria','null','string','name','draft','bundle_name','stringify','endsWith','sort','condition','some','.yml','journeys','nameMapping','segment','columns','connector_config','versions','keys','milestone','branches','reentry','type','decision_point','length','steps','56ZWcvup','bundle_id','version','include','1315090TDicDA','attributes','schedule','notification','wait','segments','all_columns','trim','toLowerCase','yaml','2844568EnEspD','with','stages','replace','has','set','entries','description','842854XuqGTf','activation','journey','4971824KpHlxr','values','isArray','journeyStages','conditions','match','state','activations','behavior','journeyBundleName','version_number','merged','join','1117884kgIlJT','activation_template_id','find','rule','push','4207194OYMRmJ','startsWith','launched','index','get','slice','entry_criteria','item','4125930GYuhWH','map','object','goal'];a135_0xc712=function(){return _0x1289cf;};return a135_0xc712();}export function buildLocalRuleToNameMappingFromJourney(_0x2e87cc){const _0x41c023=a135_0x1d4e,_0x1baabd=_0x2e87cc[_0x41c023(0x1c7)];if(!_0x1baabd)return new Map();const _0x56fa4d=collectSegmentUsageCounts(_0x2e87cc),_0x3442ed=new Map();let _0x4d46a9=0x0;for(const [_0xfdcb4a,_0x1da1c2]of Object[_0x41c023(0x1d2)](_0x1baabd)){if(!_0x1da1c2[_0x41c023(0x1e7)]){_0x4d46a9++;continue;}const _0x5bb318=serializeRule(_0x1da1c2['rule']),_0xe11aaa=_0x3442ed['get'](_0x5bb318)||[];_0xe11aaa[_0x41c023(0x1e8)]({'name':_0xfdcb4a,'index':_0x4d46a9}),_0x3442ed[_0x41c023(0x1d1)](_0x5bb318,_0xe11aaa),_0x4d46a9++;}const _0x403c73=new Map();for(const [_0x1b85ea,_0x3eca36]of _0x3442ed){const _0xc12191=_0x3eca36[_0x41c023(0x1ee)]()[_0x41c023(0x1fd)]((_0x19c783,_0x42ccd7)=>{const _0x43a976=_0x41c023,_0x3a03ad=_0x56fa4d[_0x43a976(0x1ed)](_0x19c783['name'])||0x0,_0x8b5498=_0x56fa4d[_0x43a976(0x1ed)](_0x42ccd7[_0x43a976(0x1f8)])||0x0;if(_0x3a03ad!==_0x8b5498)return _0x8b5498-_0x3a03ad;return _0x19c783['index']-_0x42ccd7[_0x43a976(0x1ec)];})['map'](_0x1bcc41=>_0x1bcc41['name']);_0x403c73[_0x41c023(0x1d1)](_0x1b85ea,_0xc12191);}return _0x403c73;}export function collectSegmentUsageCounts(_0x3d370c){const _0x1a5646=a135_0x1d4e,_0x2fc249=new Map(),_0x7af3a3=_0x227a13=>{const _0x461aae=a135_0x1d4e;if(!_0x227a13)return;_0x2fc249[_0x461aae(0x1d1)](_0x227a13,(_0x2fc249[_0x461aae(0x1ed)](_0x227a13)||0x0)+0x1);},_0x3f3859=_0x203193=>{const _0x547802=a135_0x1d4e;for(const _0xdcfe39 of _0x203193){_0x7af3a3(_0xdcfe39[_0x547802(0x1ef)]?.[_0x547802(0x203)]);if(_0xdcfe39[_0x547802(0x1f5)])for(const _0x34206d of _0xdcfe39['exit_criteria']){_0x7af3a3(_0x34206d[_0x547802(0x203)]);}_0x7af3a3(_0xdcfe39[_0x547802(0x1b7)]?.[_0x547802(0x203)]);if(_0xdcfe39['steps'])for(const _0x5f5d7c of _0xdcfe39[_0x547802(0x1bd)]){if(_0x5f5d7c[_0x547802(0x1ba)]===_0x547802(0x1bb))for(const _0xae4bd2 of _0x5f5d7c['with'][_0x547802(0x1b8)]){_0x7af3a3(_0xae4bd2['segment']);}else _0x5f5d7c[_0x547802(0x1ba)]===_0x547802(0x1c6)&&_0x7af3a3(_0x5f5d7c['with'][_0x547802(0x1fe)]?.[_0x547802(0x203)]);}}};_0x7af3a3(_0x3d370c['goal']?.['segment']);if(_0x3d370c[_0x1a5646(0x201)])for(const _0x2c4129 of _0x3d370c[_0x1a5646(0x201)]){_0x7af3a3(_0x2c4129[_0x1a5646(0x1f4)]?.[_0x1a5646(0x203)]),_0x3f3859(_0x2c4129[_0x1a5646(0x1ce)]);}_0x3d370c[_0x1a5646(0x1ce)]&&_0x3f3859(_0x3d370c[_0x1a5646(0x1ce)]);if(_0x3d370c[_0x1a5646(0x1b5)])for(const _0x1cc3ff of _0x3d370c[_0x1a5646(0x1b5)]){_0x3f3859(_0x1cc3ff[_0x1a5646(0x1ce)]);}return _0x2fc249;}
|
|
1
|
+
(function(_0x156796,_0xbcffa5){const _0x2fb7e4=a135_0x3cb2,_0x56d42f=_0x156796();while(!![]){try{const _0x1ea5eb=parseInt(_0x2fb7e4(0x109))/0x1+parseInt(_0x2fb7e4(0x10e))/0x2*(parseInt(_0x2fb7e4(0x108))/0x3)+parseInt(_0x2fb7e4(0xe1))/0x4+parseInt(_0x2fb7e4(0x103))/0x5+parseInt(_0x2fb7e4(0xce))/0x6+-parseInt(_0x2fb7e4(0x101))/0x7*(parseInt(_0x2fb7e4(0x113))/0x8)+-parseInt(_0x2fb7e4(0xef))/0x9;if(_0x1ea5eb===_0xbcffa5)break;else _0x56d42f['push'](_0x56d42f['shift']());}catch(_0x2f6c77){_0x56d42f['push'](_0x56d42f['shift']());}}}(a135_0x470a,0xc4795));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x29f899){const _0x2c0618=a135_0x3cb2;return _0x29f899[_0x2c0618(0xe8)]()[_0x2c0618(0xe7)](/\s+/g,'_')[_0x2c0618(0xe7)](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x2c0618(0xe7)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3a07d9){const _0x330064=a135_0x3cb2,_0x13dead=_0x3a07d9[_0x330064(0xc6)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x13dead){const _0x6c3b71=_0x13dead[0x1][_0x330064(0xe8)](),_0x5483f9=_0x13dead[0x2],_0x25a3fb=_0x5483f9[_0x330064(0xe7)](/-/g,'')[_0x330064(0xd8)](0x0,0x4)[_0x330064(0xe8)]();return _0x6c3b71+'_'+_0x25a3fb;}const _0x27917c=_0x3a07d9['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x27917c){const _0x4644c0=_0x27917c[0x1],_0x3a17a3=_0x27917c[0x2]['toLowerCase'](),_0x22cc23=_0x4644c0[_0x330064(0xe7)](/-/g,'')[_0x330064(0xd8)](0x0,0x4)[_0x330064(0xe8)]();return _0x3a17a3+'_'+_0x22cc23;}return undefined;}function stableStringify(_0x6402c2){const _0x1e8edc=a135_0x3cb2;if(Array['isArray'](_0x6402c2))return'['+_0x6402c2['map'](_0x1d902e=>stableStringify(_0x1d902e))['join'](',')+']';if(_0x6402c2&&typeof _0x6402c2===_0x1e8edc(0xfe)){const _0x41c9f0=_0x6402c2,_0x2b4c4e=Object['keys'](_0x41c9f0)[_0x1e8edc(0x100)](),_0x55f65b=_0x2b4c4e[_0x1e8edc(0x106)](_0x57f835=>'\x22'+_0x57f835+'\x22:'+stableStringify(_0x41c9f0[_0x57f835]));return'{'+_0x55f65b[_0x1e8edc(0xcd)](',')+'}';}const _0x1451fc=JSON['stringify'](_0x6402c2);return _0x1451fc===undefined?'null':_0x1451fc;}export function consolidateActivationsByContent(_0x148ced){const _0x37fe02=a135_0x3cb2,_0x3bd37c={},_0x448302=new Map(),_0x496bc6=new Map();for(const _0x3c1641 of _0x148ced){if(!_0x3c1641)continue;for(const [_0x4f5b5d,_0x5a3913]of Object[_0x37fe02(0xd0)](_0x3c1641)){const _0x1e66b8={'name':_0x5a3913[_0x37fe02(0x105)],'connection':_0x5a3913[_0x37fe02(0xf9)],..._0x5a3913[_0x37fe02(0x111)]!==undefined&&{'all_columns':_0x5a3913['all_columns']},..._0x5a3913[_0x37fe02(0xd3)]!==undefined&&{'columns':_0x5a3913['columns']},..._0x5a3913[_0x37fe02(0xd9)]!==undefined&&{'behavior':_0x5a3913['behavior']},..._0x5a3913[_0x37fe02(0xdb)]!==undefined&&{'schedule':_0x5a3913['schedule']},..._0x5a3913[_0x37fe02(0xeb)]!==undefined&&{'notification':_0x5a3913['notification']},..._0x5a3913[_0x37fe02(0x114)]!==undefined&&{'connector_config':_0x5a3913[_0x37fe02(0x114)]},..._0x5a3913[_0x37fe02(0xf3)]!==undefined&&{'activation_template_id':_0x5a3913[_0x37fe02(0xf3)]}},_0x1011a7=stableStringify(_0x1e66b8),_0x457bd3=_0x496bc6['get'](_0x1011a7);_0x457bd3?_0x448302['set'](_0x4f5b5d,_0x457bd3):(_0x3bd37c[_0x4f5b5d]=_0x5a3913,_0x448302[_0x37fe02(0xcb)](_0x4f5b5d,_0x4f5b5d),_0x496bc6['set'](_0x1011a7,_0x4f5b5d));}}return{'merged':_0x3bd37c,'nameMapping':_0x448302};}export function updateActivationReferences(_0xbe06e9,_0x5da3a3){const _0x5e3c5f=a135_0x3cb2;if(!_0xbe06e9)return;for(const _0x3d9ace of _0xbe06e9){if(!_0x3d9ace[_0x5e3c5f(0xe6)])continue;for(const _0x9c9da0 of _0x3d9ace[_0x5e3c5f(0xe6)]){if(_0x9c9da0[_0x5e3c5f(0x104)]===_0x5e3c5f(0x112)&&_0x9c9da0[_0x5e3c5f(0x10c)]?.['activation']){const _0x41c596=_0x5da3a3[_0x5e3c5f(0x110)](_0x9c9da0['with'][_0x5e3c5f(0x112)]);_0x41c596&&_0x41c596!==_0x9c9da0[_0x5e3c5f(0x10c)][_0x5e3c5f(0x112)]&&(_0x9c9da0[_0x5e3c5f(0x10c)]['activation']=_0x41c596);}}}}export function consolidateSegmentsByContent(_0x5ac199,_0x4787ef){const _0x310ef0=a135_0x3cb2,_0x3cac05={},_0x11cb32=new Map(),_0x45541d=new Map();for(const _0x7fb2b3 of _0x5ac199){if(!_0x7fb2b3)continue;for(const [_0xd9b14f,_0x4713e1]of Object[_0x310ef0(0xd0)](_0x7fb2b3)){if(!_0x4713e1[_0x310ef0(0xe2)]){_0x3cac05[_0xd9b14f]=_0x4713e1,_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0xd9b14f);continue;}const _0x58e2e1=_0x4713e1[_0x310ef0(0xf7)]&&_0x4713e1[_0x310ef0(0xf7)][_0x310ef0(0xdf)]()?_0x4713e1[_0x310ef0(0xf7)]:undefined,_0x312966=JSON['stringify']({'description':_0x58e2e1,'rule':deepSortObject(_0x4713e1['rule'])}),_0x25284f=_0x45541d['get'](_0x312966);if(_0x25284f){const _0x5a3bea={..._0x4713e1[_0x310ef0(0xf7)]!==undefined&&{'description':_0x4713e1[_0x310ef0(0xf7)]},'rule':_0x4713e1[_0x310ef0(0xe2)]?deepSortObject(_0x4713e1['rule']):_0x4713e1[_0x310ef0(0xe2)]};if(_0xd9b14f<_0x25284f){_0x3cac05[_0xd9b14f]=_0x5a3bea,delete _0x3cac05[_0x25284f];for(const [_0x28ece9,_0x240d02]of _0x11cb32['entries']()){_0x240d02===_0x25284f&&_0x11cb32[_0x310ef0(0xcb)](_0x28ece9,_0xd9b14f);}_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0xd9b14f),_0x45541d[_0x310ef0(0xcb)](_0x312966,_0xd9b14f);}else _0x3cac05[_0x25284f]=_0x5a3bea,_0x11cb32['set'](_0xd9b14f,_0x25284f);}else{let _0x222490=_0xd9b14f;if(_0x4787ef){const _0x4630a9=_0x4787ef[_0x310ef0(0x110)](_0x312966);_0x4630a9&&_0x4630a9[_0x310ef0(0xca)]>0x0&&(_0x222490=_0x4630a9[_0x310ef0(0xd8)]()[_0x310ef0(0x100)]()[0x0]);}const _0x44a038={..._0x4713e1[_0x310ef0(0xf7)]!==undefined&&{'description':_0x4713e1[_0x310ef0(0xf7)]},'rule':_0x4713e1['rule']?deepSortObject(_0x4713e1[_0x310ef0(0xe2)]):_0x4713e1[_0x310ef0(0xe2)]};_0x3cac05[_0x222490]=_0x44a038,_0x11cb32[_0x310ef0(0xcb)](_0xd9b14f,_0x222490),_0x45541d[_0x310ef0(0xcb)](_0x312966,_0x222490);}}}return{'merged':_0x3cac05,'nameMapping':_0x11cb32};}export function updateSegmentReferences(_0x455d21,_0x56729c){const _0x140b04=a135_0x3cb2;if(!_0x455d21)return;for(const _0x35dc18 of _0x455d21){if(_0x35dc18[_0x140b04(0x10d)]?.[_0x140b04(0xfd)]){const _0x5c252d=_0x56729c[_0x140b04(0x110)](_0x35dc18['entry_criteria'][_0x140b04(0xfd)]);_0x5c252d&&(_0x35dc18[_0x140b04(0x10d)][_0x140b04(0xfd)]=_0x5c252d);}if(_0x35dc18[_0x140b04(0xf0)])for(const _0x5d03f8 of _0x35dc18[_0x140b04(0xf0)]){if(_0x5d03f8['segment']){const _0x398505=_0x56729c[_0x140b04(0x110)](_0x5d03f8['segment']);_0x398505&&(_0x5d03f8[_0x140b04(0xfd)]=_0x398505);}}if(_0x35dc18[_0x140b04(0xdd)]?.[_0x140b04(0xfd)]){const _0x34543c=_0x56729c[_0x140b04(0x110)](_0x35dc18[_0x140b04(0xdd)]['segment']);_0x34543c&&(_0x35dc18[_0x140b04(0xdd)][_0x140b04(0xfd)]=_0x34543c);}if(_0x35dc18[_0x140b04(0xe6)])for(const _0x34477e of _0x35dc18[_0x140b04(0xe6)]){if(_0x34477e[_0x140b04(0x104)]===_0x140b04(0xf5)&&_0x34477e[_0x140b04(0x10c)]?.[_0x140b04(0xc9)])for(const _0x52efe9 of _0x34477e[_0x140b04(0x10c)][_0x140b04(0xc9)]){if(_0x52efe9['segment']){const _0x373f09=_0x56729c['get'](_0x52efe9[_0x140b04(0xfd)]);_0x373f09&&(_0x52efe9['segment']=_0x373f09);}}if(_0x34477e[_0x140b04(0x104)]===_0x140b04(0xcf)&&_0x34477e['with']?.[_0x140b04(0xf8)]?.[_0x140b04(0xfd)]){const _0x191e6b=_0x56729c[_0x140b04(0x110)](_0x34477e[_0x140b04(0x10c)][_0x140b04(0xf8)]['segment']);_0x191e6b&&(_0x34477e[_0x140b04(0x10c)][_0x140b04(0xf8)][_0x140b04(0xfd)]=_0x191e6b);}}}}export function updateSegmentRefsInSegments(_0x2a0014,_0x36457c){const _0x3ceddd=a135_0x3cb2;for(const _0x2c9f5e of Object[_0x3ceddd(0xcc)](_0x2a0014)){_0x2c9f5e[_0x3ceddd(0xe2)]&&updateSegmentRefsInRule(_0x2c9f5e[_0x3ceddd(0xe2)],_0x36457c);}}function updateSegmentRefsInRule(_0x1f275b,_0x1972ef){const _0x25987b=a135_0x3cb2;if(_0x1f275b===null||typeof _0x1f275b!=='object')return;if(Array[_0x25987b(0xe4)](_0x1f275b)){for(const _0x34f21e of _0x1f275b){updateSegmentRefsInRule(_0x34f21e,_0x1972ef);}return;}const _0x493f24=_0x1f275b;if((_0x493f24[_0x25987b(0x104)]===_0x25987b(0xdc)||_0x493f24[_0x25987b(0x104)]===_0x25987b(0xff))&&typeof _0x493f24[_0x25987b(0xfd)]===_0x25987b(0xd2)){const _0x563a51=_0x1972ef[_0x25987b(0x110)](_0x493f24[_0x25987b(0xfd)]);_0x563a51&&(_0x493f24[_0x25987b(0xfd)]=_0x563a51);}if(_0x493f24[_0x25987b(0xd6)]&&Array[_0x25987b(0xe4)](_0x493f24[_0x25987b(0xd6)]))for(const _0x122e1d of _0x493f24[_0x25987b(0xd6)]){updateSegmentRefsInRule(_0x122e1d,_0x1972ef);}}export function buildJourneysArray(_0x388409,_0x39e3e4){const _0x39cbfd=a135_0x3cb2;return _0x388409[_0x39cbfd(0x106)](_0x2f1fc8=>{const _0x28bbb9=_0x39cbfd,_0x233a2f=_0x39e3e4?_0x2f1fc8['item']['id']===_0x39e3e4:_0x388409[_0x28bbb9(0xca)]===0x1,_0x1f480d=_0x2f1fc8[_0x28bbb9(0xfa)]['journeys']?.[0x0],_0x3e4b5e=_0x1f480d?.[_0x28bbb9(0xea)]||_0x2f1fc8['yaml']['goal'],_0x2f228c={'version':_0x1f480d?.[_0x28bbb9(0xd1)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0xd1)]||_0x2f1fc8['item'][_0x28bbb9(0x105)],'state':_0x2f1fc8[_0x28bbb9(0xc7)][_0x28bbb9(0xe3)]===_0x28bbb9(0xed)?_0x28bbb9(0xed):'draft','stages':_0x1f480d?.[_0x28bbb9(0xe0)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0xe0)]||[],'id':_0x1f480d?.['id']||_0x2f1fc8['yaml']['id'],'version_number':_0x1f480d?.[_0x28bbb9(0x107)]||_0x2f1fc8[_0x28bbb9(0xfa)][_0x28bbb9(0x107)]};return _0x3e4b5e&&(_0x2f228c[_0x28bbb9(0xea)]=_0x3e4b5e),_0x233a2f&&(_0x2f228c[_0x28bbb9(0x10a)]=!![]),_0x2f228c;});}function a135_0x470a(){const _0x3850cc=['.yaml','schedule','include','milestone','nameMapping','trim','stages','2492008JpjODB','rule','state','isArray','journeyBundleName','steps','replace','toLowerCase','activations','goal','notification','some','launched','segments','21931992YRqCmW','exit_criteria','journey','startsWith','activation_template_id','merged','decision_point','versions','description','condition','connection','yaml','endsWith','journeys','segment','object','exclude','sort','411019hOAtbk','reentry','6327465GsaQVy','type','name','map','version_number','3IPcLev','114864NDNDra','latest','index','with','entry_criteria','3056306UZaeGx','find','get','all_columns','activation','40xFSGIu','connector_config','attributes','match','item','push','branches','length','set','values','join','22308lvooOB','wait','entries','version','string','columns','bundle_name','keys','conditions','journeyStages','slice','behavior'];a135_0x470a=function(){return _0x3850cc;};return a135_0x470a();}export function buildMergedJourneyDef(_0x39f1bc,_0x1bd2a1,_0x570e6b){const _0x116ff4=a135_0x3cb2,_0x7e912d=_0x39f1bc[0x0][_0x116ff4(0xfa)],_0x355705=buildJourneysArray(_0x39f1bc,_0x570e6b),{merged:_0x39088c,nameMapping:_0xc810bc}=consolidateSegmentsByContent(_0x39f1bc[_0x116ff4(0x106)](_0xe23daa=>_0xe23daa[_0x116ff4(0xfa)][_0x116ff4(0xee)]),_0x1bd2a1);updateSegmentRefsInSegments(_0x39088c,_0xc810bc);const _0x5bb843=Array['from'](_0xc810bc[_0x116ff4(0xd0)]())[_0x116ff4(0xec)](([_0xef2474,_0x2fafa4])=>_0xef2474!==_0x2fafa4&&_0xef2474[_0x116ff4(0xf2)](_0x116ff4(0x10d)));let _0xe7cb62=_0x39088c,_0x43dd94=new Map();if(_0x5bb843){const _0x32de54=consolidateSegmentsByContent([_0x39088c],_0x1bd2a1);_0xe7cb62=_0x32de54[_0x116ff4(0xf4)],_0x43dd94=_0x32de54[_0x116ff4(0xde)];}const _0xae68e2=new Map(_0xc810bc);for(const [_0x4df204,_0xbcfc98]of _0x43dd94['entries']()){_0xae68e2[_0x116ff4(0xcb)](_0x4df204,_0xbcfc98);}for(const [_0x53da5d,_0x5d497a]of _0xae68e2[_0x116ff4(0xd0)]()){let _0x24f7c1=_0x5d497a,_0xfd400d=0x0;while(_0xae68e2['has'](_0x24f7c1)&&_0xae68e2[_0x116ff4(0x110)](_0x24f7c1)!==_0x24f7c1&&_0xfd400d<MAX_MAPPING_CHAIN_DEPTH){_0x24f7c1=_0xae68e2[_0x116ff4(0x110)](_0x24f7c1),_0xfd400d++;}_0x24f7c1!==_0x5d497a&&_0xae68e2[_0x116ff4(0xcb)](_0x53da5d,_0x24f7c1);}for(const _0x28ccea of _0x355705){updateSegmentReferences(_0x28ccea[_0x116ff4(0xe0)],_0xae68e2);}const {merged:_0x5f003b,nameMapping:_0x17f539}=consolidateActivationsByContent(_0x39f1bc[_0x116ff4(0x106)](_0x1c8f5e=>_0x1c8f5e[_0x116ff4(0xfa)][_0x116ff4(0xe9)]));for(const _0x22b9cc of _0x355705){updateActivationReferences(_0x22b9cc[_0x116ff4(0xe0)],_0x17f539);}let _0x557401=_0x7e912d[_0x116ff4(0xea)];if(_0x557401?.[_0x116ff4(0xfd)]){const _0x28151c=_0xae68e2[_0x116ff4(0x110)](_0x557401['segment']);_0x28151c&&(_0x557401={..._0x557401,'segment':_0x28151c});}for(const _0x285783 of _0x355705){if(_0x285783[_0x116ff4(0xea)]?.[_0x116ff4(0xfd)]){const _0x4150a4=_0xae68e2[_0x116ff4(0x110)](_0x285783[_0x116ff4(0xea)]['segment']);_0x4150a4&&(_0x285783[_0x116ff4(0xea)]={..._0x285783['goal'],'segment':_0x4150a4});}}return _0x355705[_0x116ff4(0xec)](_0x3cc21c=>_0x3cc21c['goal'])&&(_0x557401=undefined),{'type':_0x116ff4(0xf1),'name':_0x7e912d[_0x116ff4(0x105)],'description':_0x7e912d[_0x116ff4(0xf7)],'goal':_0x557401,'reentry':_0x7e912d[_0x116ff4(0x102)],'segments':Object['keys'](_0xe7cb62)[_0x116ff4(0xca)]>0x0?_0xe7cb62:undefined,'activations':Object[_0x116ff4(0xd5)](_0x5f003b)['length']>0x0?_0x5f003b:undefined,'journeys':_0x355705,'bundle_id':_0x7e912d['bundle_id'],'bundle_name':_0x7e912d[_0x116ff4(0xd4)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x45f02f,_0x2bda16,_0x9aa672,_0x165def){const _0x56e713=a135_0x3cb2,_0x3a1047=_0x45f02f+':'+_0x2bda16,_0xb53b87=_0x9aa672['get'](_0x3a1047);if(_0xb53b87)return _0xb53b87;const _0x4427be=await _0x165def(_0x45f02f),_0x4e0db5=_0x4427be[_0x56e713(0xc5)][_0x56e713(0xe5)]||_0x4427be[_0x56e713(0xc5)][_0x56e713(0x105)],_0x103d37=_0x4427be[_0x56e713(0xc5)][_0x56e713(0xd7)][_0x56e713(0x10f)](_0x23d535=>String(_0x23d535['id'])===String(_0x2bda16)),_0x3b3476=_0x103d37?.['name']||_0x2bda16,_0x2dac5d={'journeyName':_0x4e0db5,'stageName':_0x3b3476};return _0x9aa672[_0x56e713(0xcb)](_0x3a1047,_0x2dac5d),_0x2dac5d;}export function formatApiJourneyName(_0x2c787a,_0x4c2028){return _0x4c2028+'\x20('+_0x2c787a+')';}export function isLocalJourneyRef(_0x3ef607){const _0x32ae55=a135_0x3cb2;return _0x3ef607['endsWith']('.yml')||_0x3ef607[_0x32ae55(0xfb)](_0x32ae55(0xda));}export function buildLocalRuleToNameMapping(_0x16bb9a){const _0x56661f=a135_0x3cb2,_0x157f1d=new Map();if(!_0x16bb9a)return _0x157f1d;for(const [_0x2362c4,_0x122d7d]of Object[_0x56661f(0xd0)](_0x16bb9a)){if(_0x122d7d[_0x56661f(0xe2)]){const _0x33df81=serializeRule(_0x122d7d['rule']),_0x59b828=_0x157f1d[_0x56661f(0x110)](_0x33df81)||[];_0x59b828[_0x56661f(0xc8)](_0x2362c4),_0x157f1d[_0x56661f(0xcb)](_0x33df81,_0x59b828);}}return _0x157f1d;}function a135_0x3cb2(_0x3ad7c1,_0x1fea78){_0x3ad7c1=_0x3ad7c1-0xc5;const _0x470a2d=a135_0x470a();let _0x3cb242=_0x470a2d[_0x3ad7c1];return _0x3cb242;}export function buildLocalRuleToNameMappingFromJourney(_0x185824){const _0x56d2ec=a135_0x3cb2,_0x4dfb4d=_0x185824[_0x56d2ec(0xee)];if(!_0x4dfb4d)return new Map();const _0x13843f=collectSegmentUsageCounts(_0x185824),_0x2a7764=new Map();let _0x11725f=0x0;for(const [_0x417cdb,_0x17de31]of Object[_0x56d2ec(0xd0)](_0x4dfb4d)){if(!_0x17de31[_0x56d2ec(0xe2)]){_0x11725f++;continue;}const _0x221fe6=serializeRule(_0x17de31['rule']),_0x5a9f88=_0x2a7764['get'](_0x221fe6)||[];_0x5a9f88[_0x56d2ec(0xc8)]({'name':_0x417cdb,'index':_0x11725f}),_0x2a7764['set'](_0x221fe6,_0x5a9f88),_0x11725f++;}const _0x423808=new Map();for(const [_0x406e1f,_0x116bad]of _0x2a7764){const _0x3c4741=_0x116bad['slice']()['sort']((_0x419519,_0x57861c)=>{const _0x54b276=_0x56d2ec,_0x1c7abe=_0x13843f[_0x54b276(0x110)](_0x419519[_0x54b276(0x105)])||0x0,_0x4e121f=_0x13843f[_0x54b276(0x110)](_0x57861c[_0x54b276(0x105)])||0x0;if(_0x1c7abe!==_0x4e121f)return _0x4e121f-_0x1c7abe;return _0x419519[_0x54b276(0x10b)]-_0x57861c[_0x54b276(0x10b)];})['map'](_0x406be9=>_0x406be9[_0x56d2ec(0x105)]);_0x423808['set'](_0x406e1f,_0x3c4741);}return _0x423808;}export function collectSegmentUsageCounts(_0x2c27c9){const _0x4fc91f=a135_0x3cb2,_0x153601=new Map(),_0x3ac6d1=_0x3e2adf=>{const _0x46b63e=a135_0x3cb2;if(!_0x3e2adf)return;_0x153601[_0x46b63e(0xcb)](_0x3e2adf,(_0x153601['get'](_0x3e2adf)||0x0)+0x1);},_0x45905f=_0x3bccc8=>{const _0x410dc8=a135_0x3cb2;for(const _0xa1ff02 of _0x3bccc8){_0x3ac6d1(_0xa1ff02[_0x410dc8(0x10d)]?.[_0x410dc8(0xfd)]);if(_0xa1ff02[_0x410dc8(0xf0)])for(const _0x21319f of _0xa1ff02[_0x410dc8(0xf0)]){_0x3ac6d1(_0x21319f[_0x410dc8(0xfd)]);}_0x3ac6d1(_0xa1ff02[_0x410dc8(0xdd)]?.['segment']);if(_0xa1ff02[_0x410dc8(0xe6)])for(const _0x1bfc21 of _0xa1ff02[_0x410dc8(0xe6)]){if(_0x1bfc21[_0x410dc8(0x104)]==='decision_point')for(const _0x8f9796 of _0x1bfc21[_0x410dc8(0x10c)]['branches']){_0x3ac6d1(_0x8f9796[_0x410dc8(0xfd)]);}else _0x1bfc21[_0x410dc8(0x104)]===_0x410dc8(0xcf)&&_0x3ac6d1(_0x1bfc21[_0x410dc8(0x10c)][_0x410dc8(0xf8)]?.[_0x410dc8(0xfd)]);}}};_0x3ac6d1(_0x2c27c9[_0x4fc91f(0xea)]?.[_0x4fc91f(0xfd)]);if(_0x2c27c9[_0x4fc91f(0xfc)])for(const _0x37b468 of _0x2c27c9[_0x4fc91f(0xfc)]){_0x3ac6d1(_0x37b468[_0x4fc91f(0xea)]?.[_0x4fc91f(0xfd)]),_0x45905f(_0x37b468[_0x4fc91f(0xe0)]);}_0x2c27c9[_0x4fc91f(0xe0)]&&_0x45905f(_0x2c27c9[_0x4fc91f(0xe0)]);if(_0x2c27c9[_0x4fc91f(0xf6)])for(const _0x4cebf6 of _0x2c27c9[_0x4fc91f(0xf6)]){_0x45905f(_0x4cebf6[_0x4fc91f(0xe0)]);}return _0x153601;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x131a02,_0x454ab5){const _0xc46b86=a136_0x4746,_0x25937a=_0x131a02();while(!![]){try{const _0x57b62b=-parseInt(_0xc46b86(0x16f))/0x1*(-parseInt(_0xc46b86(0x1ad))/0x2)+-parseInt(_0xc46b86(0x11f))/0x3+-parseInt(_0xc46b86(0x184))/0x4+parseInt(_0xc46b86(0x105))/0x5*(-parseInt(_0xc46b86(0x187))/0x6)+-parseInt(_0xc46b86(0x130))/0x7+parseInt(_0xc46b86(0x15d))/0x8*(-parseInt(_0xc46b86(0x181))/0x9)+parseInt(_0xc46b86(0x149))/0xa*(parseInt(_0xc46b86(0x16b))/0xb);if(_0x57b62b===_0x454ab5)break;else _0x25937a['push'](_0x25937a['shift']());}catch(_0x170b7f){_0x25937a['push'](_0x25937a['shift']());}}}(a136_0x29fe,0xcb588));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x46bd3c,_0x4175c0,_0x212ce0,_0x318ee1,_0x2f24d9,_0x1d522e){const _0x290bdb=a136_0x4746;return{'level':_0x46bd3c,'path':_0x4175c0,'code':_0x212ce0,'message':_0x318ee1,'location':getLocationFromPath(_0x2f24d9[_0x290bdb(0xff)],_0x2f24d9[_0x290bdb(0xfa)],pathToArray(_0x1d522e??_0x4175c0))};}function validateVersionStructure(_0x194d5c,_0x40b6e9){const _0x1e64c0=a136_0x4746,_0x204d3e=[];return _0x194d5c[_0x1e64c0(0x13c)]>MAX_STAGES&&_0x204d3e[_0x1e64c0(0x19a)](createIssue(_0x1e64c0(0xf8),_0x1e64c0(0x14b),_0x1e64c0(0x192),_0x1e64c0(0x117)+_0x194d5c['length']+_0x1e64c0(0x199)+MAX_STAGES,_0x40b6e9)),_0x204d3e;}function validateStageStructure(_0x318c40,_0xb07a99,_0x1007b4,_0x49da17){const _0x12b30f=a136_0x4746,_0x38f7e2=[],_0x54f62a='stages['+_0xb07a99+']';_0xb07a99===0x0&&!_0x318c40[_0x12b30f(0x154)]&&_0x38f7e2[_0x12b30f(0x19a)](createIssue('error',_0x54f62a+_0x12b30f(0x17c),_0x12b30f(0x108),'Stage\x20\x27'+_0x318c40[_0x12b30f(0x112)]+_0x12b30f(0x143),_0x49da17,_0x54f62a));const _0x30f4c1=_0xb07a99===_0x1007b4-0x1;!_0x30f4c1&&!_0x318c40[_0x12b30f(0x186)]&&_0x38f7e2['push'](createIssue(_0x12b30f(0xf8),_0x54f62a+_0x12b30f(0x122),'MISSING_MILESTONE','Stage\x20\x27'+_0x318c40['name']+_0x12b30f(0x119),_0x49da17,_0x54f62a));(!_0x318c40[_0x12b30f(0x19f)]||_0x318c40[_0x12b30f(0x19f)][_0x12b30f(0x13c)]===0x0)&&_0x38f7e2['push'](createIssue(_0x12b30f(0x193),_0x54f62a+_0x12b30f(0x12c),_0x12b30f(0x13e),_0x12b30f(0x144)+_0x318c40[_0x12b30f(0x112)]+_0x12b30f(0x172),_0x49da17,_0x54f62a));const _0x453ab7=_0x318c40[_0x12b30f(0x178)]?.[_0x12b30f(0x13c)]??0x0;if(_0x453ab7===0x0)_0x38f7e2[_0x12b30f(0x19a)](createIssue(_0x12b30f(0xf8),_0x54f62a+'.steps',_0x12b30f(0x10e),'Stage\x20\x27'+_0x318c40[_0x12b30f(0x112)]+_0x12b30f(0x1b3),_0x49da17,_0x54f62a+'.steps'));else{if(_0x453ab7===0x1)_0x38f7e2[_0x12b30f(0x19a)](createIssue(_0x12b30f(0x193),_0x54f62a+_0x12b30f(0x182),_0x12b30f(0x10e),_0x12b30f(0x144)+_0x318c40[_0x12b30f(0x112)]+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x49da17,_0x54f62a+_0x12b30f(0x182)));else _0x453ab7<=0x3&&_0x38f7e2['push'](createIssue(_0x12b30f(0x193),_0x54f62a+'.steps',_0x12b30f(0x198),_0x12b30f(0x144)+_0x318c40[_0x12b30f(0x112)]+'\x27\x20has\x20only\x20'+_0x453ab7+_0x12b30f(0x171),_0x49da17,_0x54f62a+_0x12b30f(0x182)));}return _0x38f7e2;}function validateStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9){const _0x4d315d=a136_0x4746,_0x1dccd5=[];if(_0x1bfa63[_0x4d315d(0x1ac)]==='end')return _0x1bfa63[_0x4d315d(0x106)]&&_0x1dccd5[_0x4d315d(0x19a)](createIssue(_0x4d315d(0xf8),_0x15e82a+_0x4d315d(0x127),_0x4d315d(0x17e),_0x4d315d(0x141)+_0x1bfa63[_0x4d315d(0x112)]+_0x4d315d(0x18a),_0x2e4b82)),_0x4d315d(0x164)in _0x1bfa63&&_0x1bfa63['with']!==undefined&&_0x1dccd5[_0x4d315d(0x19a)](createIssue('error',_0x15e82a+_0x4d315d(0x11a),_0x4d315d(0x17e),_0x4d315d(0x141)+_0x1bfa63[_0x4d315d(0x112)]+_0x4d315d(0x12d),_0x2e4b82)),_0x1dccd5;_0x1bfa63[_0x4d315d(0x106)]&&(_0x2e4b82[_0x4d315d(0x132)]&&!_0x2e4b82[_0x4d315d(0x132)]['has'](_0x1bfa63[_0x4d315d(0x106)])&&_0x1dccd5[_0x4d315d(0x19a)](createIssue(_0x4d315d(0xf8),_0x15e82a+_0x4d315d(0x127),'INVALID_NEXT_REFERENCE',_0x4d315d(0xfc)+_0x1bfa63[_0x4d315d(0x106)]+'\x27',_0x2e4b82)));switch(_0x1bfa63[_0x4d315d(0x1ac)]){case'wait':_0x1dccd5[_0x4d315d(0x19a)](...validateWaitStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9));break;case _0x4d315d(0x103):_0x1dccd5[_0x4d315d(0x19a)](...validateActivationStep(_0x1bfa63,_0x15e82a,_0x2e4b82));break;case _0x4d315d(0x14c):_0x1dccd5[_0x4d315d(0x19a)](...validateDecisionPointStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9));break;case _0x4d315d(0x17d):_0x1dccd5['push'](...validateAbTestStep(_0x1bfa63,_0x15e82a,_0x2e4b82,_0x5b5ad9));break;case _0x4d315d(0x177):_0x1dccd5[_0x4d315d(0x19a)](...validateJumpStep(_0x1bfa63,_0x15e82a,_0x2e4b82));break;}return _0x1dccd5;}function validateWaitStep(_0x4d0687,_0x1caecd,_0x24efa0,_0x3f906e){const _0x432c39=a136_0x4746,_0x1a3222=[];if(!_0x4d0687[_0x432c39(0x164)])return _0x1a3222['push'](createIssue('error',_0x1caecd+_0x432c39(0x11a),'MISSING_WAIT_PARAMS',_0x432c39(0x125),_0x24efa0,_0x1caecd)),_0x1a3222;if(_0x4d0687[_0x432c39(0x164)][_0x432c39(0x128)]){const _0x4d5652=_0x4d0687[_0x432c39(0x164)][_0x432c39(0x128)];if(_0x4d5652['segment']){_0x24efa0['referencedSegments']?.[_0x432c39(0x18b)](_0x4d5652[_0x432c39(0x19c)]);!_0x4d5652[_0x432c39(0x19c)][_0x432c39(0x191)](_0x432c39(0x174))&&(_0x24efa0[_0x432c39(0x115)]&&!_0x24efa0[_0x432c39(0x115)][_0x432c39(0x11c)](_0x4d5652['segment'])&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0xf8),_0x1caecd+'.with.condition.segment',_0x432c39(0x142),_0x432c39(0xfe)+_0x4d5652[_0x432c39(0x19c)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x24efa0)));_0x4d5652[_0x432c39(0x106)]&&_0x24efa0['stepNames']&&!_0x24efa0[_0x432c39(0x132)][_0x432c39(0x11c)](_0x4d5652[_0x432c39(0x106)])&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0xf8),_0x1caecd+'.with.condition.next',_0x432c39(0x12b),_0x432c39(0x1a4)+_0x4d5652[_0x432c39(0x106)]+'\x27',_0x24efa0));_0x4d5652[_0x432c39(0x15e)]?.[_0x432c39(0x106)]&&_0x24efa0[_0x432c39(0x132)]&&!_0x24efa0['stepNames'][_0x432c39(0x11c)](_0x4d5652['timeout'][_0x432c39(0x106)])&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0xf8),_0x1caecd+_0x432c39(0x14e),_0x432c39(0x12b),_0x432c39(0x14d)+_0x4d5652[_0x432c39(0x15e)][_0x432c39(0x106)]+'\x27',_0x24efa0));const _0x1cea35=_0x4d5652[_0x432c39(0x106)]||_0x4d0687['next'],_0x23db97=_0x4d5652[_0x432c39(0x15e)]?.[_0x432c39(0x106)]||_0x4d0687['next'];if(_0x1cea35){const _0x552f89=_0x3f906e[_0x432c39(0x140)](_0x1cea35);_0x552f89?.['type']===_0x432c39(0x19e)&&_0x1a3222[_0x432c39(0x19a)](createIssue('warning',_0x1caecd+'.with.condition.next',_0x432c39(0x113),_0x432c39(0x152)+_0x1cea35+_0x432c39(0x16e),_0x24efa0,_0x1caecd+_0x432c39(0x157)));}if(_0x23db97){const _0x471222=_0x3f906e[_0x432c39(0x140)](_0x23db97);_0x471222?.[_0x432c39(0x1ac)]===_0x432c39(0x19e)&&_0x1a3222[_0x432c39(0x19a)](createIssue(_0x432c39(0x193),_0x1caecd+_0x432c39(0x14e),'BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x23db97+_0x432c39(0x16e),_0x24efa0,_0x1caecd+_0x432c39(0x163)));}}}return _0x1a3222;}function validateActivationStep(_0x4ae950,_0x1a054d,_0x5e0f75){const _0x5315d5=a136_0x4746,_0x9236e6=[];if(!_0x4ae950[_0x5315d5(0x164)]?.[_0x5315d5(0x103)])return _0x9236e6[_0x5315d5(0x19a)](createIssue(_0x5315d5(0xf8),_0x1a054d+_0x5315d5(0x18c),_0x5315d5(0x17a),_0x5315d5(0x13f),_0x5e0f75,_0x1a054d)),_0x9236e6;const _0x12fa33=_0x4ae950[_0x5315d5(0x164)][_0x5315d5(0x103)];return _0x5e0f75[_0x5315d5(0x155)]&&!_0x12fa33[_0x5315d5(0x191)]('ref:')&&(!_0x5e0f75[_0x5315d5(0x155)][_0x5315d5(0x11c)](_0x12fa33)&&_0x9236e6[_0x5315d5(0x19a)](createIssue(_0x5315d5(0xf8),_0x1a054d+'.with.activation',_0x5315d5(0x11e),_0x5315d5(0xfb)+_0x12fa33+_0x5315d5(0xf7),_0x5e0f75))),_0x9236e6;}function validateDecisionPointStep(_0x210265,_0x3a1215,_0x34afa0,_0xffe9e4){const _0xdb95b4=a136_0x4746,_0x10d816=[];if(!_0x210265['with']?.['branches']||_0x210265[_0xdb95b4(0x164)][_0xdb95b4(0x1a0)][_0xdb95b4(0x13c)]===0x0)return _0x10d816[_0xdb95b4(0x19a)](createIssue('error',_0x3a1215+_0xdb95b4(0x1aa),_0xdb95b4(0x1a3),_0xdb95b4(0x12e),_0x34afa0,_0x3a1215)),_0x10d816;for(let _0x186f4b=0x0;_0x186f4b<_0x210265[_0xdb95b4(0x164)][_0xdb95b4(0x1a0)][_0xdb95b4(0x13c)];_0x186f4b++){const _0x1b44fc=_0x210265[_0xdb95b4(0x164)][_0xdb95b4(0x1a0)][_0x186f4b],_0x18f4e0=_0x3a1215+'.with.branches['+_0x186f4b+']';_0x1b44fc[_0xdb95b4(0x19c)]&&!_0x1b44fc[_0xdb95b4(0x196)]&&(_0x34afa0[_0xdb95b4(0x1af)]?.['add'](_0x1b44fc[_0xdb95b4(0x19c)]),!_0x1b44fc[_0xdb95b4(0x19c)][_0xdb95b4(0x191)](_0xdb95b4(0x174))&&(_0x34afa0[_0xdb95b4(0x115)]&&!_0x34afa0[_0xdb95b4(0x115)]['has'](_0x1b44fc[_0xdb95b4(0x19c)])&&_0x10d816['push'](createIssue(_0xdb95b4(0xf8),_0x18f4e0+_0xdb95b4(0x15a),_0xdb95b4(0x142),_0xdb95b4(0x169)+_0x1b44fc[_0xdb95b4(0x19c)]+'\x27',_0x34afa0))));_0x1b44fc['next']&&_0x34afa0[_0xdb95b4(0x132)]&&!_0x34afa0['stepNames']['has'](_0x1b44fc['next'])&&_0x10d816[_0xdb95b4(0x19a)](createIssue(_0xdb95b4(0xf8),_0x18f4e0+_0xdb95b4(0x127),_0xdb95b4(0x12b),_0xdb95b4(0x161)+_0x1b44fc[_0xdb95b4(0x106)]+'\x27',_0x34afa0));if(_0x1b44fc[_0xdb95b4(0x106)]){const _0x20adcd=_0xffe9e4['get'](_0x1b44fc[_0xdb95b4(0x106)]);_0x20adcd?.['type']==='merge'&&_0x10d816[_0xdb95b4(0x19a)](createIssue(_0xdb95b4(0x193),_0x18f4e0+'.next',_0xdb95b4(0x113),_0xdb95b4(0x135)+_0x1b44fc[_0xdb95b4(0x112)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x1b44fc[_0xdb95b4(0x106)]+_0xdb95b4(0x16d),_0x34afa0));}}return _0x10d816;}function validateAbTestStep(_0x2838ff,_0x136737,_0x2bc685,_0x133dc7){const _0x4cae74=a136_0x4746,_0x5480ae=[];if(!_0x2838ff['with']?.[_0x4cae74(0x138)]||_0x2838ff[_0x4cae74(0x164)][_0x4cae74(0x138)][_0x4cae74(0x13c)]===0x0)return _0x5480ae[_0x4cae74(0x19a)](createIssue(_0x4cae74(0xf8),_0x136737+'.with.variants','MISSING_CONDITIONS',_0x4cae74(0x1a6),_0x2bc685,_0x136737)),_0x5480ae;const _0xa75ffa=_0x2838ff[_0x4cae74(0x164)][_0x4cae74(0x138)][_0x4cae74(0x137)]((_0x50eabf,_0x2ee06a)=>_0x50eabf+(_0x2ee06a[_0x4cae74(0x194)]||0x0),0x0);Math[_0x4cae74(0x146)](_0xa75ffa-0x64)>0.01&&_0x5480ae[_0x4cae74(0x19a)](createIssue(_0x4cae74(0xf8),_0x136737+_0x4cae74(0x121),_0x4cae74(0x13a),_0x4cae74(0x118)+_0xa75ffa+'%)',_0x2bc685));for(let _0x145d4=0x0;_0x145d4<_0x2838ff[_0x4cae74(0x164)][_0x4cae74(0x138)]['length'];_0x145d4++){const _0x257b2b=_0x2838ff['with'][_0x4cae74(0x138)][_0x145d4],_0x17ce77=_0x136737+_0x4cae74(0xf9)+_0x145d4+']';_0x257b2b[_0x4cae74(0x106)]&&_0x2bc685[_0x4cae74(0x132)]&&!_0x2bc685[_0x4cae74(0x132)]['has'](_0x257b2b[_0x4cae74(0x106)])&&_0x5480ae[_0x4cae74(0x19a)](createIssue(_0x4cae74(0xf8),_0x17ce77+'.next','INVALID_NEXT_REFERENCE',_0x4cae74(0x136)+_0x257b2b[_0x4cae74(0x106)]+'\x27',_0x2bc685));if(_0x257b2b[_0x4cae74(0x106)]){const _0x34f5fd=_0x133dc7[_0x4cae74(0x140)](_0x257b2b[_0x4cae74(0x106)]);_0x34f5fd?.[_0x4cae74(0x1ac)]===_0x4cae74(0x19e)&&_0x5480ae[_0x4cae74(0x19a)](createIssue('warning',_0x17ce77+_0x4cae74(0x127),_0x4cae74(0x113),_0x4cae74(0x111)+_0x257b2b['name']+_0x4cae74(0x131)+_0x257b2b[_0x4cae74(0x106)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2bc685));}}return _0x5480ae;}function validateJumpStep(_0x49d31a,_0x22acb3,_0x52fb19){const _0x5541d1=a136_0x4746,_0x9f2bf1=[];if(!_0x49d31a[_0x5541d1(0x164)]?.[_0x5541d1(0x10b)])return _0x9f2bf1[_0x5541d1(0x19a)](createIssue(_0x5541d1(0xf8),_0x22acb3+'.with.target',_0x5541d1(0x16c),'Jump\x20step\x20requires\x20a\x20target',_0x52fb19,_0x22acb3)),_0x9f2bf1;return(!_0x49d31a[_0x5541d1(0x164)][_0x5541d1(0x10b)][_0x5541d1(0x1a2)]||!_0x49d31a['with'][_0x5541d1(0x10b)]['stage'])&&_0x9f2bf1[_0x5541d1(0x19a)](createIssue(_0x5541d1(0xf8),_0x22acb3+_0x5541d1(0x158),'INVALID_JUMP_TARGET','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x52fb19)),_0x9f2bf1;}function a136_0x4746(_0x444066,_0x1466d7){_0x444066=_0x444066-0xf6;const _0x29fe6d=a136_0x29fe();let _0x474606=_0x29fe6d[_0x444066];return _0x474606;}function buildConvergenceMap(_0x7b604a){const _0x2b8fb4=a136_0x4746,_0x33a0ef=new Map();function _0x15694c(_0x414f75,_0x1be307){const _0x2b26b8=a136_0x4746,_0x4e9238=_0x33a0ef['get'](_0x414f75)||[];_0x4e9238[_0x2b26b8(0x19a)](_0x1be307),_0x33a0ef['set'](_0x414f75,_0x4e9238);}for(const _0x2e9cc1 of _0x7b604a){_0x2e9cc1[_0x2b8fb4(0x106)]&&_0x15694c(_0x2e9cc1[_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1[_0x2b8fb4(0x112)],'description':_0x2b8fb4(0x185)+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'});if(_0x2e9cc1['type']===_0x2b8fb4(0x14c)&&_0x2e9cc1['with']?.[_0x2b8fb4(0x1a0)])for(const _0x2db319 of _0x2e9cc1[_0x2b8fb4(0x164)]['branches']){_0x2db319[_0x2b8fb4(0x106)]&&_0x15694c(_0x2db319[_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1['name'],'description':_0x2b8fb4(0x179)+_0x2db319[_0x2b8fb4(0x112)]+'\x27\x20of\x20\x27'+_0x2e9cc1['name']+'\x27'});}if(_0x2e9cc1[_0x2b8fb4(0x1ac)]==='ab_test'&&_0x2e9cc1[_0x2b8fb4(0x164)]?.[_0x2b8fb4(0x138)])for(const _0x2bf525 of _0x2e9cc1[_0x2b8fb4(0x164)][_0x2b8fb4(0x138)]){_0x2bf525[_0x2b8fb4(0x106)]&&_0x15694c(_0x2bf525[_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1[_0x2b8fb4(0x112)],'description':_0x2b8fb4(0x162)+_0x2bf525[_0x2b8fb4(0x112)]+'\x27\x20of\x20\x27'+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'});}_0x2e9cc1['type']==='wait'&&_0x2e9cc1[_0x2b8fb4(0x164)]?.[_0x2b8fb4(0x128)]&&(_0x2e9cc1['with'][_0x2b8fb4(0x128)][_0x2b8fb4(0x106)]&&_0x15694c(_0x2e9cc1['with'][_0x2b8fb4(0x128)][_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1['name'],'description':_0x2b8fb4(0x175)+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'}),_0x2e9cc1[_0x2b8fb4(0x164)]['condition'][_0x2b8fb4(0x15e)]?.[_0x2b8fb4(0x106)]&&_0x15694c(_0x2e9cc1['with'][_0x2b8fb4(0x128)][_0x2b8fb4(0x15e)][_0x2b8fb4(0x106)],{'stepName':_0x2e9cc1[_0x2b8fb4(0x112)],'description':_0x2b8fb4(0x188)+_0x2e9cc1[_0x2b8fb4(0x112)]+'\x27'}));}return _0x33a0ef;}function validateFlowControl(_0x859d67,_0x389715,_0xbdb004){const _0xdfc5b6=a136_0x4746,_0x3af3ee=[],_0x421dad='stages['+_0x389715+']',_0x4247ca=_0x859d67[_0xdfc5b6(0x178)]||[];if(_0x4247ca[_0xdfc5b6(0x13c)]===0x0)return _0x3af3ee;const _0x110d1d=new Map();for(const _0x3bb5d5 of _0x4247ca){_0x3bb5d5[_0xdfc5b6(0x112)]&&_0x110d1d[_0xdfc5b6(0x15b)](_0x3bb5d5[_0xdfc5b6(0x112)],_0x3bb5d5);}const _0x231f7b=buildConvergenceMap(_0x4247ca),_0x13361b=_0x4247ca['some'](_0x36c9ab=>_0x36c9ab[_0xdfc5b6(0x1ac)]===_0xdfc5b6(0x11d));!_0x13361b&&_0x3af3ee[_0xdfc5b6(0x19a)](createIssue(_0xdfc5b6(0xf8),_0x421dad+_0xdfc5b6(0x182),_0xdfc5b6(0x12a),_0xdfc5b6(0x144)+_0x859d67[_0xdfc5b6(0x112)]+_0xdfc5b6(0x10c),_0xbdb004));for(const [_0x3da213,_0x19849a]of _0x231f7b){const _0x2fc060=_0x110d1d['get'](_0x3da213);if(!_0x2fc060)continue;if(_0x19849a['length']>0x1&&_0x2fc060[_0xdfc5b6(0x1ac)]!=='merge'){const _0xcc920d=_0x19849a[_0xdfc5b6(0x173)](_0x151413=>_0x151413[_0xdfc5b6(0x19b)])[_0xdfc5b6(0x13b)](',\x20');_0x3af3ee[_0xdfc5b6(0x19a)](createIssue('error',_0x421dad+'.steps',_0xdfc5b6(0x124),_0xdfc5b6(0x166)+_0x3da213+'\x27\x20(from:\x20'+_0xcc920d+_0xdfc5b6(0x13d),_0xbdb004));}_0x19849a[_0xdfc5b6(0x13c)]===0x1&&_0x2fc060[_0xdfc5b6(0x1ac)]===_0xdfc5b6(0x19e)&&_0x3af3ee['push'](createIssue(_0xdfc5b6(0x193),_0x421dad+'.steps',_0xdfc5b6(0x14a),'Merge\x20step\x20\x27'+_0x3da213+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x19849a[0x0][_0xdfc5b6(0x19b)]+_0xdfc5b6(0x165),_0xbdb004));}for(const _0xdd1dc4 of _0x4247ca){if(_0xdd1dc4[_0xdfc5b6(0x1ac)]===_0xdfc5b6(0x19e)&&_0xdd1dc4[_0xdfc5b6(0x106)]){const _0x276ffa=_0x110d1d[_0xdfc5b6(0x140)](_0xdd1dc4[_0xdfc5b6(0x106)]);_0x276ffa?.['type']===_0xdfc5b6(0x19e)&&_0x3af3ee['push'](createIssue(_0xdfc5b6(0xf8),_0x421dad+'.steps',_0xdfc5b6(0x10f),_0xdfc5b6(0x102)+_0xdd1dc4[_0xdfc5b6(0x112)]+_0xdfc5b6(0x147)+_0xdd1dc4['next']+_0xdfc5b6(0x116),_0xbdb004));}}return _0x3af3ee;}function validateCriteria(_0x3bf108,_0x36d2a0,_0x2f4191){const _0x2e9fa4=a136_0x4746,_0xde641a=[];return _0x3bf108[_0x2e9fa4(0x19c)]&&(_0x2f4191[_0x2e9fa4(0x1af)]?.['add'](_0x3bf108[_0x2e9fa4(0x19c)]),!_0x3bf108['segment'][_0x2e9fa4(0x191)](_0x2e9fa4(0x174))&&(_0x2f4191[_0x2e9fa4(0x115)]&&!_0x2f4191[_0x2e9fa4(0x115)]['has'](_0x3bf108[_0x2e9fa4(0x19c)])&&_0xde641a[_0x2e9fa4(0x19a)](createIssue('error',_0x36d2a0+'.segment',_0x2e9fa4(0x142),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x3bf108['segment']+'\x27',_0x2f4191)))),_0xde641a;}function validateEmbeddedSegment(_0x5182a1,_0x1f6165,_0x330fba){const _0x4be60f=a136_0x4746,_0x3e5c76=[];return _0x5182a1[_0x4be60f(0x160)]&&_0x3e5c76['push'](...validateRuleDef(_0x5182a1['rule'],_0x1f6165+_0x4be60f(0x123),_0x330fba)),_0x3e5c76;}function validateStage(_0x198e41,_0x7bcb58,_0x14103b,_0x137fc4){const _0x47c6f0=a136_0x4746,_0x30d01a=[],_0x21e3b=_0x47c6f0(0x114)+_0x7bcb58+']',_0x1a6dc7=new Map(),_0x75206c=new Map();if(_0x198e41['steps']){for(let _0x226aa0=0x0;_0x226aa0<_0x198e41[_0x47c6f0(0x178)][_0x47c6f0(0x13c)];_0x226aa0++){const _0x88a2b6=_0x198e41['steps'][_0x226aa0];_0x88a2b6[_0x47c6f0(0x112)]&&_0x1a6dc7[_0x47c6f0(0x15b)](_0x88a2b6[_0x47c6f0(0x112)],_0x88a2b6);}for(let _0x15997d=0x0;_0x15997d<_0x198e41[_0x47c6f0(0x178)][_0x47c6f0(0x13c)];_0x15997d++){const _0x59de6e=_0x198e41[_0x47c6f0(0x178)][_0x15997d],_0x228ee8=_0x21e3b+_0x47c6f0(0x183)+_0x15997d+']';if(_0x59de6e[_0x47c6f0(0x112)]){if(_0x75206c[_0x47c6f0(0x11c)](_0x59de6e[_0x47c6f0(0x112)])){const _0x31fc7d=_0x75206c['get'](_0x59de6e[_0x47c6f0(0x112)]);_0x30d01a[_0x47c6f0(0x19a)](createIssue('error',_0x228ee8+_0x47c6f0(0x1a1),'DUPLICATE_STEP_NAME',_0x47c6f0(0x15f)+_0x59de6e['name']+'\x27\x20(first\x20defined\x20at\x20steps['+_0x31fc7d+'])',_0x137fc4));}else _0x75206c['set'](_0x59de6e[_0x47c6f0(0x112)],_0x15997d);}_0x30d01a[_0x47c6f0(0x19a)](...validateStep(_0x59de6e,_0x228ee8,_0x137fc4,_0x1a6dc7));}}_0x198e41[_0x47c6f0(0x154)]&&_0x30d01a[_0x47c6f0(0x19a)](...validateCriteria(_0x198e41[_0x47c6f0(0x154)],_0x21e3b+_0x47c6f0(0x17c),_0x137fc4));if(_0x198e41[_0x47c6f0(0x19f)])for(let _0x114eeb=0x0;_0x114eeb<_0x198e41[_0x47c6f0(0x19f)]['length'];_0x114eeb++){_0x30d01a[_0x47c6f0(0x19a)](...validateCriteria(_0x198e41['exit_criteria'][_0x114eeb],_0x21e3b+_0x47c6f0(0x18d)+_0x114eeb+']',_0x137fc4));}return _0x198e41['milestone']&&_0x30d01a[_0x47c6f0(0x19a)](...validateCriteria(_0x198e41[_0x47c6f0(0x186)],_0x21e3b+_0x47c6f0(0x122),_0x137fc4)),_0x30d01a[_0x47c6f0(0x19a)](...validateStageStructure(_0x198e41,_0x7bcb58,_0x14103b,_0x137fc4)),_0x30d01a['push'](...validateFlowControl(_0x198e41,_0x7bcb58,_0x137fc4)),_0x30d01a;}function a136_0x29fe(){const _0x3eeeec=['MISSING_ACTIVATION_DEFINITION','1177668iNSyug','\x20versions)','.with.variants','.milestone','.rule','CONVERGENCE_WITHOUT_MERGE','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','ACTIVATION_SCHEMA_ERROR','.next','condition','Journey\x20has\x20no\x20goal\x20defined','MISSING_END_STEP','INVALID_NEXT_REFERENCE','.exit_criteria','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','\x20with\x20latest:\x20true','8549254BnRLzj','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','stepNames','includes','.stages','Decision\x20branch\x20\x27','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','reduce','variants','launched','INVALID_AB_TEST_PERCENTAGES','join','length',').\x20Use\x20a\x20merge\x20step.','MISSING_EXIT_CRITERIA','Activation\x20step\x20requires\x20an\x20activation\x20reference','get','End\x20step\x20\x27','MISSING_SEGMENT_REFERENCE','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','Stage\x20\x27','goal','abs','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','endsWith','10DIQxsn','SINGLE_INPUT_MERGE','stages','decision_point','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.with.condition.timeout.next','entries','sort','indices','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','segments.','entry_criteria','activationKeys','JOURNEY_SCHEMA_ERROR','.with.condition','.with.target','journeys','.segment','set','DUPLICATE_LATEST','830800XriLME','timeout','Duplicate\x20step\x20name\x20\x27','rule','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','variant\x20\x27','.with.condition.timeout','with',').\x20Merge\x20is\x20unnecessary.','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','values','UNUSED_EMBEDDED_SEGMENT','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','match','32403129KejJgI','INVALID_JUMP_TARGET','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','1dsdXol','message','\x20steps\x20(may\x20be\x20too\x20simple)','\x27\x20has\x20no\x20exit_criteria\x20defined','map','ref:','condition\x20of\x20\x27','.type','jump','steps','branch\x20\x27','MISSING_ACTIVATION_REF','code','.entry_criteria','ab_test','END_STEP_HAS_NEXT_OR_WITH','goalIsInherited','splice','63YkOuMU','.steps','.steps[','1408508eYUvrx','step\x20\x27','milestone','53292xrSKro','timeout\x20of\x20\x27','excluded_','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','add','.with.activation','.exit_criteria[','journey\x20entry','safeParse','latest','startsWith','TOO_MANY_STAGES','warning','percentage','state','excluded','versions','FEW_STEPS','\x20stages\x20but\x20maximum\x20is\x20','push','description','segment','Journey\x20can\x20have\x20at\x20most\x20one\x20','merge','exit_criteria','branches','.name','journey','MISSING_CONDITIONS','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','filter','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','Journey\x20name\x20is\x20required','level','MISSING_STAGES','.with.branches','symbol','type','2954404ueMaLL','keys','referencedSegments','journeys[','MISSING_NAME','trim','\x27\x20has\x20no\x20steps','success','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','error','.with.variants[','source','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','document','issues','activations','Merge\x20step\x20\x27','activation','\x20(across\x20','505PDjipe','next','replace','MISSING_ENTRY_CRITERIA','skipSchema','size','target','\x27\x20has\x20no\x20end\x20step','segments','INSUFFICIENT_STEPS','MERGE_TO_MERGE_CHAIN','versions[','A/B\x20test\x20variant\x20\x27','name','BRANCH_DIRECTLY_TO_MERGE','stages[','embeddedSegments','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','Journey\x20has\x20','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','.with','path','has','end'];a136_0x29fe=function(){return _0x3eeeec;};return a136_0x29fe();}function validateStagesForVersion(_0x1a31d1,_0x295ab5,_0x258061,_0x568e36,_0x450a27,_0x35d037,_0x53f5e3){const _0x2ce0f7=a136_0x4746;if(_0x1a31d1['length']===0x0){_0x450a27['push']({'level':_0x2ce0f7(0xf8),'path':_0x568e36+_0x2ce0f7(0x14b),'code':_0x2ce0f7(0x1a9),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x258061[_0x2ce0f7(0xff)],_0x258061[_0x2ce0f7(0xfa)],[_0x2ce0f7(0x14b)])});return;}const _0x500cd6=new Set();for(const _0x181a8e of _0x1a31d1){if(_0x181a8e[_0x2ce0f7(0x178)])for(const _0x428843 of _0x181a8e[_0x2ce0f7(0x178)]){_0x428843[_0x2ce0f7(0x112)]&&_0x500cd6[_0x2ce0f7(0x18b)](_0x428843[_0x2ce0f7(0x112)]);}}const _0x3ba24e={..._0x258061,'stepNames':_0x500cd6},_0x1e93d9=validateVersionStructure(_0x1a31d1,_0x3ba24e);for(const _0x2db914 of _0x1e93d9){const _0x46ec54=_0x568e36?{..._0x2db914,'path':''+_0x568e36+_0x2db914[_0x2ce0f7(0x11b)]}:_0x2db914;if(_0x46ec54[_0x2ce0f7(0x1a8)]===_0x2ce0f7(0xf8))_0x450a27[_0x2ce0f7(0x19a)](_0x46ec54);else _0x35d037[_0x2ce0f7(0x19a)](_0x46ec54);}for(let _0x34b207=0x0;_0x34b207<_0x1a31d1[_0x2ce0f7(0x13c)];_0x34b207++){const _0x37e941=validateStage(_0x1a31d1[_0x34b207],_0x34b207,_0x1a31d1[_0x2ce0f7(0x13c)],_0x3ba24e);for(const _0x230053 of _0x37e941){const _0xc62fa3=_0x568e36?{..._0x230053,'path':''+_0x568e36+_0x230053[_0x2ce0f7(0x11b)]}:_0x230053;if(_0xc62fa3[_0x2ce0f7(0x1a8)]===_0x2ce0f7(0xf8))_0x450a27[_0x2ce0f7(0x19a)](_0xc62fa3);else _0x35d037[_0x2ce0f7(0x19a)](_0xc62fa3);}}if(_0x295ab5[_0x2ce0f7(0x145)]){const _0x13e6a7=_0x53f5e3?.[_0x2ce0f7(0x17f)]?_0x2ce0f7(0x145):_0x568e36+_0x2ce0f7(0x145),_0x17c0c7=validateCriteria(_0x295ab5[_0x2ce0f7(0x145)],_0x13e6a7,_0x3ba24e);for(const _0x3eadc0 of _0x17c0c7){if(_0x3eadc0[_0x2ce0f7(0x1a8)]==='error')_0x450a27[_0x2ce0f7(0x19a)](_0x3eadc0);else _0x35d037[_0x2ce0f7(0x19a)](_0x3eadc0);}}}function extractVersionIndex(_0x404b25){const _0x4bc46d=a136_0x4746,_0xce0859=_0x404b25[_0x4bc46d(0x16a)](/^journeys\[(\d+)\]\./);return _0xce0859?_0xce0859[0x1]:undefined;}function deduplicateAcrossVersions(_0x144340){const _0x3e0c05=a136_0x4746,_0xf94a4f=new Map();for(let _0x1b236b=0x0;_0x1b236b<_0x144340[_0x3e0c05(0x13c)];_0x1b236b++){const _0x1d0073=_0x144340[_0x1b236b][_0x3e0c05(0x17b)]+':'+_0x144340[_0x1b236b][_0x3e0c05(0x170)],_0x4e2b09=extractVersionIndex(_0x144340[_0x1b236b][_0x3e0c05(0x11b)]),_0x143fb9=_0xf94a4f['get'](_0x1d0073);if(_0x143fb9){_0x143fb9[_0x3e0c05(0x151)]['push'](_0x1b236b);if(_0x4e2b09)_0x143fb9[_0x3e0c05(0x197)][_0x3e0c05(0x18b)](_0x4e2b09);}else _0xf94a4f[_0x3e0c05(0x15b)](_0x1d0073,{'indices':[_0x1b236b],'versions':new Set(_0x4e2b09?[_0x4e2b09]:[])});}const _0x429aa2=new Set();for(const {indices:_0x32804d,versions:_0x4b3b71}of _0xf94a4f[_0x3e0c05(0x167)]()){if(_0x4b3b71[_0x3e0c05(0x10a)]<=0x1)continue;const _0x11fe67=_0x144340[_0x32804d[0x0]];_0x11fe67[_0x3e0c05(0x11b)]=_0x11fe67[_0x3e0c05(0x11b)][_0x3e0c05(0x107)](/^journeys\[\d+\]\./,''),_0x11fe67[_0x3e0c05(0x170)]=_0x11fe67[_0x3e0c05(0x170)]+_0x3e0c05(0x104)+_0x4b3b71[_0x3e0c05(0x10a)]+_0x3e0c05(0x120);for(let _0xf8196a=0x1;_0xf8196a<_0x32804d[_0x3e0c05(0x13c)];_0xf8196a++){_0x429aa2['add'](_0x32804d[_0xf8196a]);}}const _0x57bde5=[..._0x429aa2][_0x3e0c05(0x150)]((_0x3ad263,_0x3c5df2)=>_0x3c5df2-_0x3ad263);for(const _0x385365 of _0x57bde5){_0x144340[_0x3e0c05(0x180)](_0x385365,0x1);}}export function validateJourneyDef(_0x1aa381,_0x181c28={},_0x14e3d7={}){const _0x2b34f5=a136_0x4746;if(_0x14e3d7[_0x2b34f5(0x109)])return runJourneySemanticChecks(_0x1aa381,_0x181c28);const _0x790415=JourneyDefSchema[_0x2b34f5(0x18f)](_0x1aa381);if(_0x790415[_0x2b34f5(0xf6)])return runJourneySemanticChecks(_0x790415['data'],_0x181c28);return zodErrorsToJourneyValidationResult(_0x790415[_0x2b34f5(0xf8)],_0x181c28);}function zodErrorsToJourneyValidationResult(_0x5da33b,_0x5b7e29){const _0x906b2c=a136_0x4746,_0x45d61c=flattenZodIssues(_0x5da33b[_0x906b2c(0x100)]),_0x1cfb66=_0x45d61c[_0x906b2c(0x173)](_0x2840b5=>{const _0x17224e=_0x906b2c,_0x1d4106=formatZodPath(_0x2840b5[_0x17224e(0x11b)]),_0x1e9571=mapJourneyZodIssueToCode(_0x2840b5,_0x1d4106),_0x53da3c=getLocationFromPath(_0x5b7e29[_0x17224e(0xff)],_0x5b7e29[_0x17224e(0xfa)],_0x2840b5[_0x17224e(0x11b)][_0x17224e(0x173)](_0x4904d5=>typeof _0x4904d5===_0x17224e(0x1ab)?String(_0x4904d5):_0x4904d5));return{'level':_0x17224e(0xf8),'path':_0x1d4106,'code':_0x1e9571,'message':_0x2840b5[_0x17224e(0x170)],..._0x53da3c&&{'location':_0x53da3c}};});return{'valid':![],'errors':_0x1cfb66,'warnings':[]};}function mapJourneyZodIssueToCode(_0x4cd4b5,_0x2da88a){const _0x235c63=a136_0x4746;if(_0x2da88a===_0x235c63(0x112))return _0x235c63(0x1b1);if(_0x2da88a['endsWith'](_0x235c63(0x176))&&_0x2da88a[_0x235c63(0x133)](_0x235c63(0x178)))return _0x235c63(0x156);if(_0x2da88a===_0x235c63(0x14b)||_0x2da88a[_0x235c63(0x148)](_0x235c63(0x134)))return _0x235c63(0x1a9);if(_0x2da88a===''&&_0x4cd4b5[_0x235c63(0x170)]['includes']('journeys,\x20stages,\x20or\x20versions'))return'MISSING_STAGES';if(_0x2da88a[_0x235c63(0x133)](_0x235c63(0x103)))return _0x235c63(0x126);return _0x235c63(0x156);}function runJourneySemanticChecks(_0x2645ef,_0x4450a3){const _0x2c61c6=a136_0x4746,_0xccbd8e=[],_0x558b20=[];(!_0x2645ef[_0x2c61c6(0x112)]||_0x2645ef['name'][_0x2c61c6(0x1b2)]()==='')&&_0xccbd8e[_0x2c61c6(0x19a)]({'level':_0x2c61c6(0xf8),'path':_0x2c61c6(0x112),'code':_0x2c61c6(0x1b1),'message':_0x2c61c6(0x1a7),'location':getLocationFromPath(_0x4450a3[_0x2c61c6(0xff)],_0x4450a3[_0x2c61c6(0xfa)],[_0x2c61c6(0x112)])});const _0x4e3265=new Set();if(_0x2645ef[_0x2c61c6(0x10d)])for(const _0x272faa of Object[_0x2c61c6(0x1ae)](_0x2645ef[_0x2c61c6(0x10d)])){_0x4e3265['add'](_0x272faa);}const _0x4d3054=new Set();if(_0x2645ef[_0x2c61c6(0x101)])for(const _0x5048ea of Object['keys'](_0x2645ef['activations'])){_0x4d3054[_0x2c61c6(0x18b)](_0x5048ea);}const _0x2488be=new Set(),_0x51d10f={..._0x4450a3,'embeddedSegments':_0x4e3265,'referencedSegments':_0x2488be,'activationKeys':_0x4d3054[_0x2c61c6(0x10a)]>0x0?_0x4d3054:undefined};if(_0x2645ef[_0x2c61c6(0x10d)])for(const [_0x51120a,_0x234f5a]of Object[_0x2c61c6(0x14f)](_0x2645ef[_0x2c61c6(0x10d)])){const _0x13065c=validateEmbeddedSegment(_0x234f5a,_0x2c61c6(0x153)+_0x51120a,_0x51d10f);for(const _0x53fa8e of _0x13065c){if(_0x53fa8e[_0x2c61c6(0x1a8)]===_0x2c61c6(0xf8))_0xccbd8e[_0x2c61c6(0x19a)](_0x53fa8e);else _0x558b20[_0x2c61c6(0x19a)](_0x53fa8e);}}const _0x5b2518=!!_0x2645ef['goal'],_0x52ed9a=_0x2645ef['journeys']?.['every'](_0x4dd875=>!!_0x4dd875[_0x2c61c6(0x145)])??![];!_0x5b2518&&!_0x52ed9a&&_0x558b20[_0x2c61c6(0x19a)]({'level':'warning','path':_0x2c61c6(0x145),'code':'MISSING_GOAL','message':_0x2c61c6(0x129),'location':getLocationFromPath(_0x4450a3[_0x2c61c6(0xff)],_0x4450a3['source'],[_0x2c61c6(0x145)])});const _0x258503=_0x2645ef[_0x2c61c6(0x159)]??_0x2645ef['versions'];if(_0x258503&&_0x258503[_0x2c61c6(0x1a5)](_0x227571=>_0x227571[_0x2c61c6(0x190)]===!![])['length']>0x1){const _0x359254=_0x2645ef['journeys']?_0x2c61c6(0x159):_0x2c61c6(0x197);_0xccbd8e[_0x2c61c6(0x19a)]({'level':_0x2c61c6(0xf8),'path':_0x359254,'code':_0x2c61c6(0x15c),'message':_0x2c61c6(0x19d)+(_0x359254===_0x2c61c6(0x159)?_0x2c61c6(0x18e):'version')+_0x2c61c6(0x12f),'location':getLocationFromPath(_0x4450a3['document'],_0x4450a3[_0x2c61c6(0xfa)],[_0x359254])});}if(_0x2645ef['journeys']&&_0x2645ef['journeys'][_0x2c61c6(0x13c)]>0x0)for(let _0x21da7d=0x0;_0x21da7d<_0x2645ef[_0x2c61c6(0x159)][_0x2c61c6(0x13c)];_0x21da7d++){const _0xac125d=_0x2645ef['journeys'][_0x21da7d];if(_0x2645ef['journeys']['length']>0x1&&_0xac125d[_0x2c61c6(0x195)]===_0x2c61c6(0x139))continue;const _0x773ce3=_0xac125d['stages']||[],_0x14004f=_0x2c61c6(0x1b0)+_0x21da7d+'].',_0x5cc703=!!_0xac125d['goal'],_0x25cd9b=_0x5cc703?{..._0x2645ef,'goal':_0xac125d[_0x2c61c6(0x145)]}:_0x2645ef;validateStagesForVersion(_0x773ce3,_0x25cd9b,_0x51d10f,_0x14004f,_0xccbd8e,_0x558b20,{'goalIsInherited':!_0x5cc703});}else{if(_0x2645ef['versions']&&_0x2645ef[_0x2c61c6(0x197)]['length']>0x0)for(let _0x40a5a3=0x0;_0x40a5a3<_0x2645ef[_0x2c61c6(0x197)][_0x2c61c6(0x13c)];_0x40a5a3++){const _0x4b402a=_0x2645ef[_0x2c61c6(0x197)][_0x40a5a3];if(_0x2645ef[_0x2c61c6(0x197)][_0x2c61c6(0x13c)]>0x1&&_0x4b402a[_0x2c61c6(0x195)]===_0x2c61c6(0x139))continue;const _0x5d6728=_0x4b402a['stages']||[],_0x20e556=_0x2c61c6(0x110)+_0x40a5a3+'].';validateStagesForVersion(_0x5d6728,_0x2645ef,_0x51d10f,_0x20e556,_0xccbd8e,_0x558b20);}else{const _0x1ff1c3=_0x2645ef[_0x2c61c6(0x14b)]||[];validateStagesForVersion(_0x1ff1c3,_0x2645ef,_0x51d10f,'',_0xccbd8e,_0x558b20);}}_0x2645ef[_0x2c61c6(0x159)]&&_0x2645ef[_0x2c61c6(0x159)]['length']>0x1&&(deduplicateAcrossVersions(_0xccbd8e),deduplicateAcrossVersions(_0x558b20));for(const _0x1323cf of _0x4e3265){!_0x2488be[_0x2c61c6(0x11c)](_0x1323cf)&&!_0x1323cf[_0x2c61c6(0x191)](_0x2c61c6(0x189))&&_0x558b20['push']({'level':_0x2c61c6(0x193),'path':_0x2c61c6(0x153)+_0x1323cf,'code':_0x2c61c6(0x168),'message':'Embedded\x20segment\x20\x27'+_0x1323cf+_0x2c61c6(0xfd),'location':getLocationFromPath(_0x4450a3[_0x2c61c6(0xff)],_0x4450a3[_0x2c61c6(0xfa)],[_0x2c61c6(0x10d),_0x1323cf])});}return{'valid':_0xccbd8e[_0x2c61c6(0x13c)]===0x0,'errors':_0xccbd8e,'warnings':_0x558b20};}
|
|
1
|
+
function a136_0x13a2(_0x7de224,_0x574ae2){_0x7de224=_0x7de224-0xb9;const _0x12d45f=a136_0x12d4();let _0x13a2d0=_0x12d45f[_0x7de224];return _0x13a2d0;}(function(_0x5a44fd,_0x4a3bf3){const _0x316868=a136_0x13a2,_0x5238c6=_0x5a44fd();while(!![]){try{const _0x2ac50d=parseInt(_0x316868(0xd7))/0x1*(-parseInt(_0x316868(0x165))/0x2)+-parseInt(_0x316868(0x11a))/0x3*(-parseInt(_0x316868(0xdd))/0x4)+parseInt(_0x316868(0x15a))/0x5*(parseInt(_0x316868(0xeb))/0x6)+parseInt(_0x316868(0x105))/0x7*(-parseInt(_0x316868(0x15d))/0x8)+parseInt(_0x316868(0x11d))/0x9*(parseInt(_0x316868(0xf4))/0xa)+-parseInt(_0x316868(0x115))/0xb+parseInt(_0x316868(0x144))/0xc;if(_0x2ac50d===_0x4a3bf3)break;else _0x5238c6['push'](_0x5238c6['shift']());}catch(_0x5d7412){_0x5238c6['push'](_0x5238c6['shift']());}}}(a136_0x12d4,0x247b1));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5e0de4,_0x513b02,_0x4520c0,_0x7bcd1d,_0x507489,_0xc5ec80){const _0x4365e0=a136_0x13a2;return{'level':_0x5e0de4,'path':_0x513b02,'code':_0x4520c0,'message':_0x7bcd1d,'location':getLocationFromPath(_0x507489[_0x4365e0(0xd8)],_0x507489[_0x4365e0(0xff)],pathToArray(_0xc5ec80??_0x513b02))};}function validateVersionStructure(_0x573d48,_0x64e70b){const _0x1d6490=a136_0x13a2,_0x50158e=[];return _0x573d48[_0x1d6490(0xe3)]>MAX_STAGES&&_0x50158e[_0x1d6490(0x160)](createIssue(_0x1d6490(0x152),'stages',_0x1d6490(0x10e),'Journey\x20has\x20'+_0x573d48[_0x1d6490(0xe3)]+_0x1d6490(0x13a)+MAX_STAGES,_0x64e70b)),_0x50158e;}function validateStageStructure(_0x2e87c9,_0x2da397,_0x5be2df,_0x59f70b){const _0x3e7210=a136_0x13a2,_0x4b859d=[],_0x1c09e4=_0x3e7210(0x164)+_0x2da397+']';_0x2da397===0x0&&!_0x2e87c9[_0x3e7210(0xfa)]&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x152),_0x1c09e4+_0x3e7210(0x146),_0x3e7210(0x124),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x59f70b,_0x1c09e4));const _0x5d0fc4=_0x2da397===_0x5be2df-0x1;!_0x5d0fc4&&!_0x2e87c9[_0x3e7210(0x113)]&&_0x4b859d['push'](createIssue(_0x3e7210(0x152),_0x1c09e4+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x2e87c9[_0x3e7210(0x135)]+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x59f70b,_0x1c09e4));(!_0x2e87c9['exit_criteria']||_0x2e87c9[_0x3e7210(0xce)]['length']===0x0)&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+'.exit_criteria',_0x3e7210(0xbc),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+_0x3e7210(0xec),_0x59f70b,_0x1c09e4));const _0x41dfdd=_0x2e87c9[_0x3e7210(0xfc)]?.[_0x3e7210(0xe3)]??0x0;if(_0x41dfdd===0x0)_0x4b859d[_0x3e7210(0x160)](createIssue('error',_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0xc6),'Stage\x20\x27'+_0x2e87c9['name']+_0x3e7210(0xf6),_0x59f70b,_0x1c09e4+_0x3e7210(0x12f)));else{if(_0x41dfdd===0x1)_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0xc6),_0x3e7210(0x171)+_0x2e87c9[_0x3e7210(0x135)]+_0x3e7210(0xe7),_0x59f70b,_0x1c09e4+_0x3e7210(0x12f)));else _0x41dfdd<=0x3&&_0x4b859d[_0x3e7210(0x160)](createIssue(_0x3e7210(0x172),_0x1c09e4+_0x3e7210(0x12f),_0x3e7210(0x170),_0x3e7210(0x171)+_0x2e87c9['name']+_0x3e7210(0x163)+_0x41dfdd+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x59f70b,_0x1c09e4+'.steps'));}return _0x4b859d;}function validateStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63){const _0x5118ee=a136_0x13a2,_0x3f962f=[];if(_0x28c5fd[_0x5118ee(0x168)]===_0x5118ee(0x102))return _0x28c5fd['next']&&_0x3f962f[_0x5118ee(0x160)](createIssue('error',_0x38547c+_0x5118ee(0xea),_0x5118ee(0x137),'End\x20step\x20\x27'+_0x28c5fd['name']+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x4c4acc)),'with'in _0x28c5fd&&_0x28c5fd[_0x5118ee(0x10a)]!==undefined&&_0x3f962f['push'](createIssue(_0x5118ee(0x152),_0x38547c+'.with',_0x5118ee(0x137),'End\x20step\x20\x27'+_0x28c5fd[_0x5118ee(0x135)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x4c4acc)),_0x3f962f;_0x28c5fd[_0x5118ee(0xc5)]&&(_0x4c4acc[_0x5118ee(0x11e)]&&!_0x4c4acc[_0x5118ee(0x11e)]['has'](_0x28c5fd[_0x5118ee(0xc5)])&&_0x3f962f[_0x5118ee(0x160)](createIssue(_0x5118ee(0x152),_0x38547c+_0x5118ee(0xea),_0x5118ee(0xd1),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x28c5fd[_0x5118ee(0xc5)]+'\x27',_0x4c4acc)));switch(_0x28c5fd['type']){case'wait':_0x3f962f[_0x5118ee(0x160)](...validateWaitStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case _0x5118ee(0x11b):_0x3f962f['push'](...validateActivationStep(_0x28c5fd,_0x38547c,_0x4c4acc));break;case _0x5118ee(0x133):_0x3f962f[_0x5118ee(0x160)](...validateDecisionPointStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case'ab_test':_0x3f962f['push'](...validateAbTestStep(_0x28c5fd,_0x38547c,_0x4c4acc,_0x1afb63));break;case _0x5118ee(0xd0):_0x3f962f[_0x5118ee(0x160)](...validateJumpStep(_0x28c5fd,_0x38547c,_0x4c4acc));break;}return _0x3f962f;}function validateWaitStep(_0xf312de,_0x20b7a8,_0x247fea,_0x4933e1){const _0x4ecbd3=a136_0x13a2,_0x15b37c=[];if(!_0xf312de['with'])return _0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0xee),_0x4ecbd3(0x159),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x247fea,_0x20b7a8)),_0x15b37c;if(_0xf312de[_0x4ecbd3(0x10a)][_0x4ecbd3(0x140)]){const _0x442a79=_0xf312de['with'][_0x4ecbd3(0x140)];if(_0x442a79[_0x4ecbd3(0xcb)]){_0x247fea[_0x4ecbd3(0xcd)]?.[_0x4ecbd3(0x108)](_0x442a79[_0x4ecbd3(0xcb)]);!_0x442a79[_0x4ecbd3(0xcb)][_0x4ecbd3(0x11f)](_0x4ecbd3(0x147))&&(_0x247fea[_0x4ecbd3(0xbf)]&&!_0x247fea[_0x4ecbd3(0xbf)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0xcb)])&&_0x15b37c['push'](createIssue('error',_0x20b7a8+_0x4ecbd3(0xd9),_0x4ecbd3(0xf2),_0x4ecbd3(0x100)+_0x442a79[_0x4ecbd3(0xcb)]+_0x4ecbd3(0x132),_0x247fea)));_0x442a79[_0x4ecbd3(0xc5)]&&_0x247fea[_0x4ecbd3(0x11e)]&&!_0x247fea[_0x4ecbd3(0x11e)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0xc5)])&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0x15b),_0x4ecbd3(0xd1),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x442a79['next']+'\x27',_0x247fea));_0x442a79['timeout']?.[_0x4ecbd3(0xc5)]&&_0x247fea[_0x4ecbd3(0x11e)]&&!_0x247fea[_0x4ecbd3(0x11e)][_0x4ecbd3(0x169)](_0x442a79[_0x4ecbd3(0x151)][_0x4ecbd3(0xc5)])&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x152),_0x20b7a8+_0x4ecbd3(0x156),_0x4ecbd3(0xd1),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x442a79[_0x4ecbd3(0x151)]['next']+'\x27',_0x247fea));const _0x2f8db7=_0x442a79[_0x4ecbd3(0xc5)]||_0xf312de['next'],_0x3be367=_0x442a79[_0x4ecbd3(0x151)]?.[_0x4ecbd3(0xc5)]||_0xf312de['next'];if(_0x2f8db7){const _0x2cadab=_0x4933e1[_0x4ecbd3(0xe2)](_0x2f8db7);_0x2cadab?.[_0x4ecbd3(0x168)]===_0x4ecbd3(0xbd)&&_0x15b37c[_0x4ecbd3(0x160)](createIssue('warning',_0x20b7a8+'.with.condition.next',_0x4ecbd3(0x161),_0x4ecbd3(0x14f)+_0x2f8db7+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x247fea,_0x20b7a8+_0x4ecbd3(0xd3)));}if(_0x3be367){const _0xbcf0d1=_0x4933e1[_0x4ecbd3(0xe2)](_0x3be367);_0xbcf0d1?.['type']==='merge'&&_0x15b37c[_0x4ecbd3(0x160)](createIssue(_0x4ecbd3(0x172),_0x20b7a8+_0x4ecbd3(0x156),_0x4ecbd3(0x161),_0x4ecbd3(0x120)+_0x3be367+_0x4ecbd3(0x12a),_0x247fea,_0x20b7a8+'.with.condition.timeout'));}}}return _0x15b37c;}function validateActivationStep(_0x1ece99,_0x3d3af5,_0x56d1ff){const _0x39b961=a136_0x13a2,_0x520480=[];if(!_0x1ece99['with']?.[_0x39b961(0x11b)])return _0x520480[_0x39b961(0x160)](createIssue(_0x39b961(0x152),_0x3d3af5+_0x39b961(0xe5),'MISSING_ACTIVATION_REF',_0x39b961(0xdf),_0x56d1ff,_0x3d3af5)),_0x520480;const _0x3354ae=_0x1ece99[_0x39b961(0x10a)][_0x39b961(0x11b)];return _0x56d1ff['activationKeys']&&!_0x3354ae[_0x39b961(0x11f)](_0x39b961(0x147))&&(!_0x56d1ff[_0x39b961(0x14d)][_0x39b961(0x169)](_0x3354ae)&&_0x520480[_0x39b961(0x160)](createIssue(_0x39b961(0x152),_0x3d3af5+_0x39b961(0xe5),_0x39b961(0x149),_0x39b961(0x167)+_0x3354ae+_0x39b961(0x104),_0x56d1ff))),_0x520480;}function validateDecisionPointStep(_0x887287,_0x438739,_0x2ce5d5,_0x25e679){const _0x4549ab=a136_0x13a2,_0x2cfd42=[];if(!_0x887287['with']?.[_0x4549ab(0x117)]||_0x887287[_0x4549ab(0x10a)]['branches'][_0x4549ab(0xe3)]===0x0)return _0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x438739+_0x4549ab(0x118),_0x4549ab(0xed),_0x4549ab(0x10c),_0x2ce5d5,_0x438739)),_0x2cfd42;for(let _0x4572a7=0x0;_0x4572a7<_0x887287[_0x4549ab(0x10a)]['branches'][_0x4549ab(0xe3)];_0x4572a7++){const _0x374498=_0x887287['with']['branches'][_0x4572a7],_0x4013f9=_0x438739+_0x4549ab(0x12e)+_0x4572a7+']';_0x374498[_0x4549ab(0xcb)]&&!_0x374498['excluded']&&(_0x2ce5d5['referencedSegments']?.[_0x4549ab(0x108)](_0x374498['segment']),!_0x374498['segment'][_0x4549ab(0x11f)](_0x4549ab(0x147))&&(_0x2ce5d5[_0x4549ab(0xbf)]&&!_0x2ce5d5[_0x4549ab(0xbf)][_0x4549ab(0x169)](_0x374498[_0x4549ab(0xcb)])&&_0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x4013f9+'.segment',_0x4549ab(0xf2),_0x4549ab(0x13b)+_0x374498[_0x4549ab(0xcb)]+'\x27',_0x2ce5d5))));_0x374498['next']&&_0x2ce5d5['stepNames']&&!_0x2ce5d5[_0x4549ab(0x11e)][_0x4549ab(0x169)](_0x374498[_0x4549ab(0xc5)])&&_0x2cfd42[_0x4549ab(0x160)](createIssue(_0x4549ab(0x152),_0x4013f9+_0x4549ab(0xea),_0x4549ab(0xd1),_0x4549ab(0xba)+_0x374498[_0x4549ab(0xc5)]+'\x27',_0x2ce5d5));if(_0x374498[_0x4549ab(0xc5)]){const _0x46fe62=_0x25e679['get'](_0x374498[_0x4549ab(0xc5)]);_0x46fe62?.[_0x4549ab(0x168)]===_0x4549ab(0xbd)&&_0x2cfd42[_0x4549ab(0x160)](createIssue('warning',_0x4013f9+_0x4549ab(0xea),_0x4549ab(0x161),_0x4549ab(0x116)+_0x374498[_0x4549ab(0x135)]+_0x4549ab(0xe6)+_0x374498[_0x4549ab(0xc5)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x2ce5d5));}}return _0x2cfd42;}function validateAbTestStep(_0x1e432a,_0x429a00,_0x21e63f,_0x4fb5fa){const _0x35f92b=a136_0x13a2,_0x191a4f=[];if(!_0x1e432a[_0x35f92b(0x10a)]?.[_0x35f92b(0x13d)]||_0x1e432a[_0x35f92b(0x10a)][_0x35f92b(0x13d)][_0x35f92b(0xe3)]===0x0)return _0x191a4f[_0x35f92b(0x160)](createIssue(_0x35f92b(0x152),_0x429a00+_0x35f92b(0x148),_0x35f92b(0xed),_0x35f92b(0x162),_0x21e63f,_0x429a00)),_0x191a4f;const _0x1ba5dc=_0x1e432a[_0x35f92b(0x10a)]['variants'][_0x35f92b(0x112)]((_0x19a664,_0x936c04)=>_0x19a664+(_0x936c04[_0x35f92b(0x14a)]||0x0),0x0);Math['abs'](_0x1ba5dc-0x64)>0.01&&_0x191a4f[_0x35f92b(0x160)](createIssue('error',_0x429a00+_0x35f92b(0x148),'INVALID_AB_TEST_PERCENTAGES',_0x35f92b(0xf7)+_0x1ba5dc+'%)',_0x21e63f));for(let _0x142ff6=0x0;_0x142ff6<_0x1e432a['with']['variants']['length'];_0x142ff6++){const _0x26e044=_0x1e432a[_0x35f92b(0x10a)]['variants'][_0x142ff6],_0x511fa1=_0x429a00+'.with.variants['+_0x142ff6+']';_0x26e044[_0x35f92b(0xc5)]&&_0x21e63f[_0x35f92b(0x11e)]&&!_0x21e63f[_0x35f92b(0x11e)][_0x35f92b(0x169)](_0x26e044['next'])&&_0x191a4f['push'](createIssue(_0x35f92b(0x152),_0x511fa1+_0x35f92b(0xea),_0x35f92b(0xd1),_0x35f92b(0xef)+_0x26e044[_0x35f92b(0xc5)]+'\x27',_0x21e63f));if(_0x26e044[_0x35f92b(0xc5)]){const _0x3eb2ad=_0x4fb5fa[_0x35f92b(0xe2)](_0x26e044[_0x35f92b(0xc5)]);_0x3eb2ad?.['type']===_0x35f92b(0xbd)&&_0x191a4f[_0x35f92b(0x160)](createIssue(_0x35f92b(0x172),_0x511fa1+_0x35f92b(0xea),'BRANCH_DIRECTLY_TO_MERGE',_0x35f92b(0xe4)+_0x26e044[_0x35f92b(0x135)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x26e044['next']+_0x35f92b(0xc7),_0x21e63f));}}return _0x191a4f;}function validateJumpStep(_0x253b8f,_0x51c842,_0x6a8777){const _0x53bd73=a136_0x13a2,_0x5f5240=[];if(!_0x253b8f[_0x53bd73(0x10a)]?.[_0x53bd73(0x114)])return _0x5f5240[_0x53bd73(0x160)](createIssue(_0x53bd73(0x152),_0x51c842+_0x53bd73(0x127),_0x53bd73(0x143),_0x53bd73(0xc2),_0x6a8777,_0x51c842)),_0x5f5240;return(!_0x253b8f[_0x53bd73(0x10a)][_0x53bd73(0x114)][_0x53bd73(0xfb)]||!_0x253b8f['with'][_0x53bd73(0x114)][_0x53bd73(0xc3)])&&_0x5f5240[_0x53bd73(0x160)](createIssue('error',_0x51c842+_0x53bd73(0x127),_0x53bd73(0x143),_0x53bd73(0xc4),_0x6a8777)),_0x5f5240;}function buildConvergenceMap(_0x586a64){const _0x185d2f=a136_0x13a2,_0x8b091b=new Map();function _0x4da082(_0x3b80f9,_0x512b1f){const _0x52ad36=a136_0x13a2,_0x2e51ff=_0x8b091b[_0x52ad36(0xe2)](_0x3b80f9)||[];_0x2e51ff[_0x52ad36(0x160)](_0x512b1f),_0x8b091b[_0x52ad36(0x16a)](_0x3b80f9,_0x2e51ff);}for(const _0x1c090e of _0x586a64){_0x1c090e[_0x185d2f(0xc5)]&&_0x4da082(_0x1c090e['next'],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0xbb)+_0x1c090e[_0x185d2f(0x135)]+'\x27'});if(_0x1c090e['type']===_0x185d2f(0x133)&&_0x1c090e[_0x185d2f(0x10a)]?.['branches'])for(const _0x3aee88 of _0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x117)]){_0x3aee88[_0x185d2f(0xc5)]&&_0x4da082(_0x3aee88[_0x185d2f(0xc5)],{'stepName':_0x1c090e[_0x185d2f(0x135)],'description':_0x185d2f(0x173)+_0x3aee88[_0x185d2f(0x135)]+_0x185d2f(0xd6)+_0x1c090e['name']+'\x27'});}if(_0x1c090e[_0x185d2f(0x168)]===_0x185d2f(0xc1)&&_0x1c090e[_0x185d2f(0x10a)]?.[_0x185d2f(0x13d)])for(const _0x82edb2 of _0x1c090e['with'][_0x185d2f(0x13d)]){_0x82edb2['next']&&_0x4da082(_0x82edb2[_0x185d2f(0xc5)],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0xe9)+_0x82edb2[_0x185d2f(0x135)]+_0x185d2f(0xd6)+_0x1c090e['name']+'\x27'});}_0x1c090e['type']===_0x185d2f(0x155)&&_0x1c090e[_0x185d2f(0x10a)]?.[_0x185d2f(0x140)]&&(_0x1c090e['with'][_0x185d2f(0x140)]['next']&&_0x4da082(_0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x140)][_0x185d2f(0xc5)],{'stepName':_0x1c090e['name'],'description':_0x185d2f(0x10b)+_0x1c090e[_0x185d2f(0x135)]+'\x27'}),_0x1c090e['with'][_0x185d2f(0x140)][_0x185d2f(0x151)]?.[_0x185d2f(0xc5)]&&_0x4da082(_0x1c090e[_0x185d2f(0x10a)][_0x185d2f(0x140)]['timeout'][_0x185d2f(0xc5)],{'stepName':_0x1c090e[_0x185d2f(0x135)],'description':_0x185d2f(0x13f)+_0x1c090e[_0x185d2f(0x135)]+'\x27'}));}return _0x8b091b;}function validateFlowControl(_0x8c2260,_0xb62833,_0x3457be){const _0x1ec21e=a136_0x13a2,_0x1d1109=[],_0x452419=_0x1ec21e(0x164)+_0xb62833+']',_0x3e7e1d=_0x8c2260[_0x1ec21e(0xfc)]||[];if(_0x3e7e1d[_0x1ec21e(0xe3)]===0x0)return _0x1d1109;const _0x4be2ce=new Map();for(const _0x3c22ab of _0x3e7e1d){_0x3c22ab[_0x1ec21e(0x135)]&&_0x4be2ce[_0x1ec21e(0x16a)](_0x3c22ab[_0x1ec21e(0x135)],_0x3c22ab);}const _0x302b6a=buildConvergenceMap(_0x3e7e1d),_0x1d103d=_0x3e7e1d[_0x1ec21e(0x153)](_0x50554b=>_0x50554b['type']===_0x1ec21e(0x102));!_0x1d103d&&_0x1d1109[_0x1ec21e(0x160)](createIssue(_0x1ec21e(0x152),_0x452419+'.steps',_0x1ec21e(0x109),_0x1ec21e(0x171)+_0x8c2260[_0x1ec21e(0x135)]+'\x27\x20has\x20no\x20end\x20step',_0x3457be));for(const [_0x3f24ad,_0x275133]of _0x302b6a){const _0x111a9a=_0x4be2ce[_0x1ec21e(0xe2)](_0x3f24ad);if(!_0x111a9a)continue;if(_0x275133[_0x1ec21e(0xe3)]>0x1&&_0x111a9a[_0x1ec21e(0x168)]!==_0x1ec21e(0xbd)){const _0x5ce961=_0x275133[_0x1ec21e(0x126)](_0x12c0d5=>_0x12c0d5['description'])[_0x1ec21e(0xf8)](',\x20');_0x1d1109[_0x1ec21e(0x160)](createIssue('error',_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x103),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x3f24ad+'\x27\x20(from:\x20'+_0x5ce961+_0x1ec21e(0xd5),_0x3457be));}_0x275133[_0x1ec21e(0xe3)]===0x1&&_0x111a9a[_0x1ec21e(0x168)]===_0x1ec21e(0xbd)&&_0x1d1109[_0x1ec21e(0x160)](createIssue('warning',_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x16e),'Merge\x20step\x20\x27'+_0x3f24ad+_0x1ec21e(0x139)+_0x275133[0x0][_0x1ec21e(0x106)]+_0x1ec21e(0xf5),_0x3457be));}for(const _0x4f9162 of _0x3e7e1d){if(_0x4f9162[_0x1ec21e(0x168)]==='merge'&&_0x4f9162['next']){const _0x375816=_0x4be2ce[_0x1ec21e(0xe2)](_0x4f9162[_0x1ec21e(0xc5)]);_0x375816?.['type']==='merge'&&_0x1d1109[_0x1ec21e(0x160)](createIssue(_0x1ec21e(0x152),_0x452419+_0x1ec21e(0x12f),_0x1ec21e(0x14c),_0x1ec21e(0x11c)+_0x4f9162[_0x1ec21e(0x135)]+_0x1ec21e(0x16d)+_0x4f9162[_0x1ec21e(0xc5)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x3457be));}}return _0x1d1109;}function validateCriteria(_0x1f3c73,_0x502daf,_0x397b52){const _0x47bb0f=a136_0x13a2,_0x341c6f=[];return _0x1f3c73[_0x47bb0f(0xcb)]&&(_0x397b52[_0x47bb0f(0xcd)]?.[_0x47bb0f(0x108)](_0x1f3c73['segment']),!_0x1f3c73['segment'][_0x47bb0f(0x11f)](_0x47bb0f(0x147))&&(_0x397b52[_0x47bb0f(0xbf)]&&!_0x397b52['embeddedSegments'][_0x47bb0f(0x169)](_0x1f3c73[_0x47bb0f(0xcb)])&&_0x341c6f[_0x47bb0f(0x160)](createIssue(_0x47bb0f(0x152),_0x502daf+_0x47bb0f(0x119),'MISSING_SEGMENT_REFERENCE',_0x47bb0f(0xcf)+_0x1f3c73[_0x47bb0f(0xcb)]+'\x27',_0x397b52)))),_0x341c6f;}function a136_0x12d4(){const _0x37e600=['end','CONVERGENCE_WITHOUT_MERGE','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','7IbrLmz','description','version','add','MISSING_END_STEP','with','condition\x20of\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','journeys','TOO_MANY_STAGES','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','journeys,\x20stages,\x20or\x20versions','.exit_criteria[','reduce','milestone','target','7722smhjAI','Decision\x20branch\x20\x27','branches','.with.branches','.segment','1869yzaOhK','activation','Merge\x20step\x20\x27','407556DliRaf','stepNames','startsWith','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','includes','\x20with\x20latest:\x20true','DUPLICATE_STEP_NAME','MISSING_ENTRY_CRITERIA','endsWith','map','.with.target','versions','Duplicate\x20step\x20name\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','excluded_','every','DUPLICATE_LATEST','.with.branches[','.steps','ACTIVATION_SCHEMA_ERROR','segments.','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','decision_point','path','name','code','END_STEP_HAS_NEXT_OR_WITH','Embedded\x20segment\x20\x27','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','\x20stages\x20but\x20maximum\x20is\x20','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','variants','values','timeout\x20of\x20\x27','condition','entries','message','INVALID_JUMP_TARGET','911124DUbnrT','goalIsInherited','.entry_criteria','ref:','.with.variants','MISSING_ACTIVATION_DEFINITION','percentage','skipSchema','MERGE_TO_MERGE_CHAIN','activationKeys','replace','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','state','timeout','error','some','\x20(across\x20','wait','.with.condition.timeout.next','sort','goal','MISSING_WAIT_PARAMS','596850wLIzID','.with.condition.next','stages','1148504qZOqav','.rule','indices','push','BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x27\x20has\x20only\x20','stages[','2zLvmyA','trim','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','type','has','set','keys','rule','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','SINGLE_INPUT_MERGE','size','FEW_STEPS','Stage\x20\x27','warning','branch\x20\x27','segments','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','step\x20\x27','MISSING_EXIT_CRITERIA','merge','\x20versions)','embeddedSegments','MISSING_GOAL','ab_test','Jump\x20step\x20requires\x20a\x20target','stage','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','next','INSUFFICIENT_STEPS','\x27\x20with\x20no\x20action\x20in\x20between','.steps[','Journey\x20can\x20have\x20at\x20most\x20one\x20','versions[','segment','journeys[','referencedSegments','exit_criteria','Criteria\x20references\x20undefined\x20segment\x20\x27','jump','INVALID_NEXT_REFERENCE','success','.with.condition','match',').\x20Use\x20a\x20merge\x20step.','\x27\x20of\x20\x27','190522PGXEKu','document','.with.condition.segment','filter','activations','UNUSED_EMBEDDED_SEGMENT','692TmRAHt','JOURNEY_SCHEMA_ERROR','Activation\x20step\x20requires\x20an\x20activation\x20reference','launched','journey\x20entry','get','length','A/B\x20test\x20variant\x20\x27','.with.activation','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.type','variant\x20\x27','.next','6eWLazz','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_CONDITIONS','.with','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','.name','data','MISSING_SEGMENT_REFERENCE','\x27\x20(first\x20defined\x20at\x20steps[','40olttiy',').\x20Merge\x20is\x20unnecessary.','\x27\x20has\x20no\x20steps','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','join','level','entry_criteria','journey','steps','latest','Journey\x20has\x20no\x20goal\x20defined','source','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','MISSING_NAME'];a136_0x12d4=function(){return _0x37e600;};return a136_0x12d4();}function validateEmbeddedSegment(_0x953c7a,_0x572493,_0x1a9d9c){const _0x39ba14=a136_0x13a2,_0x1da567=[];return _0x953c7a['rule']&&_0x1da567[_0x39ba14(0x160)](...validateRuleDef(_0x953c7a[_0x39ba14(0x16c)],_0x572493+_0x39ba14(0x15e),_0x1a9d9c)),_0x1da567;}function validateStage(_0x47919d,_0x57e907,_0x44dc8f,_0x1160da){const _0x57367a=a136_0x13a2,_0x3c1e2c=[],_0x476b20='stages['+_0x57e907+']',_0x308d19=new Map(),_0x2f7487=new Map();if(_0x47919d['steps']){for(let _0x488717=0x0;_0x488717<_0x47919d[_0x57367a(0xfc)]['length'];_0x488717++){const _0x26bc94=_0x47919d[_0x57367a(0xfc)][_0x488717];_0x26bc94[_0x57367a(0x135)]&&_0x308d19['set'](_0x26bc94[_0x57367a(0x135)],_0x26bc94);}for(let _0x11847f=0x0;_0x11847f<_0x47919d[_0x57367a(0xfc)]['length'];_0x11847f++){const _0x599d43=_0x47919d[_0x57367a(0xfc)][_0x11847f],_0x3b26c1=_0x476b20+_0x57367a(0xc8)+_0x11847f+']';if(_0x599d43['name']){if(_0x2f7487[_0x57367a(0x169)](_0x599d43[_0x57367a(0x135)])){const _0x1c8f52=_0x2f7487['get'](_0x599d43['name']);_0x3c1e2c['push'](createIssue(_0x57367a(0x152),_0x3b26c1+_0x57367a(0xf0),_0x57367a(0x123),_0x57367a(0x129)+_0x599d43[_0x57367a(0x135)]+_0x57367a(0xf3)+_0x1c8f52+'])',_0x1160da));}else _0x2f7487['set'](_0x599d43[_0x57367a(0x135)],_0x11847f);}_0x3c1e2c['push'](...validateStep(_0x599d43,_0x3b26c1,_0x1160da,_0x308d19));}}_0x47919d[_0x57367a(0xfa)]&&_0x3c1e2c['push'](...validateCriteria(_0x47919d[_0x57367a(0xfa)],_0x476b20+'.entry_criteria',_0x1160da));if(_0x47919d[_0x57367a(0xce)])for(let _0x3d41a3=0x0;_0x3d41a3<_0x47919d[_0x57367a(0xce)][_0x57367a(0xe3)];_0x3d41a3++){_0x3c1e2c['push'](...validateCriteria(_0x47919d['exit_criteria'][_0x3d41a3],_0x476b20+_0x57367a(0x111)+_0x3d41a3+']',_0x1160da));}return _0x47919d[_0x57367a(0x113)]&&_0x3c1e2c[_0x57367a(0x160)](...validateCriteria(_0x47919d['milestone'],_0x476b20+'.milestone',_0x1160da)),_0x3c1e2c[_0x57367a(0x160)](...validateStageStructure(_0x47919d,_0x57e907,_0x44dc8f,_0x1160da)),_0x3c1e2c[_0x57367a(0x160)](...validateFlowControl(_0x47919d,_0x57e907,_0x1160da)),_0x3c1e2c;}function validateStagesForVersion(_0x30abda,_0x54274a,_0x2356c8,_0x2ce700,_0x437449,_0xcc5117,_0x488799){const _0x329119=a136_0x13a2;if(_0x30abda['length']===0x0){_0x437449['push']({'level':_0x329119(0x152),'path':_0x2ce700+'stages','code':'MISSING_STAGES','message':_0x329119(0x13c),'location':getLocationFromPath(_0x2356c8[_0x329119(0xd8)],_0x2356c8[_0x329119(0xff)],[_0x329119(0x15c)])});return;}const _0x1a8a61=new Set();for(const _0x4a2fe8 of _0x30abda){if(_0x4a2fe8[_0x329119(0xfc)])for(const _0x1d8d91 of _0x4a2fe8[_0x329119(0xfc)]){_0x1d8d91[_0x329119(0x135)]&&_0x1a8a61['add'](_0x1d8d91[_0x329119(0x135)]);}}const _0x2f149c={..._0x2356c8,'stepNames':_0x1a8a61},_0x47c2bb=validateVersionStructure(_0x30abda,_0x2f149c);for(const _0x32acf0 of _0x47c2bb){const _0x3f882d=_0x2ce700?{..._0x32acf0,'path':''+_0x2ce700+_0x32acf0['path']}:_0x32acf0;if(_0x3f882d[_0x329119(0xf9)]===_0x329119(0x152))_0x437449['push'](_0x3f882d);else _0xcc5117[_0x329119(0x160)](_0x3f882d);}for(let _0x21ea69=0x0;_0x21ea69<_0x30abda['length'];_0x21ea69++){const _0x49f1bc=validateStage(_0x30abda[_0x21ea69],_0x21ea69,_0x30abda[_0x329119(0xe3)],_0x2f149c);for(const _0x15a464 of _0x49f1bc){const _0x15a160=_0x2ce700?{..._0x15a464,'path':''+_0x2ce700+_0x15a464[_0x329119(0x134)]}:_0x15a464;if(_0x15a160[_0x329119(0xf9)]===_0x329119(0x152))_0x437449[_0x329119(0x160)](_0x15a160);else _0xcc5117[_0x329119(0x160)](_0x15a160);}}if(_0x54274a[_0x329119(0x158)]){const _0x123cc6=_0x488799?.[_0x329119(0x145)]?'goal':_0x2ce700+_0x329119(0x158),_0x5cc9b3=validateCriteria(_0x54274a[_0x329119(0x158)],_0x123cc6,_0x2f149c);for(const _0x3e226d of _0x5cc9b3){if(_0x3e226d[_0x329119(0xf9)]===_0x329119(0x152))_0x437449[_0x329119(0x160)](_0x3e226d);else _0xcc5117['push'](_0x3e226d);}}}function extractVersionIndex(_0x4a7f07){const _0x40ec26=a136_0x13a2,_0x411926=_0x4a7f07[_0x40ec26(0xd4)](/^journeys\[(\d+)\]\./);return _0x411926?_0x411926[0x1]:undefined;}function deduplicateAcrossVersions(_0x214b6a){const _0x268e7b=a136_0x13a2,_0x1089d5=new Map();for(let _0xfff140=0x0;_0xfff140<_0x214b6a[_0x268e7b(0xe3)];_0xfff140++){const _0x409344=_0x214b6a[_0xfff140][_0x268e7b(0x136)]+':'+_0x214b6a[_0xfff140]['message'],_0x417020=extractVersionIndex(_0x214b6a[_0xfff140][_0x268e7b(0x134)]),_0x320202=_0x1089d5[_0x268e7b(0xe2)](_0x409344);if(_0x320202){_0x320202[_0x268e7b(0x15f)][_0x268e7b(0x160)](_0xfff140);if(_0x417020)_0x320202[_0x268e7b(0x128)][_0x268e7b(0x108)](_0x417020);}else _0x1089d5[_0x268e7b(0x16a)](_0x409344,{'indices':[_0xfff140],'versions':new Set(_0x417020?[_0x417020]:[])});}const _0x33d665=new Set();for(const {indices:_0x574317,versions:_0x438b4d}of _0x1089d5[_0x268e7b(0x13e)]()){if(_0x438b4d['size']<=0x1)continue;const _0x401f57=_0x214b6a[_0x574317[0x0]];_0x401f57[_0x268e7b(0x134)]=_0x401f57[_0x268e7b(0x134)][_0x268e7b(0x14e)](/^journeys\[\d+\]\./,''),_0x401f57['message']=_0x401f57[_0x268e7b(0x142)]+_0x268e7b(0x154)+_0x438b4d[_0x268e7b(0x16f)]+_0x268e7b(0xbe);for(let _0x41b064=0x1;_0x41b064<_0x574317[_0x268e7b(0xe3)];_0x41b064++){_0x33d665[_0x268e7b(0x108)](_0x574317[_0x41b064]);}}const _0x4fd4be=[..._0x33d665][_0x268e7b(0x157)]((_0x183ede,_0x428d35)=>_0x428d35-_0x183ede);for(const _0x578f89 of _0x4fd4be){_0x214b6a['splice'](_0x578f89,0x1);}}export function validateJourneyDef(_0x145096,_0x3300f6={},_0x1c804f={}){const _0x1db158=a136_0x13a2;if(_0x1c804f[_0x1db158(0x14b)])return runJourneySemanticChecks(_0x145096,_0x3300f6);const _0x1fed16=JourneyDefSchema['safeParse'](_0x145096);if(_0x1fed16[_0x1db158(0xd2)])return runJourneySemanticChecks(_0x1fed16[_0x1db158(0xf1)],_0x3300f6);return zodErrorsToJourneyValidationResult(_0x1fed16[_0x1db158(0x152)],_0x3300f6);}function zodErrorsToJourneyValidationResult(_0x3347a8,_0x182c33){const _0x24c353=flattenZodIssues(_0x3347a8['issues']),_0x172fbd=_0x24c353['map'](_0x28b8c9=>{const _0x722a1a=a136_0x13a2,_0x27af04=formatZodPath(_0x28b8c9[_0x722a1a(0x134)]),_0x433587=mapJourneyZodIssueToCode(_0x28b8c9,_0x27af04),_0x2742ef=getLocationFromPath(_0x182c33['document'],_0x182c33[_0x722a1a(0xff)],_0x28b8c9[_0x722a1a(0x134)][_0x722a1a(0x126)](_0x46a7f6=>typeof _0x46a7f6==='symbol'?String(_0x46a7f6):_0x46a7f6));return{'level':_0x722a1a(0x152),'path':_0x27af04,'code':_0x433587,'message':_0x28b8c9[_0x722a1a(0x142)],..._0x2742ef&&{'location':_0x2742ef}};});return{'valid':![],'errors':_0x172fbd,'warnings':[]};}function mapJourneyZodIssueToCode(_0x50e3bf,_0x4b5027){const _0x5856f5=a136_0x13a2;if(_0x4b5027===_0x5856f5(0x135))return _0x5856f5(0x101);if(_0x4b5027[_0x5856f5(0x125)](_0x5856f5(0xe8))&&_0x4b5027[_0x5856f5(0x121)](_0x5856f5(0xfc)))return _0x5856f5(0xde);if(_0x4b5027===_0x5856f5(0x15c)||_0x4b5027[_0x5856f5(0x125)]('.stages'))return'MISSING_STAGES';if(_0x4b5027===''&&_0x50e3bf[_0x5856f5(0x142)]['includes'](_0x5856f5(0x110)))return'MISSING_STAGES';if(_0x4b5027['includes'](_0x5856f5(0x11b)))return _0x5856f5(0x130);return _0x5856f5(0xde);}function runJourneySemanticChecks(_0x24e0f0,_0x3fe184){const _0xb30f3e=a136_0x13a2,_0x1dad6e=[],_0x31604e=[];(!_0x24e0f0['name']||_0x24e0f0['name'][_0xb30f3e(0x166)]()==='')&&_0x1dad6e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x152),'path':_0xb30f3e(0x135),'code':_0xb30f3e(0x101),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],[_0xb30f3e(0x135)])});const _0x2b3963=new Set();if(_0x24e0f0[_0xb30f3e(0xb9)])for(const _0x3d630d of Object[_0xb30f3e(0x16b)](_0x24e0f0['segments'])){_0x2b3963[_0xb30f3e(0x108)](_0x3d630d);}const _0x3e4f97=new Set();if(_0x24e0f0[_0xb30f3e(0xdb)])for(const _0x2353fe of Object[_0xb30f3e(0x16b)](_0x24e0f0['activations'])){_0x3e4f97[_0xb30f3e(0x108)](_0x2353fe);}const _0x3c29c1=new Set(),_0x2ccb08={..._0x3fe184,'embeddedSegments':_0x2b3963,'referencedSegments':_0x3c29c1,'activationKeys':_0x3e4f97[_0xb30f3e(0x16f)]>0x0?_0x3e4f97:undefined};if(_0x24e0f0[_0xb30f3e(0xb9)])for(const [_0x11b99e,_0x24245e]of Object[_0xb30f3e(0x141)](_0x24e0f0[_0xb30f3e(0xb9)])){const _0x44ba2a=validateEmbeddedSegment(_0x24245e,_0xb30f3e(0x131)+_0x11b99e,_0x2ccb08);for(const _0x104107 of _0x44ba2a){if(_0x104107['level']===_0xb30f3e(0x152))_0x1dad6e[_0xb30f3e(0x160)](_0x104107);else _0x31604e[_0xb30f3e(0x160)](_0x104107);}}const _0x3f7c52=!!_0x24e0f0['goal'],_0x3af83d=_0x24e0f0[_0xb30f3e(0x10d)]?.[_0xb30f3e(0x12c)](_0x266764=>!!_0x266764['goal'])??![];!_0x3f7c52&&!_0x3af83d&&_0x31604e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x172),'path':_0xb30f3e(0x158),'code':_0xb30f3e(0xc0),'message':_0xb30f3e(0xfe),'location':getLocationFromPath(_0x3fe184['document'],_0x3fe184['source'],['goal'])});const _0x31cb1e=_0x24e0f0[_0xb30f3e(0x10d)]??_0x24e0f0[_0xb30f3e(0x128)];if(_0x31cb1e&&_0x31cb1e[_0xb30f3e(0xda)](_0x5a77f8=>_0x5a77f8[_0xb30f3e(0xfd)]===!![])['length']>0x1){const _0x17abff=_0x24e0f0[_0xb30f3e(0x10d)]?_0xb30f3e(0x10d):_0xb30f3e(0x128);_0x1dad6e[_0xb30f3e(0x160)]({'level':_0xb30f3e(0x152),'path':_0x17abff,'code':_0xb30f3e(0x12d),'message':_0xb30f3e(0xc9)+(_0x17abff===_0xb30f3e(0x10d)?_0xb30f3e(0xe1):_0xb30f3e(0x107))+_0xb30f3e(0x122),'location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],[_0x17abff])});}if(_0x24e0f0[_0xb30f3e(0x10d)]&&_0x24e0f0['journeys'][_0xb30f3e(0xe3)]>0x0)for(let _0x351a12=0x0;_0x351a12<_0x24e0f0['journeys'][_0xb30f3e(0xe3)];_0x351a12++){const _0x58db71=_0x24e0f0[_0xb30f3e(0x10d)][_0x351a12];if(_0x24e0f0[_0xb30f3e(0x10d)]['length']>0x1&&_0x58db71['state']===_0xb30f3e(0xe0))continue;const _0x570bcb=_0x58db71[_0xb30f3e(0x15c)]||[],_0x48babe=_0xb30f3e(0xcc)+_0x351a12+'].',_0x3b839b=!!_0x58db71[_0xb30f3e(0x158)],_0x47a7c0=_0x3b839b?{..._0x24e0f0,'goal':_0x58db71[_0xb30f3e(0x158)]}:_0x24e0f0;validateStagesForVersion(_0x570bcb,_0x47a7c0,_0x2ccb08,_0x48babe,_0x1dad6e,_0x31604e,{'goalIsInherited':!_0x3b839b});}else{if(_0x24e0f0['versions']&&_0x24e0f0[_0xb30f3e(0x128)][_0xb30f3e(0xe3)]>0x0)for(let _0x2bd166=0x0;_0x2bd166<_0x24e0f0['versions']['length'];_0x2bd166++){const _0x4a4512=_0x24e0f0['versions'][_0x2bd166];if(_0x24e0f0[_0xb30f3e(0x128)]['length']>0x1&&_0x4a4512[_0xb30f3e(0x150)]===_0xb30f3e(0xe0))continue;const _0x5e89a6=_0x4a4512[_0xb30f3e(0x15c)]||[],_0x21f407=_0xb30f3e(0xca)+_0x2bd166+'].';validateStagesForVersion(_0x5e89a6,_0x24e0f0,_0x2ccb08,_0x21f407,_0x1dad6e,_0x31604e);}else{const _0x38b0fc=_0x24e0f0['stages']||[];validateStagesForVersion(_0x38b0fc,_0x24e0f0,_0x2ccb08,'',_0x1dad6e,_0x31604e);}}_0x24e0f0[_0xb30f3e(0x10d)]&&_0x24e0f0[_0xb30f3e(0x10d)][_0xb30f3e(0xe3)]>0x1&&(deduplicateAcrossVersions(_0x1dad6e),deduplicateAcrossVersions(_0x31604e));for(const _0x4ea2ad of _0x2b3963){!_0x3c29c1[_0xb30f3e(0x169)](_0x4ea2ad)&&!_0x4ea2ad[_0xb30f3e(0x11f)](_0xb30f3e(0x12b))&&_0x31604e['push']({'level':_0xb30f3e(0x172),'path':_0xb30f3e(0x131)+_0x4ea2ad,'code':_0xb30f3e(0xdc),'message':_0xb30f3e(0x138)+_0x4ea2ad+_0xb30f3e(0x10f),'location':getLocationFromPath(_0x3fe184[_0xb30f3e(0xd8)],_0x3fe184[_0xb30f3e(0xff)],['segments',_0x4ea2ad])});}return{'valid':_0x1dad6e[_0xb30f3e(0xe3)]===0x0,'errors':_0x1dad6e,'warnings':_0x31604e};}
|