@treasuredata/tdx 0.28.4 → 0.28.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.
Files changed (179) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/constants.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/core/version.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/mcp/server.js +1 -1
  64. package/dist/mcp/tools/index.js +1 -1
  65. package/dist/mcp/tools/tdx-run.js +1 -1
  66. package/dist/mcp/tools/tdx-search.js +1 -1
  67. package/dist/mcp/utils.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/passthrough-server.js +1 -1
  70. package/dist/proxy/sse-usage-parser.js +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  73. package/dist/sdk/agent/agent-yaml.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/agent/tool-target-registry.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/delivery-api-client.js +1 -1
  83. package/dist/sdk/client/endpoints.js +1 -1
  84. package/dist/sdk/client/engage-api-client.js +1 -1
  85. package/dist/sdk/client/http-client.js +1 -1
  86. package/dist/sdk/client/llm-api-client.js +1 -1
  87. package/dist/sdk/client/rate-limiter.js +1 -1
  88. package/dist/sdk/client/td-api-client.js +1 -1
  89. package/dist/sdk/client/trino-api-client.js +1 -1
  90. package/dist/sdk/client/workflow-client.js +1 -1
  91. package/dist/sdk/connection-validator.js +1 -1
  92. package/dist/sdk/connection.js +1 -1
  93. package/dist/sdk/delivery.js +1 -1
  94. package/dist/sdk/engage/campaign-pull.js +1 -1
  95. package/dist/sdk/engage/campaign-push.js +1 -1
  96. package/dist/sdk/engage/campaign-validator.js +1 -1
  97. package/dist/sdk/engage/campaign-yaml.js +1 -1
  98. package/dist/sdk/engage/types/campaign-def.js +1 -1
  99. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-factors.js +1 -1
  111. package/dist/sdk/personalization.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/realtime.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-validator.js +1 -1
  121. package/dist/sdk/segment/journey-yaml.js +1 -1
  122. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  123. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  124. package/dist/sdk/segment/pull-workflow.js +1 -1
  125. package/dist/sdk/segment/push-recovery.js +1 -1
  126. package/dist/sdk/segment/push-workflow.js +1 -1
  127. package/dist/sdk/segment/resolution-context.js +1 -1
  128. package/dist/sdk/segment/segment-path-parser.js +1 -1
  129. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  130. package/dist/sdk/segment/target-resolution.js +1 -1
  131. package/dist/sdk/segment/tdx-config.js +1 -1
  132. package/dist/sdk/segment/validate-files.js +1 -1
  133. package/dist/sdk/segment/yaml-validator.js +1 -1
  134. package/dist/sdk/segment.js +1 -1
  135. package/dist/sdk/types/index.js +1 -1
  136. package/dist/sdk/types/progress.js +1 -1
  137. package/dist/sdk/user.js +1 -1
  138. package/dist/sdk/util/format-detector.js +1 -1
  139. package/dist/sdk/util/formatters.js +1 -1
  140. package/dist/sdk/util/index.js +1 -1
  141. package/dist/sdk/util/tree-formatter.js +1 -1
  142. package/dist/sdk/workflow/archive-validation.js +1 -1
  143. package/dist/sdk/workflow/clone-workflow.js +1 -1
  144. package/dist/sdk/workflow/index.js +1 -1
  145. package/dist/sdk/workflow/pull-workflow.js +1 -1
  146. package/dist/sdk/workflow/push-workflow.js +1 -1
  147. package/dist/sdk/workflow/tdx-config.js +1 -1
  148. package/dist/sdk/workflow/workflow-utils.js +1 -1
  149. package/dist/test-utils/command-runner.js +1 -1
  150. package/dist/test-utils/factories.js +1 -1
  151. package/dist/test-utils/fixtures.js +1 -1
  152. package/dist/test-utils/http-mock.js +1 -1
  153. package/dist/test-utils/index.js +1 -1
  154. package/dist/utils/async.js +1 -1
  155. package/dist/utils/colors.js +1 -1
  156. package/dist/utils/diff.js +1 -1
  157. package/dist/utils/file-permissions.js +1 -1
  158. package/dist/utils/global-cache.js +1 -1
  159. package/dist/utils/json-loader.js +1 -1
  160. package/dist/utils/local-cache.js +1 -1
  161. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  162. package/dist/utils/logger/formatters/index.js +1 -1
  163. package/dist/utils/logger/handlers/console-handler.js +1 -1
  164. package/dist/utils/logger/handlers/file-handler.js +1 -1
  165. package/dist/utils/logger/handlers/index.js +1 -1
  166. package/dist/utils/logger/handlers/null-handler.js +1 -1
  167. package/dist/utils/logger/index.js +1 -1
  168. package/dist/utils/logger/logger.js +1 -1
  169. package/dist/utils/logger/types.js +1 -1
  170. package/dist/utils/option-validation.js +1 -1
  171. package/dist/utils/process.js +1 -1
  172. package/dist/utils/prompt.js +1 -1
  173. package/dist/utils/spinner.js +1 -1
  174. package/dist/utils/sse-parser.js +1 -1
  175. package/dist/utils/string-utils.js +1 -1
  176. package/dist/utils/table-ref-parser.js +1 -1
  177. package/dist/utils/tdx-logger.js +1 -1
  178. package/dist/utils/version-check.js +1 -1
  179. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x11c0fe,_0x273d21){const _0xfce4ec=a119_0xb16c,_0x273eba=_0x11c0fe();while(!![]){try{const _0x442e26=parseInt(_0xfce4ec(0x1ed))/0x1+-parseInt(_0xfce4ec(0x1f3))/0x2+parseInt(_0xfce4ec(0x1ea))/0x3+parseInt(_0xfce4ec(0x1e8))/0x4+parseInt(_0xfce4ec(0x1f1))/0x5*(parseInt(_0xfce4ec(0x1e3))/0x6)+parseInt(_0xfce4ec(0x1ec))/0x7+-parseInt(_0xfce4ec(0x1f2))/0x8;if(_0x442e26===_0x273d21)break;else _0x273eba['push'](_0x273eba['shift']());}catch(_0x385d79){_0x273eba['push'](_0x273eba['shift']());}}}(a119_0x1b6c,0xa785d));import{readdirSync,statSync}from'fs';import a119_0x296306 from'path';export function findYamlFiles(_0x349472){const _0x2c1a9a=[];function _0x19864e(_0x2cb172){const _0x1a48bd=a119_0xb16c,_0x2f30d5=readdirSync(_0x2cb172,{'withFileTypes':!![]});for(const _0x79af04 of _0x2f30d5){const _0x18b9a0=a119_0x296306[_0x1a48bd(0x1ee)](_0x2cb172,_0x79af04[_0x1a48bd(0x1e6)]);if(_0x79af04['isDirectory']())_0x19864e(_0x18b9a0);else(_0x79af04['name'][_0x1a48bd(0x1e9)](_0x1a48bd(0x1e4))||_0x79af04[_0x1a48bd(0x1e6)]['endsWith'](_0x1a48bd(0x1ef)))&&_0x2c1a9a[_0x1a48bd(0x1f0)](_0x18b9a0);}}return _0x19864e(_0x349472),_0x2c1a9a;}export function discoverYamlFiles(_0x49ae8f){const _0x339c7a=a119_0xb16c,_0x59b21f=findYamlFiles(_0x49ae8f);return _0x59b21f[_0x339c7a(0x1eb)](_0x5680fa=>{const _0xf5b14f=_0x339c7a,_0x1ce6b0=a119_0x296306[_0xf5b14f(0x1e5)](_0x49ae8f,_0x5680fa),_0x581dbe=a119_0x296306['dirname'](_0x1ce6b0);return{'absolutePath':_0x5680fa,'relativePath':_0x1ce6b0,'folderPath':_0x581dbe==='.'?'':_0x581dbe};});}export function isYamlFile(_0x293518){const _0x55e186=a119_0xb16c;try{const _0x52aec5=statSync(_0x293518);if(!_0x52aec5[_0x55e186(0x1e7)]())return![];const _0x545cee=a119_0x296306['extname'](_0x293518)[_0x55e186(0x1f4)]();return _0x545cee==='.yml'||_0x545cee===_0x55e186(0x1ef);}catch{return![];}}function a119_0xb16c(_0x3c442f,_0xc9cb09){_0x3c442f=_0x3c442f-0x1e3;const _0x1b6ccf=a119_0x1b6c();let _0xb16c49=_0x1b6ccf[_0x3c442f];return _0xb16c49;}function a119_0x1b6c(){const _0x39d7ff=['push','40SIqRki','30440120pDKwZe','267076xMzhxG','toLowerCase','904458BIayKP','.yml','relative','name','isFile','1453192GLDsQp','endsWith','3040659gCUBDA','map','7987980KtbLRs','900791dGwoao','join','.yaml'];a119_0x1b6c=function(){return _0x39d7ff;};return a119_0x1b6c();}
