@treasuredata/tdx 2026.8.3 → 2026.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.d.ts.map +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/cas-segment-command.js.map +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/p13n-command.d.ts +11 -0
- package/dist/commands/p13n-command.d.ts.map +1 -0
- package/dist/commands/p13n-command.js +1 -0
- package/dist/commands/p13n-command.js.map +1 -0
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +9 -1
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/auth-token.d.ts +42 -6
- package/dist/sdk/auth-token.d.ts.map +1 -1
- package/dist/sdk/auth-token.js +1 -1
- package/dist/sdk/auth-token.js.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-schema.d.ts +63 -0
- package/dist/sdk/cas/cas-segment-schema.d.ts.map +1 -0
- package/dist/sdk/cas/cas-segment-schema.js +1 -0
- package/dist/sdk/cas/cas-segment-schema.js.map +1 -0
- package/dist/sdk/cas/cas-segment-validator.d.ts +76 -0
- package/dist/sdk/cas/cas-segment-validator.d.ts.map +1 -0
- package/dist/sdk/cas/cas-segment-validator.js +1 -0
- package/dist/sdk/cas/cas-segment-validator.js.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/validate-files.d.ts +23 -6
- package/dist/sdk/cas/validate-files.d.ts.map +1 -1
- package/dist/sdk/cas/validate-files.js +1 -1
- package/dist/sdk/cas/validate-files.js.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.d.ts +6 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.d.ts +11 -2
- package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/oauth-refresh.js.map +1 -1
- package/dist/sdk/client/p13n-studio-api-client.d.ts +19 -0
- package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -0
- package/dist/sdk/client/p13n-studio-api-client.js +1 -0
- package/dist/sdk/client/p13n-studio-api-client.js.map +1 -0
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +6 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/p13n-studio.d.ts +13 -0
- package/dist/sdk/p13n-studio.d.ts.map +1 -0
- package/dist/sdk/p13n-studio.js +1 -0
- package/dist/sdk/p13n-studio.js.map +1 -0
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.d.ts +2 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/p13n-studio.d.ts +18 -0
- package/dist/sdk/types/p13n-studio.d.ts.map +1 -0
- package/dist/sdk/types/p13n-studio.js +1 -0
- package/dist/sdk/types/p13n-studio.js.map +1 -0
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/proxy-fetch.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b8acf,_0x262571){const _0x2e0ee5=a166_0x123d,_0x1d2d2a=_0x3b8acf();while(!![]){try{const _0x1f0639=parseInt(_0x2e0ee5(0x1b6))/0x1+parseInt(_0x2e0ee5(0x1b3))/0x2*(parseInt(_0x2e0ee5(0x1af))/0x3)+parseInt(_0x2e0ee5(0x1a5))/0x4+parseInt(_0x2e0ee5(0x1b4))/0x5*(parseInt(_0x2e0ee5(0x1b2))/0x6)+-parseInt(_0x2e0ee5(0x1ae))/0x7*(-parseInt(_0x2e0ee5(0x1a9))/0x8)+-parseInt(_0x2e0ee5(0x1b8))/0x9+parseInt(_0x2e0ee5(0x1a4))/0xa*(-parseInt(_0x2e0ee5(0x1ad))/0xb);if(_0x1f0639===_0x262571)break;else _0x1d2d2a['push'](_0x1d2d2a['shift']());}catch(_0x4bb1e2){_0x1d2d2a['push'](_0x1d2d2a['shift']());}}}(a166_0x10de,0x44133));import{readdirSync,statSync}from'fs';function a166_0x123d(_0x3e03df,_0x2c88e3){_0x3e03df=_0x3e03df-0x1a3;const _0x10de1c=a166_0x10de();let _0x123db7=_0x10de1c[_0x3e03df];return _0x123db7;}import a166_0x4b0193 from'path';function a166_0x10de(){const _0x4a20ff=['relative','162648UnhOhe','map','10RzPAZf','551048gfktgS','dirname','.yaml','endsWith','55248vmzSlB','.yml','push','join','12659196xCYlCA','7QLlylM','102MjmizG','replace','isDirectory','36mPOZua','18888LxtuMR','401225sljTGt','name','500509CcCbod'];a166_0x10de=function(){return _0x4a20ff;};return a166_0x10de();}export function findYamlFiles(_0x39e373){const _0x5c1960=[];function _0x63934a(_0x2b9cd4){const _0x37c33d=a166_0x123d,_0x3d4500=readdirSync(_0x2b9cd4,{'withFileTypes':!![]});for(const _0x288ce5 of _0x3d4500){const _0x23ab8f=a166_0x4b0193[_0x37c33d(0x1ac)](_0x2b9cd4,_0x288ce5[_0x37c33d(0x1b5)]);if(_0x288ce5[_0x37c33d(0x1b1)]())_0x63934a(_0x23ab8f);else(_0x288ce5[_0x37c33d(0x1b5)][_0x37c33d(0x1a8)](_0x37c33d(0x1aa))||_0x288ce5[_0x37c33d(0x1b5)]['endsWith'](_0x37c33d(0x1a7)))&&_0x5c1960[_0x37c33d(0x1ab)](_0x23ab8f);}}return _0x63934a(_0x39e373),_0x5c1960;}export function discoverYamlFiles(_0x39780b){const _0x45a92f=a166_0x123d,_0x523a79=findYamlFiles(_0x39780b);return _0x523a79[_0x45a92f(0x1a3)](_0x5d8f30=>{const _0x354a75=_0x45a92f,_0xfdda36=a166_0x4b0193[_0x354a75(0x1b7)](_0x39780b,_0x5d8f30),_0x28b2ca=a166_0x4b0193[_0x354a75(0x1a6)](_0xfdda36);return{'absolutePath':_0x5d8f30,'relativePath':_0xfdda36,'folderPath':_0x28b2ca==='.'?'':_0x28b2ca[_0x354a75(0x1b0)](/\\/g,'/')};});}export function isYamlFile(_0x1c3698){const _0x98c7c2=a166_0x123d;try{const _0x5c195a=statSync(_0x1c3698);if(!_0x5c195a['isFile']())return![];const _0x5a5794=a166_0x4b0193['extname'](_0x1c3698)['toLowerCase']();return _0x5a5794===_0x98c7c2(0x1aa)||_0x5a5794===_0x98c7c2(0x1a7);}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2189b6,_0x57cbb3){const _0x59ba62=a162_0x4fd9,_0xbd9a1a=_0x2189b6();while(!![]){try{const _0x5e0598=-parseInt(_0x59ba62(0x22f))/0x1+-parseInt(_0x59ba62(0x1fc))/0x2*(parseInt(_0x59ba62(0x223))/0x3)+parseInt(_0x59ba62(0x22c))/0x4+-parseInt(_0x59ba62(0x1ea))/0x5*(parseInt(_0x59ba62(0x1ed))/0x6)+-parseInt(_0x59ba62(0x202))/0x7*(parseInt(_0x59ba62(0x1dd))/0x8)+-parseInt(_0x59ba62(0x1de))/0x9*(-parseInt(_0x59ba62(0x204))/0xa)+parseInt(_0x59ba62(0x227))/0xb*(parseInt(_0x59ba62(0x1ef))/0xc);if(_0x5e0598===_0x57cbb3)break;else _0xbd9a1a['push'](_0xbd9a1a['shift']());}catch(_0x32e2e3){_0xbd9a1a['push'](_0xbd9a1a['shift']());}}}(a162_0x302b,0x3fe4b));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0xb210f2){const _0x1c81d7=a162_0x4fd9;return _0xb210f2[_0x1c81d7(0x1f6)]()[_0x1c81d7(0x205)](/\s+/g,'_')['replace'](/[^a-z0-9_\p{L}\p{N}]/gu,'')['replace'](/_+/g,'_')[_0x1c81d7(0x205)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x14cd66){const _0x1dd9a8=a162_0x4fd9,_0x2f22f4=_0x14cd66['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2f22f4){const _0x462157=_0x2f22f4[0x1][_0x1dd9a8(0x1f6)](),_0x2e4829=_0x2f22f4[0x2],_0xd66a9d=_0x2e4829[_0x1dd9a8(0x205)](/-/g,'')[_0x1dd9a8(0x229)](0x0,0x4)[_0x1dd9a8(0x1f6)]();return _0x462157+'_'+_0xd66a9d;}const _0x297201=_0x14cd66[_0x1dd9a8(0x201)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x297201){const _0x542fdd=_0x297201[0x1],_0x4c7e24=_0x297201[0x2][_0x1dd9a8(0x1f6)](),_0x2698cc=_0x542fdd[_0x1dd9a8(0x205)](/-/g,'')[_0x1dd9a8(0x229)](0x0,0x4)[_0x1dd9a8(0x1f6)]();return _0x4c7e24+'_'+_0x2698cc;}return undefined;}function stableStringify(_0x312783){const _0x5ce5d1=a162_0x4fd9;if(Array['isArray'](_0x312783))return'['+_0x312783[_0x5ce5d1(0x226)](_0x246381=>stableStringify(_0x246381))[_0x5ce5d1(0x1fa)](',')+']';if(_0x312783&&typeof _0x312783===_0x5ce5d1(0x20c)){const _0x5a9e4c=_0x312783,_0x3879c8=Object[_0x5ce5d1(0x203)](_0x5a9e4c)[_0x5ce5d1(0x21c)](),_0x42d7eb=_0x3879c8[_0x5ce5d1(0x226)](_0xd4cbab=>'\x22'+_0xd4cbab+'\x22:'+stableStringify(_0x5a9e4c[_0xd4cbab]));return'{'+_0x42d7eb[_0x5ce5d1(0x1fa)](',')+'}';}const _0x6998f0=JSON['stringify'](_0x312783);return _0x6998f0===undefined?_0x5ce5d1(0x209):_0x6998f0;}export function consolidateActivationsByContent(_0x45011e){const _0x275463=a162_0x4fd9,_0x47ae54={},_0x236021=new Map(),_0x5b4a81=new Map();for(const _0x3959ee of _0x45011e){if(!_0x3959ee)continue;for(const [_0x2807bd,_0x4b7f01]of Object['entries'](_0x3959ee)){const _0x16f5aa={'name':_0x4b7f01['name'],'connection':_0x4b7f01['connection'],..._0x4b7f01[_0x275463(0x1f5)]!==undefined&&{'all_columns':_0x4b7f01[_0x275463(0x1f5)]},..._0x4b7f01[_0x275463(0x230)]!==undefined&&{'columns':_0x4b7f01[_0x275463(0x230)]},..._0x4b7f01[_0x275463(0x20b)]!==undefined&&{'behavior':_0x4b7f01[_0x275463(0x20b)]},..._0x4b7f01[_0x275463(0x21a)]!==undefined&&{'schedule':_0x4b7f01[_0x275463(0x21a)]},..._0x4b7f01[_0x275463(0x220)]!==undefined&&{'notification':_0x4b7f01[_0x275463(0x220)]},..._0x4b7f01[_0x275463(0x1ec)]!==undefined&&{'connector_config':_0x4b7f01['connector_config']},..._0x4b7f01[_0x275463(0x212)]!==undefined&&{'activation_template_id':_0x4b7f01['activation_template_id']}},_0x83072c=stableStringify(_0x16f5aa),_0x37821d=_0x5b4a81[_0x275463(0x208)](_0x83072c);_0x37821d?_0x236021[_0x275463(0x1e4)](_0x2807bd,_0x37821d):(_0x47ae54[_0x2807bd]=_0x4b7f01,_0x236021['set'](_0x2807bd,_0x2807bd),_0x5b4a81[_0x275463(0x1e4)](_0x83072c,_0x2807bd));}}return{'merged':_0x47ae54,'nameMapping':_0x236021};}export function updateActivationReferences(_0x3ccf48,_0xfecea6){const _0xc012b6=a162_0x4fd9;if(!_0x3ccf48)return;for(const _0x20174e of _0x3ccf48){if(!_0x20174e['steps'])continue;for(const _0x9cdf37 of _0x20174e[_0xc012b6(0x200)]){if(_0x9cdf37[_0xc012b6(0x22a)]==='activation'&&_0x9cdf37['with']?.[_0xc012b6(0x1e2)]){const _0x29e019=_0xfecea6[_0xc012b6(0x208)](_0x9cdf37[_0xc012b6(0x211)][_0xc012b6(0x1e2)]);_0x29e019&&_0x29e019!==_0x9cdf37[_0xc012b6(0x211)][_0xc012b6(0x1e2)]&&(_0x9cdf37[_0xc012b6(0x211)][_0xc012b6(0x1e2)]=_0x29e019);}}}}export function consolidateSegmentsByContent(_0x55ccda,_0x15be4a){const _0x2973f8=a162_0x4fd9,_0x14a298={},_0x2176ea=new Map(),_0x3c209d=new Map();for(const _0x38edcc of _0x55ccda){if(!_0x38edcc)continue;for(const [_0x36c8f3,_0x5e50c3]of Object[_0x2973f8(0x210)](_0x38edcc)){if(!_0x5e50c3['rule']){_0x14a298[_0x36c8f3]=_0x5e50c3,_0x2176ea[_0x2973f8(0x1e4)](_0x36c8f3,_0x36c8f3);continue;}const _0x11b4ce=_0x5e50c3[_0x2973f8(0x1f0)]&&_0x5e50c3[_0x2973f8(0x1f0)][_0x2973f8(0x20d)]()?_0x5e50c3[_0x2973f8(0x1f0)]:undefined,_0x580c21=JSON[_0x2973f8(0x215)]({'description':_0x11b4ce,'rule':deepSortObject(_0x5e50c3[_0x2973f8(0x20e)])}),_0x2d2783=_0x3c209d[_0x2973f8(0x208)](_0x580c21);if(_0x2d2783){const _0x47ce67={..._0x5e50c3[_0x2973f8(0x1f0)]!==undefined&&{'description':_0x5e50c3[_0x2973f8(0x1f0)]},'rule':_0x5e50c3[_0x2973f8(0x20e)]?deepSortObject(_0x5e50c3[_0x2973f8(0x20e)]):_0x5e50c3['rule']};if(_0x36c8f3<_0x2d2783){_0x14a298[_0x36c8f3]=_0x47ce67,delete _0x14a298[_0x2d2783];for(const [_0x25dae1,_0x2cb626]of _0x2176ea[_0x2973f8(0x210)]()){_0x2cb626===_0x2d2783&&_0x2176ea['set'](_0x25dae1,_0x36c8f3);}_0x2176ea[_0x2973f8(0x1e4)](_0x36c8f3,_0x36c8f3),_0x3c209d[_0x2973f8(0x1e4)](_0x580c21,_0x36c8f3);}else _0x14a298[_0x2d2783]=_0x47ce67,_0x2176ea['set'](_0x36c8f3,_0x2d2783);}else{let _0x32f09d=_0x36c8f3;if(_0x15be4a){const _0x57406a=_0x15be4a[_0x2973f8(0x208)](_0x580c21);_0x57406a&&_0x57406a[_0x2973f8(0x1ee)]>0x0&&(_0x32f09d=_0x57406a['slice']()[_0x2973f8(0x21c)]()[0x0]);}const _0xe79886={..._0x5e50c3[_0x2973f8(0x1f0)]!==undefined&&{'description':_0x5e50c3[_0x2973f8(0x1f0)]},'rule':_0x5e50c3[_0x2973f8(0x20e)]?deepSortObject(_0x5e50c3[_0x2973f8(0x20e)]):_0x5e50c3[_0x2973f8(0x20e)]};_0x14a298[_0x32f09d]=_0xe79886,_0x2176ea['set'](_0x36c8f3,_0x32f09d),_0x3c209d[_0x2973f8(0x1e4)](_0x580c21,_0x32f09d);}}}return{'merged':_0x14a298,'nameMapping':_0x2176ea};}export function updateSegmentReferences(_0x19886c,_0x2a2927){const _0x144ea4=a162_0x4fd9;if(!_0x19886c)return;for(const _0x2ceac2 of _0x19886c){if(_0x2ceac2['entry_criteria']?.['segment']){const _0x4cbaf3=_0x2a2927[_0x144ea4(0x208)](_0x2ceac2[_0x144ea4(0x20f)]['segment']);_0x4cbaf3&&(_0x2ceac2['entry_criteria'][_0x144ea4(0x1f2)]=_0x4cbaf3);}if(_0x2ceac2[_0x144ea4(0x1e5)])for(const _0x44aa54 of _0x2ceac2[_0x144ea4(0x1e5)]){if(_0x44aa54[_0x144ea4(0x1f2)]){const _0x5046ba=_0x2a2927[_0x144ea4(0x208)](_0x44aa54[_0x144ea4(0x1f2)]);_0x5046ba&&(_0x44aa54[_0x144ea4(0x1f2)]=_0x5046ba);}}if(_0x2ceac2[_0x144ea4(0x222)]?.['segment']){const _0xd74bab=_0x2a2927[_0x144ea4(0x208)](_0x2ceac2[_0x144ea4(0x222)][_0x144ea4(0x1f2)]);_0xd74bab&&(_0x2ceac2['milestone'][_0x144ea4(0x1f2)]=_0xd74bab);}if(_0x2ceac2[_0x144ea4(0x200)])for(const _0x6e209 of _0x2ceac2[_0x144ea4(0x200)]){if(_0x6e209[_0x144ea4(0x22a)]===_0x144ea4(0x1e7)&&_0x6e209[_0x144ea4(0x211)]?.[_0x144ea4(0x228)])for(const _0x430c35 of _0x6e209[_0x144ea4(0x211)]['branches']){if(_0x430c35[_0x144ea4(0x1f2)]){const _0x4fdb5b=_0x2a2927[_0x144ea4(0x208)](_0x430c35['segment']);_0x4fdb5b&&(_0x430c35[_0x144ea4(0x1f2)]=_0x4fdb5b);}}if(_0x6e209[_0x144ea4(0x22a)]===_0x144ea4(0x21d)&&_0x6e209['with']?.[_0x144ea4(0x1fb)]?.[_0x144ea4(0x1f2)]){const _0x89eb37=_0x2a2927['get'](_0x6e209[_0x144ea4(0x211)][_0x144ea4(0x1fb)][_0x144ea4(0x1f2)]);_0x89eb37&&(_0x6e209[_0x144ea4(0x211)][_0x144ea4(0x1fb)]['segment']=_0x89eb37);}}}}export function updateSegmentRefsInSegments(_0x9e08bc,_0x2118c1){const _0x83e50a=a162_0x4fd9;for(const _0x2f6774 of Object['values'](_0x9e08bc)){_0x2f6774[_0x83e50a(0x20e)]&&updateSegmentRefsInRule(_0x2f6774[_0x83e50a(0x20e)],_0x2118c1);}}function updateSegmentRefsInRule(_0xf92a3e,_0x5eebfb){const _0x3dbe2d=a162_0x4fd9;if(_0xf92a3e===null||typeof _0xf92a3e!==_0x3dbe2d(0x20c))return;if(Array[_0x3dbe2d(0x22e)](_0xf92a3e)){for(const _0x56fddd of _0xf92a3e){updateSegmentRefsInRule(_0x56fddd,_0x5eebfb);}return;}const _0x5a58d7=_0xf92a3e;if((_0x5a58d7[_0x3dbe2d(0x22a)]===_0x3dbe2d(0x217)||_0x5a58d7[_0x3dbe2d(0x22a)]===_0x3dbe2d(0x21b))&&typeof _0x5a58d7[_0x3dbe2d(0x1f2)]===_0x3dbe2d(0x1fe)){const _0x13b12f=_0x5eebfb[_0x3dbe2d(0x208)](_0x5a58d7[_0x3dbe2d(0x1f2)]);_0x13b12f&&(_0x5a58d7[_0x3dbe2d(0x1f2)]=_0x13b12f);}if(_0x5a58d7[_0x3dbe2d(0x1e6)]&&Array[_0x3dbe2d(0x22e)](_0x5a58d7[_0x3dbe2d(0x1e6)]))for(const _0x13bfb1 of _0x5a58d7['conditions']){updateSegmentRefsInRule(_0x13bfb1,_0x5eebfb);}}export function buildJourneysArray(_0x58f3e9,_0xc7be70){const _0x15eded=a162_0x4fd9;return _0x58f3e9[_0x15eded(0x226)](_0x4da7ed=>{const _0x99f22b=_0x15eded,_0x1b5611=_0xc7be70?_0x4da7ed[_0x99f22b(0x221)]['id']===_0xc7be70:_0x58f3e9['length']===0x1,_0x39c437=_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x22b)]?.[0x0],_0x16644e=_0x39c437?.[_0x99f22b(0x219)]||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x219)],_0x331c19={'version':_0x39c437?.[_0x99f22b(0x1f3)]||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x1f3)]||_0x4da7ed[_0x99f22b(0x221)][_0x99f22b(0x1e9)],'state':_0x4da7ed[_0x99f22b(0x221)][_0x99f22b(0x1dc)]===_0x99f22b(0x224)?_0x99f22b(0x224):_0x99f22b(0x206),'stages':_0x39c437?.[_0x99f22b(0x1f7)]||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x1f7)]||[],'id':_0x39c437?.['id']||_0x4da7ed[_0x99f22b(0x216)]['id'],'version_number':_0x39c437?.['version_number']||_0x4da7ed[_0x99f22b(0x216)][_0x99f22b(0x1e8)]};return _0x16644e&&(_0x331c19[_0x99f22b(0x219)]=_0x16644e),_0x1b5611&&(_0x331c19[_0x99f22b(0x207)]=!![]),_0x331c19;});}export function buildMergedJourneyDef(_0x564867,_0x586499,_0x3e1962){const _0x12be82=a162_0x4fd9,_0x39e773=_0x564867[0x0]['yaml'],_0x4d55eb=buildJourneysArray(_0x564867,_0x3e1962),{merged:_0x19b964,nameMapping:_0x128a4e}=consolidateSegmentsByContent(_0x564867['map'](_0x43668d=>_0x43668d[_0x12be82(0x216)][_0x12be82(0x21f)]),_0x586499);updateSegmentRefsInSegments(_0x19b964,_0x128a4e);const _0x1faeaa=Array['from'](_0x128a4e[_0x12be82(0x210)]())[_0x12be82(0x1eb)](([_0x445d44,_0x35e428])=>_0x445d44!==_0x35e428&&_0x445d44[_0x12be82(0x218)](_0x12be82(0x20f)));let _0x250f38=_0x19b964,_0x29cb6f=new Map();if(_0x1faeaa){const _0x3b7fc3=consolidateSegmentsByContent([_0x19b964],_0x586499);_0x250f38=_0x3b7fc3[_0x12be82(0x1ff)],_0x29cb6f=_0x3b7fc3[_0x12be82(0x21e)];}const _0x559bd6=new Map(_0x128a4e);for(const [_0x61edc0,_0x19e2c4]of _0x29cb6f[_0x12be82(0x210)]()){_0x559bd6[_0x12be82(0x1e4)](_0x61edc0,_0x19e2c4);}for(const [_0x1d551c,_0x148e45]of _0x559bd6[_0x12be82(0x210)]()){let _0x19a3f5=_0x148e45,_0x2eea93=0x0;while(_0x559bd6[_0x12be82(0x1f1)](_0x19a3f5)&&_0x559bd6['get'](_0x19a3f5)!==_0x19a3f5&&_0x2eea93<MAX_MAPPING_CHAIN_DEPTH){_0x19a3f5=_0x559bd6[_0x12be82(0x208)](_0x19a3f5),_0x2eea93++;}_0x19a3f5!==_0x148e45&&_0x559bd6[_0x12be82(0x1e4)](_0x1d551c,_0x19a3f5);}for(const _0x429059 of _0x4d55eb){updateSegmentReferences(_0x429059['stages'],_0x559bd6);}const {merged:_0x1976d4,nameMapping:_0x552c07}=consolidateActivationsByContent(_0x564867['map'](_0x4a22b2=>_0x4a22b2['yaml']['activations']));for(const _0xfd5b09 of _0x4d55eb){updateActivationReferences(_0xfd5b09[_0x12be82(0x1f7)],_0x552c07);}let _0x5e3d6c=_0x39e773[_0x12be82(0x219)];if(_0x5e3d6c?.['segment']){const _0x4f1801=_0x559bd6['get'](_0x5e3d6c[_0x12be82(0x1f2)]);_0x4f1801&&(_0x5e3d6c={..._0x5e3d6c,'segment':_0x4f1801});}for(const _0x18a16b of _0x4d55eb){if(_0x18a16b[_0x12be82(0x219)]?.['segment']){const _0x423648=_0x559bd6['get'](_0x18a16b[_0x12be82(0x219)][_0x12be82(0x1f2)]);_0x423648&&(_0x18a16b[_0x12be82(0x219)]={..._0x18a16b['goal'],'segment':_0x423648});}}return _0x4d55eb[_0x12be82(0x1eb)](_0x53f9c4=>_0x53f9c4[_0x12be82(0x219)])&&(_0x5e3d6c=undefined),{'type':'journey','name':_0x39e773[_0x12be82(0x1e9)],'description':_0x39e773[_0x12be82(0x1f0)],'goal':_0x5e3d6c,'reentry':_0x39e773[_0x12be82(0x1e0)],'segments':Object[_0x12be82(0x203)](_0x250f38)[_0x12be82(0x1ee)]>0x0?_0x250f38:undefined,'activations':Object['keys'](_0x1976d4)[_0x12be82(0x1ee)]>0x0?_0x1976d4:undefined,'journeys':_0x4d55eb,'bundle_id':_0x39e773[_0x12be82(0x1df)],'bundle_name':_0x39e773[_0x12be82(0x20a)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x3c6888,_0x27a06c,_0x362bae,_0x3e5748){const _0x39ddbf=a162_0x4fd9,_0x3a749f=_0x3c6888+':'+_0x27a06c,_0x4e5ce6=_0x362bae[_0x39ddbf(0x208)](_0x3a749f);if(_0x4e5ce6)return _0x4e5ce6;const _0x224508=await _0x3e5748(_0x3c6888),_0xb4054e=_0x224508['attributes'][_0x39ddbf(0x1e3)]||_0x224508[_0x39ddbf(0x1fd)][_0x39ddbf(0x1e9)],_0x139314=_0x224508[_0x39ddbf(0x1fd)][_0x39ddbf(0x1f8)][_0x39ddbf(0x213)](_0x31e36d=>String(_0x31e36d['id'])===String(_0x27a06c)),_0x4b9ad6=_0x139314?.[_0x39ddbf(0x1e9)]||_0x27a06c,_0x5356a8={'journeyName':_0xb4054e,'stageName':_0x4b9ad6};return _0x362bae['set'](_0x3a749f,_0x5356a8),_0x5356a8;}function a162_0x302b(){const _0x2b454b=['latest','get','null','bundle_name','behavior','object','trim','rule','entry_criteria','entries','with','activation_template_id','find','endsWith','stringify','yaml','include','startsWith','goal','schedule','exclude','sort','wait','nameMapping','segments','notification','item','milestone','36hwgVVd','launched','index','map','11cAcmTd','branches','slice','type','journeys','1713188fncnBA','.yml','isArray','124117iJthlu','columns','state','32vJiRha','36fAPGaj','bundle_id','reentry','versions','activation','journeyBundleName','set','exit_criteria','conditions','decision_point','version_number','name','25DvSgFH','some','connector_config','119832CBIndU','length','7782228hHggjb','description','has','segment','version','.yaml','all_columns','toLowerCase','stages','journeyStages','push','join','condition','86560ZUrMXV','attributes','string','merged','steps','match','752003ARBvTN','keys','894860ktCDFY','replace','draft'];a162_0x302b=function(){return _0x2b454b;};return a162_0x302b();}export function formatApiJourneyName(_0x11899a,_0x193abe){return _0x193abe+'\x20('+_0x11899a+')';}export function isLocalJourneyRef(_0x2dbc43){const _0x31be42=a162_0x4fd9;return _0x2dbc43[_0x31be42(0x214)](_0x31be42(0x22d))||_0x2dbc43[_0x31be42(0x214)](_0x31be42(0x1f4));}function a162_0x4fd9(_0x738649,_0x9455de){_0x738649=_0x738649-0x1dc;const _0x302b4b=a162_0x302b();let _0x4fd980=_0x302b4b[_0x738649];return _0x4fd980;}export function buildLocalRuleToNameMapping(_0x589ae7){const _0x15ec5a=a162_0x4fd9,_0x5b0003=new Map();if(!_0x589ae7)return _0x5b0003;for(const [_0x5010f7,_0x1f1ebe]of Object[_0x15ec5a(0x210)](_0x589ae7)){if(_0x1f1ebe[_0x15ec5a(0x20e)]){const _0x47e111=serializeRule(_0x1f1ebe[_0x15ec5a(0x20e)]),_0x29190b=_0x5b0003[_0x15ec5a(0x208)](_0x47e111)||[];_0x29190b[_0x15ec5a(0x1f9)](_0x5010f7),_0x5b0003['set'](_0x47e111,_0x29190b);}}return _0x5b0003;}export function buildLocalRuleToNameMappingFromJourney(_0x1b4272){const _0x21b39d=a162_0x4fd9,_0x527b7b=_0x1b4272[_0x21b39d(0x21f)];if(!_0x527b7b)return new Map();const _0x14c18a=collectSegmentUsageCounts(_0x1b4272),_0x545faf=new Map();let _0x9e0ccb=0x0;for(const [_0x5123eb,_0x28d1c5]of Object['entries'](_0x527b7b)){if(!_0x28d1c5['rule']){_0x9e0ccb++;continue;}const _0x401ac8=serializeRule(_0x28d1c5[_0x21b39d(0x20e)]),_0x5a0fe2=_0x545faf[_0x21b39d(0x208)](_0x401ac8)||[];_0x5a0fe2[_0x21b39d(0x1f9)]({'name':_0x5123eb,'index':_0x9e0ccb}),_0x545faf[_0x21b39d(0x1e4)](_0x401ac8,_0x5a0fe2),_0x9e0ccb++;}const _0x5c6d6c=new Map();for(const [_0x422045,_0x41bcac]of _0x545faf){const _0x2de45c=_0x41bcac[_0x21b39d(0x229)]()[_0x21b39d(0x21c)]((_0x524751,_0x11bc63)=>{const _0x3916dc=_0x21b39d,_0x48c6a4=_0x14c18a[_0x3916dc(0x208)](_0x524751[_0x3916dc(0x1e9)])||0x0,_0x4dcac6=_0x14c18a[_0x3916dc(0x208)](_0x11bc63[_0x3916dc(0x1e9)])||0x0;if(_0x48c6a4!==_0x4dcac6)return _0x4dcac6-_0x48c6a4;return _0x524751['index']-_0x11bc63[_0x3916dc(0x225)];})[_0x21b39d(0x226)](_0x3cbfef=>_0x3cbfef[_0x21b39d(0x1e9)]);_0x5c6d6c['set'](_0x422045,_0x2de45c);}return _0x5c6d6c;}export function collectSegmentUsageCounts(_0x24e925){const _0x59d5f5=a162_0x4fd9,_0x45aeb9=new Map(),_0x548d6b=_0x3e5c9e=>{const _0x3820c6=a162_0x4fd9;if(!_0x3e5c9e)return;_0x45aeb9[_0x3820c6(0x1e4)](_0x3e5c9e,(_0x45aeb9[_0x3820c6(0x208)](_0x3e5c9e)||0x0)+0x1);},_0x10d9eb=_0x26cf1c=>{const _0x3f8a15=a162_0x4fd9;for(const _0x6c9b69 of _0x26cf1c){_0x548d6b(_0x6c9b69[_0x3f8a15(0x20f)]?.[_0x3f8a15(0x1f2)]);if(_0x6c9b69[_0x3f8a15(0x1e5)])for(const _0x36cba2 of _0x6c9b69[_0x3f8a15(0x1e5)]){_0x548d6b(_0x36cba2[_0x3f8a15(0x1f2)]);}_0x548d6b(_0x6c9b69[_0x3f8a15(0x222)]?.['segment']);if(_0x6c9b69[_0x3f8a15(0x200)])for(const _0x2bd017 of _0x6c9b69[_0x3f8a15(0x200)]){if(_0x2bd017['type']===_0x3f8a15(0x1e7))for(const _0x38ad37 of _0x2bd017[_0x3f8a15(0x211)][_0x3f8a15(0x228)]){_0x548d6b(_0x38ad37[_0x3f8a15(0x1f2)]);}else _0x2bd017[_0x3f8a15(0x22a)]===_0x3f8a15(0x21d)&&_0x548d6b(_0x2bd017['with'][_0x3f8a15(0x1fb)]?.[_0x3f8a15(0x1f2)]);}}};_0x548d6b(_0x24e925['goal']?.[_0x59d5f5(0x1f2)]);if(_0x24e925[_0x59d5f5(0x22b)])for(const _0x3a93f7 of _0x24e925[_0x59d5f5(0x22b)]){_0x548d6b(_0x3a93f7[_0x59d5f5(0x219)]?.[_0x59d5f5(0x1f2)]),_0x10d9eb(_0x3a93f7[_0x59d5f5(0x1f7)]);}_0x24e925[_0x59d5f5(0x1f7)]&&_0x10d9eb(_0x24e925['stages']);if(_0x24e925['versions'])for(const _0x577d1d of _0x24e925[_0x59d5f5(0x1e1)]){_0x10d9eb(_0x577d1d[_0x59d5f5(0x1f7)]);}return _0x45aeb9;}
|
|
1
|
+
(function(_0x4bffe7,_0x186244){const _0x2fa275=a167_0x5891,_0x2d2fe9=_0x4bffe7();while(!![]){try{const _0x1841fc=-parseInt(_0x2fa275(0x138))/0x1+parseInt(_0x2fa275(0x142))/0x2+parseInt(_0x2fa275(0x175))/0x3+-parseInt(_0x2fa275(0x151))/0x4+parseInt(_0x2fa275(0x144))/0x5+-parseInt(_0x2fa275(0x17c))/0x6+-parseInt(_0x2fa275(0x178))/0x7;if(_0x1841fc===_0x186244)break;else _0x2d2fe9['push'](_0x2d2fe9['shift']());}catch(_0x3aba29){_0x2d2fe9['push'](_0x2d2fe9['shift']());}}}(a167_0x4654,0xcf879));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;function a167_0x5891(_0x153e5b,_0x2c043e){_0x153e5b=_0x153e5b-0x133;const _0x465450=a167_0x4654();let _0x58910f=_0x465450[_0x153e5b];return _0x58910f;}const MAX_MAPPING_CHAIN_DEPTH=0xa;function a167_0x4654(){const _0x4e4785=['segment','1938279HXAesI','from','item','include','8172402YJQMrT','name','launched','null','entry_criteria','bundle_id','has','type','connection','keys','notification','with','activation_template_id','359376bkknoH','attributes','set','schedule','length','versions','some','milestone','.yaml','values','1621018lYvQuK','find','5692000WmisZP','.yml','nameMapping','version','conditions','string','reentry','connector_config','journeyBundleName','journeys','endsWith','description','entries','2662868aeWlpF','condition','yaml','segments','state','exclude','merged','decision_point','journey','slice','steps','startsWith','object','stringify','branches','toLowerCase','activation','sort','draft','get','match','replace','latest','isArray','exit_criteria','all_columns','behavior','map','stages','columns','trim','push','join','rule','goal','wait','4695567Hpihfw','index'];a167_0x4654=function(){return _0x4e4785;};return a167_0x4654();}export function sanitizeYamlKey(_0x1b3e0c){const _0x541ab7=a167_0x5891;return _0x1b3e0c[_0x541ab7(0x160)]()[_0x541ab7(0x166)](/\s+/g,'_')[_0x541ab7(0x166)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x541ab7(0x166)](/_+/g,'_')[_0x541ab7(0x166)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5081bf){const _0x3d5017=a167_0x5891,_0xcaad1a=_0x5081bf[_0x3d5017(0x165)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0xcaad1a){const _0x5bd724=_0xcaad1a[0x1][_0x3d5017(0x160)](),_0x4da32f=_0xcaad1a[0x2],_0x5336b1=_0x4da32f[_0x3d5017(0x166)](/-/g,'')['slice'](0x0,0x4)['toLowerCase']();return _0x5bd724+'_'+_0x5336b1;}const _0x347fea=_0x5081bf[_0x3d5017(0x165)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x347fea){const _0x188cae=_0x347fea[0x1],_0x4a4a4f=_0x347fea[0x2][_0x3d5017(0x160)](),_0x5d8caa=_0x188cae[_0x3d5017(0x166)](/-/g,'')[_0x3d5017(0x15a)](0x0,0x4)[_0x3d5017(0x160)]();return _0x4a4a4f+'_'+_0x5d8caa;}return undefined;}function stableStringify(_0x5c6be9){const _0x5adcc5=a167_0x5891;if(Array[_0x5adcc5(0x168)](_0x5c6be9))return'['+_0x5c6be9[_0x5adcc5(0x16c)](_0x442379=>stableStringify(_0x442379))[_0x5adcc5(0x171)](',')+']';if(_0x5c6be9&&typeof _0x5c6be9===_0x5adcc5(0x15d)){const _0x3bb4f3=_0x5c6be9,_0x8cf63f=Object['keys'](_0x3bb4f3)[_0x5adcc5(0x162)](),_0x23c110=_0x8cf63f['map'](_0x7da7b9=>'\x22'+_0x7da7b9+'\x22:'+stableStringify(_0x3bb4f3[_0x7da7b9]));return'{'+_0x23c110[_0x5adcc5(0x171)](',')+'}';}const _0xa56131=JSON[_0x5adcc5(0x15e)](_0x5c6be9);return _0xa56131===undefined?_0x5adcc5(0x17f):_0xa56131;}export function consolidateActivationsByContent(_0x5244e2){const _0x55486b=a167_0x5891,_0x3524fe={},_0x98b1d7=new Map(),_0x31463c=new Map();for(const _0x3e5304 of _0x5244e2){if(!_0x3e5304)continue;for(const [_0x5db58d,_0x3049a3]of Object['entries'](_0x3e5304)){const _0x1d3927={'name':_0x3049a3[_0x55486b(0x17d)],'connection':_0x3049a3[_0x55486b(0x133)],..._0x3049a3['all_columns']!==undefined&&{'all_columns':_0x3049a3[_0x55486b(0x16a)]},..._0x3049a3[_0x55486b(0x16e)]!==undefined&&{'columns':_0x3049a3[_0x55486b(0x16e)]},..._0x3049a3['behavior']!==undefined&&{'behavior':_0x3049a3[_0x55486b(0x16b)]},..._0x3049a3[_0x55486b(0x13b)]!==undefined&&{'schedule':_0x3049a3[_0x55486b(0x13b)]},..._0x3049a3[_0x55486b(0x135)]!==undefined&&{'notification':_0x3049a3[_0x55486b(0x135)]},..._0x3049a3[_0x55486b(0x14b)]!==undefined&&{'connector_config':_0x3049a3[_0x55486b(0x14b)]},..._0x3049a3['activation_template_id']!==undefined&&{'activation_template_id':_0x3049a3[_0x55486b(0x137)]}},_0x2af4ab=stableStringify(_0x1d3927),_0x30c99a=_0x31463c[_0x55486b(0x164)](_0x2af4ab);_0x30c99a?_0x98b1d7[_0x55486b(0x13a)](_0x5db58d,_0x30c99a):(_0x3524fe[_0x5db58d]=_0x3049a3,_0x98b1d7[_0x55486b(0x13a)](_0x5db58d,_0x5db58d),_0x31463c[_0x55486b(0x13a)](_0x2af4ab,_0x5db58d));}}return{'merged':_0x3524fe,'nameMapping':_0x98b1d7};}export function updateActivationReferences(_0x41547c,_0x141b31){const _0x23f7d7=a167_0x5891;if(!_0x41547c)return;for(const _0x45240f of _0x41547c){if(!_0x45240f[_0x23f7d7(0x15b)])continue;for(const _0x174c06 of _0x45240f[_0x23f7d7(0x15b)]){if(_0x174c06['type']===_0x23f7d7(0x161)&&_0x174c06[_0x23f7d7(0x136)]?.[_0x23f7d7(0x161)]){const _0x36e806=_0x141b31[_0x23f7d7(0x164)](_0x174c06['with'][_0x23f7d7(0x161)]);_0x36e806&&_0x36e806!==_0x174c06['with'][_0x23f7d7(0x161)]&&(_0x174c06[_0x23f7d7(0x136)][_0x23f7d7(0x161)]=_0x36e806);}}}}export function consolidateSegmentsByContent(_0x36fb11,_0x47f492){const _0x4059f2=a167_0x5891,_0x40f4b1={},_0x161523=new Map(),_0xbdcbb7=new Map();for(const _0x394c95 of _0x36fb11){if(!_0x394c95)continue;for(const [_0x5dda1c,_0x28acfe]of Object[_0x4059f2(0x150)](_0x394c95)){if(!_0x28acfe['rule']){_0x40f4b1[_0x5dda1c]=_0x28acfe,_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x5dda1c);continue;}const _0x7b0648=_0x28acfe['description']&&_0x28acfe[_0x4059f2(0x14f)][_0x4059f2(0x16f)]()?_0x28acfe['description']:undefined,_0x30d918=JSON['stringify']({'description':_0x7b0648,'rule':deepSortObject(_0x28acfe[_0x4059f2(0x172)])}),_0x2569a1=_0xbdcbb7[_0x4059f2(0x164)](_0x30d918);if(_0x2569a1){const _0xee6aa3={..._0x28acfe[_0x4059f2(0x14f)]!==undefined&&{'description':_0x28acfe['description']},'rule':_0x28acfe[_0x4059f2(0x172)]?deepSortObject(_0x28acfe[_0x4059f2(0x172)]):_0x28acfe[_0x4059f2(0x172)]};if(_0x5dda1c<_0x2569a1){_0x40f4b1[_0x5dda1c]=_0xee6aa3,delete _0x40f4b1[_0x2569a1];for(const [_0x372602,_0x186946]of _0x161523[_0x4059f2(0x150)]()){_0x186946===_0x2569a1&&_0x161523['set'](_0x372602,_0x5dda1c);}_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x5dda1c),_0xbdcbb7[_0x4059f2(0x13a)](_0x30d918,_0x5dda1c);}else _0x40f4b1[_0x2569a1]=_0xee6aa3,_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x2569a1);}else{let _0x41524d=_0x5dda1c;if(_0x47f492){const _0x1a4ae4=_0x47f492[_0x4059f2(0x164)](_0x30d918);_0x1a4ae4&&_0x1a4ae4['length']>0x0&&(_0x41524d=_0x1a4ae4[_0x4059f2(0x15a)]()['sort']()[0x0]);}const _0x1c4985={..._0x28acfe['description']!==undefined&&{'description':_0x28acfe[_0x4059f2(0x14f)]},'rule':_0x28acfe[_0x4059f2(0x172)]?deepSortObject(_0x28acfe[_0x4059f2(0x172)]):_0x28acfe[_0x4059f2(0x172)]};_0x40f4b1[_0x41524d]=_0x1c4985,_0x161523[_0x4059f2(0x13a)](_0x5dda1c,_0x41524d),_0xbdcbb7[_0x4059f2(0x13a)](_0x30d918,_0x41524d);}}}return{'merged':_0x40f4b1,'nameMapping':_0x161523};}export function updateSegmentReferences(_0x4ef7bf,_0x52955a){const _0x1fa051=a167_0x5891;if(!_0x4ef7bf)return;for(const _0x5a0935 of _0x4ef7bf){if(_0x5a0935['entry_criteria']?.[_0x1fa051(0x177)]){const _0x2acfef=_0x52955a[_0x1fa051(0x164)](_0x5a0935[_0x1fa051(0x180)]['segment']);_0x2acfef&&(_0x5a0935['entry_criteria'][_0x1fa051(0x177)]=_0x2acfef);}if(_0x5a0935[_0x1fa051(0x169)])for(const _0x3aecc7 of _0x5a0935[_0x1fa051(0x169)]){if(_0x3aecc7['segment']){const _0x26e607=_0x52955a[_0x1fa051(0x164)](_0x3aecc7[_0x1fa051(0x177)]);_0x26e607&&(_0x3aecc7[_0x1fa051(0x177)]=_0x26e607);}}if(_0x5a0935[_0x1fa051(0x13f)]?.[_0x1fa051(0x177)]){const _0x2a18f3=_0x52955a[_0x1fa051(0x164)](_0x5a0935['milestone'][_0x1fa051(0x177)]);_0x2a18f3&&(_0x5a0935[_0x1fa051(0x13f)][_0x1fa051(0x177)]=_0x2a18f3);}if(_0x5a0935[_0x1fa051(0x15b)])for(const _0x2002e1 of _0x5a0935[_0x1fa051(0x15b)]){if(_0x2002e1[_0x1fa051(0x183)]===_0x1fa051(0x158)&&_0x2002e1[_0x1fa051(0x136)]?.[_0x1fa051(0x15f)])for(const _0x5a8544 of _0x2002e1[_0x1fa051(0x136)][_0x1fa051(0x15f)]){if(_0x5a8544[_0x1fa051(0x177)]){const _0x1680ba=_0x52955a[_0x1fa051(0x164)](_0x5a8544[_0x1fa051(0x177)]);_0x1680ba&&(_0x5a8544[_0x1fa051(0x177)]=_0x1680ba);}}if(_0x2002e1[_0x1fa051(0x183)]==='wait'&&_0x2002e1[_0x1fa051(0x136)]?.['condition']?.[_0x1fa051(0x177)]){const _0x4bb5f6=_0x52955a['get'](_0x2002e1[_0x1fa051(0x136)][_0x1fa051(0x152)][_0x1fa051(0x177)]);_0x4bb5f6&&(_0x2002e1[_0x1fa051(0x136)][_0x1fa051(0x152)]['segment']=_0x4bb5f6);}}}}export function updateSegmentRefsInSegments(_0x2fb788,_0x4b4d45){const _0x1d4707=a167_0x5891;for(const _0x5e32d8 of Object[_0x1d4707(0x141)](_0x2fb788)){_0x5e32d8['rule']&&updateSegmentRefsInRule(_0x5e32d8[_0x1d4707(0x172)],_0x4b4d45);}}function updateSegmentRefsInRule(_0x36c0bf,_0x5755ca){const _0x275883=a167_0x5891;if(_0x36c0bf===null||typeof _0x36c0bf!==_0x275883(0x15d))return;if(Array[_0x275883(0x168)](_0x36c0bf)){for(const _0x3fa426 of _0x36c0bf){updateSegmentRefsInRule(_0x3fa426,_0x5755ca);}return;}const _0x5bc917=_0x36c0bf;if((_0x5bc917[_0x275883(0x183)]===_0x275883(0x17b)||_0x5bc917[_0x275883(0x183)]===_0x275883(0x156))&&typeof _0x5bc917[_0x275883(0x177)]===_0x275883(0x149)){const _0xa4aaab=_0x5755ca[_0x275883(0x164)](_0x5bc917[_0x275883(0x177)]);_0xa4aaab&&(_0x5bc917[_0x275883(0x177)]=_0xa4aaab);}if(_0x5bc917[_0x275883(0x148)]&&Array['isArray'](_0x5bc917[_0x275883(0x148)]))for(const _0x475802 of _0x5bc917[_0x275883(0x148)]){updateSegmentRefsInRule(_0x475802,_0x5755ca);}}export function buildJourneysArray(_0x20c44e,_0x1aaedc){const _0x948729=a167_0x5891;return _0x20c44e[_0x948729(0x16c)](_0x470b74=>{const _0x4b1f88=_0x948729,_0x49bb50=_0x1aaedc?_0x470b74[_0x4b1f88(0x17a)]['id']===_0x1aaedc:_0x20c44e[_0x4b1f88(0x13c)]===0x1,_0x383fae=_0x470b74[_0x4b1f88(0x153)][_0x4b1f88(0x14d)]?.[0x0],_0x31f30e=_0x383fae?.[_0x4b1f88(0x173)]||_0x470b74[_0x4b1f88(0x153)][_0x4b1f88(0x173)],_0x2fdc5a={'version':_0x383fae?.[_0x4b1f88(0x147)]||_0x470b74[_0x4b1f88(0x153)]['version']||_0x470b74[_0x4b1f88(0x17a)][_0x4b1f88(0x17d)],'state':_0x470b74[_0x4b1f88(0x17a)][_0x4b1f88(0x155)]===_0x4b1f88(0x17e)?'launched':_0x4b1f88(0x163),'stages':_0x383fae?.['stages']||_0x470b74[_0x4b1f88(0x153)][_0x4b1f88(0x16d)]||[],'id':_0x383fae?.['id']||_0x470b74[_0x4b1f88(0x153)]['id'],'version_number':_0x383fae?.['version_number']||_0x470b74['yaml']['version_number']};return _0x31f30e&&(_0x2fdc5a[_0x4b1f88(0x173)]=_0x31f30e),_0x49bb50&&(_0x2fdc5a[_0x4b1f88(0x167)]=!![]),_0x2fdc5a;});}export function buildMergedJourneyDef(_0x1a53c7,_0x4d0c9f,_0x1dd010){const _0x27ad7b=a167_0x5891,_0x5bb4ae=_0x1a53c7[0x0][_0x27ad7b(0x153)],_0x4eedb0=buildJourneysArray(_0x1a53c7,_0x1dd010),{merged:_0x43f199,nameMapping:_0x506398}=consolidateSegmentsByContent(_0x1a53c7[_0x27ad7b(0x16c)](_0x36268=>_0x36268[_0x27ad7b(0x153)][_0x27ad7b(0x154)]),_0x4d0c9f);updateSegmentRefsInSegments(_0x43f199,_0x506398);const _0x11c571=Array[_0x27ad7b(0x179)](_0x506398['entries']())[_0x27ad7b(0x13e)](([_0x38f977,_0x102355])=>_0x38f977!==_0x102355&&_0x38f977[_0x27ad7b(0x15c)](_0x27ad7b(0x180)));let _0x39a48c=_0x43f199,_0x262a9f=new Map();if(_0x11c571){const _0x3aaf9d=consolidateSegmentsByContent([_0x43f199],_0x4d0c9f);_0x39a48c=_0x3aaf9d[_0x27ad7b(0x157)],_0x262a9f=_0x3aaf9d[_0x27ad7b(0x146)];}const _0x29621b=new Map(_0x506398);for(const [_0x4aa18d,_0x4b541d]of _0x262a9f[_0x27ad7b(0x150)]()){_0x29621b[_0x27ad7b(0x13a)](_0x4aa18d,_0x4b541d);}for(const [_0x3628c7,_0x581338]of _0x29621b['entries']()){let _0x3e399c=_0x581338,_0x38aeaf=0x0;while(_0x29621b[_0x27ad7b(0x182)](_0x3e399c)&&_0x29621b[_0x27ad7b(0x164)](_0x3e399c)!==_0x3e399c&&_0x38aeaf<MAX_MAPPING_CHAIN_DEPTH){_0x3e399c=_0x29621b[_0x27ad7b(0x164)](_0x3e399c),_0x38aeaf++;}_0x3e399c!==_0x581338&&_0x29621b[_0x27ad7b(0x13a)](_0x3628c7,_0x3e399c);}for(const _0x174a53 of _0x4eedb0){updateSegmentReferences(_0x174a53['stages'],_0x29621b);}const {merged:_0x3a6bec,nameMapping:_0x4a30a4}=consolidateActivationsByContent(_0x1a53c7[_0x27ad7b(0x16c)](_0x2ea13a=>_0x2ea13a[_0x27ad7b(0x153)]['activations']));for(const _0x34fa62 of _0x4eedb0){updateActivationReferences(_0x34fa62[_0x27ad7b(0x16d)],_0x4a30a4);}let _0x2456fd=_0x5bb4ae['goal'];if(_0x2456fd?.[_0x27ad7b(0x177)]){const _0x297845=_0x29621b['get'](_0x2456fd[_0x27ad7b(0x177)]);_0x297845&&(_0x2456fd={..._0x2456fd,'segment':_0x297845});}for(const _0x370a24 of _0x4eedb0){if(_0x370a24['goal']?.['segment']){const _0x151fe5=_0x29621b['get'](_0x370a24[_0x27ad7b(0x173)][_0x27ad7b(0x177)]);_0x151fe5&&(_0x370a24[_0x27ad7b(0x173)]={..._0x370a24[_0x27ad7b(0x173)],'segment':_0x151fe5});}}return _0x4eedb0[_0x27ad7b(0x13e)](_0xf03053=>_0xf03053['goal'])&&(_0x2456fd=undefined),{'type':_0x27ad7b(0x159),'name':_0x5bb4ae[_0x27ad7b(0x17d)],'description':_0x5bb4ae[_0x27ad7b(0x14f)],'goal':_0x2456fd,'reentry':_0x5bb4ae[_0x27ad7b(0x14a)],'segments':Object[_0x27ad7b(0x134)](_0x39a48c)[_0x27ad7b(0x13c)]>0x0?_0x39a48c:undefined,'activations':Object['keys'](_0x3a6bec)[_0x27ad7b(0x13c)]>0x0?_0x3a6bec:undefined,'journeys':_0x4eedb0,'bundle_id':_0x5bb4ae[_0x27ad7b(0x181)],'bundle_name':_0x5bb4ae['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0xf6fbb9,_0x143d10,_0x5ea0ef,_0x561795){const _0x35dc28=a167_0x5891,_0x4f04f3=_0xf6fbb9+':'+_0x143d10,_0x407cc6=_0x5ea0ef['get'](_0x4f04f3);if(_0x407cc6)return _0x407cc6;const _0x16a0bd=await _0x561795(_0xf6fbb9),_0x8d7ff0=_0x16a0bd['attributes'][_0x35dc28(0x14c)]||_0x16a0bd['attributes'][_0x35dc28(0x17d)],_0x2d76e8=_0x16a0bd[_0x35dc28(0x139)]['journeyStages'][_0x35dc28(0x143)](_0x9555b5=>String(_0x9555b5['id'])===String(_0x143d10)),_0x103706=_0x2d76e8?.[_0x35dc28(0x17d)]||_0x143d10,_0x5a9730={'journeyName':_0x8d7ff0,'stageName':_0x103706};return _0x5ea0ef[_0x35dc28(0x13a)](_0x4f04f3,_0x5a9730),_0x5a9730;}export function formatApiJourneyName(_0x171458,_0x3fed23){return _0x3fed23+'\x20('+_0x171458+')';}export function isLocalJourneyRef(_0x175b66){const _0x4a3b8e=a167_0x5891;return _0x175b66[_0x4a3b8e(0x14e)](_0x4a3b8e(0x145))||_0x175b66[_0x4a3b8e(0x14e)](_0x4a3b8e(0x140));}export function buildLocalRuleToNameMapping(_0x45990f){const _0x289166=a167_0x5891,_0x2e4631=new Map();if(!_0x45990f)return _0x2e4631;for(const [_0x2e81e2,_0x162e5b]of Object[_0x289166(0x150)](_0x45990f)){if(_0x162e5b[_0x289166(0x172)]){const _0x19f951=serializeRule(_0x162e5b[_0x289166(0x172)]),_0x10d681=_0x2e4631['get'](_0x19f951)||[];_0x10d681[_0x289166(0x170)](_0x2e81e2),_0x2e4631[_0x289166(0x13a)](_0x19f951,_0x10d681);}}return _0x2e4631;}export function buildLocalRuleToNameMappingFromJourney(_0x290c5d){const _0x5b588c=a167_0x5891,_0x1b31e4=_0x290c5d[_0x5b588c(0x154)];if(!_0x1b31e4)return new Map();const _0x4e1166=collectSegmentUsageCounts(_0x290c5d),_0x43e859=new Map();let _0x4f6de9=0x0;for(const [_0x518681,_0x12ddf8]of Object['entries'](_0x1b31e4)){if(!_0x12ddf8[_0x5b588c(0x172)]){_0x4f6de9++;continue;}const _0xeef40d=serializeRule(_0x12ddf8[_0x5b588c(0x172)]),_0x820cba=_0x43e859[_0x5b588c(0x164)](_0xeef40d)||[];_0x820cba[_0x5b588c(0x170)]({'name':_0x518681,'index':_0x4f6de9}),_0x43e859[_0x5b588c(0x13a)](_0xeef40d,_0x820cba),_0x4f6de9++;}const _0x5eee74=new Map();for(const [_0x4d8126,_0x7f787d]of _0x43e859){const _0x551dba=_0x7f787d[_0x5b588c(0x15a)]()[_0x5b588c(0x162)]((_0x437aa7,_0x4e1f10)=>{const _0x19da90=_0x5b588c,_0x29bc87=_0x4e1166['get'](_0x437aa7[_0x19da90(0x17d)])||0x0,_0x5c1b54=_0x4e1166[_0x19da90(0x164)](_0x4e1f10[_0x19da90(0x17d)])||0x0;if(_0x29bc87!==_0x5c1b54)return _0x5c1b54-_0x29bc87;return _0x437aa7[_0x19da90(0x176)]-_0x4e1f10[_0x19da90(0x176)];})[_0x5b588c(0x16c)](_0x144d8b=>_0x144d8b[_0x5b588c(0x17d)]);_0x5eee74[_0x5b588c(0x13a)](_0x4d8126,_0x551dba);}return _0x5eee74;}export function collectSegmentUsageCounts(_0x223c1d){const _0x22ef01=a167_0x5891,_0x30954d=new Map(),_0x2d8387=_0x32924f=>{const _0x1bfca0=a167_0x5891;if(!_0x32924f)return;_0x30954d[_0x1bfca0(0x13a)](_0x32924f,(_0x30954d[_0x1bfca0(0x164)](_0x32924f)||0x0)+0x1);},_0x1b7eac=_0x587406=>{const _0x2a3d9b=a167_0x5891;for(const _0x218b14 of _0x587406){_0x2d8387(_0x218b14[_0x2a3d9b(0x180)]?.['segment']);if(_0x218b14[_0x2a3d9b(0x169)])for(const _0x4dac82 of _0x218b14['exit_criteria']){_0x2d8387(_0x4dac82[_0x2a3d9b(0x177)]);}_0x2d8387(_0x218b14[_0x2a3d9b(0x13f)]?.[_0x2a3d9b(0x177)]);if(_0x218b14[_0x2a3d9b(0x15b)])for(const _0x59a5d7 of _0x218b14[_0x2a3d9b(0x15b)]){if(_0x59a5d7[_0x2a3d9b(0x183)]===_0x2a3d9b(0x158))for(const _0x56ea65 of _0x59a5d7[_0x2a3d9b(0x136)][_0x2a3d9b(0x15f)]){_0x2d8387(_0x56ea65['segment']);}else _0x59a5d7[_0x2a3d9b(0x183)]===_0x2a3d9b(0x174)&&_0x2d8387(_0x59a5d7[_0x2a3d9b(0x136)]['condition']?.[_0x2a3d9b(0x177)]);}}};_0x2d8387(_0x223c1d['goal']?.[_0x22ef01(0x177)]);if(_0x223c1d[_0x22ef01(0x14d)])for(const _0x3c859b of _0x223c1d[_0x22ef01(0x14d)]){_0x2d8387(_0x3c859b[_0x22ef01(0x173)]?.[_0x22ef01(0x177)]),_0x1b7eac(_0x3c859b[_0x22ef01(0x16d)]);}_0x223c1d[_0x22ef01(0x16d)]&&_0x1b7eac(_0x223c1d[_0x22ef01(0x16d)]);if(_0x223c1d['versions'])for(const _0x48b646 of _0x223c1d[_0x22ef01(0x13d)]){_0x1b7eac(_0x48b646[_0x22ef01(0x16d)]);}return _0x30954d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x7dba6a,_0x4a609c){const _0x1a76b9=a163_0x109c,_0x397b0a=_0x7dba6a();while(!![]){try{const _0x3d596f=parseInt(_0x1a76b9(0x1f5))/0x1+parseInt(_0x1a76b9(0x249))/0x2+parseInt(_0x1a76b9(0x265))/0x3+parseInt(_0x1a76b9(0x211))/0x4*(parseInt(_0x1a76b9(0x22c))/0x5)+-parseInt(_0x1a76b9(0x287))/0x6*(-parseInt(_0x1a76b9(0x29d))/0x7)+-parseInt(_0x1a76b9(0x255))/0x8*(-parseInt(_0x1a76b9(0x24b))/0x9)+-parseInt(_0x1a76b9(0x24e))/0xa*(parseInt(_0x1a76b9(0x20e))/0xb);if(_0x3d596f===_0x4a609c)break;else _0x397b0a['push'](_0x397b0a['shift']());}catch(_0xbb0bce){_0x397b0a['push'](_0x397b0a['shift']());}}}(a163_0x2f3e,0xe7842));function a163_0x109c(_0x447920,_0x2b639c){_0x447920=_0x447920-0x1f1;const _0x2f3e9a=a163_0x2f3e();let _0x109ca2=_0x2f3e9a[_0x447920];return _0x109ca2;}import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0xbdfe84,_0x4028f2,_0x133f58,_0x18777f,_0x4866e6,_0x3983a1){const _0x1197dd=a163_0x109c;return{'level':_0xbdfe84,'path':_0x4028f2,'code':_0x133f58,'message':_0x18777f,'location':getLocationFromPath(_0x4866e6[_0x1197dd(0x253)],_0x4866e6['source'],pathToArray(_0x3983a1??_0x4028f2))};}function validateVersionStructure(_0x13fa2e,_0x52bbd1){const _0x2a0800=a163_0x109c,_0x309235=[];return _0x13fa2e[_0x2a0800(0x254)]>MAX_STAGES&&_0x309235['push'](createIssue('error',_0x2a0800(0x247),_0x2a0800(0x2a0),_0x2a0800(0x1f2)+_0x13fa2e[_0x2a0800(0x254)]+_0x2a0800(0x240)+MAX_STAGES,_0x52bbd1)),_0x309235;}function validateStageStructure(_0x445bc2,_0x11cf54,_0x45c361,_0x20e5a5){const _0x4408f0=a163_0x109c,_0x3641ae=[],_0x46f0c2=_0x4408f0(0x285)+_0x11cf54+']';_0x11cf54===0x0&&!_0x445bc2[_0x4408f0(0x279)]&&_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x238),_0x46f0c2+_0x4408f0(0x213),_0x4408f0(0x267),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x1f4),_0x20e5a5,_0x46f0c2));const _0x3352ec=_0x11cf54===_0x45c361-0x1;!_0x3352ec&&!_0x445bc2['milestone']&&_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x238),_0x46f0c2+_0x4408f0(0x22d),_0x4408f0(0x26f),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x29a),_0x20e5a5,_0x46f0c2));(!_0x445bc2[_0x4408f0(0x288)]||_0x445bc2['exit_criteria'][_0x4408f0(0x254)]===0x0)&&_0x3641ae['push'](createIssue(_0x4408f0(0x21a),_0x46f0c2+'.exit_criteria',_0x4408f0(0x278),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x261),_0x20e5a5,_0x46f0c2));const _0x166fab=_0x445bc2['steps']?.[_0x4408f0(0x254)]??0x0;if(_0x166fab===0x0)_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x238),_0x46f0c2+_0x4408f0(0x284),_0x4408f0(0x262),_0x4408f0(0x26c)+_0x445bc2[_0x4408f0(0x24d)]+'\x27\x20has\x20no\x20steps',_0x20e5a5,_0x46f0c2+_0x4408f0(0x284)));else{if(_0x166fab===0x1)_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x21a),_0x46f0c2+'.steps',_0x4408f0(0x262),'Stage\x20\x27'+_0x445bc2[_0x4408f0(0x24d)]+_0x4408f0(0x224),_0x20e5a5,_0x46f0c2+_0x4408f0(0x284)));else _0x166fab<=0x3&&_0x3641ae[_0x4408f0(0x234)](createIssue(_0x4408f0(0x21a),_0x46f0c2+'.steps','FEW_STEPS',_0x4408f0(0x26c)+_0x445bc2['name']+'\x27\x20has\x20only\x20'+_0x166fab+_0x4408f0(0x28d),_0x20e5a5,_0x46f0c2+_0x4408f0(0x284)));}return _0x3641ae;}function validateStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6){const _0x58e636=a163_0x109c,_0x1a4bc6=[];if(_0x44325f['type']==='end')return _0x44325f[_0x58e636(0x233)]&&_0x1a4bc6[_0x58e636(0x234)](createIssue(_0x58e636(0x238),_0x2f32e5+_0x58e636(0x291),_0x58e636(0x27d),_0x58e636(0x266)+_0x44325f['name']+_0x58e636(0x274),_0x2b6407)),_0x58e636(0x271)in _0x44325f&&_0x44325f['with']!==undefined&&_0x1a4bc6[_0x58e636(0x234)](createIssue(_0x58e636(0x238),_0x2f32e5+_0x58e636(0x24a),_0x58e636(0x27d),_0x58e636(0x266)+_0x44325f[_0x58e636(0x24d)]+_0x58e636(0x256),_0x2b6407)),_0x1a4bc6;_0x44325f[_0x58e636(0x233)]&&(_0x2b6407[_0x58e636(0x26e)]&&!_0x2b6407[_0x58e636(0x26e)]['has'](_0x44325f['next'])&&_0x1a4bc6[_0x58e636(0x234)](createIssue(_0x58e636(0x238),_0x2f32e5+_0x58e636(0x291),_0x58e636(0x294),_0x58e636(0x24f)+_0x44325f[_0x58e636(0x233)]+'\x27',_0x2b6407)));switch(_0x44325f[_0x58e636(0x202)]){case _0x58e636(0x270):_0x1a4bc6[_0x58e636(0x234)](...validateWaitStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6));break;case _0x58e636(0x20c):_0x1a4bc6[_0x58e636(0x234)](...validateActivationStep(_0x44325f,_0x2f32e5,_0x2b6407));break;case _0x58e636(0x250):_0x1a4bc6[_0x58e636(0x234)](...validateDecisionPointStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6));break;case _0x58e636(0x225):_0x1a4bc6[_0x58e636(0x234)](...validateAbTestStep(_0x44325f,_0x2f32e5,_0x2b6407,_0xd433e6));break;case _0x58e636(0x29b):_0x1a4bc6[_0x58e636(0x234)](...validateJumpStep(_0x44325f,_0x2f32e5,_0x2b6407));break;}return _0x1a4bc6;}function a163_0x2f3e(){const _0x2b5c6f=['448XvxZSc','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','safeParse','BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','A/B\x20test\x20variant\x20\x27','description','\x27\x20(first\x20defined\x20at\x20steps[','segment','.with.target','values','ACTIVATION_SCHEMA_ERROR','\x27\x20has\x20no\x20exit_criteria\x20defined','INSUFFICIENT_STEPS','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','target','132480umRjcq','End\x20step\x20\x27','MISSING_ENTRY_CRITERIA','percentage','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','\x20with\x20latest:\x20true','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Stage\x20\x27','Embedded\x20segment\x20\x27','stepNames','MISSING_MILESTONE','wait','with','splice','.with.activation','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','.with.condition.timeout.next','Jump\x20step\x20requires\x20a\x20target','.with.variants[','MISSING_EXIT_CRITERIA','entry_criteria','MISSING_CONDITIONS','MISSING_STAGES','set','END_STEP_HAS_NEXT_OR_WITH','level','.with.condition','abs','\x20versions)','Journey\x20can\x20have\x20at\x20most\x20one\x20','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.steps','stages[','.with.variants','300BYoyup','exit_criteria','launched','Journey\x20name\x20is\x20required','.segment','add','\x20steps\x20(may\x20be\x20too\x20simple)','ref:','every','size','.next','Merge\x20step\x20\x27','keys','INVALID_NEXT_REFERENCE','entries','.exit_criteria[','Criteria\x20references\x20undefined\x20segment\x20\x27','replace','referencedSegments','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','jump','branches','98658qFBnPv','.with.condition.timeout',').\x20Merge\x20is\x20unnecessary.','TOO_MANY_STAGES','excluded','goalIsInherited','symbol','.with.condition.segment','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','map','variant\x20\x27','message','Journey\x20has\x20','.name','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','1356776oAiFFE','path','\x27\x20has\x20no\x20end\x20step','latest','match','excluded_','segments.','MISSING_SEGMENT_REFERENCE','state','branch\x20\x27','\x27\x20(from:\x20','source','.with.condition.next','type','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','startsWith','timeout',').\x20Use\x20a\x20merge\x20step.','goal','Journey\x20has\x20no\x20goal\x20defined','steps','DUPLICATE_STEP_NAME','activation','end','358721GyctVZ','journey','MISSING_NAME','8GlUoiF','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.entry_criteria','SINGLE_INPUT_MERGE','merge','embeddedSegments','INVALID_AB_TEST_PERCENTAGES','CONVERGENCE_WITHOUT_MERGE','MISSING_END_STEP','warning','MISSING_ACTIVATION_REF','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','versions','INVALID_JUMP_TARGET','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','get','versions[','segments','indices','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','ab_test','journeys,\x20stages,\x20or\x20versions','milestone','.stages','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','timeout\x20of\x20\x27','4143550kMqInh','.milestone','.rule','has','variants','DUPLICATE_LATEST','endsWith','next','push','reduce','\x27\x20of\x20\x27','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','error','rule','includes','code','join','MISSING_WAIT_PARAMS','condition\x20of\x20\x27','journeys','\x20stages\x20but\x20maximum\x20is\x20','condition','.with.branches[','some','JOURNEY_SCHEMA_ERROR','activationKeys','\x27\x20with\x20no\x20action\x20in\x20between','stages','filter','3749056fIDDRm','.with','179271oRNMaq','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','name','1780FKtvtq','Step\x20references\x20non-existent\x20step\x20\x27','decision_point','activations','step\x20\x27','document','length'];a163_0x2f3e=function(){return _0x2b5c6f;};return a163_0x2f3e();}function validateWaitStep(_0x3b7a09,_0xa68dc1,_0x3b90ae,_0x12fa7f){const _0x38d696=a163_0x109c,_0x568f00=[];if(!_0x3b7a09[_0x38d696(0x271)])return _0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x238),_0xa68dc1+_0x38d696(0x24a),_0x38d696(0x23d),_0x38d696(0x24c),_0x3b90ae,_0xa68dc1)),_0x568f00;if(_0x3b7a09[_0x38d696(0x271)][_0x38d696(0x241)]){const _0xf43cbd=_0x3b7a09[_0x38d696(0x271)]['condition'];if(_0xf43cbd[_0x38d696(0x25d)]){_0x3b90ae[_0x38d696(0x299)]?.[_0x38d696(0x28c)](_0xf43cbd[_0x38d696(0x25d)]);!_0xf43cbd['segment']['startsWith'](_0x38d696(0x28e))&&(_0x3b90ae[_0x38d696(0x216)]&&!_0x3b90ae[_0x38d696(0x216)][_0x38d696(0x22f)](_0xf43cbd['segment'])&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x238),_0xa68dc1+_0x38d696(0x2a4),_0x38d696(0x1fc),_0x38d696(0x204)+_0xf43cbd['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x3b90ae)));_0xf43cbd[_0x38d696(0x233)]&&_0x3b90ae[_0x38d696(0x26e)]&&!_0x3b90ae[_0x38d696(0x26e)][_0x38d696(0x22f)](_0xf43cbd[_0x38d696(0x233)])&&_0x568f00[_0x38d696(0x234)](createIssue('error',_0xa68dc1+'.with.condition.next','INVALID_NEXT_REFERENCE',_0x38d696(0x237)+_0xf43cbd[_0x38d696(0x233)]+'\x27',_0x3b90ae));_0xf43cbd['timeout']?.['next']&&_0x3b90ae[_0x38d696(0x26e)]&&!_0x3b90ae[_0x38d696(0x26e)][_0x38d696(0x22f)](_0xf43cbd[_0x38d696(0x206)][_0x38d696(0x233)])&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x238),_0xa68dc1+_0x38d696(0x275),_0x38d696(0x294),_0x38d696(0x229)+_0xf43cbd[_0x38d696(0x206)]['next']+'\x27',_0x3b90ae));const _0x28b18e=_0xf43cbd['next']||_0x3b7a09['next'],_0x548860=_0xf43cbd['timeout']?.[_0x38d696(0x233)]||_0x3b7a09[_0x38d696(0x233)];if(_0x28b18e){const _0x5608d4=_0x12fa7f[_0x38d696(0x220)](_0x28b18e);_0x5608d4?.[_0x38d696(0x202)]==='merge'&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x21a),_0xa68dc1+_0x38d696(0x201),_0x38d696(0x258),_0x38d696(0x22a)+_0x28b18e+_0x38d696(0x2a6),_0x3b90ae,_0xa68dc1+_0x38d696(0x27f)));}if(_0x548860){const _0x2ca749=_0x12fa7f[_0x38d696(0x220)](_0x548860);_0x2ca749?.[_0x38d696(0x202)]===_0x38d696(0x215)&&_0x568f00[_0x38d696(0x234)](createIssue(_0x38d696(0x21a),_0xa68dc1+'.with.condition.timeout.next','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x548860+_0x38d696(0x2a6),_0x3b90ae,_0xa68dc1+_0x38d696(0x29e)));}}}return _0x568f00;}function validateActivationStep(_0x2152dc,_0x211bcf,_0x3f212e){const _0x41b41e=a163_0x109c,_0x456baa=[];if(!_0x2152dc[_0x41b41e(0x271)]?.[_0x41b41e(0x20c)])return _0x456baa[_0x41b41e(0x234)](createIssue('error',_0x211bcf+_0x41b41e(0x273),_0x41b41e(0x21b),'Activation\x20step\x20requires\x20an\x20activation\x20reference',_0x3f212e,_0x211bcf)),_0x456baa;const _0x321595=_0x2152dc['with'][_0x41b41e(0x20c)];return _0x3f212e['activationKeys']&&!_0x321595[_0x41b41e(0x205)](_0x41b41e(0x28e))&&(!_0x3f212e[_0x41b41e(0x245)][_0x41b41e(0x22f)](_0x321595)&&_0x456baa[_0x41b41e(0x234)](createIssue(_0x41b41e(0x238),_0x211bcf+_0x41b41e(0x273),'MISSING_ACTIVATION_DEFINITION',_0x41b41e(0x21c)+_0x321595+_0x41b41e(0x269),_0x3f212e))),_0x456baa;}function validateDecisionPointStep(_0x5ac215,_0x5328f8,_0x178310,_0x1f0def){const _0x592592=a163_0x109c,_0x4c902e=[];if(!_0x5ac215[_0x592592(0x271)]?.[_0x592592(0x29c)]||_0x5ac215[_0x592592(0x271)][_0x592592(0x29c)][_0x592592(0x254)]===0x0)return _0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x238),_0x5328f8+'.with.branches','MISSING_CONDITIONS','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x178310,_0x5328f8)),_0x4c902e;for(let _0x19ed16=0x0;_0x19ed16<_0x5ac215[_0x592592(0x271)][_0x592592(0x29c)][_0x592592(0x254)];_0x19ed16++){const _0x278ce8=_0x5ac215[_0x592592(0x271)]['branches'][_0x19ed16],_0x5bb675=_0x5328f8+_0x592592(0x242)+_0x19ed16+']';_0x278ce8[_0x592592(0x25d)]&&!_0x278ce8[_0x592592(0x2a1)]&&(_0x178310[_0x592592(0x299)]?.[_0x592592(0x28c)](_0x278ce8[_0x592592(0x25d)]),!_0x278ce8[_0x592592(0x25d)][_0x592592(0x205)](_0x592592(0x28e))&&(_0x178310[_0x592592(0x216)]&&!_0x178310[_0x592592(0x216)]['has'](_0x278ce8[_0x592592(0x25d)])&&_0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x238),_0x5bb675+_0x592592(0x28b),_0x592592(0x1fc),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x278ce8[_0x592592(0x25d)]+'\x27',_0x178310))));_0x278ce8[_0x592592(0x233)]&&_0x178310['stepNames']&&!_0x178310[_0x592592(0x26e)]['has'](_0x278ce8[_0x592592(0x233)])&&_0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x238),_0x5bb675+'.next','INVALID_NEXT_REFERENCE',_0x592592(0x259)+_0x278ce8[_0x592592(0x233)]+'\x27',_0x178310));if(_0x278ce8['next']){const _0x511946=_0x1f0def[_0x592592(0x220)](_0x278ce8['next']);_0x511946?.[_0x592592(0x202)]===_0x592592(0x215)&&_0x4c902e[_0x592592(0x234)](createIssue(_0x592592(0x21a),_0x5bb675+_0x592592(0x291),_0x592592(0x258),'Decision\x20branch\x20\x27'+_0x278ce8[_0x592592(0x24d)]+_0x592592(0x26b)+_0x278ce8[_0x592592(0x233)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x178310));}}return _0x4c902e;}function validateAbTestStep(_0xc37e83,_0xee3991,_0x116641,_0x454be3){const _0x31cf07=a163_0x109c,_0x373f7e=[];if(!_0xc37e83['with']?.['variants']||_0xc37e83[_0x31cf07(0x271)][_0x31cf07(0x230)]['length']===0x0)return _0x373f7e[_0x31cf07(0x234)](createIssue(_0x31cf07(0x238),_0xee3991+'.with.variants',_0x31cf07(0x27a),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x116641,_0xee3991)),_0x373f7e;const _0x1490b0=_0xc37e83[_0x31cf07(0x271)]['variants'][_0x31cf07(0x235)]((_0x26b2b7,_0x3afc85)=>_0x26b2b7+(_0x3afc85[_0x31cf07(0x268)]||0x0),0x0);Math[_0x31cf07(0x280)](_0x1490b0-0x64)>0.01&&_0x373f7e['push'](createIssue(_0x31cf07(0x238),_0xee3991+_0x31cf07(0x286),_0x31cf07(0x217),_0x31cf07(0x212)+_0x1490b0+'%)',_0x116641));for(let _0x3f93ba=0x0;_0x3f93ba<_0xc37e83['with'][_0x31cf07(0x230)][_0x31cf07(0x254)];_0x3f93ba++){const _0x28e212=_0xc37e83[_0x31cf07(0x271)][_0x31cf07(0x230)][_0x3f93ba],_0x56b309=_0xee3991+_0x31cf07(0x277)+_0x3f93ba+']';_0x28e212[_0x31cf07(0x233)]&&_0x116641[_0x31cf07(0x26e)]&&!_0x116641[_0x31cf07(0x26e)]['has'](_0x28e212['next'])&&_0x373f7e[_0x31cf07(0x234)](createIssue(_0x31cf07(0x238),_0x56b309+'.next','INVALID_NEXT_REFERENCE',_0x31cf07(0x21f)+_0x28e212[_0x31cf07(0x233)]+'\x27',_0x116641));if(_0x28e212[_0x31cf07(0x233)]){const _0x3acf63=_0x454be3[_0x31cf07(0x220)](_0x28e212[_0x31cf07(0x233)]);_0x3acf63?.[_0x31cf07(0x202)]===_0x31cf07(0x215)&&_0x373f7e[_0x31cf07(0x234)](createIssue(_0x31cf07(0x21a),_0x56b309+_0x31cf07(0x291),_0x31cf07(0x258),_0x31cf07(0x25a)+_0x28e212[_0x31cf07(0x24d)]+_0x31cf07(0x26b)+_0x28e212[_0x31cf07(0x233)]+_0x31cf07(0x246),_0x116641));}}return _0x373f7e;}function validateJumpStep(_0x2efebe,_0x25d8e4,_0x56c012){const _0x231a3e=a163_0x109c,_0xa0e645=[];if(!_0x2efebe['with']?.['target'])return _0xa0e645[_0x231a3e(0x234)](createIssue(_0x231a3e(0x238),_0x25d8e4+'.with.target',_0x231a3e(0x21e),_0x231a3e(0x276),_0x56c012,_0x25d8e4)),_0xa0e645;return(!_0x2efebe[_0x231a3e(0x271)][_0x231a3e(0x264)][_0x231a3e(0x20f)]||!_0x2efebe[_0x231a3e(0x271)][_0x231a3e(0x264)]['stage'])&&_0xa0e645[_0x231a3e(0x234)](createIssue('error',_0x25d8e4+_0x231a3e(0x25e),_0x231a3e(0x21e),_0x231a3e(0x2a5),_0x56c012)),_0xa0e645;}function buildConvergenceMap(_0x131726){const _0x296ca5=a163_0x109c,_0x26ea83=new Map();function _0x1d0290(_0x1f3a0b,_0x29267d){const _0x38cc7a=a163_0x109c,_0x2f8749=_0x26ea83[_0x38cc7a(0x220)](_0x1f3a0b)||[];_0x2f8749['push'](_0x29267d),_0x26ea83['set'](_0x1f3a0b,_0x2f8749);}for(const _0x4523af of _0x131726){_0x4523af[_0x296ca5(0x233)]&&_0x1d0290(_0x4523af['next'],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x252)+_0x4523af['name']+'\x27'});if(_0x4523af[_0x296ca5(0x202)]==='decision_point'&&_0x4523af[_0x296ca5(0x271)]?.[_0x296ca5(0x29c)])for(const _0x4e7b0e of _0x4523af['with']['branches']){_0x4e7b0e[_0x296ca5(0x233)]&&_0x1d0290(_0x4e7b0e[_0x296ca5(0x233)],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x1fe)+_0x4e7b0e[_0x296ca5(0x24d)]+_0x296ca5(0x236)+_0x4523af['name']+'\x27'});}if(_0x4523af[_0x296ca5(0x202)]===_0x296ca5(0x225)&&_0x4523af[_0x296ca5(0x271)]?.[_0x296ca5(0x230)])for(const _0x5d6483 of _0x4523af[_0x296ca5(0x271)]['variants']){_0x5d6483['next']&&_0x1d0290(_0x5d6483[_0x296ca5(0x233)],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x2a8)+_0x5d6483[_0x296ca5(0x24d)]+_0x296ca5(0x236)+_0x4523af[_0x296ca5(0x24d)]+'\x27'});}_0x4523af[_0x296ca5(0x202)]==='wait'&&_0x4523af[_0x296ca5(0x271)]?.[_0x296ca5(0x241)]&&(_0x4523af[_0x296ca5(0x271)][_0x296ca5(0x241)][_0x296ca5(0x233)]&&_0x1d0290(_0x4523af['with'][_0x296ca5(0x241)]['next'],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x23e)+_0x4523af[_0x296ca5(0x24d)]+'\x27'}),_0x4523af[_0x296ca5(0x271)][_0x296ca5(0x241)][_0x296ca5(0x206)]?.[_0x296ca5(0x233)]&&_0x1d0290(_0x4523af['with'][_0x296ca5(0x241)][_0x296ca5(0x206)][_0x296ca5(0x233)],{'stepName':_0x4523af[_0x296ca5(0x24d)],'description':_0x296ca5(0x22b)+_0x4523af[_0x296ca5(0x24d)]+'\x27'}));}return _0x26ea83;}function validateFlowControl(_0x2a8d4b,_0x1357b3,_0x5d57d4){const _0x344ccc=a163_0x109c,_0x155176=[],_0x5295a1='stages['+_0x1357b3+']',_0x55fbb2=_0x2a8d4b[_0x344ccc(0x20a)]||[];if(_0x55fbb2[_0x344ccc(0x254)]===0x0)return _0x155176;const _0x127b7b=new Map();for(const _0x19e88e of _0x55fbb2){_0x19e88e['name']&&_0x127b7b[_0x344ccc(0x27c)](_0x19e88e[_0x344ccc(0x24d)],_0x19e88e);}const _0x3e8320=buildConvergenceMap(_0x55fbb2),_0x2f576d=_0x55fbb2[_0x344ccc(0x243)](_0x18d8c0=>_0x18d8c0[_0x344ccc(0x202)]===_0x344ccc(0x20d));!_0x2f576d&&_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x238),_0x5295a1+_0x344ccc(0x284),_0x344ccc(0x219),_0x344ccc(0x26c)+_0x2a8d4b['name']+_0x344ccc(0x1f7),_0x5d57d4));for(const [_0x578ac2,_0x493920]of _0x3e8320){const _0x3be3b7=_0x127b7b[_0x344ccc(0x220)](_0x578ac2);if(!_0x3be3b7)continue;if(_0x493920['length']>0x1&&_0x3be3b7[_0x344ccc(0x202)]!==_0x344ccc(0x215)){const _0x53c1a9=_0x493920[_0x344ccc(0x2a7)](_0x286dfa=>_0x286dfa['description'])[_0x344ccc(0x23c)](',\x20');_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x238),_0x5295a1+'.steps',_0x344ccc(0x218),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x578ac2+_0x344ccc(0x1ff)+_0x53c1a9+_0x344ccc(0x207),_0x5d57d4));}_0x493920[_0x344ccc(0x254)]===0x1&&_0x3be3b7[_0x344ccc(0x202)]==='merge'&&_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x21a),_0x5295a1+_0x344ccc(0x284),_0x344ccc(0x214),_0x344ccc(0x292)+_0x578ac2+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x493920[0x0][_0x344ccc(0x25b)]+_0x344ccc(0x29f),_0x5d57d4));}for(const _0x3236d1 of _0x55fbb2){if(_0x3236d1[_0x344ccc(0x202)]===_0x344ccc(0x215)&&_0x3236d1[_0x344ccc(0x233)]){const _0x46fa8a=_0x127b7b[_0x344ccc(0x220)](_0x3236d1['next']);_0x46fa8a?.[_0x344ccc(0x202)]===_0x344ccc(0x215)&&_0x155176[_0x344ccc(0x234)](createIssue(_0x344ccc(0x238),_0x5295a1+'.steps','MERGE_TO_MERGE_CHAIN',_0x344ccc(0x292)+_0x3236d1[_0x344ccc(0x24d)]+_0x344ccc(0x263)+_0x3236d1[_0x344ccc(0x233)]+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x5d57d4));}}return _0x155176;}function validateCriteria(_0x1a7681,_0x581777,_0x4e5f09){const _0x6db63d=a163_0x109c,_0x556ada=[];return _0x1a7681[_0x6db63d(0x25d)]&&(_0x4e5f09['referencedSegments']?.[_0x6db63d(0x28c)](_0x1a7681[_0x6db63d(0x25d)]),!_0x1a7681[_0x6db63d(0x25d)][_0x6db63d(0x205)]('ref:')&&(_0x4e5f09[_0x6db63d(0x216)]&&!_0x4e5f09['embeddedSegments'][_0x6db63d(0x22f)](_0x1a7681[_0x6db63d(0x25d)])&&_0x556ada[_0x6db63d(0x234)](createIssue(_0x6db63d(0x238),_0x581777+_0x6db63d(0x28b),_0x6db63d(0x1fc),_0x6db63d(0x297)+_0x1a7681['segment']+'\x27',_0x4e5f09)))),_0x556ada;}function validateEmbeddedSegment(_0xd331ea,_0x4678ef,_0x3ec61b){const _0x13a6a3=a163_0x109c,_0x2f5677=[];return _0xd331ea[_0x13a6a3(0x239)]&&_0x2f5677[_0x13a6a3(0x234)](...validateRuleDef(_0xd331ea[_0x13a6a3(0x239)],_0x4678ef+_0x13a6a3(0x22e),_0x3ec61b)),_0x2f5677;}function validateStage(_0x589f37,_0x103a1b,_0x298fbb,_0xd8f960){const _0x4b2104=a163_0x109c,_0x56ccb4=[],_0x284208=_0x4b2104(0x285)+_0x103a1b+']',_0x3fd623=new Map(),_0x435732=new Map();if(_0x589f37[_0x4b2104(0x20a)]){for(let _0xd37cff=0x0;_0xd37cff<_0x589f37[_0x4b2104(0x20a)][_0x4b2104(0x254)];_0xd37cff++){const _0x20414c=_0x589f37['steps'][_0xd37cff];_0x20414c[_0x4b2104(0x24d)]&&_0x3fd623['set'](_0x20414c['name'],_0x20414c);}for(let _0x4d8050=0x0;_0x4d8050<_0x589f37[_0x4b2104(0x20a)][_0x4b2104(0x254)];_0x4d8050++){const _0x59858a=_0x589f37[_0x4b2104(0x20a)][_0x4d8050],_0x2b1081=_0x284208+'.steps['+_0x4d8050+']';if(_0x59858a['name']){if(_0x435732[_0x4b2104(0x22f)](_0x59858a[_0x4b2104(0x24d)])){const _0x49d5b4=_0x435732[_0x4b2104(0x220)](_0x59858a['name']);_0x56ccb4[_0x4b2104(0x234)](createIssue(_0x4b2104(0x238),_0x2b1081+_0x4b2104(0x1f3),_0x4b2104(0x20b),'Duplicate\x20step\x20name\x20\x27'+_0x59858a[_0x4b2104(0x24d)]+_0x4b2104(0x25c)+_0x49d5b4+'])',_0xd8f960));}else _0x435732[_0x4b2104(0x27c)](_0x59858a[_0x4b2104(0x24d)],_0x4d8050);}_0x56ccb4[_0x4b2104(0x234)](...validateStep(_0x59858a,_0x2b1081,_0xd8f960,_0x3fd623));}}_0x589f37['entry_criteria']&&_0x56ccb4[_0x4b2104(0x234)](...validateCriteria(_0x589f37[_0x4b2104(0x279)],_0x284208+_0x4b2104(0x213),_0xd8f960));if(_0x589f37[_0x4b2104(0x288)])for(let _0xec7115=0x0;_0xec7115<_0x589f37['exit_criteria'][_0x4b2104(0x254)];_0xec7115++){_0x56ccb4['push'](...validateCriteria(_0x589f37[_0x4b2104(0x288)][_0xec7115],_0x284208+_0x4b2104(0x296)+_0xec7115+']',_0xd8f960));}return _0x589f37['milestone']&&_0x56ccb4[_0x4b2104(0x234)](...validateCriteria(_0x589f37[_0x4b2104(0x227)],_0x284208+'.milestone',_0xd8f960)),_0x56ccb4[_0x4b2104(0x234)](...validateStageStructure(_0x589f37,_0x103a1b,_0x298fbb,_0xd8f960)),_0x56ccb4[_0x4b2104(0x234)](...validateFlowControl(_0x589f37,_0x103a1b,_0xd8f960)),_0x56ccb4;}function validateStagesForVersion(_0x27d653,_0xc87b11,_0x596c75,_0x3a7c6e,_0x8d0ea,_0x5eae83,_0x36997c){const _0xb6efe8=a163_0x109c;if(_0x27d653['length']===0x0){_0x8d0ea[_0xb6efe8(0x234)]({'level':_0xb6efe8(0x238),'path':_0x3a7c6e+'stages','code':_0xb6efe8(0x27b),'message':_0xb6efe8(0x203),'location':getLocationFromPath(_0x596c75[_0xb6efe8(0x253)],_0x596c75[_0xb6efe8(0x200)],[_0xb6efe8(0x247)])});return;}const _0x5f3ad9=new Set();for(const _0x31d079 of _0x27d653){if(_0x31d079[_0xb6efe8(0x20a)])for(const _0x1d5b8a of _0x31d079[_0xb6efe8(0x20a)]){_0x1d5b8a[_0xb6efe8(0x24d)]&&_0x5f3ad9['add'](_0x1d5b8a[_0xb6efe8(0x24d)]);}}const _0x4503a1={..._0x596c75,'stepNames':_0x5f3ad9},_0xb53f74=validateVersionStructure(_0x27d653,_0x4503a1);for(const _0x7291f2 of _0xb53f74){const _0x4c0665=_0x3a7c6e?{..._0x7291f2,'path':''+_0x3a7c6e+_0x7291f2[_0xb6efe8(0x1f6)]}:_0x7291f2;if(_0x4c0665[_0xb6efe8(0x27e)]===_0xb6efe8(0x238))_0x8d0ea[_0xb6efe8(0x234)](_0x4c0665);else _0x5eae83[_0xb6efe8(0x234)](_0x4c0665);}for(let _0x264c63=0x0;_0x264c63<_0x27d653[_0xb6efe8(0x254)];_0x264c63++){const _0x43a889=validateStage(_0x27d653[_0x264c63],_0x264c63,_0x27d653[_0xb6efe8(0x254)],_0x4503a1);for(const _0x509ae1 of _0x43a889){const _0x83883a=_0x3a7c6e?{..._0x509ae1,'path':''+_0x3a7c6e+_0x509ae1[_0xb6efe8(0x1f6)]}:_0x509ae1;if(_0x83883a['level']===_0xb6efe8(0x238))_0x8d0ea[_0xb6efe8(0x234)](_0x83883a);else _0x5eae83[_0xb6efe8(0x234)](_0x83883a);}}if(_0xc87b11[_0xb6efe8(0x208)]){const _0x32cbd1=_0x36997c?.[_0xb6efe8(0x2a2)]?'goal':_0x3a7c6e+_0xb6efe8(0x208),_0x5252b3=validateCriteria(_0xc87b11[_0xb6efe8(0x208)],_0x32cbd1,_0x4503a1);for(const _0x1edfb6 of _0x5252b3){if(_0x1edfb6['level']===_0xb6efe8(0x238))_0x8d0ea[_0xb6efe8(0x234)](_0x1edfb6);else _0x5eae83[_0xb6efe8(0x234)](_0x1edfb6);}}}function extractVersionIndex(_0x50b1ca){const _0x607473=a163_0x109c,_0x1d2468=_0x50b1ca[_0x607473(0x1f9)](/^journeys\[(\d+)\]\./);return _0x1d2468?_0x1d2468[0x1]:undefined;}function deduplicateAcrossVersions(_0x247fea){const _0x156fa0=a163_0x109c,_0x4bbf3e=new Map();for(let _0x32a9ed=0x0;_0x32a9ed<_0x247fea['length'];_0x32a9ed++){const _0x72bd8=_0x247fea[_0x32a9ed][_0x156fa0(0x23b)]+':'+_0x247fea[_0x32a9ed][_0x156fa0(0x1f1)],_0xfb0914=extractVersionIndex(_0x247fea[_0x32a9ed][_0x156fa0(0x1f6)]),_0x20d3db=_0x4bbf3e[_0x156fa0(0x220)](_0x72bd8);if(_0x20d3db){_0x20d3db[_0x156fa0(0x223)][_0x156fa0(0x234)](_0x32a9ed);if(_0xfb0914)_0x20d3db['versions'][_0x156fa0(0x28c)](_0xfb0914);}else _0x4bbf3e[_0x156fa0(0x27c)](_0x72bd8,{'indices':[_0x32a9ed],'versions':new Set(_0xfb0914?[_0xfb0914]:[])});}const _0x28305b=new Set();for(const {indices:_0x2e58d2,versions:_0x4b44de}of _0x4bbf3e[_0x156fa0(0x25f)]()){if(_0x4b44de['size']<=0x1)continue;const _0x4d576d=_0x247fea[_0x2e58d2[0x0]];_0x4d576d[_0x156fa0(0x1f6)]=_0x4d576d[_0x156fa0(0x1f6)][_0x156fa0(0x298)](/^journeys\[\d+\]\./,''),_0x4d576d[_0x156fa0(0x1f1)]=_0x4d576d[_0x156fa0(0x1f1)]+'\x20(across\x20'+_0x4b44de[_0x156fa0(0x290)]+_0x156fa0(0x281);for(let _0x11e604=0x1;_0x11e604<_0x2e58d2['length'];_0x11e604++){_0x28305b['add'](_0x2e58d2[_0x11e604]);}}const _0x4928dd=[..._0x28305b]['sort']((_0x54ec63,_0x293625)=>_0x293625-_0x54ec63);for(const _0x44add0 of _0x4928dd){_0x247fea[_0x156fa0(0x272)](_0x44add0,0x1);}}export function validateJourneyDef(_0x216aa5,_0x55636a={},_0x4d2c40={}){const _0x4db1e7=a163_0x109c;if(_0x4d2c40['skipSchema'])return runJourneySemanticChecks(_0x216aa5,_0x55636a);const _0x66f819=JourneyDefSchema[_0x4db1e7(0x257)](_0x216aa5);if(_0x66f819['success'])return runJourneySemanticChecks(_0x66f819['data'],_0x55636a);return zodErrorsToJourneyValidationResult(_0x66f819[_0x4db1e7(0x238)],_0x55636a);}function zodErrorsToJourneyValidationResult(_0x46fd49,_0x706372){const _0xb3a823=a163_0x109c,_0x440ca5=flattenZodIssues(_0x46fd49['issues']),_0x11ed37=_0x440ca5[_0xb3a823(0x2a7)](_0x55ec97=>{const _0x4b15c9=_0xb3a823,_0x2294d0=formatZodPath(_0x55ec97[_0x4b15c9(0x1f6)]),_0x2ede44=mapJourneyZodIssueToCode(_0x55ec97,_0x2294d0),_0x1fe491=getLocationFromPath(_0x706372[_0x4b15c9(0x253)],_0x706372['source'],_0x55ec97['path'][_0x4b15c9(0x2a7)](_0x45b001=>typeof _0x45b001===_0x4b15c9(0x2a3)?String(_0x45b001):_0x45b001));return{'level':'error','path':_0x2294d0,'code':_0x2ede44,'message':_0x55ec97[_0x4b15c9(0x1f1)],..._0x1fe491&&{'location':_0x1fe491}};});return{'valid':![],'errors':_0x11ed37,'warnings':[]};}function mapJourneyZodIssueToCode(_0xcf9f76,_0x2a8660){const _0x114c73=a163_0x109c;if(_0x2a8660==='name')return _0x114c73(0x210);if(_0x2a8660[_0x114c73(0x232)]('.type')&&_0x2a8660[_0x114c73(0x23a)](_0x114c73(0x20a)))return _0x114c73(0x244);if(_0x2a8660===_0x114c73(0x247)||_0x2a8660[_0x114c73(0x232)](_0x114c73(0x228)))return _0x114c73(0x27b);if(_0x2a8660===''&&_0xcf9f76[_0x114c73(0x1f1)][_0x114c73(0x23a)](_0x114c73(0x226)))return _0x114c73(0x27b);if(_0x2a8660[_0x114c73(0x23a)]('activation'))return _0x114c73(0x260);return _0x114c73(0x244);}function runJourneySemanticChecks(_0x983c0a,_0x160ac5){const _0x5e8dd5=a163_0x109c,_0x4664c9=[],_0x274734=[];(!_0x983c0a['name']||_0x983c0a[_0x5e8dd5(0x24d)]['trim']()==='')&&_0x4664c9[_0x5e8dd5(0x234)]({'level':_0x5e8dd5(0x238),'path':'name','code':_0x5e8dd5(0x210),'message':_0x5e8dd5(0x28a),'location':getLocationFromPath(_0x160ac5[_0x5e8dd5(0x253)],_0x160ac5[_0x5e8dd5(0x200)],[_0x5e8dd5(0x24d)])});const _0x28ba40=new Set();if(_0x983c0a[_0x5e8dd5(0x222)])for(const _0x48f93c of Object[_0x5e8dd5(0x293)](_0x983c0a['segments'])){_0x28ba40[_0x5e8dd5(0x28c)](_0x48f93c);}const _0x18315b=new Set();if(_0x983c0a[_0x5e8dd5(0x251)])for(const _0x204ff2 of Object[_0x5e8dd5(0x293)](_0x983c0a[_0x5e8dd5(0x251)])){_0x18315b[_0x5e8dd5(0x28c)](_0x204ff2);}const _0x49d739=new Set(),_0xc8a812={..._0x160ac5,'embeddedSegments':_0x28ba40,'referencedSegments':_0x49d739,'activationKeys':_0x18315b[_0x5e8dd5(0x290)]>0x0?_0x18315b:undefined};if(_0x983c0a[_0x5e8dd5(0x222)])for(const [_0x42d5ed,_0x8b03d1]of Object[_0x5e8dd5(0x295)](_0x983c0a[_0x5e8dd5(0x222)])){const _0x3ecf70=validateEmbeddedSegment(_0x8b03d1,'segments.'+_0x42d5ed,_0xc8a812);for(const _0x43e843 of _0x3ecf70){if(_0x43e843[_0x5e8dd5(0x27e)]===_0x5e8dd5(0x238))_0x4664c9[_0x5e8dd5(0x234)](_0x43e843);else _0x274734['push'](_0x43e843);}}const _0x2c93cb=!!_0x983c0a[_0x5e8dd5(0x208)],_0x3707dc=_0x983c0a[_0x5e8dd5(0x23f)]?.[_0x5e8dd5(0x28f)](_0x524ec8=>!!_0x524ec8[_0x5e8dd5(0x208)])??![];!_0x2c93cb&&!_0x3707dc&&_0x274734[_0x5e8dd5(0x234)]({'level':'warning','path':_0x5e8dd5(0x208),'code':'MISSING_GOAL','message':_0x5e8dd5(0x209),'location':getLocationFromPath(_0x160ac5['document'],_0x160ac5[_0x5e8dd5(0x200)],[_0x5e8dd5(0x208)])});const _0x2d22d1=_0x983c0a[_0x5e8dd5(0x23f)]??_0x983c0a[_0x5e8dd5(0x21d)];if(_0x2d22d1&&_0x2d22d1[_0x5e8dd5(0x248)](_0x599c13=>_0x599c13[_0x5e8dd5(0x1f8)]===!![])[_0x5e8dd5(0x254)]>0x1){const _0x55aeba=_0x983c0a[_0x5e8dd5(0x23f)]?'journeys':_0x5e8dd5(0x21d);_0x4664c9[_0x5e8dd5(0x234)]({'level':_0x5e8dd5(0x238),'path':_0x55aeba,'code':_0x5e8dd5(0x231),'message':_0x5e8dd5(0x282)+(_0x55aeba===_0x5e8dd5(0x23f)?'journey\x20entry':'version')+_0x5e8dd5(0x26a),'location':getLocationFromPath(_0x160ac5[_0x5e8dd5(0x253)],_0x160ac5[_0x5e8dd5(0x200)],[_0x55aeba])});}if(_0x983c0a['journeys']&&_0x983c0a[_0x5e8dd5(0x23f)]['length']>0x0)for(let _0x39c73d=0x0;_0x39c73d<_0x983c0a[_0x5e8dd5(0x23f)][_0x5e8dd5(0x254)];_0x39c73d++){const _0x178880=_0x983c0a['journeys'][_0x39c73d];if(_0x983c0a[_0x5e8dd5(0x23f)][_0x5e8dd5(0x254)]>0x1&&_0x178880['state']===_0x5e8dd5(0x289))continue;const _0x376152=_0x178880['stages']||[],_0x3a592a='journeys['+_0x39c73d+'].',_0x2b681c=!!_0x178880[_0x5e8dd5(0x208)],_0x71ed15=_0x2b681c?{..._0x983c0a,'goal':_0x178880[_0x5e8dd5(0x208)]}:_0x983c0a;validateStagesForVersion(_0x376152,_0x71ed15,_0xc8a812,_0x3a592a,_0x4664c9,_0x274734,{'goalIsInherited':!_0x2b681c});}else{if(_0x983c0a[_0x5e8dd5(0x21d)]&&_0x983c0a[_0x5e8dd5(0x21d)]['length']>0x0)for(let _0x47414a=0x0;_0x47414a<_0x983c0a['versions'][_0x5e8dd5(0x254)];_0x47414a++){const _0x34b08f=_0x983c0a[_0x5e8dd5(0x21d)][_0x47414a];if(_0x983c0a[_0x5e8dd5(0x21d)]['length']>0x1&&_0x34b08f[_0x5e8dd5(0x1fd)]===_0x5e8dd5(0x289))continue;const _0x23abfb=_0x34b08f['stages']||[],_0x35043e=_0x5e8dd5(0x221)+_0x47414a+'].';validateStagesForVersion(_0x23abfb,_0x983c0a,_0xc8a812,_0x35043e,_0x4664c9,_0x274734);}else{const _0x2585bd=_0x983c0a[_0x5e8dd5(0x247)]||[];validateStagesForVersion(_0x2585bd,_0x983c0a,_0xc8a812,'',_0x4664c9,_0x274734);}}_0x983c0a['journeys']&&_0x983c0a[_0x5e8dd5(0x23f)][_0x5e8dd5(0x254)]>0x1&&(deduplicateAcrossVersions(_0x4664c9),deduplicateAcrossVersions(_0x274734));for(const _0x44bc0d of _0x28ba40){!_0x49d739[_0x5e8dd5(0x22f)](_0x44bc0d)&&!_0x44bc0d['startsWith'](_0x5e8dd5(0x1fa))&&_0x274734['push']({'level':'warning','path':_0x5e8dd5(0x1fb)+_0x44bc0d,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x5e8dd5(0x26d)+_0x44bc0d+_0x5e8dd5(0x283),'location':getLocationFromPath(_0x160ac5['document'],_0x160ac5[_0x5e8dd5(0x200)],[_0x5e8dd5(0x222),_0x44bc0d])});}return{'valid':_0x4664c9[_0x5e8dd5(0x254)]===0x0,'errors':_0x4664c9,'warnings':_0x274734};}
|
|
1
|
+
(function(_0xcc4629,_0x4b19b8){const _0x334e71=a168_0x1e96,_0x440bad=_0xcc4629();while(!![]){try{const _0x3f957f=parseInt(_0x334e71(0xc4))/0x1+-parseInt(_0x334e71(0x113))/0x2*(parseInt(_0x334e71(0xad))/0x3)+parseInt(_0x334e71(0xa1))/0x4+parseInt(_0x334e71(0x118))/0x5+parseInt(_0x334e71(0x11c))/0x6*(-parseInt(_0x334e71(0x125))/0x7)+-parseInt(_0x334e71(0x79))/0x8*(-parseInt(_0x334e71(0x72))/0x9)+parseInt(_0x334e71(0xd2))/0xa*(-parseInt(_0x334e71(0x95))/0xb);if(_0x3f957f===_0x4b19b8)break;else _0x440bad['push'](_0x440bad['shift']());}catch(_0x161d79){_0x440bad['push'](_0x440bad['shift']());}}}(a168_0x311a,0x74740));import{JourneyDefSchema}from'./types/journey-schema.js';function a168_0x311a(){const _0x37dbb5=['\x27\x20has\x20no\x20steps','timeout\x20of\x20\x27','MISSING_GOAL','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','2529315VhRTJk','\x27\x20with\x20no\x20action\x20in\x20between','journeys[','\x20with\x20latest:\x20true','entries','.with.activation','level','8WEtRfO','size','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','MISSING_MILESTONE','activationKeys','Decision\x20branch\x20\x27','type','MISSING_CONDITIONS','sort','abs','journeys,\x20stages,\x20or\x20versions','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','reduce','source','entry_criteria','SINGLE_INPUT_MERGE','stages','MISSING_WAIT_PARAMS','FEW_STEPS','indices','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x20stages\x20but\x20maximum\x20is\x20','JOURNEY_SCHEMA_ERROR','.with','Journey\x20has\x20','.with.variants','skipSchema','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','363sBJqab','Merge\x20step\x20\x27','stages[','condition\x20of\x20\x27','Journey\x20has\x20no\x20goal\x20defined','Activation\x20step\x20requires\x20an\x20activation\x20reference','map','get','.with.condition.timeout.next','milestone','values','decision_point','1877612VKsWGU','CONVERGENCE_WITHOUT_MERGE','step\x20\x27','Jump\x20step\x20requires\x20a\x20target','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','DUPLICATE_STEP_NAME','warning','description','activation','ref:','segments','15gbWlvy','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','issues','MISSING_END_STEP','INSUFFICIENT_STEPS','.with.condition','condition','\x20versions)','Stage\x20\x27','path','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','ab_test','variant\x20\x27','segment','referencedSegments','segments.','.steps','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','with','goal','.name','.milestone','918320UGtIqI','\x27\x20has\x20only\x20','\x27\x20has\x20no\x20end\x20step','Criteria\x20references\x20undefined\x20segment\x20\x27','MISSING_SEGMENT_REFERENCE','.next','versions','version','match','timeout','TOO_MANY_STAGES','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','data','246090BERair','.with.branches[','.segment','MISSING_ACTIVATION_REF','replace','message','variants','steps','next','.with.variants[','percentage','\x27\x20has\x20no\x20exit_criteria\x20defined','INVALID_NEXT_REFERENCE','excluded','End\x20step\x20\x27','.exit_criteria[','branch\x20\x27','.with.target','document','wait','target','.with.branches','Step\x20references\x20non-existent\x20step\x20\x27','\x27\x20(from:\x20','keys','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x27\x20of\x20\x27','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','error','exit_criteria','.steps[','push','MISSING_ENTRY_CRITERIA','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','INVALID_JUMP_TARGET','merge','length','goalIsInherited','stage','.with.condition.next','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','add','branches','stepNames','endsWith','rule','.with.condition.timeout','set','journey\x20entry','MISSING_ACTIVATION_DEFINITION','end','.rule','startsWith','trim','includes','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','embeddedSegments','name','INVALID_AB_TEST_PERCENTAGES','BRANCH_DIRECTLY_TO_MERGE','END_STEP_HAS_NEXT_OR_WITH','latest','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','MERGE_TO_MERGE_CHAIN','.entry_criteria','217936OPEKme','filter','MISSING_STAGES','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','some','2836920ZAquie','journeys',').\x20Merge\x20is\x20unnecessary.','UNUSED_EMBEDDED_SEGMENT','22554tteIXX','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','activations','MISSING_NAME','safeParse','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','has','.exit_criteria','success','749soMhWf','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone'];a168_0x311a=function(){return _0x37dbb5;};return a168_0x311a();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x25ae4e,_0x1b4d7d,_0x589923,_0x6c808,_0x1c04e3,_0x1b8d8b){return{'level':_0x25ae4e,'path':_0x1b4d7d,'code':_0x589923,'message':_0x6c808,'location':getLocationFromPath(_0x1c04e3['document'],_0x1c04e3['source'],pathToArray(_0x1b8d8b??_0x1b4d7d))};}function validateVersionStructure(_0x5897d6,_0x4cccb9){const _0x2ab72d=a168_0x1e96,_0x48cd71=[];return _0x5897d6['length']>MAX_STAGES&&_0x48cd71[_0x2ab72d(0xf1)](createIssue(_0x2ab72d(0xee),_0x2ab72d(0x89),_0x2ab72d(0xce),_0x2ab72d(0x91)+_0x5897d6[_0x2ab72d(0xf6)]+_0x2ab72d(0x8e)+MAX_STAGES,_0x4cccb9)),_0x48cd71;}function validateStageStructure(_0x4b6aa7,_0xf177c2,_0x22694d,_0x2544e9){const _0x1078eb=a168_0x1e96,_0xb42ed9=[],_0x1baeba=_0x1078eb(0x97)+_0xf177c2+']';_0xf177c2===0x0&&!_0x4b6aa7[_0x1078eb(0x87)]&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xee),_0x1baeba+_0x1078eb(0x112),_0x1078eb(0xf2),_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0x94),_0x2544e9,_0x1baeba));const _0x109b8d=_0xf177c2===_0x22694d-0x1;!_0x109b8d&&!_0x4b6aa7[_0x1078eb(0x9e)]&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xee),_0x1baeba+_0x1078eb(0xc3),_0x1078eb(0x7c),_0x1078eb(0xb6)+_0x4b6aa7['name']+_0x1078eb(0x126),_0x2544e9,_0x1baeba));(!_0x4b6aa7[_0x1078eb(0xef)]||_0x4b6aa7[_0x1078eb(0xef)][_0x1078eb(0xf6)]===0x0)&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xa8),_0x1baeba+_0x1078eb(0x123),'MISSING_EXIT_CRITERIA','Stage\x20\x27'+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0xdd),_0x2544e9,_0x1baeba));const _0x1bdaad=_0x4b6aa7['steps']?.[_0x1078eb(0xf6)]??0x0;if(_0x1bdaad===0x0)_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xee),_0x1baeba+'.steps',_0x1078eb(0xb2),_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0x127),_0x2544e9,_0x1baeba+'.steps'));else{if(_0x1bdaad===0x1)_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xa8),_0x1baeba+'.steps','INSUFFICIENT_STEPS',_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0x121),_0x2544e9,_0x1baeba+_0x1078eb(0xbe)));else _0x1bdaad<=0x3&&_0xb42ed9[_0x1078eb(0xf1)](createIssue(_0x1078eb(0xa8),_0x1baeba+_0x1078eb(0xbe),_0x1078eb(0x8b),_0x1078eb(0xb6)+_0x4b6aa7[_0x1078eb(0x10b)]+_0x1078eb(0xc5)+_0x1bdaad+_0x1078eb(0xaf),_0x2544e9,_0x1baeba+_0x1078eb(0xbe)));}return _0xb42ed9;}function validateStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147){const _0x318557=a168_0x1e96,_0x12eaf6=[];if(_0x22da5a[_0x318557(0x7f)]===_0x318557(0x104))return _0x22da5a[_0x318557(0xda)]&&_0x12eaf6[_0x318557(0xf1)](createIssue(_0x318557(0xee),_0x17b372+'.next',_0x318557(0x10e),_0x318557(0xe0)+_0x22da5a['name']+_0x318557(0xa5),_0x30c4e1)),_0x318557(0xc0)in _0x22da5a&&_0x22da5a[_0x318557(0xc0)]!==undefined&&_0x12eaf6[_0x318557(0xf1)](createIssue(_0x318557(0xee),_0x17b372+'.with',_0x318557(0x10e),_0x318557(0xe0)+_0x22da5a[_0x318557(0x10b)]+'\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field',_0x30c4e1)),_0x12eaf6;_0x22da5a[_0x318557(0xda)]&&(_0x30c4e1[_0x318557(0xfd)]&&!_0x30c4e1['stepNames'][_0x318557(0x122)](_0x22da5a[_0x318557(0xda)])&&_0x12eaf6[_0x318557(0xf1)](createIssue('error',_0x17b372+_0x318557(0xc9),'INVALID_NEXT_REFERENCE',_0x318557(0xe8)+_0x22da5a[_0x318557(0xda)]+'\x27',_0x30c4e1)));switch(_0x22da5a[_0x318557(0x7f)]){case _0x318557(0xe5):_0x12eaf6[_0x318557(0xf1)](...validateWaitStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147));break;case _0x318557(0xaa):_0x12eaf6['push'](...validateActivationStep(_0x22da5a,_0x17b372,_0x30c4e1));break;case _0x318557(0xa0):_0x12eaf6[_0x318557(0xf1)](...validateDecisionPointStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147));break;case _0x318557(0xb9):_0x12eaf6['push'](...validateAbTestStep(_0x22da5a,_0x17b372,_0x30c4e1,_0x436147));break;case'jump':_0x12eaf6['push'](...validateJumpStep(_0x22da5a,_0x17b372,_0x30c4e1));break;}return _0x12eaf6;}function validateWaitStep(_0x50079c,_0x1601b4,_0x2c72f3,_0x38b1b5){const _0x2b5735=a168_0x1e96,_0x139696=[];if(!_0x50079c[_0x2b5735(0xc0)])return _0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xee),_0x1601b4+_0x2b5735(0x90),_0x2b5735(0x8a),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x2c72f3,_0x1601b4)),_0x139696;if(_0x50079c[_0x2b5735(0xc0)]['condition']){const _0x2e95f3=_0x50079c[_0x2b5735(0xc0)]['condition'];if(_0x2e95f3[_0x2b5735(0xbb)]){_0x2c72f3[_0x2b5735(0xbc)]?.[_0x2b5735(0xfb)](_0x2e95f3[_0x2b5735(0xbb)]);!_0x2e95f3[_0x2b5735(0xbb)][_0x2b5735(0x106)](_0x2b5735(0xab))&&(_0x2c72f3[_0x2b5735(0x10a)]&&!_0x2c72f3[_0x2b5735(0x10a)][_0x2b5735(0x122)](_0x2e95f3[_0x2b5735(0xbb)])&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xee),_0x1601b4+'.with.condition.segment','MISSING_SEGMENT_REFERENCE',_0x2b5735(0xeb)+_0x2e95f3[_0x2b5735(0xbb)]+_0x2b5735(0xcf),_0x2c72f3)));_0x2e95f3['next']&&_0x2c72f3[_0x2b5735(0xfd)]&&!_0x2c72f3[_0x2b5735(0xfd)][_0x2b5735(0x122)](_0x2e95f3[_0x2b5735(0xda)])&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xee),_0x1601b4+_0x2b5735(0xf9),_0x2b5735(0xde),_0x2b5735(0x7b)+_0x2e95f3['next']+'\x27',_0x2c72f3));_0x2e95f3[_0x2b5735(0xcd)]?.[_0x2b5735(0xda)]&&_0x2c72f3[_0x2b5735(0xfd)]&&!_0x2c72f3[_0x2b5735(0xfd)][_0x2b5735(0x122)](_0x2e95f3[_0x2b5735(0xcd)]['next'])&&_0x139696[_0x2b5735(0xf1)](createIssue('error',_0x1601b4+'.with.condition.timeout.next',_0x2b5735(0xde),_0x2b5735(0x71)+_0x2e95f3[_0x2b5735(0xcd)][_0x2b5735(0xda)]+'\x27',_0x2c72f3));const _0x38cea8=_0x2e95f3[_0x2b5735(0xda)]||_0x50079c[_0x2b5735(0xda)],_0x385381=_0x2e95f3[_0x2b5735(0xcd)]?.[_0x2b5735(0xda)]||_0x50079c['next'];if(_0x38cea8){const _0x57fefa=_0x38b1b5['get'](_0x38cea8);_0x57fefa?.[_0x2b5735(0x7f)]==='merge'&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xa8),_0x1601b4+_0x2b5735(0xf9),_0x2b5735(0x10d),_0x2b5735(0xae)+_0x38cea8+_0x2b5735(0xa6),_0x2c72f3,_0x1601b4+_0x2b5735(0xb3)));}if(_0x385381){const _0x2827f6=_0x38b1b5[_0x2b5735(0x9c)](_0x385381);_0x2827f6?.[_0x2b5735(0x7f)]===_0x2b5735(0xf5)&&_0x139696[_0x2b5735(0xf1)](createIssue(_0x2b5735(0xa8),_0x1601b4+_0x2b5735(0x9d),_0x2b5735(0x10d),_0x2b5735(0xb8)+_0x385381+_0x2b5735(0xa6),_0x2c72f3,_0x1601b4+_0x2b5735(0x100)));}}}return _0x139696;}function validateActivationStep(_0x513755,_0x4e2024,_0x1b098d){const _0x40763b=a168_0x1e96,_0x3d948f=[];if(!_0x513755[_0x40763b(0xc0)]?.['activation'])return _0x3d948f[_0x40763b(0xf1)](createIssue('error',_0x4e2024+_0x40763b(0x77),_0x40763b(0xd5),_0x40763b(0x9a),_0x1b098d,_0x4e2024)),_0x3d948f;const _0x2c2728=_0x513755[_0x40763b(0xc0)][_0x40763b(0xaa)];return _0x1b098d[_0x40763b(0x7d)]&&!_0x2c2728[_0x40763b(0x106)](_0x40763b(0xab))&&(!_0x1b098d[_0x40763b(0x7d)][_0x40763b(0x122)](_0x2c2728)&&_0x3d948f[_0x40763b(0xf1)](createIssue(_0x40763b(0xee),_0x4e2024+'.with.activation',_0x40763b(0x103),_0x40763b(0x70)+_0x2c2728+_0x40763b(0x84),_0x1b098d))),_0x3d948f;}function validateDecisionPointStep(_0x38d1e5,_0xe4afdb,_0x4e11c9,_0x3a29ac){const _0x3bc37a=a168_0x1e96,_0xe6eb36=[];if(!_0x38d1e5[_0x3bc37a(0xc0)]?.[_0x3bc37a(0xfc)]||_0x38d1e5['with'][_0x3bc37a(0xfc)][_0x3bc37a(0xf6)]===0x0)return _0xe6eb36[_0x3bc37a(0xf1)](createIssue('error',_0xe4afdb+_0x3bc37a(0xe7),_0x3bc37a(0x80),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x4e11c9,_0xe4afdb)),_0xe6eb36;for(let _0x5dda83=0x0;_0x5dda83<_0x38d1e5['with'][_0x3bc37a(0xfc)][_0x3bc37a(0xf6)];_0x5dda83++){const _0x300395=_0x38d1e5[_0x3bc37a(0xc0)]['branches'][_0x5dda83],_0x4fe162=_0xe4afdb+_0x3bc37a(0xd3)+_0x5dda83+']';_0x300395[_0x3bc37a(0xbb)]&&!_0x300395[_0x3bc37a(0xdf)]&&(_0x4e11c9[_0x3bc37a(0xbc)]?.['add'](_0x300395['segment']),!_0x300395[_0x3bc37a(0xbb)]['startsWith']('ref:')&&(_0x4e11c9[_0x3bc37a(0x10a)]&&!_0x4e11c9[_0x3bc37a(0x10a)]['has'](_0x300395[_0x3bc37a(0xbb)])&&_0xe6eb36[_0x3bc37a(0xf1)](createIssue('error',_0x4fe162+_0x3bc37a(0xd4),_0x3bc37a(0xc8),_0x3bc37a(0xd0)+_0x300395['segment']+'\x27',_0x4e11c9))));_0x300395[_0x3bc37a(0xda)]&&_0x4e11c9['stepNames']&&!_0x4e11c9[_0x3bc37a(0xfd)][_0x3bc37a(0x122)](_0x300395[_0x3bc37a(0xda)])&&_0xe6eb36[_0x3bc37a(0xf1)](createIssue(_0x3bc37a(0xee),_0x4fe162+_0x3bc37a(0xc9),_0x3bc37a(0xde),_0x3bc37a(0xbf)+_0x300395['next']+'\x27',_0x4e11c9));if(_0x300395['next']){const _0x49bde4=_0x3a29ac[_0x3bc37a(0x9c)](_0x300395[_0x3bc37a(0xda)]);_0x49bde4?.[_0x3bc37a(0x7f)]==='merge'&&_0xe6eb36['push'](createIssue(_0x3bc37a(0xa8),_0x4fe162+_0x3bc37a(0xc9),_0x3bc37a(0x10d),_0x3bc37a(0x7e)+_0x300395[_0x3bc37a(0x10b)]+_0x3bc37a(0x109)+_0x300395[_0x3bc37a(0xda)]+_0x3bc37a(0x73),_0x4e11c9));}}return _0xe6eb36;}function validateAbTestStep(_0x177091,_0x59f816,_0x4290ce,_0x50fb99){const _0x55c3f8=a168_0x1e96,_0x18451c=[];if(!_0x177091[_0x55c3f8(0xc0)]?.[_0x55c3f8(0xd8)]||_0x177091[_0x55c3f8(0xc0)][_0x55c3f8(0xd8)][_0x55c3f8(0xf6)]===0x0)return _0x18451c['push'](createIssue(_0x55c3f8(0xee),_0x59f816+_0x55c3f8(0x92),_0x55c3f8(0x80),_0x55c3f8(0xfa),_0x4290ce,_0x59f816)),_0x18451c;const _0x21089d=_0x177091[_0x55c3f8(0xc0)][_0x55c3f8(0xd8)][_0x55c3f8(0x85)]((_0x2bca34,_0x1aba95)=>_0x2bca34+(_0x1aba95[_0x55c3f8(0xdc)]||0x0),0x0);Math[_0x55c3f8(0x82)](_0x21089d-0x64)>0.01&&_0x18451c['push'](createIssue(_0x55c3f8(0xee),_0x59f816+'.with.variants',_0x55c3f8(0x10c),_0x55c3f8(0x8d)+_0x21089d+'%)',_0x4290ce));for(let _0x2e6b51=0x0;_0x2e6b51<_0x177091['with'][_0x55c3f8(0xd8)][_0x55c3f8(0xf6)];_0x2e6b51++){const _0x32e1c1=_0x177091[_0x55c3f8(0xc0)][_0x55c3f8(0xd8)][_0x2e6b51],_0x2ced53=_0x59f816+_0x55c3f8(0xdb)+_0x2e6b51+']';_0x32e1c1[_0x55c3f8(0xda)]&&_0x4290ce[_0x55c3f8(0xfd)]&&!_0x4290ce['stepNames']['has'](_0x32e1c1['next'])&&_0x18451c['push'](createIssue(_0x55c3f8(0xee),_0x2ced53+'.next',_0x55c3f8(0xde),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x32e1c1[_0x55c3f8(0xda)]+'\x27',_0x4290ce));if(_0x32e1c1[_0x55c3f8(0xda)]){const _0x10d18d=_0x50fb99['get'](_0x32e1c1[_0x55c3f8(0xda)]);_0x10d18d?.['type']===_0x55c3f8(0xf5)&&_0x18451c[_0x55c3f8(0xf1)](createIssue(_0x55c3f8(0xa8),_0x2ced53+_0x55c3f8(0xc9),'BRANCH_DIRECTLY_TO_MERGE','A/B\x20test\x20variant\x20\x27'+_0x32e1c1[_0x55c3f8(0x10b)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x32e1c1[_0x55c3f8(0xda)]+_0x55c3f8(0x73),_0x4290ce));}}return _0x18451c;}function validateJumpStep(_0x48ca5a,_0x5af95d,_0x2b594f){const _0x598e95=a168_0x1e96,_0x2142cc=[];if(!_0x48ca5a['with']?.[_0x598e95(0xe6)])return _0x2142cc['push'](createIssue('error',_0x5af95d+_0x598e95(0xe3),_0x598e95(0xf4),_0x598e95(0xa4),_0x2b594f,_0x5af95d)),_0x2142cc;return(!_0x48ca5a[_0x598e95(0xc0)][_0x598e95(0xe6)]['journey']||!_0x48ca5a[_0x598e95(0xc0)][_0x598e95(0xe6)][_0x598e95(0xf8)])&&_0x2142cc[_0x598e95(0xf1)](createIssue(_0x598e95(0xee),_0x5af95d+_0x598e95(0xe3),_0x598e95(0xf4),_0x598e95(0x11d),_0x2b594f)),_0x2142cc;}function buildConvergenceMap(_0xa683cc){const _0x1257fb=a168_0x1e96,_0x24c039=new Map();function _0xb68dce(_0x1dc41,_0x50633b){const _0x572dac=a168_0x1e96,_0x395026=_0x24c039[_0x572dac(0x9c)](_0x1dc41)||[];_0x395026[_0x572dac(0xf1)](_0x50633b),_0x24c039['set'](_0x1dc41,_0x395026);}for(const _0x155f48 of _0xa683cc){_0x155f48[_0x1257fb(0xda)]&&_0xb68dce(_0x155f48['next'],{'stepName':_0x155f48['name'],'description':_0x1257fb(0xa3)+_0x155f48[_0x1257fb(0x10b)]+'\x27'});if(_0x155f48['type']===_0x1257fb(0xa0)&&_0x155f48[_0x1257fb(0xc0)]?.[_0x1257fb(0xfc)])for(const _0x31637e of _0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xfc)]){_0x31637e[_0x1257fb(0xda)]&&_0xb68dce(_0x31637e[_0x1257fb(0xda)],{'stepName':_0x155f48['name'],'description':_0x1257fb(0xe2)+_0x31637e['name']+_0x1257fb(0xec)+_0x155f48['name']+'\x27'});}if(_0x155f48[_0x1257fb(0x7f)]===_0x1257fb(0xb9)&&_0x155f48[_0x1257fb(0xc0)]?.[_0x1257fb(0xd8)])for(const _0x2b174e of _0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xd8)]){_0x2b174e['next']&&_0xb68dce(_0x2b174e[_0x1257fb(0xda)],{'stepName':_0x155f48[_0x1257fb(0x10b)],'description':_0x1257fb(0xba)+_0x2b174e[_0x1257fb(0x10b)]+'\x27\x20of\x20\x27'+_0x155f48[_0x1257fb(0x10b)]+'\x27'});}_0x155f48[_0x1257fb(0x7f)]===_0x1257fb(0xe5)&&_0x155f48['with']?.[_0x1257fb(0xb4)]&&(_0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xb4)][_0x1257fb(0xda)]&&_0xb68dce(_0x155f48['with']['condition'][_0x1257fb(0xda)],{'stepName':_0x155f48['name'],'description':_0x1257fb(0x98)+_0x155f48['name']+'\x27'}),_0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xb4)][_0x1257fb(0xcd)]?.['next']&&_0xb68dce(_0x155f48[_0x1257fb(0xc0)][_0x1257fb(0xb4)]['timeout'][_0x1257fb(0xda)],{'stepName':_0x155f48[_0x1257fb(0x10b)],'description':_0x1257fb(0x128)+_0x155f48['name']+'\x27'}));}return _0x24c039;}function validateFlowControl(_0x5acd89,_0xa98f30,_0x1a5113){const _0xe492fa=a168_0x1e96,_0xdc6f04=[],_0xb20b88=_0xe492fa(0x97)+_0xa98f30+']',_0x386f1e=_0x5acd89[_0xe492fa(0xd9)]||[];if(_0x386f1e['length']===0x0)return _0xdc6f04;const _0xf2032f=new Map();for(const _0x281765 of _0x386f1e){_0x281765[_0xe492fa(0x10b)]&&_0xf2032f[_0xe492fa(0x101)](_0x281765[_0xe492fa(0x10b)],_0x281765);}const _0x3c819e=buildConvergenceMap(_0x386f1e),_0x37c547=_0x386f1e[_0xe492fa(0x117)](_0x22168e=>_0x22168e['type']===_0xe492fa(0x104));!_0x37c547&&_0xdc6f04[_0xe492fa(0xf1)](createIssue(_0xe492fa(0xee),_0xb20b88+_0xe492fa(0xbe),_0xe492fa(0xb1),'Stage\x20\x27'+_0x5acd89[_0xe492fa(0x10b)]+_0xe492fa(0xc6),_0x1a5113));for(const [_0x5836ed,_0x521d67]of _0x3c819e){const _0x30d98c=_0xf2032f['get'](_0x5836ed);if(!_0x30d98c)continue;if(_0x521d67[_0xe492fa(0xf6)]>0x1&&_0x30d98c[_0xe492fa(0x7f)]!=='merge'){const _0x3a7d6d=_0x521d67[_0xe492fa(0x9b)](_0x4c8e7e=>_0x4c8e7e[_0xe492fa(0xa9)])['join'](',\x20');_0xdc6f04[_0xe492fa(0xf1)](createIssue('error',_0xb20b88+'.steps',_0xe492fa(0xa2),_0xe492fa(0xed)+_0x5836ed+_0xe492fa(0xe9)+_0x3a7d6d+').\x20Use\x20a\x20merge\x20step.',_0x1a5113));}_0x521d67['length']===0x1&&_0x30d98c[_0xe492fa(0x7f)]===_0xe492fa(0xf5)&&_0xdc6f04[_0xe492fa(0xf1)](createIssue('warning',_0xb20b88+'.steps',_0xe492fa(0x88),_0xe492fa(0x96)+_0x5836ed+_0xe492fa(0xf3)+_0x521d67[0x0][_0xe492fa(0xa9)]+_0xe492fa(0x11a),_0x1a5113));}for(const _0x1e6e41 of _0x386f1e){if(_0x1e6e41['type']===_0xe492fa(0xf5)&&_0x1e6e41['next']){const _0x5ab13a=_0xf2032f[_0xe492fa(0x9c)](_0x1e6e41[_0xe492fa(0xda)]);_0x5ab13a?.['type']===_0xe492fa(0xf5)&&_0xdc6f04[_0xe492fa(0xf1)](createIssue(_0xe492fa(0xee),_0xb20b88+_0xe492fa(0xbe),_0xe492fa(0x111),_0xe492fa(0x96)+_0x1e6e41[_0xe492fa(0x10b)]+_0xe492fa(0x116)+_0x1e6e41['next']+'\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.',_0x1a5113));}}return _0xdc6f04;}function validateCriteria(_0x3001fa,_0x1dc030,_0x4996f9){const _0x1024bd=a168_0x1e96,_0x3fbee1=[];return _0x3001fa[_0x1024bd(0xbb)]&&(_0x4996f9[_0x1024bd(0xbc)]?.['add'](_0x3001fa[_0x1024bd(0xbb)]),!_0x3001fa[_0x1024bd(0xbb)][_0x1024bd(0x106)](_0x1024bd(0xab))&&(_0x4996f9[_0x1024bd(0x10a)]&&!_0x4996f9[_0x1024bd(0x10a)]['has'](_0x3001fa[_0x1024bd(0xbb)])&&_0x3fbee1[_0x1024bd(0xf1)](createIssue(_0x1024bd(0xee),_0x1dc030+_0x1024bd(0xd4),_0x1024bd(0xc8),_0x1024bd(0xc7)+_0x3001fa['segment']+'\x27',_0x4996f9)))),_0x3fbee1;}function validateEmbeddedSegment(_0x1c56d2,_0x5efe98,_0x38a21e){const _0x121d01=a168_0x1e96,_0x22cc48=[];return _0x1c56d2[_0x121d01(0xff)]&&_0x22cc48[_0x121d01(0xf1)](...validateRuleDef(_0x1c56d2['rule'],_0x5efe98+_0x121d01(0x105),_0x38a21e)),_0x22cc48;}function validateStage(_0x5d4910,_0x2ee442,_0x5e30c1,_0x2c13a9){const _0xfcc395=a168_0x1e96,_0x104923=[],_0x165b7c='stages['+_0x2ee442+']',_0x1983a5=new Map(),_0xa21f45=new Map();if(_0x5d4910[_0xfcc395(0xd9)]){for(let _0x463a90=0x0;_0x463a90<_0x5d4910[_0xfcc395(0xd9)][_0xfcc395(0xf6)];_0x463a90++){const _0x24ca67=_0x5d4910['steps'][_0x463a90];_0x24ca67[_0xfcc395(0x10b)]&&_0x1983a5[_0xfcc395(0x101)](_0x24ca67['name'],_0x24ca67);}for(let _0xdd007b=0x0;_0xdd007b<_0x5d4910[_0xfcc395(0xd9)][_0xfcc395(0xf6)];_0xdd007b++){const _0x4fc69d=_0x5d4910[_0xfcc395(0xd9)][_0xdd007b],_0x3ef74e=_0x165b7c+_0xfcc395(0xf0)+_0xdd007b+']';if(_0x4fc69d[_0xfcc395(0x10b)]){if(_0xa21f45[_0xfcc395(0x122)](_0x4fc69d[_0xfcc395(0x10b)])){const _0x46ab80=_0xa21f45[_0xfcc395(0x9c)](_0x4fc69d[_0xfcc395(0x10b)]);_0x104923['push'](createIssue(_0xfcc395(0xee),_0x3ef74e+_0xfcc395(0xc2),_0xfcc395(0xa7),'Duplicate\x20step\x20name\x20\x27'+_0x4fc69d[_0xfcc395(0x10b)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x46ab80+'])',_0x2c13a9));}else _0xa21f45[_0xfcc395(0x101)](_0x4fc69d[_0xfcc395(0x10b)],_0xdd007b);}_0x104923[_0xfcc395(0xf1)](...validateStep(_0x4fc69d,_0x3ef74e,_0x2c13a9,_0x1983a5));}}_0x5d4910['entry_criteria']&&_0x104923[_0xfcc395(0xf1)](...validateCriteria(_0x5d4910['entry_criteria'],_0x165b7c+_0xfcc395(0x112),_0x2c13a9));if(_0x5d4910[_0xfcc395(0xef)])for(let _0x39e7a7=0x0;_0x39e7a7<_0x5d4910[_0xfcc395(0xef)][_0xfcc395(0xf6)];_0x39e7a7++){_0x104923['push'](...validateCriteria(_0x5d4910[_0xfcc395(0xef)][_0x39e7a7],_0x165b7c+_0xfcc395(0xe1)+_0x39e7a7+']',_0x2c13a9));}return _0x5d4910[_0xfcc395(0x9e)]&&_0x104923['push'](...validateCriteria(_0x5d4910[_0xfcc395(0x9e)],_0x165b7c+_0xfcc395(0xc3),_0x2c13a9)),_0x104923[_0xfcc395(0xf1)](...validateStageStructure(_0x5d4910,_0x2ee442,_0x5e30c1,_0x2c13a9)),_0x104923[_0xfcc395(0xf1)](...validateFlowControl(_0x5d4910,_0x2ee442,_0x2c13a9)),_0x104923;}function a168_0x1e96(_0x8cb888,_0x3dfb6a){_0x8cb888=_0x8cb888-0x6f;const _0x311a07=a168_0x311a();let _0x1e96cb=_0x311a07[_0x8cb888];return _0x1e96cb;}function validateStagesForVersion(_0x1a1dfd,_0x1b8393,_0x26bbe0,_0x530574,_0x359d87,_0x17ec4b,_0xac3e53){const _0x175d69=a168_0x1e96;if(_0x1a1dfd[_0x175d69(0xf6)]===0x0){_0x359d87[_0x175d69(0xf1)]({'level':_0x175d69(0xee),'path':_0x530574+'stages','code':_0x175d69(0x115),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x26bbe0[_0x175d69(0xe4)],_0x26bbe0[_0x175d69(0x86)],['stages'])});return;}const _0xfb56be=new Set();for(const _0x4b1425 of _0x1a1dfd){if(_0x4b1425[_0x175d69(0xd9)])for(const _0x3fede9 of _0x4b1425[_0x175d69(0xd9)]){_0x3fede9[_0x175d69(0x10b)]&&_0xfb56be[_0x175d69(0xfb)](_0x3fede9['name']);}}const _0x332609={..._0x26bbe0,'stepNames':_0xfb56be},_0x2df0b6=validateVersionStructure(_0x1a1dfd,_0x332609);for(const _0x594e77 of _0x2df0b6){const _0x25e4c2=_0x530574?{..._0x594e77,'path':''+_0x530574+_0x594e77['path']}:_0x594e77;if(_0x25e4c2[_0x175d69(0x78)]===_0x175d69(0xee))_0x359d87[_0x175d69(0xf1)](_0x25e4c2);else _0x17ec4b[_0x175d69(0xf1)](_0x25e4c2);}for(let _0x3188d2=0x0;_0x3188d2<_0x1a1dfd['length'];_0x3188d2++){const _0x5e684e=validateStage(_0x1a1dfd[_0x3188d2],_0x3188d2,_0x1a1dfd[_0x175d69(0xf6)],_0x332609);for(const _0xcc067d of _0x5e684e){const _0x3cb6e0=_0x530574?{..._0xcc067d,'path':''+_0x530574+_0xcc067d['path']}:_0xcc067d;if(_0x3cb6e0[_0x175d69(0x78)]===_0x175d69(0xee))_0x359d87[_0x175d69(0xf1)](_0x3cb6e0);else _0x17ec4b[_0x175d69(0xf1)](_0x3cb6e0);}}if(_0x1b8393[_0x175d69(0xc1)]){const _0x594c15=_0xac3e53?.[_0x175d69(0xf7)]?_0x175d69(0xc1):_0x530574+_0x175d69(0xc1),_0x401d5d=validateCriteria(_0x1b8393[_0x175d69(0xc1)],_0x594c15,_0x332609);for(const _0x3715ed of _0x401d5d){if(_0x3715ed[_0x175d69(0x78)]===_0x175d69(0xee))_0x359d87[_0x175d69(0xf1)](_0x3715ed);else _0x17ec4b['push'](_0x3715ed);}}}function extractVersionIndex(_0x4ed9c4){const _0x52aedb=a168_0x1e96,_0x42ef4a=_0x4ed9c4[_0x52aedb(0xcc)](/^journeys\[(\d+)\]\./);return _0x42ef4a?_0x42ef4a[0x1]:undefined;}function deduplicateAcrossVersions(_0x11887a){const _0x595bf6=a168_0x1e96,_0x384be8=new Map();for(let _0x1a0368=0x0;_0x1a0368<_0x11887a['length'];_0x1a0368++){const _0x228986=_0x11887a[_0x1a0368]['code']+':'+_0x11887a[_0x1a0368]['message'],_0x302457=extractVersionIndex(_0x11887a[_0x1a0368]['path']),_0x10f659=_0x384be8[_0x595bf6(0x9c)](_0x228986);if(_0x10f659){_0x10f659[_0x595bf6(0x8c)][_0x595bf6(0xf1)](_0x1a0368);if(_0x302457)_0x10f659['versions'][_0x595bf6(0xfb)](_0x302457);}else _0x384be8['set'](_0x228986,{'indices':[_0x1a0368],'versions':new Set(_0x302457?[_0x302457]:[])});}const _0x430e7f=new Set();for(const {indices:_0x1ecdb1,versions:_0x63e8}of _0x384be8[_0x595bf6(0x9f)]()){if(_0x63e8[_0x595bf6(0x7a)]<=0x1)continue;const _0x47fd31=_0x11887a[_0x1ecdb1[0x0]];_0x47fd31[_0x595bf6(0xb7)]=_0x47fd31[_0x595bf6(0xb7)][_0x595bf6(0xd6)](/^journeys\[\d+\]\./,''),_0x47fd31[_0x595bf6(0xd7)]=_0x47fd31[_0x595bf6(0xd7)]+'\x20(across\x20'+_0x63e8['size']+_0x595bf6(0xb5);for(let _0x581c06=0x1;_0x581c06<_0x1ecdb1[_0x595bf6(0xf6)];_0x581c06++){_0x430e7f[_0x595bf6(0xfb)](_0x1ecdb1[_0x581c06]);}}const _0x131280=[..._0x430e7f][_0x595bf6(0x81)]((_0x6438ea,_0xdb9205)=>_0xdb9205-_0x6438ea);for(const _0x34ddfd of _0x131280){_0x11887a['splice'](_0x34ddfd,0x1);}}export function validateJourneyDef(_0x25d3d0,_0xf5bde9={},_0x1f29ce={}){const _0x36e922=a168_0x1e96;if(_0x1f29ce[_0x36e922(0x93)])return runJourneySemanticChecks(_0x25d3d0,_0xf5bde9);const _0x4d9f31=JourneyDefSchema[_0x36e922(0x120)](_0x25d3d0);if(_0x4d9f31[_0x36e922(0x124)])return runJourneySemanticChecks(_0x4d9f31[_0x36e922(0xd1)],_0xf5bde9);return zodErrorsToJourneyValidationResult(_0x4d9f31[_0x36e922(0xee)],_0xf5bde9);}function zodErrorsToJourneyValidationResult(_0x3c48e4,_0x30ef3e){const _0x4993d2=a168_0x1e96,_0x391131=flattenZodIssues(_0x3c48e4[_0x4993d2(0xb0)]),_0x1b80b6=_0x391131['map'](_0x4900e6=>{const _0x226a04=_0x4993d2,_0x56145b=formatZodPath(_0x4900e6[_0x226a04(0xb7)]),_0x44f1e4=mapJourneyZodIssueToCode(_0x4900e6,_0x56145b),_0x4aff0b=getLocationFromPath(_0x30ef3e[_0x226a04(0xe4)],_0x30ef3e[_0x226a04(0x86)],_0x4900e6[_0x226a04(0xb7)][_0x226a04(0x9b)](_0x7e92e=>typeof _0x7e92e==='symbol'?String(_0x7e92e):_0x7e92e));return{'level':'error','path':_0x56145b,'code':_0x44f1e4,'message':_0x4900e6[_0x226a04(0xd7)],..._0x4aff0b&&{'location':_0x4aff0b}};});return{'valid':![],'errors':_0x1b80b6,'warnings':[]};}function mapJourneyZodIssueToCode(_0x932fc5,_0x1ee1b7){const _0x56aa49=a168_0x1e96;if(_0x1ee1b7==='name')return'MISSING_NAME';if(_0x1ee1b7[_0x56aa49(0xfe)]('.type')&&_0x1ee1b7[_0x56aa49(0x108)](_0x56aa49(0xd9)))return'JOURNEY_SCHEMA_ERROR';if(_0x1ee1b7==='stages'||_0x1ee1b7[_0x56aa49(0xfe)]('.stages'))return _0x56aa49(0x115);if(_0x1ee1b7===''&&_0x932fc5[_0x56aa49(0xd7)][_0x56aa49(0x108)](_0x56aa49(0x83)))return'MISSING_STAGES';if(_0x1ee1b7[_0x56aa49(0x108)](_0x56aa49(0xaa)))return'ACTIVATION_SCHEMA_ERROR';return _0x56aa49(0x8f);}function runJourneySemanticChecks(_0x30ca7d,_0x1c19d3){const _0x50a656=a168_0x1e96,_0x1e8942=[],_0x57832e=[];(!_0x30ca7d['name']||_0x30ca7d[_0x50a656(0x10b)][_0x50a656(0x107)]()==='')&&_0x1e8942[_0x50a656(0xf1)]({'level':'error','path':_0x50a656(0x10b),'code':_0x50a656(0x11f),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3[_0x50a656(0x86)],[_0x50a656(0x10b)])});const _0x20c88f=new Set();if(_0x30ca7d[_0x50a656(0xac)])for(const _0x3325dc of Object[_0x50a656(0xea)](_0x30ca7d[_0x50a656(0xac)])){_0x20c88f[_0x50a656(0xfb)](_0x3325dc);}const _0xd18c09=new Set();if(_0x30ca7d[_0x50a656(0x11e)])for(const _0x5264fa of Object[_0x50a656(0xea)](_0x30ca7d['activations'])){_0xd18c09['add'](_0x5264fa);}const _0xbf43c=new Set(),_0x318a4f={..._0x1c19d3,'embeddedSegments':_0x20c88f,'referencedSegments':_0xbf43c,'activationKeys':_0xd18c09[_0x50a656(0x7a)]>0x0?_0xd18c09:undefined};if(_0x30ca7d[_0x50a656(0xac)])for(const [_0xf59af4,_0x495835]of Object[_0x50a656(0x76)](_0x30ca7d[_0x50a656(0xac)])){const _0x1cbc09=validateEmbeddedSegment(_0x495835,_0x50a656(0xbd)+_0xf59af4,_0x318a4f);for(const _0x3b3e61 of _0x1cbc09){if(_0x3b3e61[_0x50a656(0x78)]==='error')_0x1e8942['push'](_0x3b3e61);else _0x57832e[_0x50a656(0xf1)](_0x3b3e61);}}const _0x336f00=!!_0x30ca7d[_0x50a656(0xc1)],_0x2ae696=_0x30ca7d[_0x50a656(0x119)]?.['every'](_0x4e035b=>!!_0x4e035b[_0x50a656(0xc1)])??![];!_0x336f00&&!_0x2ae696&&_0x57832e[_0x50a656(0xf1)]({'level':_0x50a656(0xa8),'path':_0x50a656(0xc1),'code':_0x50a656(0x6f),'message':_0x50a656(0x99),'location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3[_0x50a656(0x86)],[_0x50a656(0xc1)])});const _0x444375=_0x30ca7d[_0x50a656(0x119)]??_0x30ca7d[_0x50a656(0xca)];if(_0x444375&&_0x444375[_0x50a656(0x114)](_0x44677f=>_0x44677f[_0x50a656(0x10f)]===!![])[_0x50a656(0xf6)]>0x1){const _0x5f21c6=_0x30ca7d[_0x50a656(0x119)]?_0x50a656(0x119):_0x50a656(0xca);_0x1e8942[_0x50a656(0xf1)]({'level':_0x50a656(0xee),'path':_0x5f21c6,'code':'DUPLICATE_LATEST','message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x5f21c6==='journeys'?_0x50a656(0x102):_0x50a656(0xcb))+_0x50a656(0x75),'location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3['source'],[_0x5f21c6])});}if(_0x30ca7d['journeys']&&_0x30ca7d[_0x50a656(0x119)][_0x50a656(0xf6)]>0x0)for(let _0xb4c75c=0x0;_0xb4c75c<_0x30ca7d[_0x50a656(0x119)][_0x50a656(0xf6)];_0xb4c75c++){const _0x44f5c5=_0x30ca7d[_0x50a656(0x119)][_0xb4c75c];if(_0x30ca7d['journeys'][_0x50a656(0xf6)]>0x1&&_0x44f5c5['state']==='launched')continue;const _0x31ca81=_0x44f5c5[_0x50a656(0x89)]||[],_0xac3471=_0x50a656(0x74)+_0xb4c75c+'].',_0x1a351d=!!_0x44f5c5['goal'],_0x4912f1=_0x1a351d?{..._0x30ca7d,'goal':_0x44f5c5[_0x50a656(0xc1)]}:_0x30ca7d;validateStagesForVersion(_0x31ca81,_0x4912f1,_0x318a4f,_0xac3471,_0x1e8942,_0x57832e,{'goalIsInherited':!_0x1a351d});}else{if(_0x30ca7d[_0x50a656(0xca)]&&_0x30ca7d[_0x50a656(0xca)][_0x50a656(0xf6)]>0x0)for(let _0x3ad423=0x0;_0x3ad423<_0x30ca7d['versions'][_0x50a656(0xf6)];_0x3ad423++){const _0x1d7b9c=_0x30ca7d[_0x50a656(0xca)][_0x3ad423];if(_0x30ca7d['versions'][_0x50a656(0xf6)]>0x1&&_0x1d7b9c['state']==='launched')continue;const _0xc47956=_0x1d7b9c['stages']||[],_0x1ee228='versions['+_0x3ad423+'].';validateStagesForVersion(_0xc47956,_0x30ca7d,_0x318a4f,_0x1ee228,_0x1e8942,_0x57832e);}else{const _0x332e0d=_0x30ca7d[_0x50a656(0x89)]||[];validateStagesForVersion(_0x332e0d,_0x30ca7d,_0x318a4f,'',_0x1e8942,_0x57832e);}}_0x30ca7d['journeys']&&_0x30ca7d[_0x50a656(0x119)][_0x50a656(0xf6)]>0x1&&(deduplicateAcrossVersions(_0x1e8942),deduplicateAcrossVersions(_0x57832e));for(const _0x217c67 of _0x20c88f){!_0xbf43c['has'](_0x217c67)&&!_0x217c67[_0x50a656(0x106)]('excluded_')&&_0x57832e[_0x50a656(0xf1)]({'level':'warning','path':_0x50a656(0xbd)+_0x217c67,'code':_0x50a656(0x11b),'message':'Embedded\x20segment\x20\x27'+_0x217c67+_0x50a656(0x110),'location':getLocationFromPath(_0x1c19d3[_0x50a656(0xe4)],_0x1c19d3['source'],[_0x50a656(0xac),_0x217c67])});}return{'valid':_0x1e8942[_0x50a656(0xf6)]===0x0,'errors':_0x1e8942,'warnings':_0x57832e};}
|