1
+ (function(_0x50fd2d,_0x278f46){const _0x58e792=a119_0x3c62,_0x5d295a=_0x50fd2d();while(!![]){try{const _0x2aa0c0=-parseInt(_0x58e792(0x19d))/0x1+-parseInt(_0x58e792(0x1ab))/0x2+-parseInt(_0x58e792(0x1a5))/0x3*(-parseInt(_0x58e792(0x1a1))/0x4)+-parseInt(_0x58e792(0x1a2))/0x5+-parseInt(_0x58e792(0x19a))/0x6*(-parseInt(_0x58e792(0x198))/0x7)+-parseInt(_0x58e792(0x1a3))/0x8+-parseInt(_0x58e792(0x19e))/0x9*(-parseInt(_0x58e792(0x19c))/0xa);if(_0x2aa0c0===_0x278f46)break;else _0x5d295a['push'](_0x5d295a['shift']());}catch(_0x165dcc){_0x5d295a['push'](_0x5d295a['shift']());}}}(a119_0x394b,0x84971));import{readdirSync,statSync}from'fs';function a119_0x394b(){const _0x57581b=['772272jZbCsN','dirname','3327LLtzfk','isDirectory','isFile','map','name','endsWith','67662cozCtb','1320298DNUFxp','.yml','24oMPnlT','join','1938470Fydpfy','881876zuEnew','63GNOAHZ','push','.yaml','1556PuiblG','4937280JamuxG'];a119_0x394b=function(){return _0x57581b;};return a119_0x394b();}function a119_0x3c62(_0x5b6354,_0xfa522f){_0x5b6354=_0x5b6354-0x198;const _0x394b1c=a119_0x394b();let _0x3c6292=_0x394b1c[_0x5b6354];return _0x3c6292;}import a119_0x5e5b42 from'path';export function findYamlFiles(_0x129cec){const _0x12cd14=[];function _0x1a3c9c(_0x3341e2){const _0x49c213=a119_0x3c62,_0x7b28b9=readdirSync(_0x3341e2,{'withFileTypes':!![]});for(const _0x26259a of _0x7b28b9){const _0x39f01b=a119_0x5e5b42[_0x49c213(0x19b)](_0x3341e2,_0x26259a[_0x49c213(0x1a9)]);if(_0x26259a[_0x49c213(0x1a6)]())_0x1a3c9c(_0x39f01b);else(_0x26259a[_0x49c213(0x1a9)][_0x49c213(0x1aa)](_0x49c213(0x199))||_0x26259a['name'][_0x49c213(0x1aa)](_0x49c213(0x1a0)))&&_0x12cd14[_0x49c213(0x19f)](_0x39f01b);}}return _0x1a3c9c(_0x129cec),_0x12cd14;}export function discoverYamlFiles(_0x29cda3){const _0x41abbe=a119_0x3c62,_0x27d2de=findYamlFiles(_0x29cda3);return _0x27d2de[_0x41abbe(0x1a8)](_0xd6a6cd=>{const _0x2b484b=_0x41abbe,_0x3296ca=a119_0x5e5b42['relative'](_0x29cda3,_0xd6a6cd),_0x15d76a=a119_0x5e5b42[_0x2b484b(0x1a4)](_0x3296ca);return{'absolutePath':_0xd6a6cd,'relativePath':_0x3296ca,'folderPath':_0x15d76a==='.'?'':_0x15d76a};});}export function isYamlFile(_0x4da515){const _0x30aaf9=a119_0x3c62;try{const _0x1ce65a=statSync(_0x4da515);if(!_0x1ce65a[_0x30aaf9(0x1a7)]())return![];const _0x4e5873=a119_0x5e5b42['extname'](_0x4da515)['toLowerCase']();return _0x4e5873===_0x30aaf9(0x199)||_0x4e5873===_0x30aaf9(0x1a0);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x30f0cd,_0x44a170){const _0x3507c9=a120_0x47aa,_0x13458c=_0x30f0cd();while(!![]){try{const _0xf4fc44=-parseInt(_0x3507c9(0x19d))/0x1*(parseInt(_0x3507c9(0x184))/0x2)+parseInt(_0x3507c9(0x181))/0x3+parseInt(_0x3507c9(0x177))/0x4*(-parseInt(_0x3507c9(0x162))/0x5)+parseInt(_0x3507c9(0x18d))/0x6*(-parseInt(_0x3507c9(0x1b6))/0x7)+-parseInt(_0x3507c9(0x165))/0x8+-parseInt(_0x3507c9(0x17b))/0x9*(-parseInt(_0x3507c9(0x19f))/0xa)+parseInt(_0x3507c9(0x194))/0xb;if(_0xf4fc44===_0x44a170)break;else _0x13458c['push'](_0x13458c['shift']());}catch(_0x52e7ac){_0x13458c['push'](_0x13458c['shift']());}}}(a120_0x3d45,0x6a1e2));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x4682b4){const _0x27cf7f=a120_0x47aa;return _0x4682b4[_0x27cf7f(0x16b)]()[_0x27cf7f(0x168)](/\s+/g,'_')[_0x27cf7f(0x168)](/[^a-z0-9_]/g,'')[_0x27cf7f(0x168)](/_+/g,'_')[_0x27cf7f(0x168)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x31e194){const _0x512a47=a120_0x47aa,_0x467717=_0x31e194[_0x512a47(0x16c)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x467717){const _0x128e9c=_0x467717[0x1][_0x512a47(0x16b)](),_0x4c49a9=_0x467717[0x2],_0x11e17f=_0x4c49a9[_0x512a47(0x168)](/-/g,'')[_0x512a47(0x192)](0x0,0x4)[_0x512a47(0x16b)]();return _0x128e9c+'_'+_0x11e17f;}const _0x128f5c=_0x31e194[_0x512a47(0x16c)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x128f5c){const _0x22b524=_0x128f5c[0x1],_0x45b3e4=_0x128f5c[0x2]['toLowerCase'](),_0x2afe63=_0x22b524[_0x512a47(0x168)](/-/g,'')['slice'](0x0,0x4)[_0x512a47(0x16b)]();return _0x45b3e4+'_'+_0x2afe63;}return undefined;}function a120_0x3d45(){const _0x132e93=['conditions','entries','attributes','type','slice','stages','24424510NCSzvN','journeys','all_columns','exclude','activations','schedule','with','bundle_id','sort','1ebHXfC','name','559120cOzTOw','item','string','description','.yml','journey','state','journeyStages','latest','null','versionNumber','startsWith','trim','exit_criteria','stringify','decision_point','find','activation_template_id','milestone','some','connector_config','join','wait','5410321AqDGaK','entry_criteria','launched','version_number','9495YsSKGd','has','map','3037352KMfkAd','activation','length','replace','from','versions','toLowerCase','match','segment','endsWith','draft','version','.yaml','branches','values','set','rule','include','316MwzPEk','goal','keys','push','9YAgBXH','steps','get','reentry','segments','yaml','41064ePiOTJ','journeyBundleName','object','1105518siHQEm','connection','condition','bundle_name','nameMapping','index','notification','isArray','columns','6DMRxUC'];a120_0x3d45=function(){return _0x132e93;};return a120_0x3d45();}function a120_0x47aa(_0x1c1316,_0x23d638){_0x1c1316=_0x1c1316-0x15f;const _0x3d45d9=a120_0x3d45();let _0x47aa44=_0x3d45d9[_0x1c1316];return _0x47aa44;}function stableStringify(_0x139f7d){const _0x59b4f2=a120_0x47aa;if(Array[_0x59b4f2(0x18b)](_0x139f7d))return'['+_0x139f7d[_0x59b4f2(0x164)](_0x552eb6=>stableStringify(_0x552eb6))[_0x59b4f2(0x1b4)](',')+']';if(_0x139f7d&&typeof _0x139f7d==='object'){const _0x511ab9=_0x139f7d,_0x4ebd4c=Object[_0x59b4f2(0x179)](_0x511ab9)[_0x59b4f2(0x19c)](),_0x41ca9d=_0x4ebd4c[_0x59b4f2(0x164)](_0x20086a=>'\x22'+_0x20086a+'\x22:'+stableStringify(_0x511ab9[_0x20086a]));return'{'+_0x41ca9d[_0x59b4f2(0x1b4)](',')+'}';}const _0x6faf=JSON[_0x59b4f2(0x1ad)](_0x139f7d);return _0x6faf===undefined?_0x59b4f2(0x1a8):_0x6faf;}export function consolidateActivationsByContent(_0x7314d6){const _0x4425ba=a120_0x47aa,_0x8021d4={},_0x22f0d3=new Map(),_0x3b270c=new Map();for(const _0x330e79 of _0x7314d6){if(!_0x330e79)continue;for(const [_0x467a5e,_0x226ffc]of Object[_0x4425ba(0x18f)](_0x330e79)){const _0x13365c={'connection':_0x226ffc[_0x4425ba(0x185)],..._0x226ffc[_0x4425ba(0x196)]!==undefined&&{'all_columns':_0x226ffc['all_columns']},..._0x226ffc[_0x4425ba(0x18c)]!==undefined&&{'columns':_0x226ffc[_0x4425ba(0x18c)]},..._0x226ffc['behavior']!==undefined&&{'behavior':_0x226ffc['behavior']},..._0x226ffc[_0x4425ba(0x199)]!==undefined&&{'schedule':_0x226ffc[_0x4425ba(0x199)]},..._0x226ffc[_0x4425ba(0x18a)]!==undefined&&{'notification':_0x226ffc['notification']},..._0x226ffc[_0x4425ba(0x1b3)]!==undefined&&{'connector_config':_0x226ffc[_0x4425ba(0x1b3)]},..._0x226ffc[_0x4425ba(0x1b0)]!==undefined&&{'activation_template_id':_0x226ffc[_0x4425ba(0x1b0)]}},_0x4c7930=stableStringify(_0x13365c),_0x4c9333=_0x3b270c[_0x4425ba(0x17d)](_0x4c7930);_0x4c9333?_0x22f0d3['set'](_0x467a5e,_0x4c9333):(_0x8021d4[_0x467a5e]=_0x226ffc,_0x22f0d3[_0x4425ba(0x174)](_0x467a5e,_0x467a5e),_0x3b270c[_0x4425ba(0x174)](_0x4c7930,_0x467a5e));}}return{'merged':_0x8021d4,'nameMapping':_0x22f0d3};}export function updateActivationReferences(_0x150214,_0x42c047){const _0x31bd35=a120_0x47aa;if(!_0x150214)return;for(const _0x2d3137 of _0x150214){if(!_0x2d3137[_0x31bd35(0x17c)])continue;for(const _0x44d794 of _0x2d3137[_0x31bd35(0x17c)]){if(_0x44d794[_0x31bd35(0x191)]===_0x31bd35(0x166)&&_0x44d794['with']?.['activation']){const _0x2ba12d=_0x42c047['get'](_0x44d794[_0x31bd35(0x19a)][_0x31bd35(0x166)]);_0x2ba12d&&_0x2ba12d!==_0x44d794[_0x31bd35(0x19a)][_0x31bd35(0x166)]&&(_0x44d794[_0x31bd35(0x19a)][_0x31bd35(0x166)]=_0x2ba12d);}}}}export function consolidateSegmentsByContent(_0x3cd645,_0x5f45d4){const _0x349909=a120_0x47aa,_0x16ff65={},_0x15dc85=new Map(),_0x2b2d73=new Map();for(const _0x59643b of _0x3cd645){if(!_0x59643b)continue;for(const [_0x49c5fe,_0x128fba]of Object[_0x349909(0x18f)](_0x59643b)){if(!_0x128fba['rule']){_0x16ff65[_0x49c5fe]=_0x128fba,_0x15dc85[_0x349909(0x174)](_0x49c5fe,_0x49c5fe);continue;}const _0x440c3f=_0x128fba['description']&&_0x128fba[_0x349909(0x1a2)][_0x349909(0x1ab)]()?_0x128fba[_0x349909(0x1a2)]:undefined,_0x64a331=JSON[_0x349909(0x1ad)]({'description':_0x440c3f,'rule':deepSortObject(_0x128fba[_0x349909(0x175)])}),_0x1c6d43=_0x2b2d73['get'](_0x64a331);if(_0x1c6d43){const _0x548a68={..._0x128fba['description']!==undefined&&{'description':_0x128fba[_0x349909(0x1a2)]},'rule':_0x128fba[_0x349909(0x175)]?deepSortObject(_0x128fba[_0x349909(0x175)]):_0x128fba['rule']};if(_0x49c5fe<_0x1c6d43){_0x16ff65[_0x49c5fe]=_0x548a68,delete _0x16ff65[_0x1c6d43];for(const [_0x35fb8f,_0x448a77]of _0x15dc85['entries']()){_0x448a77===_0x1c6d43&&_0x15dc85[_0x349909(0x174)](_0x35fb8f,_0x49c5fe);}_0x15dc85[_0x349909(0x174)](_0x49c5fe,_0x49c5fe),_0x2b2d73[_0x349909(0x174)](_0x64a331,_0x49c5fe);}else _0x16ff65[_0x1c6d43]=_0x548a68,_0x15dc85[_0x349909(0x174)](_0x49c5fe,_0x1c6d43);}else{let _0x467310=_0x49c5fe;if(_0x5f45d4){const _0x33b93d=_0x5f45d4[_0x349909(0x17d)](_0x64a331);_0x33b93d&&_0x33b93d[_0x349909(0x167)]>0x0&&(_0x467310=_0x33b93d['slice']()['sort']()[0x0]);}const _0x4c63f6={..._0x128fba[_0x349909(0x1a2)]!==undefined&&{'description':_0x128fba[_0x349909(0x1a2)]},'rule':_0x128fba[_0x349909(0x175)]?deepSortObject(_0x128fba[_0x349909(0x175)]):_0x128fba['rule']};_0x16ff65[_0x467310]=_0x4c63f6,_0x15dc85[_0x349909(0x174)](_0x49c5fe,_0x467310),_0x2b2d73[_0x349909(0x174)](_0x64a331,_0x467310);}}}return{'merged':_0x16ff65,'nameMapping':_0x15dc85};}export function updateSegmentReferences(_0x38aa98,_0x2f7180){const _0x585cb7=a120_0x47aa;if(!_0x38aa98)return;for(const _0x27f53b of _0x38aa98){if(_0x27f53b[_0x585cb7(0x15f)]?.[_0x585cb7(0x16d)]){const _0x32782a=_0x2f7180[_0x585cb7(0x17d)](_0x27f53b[_0x585cb7(0x15f)][_0x585cb7(0x16d)]);_0x32782a&&(_0x27f53b[_0x585cb7(0x15f)][_0x585cb7(0x16d)]=_0x32782a);}if(_0x27f53b[_0x585cb7(0x1ac)])for(const _0x1c86a6 of _0x27f53b[_0x585cb7(0x1ac)]){if(_0x1c86a6[_0x585cb7(0x16d)]){const _0x55c29b=_0x2f7180['get'](_0x1c86a6[_0x585cb7(0x16d)]);_0x55c29b&&(_0x1c86a6[_0x585cb7(0x16d)]=_0x55c29b);}}if(_0x27f53b[_0x585cb7(0x1b1)]?.[_0x585cb7(0x16d)]){const _0x1db4aa=_0x2f7180[_0x585cb7(0x17d)](_0x27f53b['milestone'][_0x585cb7(0x16d)]);_0x1db4aa&&(_0x27f53b[_0x585cb7(0x1b1)][_0x585cb7(0x16d)]=_0x1db4aa);}if(_0x27f53b[_0x585cb7(0x17c)])for(const _0x105dc5 of _0x27f53b[_0x585cb7(0x17c)]){if(_0x105dc5[_0x585cb7(0x191)]===_0x585cb7(0x1ae)&&_0x105dc5[_0x585cb7(0x19a)]?.['branches'])for(const _0x30a42f of _0x105dc5['with'][_0x585cb7(0x172)]){if(_0x30a42f['segment']){const _0x392f47=_0x2f7180[_0x585cb7(0x17d)](_0x30a42f['segment']);_0x392f47&&(_0x30a42f[_0x585cb7(0x16d)]=_0x392f47);}}if(_0x105dc5[_0x585cb7(0x191)]===_0x585cb7(0x1b5)&&_0x105dc5[_0x585cb7(0x19a)]?.[_0x585cb7(0x186)]?.[_0x585cb7(0x16d)]){const _0x1b9f7d=_0x2f7180[_0x585cb7(0x17d)](_0x105dc5[_0x585cb7(0x19a)][_0x585cb7(0x186)]['segment']);_0x1b9f7d&&(_0x105dc5['with'][_0x585cb7(0x186)][_0x585cb7(0x16d)]=_0x1b9f7d);}}}}export function updateSegmentRefsInSegments(_0x219ea,_0x473b7a){const _0x5303c9=a120_0x47aa;for(const _0x1bc1ce of Object[_0x5303c9(0x173)](_0x219ea)){_0x1bc1ce[_0x5303c9(0x175)]&&updateSegmentRefsInRule(_0x1bc1ce[_0x5303c9(0x175)],_0x473b7a);}}function updateSegmentRefsInRule(_0x4814b2,_0x107ce3){const _0x1a645b=a120_0x47aa;if(_0x4814b2===null||typeof _0x4814b2!==_0x1a645b(0x183))return;if(Array[_0x1a645b(0x18b)](_0x4814b2)){for(const _0x49db0c of _0x4814b2){updateSegmentRefsInRule(_0x49db0c,_0x107ce3);}return;}const _0x196914=_0x4814b2;if((_0x196914['type']===_0x1a645b(0x176)||_0x196914[_0x1a645b(0x191)]===_0x1a645b(0x197))&&typeof _0x196914['segment']===_0x1a645b(0x1a1)){const _0x76a05b=_0x107ce3['get'](_0x196914['segment']);_0x76a05b&&(_0x196914[_0x1a645b(0x16d)]=_0x76a05b);}if(_0x196914[_0x1a645b(0x18e)]&&Array[_0x1a645b(0x18b)](_0x196914['conditions']))for(const _0x202897 of _0x196914[_0x1a645b(0x18e)]){updateSegmentRefsInRule(_0x202897,_0x107ce3);}}export function buildJourneysArray(_0x2d0007){const _0x22ac46=a120_0x47aa,_0x3e70f2=Math['max'](..._0x2d0007[_0x22ac46(0x164)](_0x5f7a0=>_0x5f7a0[_0x22ac46(0x1a0)][_0x22ac46(0x1a9)]||0x0));return _0x2d0007[_0x22ac46(0x164)](_0x361595=>{const _0x4ffe34=_0x22ac46,_0x121458=(_0x361595['item']['versionNumber']||0x0)===_0x3e70f2,_0x358604=_0x361595[_0x4ffe34(0x180)][_0x4ffe34(0x195)]?.[0x0],_0x3cc8d5=_0x358604?.[_0x4ffe34(0x178)]||_0x361595[_0x4ffe34(0x180)][_0x4ffe34(0x178)],_0x434aae={'version':_0x358604?.[_0x4ffe34(0x170)]||_0x361595[_0x4ffe34(0x180)][_0x4ffe34(0x170)]||_0x361595[_0x4ffe34(0x1a0)]['name'],'state':_0x361595['item'][_0x4ffe34(0x1a5)]===_0x4ffe34(0x160)?_0x4ffe34(0x160):_0x4ffe34(0x16f),'stages':_0x358604?.[_0x4ffe34(0x193)]||_0x361595[_0x4ffe34(0x180)][_0x4ffe34(0x193)]||[],'id':_0x358604?.['id']||_0x361595['yaml']['id'],'version_number':_0x358604?.[_0x4ffe34(0x161)]||_0x361595[_0x4ffe34(0x180)][_0x4ffe34(0x161)]};return _0x3cc8d5&&(_0x434aae[_0x4ffe34(0x178)]=_0x3cc8d5),_0x121458&&(_0x434aae[_0x4ffe34(0x1a7)]=!![]),_0x434aae;});}export function buildMergedJourneyDef(_0x1970a1,_0x578b38){const _0x14d1ef=a120_0x47aa,_0x50e2e0=_0x1970a1[0x0][_0x14d1ef(0x180)],_0x24edb5=buildJourneysArray(_0x1970a1),{merged:_0x21891e,nameMapping:_0xa02ebb}=consolidateSegmentsByContent(_0x1970a1[_0x14d1ef(0x164)](_0x26e42a=>_0x26e42a[_0x14d1ef(0x180)][_0x14d1ef(0x17f)]),_0x578b38);updateSegmentRefsInSegments(_0x21891e,_0xa02ebb);const _0x586f36=Array[_0x14d1ef(0x169)](_0xa02ebb[_0x14d1ef(0x18f)]())[_0x14d1ef(0x1b2)](([_0x1eb695,_0x2c17c9])=>_0x1eb695!==_0x2c17c9&&_0x1eb695[_0x14d1ef(0x1aa)](_0x14d1ef(0x15f)));let _0x222391=_0x21891e,_0x5443a1=new Map();if(_0x586f36){const _0x21d607=consolidateSegmentsByContent([_0x21891e],_0x578b38);_0x222391=_0x21d607['merged'],_0x5443a1=_0x21d607[_0x14d1ef(0x188)];}const _0x394769=new Map(_0xa02ebb);for(const [_0x551fe7,_0x1f1612]of _0x5443a1[_0x14d1ef(0x18f)]()){_0x394769['set'](_0x551fe7,_0x1f1612);}for(const [_0x5182b3,_0x10d18a]of _0x394769[_0x14d1ef(0x18f)]()){let _0x3d909b=_0x10d18a,_0x18a7b4=0x0;while(_0x394769[_0x14d1ef(0x163)](_0x3d909b)&&_0x394769[_0x14d1ef(0x17d)](_0x3d909b)!==_0x3d909b&&_0x18a7b4<MAX_MAPPING_CHAIN_DEPTH){_0x3d909b=_0x394769[_0x14d1ef(0x17d)](_0x3d909b),_0x18a7b4++;}_0x3d909b!==_0x10d18a&&_0x394769[_0x14d1ef(0x174)](_0x5182b3,_0x3d909b);}for(const _0x2157a9 of _0x24edb5){updateSegmentReferences(_0x2157a9['stages'],_0x394769);}const {merged:_0x50d9e1,nameMapping:_0x10cac8}=consolidateActivationsByContent(_0x1970a1[_0x14d1ef(0x164)](_0x5c7e70=>_0x5c7e70[_0x14d1ef(0x180)][_0x14d1ef(0x198)]));for(const _0x5f24ad of _0x24edb5){updateActivationReferences(_0x5f24ad[_0x14d1ef(0x193)],_0x10cac8);}let _0x264d7d=_0x50e2e0[_0x14d1ef(0x178)];if(_0x264d7d?.[_0x14d1ef(0x16d)]){const _0x5ce81a=_0x394769[_0x14d1ef(0x17d)](_0x264d7d[_0x14d1ef(0x16d)]);_0x5ce81a&&(_0x264d7d={..._0x264d7d,'segment':_0x5ce81a});}for(const _0x2d7cce of _0x24edb5){if(_0x2d7cce[_0x14d1ef(0x178)]?.[_0x14d1ef(0x16d)]){const _0x36886f=_0x394769[_0x14d1ef(0x17d)](_0x2d7cce['goal']['segment']);_0x36886f&&(_0x2d7cce[_0x14d1ef(0x178)]={..._0x2d7cce['goal'],'segment':_0x36886f});}}return _0x24edb5[_0x14d1ef(0x1b2)](_0x44bbb4=>_0x44bbb4[_0x14d1ef(0x178)])&&(_0x264d7d=undefined),{'type':_0x14d1ef(0x1a4),'name':_0x50e2e0['name'],'description':_0x50e2e0['description'],'goal':_0x264d7d,'reentry':_0x50e2e0[_0x14d1ef(0x17e)],'segments':Object[_0x14d1ef(0x179)](_0x222391)[_0x14d1ef(0x167)]>0x0?_0x222391:undefined,'activations':Object[_0x14d1ef(0x179)](_0x50d9e1)['length']>0x0?_0x50d9e1:undefined,'journeys':_0x24edb5,'bundle_id':_0x50e2e0[_0x14d1ef(0x19b)],'bundle_name':_0x50e2e0[_0x14d1ef(0x187)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x25e888,_0x41aa04,_0x312f24,_0xfe97f1){const _0x48295b=a120_0x47aa,_0x1d5836=_0x25e888+':'+_0x41aa04,_0x40bfcb=_0x312f24[_0x48295b(0x17d)](_0x1d5836);if(_0x40bfcb)return _0x40bfcb;const _0x290bb3=await _0xfe97f1(_0x25e888),_0x235cac=_0x290bb3[_0x48295b(0x190)][_0x48295b(0x182)]||_0x290bb3[_0x48295b(0x190)][_0x48295b(0x19e)],_0x38b82d=_0x290bb3['attributes'][_0x48295b(0x1a6)][_0x48295b(0x1af)](_0x11f668=>String(_0x11f668['id'])===String(_0x41aa04)),_0x48a807=_0x38b82d?.[_0x48295b(0x19e)]||_0x41aa04,_0x2f57e4={'journeyName':_0x235cac,'stageName':_0x48a807};return _0x312f24['set'](_0x1d5836,_0x2f57e4),_0x2f57e4;}export function formatApiJourneyName(_0x51d48a,_0x103e5e){return _0x103e5e+'\x20('+_0x51d48a+')';}export function isLocalJourneyRef(_0x322fdc){const _0x4b8f1d=a120_0x47aa;return _0x322fdc[_0x4b8f1d(0x16e)](_0x4b8f1d(0x1a3))||_0x322fdc[_0x4b8f1d(0x16e)](_0x4b8f1d(0x171));}export function buildLocalRuleToNameMapping(_0x4a8a6b){const _0x411476=a120_0x47aa,_0x1d4118=new Map();if(!_0x4a8a6b)return _0x1d4118;for(const [_0x57e254,_0x2b349a]of Object['entries'](_0x4a8a6b)){if(_0x2b349a[_0x411476(0x175)]){const _0x3d4928=serializeRule(_0x2b349a['rule']),_0x5e2e38=_0x1d4118[_0x411476(0x17d)](_0x3d4928)||[];_0x5e2e38['push'](_0x57e254),_0x1d4118['set'](_0x3d4928,_0x5e2e38);}}return _0x1d4118;}export function buildLocalRuleToNameMappingFromJourney(_0x44b9e6){const _0x41a966=a120_0x47aa,_0x4f1338=_0x44b9e6['segments'];if(!_0x4f1338)return new Map();const _0x5cefa1=collectSegmentUsageCounts(_0x44b9e6),_0x14b9b8=new Map();let _0x3897a9=0x0;for(const [_0x21956e,_0x21a304]of Object['entries'](_0x4f1338)){if(!_0x21a304[_0x41a966(0x175)]){_0x3897a9++;continue;}const _0x23c89b=serializeRule(_0x21a304[_0x41a966(0x175)]),_0x28ef8b=_0x14b9b8[_0x41a966(0x17d)](_0x23c89b)||[];_0x28ef8b[_0x41a966(0x17a)]({'name':_0x21956e,'index':_0x3897a9}),_0x14b9b8[_0x41a966(0x174)](_0x23c89b,_0x28ef8b),_0x3897a9++;}const _0x1b5cec=new Map();for(const [_0x85e57b,_0x635208]of _0x14b9b8){const _0x5d86cb=_0x635208[_0x41a966(0x192)]()[_0x41a966(0x19c)]((_0x586ffa,_0x578c62)=>{const _0x3c8a92=_0x41a966,_0x1d0209=_0x5cefa1[_0x3c8a92(0x17d)](_0x586ffa[_0x3c8a92(0x19e)])||0x0,_0x518a7d=_0x5cefa1[_0x3c8a92(0x17d)](_0x578c62['name'])||0x0;if(_0x1d0209!==_0x518a7d)return _0x518a7d-_0x1d0209;return _0x586ffa['index']-_0x578c62[_0x3c8a92(0x189)];})[_0x41a966(0x164)](_0x2ada41=>_0x2ada41[_0x41a966(0x19e)]);_0x1b5cec[_0x41a966(0x174)](_0x85e57b,_0x5d86cb);}return _0x1b5cec;}export function collectSegmentUsageCounts(_0x51fd3e){const _0x3ad8e6=a120_0x47aa,_0x32006d=new Map(),_0x5a6c80=_0xaf3048=>{const _0x53e952=a120_0x47aa;if(!_0xaf3048)return;_0x32006d['set'](_0xaf3048,(_0x32006d[_0x53e952(0x17d)](_0xaf3048)||0x0)+0x1);},_0x4c27e8=_0xd4e0ca=>{const _0x1c24b4=a120_0x47aa;for(const _0x4b5545 of _0xd4e0ca){_0x5a6c80(_0x4b5545[_0x1c24b4(0x15f)]?.[_0x1c24b4(0x16d)]);if(_0x4b5545[_0x1c24b4(0x1ac)])for(const _0x46437d of _0x4b5545[_0x1c24b4(0x1ac)]){_0x5a6c80(_0x46437d['segment']);}_0x5a6c80(_0x4b5545[_0x1c24b4(0x1b1)]?.[_0x1c24b4(0x16d)]);if(_0x4b5545[_0x1c24b4(0x17c)])for(const _0x2420c2 of _0x4b5545['steps']){if(_0x2420c2['type']===_0x1c24b4(0x1ae))for(const _0x4fba77 of _0x2420c2[_0x1c24b4(0x19a)][_0x1c24b4(0x172)]){_0x5a6c80(_0x4fba77[_0x1c24b4(0x16d)]);}else _0x2420c2[_0x1c24b4(0x191)]===_0x1c24b4(0x1b5)&&_0x5a6c80(_0x2420c2[_0x1c24b4(0x19a)]['condition']?.[_0x1c24b4(0x16d)]);}}};_0x5a6c80(_0x51fd3e[_0x3ad8e6(0x178)]?.[_0x3ad8e6(0x16d)]);if(_0x51fd3e['journeys'])for(const _0xfb165f of _0x51fd3e['journeys']){_0x5a6c80(_0xfb165f[_0x3ad8e6(0x178)]?.[_0x3ad8e6(0x16d)]),_0x4c27e8(_0xfb165f[_0x3ad8e6(0x193)]);}_0x51fd3e['stages']&&_0x4c27e8(_0x51fd3e[_0x3ad8e6(0x193)]);if(_0x51fd3e[_0x3ad8e6(0x16a)])for(const _0x26f286 of _0x51fd3e[_0x3ad8e6(0x16a)]){_0x4c27e8(_0x26f286[_0x3ad8e6(0x193)]);}return _0x32006d;}
1
+ (function(_0x140437,_0x3af3cc){const _0x3f4fd5=a120_0x2f07,_0x3669ae=_0x140437();while(!![]){try{const _0x1d218a=-parseInt(_0x3f4fd5(0x106))/0x1*(parseInt(_0x3f4fd5(0x118))/0x2)+-parseInt(_0x3f4fd5(0x126))/0x3+-parseInt(_0x3f4fd5(0x11c))/0x4+parseInt(_0x3f4fd5(0x121))/0x5+parseInt(_0x3f4fd5(0x108))/0x6*(parseInt(_0x3f4fd5(0x11e))/0x7)+-parseInt(_0x3f4fd5(0x125))/0x8+parseInt(_0x3f4fd5(0x13e))/0x9;if(_0x1d218a===_0x3af3cc)break;else _0x3669ae['push'](_0x3669ae['shift']());}catch(_0x25ac1f){_0x3669ae['push'](_0x3669ae['shift']());}}}(a120_0x5921,0xd2208));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x331907){const _0x5105ba=a120_0x2f07;return _0x331907[_0x5105ba(0x111)]()[_0x5105ba(0x142)](/\s+/g,'_')[_0x5105ba(0x142)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x3d43fe){const _0x326064=a120_0x2f07,_0x5a903b=_0x3d43fe['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5a903b){const _0x3e2231=_0x5a903b[0x1][_0x326064(0x111)](),_0x5041f0=_0x5a903b[0x2],_0x31630d=_0x5041f0[_0x326064(0x142)](/-/g,'')['slice'](0x0,0x4)[_0x326064(0x111)]();return _0x3e2231+'_'+_0x31630d;}const _0x3089e8=_0x3d43fe[_0x326064(0x11a)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x3089e8){const _0x35e89a=_0x3089e8[0x1],_0x376869=_0x3089e8[0x2][_0x326064(0x111)](),_0x2f32f5=_0x35e89a['replace'](/-/g,'')[_0x326064(0x139)](0x0,0x4)[_0x326064(0x111)]();return _0x376869+'_'+_0x2f32f5;}return undefined;}function stableStringify(_0x39f7ea){const _0x318f35=a120_0x2f07;if(Array[_0x318f35(0x113)](_0x39f7ea))return'['+_0x39f7ea[_0x318f35(0x135)](_0x120ec9=>stableStringify(_0x120ec9))[_0x318f35(0x138)](',')+']';if(_0x39f7ea&&typeof _0x39f7ea==='object'){const _0x2f8f6e=_0x39f7ea,_0x2dedd3=Object[_0x318f35(0x107)](_0x2f8f6e)[_0x318f35(0x13b)](),_0x15f617=_0x2dedd3['map'](_0x35121a=>'\x22'+_0x35121a+'\x22:'+stableStringify(_0x2f8f6e[_0x35121a]));return'{'+_0x15f617[_0x318f35(0x138)](',')+'}';}const _0x440f95=JSON[_0x318f35(0x13a)](_0x39f7ea);return _0x440f95===undefined?_0x318f35(0x141):_0x440f95;}export function consolidateActivationsByContent(_0x563baf){const _0xe7f5e=a120_0x2f07,_0x555404={},_0x34deab=new Map(),_0xa29af=new Map();for(const _0x561532 of _0x563baf){if(!_0x561532)continue;for(const [_0x578278,_0x7d2b8c]of Object[_0xe7f5e(0x147)](_0x561532)){const _0x1fb9fb={'connection':_0x7d2b8c[_0xe7f5e(0x146)],..._0x7d2b8c['all_columns']!==undefined&&{'all_columns':_0x7d2b8c[_0xe7f5e(0x105)]},..._0x7d2b8c[_0xe7f5e(0x137)]!==undefined&&{'columns':_0x7d2b8c[_0xe7f5e(0x137)]},..._0x7d2b8c['behavior']!==undefined&&{'behavior':_0x7d2b8c['behavior']},..._0x7d2b8c[_0xe7f5e(0x115)]!==undefined&&{'schedule':_0x7d2b8c[_0xe7f5e(0x115)]},..._0x7d2b8c[_0xe7f5e(0x119)]!==undefined&&{'notification':_0x7d2b8c[_0xe7f5e(0x119)]},..._0x7d2b8c[_0xe7f5e(0x136)]!==undefined&&{'connector_config':_0x7d2b8c[_0xe7f5e(0x136)]},..._0x7d2b8c[_0xe7f5e(0x10d)]!==undefined&&{'activation_template_id':_0x7d2b8c[_0xe7f5e(0x10d)]}},_0x411695=stableStringify(_0x1fb9fb),_0x13bdf5=_0xa29af['get'](_0x411695);_0x13bdf5?_0x34deab[_0xe7f5e(0x10a)](_0x578278,_0x13bdf5):(_0x555404[_0x578278]=_0x7d2b8c,_0x34deab[_0xe7f5e(0x10a)](_0x578278,_0x578278),_0xa29af['set'](_0x411695,_0x578278));}}return{'merged':_0x555404,'nameMapping':_0x34deab};}export function updateActivationReferences(_0x7592d5,_0x2ac85c){const _0x3b5ace=a120_0x2f07;if(!_0x7592d5)return;for(const _0x2d8a67 of _0x7592d5){if(!_0x2d8a67[_0x3b5ace(0x14a)])continue;for(const _0x2837ea of _0x2d8a67[_0x3b5ace(0x14a)]){if(_0x2837ea['type']==='activation'&&_0x2837ea[_0x3b5ace(0x12d)]?.[_0x3b5ace(0x114)]){const _0x5a9394=_0x2ac85c[_0x3b5ace(0x123)](_0x2837ea[_0x3b5ace(0x12d)][_0x3b5ace(0x114)]);_0x5a9394&&_0x5a9394!==_0x2837ea[_0x3b5ace(0x12d)][_0x3b5ace(0x114)]&&(_0x2837ea[_0x3b5ace(0x12d)][_0x3b5ace(0x114)]=_0x5a9394);}}}}export function consolidateSegmentsByContent(_0x594895,_0x2eff8d){const _0x595195=a120_0x2f07,_0x157f75={},_0x246c34=new Map(),_0x1f98a8=new Map();for(const _0x49ebe3 of _0x594895){if(!_0x49ebe3)continue;for(const [_0xcb562e,_0x1fa9b4]of Object[_0x595195(0x147)](_0x49ebe3)){if(!_0x1fa9b4[_0x595195(0x124)]){_0x157f75[_0xcb562e]=_0x1fa9b4,_0x246c34['set'](_0xcb562e,_0xcb562e);continue;}const _0x4b2bb2=_0x1fa9b4['description']&&_0x1fa9b4[_0x595195(0x10e)][_0x595195(0x103)]()?_0x1fa9b4[_0x595195(0x10e)]:undefined,_0x2712ce=JSON[_0x595195(0x13a)]({'description':_0x4b2bb2,'rule':deepSortObject(_0x1fa9b4[_0x595195(0x124)])}),_0x2098d5=_0x1f98a8['get'](_0x2712ce);if(_0x2098d5){const _0x565bce={..._0x1fa9b4[_0x595195(0x10e)]!==undefined&&{'description':_0x1fa9b4['description']},'rule':_0x1fa9b4['rule']?deepSortObject(_0x1fa9b4[_0x595195(0x124)]):_0x1fa9b4[_0x595195(0x124)]};if(_0xcb562e<_0x2098d5){_0x157f75[_0xcb562e]=_0x565bce,delete _0x157f75[_0x2098d5];for(const [_0x1b1a8f,_0x253cdd]of _0x246c34[_0x595195(0x147)]()){_0x253cdd===_0x2098d5&&_0x246c34[_0x595195(0x10a)](_0x1b1a8f,_0xcb562e);}_0x246c34[_0x595195(0x10a)](_0xcb562e,_0xcb562e),_0x1f98a8[_0x595195(0x10a)](_0x2712ce,_0xcb562e);}else _0x157f75[_0x2098d5]=_0x565bce,_0x246c34[_0x595195(0x10a)](_0xcb562e,_0x2098d5);}else{let _0x2f4581=_0xcb562e;if(_0x2eff8d){const _0x4ca1b5=_0x2eff8d[_0x595195(0x123)](_0x2712ce);_0x4ca1b5&&_0x4ca1b5[_0x595195(0x12a)]>0x0&&(_0x2f4581=_0x4ca1b5['slice']()[_0x595195(0x13b)]()[0x0]);}const _0xeb9e={..._0x1fa9b4[_0x595195(0x10e)]!==undefined&&{'description':_0x1fa9b4[_0x595195(0x10e)]},'rule':_0x1fa9b4[_0x595195(0x124)]?deepSortObject(_0x1fa9b4[_0x595195(0x124)]):_0x1fa9b4['rule']};_0x157f75[_0x2f4581]=_0xeb9e,_0x246c34[_0x595195(0x10a)](_0xcb562e,_0x2f4581),_0x1f98a8[_0x595195(0x10a)](_0x2712ce,_0x2f4581);}}}return{'merged':_0x157f75,'nameMapping':_0x246c34};}export function updateSegmentReferences(_0x264ecf,_0x1e56d9){const _0x3bf8fd=a120_0x2f07;if(!_0x264ecf)return;for(const _0x12f2a5 of _0x264ecf){if(_0x12f2a5[_0x3bf8fd(0x127)]?.[_0x3bf8fd(0x14b)]){const _0x2c10ee=_0x1e56d9[_0x3bf8fd(0x123)](_0x12f2a5['entry_criteria'][_0x3bf8fd(0x14b)]);_0x2c10ee&&(_0x12f2a5[_0x3bf8fd(0x127)]['segment']=_0x2c10ee);}if(_0x12f2a5['exit_criteria'])for(const _0x4d66f5 of _0x12f2a5['exit_criteria']){if(_0x4d66f5['segment']){const _0xaf44eb=_0x1e56d9[_0x3bf8fd(0x123)](_0x4d66f5['segment']);_0xaf44eb&&(_0x4d66f5[_0x3bf8fd(0x14b)]=_0xaf44eb);}}if(_0x12f2a5[_0x3bf8fd(0x104)]?.[_0x3bf8fd(0x14b)]){const _0x341df5=_0x1e56d9[_0x3bf8fd(0x123)](_0x12f2a5[_0x3bf8fd(0x104)][_0x3bf8fd(0x14b)]);_0x341df5&&(_0x12f2a5[_0x3bf8fd(0x104)][_0x3bf8fd(0x14b)]=_0x341df5);}if(_0x12f2a5[_0x3bf8fd(0x14a)])for(const _0x4c1f58 of _0x12f2a5[_0x3bf8fd(0x14a)]){if(_0x4c1f58[_0x3bf8fd(0x129)]==='decision_point'&&_0x4c1f58[_0x3bf8fd(0x12d)]?.[_0x3bf8fd(0x134)])for(const _0x3fe5d1 of _0x4c1f58[_0x3bf8fd(0x12d)][_0x3bf8fd(0x134)]){if(_0x3fe5d1[_0x3bf8fd(0x14b)]){const _0x9aa08c=_0x1e56d9[_0x3bf8fd(0x123)](_0x3fe5d1[_0x3bf8fd(0x14b)]);_0x9aa08c&&(_0x3fe5d1[_0x3bf8fd(0x14b)]=_0x9aa08c);}}if(_0x4c1f58[_0x3bf8fd(0x129)]===_0x3bf8fd(0x11d)&&_0x4c1f58['with']?.['condition']?.[_0x3bf8fd(0x14b)]){const _0x3bac4d=_0x1e56d9['get'](_0x4c1f58['with']['condition'][_0x3bf8fd(0x14b)]);_0x3bac4d&&(_0x4c1f58[_0x3bf8fd(0x12d)][_0x3bf8fd(0x110)][_0x3bf8fd(0x14b)]=_0x3bac4d);}}}}export function updateSegmentRefsInSegments(_0x3b31e8,_0xe6c5d1){const _0x519759=a120_0x2f07;for(const _0x118946 of Object['values'](_0x3b31e8)){_0x118946[_0x519759(0x124)]&&updateSegmentRefsInRule(_0x118946[_0x519759(0x124)],_0xe6c5d1);}}function updateSegmentRefsInRule(_0x562962,_0x3129fb){const _0x6fdcfd=a120_0x2f07;if(_0x562962===null||typeof _0x562962!==_0x6fdcfd(0x13d))return;if(Array[_0x6fdcfd(0x113)](_0x562962)){for(const _0x3d2c2c of _0x562962){updateSegmentRefsInRule(_0x3d2c2c,_0x3129fb);}return;}const _0x44fb9f=_0x562962;if((_0x44fb9f['type']==='include'||_0x44fb9f[_0x6fdcfd(0x129)]==='exclude')&&typeof _0x44fb9f['segment']===_0x6fdcfd(0x10b)){const _0x1a5c43=_0x3129fb['get'](_0x44fb9f[_0x6fdcfd(0x14b)]);_0x1a5c43&&(_0x44fb9f[_0x6fdcfd(0x14b)]=_0x1a5c43);}if(_0x44fb9f[_0x6fdcfd(0x109)]&&Array[_0x6fdcfd(0x113)](_0x44fb9f[_0x6fdcfd(0x109)]))for(const _0xe1a321 of _0x44fb9f[_0x6fdcfd(0x109)]){updateSegmentRefsInRule(_0xe1a321,_0x3129fb);}}export function buildJourneysArray(_0x538fbd){const _0x58f9b4=a120_0x2f07,_0x45ec93=Math[_0x58f9b4(0x128)](..._0x538fbd[_0x58f9b4(0x135)](_0x2845af=>_0x2845af['item'][_0x58f9b4(0x102)]||0x0));return _0x538fbd[_0x58f9b4(0x135)](_0x3e18ea=>{const _0xb46c8a=_0x58f9b4,_0x1827e0=(_0x3e18ea[_0xb46c8a(0x100)][_0xb46c8a(0x102)]||0x0)===_0x45ec93,_0x1b71c4=_0x3e18ea['yaml'][_0xb46c8a(0x12c)]?.[0x0],_0x449129=_0x1b71c4?.[_0xb46c8a(0x13f)]||_0x3e18ea[_0xb46c8a(0x101)][_0xb46c8a(0x13f)],_0x5f56b5={'version':_0x1b71c4?.['version']||_0x3e18ea['yaml']['version']||_0x3e18ea[_0xb46c8a(0x100)][_0xb46c8a(0x12b)],'state':_0x3e18ea['item'][_0xb46c8a(0x149)]===_0xb46c8a(0x117)?_0xb46c8a(0x117):_0xb46c8a(0x132),'stages':_0x1b71c4?.[_0xb46c8a(0x10c)]||_0x3e18ea['yaml'][_0xb46c8a(0x10c)]||[],'id':_0x1b71c4?.['id']||_0x3e18ea[_0xb46c8a(0x101)]['id'],'version_number':_0x1b71c4?.[_0xb46c8a(0x145)]||_0x3e18ea['yaml'][_0xb46c8a(0x145)]};return _0x449129&&(_0x5f56b5[_0xb46c8a(0x13f)]=_0x449129),_0x1827e0&&(_0x5f56b5['latest']=!![]),_0x5f56b5;});}export function buildMergedJourneyDef(_0x34c093,_0x1ce267){const _0x29a736=a120_0x2f07,_0x5a8187=_0x34c093[0x0][_0x29a736(0x101)],_0x29aadd=buildJourneysArray(_0x34c093),{merged:_0x42f76c,nameMapping:_0x51663b}=consolidateSegmentsByContent(_0x34c093['map'](_0x7d99b=>_0x7d99b['yaml']['segments']),_0x1ce267);updateSegmentRefsInSegments(_0x42f76c,_0x51663b);const _0x1a207a=Array['from'](_0x51663b['entries']())['some'](([_0x481cf8,_0x27d817])=>_0x481cf8!==_0x27d817&&_0x481cf8[_0x29a736(0x12f)](_0x29a736(0x127)));let _0x4c0902=_0x42f76c,_0xa47606=new Map();if(_0x1a207a){const _0x38df03=consolidateSegmentsByContent([_0x42f76c],_0x1ce267);_0x4c0902=_0x38df03[_0x29a736(0x13c)],_0xa47606=_0x38df03[_0x29a736(0xff)];}const _0x47df8a=new Map(_0x51663b);for(const [_0x2ebc54,_0x3cef10]of _0xa47606[_0x29a736(0x147)]()){_0x47df8a[_0x29a736(0x10a)](_0x2ebc54,_0x3cef10);}for(const [_0x34dec7,_0x4b1974]of _0x47df8a[_0x29a736(0x147)]()){let _0x26dac2=_0x4b1974,_0x5d71c9=0x0;while(_0x47df8a['has'](_0x26dac2)&&_0x47df8a[_0x29a736(0x123)](_0x26dac2)!==_0x26dac2&&_0x5d71c9<MAX_MAPPING_CHAIN_DEPTH){_0x26dac2=_0x47df8a[_0x29a736(0x123)](_0x26dac2),_0x5d71c9++;}_0x26dac2!==_0x4b1974&&_0x47df8a['set'](_0x34dec7,_0x26dac2);}for(const _0x3c0acd of _0x29aadd){updateSegmentReferences(_0x3c0acd[_0x29a736(0x10c)],_0x47df8a);}const {merged:_0x56669e,nameMapping:_0x263291}=consolidateActivationsByContent(_0x34c093[_0x29a736(0x135)](_0x4cd624=>_0x4cd624[_0x29a736(0x101)][_0x29a736(0x130)]));for(const _0xe559e of _0x29aadd){updateActivationReferences(_0xe559e[_0x29a736(0x10c)],_0x263291);}let _0x4c7a44=_0x5a8187[_0x29a736(0x13f)];if(_0x4c7a44?.[_0x29a736(0x14b)]){const _0x2f4386=_0x47df8a[_0x29a736(0x123)](_0x4c7a44['segment']);_0x2f4386&&(_0x4c7a44={..._0x4c7a44,'segment':_0x2f4386});}for(const _0x1c52b0 of _0x29aadd){if(_0x1c52b0['goal']?.['segment']){const _0x5345db=_0x47df8a[_0x29a736(0x123)](_0x1c52b0[_0x29a736(0x13f)]['segment']);_0x5345db&&(_0x1c52b0[_0x29a736(0x13f)]={..._0x1c52b0[_0x29a736(0x13f)],'segment':_0x5345db});}}return _0x29aadd[_0x29a736(0x148)](_0xd2262b=>_0xd2262b[_0x29a736(0x13f)])&&(_0x4c7a44=undefined),{'type':_0x29a736(0x11f),'name':_0x5a8187['name'],'description':_0x5a8187[_0x29a736(0x10e)],'goal':_0x4c7a44,'reentry':_0x5a8187[_0x29a736(0x133)],'segments':Object['keys'](_0x4c0902)['length']>0x0?_0x4c0902:undefined,'activations':Object[_0x29a736(0x107)](_0x56669e)[_0x29a736(0x12a)]>0x0?_0x56669e:undefined,'journeys':_0x29aadd,'bundle_id':_0x5a8187[_0x29a736(0x112)],'bundle_name':_0x5a8187['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x1e6aef,_0x47afb1,_0x358ee4,_0x73ef3){const _0x2ac74f=a120_0x2f07,_0x50b5d6=_0x1e6aef+':'+_0x47afb1,_0x32a028=_0x358ee4['get'](_0x50b5d6);if(_0x32a028)return _0x32a028;const _0x348f90=await _0x73ef3(_0x1e6aef),_0x5313f1=_0x348f90[_0x2ac74f(0x14c)]['journeyBundleName']||_0x348f90[_0x2ac74f(0x14c)]['name'],_0x3838bb=_0x348f90[_0x2ac74f(0x14c)]['journeyStages'][_0x2ac74f(0x11b)](_0xd8557=>String(_0xd8557['id'])===String(_0x47afb1)),_0x429f0f=_0x3838bb?.[_0x2ac74f(0x12b)]||_0x47afb1,_0x100831={'journeyName':_0x5313f1,'stageName':_0x429f0f};return _0x358ee4['set'](_0x50b5d6,_0x100831),_0x100831;}export function formatApiJourneyName(_0x10d873,_0x484809){return _0x484809+'\x20('+_0x10d873+')';}export function isLocalJourneyRef(_0x307918){const _0x2405ef=a120_0x2f07;return _0x307918[_0x2405ef(0x10f)](_0x2405ef(0x131))||_0x307918['endsWith'](_0x2405ef(0x140));}export function buildLocalRuleToNameMapping(_0x424261){const _0x31d7f8=a120_0x2f07,_0x7f46f9=new Map();if(!_0x424261)return _0x7f46f9;for(const [_0x596127,_0x940186]of Object['entries'](_0x424261)){if(_0x940186['rule']){const _0x1fcf8c=serializeRule(_0x940186[_0x31d7f8(0x124)]),_0x48501d=_0x7f46f9['get'](_0x1fcf8c)||[];_0x48501d[_0x31d7f8(0x143)](_0x596127),_0x7f46f9[_0x31d7f8(0x10a)](_0x1fcf8c,_0x48501d);}}return _0x7f46f9;}function a120_0x2f07(_0x2bb856,_0x59cf34){_0x2bb856=_0x2bb856-0xff;const _0x592163=a120_0x5921();let _0x2f0766=_0x592163[_0x2bb856];return _0x2f0766;}function a120_0x5921(){const _0x21d9fd=['.yml','draft','reentry','branches','map','connector_config','columns','join','slice','stringify','sort','merged','object','33995439AaQDSv','goal','.yaml','null','replace','push','segments','version_number','connection','entries','some','state','steps','segment','attributes','nameMapping','item','yaml','versionNumber','trim','milestone','all_columns','9903ktpLPr','keys','42grSvdU','conditions','set','string','stages','activation_template_id','description','endsWith','condition','toLowerCase','bundle_id','isArray','activation','schedule','index','launched','262QHzrVt','notification','match','find','2847852AZnzyh','wait','594209XFeDCi','journey','exit_criteria','4240370xYiHyg','versions','get','rule','11529224mGafNe','2725395tjPrlp','entry_criteria','max','type','length','name','journeys','with','decision_point','startsWith','activations'];a120_0x5921=function(){return _0x21d9fd;};return a120_0x5921();}export function buildLocalRuleToNameMappingFromJourney(_0x330db6){const _0x451bcb=a120_0x2f07,_0x428b77=_0x330db6[_0x451bcb(0x144)];if(!_0x428b77)return new Map();const _0x14f70f=collectSegmentUsageCounts(_0x330db6),_0x44b338=new Map();let _0x41e6c9=0x0;for(const [_0x230473,_0x3c8288]of Object[_0x451bcb(0x147)](_0x428b77)){if(!_0x3c8288['rule']){_0x41e6c9++;continue;}const _0x2dada3=serializeRule(_0x3c8288[_0x451bcb(0x124)]),_0x54b453=_0x44b338[_0x451bcb(0x123)](_0x2dada3)||[];_0x54b453[_0x451bcb(0x143)]({'name':_0x230473,'index':_0x41e6c9}),_0x44b338['set'](_0x2dada3,_0x54b453),_0x41e6c9++;}const _0x1facc1=new Map();for(const [_0x4cb295,_0x38c1b1]of _0x44b338){const _0x25b4fa=_0x38c1b1['slice']()['sort']((_0x2ce2dc,_0x321f0c)=>{const _0x3dd446=_0x451bcb,_0x537b90=_0x14f70f[_0x3dd446(0x123)](_0x2ce2dc[_0x3dd446(0x12b)])||0x0,_0x29fb56=_0x14f70f[_0x3dd446(0x123)](_0x321f0c['name'])||0x0;if(_0x537b90!==_0x29fb56)return _0x29fb56-_0x537b90;return _0x2ce2dc[_0x3dd446(0x116)]-_0x321f0c['index'];})[_0x451bcb(0x135)](_0x157559=>_0x157559[_0x451bcb(0x12b)]);_0x1facc1['set'](_0x4cb295,_0x25b4fa);}return _0x1facc1;}export function collectSegmentUsageCounts(_0x129470){const _0x2ca6e0=a120_0x2f07,_0x10d739=new Map(),_0x5102c4=_0x10dd85=>{const _0x2482f3=a120_0x2f07;if(!_0x10dd85)return;_0x10d739[_0x2482f3(0x10a)](_0x10dd85,(_0x10d739[_0x2482f3(0x123)](_0x10dd85)||0x0)+0x1);},_0x19d2aa=_0x2e5c76=>{const _0x383171=a120_0x2f07;for(const _0x4342fa of _0x2e5c76){_0x5102c4(_0x4342fa[_0x383171(0x127)]?.[_0x383171(0x14b)]);if(_0x4342fa[_0x383171(0x120)])for(const _0x5a2a8a of _0x4342fa[_0x383171(0x120)]){_0x5102c4(_0x5a2a8a[_0x383171(0x14b)]);}_0x5102c4(_0x4342fa['milestone']?.[_0x383171(0x14b)]);if(_0x4342fa['steps'])for(const _0x2126ec of _0x4342fa[_0x383171(0x14a)]){if(_0x2126ec[_0x383171(0x129)]===_0x383171(0x12e))for(const _0x364120 of _0x2126ec[_0x383171(0x12d)][_0x383171(0x134)]){_0x5102c4(_0x364120[_0x383171(0x14b)]);}else _0x2126ec[_0x383171(0x129)]===_0x383171(0x11d)&&_0x5102c4(_0x2126ec['with'][_0x383171(0x110)]?.[_0x383171(0x14b)]);}}};_0x5102c4(_0x129470['goal']?.[_0x2ca6e0(0x14b)]);if(_0x129470[_0x2ca6e0(0x12c)])for(const _0x423a89 of _0x129470[_0x2ca6e0(0x12c)]){_0x5102c4(_0x423a89['goal']?.[_0x2ca6e0(0x14b)]),_0x19d2aa(_0x423a89[_0x2ca6e0(0x10c)]);}_0x129470[_0x2ca6e0(0x10c)]&&_0x19d2aa(_0x129470[_0x2ca6e0(0x10c)]);if(_0x129470[_0x2ca6e0(0x122)])for(const _0x3d6782 of _0x129470[_0x2ca6e0(0x122)]){_0x19d2aa(_0x3d6782['stages']);}return _0x10d739;}
@@ -1 +1 @@
1
- (function(_0x23122a,_0xb9a8f){const _0x388830=a121_0xb82e,_0x262a5c=_0x23122a();while(!![]){try{const _0x48afff=-parseInt(_0x388830(0x1c2))/0x1+-parseInt(_0x388830(0x1b1))/0x2+-parseInt(_0x388830(0x1c1))/0x3*(-parseInt(_0x388830(0x15c))/0x4)+parseInt(_0x388830(0x1cb))/0x5+-parseInt(_0x388830(0x149))/0x6*(-parseInt(_0x388830(0x182))/0x7)+parseInt(_0x388830(0x146))/0x8+-parseInt(_0x388830(0x173))/0x9;if(_0x48afff===_0xb9a8f)break;else _0x262a5c['push'](_0x262a5c['shift']());}catch(_0x5d91b8){_0x262a5c['push'](_0x262a5c['shift']());}}}(a121_0x4695,0x1d19f));import{getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x57f1a1,_0xb38629,_0x59755e,_0x158482,_0x3661cb,_0x43ed60){const _0x47d017=a121_0xb82e;return{'level':_0x57f1a1,'path':_0xb38629,'code':_0x59755e,'message':_0x158482,'location':getLocationFromPath(_0x3661cb[_0x47d017(0x17c)],_0x3661cb[_0x47d017(0x143)],pathToArray(_0x43ed60??_0xb38629))};}function validateVersionStructure(_0xc70f88,_0x1d1306){const _0x4e5845=a121_0xb82e,_0x5e48d2=[];return _0xc70f88[_0x4e5845(0x198)]>MAX_STAGES&&_0x5e48d2[_0x4e5845(0x172)](createIssue('error',_0x4e5845(0x154),_0x4e5845(0x1e7),'Journey\x20has\x20'+_0xc70f88[_0x4e5845(0x198)]+_0x4e5845(0x189)+MAX_STAGES,_0x1d1306)),_0x5e48d2;}function validateStageStructure(_0x5377f2,_0x4b7054,_0x227ee9,_0x5bf5e6){const _0x50d2e9=a121_0xb82e,_0x5c2701=[],_0x215f74=_0x50d2e9(0x1b5)+_0x4b7054+']';_0x4b7054===0x0&&!_0x5377f2[_0x50d2e9(0x1d4)]&&_0x5c2701[_0x50d2e9(0x172)](createIssue(_0x50d2e9(0x14c),_0x215f74+_0x50d2e9(0x17d),_0x50d2e9(0x1ca),_0x50d2e9(0x1b9)+_0x5377f2[_0x50d2e9(0x152)]+_0x50d2e9(0x185),_0x5bf5e6,_0x215f74));const _0x3edbc2=_0x4b7054===_0x227ee9-0x1;!_0x3edbc2&&!_0x5377f2[_0x50d2e9(0x145)]&&_0x5c2701[_0x50d2e9(0x172)](createIssue('error',_0x215f74+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x5377f2[_0x50d2e9(0x152)]+_0x50d2e9(0x15e),_0x5bf5e6,_0x215f74));(!_0x5377f2[_0x50d2e9(0x1be)]||_0x5377f2[_0x50d2e9(0x1be)][_0x50d2e9(0x198)]===0x0)&&_0x5c2701[_0x50d2e9(0x172)](createIssue(_0x50d2e9(0x1b2),_0x215f74+_0x50d2e9(0x195),_0x50d2e9(0x1bf),_0x50d2e9(0x1b9)+_0x5377f2[_0x50d2e9(0x152)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x5bf5e6,_0x215f74));const _0x164971=_0x5377f2[_0x50d2e9(0x1bb)]?.['length']??0x0;if(_0x164971===0x0)_0x5c2701[_0x50d2e9(0x172)](createIssue('error',_0x215f74+'.steps',_0x50d2e9(0x16b),_0x50d2e9(0x1b9)+_0x5377f2['name']+_0x50d2e9(0x1b4),_0x5bf5e6,_0x215f74+_0x50d2e9(0x1d1)));else{if(_0x164971===0x1)_0x5c2701[_0x50d2e9(0x172)](createIssue(_0x50d2e9(0x1b2),_0x215f74+_0x50d2e9(0x1d1),_0x50d2e9(0x16b),_0x50d2e9(0x1b9)+_0x5377f2[_0x50d2e9(0x152)]+_0x50d2e9(0x1df),_0x5bf5e6,_0x215f74+_0x50d2e9(0x1d1)));else _0x164971<=0x3&&_0x5c2701[_0x50d2e9(0x172)](createIssue('warning',_0x215f74+'.steps',_0x50d2e9(0x1e0),_0x50d2e9(0x1b9)+_0x5377f2[_0x50d2e9(0x152)]+_0x50d2e9(0x165)+_0x164971+_0x50d2e9(0x1e1),_0x5bf5e6,_0x215f74+_0x50d2e9(0x1d1)));}return _0x5c2701;}function validateStep(_0x123805,_0x44f14b,_0x3231d2,_0x408888){const _0x5487f7=a121_0xb82e,_0x24d2fc=[];if(_0x123805[_0x5487f7(0x1ce)]===_0x5487f7(0x170))return _0x123805[_0x5487f7(0x1e5)]&&_0x24d2fc[_0x5487f7(0x172)](createIssue(_0x5487f7(0x14c),_0x44f14b+_0x5487f7(0x1d5),_0x5487f7(0x1d6),'End\x20step\x20\x27'+_0x123805[_0x5487f7(0x152)]+_0x5487f7(0x1e3),_0x3231d2)),_0x5487f7(0x176)in _0x123805&&_0x123805[_0x5487f7(0x176)]!==undefined&&_0x24d2fc['push'](createIssue(_0x5487f7(0x14c),_0x44f14b+_0x5487f7(0x19b),_0x5487f7(0x1d6),'End\x20step\x20\x27'+_0x123805[_0x5487f7(0x152)]+_0x5487f7(0x18f),_0x3231d2)),_0x24d2fc;_0x123805['next']&&(_0x3231d2[_0x5487f7(0x180)]&&!_0x3231d2['stepNames'][_0x5487f7(0x15f)](_0x123805[_0x5487f7(0x1e5)])&&_0x24d2fc[_0x5487f7(0x172)](createIssue('error',_0x44f14b+_0x5487f7(0x1d5),'INVALID_NEXT_REFERENCE','Step\x20references\x20non-existent\x20step\x20\x27'+_0x123805['next']+'\x27',_0x3231d2)));switch(_0x123805[_0x5487f7(0x1ce)]){case _0x5487f7(0x161):_0x24d2fc[_0x5487f7(0x172)](...validateWaitStep(_0x123805,_0x44f14b,_0x3231d2,_0x408888));break;case _0x5487f7(0x181):_0x24d2fc[_0x5487f7(0x172)](...validateActivationStep(_0x123805,_0x44f14b,_0x3231d2));break;case _0x5487f7(0x13e):_0x24d2fc[_0x5487f7(0x172)](...validateDecisionPointStep(_0x123805,_0x44f14b,_0x3231d2,_0x408888));break;case _0x5487f7(0x150):_0x24d2fc[_0x5487f7(0x172)](...validateAbTestStep(_0x123805,_0x44f14b,_0x3231d2,_0x408888));break;case _0x5487f7(0x15d):_0x24d2fc[_0x5487f7(0x172)](...validateJumpStep(_0x123805,_0x44f14b,_0x3231d2));break;}return _0x24d2fc;}function validateWaitStep(_0x12bc61,_0x2645cb,_0x3628cb,_0x436cf5){const _0x5f4608=a121_0xb82e,_0x160bf2=[];if(!_0x12bc61['with'])return _0x160bf2['push'](createIssue(_0x5f4608(0x14c),_0x2645cb+_0x5f4608(0x19b),_0x5f4608(0x179),_0x5f4608(0x159),_0x3628cb,_0x2645cb)),_0x160bf2;if(_0x12bc61[_0x5f4608(0x176)][_0x5f4608(0x16d)]){const _0x3ac4ab=_0x12bc61['with'][_0x5f4608(0x16d)];if(_0x3ac4ab['segment']){_0x3628cb['referencedSegments']?.[_0x5f4608(0x1ae)](_0x3ac4ab[_0x5f4608(0x147)]);!_0x3ac4ab[_0x5f4608(0x147)]['startsWith'](_0x5f4608(0x1a2))&&(_0x3628cb['embeddedSegments']&&!_0x3628cb['embeddedSegments']['has'](_0x3ac4ab[_0x5f4608(0x147)])&&_0x160bf2[_0x5f4608(0x172)](createIssue(_0x5f4608(0x14c),_0x2645cb+'.with.condition.segment',_0x5f4608(0x163),_0x5f4608(0x153)+_0x3ac4ab[_0x5f4608(0x147)]+_0x5f4608(0x19a),_0x3628cb)));_0x3ac4ab[_0x5f4608(0x1e5)]&&_0x3628cb[_0x5f4608(0x180)]&&!_0x3628cb[_0x5f4608(0x180)][_0x5f4608(0x15f)](_0x3ac4ab[_0x5f4608(0x1e5)])&&_0x160bf2[_0x5f4608(0x172)](createIssue('error',_0x2645cb+_0x5f4608(0x1de),_0x5f4608(0x1ab),_0x5f4608(0x1c4)+_0x3ac4ab[_0x5f4608(0x1e5)]+'\x27',_0x3628cb));_0x3ac4ab['timeout']?.[_0x5f4608(0x1e5)]&&_0x3628cb[_0x5f4608(0x180)]&&!_0x3628cb[_0x5f4608(0x180)]['has'](_0x3ac4ab[_0x5f4608(0x13f)][_0x5f4608(0x1e5)])&&_0x160bf2[_0x5f4608(0x172)](createIssue(_0x5f4608(0x14c),_0x2645cb+_0x5f4608(0x1c3),_0x5f4608(0x1ab),_0x5f4608(0x14e)+_0x3ac4ab[_0x5f4608(0x13f)][_0x5f4608(0x1e5)]+'\x27',_0x3628cb));const _0x59c30f=_0x3ac4ab[_0x5f4608(0x1e5)]||_0x12bc61[_0x5f4608(0x1e5)],_0x3e998e=_0x3ac4ab[_0x5f4608(0x13f)]?.[_0x5f4608(0x1e5)]||_0x12bc61[_0x5f4608(0x1e5)];if(_0x59c30f){const _0x50d95f=_0x436cf5[_0x5f4608(0x15a)](_0x59c30f);_0x50d95f?.[_0x5f4608(0x1ce)]==='merge'&&_0x160bf2[_0x5f4608(0x172)](createIssue(_0x5f4608(0x1b2),_0x2645cb+_0x5f4608(0x1de),_0x5f4608(0x171),_0x5f4608(0x1a9)+_0x59c30f+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x3628cb,_0x2645cb+_0x5f4608(0x1a7)));}if(_0x3e998e){const _0x573278=_0x436cf5[_0x5f4608(0x15a)](_0x3e998e);_0x573278?.[_0x5f4608(0x1ce)]==='merge'&&_0x160bf2[_0x5f4608(0x172)](createIssue('warning',_0x2645cb+_0x5f4608(0x1c3),_0x5f4608(0x171),_0x5f4608(0x19c)+_0x3e998e+_0x5f4608(0x166),_0x3628cb,_0x2645cb+'.with.condition.timeout'));}}}return _0x160bf2;}function validateActivationStep(_0x1991f1,_0x1021ae,_0x2f33fd){const _0x539aa7=a121_0xb82e,_0x493f0b=[];if(!_0x1991f1['with']?.[_0x539aa7(0x181)])return _0x493f0b['push'](createIssue(_0x539aa7(0x14c),_0x1021ae+_0x539aa7(0x14f),'MISSING_ACTIVATION_REF',_0x539aa7(0x1d7),_0x2f33fd,_0x1021ae)),_0x493f0b;const _0x1e3d10=_0x1991f1['with'][_0x539aa7(0x181)];return _0x2f33fd[_0x539aa7(0x1b8)]&&!_0x1e3d10[_0x539aa7(0x1d3)](_0x539aa7(0x1a2))&&(!_0x2f33fd['activationKeys'][_0x539aa7(0x15f)](_0x1e3d10)&&_0x493f0b[_0x539aa7(0x172)](createIssue(_0x539aa7(0x14c),_0x1021ae+_0x539aa7(0x14f),_0x539aa7(0x1bc),_0x539aa7(0x148)+_0x1e3d10+'\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.',_0x2f33fd))),_0x493f0b;}function validateDecisionPointStep(_0x53d3eb,_0x15ee63,_0x25e06d,_0x4767b8){const _0x115d57=a121_0xb82e,_0x30c7fc=[];if(!_0x53d3eb[_0x115d57(0x176)]?.[_0x115d57(0x190)]||_0x53d3eb[_0x115d57(0x176)][_0x115d57(0x190)][_0x115d57(0x198)]===0x0)return _0x30c7fc[_0x115d57(0x172)](createIssue(_0x115d57(0x14c),_0x15ee63+_0x115d57(0x18b),_0x115d57(0x18a),_0x115d57(0x1cd),_0x25e06d,_0x15ee63)),_0x30c7fc;for(let _0x104dff=0x0;_0x104dff<_0x53d3eb['with']['branches'][_0x115d57(0x198)];_0x104dff++){const _0x326842=_0x53d3eb['with'][_0x115d57(0x190)][_0x104dff],_0x18c567=_0x15ee63+'.with.branches['+_0x104dff+']';_0x326842[_0x115d57(0x147)]&&!_0x326842[_0x115d57(0x193)]&&(_0x25e06d['referencedSegments']?.[_0x115d57(0x1ae)](_0x326842[_0x115d57(0x147)]),!_0x326842['segment']['startsWith'](_0x115d57(0x1a2))&&(_0x25e06d[_0x115d57(0x1aa)]&&!_0x25e06d[_0x115d57(0x1aa)][_0x115d57(0x15f)](_0x326842['segment'])&&_0x30c7fc[_0x115d57(0x172)](createIssue(_0x115d57(0x14c),_0x18c567+_0x115d57(0x1cf),_0x115d57(0x163),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x326842[_0x115d57(0x147)]+'\x27',_0x25e06d))));_0x326842['next']&&_0x25e06d[_0x115d57(0x180)]&&!_0x25e06d[_0x115d57(0x180)]['has'](_0x326842[_0x115d57(0x1e5)])&&_0x30c7fc[_0x115d57(0x172)](createIssue(_0x115d57(0x14c),_0x18c567+_0x115d57(0x1d5),'INVALID_NEXT_REFERENCE','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x326842[_0x115d57(0x1e5)]+'\x27',_0x25e06d));if(_0x326842[_0x115d57(0x1e5)]){const _0x5633eb=_0x4767b8[_0x115d57(0x15a)](_0x326842[_0x115d57(0x1e5)]);_0x5633eb?.[_0x115d57(0x1ce)]===_0x115d57(0x1da)&&_0x30c7fc['push'](createIssue(_0x115d57(0x1b2),_0x18c567+_0x115d57(0x1d5),'BRANCH_DIRECTLY_TO_MERGE',_0x115d57(0x1a1)+_0x326842[_0x115d57(0x152)]+_0x115d57(0x1db)+_0x326842['next']+_0x115d57(0x160),_0x25e06d));}}return _0x30c7fc;}function validateAbTestStep(_0xcf0540,_0x1c1a2b,_0x33d5de,_0x43a028){const _0x112011=a121_0xb82e,_0xa637de=[];if(!_0xcf0540['with']?.[_0x112011(0x158)]||_0xcf0540[_0x112011(0x176)][_0x112011(0x158)]['length']===0x0)return _0xa637de[_0x112011(0x172)](createIssue('error',_0x1c1a2b+_0x112011(0x1c5),'MISSING_CONDITIONS',_0x112011(0x1cc),_0x33d5de,_0x1c1a2b)),_0xa637de;const _0x11be77=_0xcf0540[_0x112011(0x176)]['variants']['reduce']((_0x30aef4,_0x5a8ac0)=>_0x30aef4+(_0x5a8ac0[_0x112011(0x16a)]||0x0),0x0);Math['abs'](_0x11be77-0x64)>0.01&&_0xa637de[_0x112011(0x172)](createIssue('error',_0x1c1a2b+_0x112011(0x1c5),_0x112011(0x16c),_0x112011(0x174)+_0x11be77+'%)',_0x33d5de));for(let _0x22972d=0x0;_0x22972d<_0xcf0540[_0x112011(0x176)]['variants'][_0x112011(0x198)];_0x22972d++){const _0x165357=_0xcf0540['with'][_0x112011(0x158)][_0x22972d],_0x2c221e=_0x1c1a2b+_0x112011(0x1d9)+_0x22972d+']';_0x165357[_0x112011(0x1e5)]&&_0x33d5de[_0x112011(0x180)]&&!_0x33d5de[_0x112011(0x180)]['has'](_0x165357[_0x112011(0x1e5)])&&_0xa637de[_0x112011(0x172)](createIssue(_0x112011(0x14c),_0x2c221e+'.next',_0x112011(0x1ab),_0x112011(0x184)+_0x165357['next']+'\x27',_0x33d5de));if(_0x165357['next']){const _0x351b4b=_0x43a028[_0x112011(0x15a)](_0x165357[_0x112011(0x1e5)]);_0x351b4b?.[_0x112011(0x1ce)]==='merge'&&_0xa637de['push'](createIssue(_0x112011(0x1b2),_0x2c221e+_0x112011(0x1d5),'BRANCH_DIRECTLY_TO_MERGE',_0x112011(0x191)+_0x165357[_0x112011(0x152)]+_0x112011(0x1db)+_0x165357[_0x112011(0x1e5)]+_0x112011(0x160),_0x33d5de));}}return _0xa637de;}function validateJumpStep(_0x348678,_0x395424,_0x1d52f0){const _0x23064c=a121_0xb82e,_0x160589=[];if(!_0x348678[_0x23064c(0x176)]?.[_0x23064c(0x144)])return _0x160589['push'](createIssue('error',_0x395424+_0x23064c(0x1a8),_0x23064c(0x1c6),_0x23064c(0x141),_0x1d52f0,_0x395424)),_0x160589;return(!_0x348678[_0x23064c(0x176)][_0x23064c(0x144)][_0x23064c(0x14b)]||!_0x348678[_0x23064c(0x176)][_0x23064c(0x144)][_0x23064c(0x1e2)])&&_0x160589[_0x23064c(0x172)](createIssue(_0x23064c(0x14c),_0x395424+_0x23064c(0x1a8),_0x23064c(0x1c6),_0x23064c(0x13c),_0x1d52f0)),_0x160589;}function buildConvergenceMap(_0x58ba91){const _0x57dcb3=a121_0xb82e,_0x28e015=new Map();function _0x23c016(_0x5e6611,_0x9b6863){const _0x21dcf6=a121_0xb82e,_0x21ebeb=_0x28e015['get'](_0x5e6611)||[];_0x21ebeb['push'](_0x9b6863),_0x28e015[_0x21dcf6(0x1b6)](_0x5e6611,_0x21ebeb);}for(const _0x367435 of _0x58ba91){_0x367435[_0x57dcb3(0x1e5)]&&_0x23c016(_0x367435['next'],{'stepName':_0x367435[_0x57dcb3(0x152)],'description':_0x57dcb3(0x164)+_0x367435[_0x57dcb3(0x152)]+'\x27'});if(_0x367435[_0x57dcb3(0x1ce)]===_0x57dcb3(0x13e)&&_0x367435[_0x57dcb3(0x176)]?.[_0x57dcb3(0x190)])for(const _0x408978 of _0x367435[_0x57dcb3(0x176)][_0x57dcb3(0x190)]){_0x408978['next']&&_0x23c016(_0x408978[_0x57dcb3(0x1e5)],{'stepName':_0x367435[_0x57dcb3(0x152)],'description':_0x57dcb3(0x17a)+_0x408978[_0x57dcb3(0x152)]+_0x57dcb3(0x169)+_0x367435[_0x57dcb3(0x152)]+'\x27'});}if(_0x367435['type']==='ab_test'&&_0x367435[_0x57dcb3(0x176)]?.[_0x57dcb3(0x158)])for(const _0x12a59e of _0x367435['with'][_0x57dcb3(0x158)]){_0x12a59e[_0x57dcb3(0x1e5)]&&_0x23c016(_0x12a59e['next'],{'stepName':_0x367435[_0x57dcb3(0x152)],'description':'variant\x20\x27'+_0x12a59e['name']+_0x57dcb3(0x169)+_0x367435[_0x57dcb3(0x152)]+'\x27'});}_0x367435[_0x57dcb3(0x1ce)]===_0x57dcb3(0x161)&&_0x367435[_0x57dcb3(0x176)]?.[_0x57dcb3(0x16d)]&&(_0x367435[_0x57dcb3(0x176)][_0x57dcb3(0x16d)][_0x57dcb3(0x1e5)]&&_0x23c016(_0x367435[_0x57dcb3(0x176)][_0x57dcb3(0x16d)][_0x57dcb3(0x1e5)],{'stepName':_0x367435[_0x57dcb3(0x152)],'description':_0x57dcb3(0x1d8)+_0x367435[_0x57dcb3(0x152)]+'\x27'}),_0x367435[_0x57dcb3(0x176)][_0x57dcb3(0x16d)]['timeout']?.[_0x57dcb3(0x1e5)]&&_0x23c016(_0x367435[_0x57dcb3(0x176)][_0x57dcb3(0x16d)][_0x57dcb3(0x13f)][_0x57dcb3(0x1e5)],{'stepName':_0x367435[_0x57dcb3(0x152)],'description':'timeout\x20of\x20\x27'+_0x367435['name']+'\x27'}));}return _0x28e015;}function a121_0x4695(){const _0x372fc2=['MERGE_TO_MERGE_CHAIN','launched','MISSING_ENTRY_CRITERIA','758405dTCuqp','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','type','.segment','sort','.steps',').\x20Use\x20a\x20merge\x20step.','startsWith','entry_criteria','.next','END_STEP_HAS_NEXT_OR_WITH','Activation\x20step\x20requires\x20an\x20activation\x20reference','condition\x20of\x20\x27','.with.variants[','merge','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','entries','.with.condition.next','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','FEW_STEPS','\x20steps\x20(may\x20be\x20too\x20simple)','stage','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','UNUSED_EMBEDDED_SEGMENT','next','goal','TOO_MANY_STAGES','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','keys','decision_point','timeout','size','Jump\x20step\x20requires\x20a\x20target','segments.','source','target','milestone','841536ZqskLU','segment','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','88386rWviSU','.name','journey','error','.rule','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.with.activation','ab_test','Journey\x20has\x20no\x20goal\x20defined','name','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','stages','splice','versions[','rule','variants','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','get','every','148muZLNJ','jump','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','has','\x27\x20with\x20no\x20action\x20in\x20between','wait','level','MISSING_SEGMENT_REFERENCE','step\x20\x27','\x27\x20has\x20only\x20','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','\x27\x20(from:\x20','.steps[','\x27\x20of\x20\x27','percentage','INSUFFICIENT_STEPS','INVALID_AB_TEST_PERCENTAGES','condition','journeys','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','end','BRANCH_DIRECTLY_TO_MERGE','push','2351799EGKGFs','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','MISSING_NAME','with','Criteria\x20references\x20undefined\x20segment\x20\x27','SINGLE_INPUT_MERGE','MISSING_WAIT_PARAMS','branch\x20\x27','MISSING_STAGES','document','.entry_criteria','.milestone','values','stepNames','activation','35HMmwfz','indices','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','segments','match','Duplicate\x20step\x20name\x20\x27','\x20stages\x20but\x20maximum\x20is\x20','MISSING_CONDITIONS','.with.branches','.exit_criteria[','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','referencedSegments','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','branches','A/B\x20test\x20variant\x20\x27','map','excluded','Merge\x20step\x20\x27','.exit_criteria',').\x20Merge\x20is\x20unnecessary.','code','length','description','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','.with','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','join','goalIsInherited','Journey\x20name\x20is\x20required','state','Decision\x20branch\x20\x27','ref:','message','Embedded\x20segment\x20\x27','journeys[','\x27\x20(first\x20defined\x20at\x20steps[','.with.condition','.with.target','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','embeddedSegments','INVALID_NEXT_REFERENCE','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','some','add','activations','DUPLICATE_STEP_NAME','14672IbysZm','warning','CONVERGENCE_WITHOUT_MERGE','\x27\x20has\x20no\x20steps','stages[','set','path','activationKeys','Stage\x20\x27','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','steps','MISSING_ACTIVATION_DEFINITION','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','exit_criteria','MISSING_EXIT_CRITERIA','\x27\x20has\x20no\x20end\x20step','15306vCgeon','131456FyYDbw','.with.condition.timeout.next','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','.with.variants','INVALID_JUMP_TARGET','versions'];a121_0x4695=function(){return _0x372fc2;};return a121_0x4695();}function validateFlowControl(_0x1ee5dc,_0x5b3d38,_0x5b5fb3){const _0x149612=a121_0xb82e,_0x4931f0=[],_0x266d50=_0x149612(0x1b5)+_0x5b3d38+']',_0x3f5274=_0x1ee5dc['steps']||[];if(_0x3f5274['length']===0x0)return _0x4931f0;const _0x5eeec8=new Map();for(const _0x6b358c of _0x3f5274){_0x6b358c[_0x149612(0x152)]&&_0x5eeec8[_0x149612(0x1b6)](_0x6b358c['name'],_0x6b358c);}const _0x1987eb=buildConvergenceMap(_0x3f5274),_0x1b0115=_0x3f5274[_0x149612(0x1ad)](_0x5f1987=>_0x5f1987[_0x149612(0x1ce)]==='end');!_0x1b0115&&_0x4931f0[_0x149612(0x172)](createIssue(_0x149612(0x14c),_0x266d50+'.steps','MISSING_END_STEP',_0x149612(0x1b9)+_0x1ee5dc['name']+_0x149612(0x1c0),_0x5b5fb3));for(const [_0x361feb,_0x3ceffa]of _0x1987eb){const _0x5a3d27=_0x5eeec8[_0x149612(0x15a)](_0x361feb);if(!_0x5a3d27)continue;if(_0x3ceffa[_0x149612(0x198)]>0x1&&_0x5a3d27[_0x149612(0x1ce)]!==_0x149612(0x1da)){const _0x50a796=_0x3ceffa[_0x149612(0x192)](_0x55d6a0=>_0x55d6a0[_0x149612(0x199)])[_0x149612(0x19d)](',\x20');_0x4931f0['push'](createIssue(_0x149612(0x14c),_0x266d50+_0x149612(0x1d1),_0x149612(0x1b3),_0x149612(0x1ac)+_0x361feb+_0x149612(0x167)+_0x50a796+_0x149612(0x1d2),_0x5b5fb3));}_0x3ceffa[_0x149612(0x198)]===0x1&&_0x5a3d27[_0x149612(0x1ce)]===_0x149612(0x1da)&&_0x4931f0[_0x149612(0x172)](createIssue(_0x149612(0x1b2),_0x266d50+_0x149612(0x1d1),_0x149612(0x178),_0x149612(0x194)+_0x361feb+_0x149612(0x1bd)+_0x3ceffa[0x0]['description']+_0x149612(0x196),_0x5b5fb3));}for(const _0x11a3e2 of _0x3f5274){if(_0x11a3e2[_0x149612(0x1ce)]==='merge'&&_0x11a3e2[_0x149612(0x1e5)]){const _0x4c8a41=_0x5eeec8[_0x149612(0x15a)](_0x11a3e2[_0x149612(0x1e5)]);_0x4c8a41?.[_0x149612(0x1ce)]===_0x149612(0x1da)&&_0x4931f0[_0x149612(0x172)](createIssue(_0x149612(0x14c),_0x266d50+_0x149612(0x1d1),_0x149612(0x1c8),_0x149612(0x194)+_0x11a3e2[_0x149612(0x152)]+_0x149612(0x1dc)+_0x11a3e2[_0x149612(0x1e5)]+_0x149612(0x1ba),_0x5b5fb3));}}return _0x4931f0;}function validateCriteria(_0x22234a,_0x15fe5f,_0x572071){const _0x2d15e8=a121_0xb82e,_0x48e535=[];return _0x22234a[_0x2d15e8(0x147)]&&(_0x572071[_0x2d15e8(0x18e)]?.[_0x2d15e8(0x1ae)](_0x22234a[_0x2d15e8(0x147)]),!_0x22234a['segment'][_0x2d15e8(0x1d3)](_0x2d15e8(0x1a2))&&(_0x572071[_0x2d15e8(0x1aa)]&&!_0x572071['embeddedSegments'][_0x2d15e8(0x15f)](_0x22234a[_0x2d15e8(0x147)])&&_0x48e535['push'](createIssue(_0x2d15e8(0x14c),_0x15fe5f+_0x2d15e8(0x1cf),_0x2d15e8(0x163),_0x2d15e8(0x177)+_0x22234a[_0x2d15e8(0x147)]+'\x27',_0x572071)))),_0x48e535;}function a121_0xb82e(_0x85418e,_0x4d51ed){_0x85418e=_0x85418e-0x13c;const _0x4695e9=a121_0x4695();let _0xb82ec3=_0x4695e9[_0x85418e];return _0xb82ec3;}function validateEmbeddedSegment(_0x4960b1,_0x165401,_0x341095){const _0x1f2163=a121_0xb82e,_0x169188=[];return _0x4960b1['rule']&&_0x169188[_0x1f2163(0x172)](...validateRuleDef(_0x4960b1[_0x1f2163(0x157)],_0x165401+_0x1f2163(0x14d),_0x341095)),_0x169188;}function validateStage(_0xf03b4d,_0x169f01,_0x627c7e,_0x427146){const _0x3dc0b1=a121_0xb82e,_0x3b5ef5=[],_0x49ef29=_0x3dc0b1(0x1b5)+_0x169f01+']',_0x3387f6=new Map(),_0x3816b1=new Map();if(_0xf03b4d[_0x3dc0b1(0x1bb)]){for(let _0xfc8fcf=0x0;_0xfc8fcf<_0xf03b4d[_0x3dc0b1(0x1bb)][_0x3dc0b1(0x198)];_0xfc8fcf++){const _0x1b94e4=_0xf03b4d[_0x3dc0b1(0x1bb)][_0xfc8fcf];_0x1b94e4[_0x3dc0b1(0x152)]&&_0x3387f6[_0x3dc0b1(0x1b6)](_0x1b94e4[_0x3dc0b1(0x152)],_0x1b94e4);}for(let _0x52fd7e=0x0;_0x52fd7e<_0xf03b4d[_0x3dc0b1(0x1bb)][_0x3dc0b1(0x198)];_0x52fd7e++){const _0x54d734=_0xf03b4d[_0x3dc0b1(0x1bb)][_0x52fd7e],_0x328585=_0x49ef29+_0x3dc0b1(0x168)+_0x52fd7e+']';if(_0x54d734[_0x3dc0b1(0x152)]){if(_0x3816b1[_0x3dc0b1(0x15f)](_0x54d734[_0x3dc0b1(0x152)])){const _0x492e1f=_0x3816b1[_0x3dc0b1(0x15a)](_0x54d734[_0x3dc0b1(0x152)]);_0x3b5ef5[_0x3dc0b1(0x172)](createIssue(_0x3dc0b1(0x14c),_0x328585+_0x3dc0b1(0x14a),_0x3dc0b1(0x1b0),_0x3dc0b1(0x188)+_0x54d734[_0x3dc0b1(0x152)]+_0x3dc0b1(0x1a6)+_0x492e1f+'])',_0x427146));}else _0x3816b1[_0x3dc0b1(0x1b6)](_0x54d734[_0x3dc0b1(0x152)],_0x52fd7e);}_0x3b5ef5['push'](...validateStep(_0x54d734,_0x328585,_0x427146,_0x3387f6));}}_0xf03b4d[_0x3dc0b1(0x1d4)]&&_0x3b5ef5['push'](...validateCriteria(_0xf03b4d[_0x3dc0b1(0x1d4)],_0x49ef29+'.entry_criteria',_0x427146));if(_0xf03b4d[_0x3dc0b1(0x1be)])for(let _0x50c4f0=0x0;_0x50c4f0<_0xf03b4d[_0x3dc0b1(0x1be)][_0x3dc0b1(0x198)];_0x50c4f0++){_0x3b5ef5['push'](...validateCriteria(_0xf03b4d['exit_criteria'][_0x50c4f0],_0x49ef29+_0x3dc0b1(0x18c)+_0x50c4f0+']',_0x427146));}return _0xf03b4d[_0x3dc0b1(0x145)]&&_0x3b5ef5[_0x3dc0b1(0x172)](...validateCriteria(_0xf03b4d[_0x3dc0b1(0x145)],_0x49ef29+_0x3dc0b1(0x17e),_0x427146)),_0x3b5ef5[_0x3dc0b1(0x172)](...validateStageStructure(_0xf03b4d,_0x169f01,_0x627c7e,_0x427146)),_0x3b5ef5[_0x3dc0b1(0x172)](...validateFlowControl(_0xf03b4d,_0x169f01,_0x427146)),_0x3b5ef5;}function validateStagesForVersion(_0x6c5ea1,_0x5f1911,_0x5196ac,_0x24e235,_0x5930f7,_0x5ef7ab,_0x50bf2b){const _0x288ac0=a121_0xb82e;if(_0x6c5ea1[_0x288ac0(0x198)]===0x0){_0x5930f7[_0x288ac0(0x172)]({'level':_0x288ac0(0x14c),'path':_0x24e235+_0x288ac0(0x154),'code':_0x288ac0(0x17b),'message':_0x288ac0(0x16f),'location':getLocationFromPath(_0x5196ac[_0x288ac0(0x17c)],_0x5196ac['source'],[_0x288ac0(0x154)])});return;}const _0x2dc5e0=new Set();for(const _0x368ff9 of _0x6c5ea1){if(_0x368ff9['steps'])for(const _0x15e7ec of _0x368ff9[_0x288ac0(0x1bb)]){_0x15e7ec['name']&&_0x2dc5e0[_0x288ac0(0x1ae)](_0x15e7ec['name']);}}const _0x21fd66={..._0x5196ac,'stepNames':_0x2dc5e0},_0x2b21ed=validateVersionStructure(_0x6c5ea1,_0x21fd66);for(const _0x36a377 of _0x2b21ed){const _0x1d2dde=_0x24e235?{..._0x36a377,'path':''+_0x24e235+_0x36a377[_0x288ac0(0x1b7)]}:_0x36a377;if(_0x1d2dde[_0x288ac0(0x162)]==='error')_0x5930f7[_0x288ac0(0x172)](_0x1d2dde);else _0x5ef7ab[_0x288ac0(0x172)](_0x1d2dde);}for(let _0x54615f=0x0;_0x54615f<_0x6c5ea1[_0x288ac0(0x198)];_0x54615f++){const _0x3f7954=validateStage(_0x6c5ea1[_0x54615f],_0x54615f,_0x6c5ea1['length'],_0x21fd66);for(const _0x1d047e of _0x3f7954){const _0x560d82=_0x24e235?{..._0x1d047e,'path':''+_0x24e235+_0x1d047e[_0x288ac0(0x1b7)]}:_0x1d047e;if(_0x560d82[_0x288ac0(0x162)]==='error')_0x5930f7['push'](_0x560d82);else _0x5ef7ab[_0x288ac0(0x172)](_0x560d82);}}if(_0x5f1911[_0x288ac0(0x1e6)]){const _0xc7c80=_0x50bf2b?.[_0x288ac0(0x19e)]?'goal':_0x24e235+'goal',_0x3d23f6=validateCriteria(_0x5f1911[_0x288ac0(0x1e6)],_0xc7c80,_0x21fd66);for(const _0x21373c of _0x3d23f6){if(_0x21373c[_0x288ac0(0x162)]==='error')_0x5930f7[_0x288ac0(0x172)](_0x21373c);else _0x5ef7ab['push'](_0x21373c);}}}function extractVersionIndex(_0x171517){const _0x328a7f=a121_0xb82e,_0x67b589=_0x171517[_0x328a7f(0x187)](/^journeys\[(\d+)\]\./);return _0x67b589?_0x67b589[0x1]:undefined;}function deduplicateAcrossVersions(_0x23b231){const _0xb3e452=a121_0xb82e,_0x57b10c=new Map();for(let _0x31450e=0x0;_0x31450e<_0x23b231['length'];_0x31450e++){const _0x58e55e=_0x23b231[_0x31450e][_0xb3e452(0x197)]+':'+_0x23b231[_0x31450e]['message'],_0x19063d=extractVersionIndex(_0x23b231[_0x31450e][_0xb3e452(0x1b7)]),_0x31814d=_0x57b10c[_0xb3e452(0x15a)](_0x58e55e);if(_0x31814d){_0x31814d[_0xb3e452(0x183)][_0xb3e452(0x172)](_0x31450e);if(_0x19063d)_0x31814d[_0xb3e452(0x1c7)][_0xb3e452(0x1ae)](_0x19063d);}else _0x57b10c[_0xb3e452(0x1b6)](_0x58e55e,{'indices':[_0x31450e],'versions':new Set(_0x19063d?[_0x19063d]:[])});}const _0x37d8eb=new Set();for(const {indices:_0x488b4e,versions:_0x4b4efc}of _0x57b10c[_0xb3e452(0x17f)]()){if(_0x4b4efc[_0xb3e452(0x140)]<=0x1)continue;const _0x32ac62=_0x23b231[_0x488b4e[0x0]];_0x32ac62[_0xb3e452(0x1b7)]=_0x32ac62[_0xb3e452(0x1b7)]['replace'](/^journeys\[\d+\]\./,''),_0x32ac62['message']=_0x32ac62[_0xb3e452(0x1a3)]+'\x20(across\x20'+_0x4b4efc[_0xb3e452(0x140)]+'\x20versions)';for(let _0x4ccf24=0x1;_0x4ccf24<_0x488b4e[_0xb3e452(0x198)];_0x4ccf24++){_0x37d8eb[_0xb3e452(0x1ae)](_0x488b4e[_0x4ccf24]);}}const _0x3bb5e7=[..._0x37d8eb][_0xb3e452(0x1d0)]((_0x2fa7ff,_0x133a1a)=>_0x133a1a-_0x2fa7ff);for(const _0x30ec90 of _0x3bb5e7){_0x23b231[_0xb3e452(0x155)](_0x30ec90,0x1);}}export function validateJourneyDef(_0x20fff3,_0x3233f8={}){const _0x27147c=a121_0xb82e,_0x2f7a31=[],_0x337e8a=[];(!_0x20fff3['name']||_0x20fff3[_0x27147c(0x152)]['trim']()==='')&&_0x2f7a31[_0x27147c(0x172)]({'level':'error','path':_0x27147c(0x152),'code':_0x27147c(0x175),'message':_0x27147c(0x19f),'location':getLocationFromPath(_0x3233f8[_0x27147c(0x17c)],_0x3233f8[_0x27147c(0x143)],['name'])});const _0x3201a4=new Set();if(_0x20fff3[_0x27147c(0x186)])for(const _0x505a60 of Object[_0x27147c(0x13d)](_0x20fff3[_0x27147c(0x186)])){_0x3201a4['add'](_0x505a60);}const _0x11ef0a=new Set();if(_0x20fff3['activations'])for(const _0x4d000b of Object[_0x27147c(0x13d)](_0x20fff3[_0x27147c(0x1af)])){_0x11ef0a['add'](_0x4d000b);}const _0x2d3787=new Set(),_0x16866f={..._0x3233f8,'embeddedSegments':_0x3201a4,'referencedSegments':_0x2d3787,'activationKeys':_0x11ef0a['size']>0x0?_0x11ef0a:undefined};if(_0x20fff3[_0x27147c(0x186)])for(const [_0x1800bc,_0x43b765]of Object[_0x27147c(0x1dd)](_0x20fff3[_0x27147c(0x186)])){const _0x396b6d=validateEmbeddedSegment(_0x43b765,_0x27147c(0x142)+_0x1800bc,_0x16866f);for(const _0xee733d of _0x396b6d){if(_0xee733d[_0x27147c(0x162)]===_0x27147c(0x14c))_0x2f7a31[_0x27147c(0x172)](_0xee733d);else _0x337e8a[_0x27147c(0x172)](_0xee733d);}}const _0x2fa418=!!_0x20fff3[_0x27147c(0x1e6)],_0x3bf502=_0x20fff3['journeys']?.[_0x27147c(0x15b)](_0x1a1968=>!!_0x1a1968[_0x27147c(0x1e6)])??![];!_0x2fa418&&!_0x3bf502&&_0x337e8a[_0x27147c(0x172)]({'level':'warning','path':_0x27147c(0x1e6),'code':'MISSING_GOAL','message':_0x27147c(0x151),'location':getLocationFromPath(_0x3233f8['document'],_0x3233f8['source'],['goal'])});if(_0x20fff3[_0x27147c(0x16e)]&&_0x20fff3[_0x27147c(0x16e)][_0x27147c(0x198)]>0x0)for(let _0x344675=0x0;_0x344675<_0x20fff3['journeys']['length'];_0x344675++){const _0x4b7b57=_0x20fff3['journeys'][_0x344675];if(_0x20fff3[_0x27147c(0x16e)][_0x27147c(0x198)]>0x1&&_0x4b7b57['state']===_0x27147c(0x1c9))continue;const _0x27ed57=_0x4b7b57[_0x27147c(0x154)]||[],_0x203f33=_0x27147c(0x1a5)+_0x344675+'].',_0x3f0562=!!_0x4b7b57[_0x27147c(0x1e6)],_0x532ef1=_0x3f0562?{..._0x20fff3,'goal':_0x4b7b57['goal']}:_0x20fff3;validateStagesForVersion(_0x27ed57,_0x532ef1,_0x16866f,_0x203f33,_0x2f7a31,_0x337e8a,{'goalIsInherited':!_0x3f0562});}else{if(_0x20fff3[_0x27147c(0x1c7)]&&_0x20fff3[_0x27147c(0x1c7)][_0x27147c(0x198)]>0x0)for(let _0x55d531=0x0;_0x55d531<_0x20fff3['versions']['length'];_0x55d531++){const _0xeece2=_0x20fff3[_0x27147c(0x1c7)][_0x55d531];if(_0x20fff3[_0x27147c(0x1c7)][_0x27147c(0x198)]>0x1&&_0xeece2[_0x27147c(0x1a0)]===_0x27147c(0x1c9))continue;const _0x42a7e8=_0xeece2[_0x27147c(0x154)]||[],_0x4bae57=_0x27147c(0x156)+_0x55d531+'].';validateStagesForVersion(_0x42a7e8,_0x20fff3,_0x16866f,_0x4bae57,_0x2f7a31,_0x337e8a);}else{const _0x46c26e=_0x20fff3[_0x27147c(0x154)]||[];validateStagesForVersion(_0x46c26e,_0x20fff3,_0x16866f,'',_0x2f7a31,_0x337e8a);}}_0x20fff3[_0x27147c(0x16e)]&&_0x20fff3['journeys'][_0x27147c(0x198)]>0x1&&(deduplicateAcrossVersions(_0x2f7a31),deduplicateAcrossVersions(_0x337e8a));for(const _0x150081 of _0x3201a4){!_0x2d3787['has'](_0x150081)&&!_0x150081[_0x27147c(0x1d3)]('excluded_')&&_0x337e8a[_0x27147c(0x172)]({'level':_0x27147c(0x1b2),'path':'segments.'+_0x150081,'code':_0x27147c(0x1e4),'message':_0x27147c(0x1a4)+_0x150081+_0x27147c(0x18d),'location':getLocationFromPath(_0x3233f8[_0x27147c(0x17c)],_0x3233f8[_0x27147c(0x143)],[_0x27147c(0x186),_0x150081])});}return{'valid':_0x2f7a31['length']===0x0,'errors':_0x2f7a31,'warnings':_0x337e8a};}
1
+ (function(_0x23f3d3,_0x4cfacb){const _0x20cf33=a121_0x6ae4,_0x1f7263=_0x23f3d3();while(!![]){try{const _0x590290=-parseInt(_0x20cf33(0xd8))/0x1*(parseInt(_0x20cf33(0xcd))/0x2)+parseInt(_0x20cf33(0xfa))/0x3+parseInt(_0x20cf33(0x11e))/0x4*(parseInt(_0x20cf33(0x13a))/0x5)+-parseInt(_0x20cf33(0x10d))/0x6+parseInt(_0x20cf33(0x154))/0x7+parseInt(_0x20cf33(0x10b))/0x8+parseInt(_0x20cf33(0xda))/0x9;if(_0x590290===_0x4cfacb)break;else _0x1f7263['push'](_0x1f7263['shift']());}catch(_0x2743a4){_0x1f7263['push'](_0x1f7263['shift']());}}}(a121_0x39d5,0xbfaf9));import{getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5dc1aa,_0xbc4278,_0x538144,_0x337be7,_0xd991ce,_0x3a0cec){const _0x52a23b=a121_0x6ae4;return{'level':_0x5dc1aa,'path':_0xbc4278,'code':_0x538144,'message':_0x337be7,'location':getLocationFromPath(_0xd991ce[_0x52a23b(0xe0)],_0xd991ce[_0x52a23b(0x14a)],pathToArray(_0x3a0cec??_0xbc4278))};}function validateVersionStructure(_0x5b7989,_0x3642dd){const _0x53bc12=a121_0x6ae4,_0x583c82=[];return _0x5b7989[_0x53bc12(0xc5)]>MAX_STAGES&&_0x583c82[_0x53bc12(0xde)](createIssue(_0x53bc12(0xe5),_0x53bc12(0x123),_0x53bc12(0x14d),_0x53bc12(0xff)+_0x5b7989[_0x53bc12(0xc5)]+_0x53bc12(0x114)+MAX_STAGES,_0x3642dd)),_0x583c82;}function validateStageStructure(_0x17f7fd,_0x24c676,_0x4f0619,_0x535626){const _0x474aa9=a121_0x6ae4,_0x55e50c=[],_0x2fd732=_0x474aa9(0x138)+_0x24c676+']';_0x24c676===0x0&&!_0x17f7fd[_0x474aa9(0x103)]&&_0x55e50c['push'](createIssue(_0x474aa9(0xe5),_0x2fd732+'.entry_criteria',_0x474aa9(0x102),_0x474aa9(0xbe)+_0x17f7fd[_0x474aa9(0xbf)]+_0x474aa9(0x127),_0x535626,_0x2fd732));const _0x1af60e=_0x24c676===_0x4f0619-0x1;!_0x1af60e&&!_0x17f7fd[_0x474aa9(0x15f)]&&_0x55e50c['push'](createIssue(_0x474aa9(0xe5),_0x2fd732+'.milestone',_0x474aa9(0x10c),'Stage\x20\x27'+_0x17f7fd['name']+_0x474aa9(0x11d),_0x535626,_0x2fd732));(!_0x17f7fd[_0x474aa9(0x128)]||_0x17f7fd['exit_criteria'][_0x474aa9(0xc5)]===0x0)&&_0x55e50c[_0x474aa9(0xde)](createIssue(_0x474aa9(0xd0),_0x2fd732+'.exit_criteria',_0x474aa9(0x107),_0x474aa9(0xbe)+_0x17f7fd[_0x474aa9(0xbf)]+_0x474aa9(0xd1),_0x535626,_0x2fd732));const _0x4a38f0=_0x17f7fd[_0x474aa9(0x15a)]?.['length']??0x0;if(_0x4a38f0===0x0)_0x55e50c[_0x474aa9(0xde)](createIssue(_0x474aa9(0xe5),_0x2fd732+_0x474aa9(0x121),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x17f7fd['name']+'\x27\x20has\x20no\x20steps',_0x535626,_0x2fd732+_0x474aa9(0x121)));else{if(_0x4a38f0===0x1)_0x55e50c[_0x474aa9(0xde)](createIssue(_0x474aa9(0xd0),_0x2fd732+_0x474aa9(0x121),'INSUFFICIENT_STEPS',_0x474aa9(0xbe)+_0x17f7fd[_0x474aa9(0xbf)]+'\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)',_0x535626,_0x2fd732+_0x474aa9(0x121)));else _0x4a38f0<=0x3&&_0x55e50c[_0x474aa9(0xde)](createIssue(_0x474aa9(0xd0),_0x2fd732+_0x474aa9(0x121),_0x474aa9(0x151),_0x474aa9(0xbe)+_0x17f7fd[_0x474aa9(0xbf)]+'\x27\x20has\x20only\x20'+_0x4a38f0+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x535626,_0x2fd732+_0x474aa9(0x121)));}return _0x55e50c;}function validateStep(_0x47a9a7,_0x1699b5,_0x1367c8,_0xf9373f){const _0x3f9541=a121_0x6ae4,_0x3ce612=[];if(_0x47a9a7[_0x3f9541(0x134)]===_0x3f9541(0x110))return _0x47a9a7[_0x3f9541(0xec)]&&_0x3ce612[_0x3f9541(0xde)](createIssue('error',_0x1699b5+'.next',_0x3f9541(0x104),'End\x20step\x20\x27'+_0x47a9a7[_0x3f9541(0xbf)]+_0x3f9541(0xf2),_0x1367c8)),_0x3f9541(0xc0)in _0x47a9a7&&_0x47a9a7[_0x3f9541(0xc0)]!==undefined&&_0x3ce612[_0x3f9541(0xde)](createIssue(_0x3f9541(0xe5),_0x1699b5+_0x3f9541(0x143),_0x3f9541(0x104),_0x3f9541(0xc3)+_0x47a9a7[_0x3f9541(0xbf)]+_0x3f9541(0xe6),_0x1367c8)),_0x3ce612;_0x47a9a7[_0x3f9541(0xec)]&&(_0x1367c8[_0x3f9541(0xcc)]&&!_0x1367c8[_0x3f9541(0xcc)][_0x3f9541(0x10e)](_0x47a9a7['next'])&&_0x3ce612['push'](createIssue(_0x3f9541(0xe5),_0x1699b5+_0x3f9541(0x152),'INVALID_NEXT_REFERENCE',_0x3f9541(0xed)+_0x47a9a7[_0x3f9541(0xec)]+'\x27',_0x1367c8)));switch(_0x47a9a7[_0x3f9541(0x134)]){case'wait':_0x3ce612['push'](...validateWaitStep(_0x47a9a7,_0x1699b5,_0x1367c8,_0xf9373f));break;case _0x3f9541(0xea):_0x3ce612['push'](...validateActivationStep(_0x47a9a7,_0x1699b5,_0x1367c8));break;case _0x3f9541(0x15d):_0x3ce612['push'](...validateDecisionPointStep(_0x47a9a7,_0x1699b5,_0x1367c8,_0xf9373f));break;case'ab_test':_0x3ce612[_0x3f9541(0xde)](...validateAbTestStep(_0x47a9a7,_0x1699b5,_0x1367c8,_0xf9373f));break;case _0x3f9541(0xcf):_0x3ce612[_0x3f9541(0xde)](...validateJumpStep(_0x47a9a7,_0x1699b5,_0x1367c8));break;}return _0x3ce612;}function validateWaitStep(_0x37468e,_0x2a55c5,_0x3afb70,_0x382347){const _0x1453d8=a121_0x6ae4,_0x2d69bc=[];if(!_0x37468e[_0x1453d8(0xc0)])return _0x2d69bc[_0x1453d8(0xde)](createIssue(_0x1453d8(0xe5),_0x2a55c5+_0x1453d8(0x143),'MISSING_WAIT_PARAMS',_0x1453d8(0x15e),_0x3afb70,_0x2a55c5)),_0x2d69bc;if(_0x37468e[_0x1453d8(0xc0)]['condition']){const _0x5cfbba=_0x37468e['with'][_0x1453d8(0x136)];if(_0x5cfbba[_0x1453d8(0x13d)]){_0x3afb70[_0x1453d8(0x158)]?.[_0x1453d8(0xe4)](_0x5cfbba[_0x1453d8(0x13d)]);!_0x5cfbba[_0x1453d8(0x13d)][_0x1453d8(0x132)](_0x1453d8(0x10a))&&(_0x3afb70['embeddedSegments']&&!_0x3afb70[_0x1453d8(0xee)][_0x1453d8(0x10e)](_0x5cfbba['segment'])&&_0x2d69bc[_0x1453d8(0xde)](createIssue('error',_0x2a55c5+_0x1453d8(0x150),'MISSING_SEGMENT_REFERENCE',_0x1453d8(0x15c)+_0x5cfbba[_0x1453d8(0x13d)]+_0x1453d8(0x112),_0x3afb70)));_0x5cfbba[_0x1453d8(0xec)]&&_0x3afb70['stepNames']&&!_0x3afb70['stepNames'][_0x1453d8(0x10e)](_0x5cfbba['next'])&&_0x2d69bc[_0x1453d8(0xde)](createIssue(_0x1453d8(0xe5),_0x2a55c5+_0x1453d8(0x106),_0x1453d8(0x146),_0x1453d8(0x12f)+_0x5cfbba[_0x1453d8(0xec)]+'\x27',_0x3afb70));_0x5cfbba[_0x1453d8(0xf1)]?.[_0x1453d8(0xec)]&&_0x3afb70[_0x1453d8(0xcc)]&&!_0x3afb70[_0x1453d8(0xcc)][_0x1453d8(0x10e)](_0x5cfbba[_0x1453d8(0xf1)][_0x1453d8(0xec)])&&_0x2d69bc[_0x1453d8(0xde)](createIssue(_0x1453d8(0xe5),_0x2a55c5+_0x1453d8(0x111),'INVALID_NEXT_REFERENCE',_0x1453d8(0x11f)+_0x5cfbba['timeout'][_0x1453d8(0xec)]+'\x27',_0x3afb70));const _0x1fd21c=_0x5cfbba[_0x1453d8(0xec)]||_0x37468e[_0x1453d8(0xec)],_0x450a83=_0x5cfbba[_0x1453d8(0xf1)]?.['next']||_0x37468e[_0x1453d8(0xec)];if(_0x1fd21c){const _0x315c87=_0x382347[_0x1453d8(0x117)](_0x1fd21c);_0x315c87?.[_0x1453d8(0x134)]===_0x1453d8(0xdf)&&_0x2d69bc[_0x1453d8(0xde)](createIssue('warning',_0x2a55c5+'.with.condition.next',_0x1453d8(0x118),_0x1453d8(0x130)+_0x1fd21c+_0x1453d8(0x100),_0x3afb70,_0x2a55c5+_0x1453d8(0x155)));}if(_0x450a83){const _0x3fd9a8=_0x382347[_0x1453d8(0x117)](_0x450a83);_0x3fd9a8?.[_0x1453d8(0x134)]===_0x1453d8(0xdf)&&_0x2d69bc[_0x1453d8(0xde)](createIssue(_0x1453d8(0xd0),_0x2a55c5+'.with.condition.timeout.next',_0x1453d8(0x118),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x450a83+_0x1453d8(0x100),_0x3afb70,_0x2a55c5+_0x1453d8(0xc2)));}}}return _0x2d69bc;}function validateActivationStep(_0x373dd1,_0x30426f,_0x44abc0){const _0x5063e3=a121_0x6ae4,_0x492c65=[];if(!_0x373dd1['with']?.['activation'])return _0x492c65[_0x5063e3(0xde)](createIssue(_0x5063e3(0xe5),_0x30426f+_0x5063e3(0x157),'MISSING_ACTIVATION_REF',_0x5063e3(0x105),_0x44abc0,_0x30426f)),_0x492c65;const _0x3d723e=_0x373dd1['with']['activation'];return _0x44abc0[_0x5063e3(0x135)]&&!_0x3d723e[_0x5063e3(0x132)](_0x5063e3(0x10a))&&(!_0x44abc0['activationKeys'][_0x5063e3(0x10e)](_0x3d723e)&&_0x492c65['push'](createIssue(_0x5063e3(0xe5),_0x30426f+_0x5063e3(0x157),_0x5063e3(0x142),_0x5063e3(0x11b)+_0x3d723e+_0x5063e3(0x12c),_0x44abc0))),_0x492c65;}function validateDecisionPointStep(_0x4739ac,_0xadb4b2,_0x1fdf5d,_0x161cd5){const _0x3a1eba=a121_0x6ae4,_0x485935=[];if(!_0x4739ac[_0x3a1eba(0xc0)]?.['branches']||_0x4739ac[_0x3a1eba(0xc0)][_0x3a1eba(0xd6)][_0x3a1eba(0xc5)]===0x0)return _0x485935[_0x3a1eba(0xde)](createIssue(_0x3a1eba(0xe5),_0xadb4b2+'.with.branches',_0x3a1eba(0xcb),_0x3a1eba(0x101),_0x1fdf5d,_0xadb4b2)),_0x485935;for(let _0x507692=0x0;_0x507692<_0x4739ac['with'][_0x3a1eba(0xd6)]['length'];_0x507692++){const _0x1b4cc8=_0x4739ac[_0x3a1eba(0xc0)][_0x3a1eba(0xd6)][_0x507692],_0x32c8a9=_0xadb4b2+_0x3a1eba(0x13e)+_0x507692+']';_0x1b4cc8['segment']&&!_0x1b4cc8[_0x3a1eba(0xe3)]&&(_0x1fdf5d[_0x3a1eba(0x158)]?.['add'](_0x1b4cc8[_0x3a1eba(0x13d)]),!_0x1b4cc8[_0x3a1eba(0x13d)][_0x3a1eba(0x132)]('ref:')&&(_0x1fdf5d[_0x3a1eba(0xee)]&&!_0x1fdf5d[_0x3a1eba(0xee)][_0x3a1eba(0x10e)](_0x1b4cc8['segment'])&&_0x485935[_0x3a1eba(0xde)](createIssue(_0x3a1eba(0xe5),_0x32c8a9+_0x3a1eba(0xc4),_0x3a1eba(0x12d),_0x3a1eba(0xfb)+_0x1b4cc8[_0x3a1eba(0x13d)]+'\x27',_0x1fdf5d))));_0x1b4cc8['next']&&_0x1fdf5d[_0x3a1eba(0xcc)]&&!_0x1fdf5d['stepNames'][_0x3a1eba(0x10e)](_0x1b4cc8[_0x3a1eba(0xec)])&&_0x485935['push'](createIssue('error',_0x32c8a9+'.next',_0x3a1eba(0x146),'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x1b4cc8[_0x3a1eba(0xec)]+'\x27',_0x1fdf5d));if(_0x1b4cc8[_0x3a1eba(0xec)]){const _0x202cd1=_0x161cd5[_0x3a1eba(0x117)](_0x1b4cc8[_0x3a1eba(0xec)]);_0x202cd1?.[_0x3a1eba(0x134)]==='merge'&&_0x485935[_0x3a1eba(0xde)](createIssue(_0x3a1eba(0xd0),_0x32c8a9+'.next',_0x3a1eba(0x118),'Decision\x20branch\x20\x27'+_0x1b4cc8[_0x3a1eba(0xbf)]+_0x3a1eba(0x141)+_0x1b4cc8[_0x3a1eba(0xec)]+_0x3a1eba(0x153),_0x1fdf5d));}}return _0x485935;}function validateAbTestStep(_0x300033,_0x59507b,_0x1682ea,_0x4d553f){const _0x3f4ea0=a121_0x6ae4,_0xdac850=[];if(!_0x300033[_0x3f4ea0(0xc0)]?.[_0x3f4ea0(0x144)]||_0x300033['with'][_0x3f4ea0(0x144)][_0x3f4ea0(0xc5)]===0x0)return _0xdac850[_0x3f4ea0(0xde)](createIssue(_0x3f4ea0(0xe5),_0x59507b+_0x3f4ea0(0x139),'MISSING_CONDITIONS','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x1682ea,_0x59507b)),_0xdac850;const _0x5e4bac=_0x300033[_0x3f4ea0(0xc0)][_0x3f4ea0(0x144)][_0x3f4ea0(0xf4)]((_0x4e49e5,_0x4dcaef)=>_0x4e49e5+(_0x4dcaef['percentage']||0x0),0x0);Math[_0x3f4ea0(0x13b)](_0x5e4bac-0x64)>0.01&&_0xdac850[_0x3f4ea0(0xde)](createIssue(_0x3f4ea0(0xe5),_0x59507b+_0x3f4ea0(0x139),_0x3f4ea0(0x13c),'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x5e4bac+'%)',_0x1682ea));for(let _0x2b1c51=0x0;_0x2b1c51<_0x300033[_0x3f4ea0(0xc0)][_0x3f4ea0(0x144)][_0x3f4ea0(0xc5)];_0x2b1c51++){const _0x534ffb=_0x300033[_0x3f4ea0(0xc0)][_0x3f4ea0(0x144)][_0x2b1c51],_0xd90488=_0x59507b+_0x3f4ea0(0xe2)+_0x2b1c51+']';_0x534ffb[_0x3f4ea0(0xec)]&&_0x1682ea[_0x3f4ea0(0xcc)]&&!_0x1682ea['stepNames'][_0x3f4ea0(0x10e)](_0x534ffb[_0x3f4ea0(0xec)])&&_0xdac850[_0x3f4ea0(0xde)](createIssue('error',_0xd90488+'.next',_0x3f4ea0(0x146),_0x3f4ea0(0x137)+_0x534ffb[_0x3f4ea0(0xec)]+'\x27',_0x1682ea));if(_0x534ffb['next']){const _0x188e46=_0x4d553f[_0x3f4ea0(0x117)](_0x534ffb[_0x3f4ea0(0xec)]);_0x188e46?.[_0x3f4ea0(0x134)]===_0x3f4ea0(0xdf)&&_0xdac850[_0x3f4ea0(0xde)](createIssue(_0x3f4ea0(0xd0),_0xd90488+_0x3f4ea0(0x152),_0x3f4ea0(0x118),_0x3f4ea0(0x12b)+_0x534ffb['name']+_0x3f4ea0(0x141)+_0x534ffb[_0x3f4ea0(0xec)]+_0x3f4ea0(0x153),_0x1682ea));}}return _0xdac850;}function validateJumpStep(_0x8df64a,_0x59733c,_0x29ab5e){const _0x1ffa9b=a121_0x6ae4,_0x286b22=[];if(!_0x8df64a['with']?.[_0x1ffa9b(0xd9)])return _0x286b22[_0x1ffa9b(0xde)](createIssue('error',_0x59733c+'.with.target',_0x1ffa9b(0x122),_0x1ffa9b(0x162),_0x29ab5e,_0x59733c)),_0x286b22;return(!_0x8df64a['with'][_0x1ffa9b(0xd9)][_0x1ffa9b(0x140)]||!_0x8df64a['with']['target'][_0x1ffa9b(0xf0)])&&_0x286b22[_0x1ffa9b(0xde)](createIssue(_0x1ffa9b(0xe5),_0x59733c+_0x1ffa9b(0xd4),_0x1ffa9b(0x122),_0x1ffa9b(0xef),_0x29ab5e)),_0x286b22;}function buildConvergenceMap(_0x93cf0d){const _0x1197df=a121_0x6ae4,_0x4a9cf4=new Map();function _0x4387db(_0x20d156,_0x568b02){const _0x2e377b=a121_0x6ae4,_0x3eeb5c=_0x4a9cf4['get'](_0x20d156)||[];_0x3eeb5c['push'](_0x568b02),_0x4a9cf4[_0x2e377b(0xe9)](_0x20d156,_0x3eeb5c);}for(const _0x2a5322 of _0x93cf0d){_0x2a5322[_0x1197df(0xec)]&&_0x4387db(_0x2a5322[_0x1197df(0xec)],{'stepName':_0x2a5322[_0x1197df(0xbf)],'description':_0x1197df(0x14f)+_0x2a5322['name']+'\x27'});if(_0x2a5322[_0x1197df(0x134)]==='decision_point'&&_0x2a5322[_0x1197df(0xc0)]?.[_0x1197df(0xd6)])for(const _0x2ebbe5 of _0x2a5322[_0x1197df(0xc0)][_0x1197df(0xd6)]){_0x2ebbe5[_0x1197df(0xec)]&&_0x4387db(_0x2ebbe5[_0x1197df(0xec)],{'stepName':_0x2a5322[_0x1197df(0xbf)],'description':'branch\x20\x27'+_0x2ebbe5['name']+_0x1197df(0xbd)+_0x2a5322[_0x1197df(0xbf)]+'\x27'});}if(_0x2a5322[_0x1197df(0x134)]===_0x1197df(0x12a)&&_0x2a5322['with']?.[_0x1197df(0x144)])for(const _0x43dfc3 of _0x2a5322[_0x1197df(0xc0)][_0x1197df(0x144)]){_0x43dfc3[_0x1197df(0xec)]&&_0x4387db(_0x43dfc3['next'],{'stepName':_0x2a5322[_0x1197df(0xbf)],'description':'variant\x20\x27'+_0x43dfc3[_0x1197df(0xbf)]+'\x27\x20of\x20\x27'+_0x2a5322[_0x1197df(0xbf)]+'\x27'});}_0x2a5322['type']===_0x1197df(0x159)&&_0x2a5322[_0x1197df(0xc0)]?.['condition']&&(_0x2a5322[_0x1197df(0xc0)]['condition']['next']&&_0x4387db(_0x2a5322[_0x1197df(0xc0)][_0x1197df(0x136)][_0x1197df(0xec)],{'stepName':_0x2a5322['name'],'description':'condition\x20of\x20\x27'+_0x2a5322[_0x1197df(0xbf)]+'\x27'}),_0x2a5322[_0x1197df(0xc0)][_0x1197df(0x136)][_0x1197df(0xf1)]?.[_0x1197df(0xec)]&&_0x4387db(_0x2a5322['with'][_0x1197df(0x136)][_0x1197df(0xf1)][_0x1197df(0xec)],{'stepName':_0x2a5322[_0x1197df(0xbf)],'description':_0x1197df(0xbc)+_0x2a5322['name']+'\x27'}));}return _0x4a9cf4;}function validateFlowControl(_0x1e8a8b,_0x429614,_0x5d830f){const _0x2e0606=a121_0x6ae4,_0x3dc4fb=[],_0x56e373=_0x2e0606(0x138)+_0x429614+']',_0x5ee387=_0x1e8a8b[_0x2e0606(0x15a)]||[];if(_0x5ee387[_0x2e0606(0xc5)]===0x0)return _0x3dc4fb;const _0x14931d=new Map();for(const _0x36eae4 of _0x5ee387){_0x36eae4['name']&&_0x14931d[_0x2e0606(0xe9)](_0x36eae4['name'],_0x36eae4);}const _0x2083f8=buildConvergenceMap(_0x5ee387),_0x49fb08=_0x5ee387[_0x2e0606(0xe7)](_0xb0b373=>_0xb0b373[_0x2e0606(0x134)]==='end');!_0x49fb08&&_0x3dc4fb[_0x2e0606(0xde)](createIssue('error',_0x56e373+_0x2e0606(0x121),_0x2e0606(0xd2),_0x2e0606(0xbe)+_0x1e8a8b[_0x2e0606(0xbf)]+_0x2e0606(0xce),_0x5d830f));for(const [_0x58ee05,_0x8edff3]of _0x2083f8){const _0xd3fe1d=_0x14931d[_0x2e0606(0x117)](_0x58ee05);if(!_0xd3fe1d)continue;if(_0x8edff3[_0x2e0606(0xc5)]>0x1&&_0xd3fe1d['type']!==_0x2e0606(0xdf)){const _0x1fde2e=_0x8edff3[_0x2e0606(0x161)](_0x288185=>_0x288185[_0x2e0606(0x119)])[_0x2e0606(0x126)](',\x20');_0x3dc4fb['push'](createIssue(_0x2e0606(0xe5),_0x56e373+_0x2e0606(0x121),_0x2e0606(0xc1),_0x2e0606(0x160)+_0x58ee05+'\x27\x20(from:\x20'+_0x1fde2e+_0x2e0606(0x133),_0x5d830f));}_0x8edff3[_0x2e0606(0xc5)]===0x1&&_0xd3fe1d['type']===_0x2e0606(0xdf)&&_0x3dc4fb[_0x2e0606(0xde)](createIssue(_0x2e0606(0xd0),_0x56e373+'.steps',_0x2e0606(0x124),_0x2e0606(0xf6)+_0x58ee05+_0x2e0606(0x149)+_0x8edff3[0x0][_0x2e0606(0x119)]+_0x2e0606(0xe1),_0x5d830f));}for(const _0x3bb7c8 of _0x5ee387){if(_0x3bb7c8['type']===_0x2e0606(0xdf)&&_0x3bb7c8[_0x2e0606(0xec)]){const _0x528b39=_0x14931d[_0x2e0606(0x117)](_0x3bb7c8[_0x2e0606(0xec)]);_0x528b39?.[_0x2e0606(0x134)]===_0x2e0606(0xdf)&&_0x3dc4fb['push'](createIssue(_0x2e0606(0xe5),_0x56e373+'.steps',_0x2e0606(0x11c),'Merge\x20step\x20\x27'+_0x3bb7c8[_0x2e0606(0xbf)]+_0x2e0606(0xf9)+_0x3bb7c8[_0x2e0606(0xec)]+_0x2e0606(0xf7),_0x5d830f));}}return _0x3dc4fb;}function validateCriteria(_0xd1845f,_0x1ae2e2,_0x4d8070){const _0x59d7cd=a121_0x6ae4,_0x15e837=[];return _0xd1845f[_0x59d7cd(0x13d)]&&(_0x4d8070[_0x59d7cd(0x158)]?.[_0x59d7cd(0xe4)](_0xd1845f[_0x59d7cd(0x13d)]),!_0xd1845f[_0x59d7cd(0x13d)][_0x59d7cd(0x132)](_0x59d7cd(0x10a))&&(_0x4d8070[_0x59d7cd(0xee)]&&!_0x4d8070[_0x59d7cd(0xee)][_0x59d7cd(0x10e)](_0xd1845f[_0x59d7cd(0x13d)])&&_0x15e837[_0x59d7cd(0xde)](createIssue(_0x59d7cd(0xe5),_0x1ae2e2+_0x59d7cd(0xc4),_0x59d7cd(0x12d),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0xd1845f[_0x59d7cd(0x13d)]+'\x27',_0x4d8070)))),_0x15e837;}function validateEmbeddedSegment(_0x4a2ee6,_0x59305a,_0x2bffd3){const _0x276e00=a121_0x6ae4,_0x111d59=[];return _0x4a2ee6[_0x276e00(0xc7)]&&_0x111d59['push'](...validateRuleDef(_0x4a2ee6['rule'],_0x59305a+'.rule',_0x2bffd3)),_0x111d59;}function validateStage(_0x7b8424,_0x2527df,_0x238095,_0x31568a){const _0x4ada3e=a121_0x6ae4,_0xf1443=[],_0x3a9d6a=_0x4ada3e(0x138)+_0x2527df+']',_0x38075c=new Map(),_0x1d3a8d=new Map();if(_0x7b8424[_0x4ada3e(0x15a)]){for(let _0x515a77=0x0;_0x515a77<_0x7b8424[_0x4ada3e(0x15a)][_0x4ada3e(0xc5)];_0x515a77++){const _0x573daf=_0x7b8424[_0x4ada3e(0x15a)][_0x515a77];_0x573daf[_0x4ada3e(0xbf)]&&_0x38075c[_0x4ada3e(0xe9)](_0x573daf[_0x4ada3e(0xbf)],_0x573daf);}for(let _0x52f7db=0x0;_0x52f7db<_0x7b8424[_0x4ada3e(0x15a)]['length'];_0x52f7db++){const _0x1e81a6=_0x7b8424['steps'][_0x52f7db],_0x700b9=_0x3a9d6a+_0x4ada3e(0x113)+_0x52f7db+']';if(_0x1e81a6[_0x4ada3e(0xbf)]){if(_0x1d3a8d['has'](_0x1e81a6[_0x4ada3e(0xbf)])){const _0x1ca5e5=_0x1d3a8d[_0x4ada3e(0x117)](_0x1e81a6['name']);_0xf1443[_0x4ada3e(0xde)](createIssue('error',_0x700b9+'.name',_0x4ada3e(0xdb),_0x4ada3e(0xfc)+_0x1e81a6[_0x4ada3e(0xbf)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x1ca5e5+'])',_0x31568a));}else _0x1d3a8d[_0x4ada3e(0xe9)](_0x1e81a6[_0x4ada3e(0xbf)],_0x52f7db);}_0xf1443[_0x4ada3e(0xde)](...validateStep(_0x1e81a6,_0x700b9,_0x31568a,_0x38075c));}}_0x7b8424['entry_criteria']&&_0xf1443[_0x4ada3e(0xde)](...validateCriteria(_0x7b8424[_0x4ada3e(0x103)],_0x3a9d6a+_0x4ada3e(0xeb),_0x31568a));if(_0x7b8424[_0x4ada3e(0x128)])for(let _0x108801=0x0;_0x108801<_0x7b8424[_0x4ada3e(0x128)][_0x4ada3e(0xc5)];_0x108801++){_0xf1443[_0x4ada3e(0xde)](...validateCriteria(_0x7b8424[_0x4ada3e(0x128)][_0x108801],_0x3a9d6a+'.exit_criteria['+_0x108801+']',_0x31568a));}return _0x7b8424[_0x4ada3e(0x15f)]&&_0xf1443[_0x4ada3e(0xde)](...validateCriteria(_0x7b8424[_0x4ada3e(0x15f)],_0x3a9d6a+_0x4ada3e(0xd5),_0x31568a)),_0xf1443[_0x4ada3e(0xde)](...validateStageStructure(_0x7b8424,_0x2527df,_0x238095,_0x31568a)),_0xf1443[_0x4ada3e(0xde)](...validateFlowControl(_0x7b8424,_0x2527df,_0x31568a)),_0xf1443;}function validateStagesForVersion(_0x30e467,_0x104d3c,_0x4de21c,_0x370890,_0x49ace2,_0x199445,_0x143198){const _0x18cbc7=a121_0x6ae4;if(_0x30e467[_0x18cbc7(0xc5)]===0x0){_0x49ace2[_0x18cbc7(0xde)]({'level':_0x18cbc7(0xe5),'path':_0x370890+_0x18cbc7(0x123),'code':_0x18cbc7(0x13f),'message':_0x18cbc7(0xdc),'location':getLocationFromPath(_0x4de21c[_0x18cbc7(0xe0)],_0x4de21c[_0x18cbc7(0x14a)],['stages'])});return;}const _0x244f6f=new Set();for(const _0x56adcd of _0x30e467){if(_0x56adcd['steps'])for(const _0x1918da of _0x56adcd[_0x18cbc7(0x15a)]){_0x1918da[_0x18cbc7(0xbf)]&&_0x244f6f['add'](_0x1918da[_0x18cbc7(0xbf)]);}}const _0xe1f191={..._0x4de21c,'stepNames':_0x244f6f},_0x1d7e80=validateVersionStructure(_0x30e467,_0xe1f191);for(const _0x52a375 of _0x1d7e80){const _0x310efe=_0x370890?{..._0x52a375,'path':''+_0x370890+_0x52a375[_0x18cbc7(0xfe)]}:_0x52a375;if(_0x310efe['level']==='error')_0x49ace2[_0x18cbc7(0xde)](_0x310efe);else _0x199445['push'](_0x310efe);}for(let _0x536796=0x0;_0x536796<_0x30e467[_0x18cbc7(0xc5)];_0x536796++){const _0x889ae8=validateStage(_0x30e467[_0x536796],_0x536796,_0x30e467[_0x18cbc7(0xc5)],_0xe1f191);for(const _0x1467d6 of _0x889ae8){const _0xb8cca1=_0x370890?{..._0x1467d6,'path':''+_0x370890+_0x1467d6[_0x18cbc7(0xfe)]}:_0x1467d6;if(_0xb8cca1[_0x18cbc7(0x10f)]==='error')_0x49ace2[_0x18cbc7(0xde)](_0xb8cca1);else _0x199445[_0x18cbc7(0xde)](_0xb8cca1);}}if(_0x104d3c['goal']){const _0x24fcd7=_0x143198?.[_0x18cbc7(0xf5)]?_0x18cbc7(0x131):_0x370890+_0x18cbc7(0x131),_0x4217d3=validateCriteria(_0x104d3c[_0x18cbc7(0x131)],_0x24fcd7,_0xe1f191);for(const _0x456f16 of _0x4217d3){if(_0x456f16[_0x18cbc7(0x10f)]==='error')_0x49ace2[_0x18cbc7(0xde)](_0x456f16);else _0x199445[_0x18cbc7(0xde)](_0x456f16);}}}function extractVersionIndex(_0x54aa58){const _0x4f3895=a121_0x6ae4,_0x3ac537=_0x54aa58[_0x4f3895(0xd3)](/^journeys\[(\d+)\]\./);return _0x3ac537?_0x3ac537[0x1]:undefined;}function a121_0x39d5(){const _0x3c0a2d=['5MqfoRJ','abs','INVALID_AB_TEST_PERCENTAGES','segment','.with.branches[','MISSING_STAGES','journey','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','MISSING_ACTIVATION_DEFINITION','.with','variants','message','INVALID_NEXT_REFERENCE','every','segments.','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','source','trim','MISSING_GOAL','TOO_MANY_STAGES','Journey\x20name\x20is\x20required','step\x20\x27','.with.condition.segment','FEW_STEPS','.next','\x27\x20with\x20no\x20action\x20in\x20between','7828296BOsyQh','.with.condition','\x20(across\x20','.with.activation','referencedSegments','wait','steps','segments','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','decision_point','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','milestone','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','map','Jump\x20step\x20requires\x20a\x20target','timeout\x20of\x20\x27','\x27\x20of\x20\x27','Stage\x20\x27','name','with','CONVERGENCE_WITHOUT_MERGE','.with.condition.timeout','End\x20step\x20\x27','.segment','length','versions','rule','size','launched','values','MISSING_CONDITIONS','stepNames','362986ZACMNE','\x27\x20has\x20no\x20end\x20step','jump','warning','\x27\x20has\x20no\x20exit_criteria\x20defined','MISSING_END_STEP','match','.with.target','.milestone','branches','journeys[','7tjRAbt','target','4108284qxNohJ','DUPLICATE_STEP_NAME','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','activations','push','merge','document',').\x20Merge\x20is\x20unnecessary.','.with.variants[','excluded','add','error','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','some','indices','set','activation','.entry_criteria','next','Step\x20references\x20non-existent\x20step\x20\x27','embeddedSegments','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','stage','timeout','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','excluded_','reduce','goalIsInherited','Merge\x20step\x20\x27','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','1501860fEtLiB','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Duplicate\x20step\x20name\x20\x27','replace','path','Journey\x20has\x20','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','MISSING_ENTRY_CRITERIA','entry_criteria','END_STEP_HAS_NEXT_OR_WITH','Activation\x20step\x20requires\x20an\x20activation\x20reference','.with.condition.next','MISSING_EXIT_CRITERIA','\x20versions)','keys','ref:','3430056apehTR','MISSING_MILESTONE','5871396SeQCrZ','has','level','end','.with.condition.timeout.next','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','.steps[','\x20stages\x20but\x20maximum\x20is\x20','Journey\x20has\x20no\x20goal\x20defined','UNUSED_EMBEDDED_SEGMENT','get','BRANCH_DIRECTLY_TO_MERGE','description','journeys','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','MERGE_TO_MERGE_CHAIN','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','2119924jcWaLV','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','state','.steps','INVALID_JUMP_TARGET','stages','SINGLE_INPUT_MERGE','code','join','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','exit_criteria','Embedded\x20segment\x20\x27','ab_test','A/B\x20test\x20variant\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','MISSING_SEGMENT_REFERENCE','sort','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','goal','startsWith',').\x20Use\x20a\x20merge\x20step.','type','activationKeys','condition','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','stages[','.with.variants'];a121_0x39d5=function(){return _0x3c0a2d;};return a121_0x39d5();}function deduplicateAcrossVersions(_0x189d44){const _0x382d78=a121_0x6ae4,_0x536b26=new Map();for(let _0x59b7b3=0x0;_0x59b7b3<_0x189d44['length'];_0x59b7b3++){const _0x2dd619=_0x189d44[_0x59b7b3][_0x382d78(0x125)]+':'+_0x189d44[_0x59b7b3][_0x382d78(0x145)],_0x130e23=extractVersionIndex(_0x189d44[_0x59b7b3][_0x382d78(0xfe)]),_0x4e19e4=_0x536b26[_0x382d78(0x117)](_0x2dd619);if(_0x4e19e4){_0x4e19e4[_0x382d78(0xe8)][_0x382d78(0xde)](_0x59b7b3);if(_0x130e23)_0x4e19e4[_0x382d78(0xc6)][_0x382d78(0xe4)](_0x130e23);}else _0x536b26[_0x382d78(0xe9)](_0x2dd619,{'indices':[_0x59b7b3],'versions':new Set(_0x130e23?[_0x130e23]:[])});}const _0x3c58fa=new Set();for(const {indices:_0x559924,versions:_0x169baa}of _0x536b26[_0x382d78(0xca)]()){if(_0x169baa['size']<=0x1)continue;const _0xc8bc1c=_0x189d44[_0x559924[0x0]];_0xc8bc1c[_0x382d78(0xfe)]=_0xc8bc1c[_0x382d78(0xfe)][_0x382d78(0xfd)](/^journeys\[\d+\]\./,''),_0xc8bc1c[_0x382d78(0x145)]=_0xc8bc1c[_0x382d78(0x145)]+_0x382d78(0x156)+_0x169baa[_0x382d78(0xc8)]+_0x382d78(0x108);for(let _0x48218e=0x1;_0x48218e<_0x559924[_0x382d78(0xc5)];_0x48218e++){_0x3c58fa['add'](_0x559924[_0x48218e]);}}const _0x31d62c=[..._0x3c58fa][_0x382d78(0x12e)]((_0x2d372d,_0x2db415)=>_0x2db415-_0x2d372d);for(const _0x7b6d01 of _0x31d62c){_0x189d44['splice'](_0x7b6d01,0x1);}}function a121_0x6ae4(_0xda551a,_0x54479c){_0xda551a=_0xda551a-0xbc;const _0x39d566=a121_0x39d5();let _0x6ae4e8=_0x39d566[_0xda551a];return _0x6ae4e8;}export function validateJourneyDef(_0x59bd5c,_0x1eb26d={}){const _0x33aac8=a121_0x6ae4,_0x3a9707=[],_0x1fdc25=[];(!_0x59bd5c[_0x33aac8(0xbf)]||_0x59bd5c[_0x33aac8(0xbf)][_0x33aac8(0x14b)]()==='')&&_0x3a9707[_0x33aac8(0xde)]({'level':_0x33aac8(0xe5),'path':_0x33aac8(0xbf),'code':'MISSING_NAME','message':_0x33aac8(0x14e),'location':getLocationFromPath(_0x1eb26d[_0x33aac8(0xe0)],_0x1eb26d[_0x33aac8(0x14a)],[_0x33aac8(0xbf)])});const _0x45fb52=new Set();if(_0x59bd5c[_0x33aac8(0x15b)])for(const _0x5f3714 of Object['keys'](_0x59bd5c[_0x33aac8(0x15b)])){_0x45fb52[_0x33aac8(0xe4)](_0x5f3714);}const _0x315483=new Set();if(_0x59bd5c[_0x33aac8(0xdd)])for(const _0x1545b2 of Object[_0x33aac8(0x109)](_0x59bd5c[_0x33aac8(0xdd)])){_0x315483['add'](_0x1545b2);}const _0x104e8c=new Set(),_0x302dc5={..._0x1eb26d,'embeddedSegments':_0x45fb52,'referencedSegments':_0x104e8c,'activationKeys':_0x315483['size']>0x0?_0x315483:undefined};if(_0x59bd5c[_0x33aac8(0x15b)])for(const [_0x632388,_0x276dfe]of Object['entries'](_0x59bd5c[_0x33aac8(0x15b)])){const _0xfb03d=validateEmbeddedSegment(_0x276dfe,_0x33aac8(0x148)+_0x632388,_0x302dc5);for(const _0x1fb73e of _0xfb03d){if(_0x1fb73e[_0x33aac8(0x10f)]===_0x33aac8(0xe5))_0x3a9707[_0x33aac8(0xde)](_0x1fb73e);else _0x1fdc25['push'](_0x1fb73e);}}const _0x34cfdb=!!_0x59bd5c[_0x33aac8(0x131)],_0x45afb3=_0x59bd5c[_0x33aac8(0x11a)]?.[_0x33aac8(0x147)](_0x26ee53=>!!_0x26ee53[_0x33aac8(0x131)])??![];!_0x34cfdb&&!_0x45afb3&&_0x1fdc25[_0x33aac8(0xde)]({'level':_0x33aac8(0xd0),'path':'goal','code':_0x33aac8(0x14c),'message':_0x33aac8(0x115),'location':getLocationFromPath(_0x1eb26d['document'],_0x1eb26d[_0x33aac8(0x14a)],[_0x33aac8(0x131)])});if(_0x59bd5c[_0x33aac8(0x11a)]&&_0x59bd5c[_0x33aac8(0x11a)][_0x33aac8(0xc5)]>0x0)for(let _0x95097a=0x0;_0x95097a<_0x59bd5c['journeys'][_0x33aac8(0xc5)];_0x95097a++){const _0x1ae905=_0x59bd5c[_0x33aac8(0x11a)][_0x95097a];if(_0x59bd5c['journeys'][_0x33aac8(0xc5)]>0x1&&_0x1ae905[_0x33aac8(0x120)]===_0x33aac8(0xc9))continue;const _0x138537=_0x1ae905[_0x33aac8(0x123)]||[],_0x29d3c4=_0x33aac8(0xd7)+_0x95097a+'].',_0x26bea5=!!_0x1ae905[_0x33aac8(0x131)],_0x4f462f=_0x26bea5?{..._0x59bd5c,'goal':_0x1ae905[_0x33aac8(0x131)]}:_0x59bd5c;validateStagesForVersion(_0x138537,_0x4f462f,_0x302dc5,_0x29d3c4,_0x3a9707,_0x1fdc25,{'goalIsInherited':!_0x26bea5});}else{if(_0x59bd5c[_0x33aac8(0xc6)]&&_0x59bd5c[_0x33aac8(0xc6)][_0x33aac8(0xc5)]>0x0)for(let _0x39a3a8=0x0;_0x39a3a8<_0x59bd5c[_0x33aac8(0xc6)]['length'];_0x39a3a8++){const _0x29971f=_0x59bd5c[_0x33aac8(0xc6)][_0x39a3a8];if(_0x59bd5c[_0x33aac8(0xc6)][_0x33aac8(0xc5)]>0x1&&_0x29971f[_0x33aac8(0x120)]===_0x33aac8(0xc9))continue;const _0xb434a9=_0x29971f[_0x33aac8(0x123)]||[],_0x373fc2='versions['+_0x39a3a8+'].';validateStagesForVersion(_0xb434a9,_0x59bd5c,_0x302dc5,_0x373fc2,_0x3a9707,_0x1fdc25);}else{const _0x3184a6=_0x59bd5c[_0x33aac8(0x123)]||[];validateStagesForVersion(_0x3184a6,_0x59bd5c,_0x302dc5,'',_0x3a9707,_0x1fdc25);}}_0x59bd5c[_0x33aac8(0x11a)]&&_0x59bd5c[_0x33aac8(0x11a)]['length']>0x1&&(deduplicateAcrossVersions(_0x3a9707),deduplicateAcrossVersions(_0x1fdc25));for(const _0x19584b of _0x45fb52){!_0x104e8c['has'](_0x19584b)&&!_0x19584b[_0x33aac8(0x132)](_0x33aac8(0xf3))&&_0x1fdc25[_0x33aac8(0xde)]({'level':_0x33aac8(0xd0),'path':_0x33aac8(0x148)+_0x19584b,'code':_0x33aac8(0x116),'message':_0x33aac8(0x129)+_0x19584b+_0x33aac8(0xf8),'location':getLocationFromPath(_0x1eb26d[_0x33aac8(0xe0)],_0x1eb26d['source'],[_0x33aac8(0x15b),_0x19584b])});}return{'valid':_0x3a9707[_0x33aac8(0xc5)]===0x0,'errors':_0x3a9707,'warnings':_0x1fdc25};}