@treasuredata/tdx 2026.3.5 → 2026.3.6

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 (231) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.d.ts.map +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/auth-command.js.map +1 -1
  14. package/dist/commands/auth-login-command.d.ts +29 -0
  15. package/dist/commands/auth-login-command.d.ts.map +1 -0
  16. package/dist/commands/auth-login-command.js +1 -0
  17. package/dist/commands/auth-login-command.js.map +1 -0
  18. package/dist/commands/chat-command.js +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-statusline-command.js +1 -1
  21. package/dist/commands/claude-usage-command.js +1 -1
  22. package/dist/commands/command.js +1 -1
  23. package/dist/commands/connection-command.js +1 -1
  24. package/dist/commands/databases.js +1 -1
  25. package/dist/commands/delivery-command.js +1 -1
  26. package/dist/commands/describe.js +1 -1
  27. package/dist/commands/engage-campaign-pull-command.js +1 -1
  28. package/dist/commands/engage-campaign-push-command.js +1 -1
  29. package/dist/commands/engage-campaign-validate-command.js +1 -1
  30. package/dist/commands/engage-command.js +1 -1
  31. package/dist/commands/engage-template-pull-command.js +1 -1
  32. package/dist/commands/engage-template-push-command.js +1 -1
  33. package/dist/commands/engage-template-validate-command.js +1 -1
  34. package/dist/commands/job-command.js +1 -1
  35. package/dist/commands/journey-command.js +1 -1
  36. package/dist/commands/journey-validate-command.js +1 -1
  37. package/dist/commands/llm-command.js +1 -1
  38. package/dist/commands/mcp-command.d.ts.map +1 -1
  39. package/dist/commands/mcp-command.js +1 -1
  40. package/dist/commands/mcp-command.js.map +1 -1
  41. package/dist/commands/parent-segment-command.js +1 -1
  42. package/dist/commands/profile-command.d.ts.map +1 -1
  43. package/dist/commands/profile-command.js +1 -1
  44. package/dist/commands/profile-command.js.map +1 -1
  45. package/dist/commands/profiles-command.js +1 -1
  46. package/dist/commands/query-command.js +1 -1
  47. package/dist/commands/schedule-command.js +1 -1
  48. package/dist/commands/segment-command.js +1 -1
  49. package/dist/commands/segment-create-command.js +1 -1
  50. package/dist/commands/segment-fields-command.js +1 -1
  51. package/dist/commands/segment-pull-command.js +1 -1
  52. package/dist/commands/segment-push-command.js +1 -1
  53. package/dist/commands/segment-update-command.js +1 -1
  54. package/dist/commands/segment-use-command.js +1 -1
  55. package/dist/commands/segment-validate-command.js +1 -1
  56. package/dist/commands/segments.js +1 -1
  57. package/dist/commands/show.js +1 -1
  58. package/dist/commands/status-command.d.ts.map +1 -1
  59. package/dist/commands/status-command.js +1 -1
  60. package/dist/commands/status-command.js.map +1 -1
  61. package/dist/commands/tables.js +1 -1
  62. package/dist/commands/unset-command.js +1 -1
  63. package/dist/commands/upgrade-command.js +1 -1
  64. package/dist/commands/use-command.js +1 -1
  65. package/dist/commands/user-command.js +1 -1
  66. package/dist/commands/workflow-command.js +1 -1
  67. package/dist/core/auth.js +1 -1
  68. package/dist/core/command-output.js +1 -1
  69. package/dist/core/config.js +1 -1
  70. package/dist/core/connection-cache.js +1 -1
  71. package/dist/core/constants.d.ts +11 -0
  72. package/dist/core/constants.d.ts.map +1 -1
  73. package/dist/core/constants.js +1 -1
  74. package/dist/core/constants.js.map +1 -1
  75. package/dist/core/credential-cache.js +1 -1
  76. package/dist/core/global-context.d.ts.map +1 -1
  77. package/dist/core/global-context.js +1 -1
  78. package/dist/core/global-context.js.map +1 -1
  79. package/dist/core/keychain.js +1 -1
  80. package/dist/core/oauth-keychain.d.ts +32 -0
  81. package/dist/core/oauth-keychain.d.ts.map +1 -0
  82. package/dist/core/oauth-keychain.js +1 -0
  83. package/dist/core/oauth-keychain.js.map +1 -0
  84. package/dist/core/oauth.d.ts +112 -0
  85. package/dist/core/oauth.d.ts.map +1 -0
  86. package/dist/core/oauth.js +1 -0
  87. package/dist/core/oauth.js.map +1 -0
  88. package/dist/core/profile.js +1 -1
  89. package/dist/core/project-config.js +1 -1
  90. package/dist/core/session.js +1 -1
  91. package/dist/core/user-cache.js +1 -1
  92. package/dist/core/version.js +1 -1
  93. package/dist/index.js +1 -1
  94. package/dist/mcp/server.js +1 -1
  95. package/dist/mcp/tools/index.js +1 -1
  96. package/dist/mcp/tools/tdx-run.js +1 -1
  97. package/dist/mcp/tools/tdx-search.js +1 -1
  98. package/dist/mcp/utils.js +1 -1
  99. package/dist/proxy/claude-usage-tracker.js +1 -1
  100. package/dist/proxy/passthrough-server.js +1 -1
  101. package/dist/proxy/sse-usage-parser.js +1 -1
  102. package/dist/sdk/agent/agent-config.js +1 -1
  103. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  104. package/dist/sdk/agent/agent-yaml.js +1 -1
  105. package/dist/sdk/agent/test/evaluator.js +1 -1
  106. package/dist/sdk/agent/test/executor.js +1 -1
  107. package/dist/sdk/agent/test/index.js +1 -1
  108. package/dist/sdk/agent/test/output.js +1 -1
  109. package/dist/sdk/agent/test/parser.js +1 -1
  110. package/dist/sdk/agent/tool-target-registry.js +1 -1
  111. package/dist/sdk/api.js +1 -1
  112. package/dist/sdk/client/cdp-api-client.js +1 -1
  113. package/dist/sdk/client/delivery-api-client.js +1 -1
  114. package/dist/sdk/client/endpoints.js +1 -1
  115. package/dist/sdk/client/endpoints.js.map +1 -1
  116. package/dist/sdk/client/engage-api-client.js +1 -1
  117. package/dist/sdk/client/http-client.js +1 -1
  118. package/dist/sdk/client/llm-api-client.js +1 -1
  119. package/dist/sdk/client/oauth-refresh.d.ts +16 -0
  120. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -0
  121. package/dist/sdk/client/oauth-refresh.js +1 -0
  122. package/dist/sdk/client/oauth-refresh.js.map +1 -0
  123. package/dist/sdk/client/rate-limiter.js +1 -1
  124. package/dist/sdk/client/td-api-client.js +1 -1
  125. package/dist/sdk/client/trino-api-client.js +1 -1
  126. package/dist/sdk/client/workflow-client.js +1 -1
  127. package/dist/sdk/connection-validator.js +1 -1
  128. package/dist/sdk/connection.js +1 -1
  129. package/dist/sdk/delivery.js +1 -1
  130. package/dist/sdk/engage/campaign-pull.js +1 -1
  131. package/dist/sdk/engage/campaign-push.js +1 -1
  132. package/dist/sdk/engage/campaign-validator.js +1 -1
  133. package/dist/sdk/engage/campaign-yaml.js +1 -1
  134. package/dist/sdk/engage/template-pull.js +1 -1
  135. package/dist/sdk/engage/template-push.js +1 -1
  136. package/dist/sdk/engage/template-validator.js +1 -1
  137. package/dist/sdk/engage/template-yaml.js +1 -1
  138. package/dist/sdk/engage/types/campaign-def.js +1 -1
  139. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  140. package/dist/sdk/engage/types/template-schema.js +1 -1
  141. package/dist/sdk/engage.js +1 -1
  142. package/dist/sdk/errors.js +1 -1
  143. package/dist/sdk/index.js +1 -1
  144. package/dist/sdk/io/index.js +1 -1
  145. package/dist/sdk/io/node-filesystem.js +1 -1
  146. package/dist/sdk/job.js +1 -1
  147. package/dist/sdk/journey.js +1 -1
  148. package/dist/sdk/llm/chat-cache.js +1 -1
  149. package/dist/sdk/llm/index.js +1 -1
  150. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  151. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  152. package/dist/sdk/llm/model-factors.js +1 -1
  153. package/dist/sdk/llm/model-factors.js.map +1 -1
  154. package/dist/sdk/personalization.js +1 -1
  155. package/dist/sdk/query/index.js +1 -1
  156. package/dist/sdk/query/sql-parser.js +1 -1
  157. package/dist/sdk/realtime.js +1 -1
  158. package/dist/sdk/schedule.js +1 -1
  159. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  160. package/dist/sdk/segment/fields-display.js +1 -1
  161. package/dist/sdk/segment/file-discovery.js +1 -1
  162. package/dist/sdk/segment/journey-utils.js +1 -1
  163. package/dist/sdk/segment/journey-validator.js +1 -1
  164. package/dist/sdk/segment/journey-yaml.js +1 -1
  165. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  166. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  167. package/dist/sdk/segment/pull-workflow.js +1 -1
  168. package/dist/sdk/segment/push-recovery.js +1 -1
  169. package/dist/sdk/segment/push-workflow.js +1 -1
  170. package/dist/sdk/segment/resolution-context.js +1 -1
  171. package/dist/sdk/segment/segment-path-parser.js +1 -1
  172. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  173. package/dist/sdk/segment/segment-validator.js +1 -1
  174. package/dist/sdk/segment/target-resolution.js +1 -1
  175. package/dist/sdk/segment/tdx-config.js +1 -1
  176. package/dist/sdk/segment/types/activation-schema.js +1 -1
  177. package/dist/sdk/segment/types/journey-def.js +1 -1
  178. package/dist/sdk/segment/types/journey-schema.js +1 -1
  179. package/dist/sdk/segment/types/segment-def.js +1 -1
  180. package/dist/sdk/segment/types/segment-schema.js +1 -1
  181. package/dist/sdk/segment/validate-files.js +1 -1
  182. package/dist/sdk/segment/yaml-validator.js +1 -1
  183. package/dist/sdk/segment.js +1 -1
  184. package/dist/sdk/types/index.js +1 -1
  185. package/dist/sdk/types/progress.js +1 -1
  186. package/dist/sdk/user.js +1 -1
  187. package/dist/sdk/util/format-detector.js +1 -1
  188. package/dist/sdk/util/formatters.js +1 -1
  189. package/dist/sdk/util/index.js +1 -1
  190. package/dist/sdk/util/paginate.js +1 -1
  191. package/dist/sdk/util/tree-formatter.js +1 -1
  192. package/dist/sdk/workflow/archive-validation.js +1 -1
  193. package/dist/sdk/workflow/clone-workflow.js +1 -1
  194. package/dist/sdk/workflow/index.js +1 -1
  195. package/dist/sdk/workflow/pull-workflow.js +1 -1
  196. package/dist/sdk/workflow/push-workflow.js +1 -1
  197. package/dist/sdk/workflow/tdx-config.js +1 -1
  198. package/dist/sdk/workflow/workflow-utils.js +1 -1
  199. package/dist/test-utils/command-runner.js +1 -1
  200. package/dist/test-utils/factories.js +1 -1
  201. package/dist/test-utils/fixtures.js +1 -1
  202. package/dist/test-utils/http-mock.js +1 -1
  203. package/dist/test-utils/index.js +1 -1
  204. package/dist/utils/async.js +1 -1
  205. package/dist/utils/colors.js +1 -1
  206. package/dist/utils/diff.js +1 -1
  207. package/dist/utils/file-permissions.js +1 -1
  208. package/dist/utils/file-reader.js +1 -1
  209. package/dist/utils/github-releases.js +1 -1
  210. package/dist/utils/global-cache.js +1 -1
  211. package/dist/utils/json-loader.js +1 -1
  212. package/dist/utils/local-cache.js +1 -1
  213. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  214. package/dist/utils/logger/formatters/index.js +1 -1
  215. package/dist/utils/logger/handlers/console-handler.js +1 -1
  216. package/dist/utils/logger/handlers/file-handler.js +1 -1
  217. package/dist/utils/logger/handlers/index.js +1 -1
  218. package/dist/utils/logger/handlers/null-handler.js +1 -1
  219. package/dist/utils/logger/index.js +1 -1
  220. package/dist/utils/logger/logger.js +1 -1
  221. package/dist/utils/logger/types.js +1 -1
  222. package/dist/utils/option-validation.js +1 -1
  223. package/dist/utils/process.js +1 -1
  224. package/dist/utils/prompt.js +1 -1
  225. package/dist/utils/spinner.js +1 -1
  226. package/dist/utils/sse-parser.js +1 -1
  227. package/dist/utils/string-utils.js +1 -1
  228. package/dist/utils/table-ref-parser.js +1 -1
  229. package/dist/utils/tdx-logger.js +1 -1
  230. package/dist/utils/version-check.js +1 -1
  231. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x292b30,_0x2dc154){const _0x37ea78=a127_0x2ef7,_0x1fb9a3=_0x292b30();while(!![]){try{const _0x2b566e=parseInt(_0x37ea78(0x1e9))/0x1*(-parseInt(_0x37ea78(0x208))/0x2)+-parseInt(_0x37ea78(0x1d3))/0x3*(parseInt(_0x37ea78(0x1fa))/0x4)+-parseInt(_0x37ea78(0x1f3))/0x5*(-parseInt(_0x37ea78(0x1ec))/0x6)+parseInt(_0x37ea78(0x1df))/0x7*(-parseInt(_0x37ea78(0x1d4))/0x8)+parseInt(_0x37ea78(0x1d7))/0x9+parseInt(_0x37ea78(0x1d2))/0xa*(parseInt(_0x37ea78(0x1db))/0xb)+parseInt(_0x37ea78(0x20a))/0xc;if(_0x2b566e===_0x2dc154)break;else _0x1fb9a3['push'](_0x1fb9a3['shift']());}catch(_0x4c40e9){_0x1fb9a3['push'](_0x1fb9a3['shift']());}}}(a127_0x3db3,0x68fb0));import a127_0x457008 from'chalk';function a127_0x2ef7(_0x35583a,_0x15dccf){_0x35583a=_0x35583a-0x1d2;const _0x3db335=a127_0x3db3();let _0x2ef730=_0x3db335[_0x35583a];return _0x2ef730;}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x3c9648){const _0x421df4=a127_0x2ef7,_0x24c73a=_0x3c9648[_0x421df4(0x1fc)][_0x421df4(0x204)](_0x526328=>({'column_name':_0x526328[_0x421df4(0x20b)],'column_type':_0x526328['type'],'null':_0x421df4(0x1f4),'key':null,'default':null,'extra':null}));return{..._0x3c9648,'columns':[{'name':_0x421df4(0x1ee),'type':_0x421df4(0x1e8)},{'name':_0x421df4(0x210),'type':'varchar'},{'name':'null','type':_0x421df4(0x1e8)},{'name':_0x421df4(0x1dc),'type':'varchar'},{'name':'default','type':_0x421df4(0x1e8)},{'name':_0x421df4(0x1fe),'type':'varchar'}],'data':_0x24c73a};}export async function executeSchemaQuery(_0x2dd6c6,_0x43afc0,_0x5251e3){const _0x694ee9=a127_0x2ef7,_0x1a0239=_0x2dd6c6[_0x694ee9(0x1e4)]()['replace'](/;+$/,''),_0x78d577=_0x694ee9(0x1e6)+_0x1a0239+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x5251e3[_0x694ee9(0x209)]&&console['error']('Schema\x20query:\x0a'+_0x78d577);const _0x5c1b00=await withProgressSpinner(_0x694ee9(0x1f8),async _0x2d9cbc=>{const _0x5113c9=_0x694ee9,_0x531b91=await _0x43afc0['query'][_0x5113c9(0x1f9)](_0x78d577,{'catalog':'td','schema':_0x5113c9(0x1e5),'onJobId':_0x36a06b=>{const _0x72dbd8=_0x5113c9;_0x2d9cbc[_0x72dbd8(0x20d)](_0x36a06b);}});return _0x531b91;},{'verbose':_0x5251e3[_0x694ee9(0x209)]});return buildSchemaResult(_0x5c1b00[_0x694ee9(0x203)]);}function columnName(_0x47060e){const _0x1b8de8=a127_0x2ef7;return _0x47060e[_0x1b8de8(0x1eb)]||_0x47060e[_0x1b8de8(0x1e2)]||_0x47060e[_0x1b8de8(0x20b)];}function a127_0x3db3(){const _0x48c144=['column_type','2230uYgNcZ','6dFzwBu','28104lRkRBj','cyan','dim','1143702uXReqP','displayName','localeCompare','some','21725yxPalU','key','Unknown','behavior','1141TijQak','get','entries','parentColumn','error','trim','information_schema','SELECT\x20*\x20FROM\x20(\x0a','source','varchar','2825ibvpgL','size','matrixColumnName','94338VajZxm','set','column_name','bold','attribute','Behaviors','sort','5ZuFISP','YES','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','push','\x20\x20\x20\x20','Fetching\x20schema...','execute','99340EsthJu','fields','columns','Attributes','extra','slice','filter','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','matrixTableName','data','map','length','parentTableName','startsWith','528GCdHIH','verbose','14578356AJTZPP','name','type','setJobId','groupingName','tableName'];a127_0x3db3=function(){return _0x48c144;};return a127_0x3db3();}function formatFieldLine(_0x17e7dc,_0x3adceb,_0x3c3a3e){const _0x2356df=a127_0x2ef7,_0x245546=_0x17e7dc!==_0x3adceb?'\x20'+a127_0x457008[_0x2356df(0x1d6)]('('+_0x3adceb+')'):'';return _0x2356df(0x1f7)+_0x17e7dc+_0x245546+':\x20'+a127_0x457008[_0x2356df(0x1d5)](_0x3c3a3e);}function sortByColumnName(_0x3c29ae){const _0x13b672=a127_0x2ef7;return[..._0x3c29ae][_0x13b672(0x1f2)]((_0x8a4052,_0x5ca8fa)=>columnName(_0x8a4052)[_0x13b672(0x1d9)](columnName(_0x5ca8fa)));}export function displayFieldsHumanReadable(_0x406fe6,_0x5d7b34){const _0x5376b2=a127_0x2ef7,_0x4537cd=_0x406fe6[_0x5376b2(0x200)](_0x3b5245=>_0x3b5245['source']===_0x5376b2(0x1f0)),_0x4546f4=_0x406fe6[_0x5376b2(0x200)](_0x3a37fb=>_0x3a37fb[_0x5376b2(0x1e7)]===_0x5376b2(0x1de)),_0x29600a=new Map();for(const _0x15428d of _0x4537cd){const _0x304ddf=_0x15428d[_0x5376b2(0x20e)]||_0x15428d[_0x5376b2(0x206)]||_0x5376b2(0x1dd),_0x4c6f29=_0x29600a[_0x5376b2(0x1e0)](_0x304ddf);_0x4c6f29?_0x4c6f29['fields'][_0x5376b2(0x1f6)](_0x15428d):_0x29600a[_0x5376b2(0x1ed)](_0x304ddf,{'displayName':_0x304ddf,'tableName':_0x15428d[_0x5376b2(0x206)],'fields':[_0x15428d]});}const _0x1a5456=new Map();for(const _0x49d199 of _0x4546f4){const _0x2f8ebc=_0x49d199['behaviorName']||_0x5376b2(0x1dd),_0x2f1d6c=_0x1a5456[_0x5376b2(0x1e0)](_0x2f8ebc)||[];_0x2f1d6c[_0x5376b2(0x1f6)](_0x49d199),_0x1a5456[_0x5376b2(0x1ed)](_0x2f8ebc,_0x2f1d6c);}console[_0x5376b2(0x1e3)]('\x0a'+a127_0x457008[_0x5376b2(0x1ef)](_0x5d7b34));if(_0x29600a[_0x5376b2(0x1ea)]>0x0){console[_0x5376b2(0x1e3)]('\x0a'+a127_0x457008[_0x5376b2(0x1d6)](_0x5376b2(0x1fd)));const _0x48e70a=[..._0x29600a[_0x5376b2(0x1e1)]()][_0x5376b2(0x1f2)]((_0x3dbb80,_0x563fc7)=>_0x3dbb80[0x0][_0x5376b2(0x1d9)](_0x563fc7[0x0]));for(const [,_0x1e825f]of _0x48e70a){const _0x34d8e5=_0x1e825f[_0x5376b2(0x20f)]&&_0x1e825f['tableName']!==_0x1e825f[_0x5376b2(0x1d8)]?'\x20'+a127_0x457008[_0x5376b2(0x1d6)]('('+_0x1e825f[_0x5376b2(0x20f)]+')'):'';console['error']('\x20\x20'+a127_0x457008[_0x5376b2(0x1ef)](_0x1e825f[_0x5376b2(0x1d8)])+_0x34d8e5);for(const _0x3973ec of sortByColumnName(_0x1e825f[_0x5376b2(0x1fb)])){console[_0x5376b2(0x1e3)](formatFieldLine(columnName(_0x3973ec),_0x3973ec['name'],_0x3973ec[_0x5376b2(0x20c)]));}}}if(_0x1a5456[_0x5376b2(0x1ea)]>0x0){console['error']('\x0a'+a127_0x457008[_0x5376b2(0x1d6)](_0x5376b2(0x1f1)));const _0x507851=[..._0x1a5456[_0x5376b2(0x1e1)]()][_0x5376b2(0x1f2)]((_0x134d83,_0x28a558)=>_0x134d83[0x0][_0x5376b2(0x1d9)](_0x28a558[0x0]));for(const [_0x38c448,_0x8b0ae0]of _0x507851){const _0x51f946=_0x8b0ae0[0x0],_0x5abb74=_0x51f946?.[_0x5376b2(0x202)];if(_0x5abb74){const _0x49c6f6=_0x5abb74!==_0x38c448?'\x20'+a127_0x457008[_0x5376b2(0x1d6)]('('+_0x38c448+')'):'';console[_0x5376b2(0x1e3)]('\x20\x20'+a127_0x457008[_0x5376b2(0x1ef)](_0x5abb74)+_0x49c6f6);}else{const _0x1d1079=_0x51f946?.[_0x5376b2(0x206)]||'';console[_0x5376b2(0x1e3)]('\x20\x20'+a127_0x457008[_0x5376b2(0x1ef)](_0x38c448)+(_0x1d1079?'\x20'+a127_0x457008[_0x5376b2(0x1d6)]('('+_0x1d1079+')'):''));}for(const _0x135e7a of sortByColumnName(_0x8b0ae0)){const _0x2c2e79=_0x135e7a[_0x5376b2(0x20b)][_0x5376b2(0x207)](_0x38c448+'.')?_0x135e7a[_0x5376b2(0x20b)][_0x5376b2(0x1ff)](_0x38c448[_0x5376b2(0x205)]+0x1):_0x135e7a['name'];console['error'](formatFieldLine(columnName(_0x135e7a),_0x2c2e79,_0x135e7a['type']));}}}const _0x97f4b3=_0x406fe6[_0x5376b2(0x1da)](_0x177401=>_0x177401[_0x5376b2(0x1eb)]||_0x177401[_0x5376b2(0x202)]);_0x97f4b3&&(console[_0x5376b2(0x1e3)]('\x0a'+a127_0x457008['dim'](_0x5376b2(0x1f5))),console[_0x5376b2(0x1e3)](a127_0x457008['dim'](_0x5376b2(0x201)))),console[_0x5376b2(0x1e3)]('');}
1
+ function a131_0x2917(_0x5d0147,_0x37b899){_0x5d0147=_0x5d0147-0x1c9;const _0x1e8bdc=a131_0x1e8b();let _0x29173b=_0x1e8bdc[_0x5d0147];return _0x29173b;}(function(_0x359d76,_0xa7f61c){const _0xb22571=a131_0x2917,_0x16e36f=_0x359d76();while(!![]){try{const _0x5e8ddb=parseInt(_0xb22571(0x1e5))/0x1*(-parseInt(_0xb22571(0x1ce))/0x2)+parseInt(_0xb22571(0x1f6))/0x3+-parseInt(_0xb22571(0x1e6))/0x4*(-parseInt(_0xb22571(0x1d1))/0x5)+parseInt(_0xb22571(0x1e0))/0x6*(parseInt(_0xb22571(0x200))/0x7)+parseInt(_0xb22571(0x1f2))/0x8*(parseInt(_0xb22571(0x1e4))/0x9)+-parseInt(_0xb22571(0x1d5))/0xa+-parseInt(_0xb22571(0x1cf))/0xb*(parseInt(_0xb22571(0x1f4))/0xc);if(_0x5e8ddb===_0xa7f61c)break;else _0x16e36f['push'](_0x16e36f['shift']());}catch(_0x4c9dd9){_0x16e36f['push'](_0x16e36f['shift']());}}}(a131_0x1e8b,0x4c325));import a131_0x4273c2 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x862ea5){const _0x29feca=a131_0x2917,_0x2ba796=_0x862ea5[_0x29feca(0x1ef)][_0x29feca(0x203)](_0x1c955c=>({'column_name':_0x1c955c[_0x29feca(0x1e3)],'column_type':_0x1c955c['type'],'null':_0x29feca(0x1dd),'key':null,'default':null,'extra':null}));return{..._0x862ea5,'columns':[{'name':'column_name','type':_0x29feca(0x1ee)},{'name':_0x29feca(0x1e1),'type':_0x29feca(0x1ee)},{'name':_0x29feca(0x1e8),'type':_0x29feca(0x1ee)},{'name':_0x29feca(0x1ed),'type':_0x29feca(0x1ee)},{'name':_0x29feca(0x1f0),'type':_0x29feca(0x1ee)},{'name':_0x29feca(0x1f8),'type':'varchar'}],'data':_0x2ba796};}export async function executeSchemaQuery(_0x5dbd29,_0x33c8be,_0x4f382c){const _0x129510=a131_0x2917,_0xb5ac05=_0x5dbd29[_0x129510(0x1da)]()['replace'](/;+$/,''),_0x47f0ad='SELECT\x20*\x20FROM\x20(\x0a'+_0xb5ac05+_0x129510(0x1e7);_0x4f382c[_0x129510(0x1cc)]&&console[_0x129510(0x1df)]('Schema\x20query:\x0a'+_0x47f0ad);const _0x512b33=await withProgressSpinner(_0x129510(0x1ec),async _0x5b26cf=>{const _0x19607a=_0x129510,_0xa3504c=await _0x33c8be[_0x19607a(0x1eb)]['execute'](_0x47f0ad,{'catalog':'td','schema':_0x19607a(0x1d7),'onJobId':_0x1ef725=>{const _0x480e80=_0x19607a;_0x5b26cf[_0x480e80(0x1d4)](_0x1ef725);}});return _0xa3504c;},{'verbose':_0x4f382c['verbose']});return buildSchemaResult(_0x512b33[_0x129510(0x1fa)]);}function columnName(_0x4618ac){const _0x2c1205=a131_0x2917;return _0x4618ac['matrixColumnName']||_0x4618ac[_0x2c1205(0x1d9)]||_0x4618ac[_0x2c1205(0x1e3)];}function formatFieldLine(_0x699d03,_0x1b0bc4,_0x58f8e8){const _0xd0da15=a131_0x2917,_0x438418=_0x699d03!==_0x1b0bc4?'\x20'+a131_0x4273c2[_0xd0da15(0x201)]('('+_0x1b0bc4+')'):'';return'\x20\x20\x20\x20'+_0x699d03+_0x438418+':\x20'+a131_0x4273c2[_0xd0da15(0x1d0)](_0x58f8e8);}function sortByColumnName(_0x226546){const _0x1cdc11=a131_0x2917;return[..._0x226546][_0x1cdc11(0x1d2)]((_0x5ee14a,_0x3ef4e4)=>columnName(_0x5ee14a)['localeCompare'](columnName(_0x3ef4e4)));}export function displayFieldsHumanReadable(_0x3372b1,_0x51140c){const _0x33217d=a131_0x2917,_0x415df1=_0x3372b1[_0x33217d(0x1cd)](_0x4d6eef=>_0x4d6eef['source']==='attribute'),_0x1bcff8=_0x3372b1[_0x33217d(0x1cd)](_0x498fad=>_0x498fad[_0x33217d(0x1c9)]==='behavior'),_0x1e70c1=new Map();for(const _0x150329 of _0x415df1){const _0x192ddb=_0x150329['groupingName']||_0x150329[_0x33217d(0x1fd)]||_0x33217d(0x1f3),_0x554348=_0x1e70c1[_0x33217d(0x1ca)](_0x192ddb);_0x554348?_0x554348[_0x33217d(0x1d8)][_0x33217d(0x1fc)](_0x150329):_0x1e70c1[_0x33217d(0x1f9)](_0x192ddb,{'displayName':_0x192ddb,'tableName':_0x150329[_0x33217d(0x1fd)],'fields':[_0x150329]});}const _0x28b005=new Map();for(const _0x541813 of _0x1bcff8){const _0x5cd769=_0x541813[_0x33217d(0x1f7)]||_0x33217d(0x1f3),_0x2a92a4=_0x28b005[_0x33217d(0x1ca)](_0x5cd769)||[];_0x2a92a4[_0x33217d(0x1fc)](_0x541813),_0x28b005[_0x33217d(0x1f9)](_0x5cd769,_0x2a92a4);}console[_0x33217d(0x1df)]('\x0a'+a131_0x4273c2[_0x33217d(0x1cb)](_0x51140c));if(_0x1e70c1[_0x33217d(0x1db)]>0x0){console[_0x33217d(0x1df)]('\x0a'+a131_0x4273c2[_0x33217d(0x201)](_0x33217d(0x1ea)));const _0x3bb31e=[..._0x1e70c1[_0x33217d(0x1d3)]()][_0x33217d(0x1d2)]((_0x20ea73,_0x167ae5)=>_0x20ea73[0x0][_0x33217d(0x202)](_0x167ae5[0x0]));for(const [,_0x40caaa]of _0x3bb31e){const _0x5a288f=_0x40caaa['tableName']&&_0x40caaa['tableName']!==_0x40caaa[_0x33217d(0x1f1)]?'\x20'+a131_0x4273c2[_0x33217d(0x201)]('('+_0x40caaa[_0x33217d(0x1de)]+')'):'';console['error']('\x20\x20'+a131_0x4273c2['bold'](_0x40caaa[_0x33217d(0x1f1)])+_0x5a288f);for(const _0x45839d of sortByColumnName(_0x40caaa[_0x33217d(0x1d8)])){console['error'](formatFieldLine(columnName(_0x45839d),_0x45839d[_0x33217d(0x1e3)],_0x45839d[_0x33217d(0x1d6)]));}}}if(_0x28b005['size']>0x0){console['error']('\x0a'+a131_0x4273c2[_0x33217d(0x201)](_0x33217d(0x1f5)));const _0x39c091=[..._0x28b005[_0x33217d(0x1d3)]()]['sort']((_0x2fb363,_0x475276)=>_0x2fb363[0x0]['localeCompare'](_0x475276[0x0]));for(const [_0x4849ae,_0x1768ef]of _0x39c091){const _0x1dec8f=_0x1768ef[0x0],_0x5840e5=_0x1dec8f?.['matrixTableName'];if(_0x5840e5){const _0x352160=_0x5840e5!==_0x4849ae?'\x20'+a131_0x4273c2[_0x33217d(0x201)]('('+_0x4849ae+')'):'';console[_0x33217d(0x1df)]('\x20\x20'+a131_0x4273c2['bold'](_0x5840e5)+_0x352160);}else{const _0x54325a=_0x1dec8f?.[_0x33217d(0x1fd)]||'';console['error']('\x20\x20'+a131_0x4273c2[_0x33217d(0x1cb)](_0x4849ae)+(_0x54325a?'\x20'+a131_0x4273c2['dim']('('+_0x54325a+')'):''));}for(const _0xb9c4c3 of sortByColumnName(_0x1768ef)){const _0x315a30=_0xb9c4c3[_0x33217d(0x1e3)][_0x33217d(0x1e2)](_0x4849ae+'.')?_0xb9c4c3[_0x33217d(0x1e3)][_0x33217d(0x1fe)](_0x4849ae[_0x33217d(0x1ff)]+0x1):_0xb9c4c3[_0x33217d(0x1e3)];console[_0x33217d(0x1df)](formatFieldLine(columnName(_0xb9c4c3),_0x315a30,_0xb9c4c3[_0x33217d(0x1d6)]));}}}const _0x139315=_0x3372b1['some'](_0x4ec7ff=>_0x4ec7ff[_0x33217d(0x1dc)]||_0x4ec7ff[_0x33217d(0x1e9)]);_0x139315&&(console['error']('\x0a'+a131_0x4273c2['dim'](_0x33217d(0x204))),console['error'](a131_0x4273c2[_0x33217d(0x201)](_0x33217d(0x1fb)))),console[_0x33217d(0x1df)]('');}function a131_0x1e8b(){const _0x539849=['columns','default','displayName','1797808gdBvqt','Unknown','196272qLnIOl','Behaviors','118848RBUhbs','behaviorName','extra','set','data','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','push','parentTableName','slice','length','168DQxibP','dim','localeCompare','map','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','source','get','bold','verbose','filter','16540KnXCgS','253jiOXFT','cyan','29870vFrhGF','sort','entries','setJobId','1860750mEjkVF','type','information_schema','fields','parentColumn','trim','size','matrixColumnName','YES','tableName','error','104934zhsUuj','column_type','startsWith','name','18hikUGJ','15rDnirr','60MnpPfD','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','null','matrixTableName','Attributes','query','Fetching\x20schema...','key','varchar'];a131_0x1e8b=function(){return _0x539849;};return a131_0x1e8b();}
@@ -1 +1 @@
1
- (function(_0x24ce4c,_0x2584d6){const _0x54ebeb=a128_0x2a0b,_0x38d671=_0x24ce4c();while(!![]){try{const _0xf3ca8d=-parseInt(_0x54ebeb(0x203))/0x1*(parseInt(_0x54ebeb(0x1f1))/0x2)+-parseInt(_0x54ebeb(0x204))/0x3*(parseInt(_0x54ebeb(0x1f9))/0x4)+-parseInt(_0x54ebeb(0x202))/0x5+-parseInt(_0x54ebeb(0x1f2))/0x6+parseInt(_0x54ebeb(0x1f8))/0x7+-parseInt(_0x54ebeb(0x1fc))/0x8*(parseInt(_0x54ebeb(0x205))/0x9)+parseInt(_0x54ebeb(0x1f5))/0xa*(parseInt(_0x54ebeb(0x1fd))/0xb);if(_0xf3ca8d===_0x2584d6)break;else _0x38d671['push'](_0x38d671['shift']());}catch(_0xa0714c){_0x38d671['push'](_0x38d671['shift']());}}}(a128_0x41f7,0xb15d2));import{readdirSync,statSync}from'fs';function a128_0x2a0b(_0xccf153,_0x333ac4){_0xccf153=_0xccf153-0x1f1;const _0x41f727=a128_0x41f7();let _0x2a0bee=_0x41f727[_0xccf153];return _0x2a0bee;}import a128_0x252aaa from'path';export function findYamlFiles(_0x246731){const _0x49f030=[];function _0x15296b(_0x5f0e){const _0x50e0bd=a128_0x2a0b,_0x2a71dd=readdirSync(_0x5f0e,{'withFileTypes':!![]});for(const _0xd72dcd of _0x2a71dd){const _0x3f3678=a128_0x252aaa[_0x50e0bd(0x200)](_0x5f0e,_0xd72dcd[_0x50e0bd(0x206)]);if(_0xd72dcd['isDirectory']())_0x15296b(_0x3f3678);else(_0xd72dcd[_0x50e0bd(0x206)][_0x50e0bd(0x1f4)](_0x50e0bd(0x1f7))||_0xd72dcd[_0x50e0bd(0x206)][_0x50e0bd(0x1f4)](_0x50e0bd(0x1fe)))&&_0x49f030['push'](_0x3f3678);}}return _0x15296b(_0x246731),_0x49f030;}function a128_0x41f7(){const _0x103232=['name','4534vQKgNa','3973806iQInhp','dirname','endsWith','530xsmHCN','toLowerCase','.yml','4813018ceKfgq','360gwVDXV','map','isFile','1082696EMfRbi','866162vGRfxy','.yaml','extname','join','relative','5923790RSwJvp','305TtJmfk','44175iQiLBf','18nmnrmQ'];a128_0x41f7=function(){return _0x103232;};return a128_0x41f7();}export function discoverYamlFiles(_0x1d726c){const _0x2cd67e=a128_0x2a0b,_0x902167=findYamlFiles(_0x1d726c);return _0x902167[_0x2cd67e(0x1fa)](_0x3443f9=>{const _0x3c3806=_0x2cd67e,_0x465e05=a128_0x252aaa[_0x3c3806(0x201)](_0x1d726c,_0x3443f9),_0x349240=a128_0x252aaa[_0x3c3806(0x1f3)](_0x465e05);return{'absolutePath':_0x3443f9,'relativePath':_0x465e05,'folderPath':_0x349240==='.'?'':_0x349240};});}export function isYamlFile(_0x367e82){const _0x3075b2=a128_0x2a0b;try{const _0x3725db=statSync(_0x367e82);if(!_0x3725db[_0x3075b2(0x1fb)]())return![];const _0x5bb49a=a128_0x252aaa[_0x3075b2(0x1ff)](_0x367e82)[_0x3075b2(0x1f6)]();return _0x5bb49a===_0x3075b2(0x1f7)||_0x5bb49a===_0x3075b2(0x1fe);}catch{return![];}}
1
+ (function(_0x32247d,_0x543a26){const _0x3fc885=a132_0x5aa8,_0x4cf1b6=_0x32247d();while(!![]){try{const _0x3d891a=parseInt(_0x3fc885(0xf9))/0x1+parseInt(_0x3fc885(0xf2))/0x2*(parseInt(_0x3fc885(0x107))/0x3)+-parseInt(_0x3fc885(0xf3))/0x4*(-parseInt(_0x3fc885(0xfd))/0x5)+parseInt(_0x3fc885(0x105))/0x6*(parseInt(_0x3fc885(0xf1))/0x7)+parseInt(_0x3fc885(0xfa))/0x8*(-parseInt(_0x3fc885(0xf6))/0x9)+-parseInt(_0x3fc885(0xf7))/0xa*(-parseInt(_0x3fc885(0x103))/0xb)+-parseInt(_0x3fc885(0xf4))/0xc*(parseInt(_0x3fc885(0xfe))/0xd);if(_0x3d891a===_0x543a26)break;else _0x4cf1b6['push'](_0x4cf1b6['shift']());}catch(_0x3198bd){_0x4cf1b6['push'](_0x4cf1b6['shift']());}}}(a132_0x1b8d,0x3db01));import{readdirSync,statSync}from'fs';function a132_0x5aa8(_0x4e6a9b,_0x31caf4){_0x4e6a9b=_0x4e6a9b-0xf1;const _0x1b8d9d=a132_0x1b8d();let _0x5aa826=_0x1b8d9d[_0x4e6a9b];return _0x5aa826;}import a132_0x3e18b1 from'path';export function findYamlFiles(_0x3830dc){const _0x2511cf=[];function _0x5c1ba1(_0xbbf8d7){const _0x4fe5e7=a132_0x5aa8,_0x9a41c5=readdirSync(_0xbbf8d7,{'withFileTypes':!![]});for(const _0x49c219 of _0x9a41c5){const _0x2d190b=a132_0x3e18b1[_0x4fe5e7(0x106)](_0xbbf8d7,_0x49c219[_0x4fe5e7(0x102)]);if(_0x49c219['isDirectory']())_0x5c1ba1(_0x2d190b);else(_0x49c219[_0x4fe5e7(0x102)][_0x4fe5e7(0xfc)](_0x4fe5e7(0x108))||_0x49c219[_0x4fe5e7(0x102)][_0x4fe5e7(0xfc)](_0x4fe5e7(0xf5)))&&_0x2511cf[_0x4fe5e7(0x100)](_0x2d190b);}}return _0x5c1ba1(_0x3830dc),_0x2511cf;}export function discoverYamlFiles(_0x2c0553){const _0x150fff=a132_0x5aa8,_0x39b002=findYamlFiles(_0x2c0553);return _0x39b002[_0x150fff(0x101)](_0x46a15d=>{const _0x2c4041=_0x150fff,_0x7c2fe6=a132_0x3e18b1[_0x2c4041(0xfb)](_0x2c0553,_0x46a15d),_0xa6e1a5=a132_0x3e18b1['dirname'](_0x7c2fe6);return{'absolutePath':_0x46a15d,'relativePath':_0x7c2fe6,'folderPath':_0xa6e1a5==='.'?'':_0xa6e1a5};});}export function isYamlFile(_0x23c24b){const _0x23d1e6=a132_0x5aa8;try{const _0x33c7c2=statSync(_0x23c24b);if(!_0x33c7c2[_0x23d1e6(0xff)]())return![];const _0x4ae550=a132_0x3e18b1[_0x23d1e6(0x104)](_0x23c24b)[_0x23d1e6(0xf8)]();return _0x4ae550===_0x23d1e6(0x108)||_0x4ae550===_0x23d1e6(0xf5);}catch{return![];}}function a132_0x1b8d(){const _0x4aa760=['push','map','name','11SZOymm','extname','6996IvEcDi','join','24kITswY','.yml','378CeVnhZ','126094cfstIZ','1636ZbIqLs','14042388RARNMU','.yaml','643653hFAtZX','4537970iGnHkr','toLowerCase','381462gcmrbQ','32jgeGtk','relative','endsWith','3745Akqsno','13ASOeCa','isFile'];a132_0x1b8d=function(){return _0x4aa760;};return a132_0x1b8d();}
@@ -1 +1 @@
1
- (function(_0x4a8207,_0x46b56f){const _0x593ae2=a129_0x2f8f,_0x1a076b=_0x4a8207();while(!![]){try{const _0x32346a=parseInt(_0x593ae2(0x188))/0x1+-parseInt(_0x593ae2(0x1cd))/0x2*(parseInt(_0x593ae2(0x193))/0x3)+parseInt(_0x593ae2(0x18b))/0x4+parseInt(_0x593ae2(0x1b9))/0x5+parseInt(_0x593ae2(0x1a4))/0x6+-parseInt(_0x593ae2(0x189))/0x7*(parseInt(_0x593ae2(0x1b2))/0x8)+parseInt(_0x593ae2(0x199))/0x9*(parseInt(_0x593ae2(0x1be))/0xa);if(_0x32346a===_0x46b56f)break;else _0x1a076b['push'](_0x1a076b['shift']());}catch(_0x3cf066){_0x1a076b['push'](_0x1a076b['shift']());}}}(a129_0x81c9,0xabadb));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';function a129_0x81c9(){const _0x22ad11=['connector_config','bundle_id','toLowerCase','exit_criteria','description','all_columns','934593pRKDrW','decision_point','sort','latest','launched','join','21015sGnxEw','conditions','version','notification','stages','wait','versions','attributes','journeyBundleName','replace','item','699738hzFxXy','nameMapping','set','index','entry_criteria','endsWith','activation','some','.yaml','behavior','schedule','condition','merged','keys','8wDYfWk','.yml','branches','length','rule','find','string','81530qybvCX','type','trim','segments','include','1110wjmren','object','map','values','yaml','reentry','from','entries','activation_template_id','name','slice','journeys','goal','null','get','6NhBNKG','milestone','segment','stringify','steps','isArray','columns','match','1240248qlyTAw','2640197yTDbYt','with','1530388Ybxymq','version_number'];a129_0x81c9=function(){return _0x22ad11;};return a129_0x81c9();}export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x41b37a){const _0x117879=a129_0x2f8f;return _0x41b37a[_0x117879(0x18f)]()[_0x117879(0x1a2)](/\s+/g,'_')[_0x117879(0x1a2)](/[^a-z0-9_]/g,'')['replace'](/_+/g,'_')[_0x117879(0x1a2)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x1a7dec){const _0x1fa895=a129_0x2f8f,_0x42f6b3=_0x1a7dec[_0x1fa895(0x187)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x42f6b3){const _0x218a86=_0x42f6b3[0x1]['toLowerCase'](),_0x31b9c8=_0x42f6b3[0x2],_0x152dc4=_0x31b9c8['replace'](/-/g,'')['slice'](0x0,0x4)[_0x1fa895(0x18f)]();return _0x218a86+'_'+_0x152dc4;}const _0x135e93=_0x1a7dec[_0x1fa895(0x187)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x135e93){const _0x25dd04=_0x135e93[0x1],_0x487767=_0x135e93[0x2][_0x1fa895(0x18f)](),_0x2e726b=_0x25dd04[_0x1fa895(0x1a2)](/-/g,'')[_0x1fa895(0x1c8)](0x0,0x4)[_0x1fa895(0x18f)]();return _0x487767+'_'+_0x2e726b;}return undefined;}function stableStringify(_0x47b60d){const _0x511ece=a129_0x2f8f;if(Array['isArray'](_0x47b60d))return'['+_0x47b60d[_0x511ece(0x1c0)](_0xc978f3=>stableStringify(_0xc978f3))['join'](',')+']';if(_0x47b60d&&typeof _0x47b60d===_0x511ece(0x1bf)){const _0x3f15f2=_0x47b60d,_0x428ba4=Object[_0x511ece(0x1b1)](_0x3f15f2)[_0x511ece(0x195)](),_0x2252ec=_0x428ba4[_0x511ece(0x1c0)](_0x4fd2dc=>'\x22'+_0x4fd2dc+'\x22:'+stableStringify(_0x3f15f2[_0x4fd2dc]));return'{'+_0x2252ec[_0x511ece(0x198)](',')+'}';}const _0x2a1ed7=JSON[_0x511ece(0x183)](_0x47b60d);return _0x2a1ed7===undefined?_0x511ece(0x1cb):_0x2a1ed7;}export function consolidateActivationsByContent(_0x28ed7a){const _0x4cf564=a129_0x2f8f,_0x3e73da={},_0x18329f=new Map(),_0x1622b1=new Map();for(const _0x769951 of _0x28ed7a){if(!_0x769951)continue;for(const [_0x4216cb,_0x3a8f24]of Object['entries'](_0x769951)){const _0x176400={'connection':_0x3a8f24['connection'],..._0x3a8f24[_0x4cf564(0x192)]!==undefined&&{'all_columns':_0x3a8f24[_0x4cf564(0x192)]},..._0x3a8f24[_0x4cf564(0x186)]!==undefined&&{'columns':_0x3a8f24[_0x4cf564(0x186)]},..._0x3a8f24['behavior']!==undefined&&{'behavior':_0x3a8f24[_0x4cf564(0x1ad)]},..._0x3a8f24[_0x4cf564(0x1ae)]!==undefined&&{'schedule':_0x3a8f24[_0x4cf564(0x1ae)]},..._0x3a8f24[_0x4cf564(0x19c)]!==undefined&&{'notification':_0x3a8f24[_0x4cf564(0x19c)]},..._0x3a8f24['connector_config']!==undefined&&{'connector_config':_0x3a8f24[_0x4cf564(0x18d)]},..._0x3a8f24[_0x4cf564(0x1c6)]!==undefined&&{'activation_template_id':_0x3a8f24[_0x4cf564(0x1c6)]}},_0x25b4be=stableStringify(_0x176400),_0x5ad4fa=_0x1622b1[_0x4cf564(0x1cc)](_0x25b4be);_0x5ad4fa?_0x18329f[_0x4cf564(0x1a6)](_0x4216cb,_0x5ad4fa):(_0x3e73da[_0x4216cb]=_0x3a8f24,_0x18329f[_0x4cf564(0x1a6)](_0x4216cb,_0x4216cb),_0x1622b1[_0x4cf564(0x1a6)](_0x25b4be,_0x4216cb));}}return{'merged':_0x3e73da,'nameMapping':_0x18329f};}export function updateActivationReferences(_0x301868,_0x46f829){const _0x42486b=a129_0x2f8f;if(!_0x301868)return;for(const _0x1e096a of _0x301868){if(!_0x1e096a[_0x42486b(0x184)])continue;for(const _0x3f8cf3 of _0x1e096a[_0x42486b(0x184)]){if(_0x3f8cf3[_0x42486b(0x1ba)]==='activation'&&_0x3f8cf3[_0x42486b(0x18a)]?.[_0x42486b(0x1aa)]){const _0x60af00=_0x46f829[_0x42486b(0x1cc)](_0x3f8cf3[_0x42486b(0x18a)]['activation']);_0x60af00&&_0x60af00!==_0x3f8cf3['with'][_0x42486b(0x1aa)]&&(_0x3f8cf3[_0x42486b(0x18a)][_0x42486b(0x1aa)]=_0x60af00);}}}}export function consolidateSegmentsByContent(_0x284a66,_0x52c1a5){const _0x4859ca=a129_0x2f8f,_0x117e5c={},_0x30d181=new Map(),_0x16de83=new Map();for(const _0x51d0a1 of _0x284a66){if(!_0x51d0a1)continue;for(const [_0x42c3eb,_0x4f71bc]of Object['entries'](_0x51d0a1)){if(!_0x4f71bc[_0x4859ca(0x1b6)]){_0x117e5c[_0x42c3eb]=_0x4f71bc,_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x42c3eb);continue;}const _0x5cffd9=_0x4f71bc['description']&&_0x4f71bc[_0x4859ca(0x191)][_0x4859ca(0x1bb)]()?_0x4f71bc[_0x4859ca(0x191)]:undefined,_0xbd14e2=JSON[_0x4859ca(0x183)]({'description':_0x5cffd9,'rule':deepSortObject(_0x4f71bc[_0x4859ca(0x1b6)])}),_0x1d9606=_0x16de83[_0x4859ca(0x1cc)](_0xbd14e2);if(_0x1d9606){const _0x1c053d={..._0x4f71bc['description']!==undefined&&{'description':_0x4f71bc[_0x4859ca(0x191)]},'rule':_0x4f71bc[_0x4859ca(0x1b6)]?deepSortObject(_0x4f71bc[_0x4859ca(0x1b6)]):_0x4f71bc[_0x4859ca(0x1b6)]};if(_0x42c3eb<_0x1d9606){_0x117e5c[_0x42c3eb]=_0x1c053d,delete _0x117e5c[_0x1d9606];for(const [_0x2f19cd,_0x16c6af]of _0x30d181[_0x4859ca(0x1c5)]()){_0x16c6af===_0x1d9606&&_0x30d181[_0x4859ca(0x1a6)](_0x2f19cd,_0x42c3eb);}_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x42c3eb),_0x16de83['set'](_0xbd14e2,_0x42c3eb);}else _0x117e5c[_0x1d9606]=_0x1c053d,_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x1d9606);}else{let _0x81bfe5=_0x42c3eb;if(_0x52c1a5){const _0x3e8653=_0x52c1a5[_0x4859ca(0x1cc)](_0xbd14e2);_0x3e8653&&_0x3e8653[_0x4859ca(0x1b5)]>0x0&&(_0x81bfe5=_0x3e8653['slice']()['sort']()[0x0]);}const _0x390a8e={..._0x4f71bc[_0x4859ca(0x191)]!==undefined&&{'description':_0x4f71bc['description']},'rule':_0x4f71bc[_0x4859ca(0x1b6)]?deepSortObject(_0x4f71bc['rule']):_0x4f71bc['rule']};_0x117e5c[_0x81bfe5]=_0x390a8e,_0x30d181[_0x4859ca(0x1a6)](_0x42c3eb,_0x81bfe5),_0x16de83[_0x4859ca(0x1a6)](_0xbd14e2,_0x81bfe5);}}}return{'merged':_0x117e5c,'nameMapping':_0x30d181};}export function updateSegmentReferences(_0x3bad86,_0x49fd55){const _0x4b5cf3=a129_0x2f8f;if(!_0x3bad86)return;for(const _0x456979 of _0x3bad86){if(_0x456979[_0x4b5cf3(0x1a8)]?.[_0x4b5cf3(0x1cf)]){const _0x5a1c8a=_0x49fd55[_0x4b5cf3(0x1cc)](_0x456979[_0x4b5cf3(0x1a8)]['segment']);_0x5a1c8a&&(_0x456979['entry_criteria'][_0x4b5cf3(0x1cf)]=_0x5a1c8a);}if(_0x456979[_0x4b5cf3(0x190)])for(const _0x304284 of _0x456979[_0x4b5cf3(0x190)]){if(_0x304284[_0x4b5cf3(0x1cf)]){const _0x3d712c=_0x49fd55['get'](_0x304284[_0x4b5cf3(0x1cf)]);_0x3d712c&&(_0x304284[_0x4b5cf3(0x1cf)]=_0x3d712c);}}if(_0x456979[_0x4b5cf3(0x1ce)]?.['segment']){const _0x28e120=_0x49fd55['get'](_0x456979[_0x4b5cf3(0x1ce)][_0x4b5cf3(0x1cf)]);_0x28e120&&(_0x456979[_0x4b5cf3(0x1ce)]['segment']=_0x28e120);}if(_0x456979[_0x4b5cf3(0x184)])for(const _0x45f14f of _0x456979['steps']){if(_0x45f14f[_0x4b5cf3(0x1ba)]===_0x4b5cf3(0x194)&&_0x45f14f[_0x4b5cf3(0x18a)]?.['branches'])for(const _0x11243a of _0x45f14f['with'][_0x4b5cf3(0x1b4)]){if(_0x11243a['segment']){const _0x1d305a=_0x49fd55['get'](_0x11243a[_0x4b5cf3(0x1cf)]);_0x1d305a&&(_0x11243a[_0x4b5cf3(0x1cf)]=_0x1d305a);}}if(_0x45f14f[_0x4b5cf3(0x1ba)]===_0x4b5cf3(0x19e)&&_0x45f14f[_0x4b5cf3(0x18a)]?.['condition']?.['segment']){const _0x2f4e13=_0x49fd55['get'](_0x45f14f[_0x4b5cf3(0x18a)][_0x4b5cf3(0x1af)][_0x4b5cf3(0x1cf)]);_0x2f4e13&&(_0x45f14f[_0x4b5cf3(0x18a)]['condition'][_0x4b5cf3(0x1cf)]=_0x2f4e13);}}}}export function updateSegmentRefsInSegments(_0x501758,_0x322752){const _0x4459b6=a129_0x2f8f;for(const _0x165309 of Object[_0x4459b6(0x1c1)](_0x501758)){_0x165309['rule']&&updateSegmentRefsInRule(_0x165309[_0x4459b6(0x1b6)],_0x322752);}}function updateSegmentRefsInRule(_0x2f2a84,_0x2d7550){const _0x52547c=a129_0x2f8f;if(_0x2f2a84===null||typeof _0x2f2a84!=='object')return;if(Array[_0x52547c(0x185)](_0x2f2a84)){for(const _0x275157 of _0x2f2a84){updateSegmentRefsInRule(_0x275157,_0x2d7550);}return;}const _0x4f7f2e=_0x2f2a84;if((_0x4f7f2e['type']===_0x52547c(0x1bd)||_0x4f7f2e[_0x52547c(0x1ba)]==='exclude')&&typeof _0x4f7f2e['segment']===_0x52547c(0x1b8)){const _0x25c08d=_0x2d7550[_0x52547c(0x1cc)](_0x4f7f2e[_0x52547c(0x1cf)]);_0x25c08d&&(_0x4f7f2e['segment']=_0x25c08d);}if(_0x4f7f2e[_0x52547c(0x19a)]&&Array[_0x52547c(0x185)](_0x4f7f2e[_0x52547c(0x19a)]))for(const _0x336e06 of _0x4f7f2e[_0x52547c(0x19a)]){updateSegmentRefsInRule(_0x336e06,_0x2d7550);}}export function buildJourneysArray(_0x33209f,_0x4607d0){const _0x13d78f=a129_0x2f8f;return _0x33209f[_0x13d78f(0x1c0)](_0x12fcb8=>{const _0xc521f8=_0x13d78f,_0x183973=_0x4607d0?_0x12fcb8['item']['id']===_0x4607d0:_0x33209f[_0xc521f8(0x1b5)]===0x1,_0x3b6b4d=_0x12fcb8[_0xc521f8(0x1c2)][_0xc521f8(0x1c9)]?.[0x0],_0x1c7af9=_0x3b6b4d?.[_0xc521f8(0x1ca)]||_0x12fcb8[_0xc521f8(0x1c2)][_0xc521f8(0x1ca)],_0x25cdfd={'version':_0x3b6b4d?.[_0xc521f8(0x19b)]||_0x12fcb8[_0xc521f8(0x1c2)][_0xc521f8(0x19b)]||_0x12fcb8['item'][_0xc521f8(0x1c7)],'state':_0x12fcb8[_0xc521f8(0x1a3)]['state']===_0xc521f8(0x197)?_0xc521f8(0x197):'draft','stages':_0x3b6b4d?.[_0xc521f8(0x19d)]||_0x12fcb8['yaml'][_0xc521f8(0x19d)]||[],'id':_0x3b6b4d?.['id']||_0x12fcb8[_0xc521f8(0x1c2)]['id'],'version_number':_0x3b6b4d?.[_0xc521f8(0x18c)]||_0x12fcb8[_0xc521f8(0x1c2)]['version_number']};return _0x1c7af9&&(_0x25cdfd[_0xc521f8(0x1ca)]=_0x1c7af9),_0x183973&&(_0x25cdfd[_0xc521f8(0x196)]=!![]),_0x25cdfd;});}export function buildMergedJourneyDef(_0x54dd1e,_0x1cb083,_0x103286){const _0x159387=a129_0x2f8f,_0x393b81=_0x54dd1e[0x0][_0x159387(0x1c2)],_0x4f8a01=buildJourneysArray(_0x54dd1e,_0x103286),{merged:_0x33db92,nameMapping:_0x2edaf7}=consolidateSegmentsByContent(_0x54dd1e['map'](_0x20c520=>_0x20c520[_0x159387(0x1c2)]['segments']),_0x1cb083);updateSegmentRefsInSegments(_0x33db92,_0x2edaf7);const _0x3448ff=Array[_0x159387(0x1c4)](_0x2edaf7[_0x159387(0x1c5)]())['some'](([_0x482045,_0x140d83])=>_0x482045!==_0x140d83&&_0x482045['startsWith']('entry_criteria'));let _0x5f19ac=_0x33db92,_0x2369cc=new Map();if(_0x3448ff){const _0x3f20a0=consolidateSegmentsByContent([_0x33db92],_0x1cb083);_0x5f19ac=_0x3f20a0[_0x159387(0x1b0)],_0x2369cc=_0x3f20a0[_0x159387(0x1a5)];}const _0x564cdf=new Map(_0x2edaf7);for(const [_0x28b16e,_0x5684f0]of _0x2369cc[_0x159387(0x1c5)]()){_0x564cdf[_0x159387(0x1a6)](_0x28b16e,_0x5684f0);}for(const [_0x3bdef1,_0x272557]of _0x564cdf['entries']()){let _0x5a4b0b=_0x272557,_0x423e5d=0x0;while(_0x564cdf['has'](_0x5a4b0b)&&_0x564cdf[_0x159387(0x1cc)](_0x5a4b0b)!==_0x5a4b0b&&_0x423e5d<MAX_MAPPING_CHAIN_DEPTH){_0x5a4b0b=_0x564cdf[_0x159387(0x1cc)](_0x5a4b0b),_0x423e5d++;}_0x5a4b0b!==_0x272557&&_0x564cdf[_0x159387(0x1a6)](_0x3bdef1,_0x5a4b0b);}for(const _0x112aa8 of _0x4f8a01){updateSegmentReferences(_0x112aa8[_0x159387(0x19d)],_0x564cdf);}const {merged:_0x305d2e,nameMapping:_0x1ff8a0}=consolidateActivationsByContent(_0x54dd1e[_0x159387(0x1c0)](_0xdd818b=>_0xdd818b['yaml']['activations']));for(const _0x12dbf2 of _0x4f8a01){updateActivationReferences(_0x12dbf2[_0x159387(0x19d)],_0x1ff8a0);}let _0x20c5d8=_0x393b81[_0x159387(0x1ca)];if(_0x20c5d8?.['segment']){const _0x544304=_0x564cdf[_0x159387(0x1cc)](_0x20c5d8[_0x159387(0x1cf)]);_0x544304&&(_0x20c5d8={..._0x20c5d8,'segment':_0x544304});}for(const _0x2c8ad6 of _0x4f8a01){if(_0x2c8ad6[_0x159387(0x1ca)]?.[_0x159387(0x1cf)]){const _0x4bd427=_0x564cdf[_0x159387(0x1cc)](_0x2c8ad6[_0x159387(0x1ca)][_0x159387(0x1cf)]);_0x4bd427&&(_0x2c8ad6[_0x159387(0x1ca)]={..._0x2c8ad6[_0x159387(0x1ca)],'segment':_0x4bd427});}}return _0x4f8a01[_0x159387(0x1ab)](_0x272a1a=>_0x272a1a[_0x159387(0x1ca)])&&(_0x20c5d8=undefined),{'type':'journey','name':_0x393b81['name'],'description':_0x393b81[_0x159387(0x191)],'goal':_0x20c5d8,'reentry':_0x393b81[_0x159387(0x1c3)],'segments':Object[_0x159387(0x1b1)](_0x5f19ac)['length']>0x0?_0x5f19ac:undefined,'activations':Object[_0x159387(0x1b1)](_0x305d2e)[_0x159387(0x1b5)]>0x0?_0x305d2e:undefined,'journeys':_0x4f8a01,'bundle_id':_0x393b81[_0x159387(0x18e)],'bundle_name':_0x393b81['bundle_name']};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x4e6981,_0x438e5f,_0x3a1c84,_0x4a12d2){const _0x4f9b44=a129_0x2f8f,_0x397e95=_0x4e6981+':'+_0x438e5f,_0x3117a0=_0x3a1c84[_0x4f9b44(0x1cc)](_0x397e95);if(_0x3117a0)return _0x3117a0;const _0x5147d5=await _0x4a12d2(_0x4e6981),_0x569222=_0x5147d5[_0x4f9b44(0x1a0)][_0x4f9b44(0x1a1)]||_0x5147d5[_0x4f9b44(0x1a0)][_0x4f9b44(0x1c7)],_0x175a33=_0x5147d5[_0x4f9b44(0x1a0)]['journeyStages'][_0x4f9b44(0x1b7)](_0x442735=>String(_0x442735['id'])===String(_0x438e5f)),_0x17b281=_0x175a33?.[_0x4f9b44(0x1c7)]||_0x438e5f,_0x47da09={'journeyName':_0x569222,'stageName':_0x17b281};return _0x3a1c84[_0x4f9b44(0x1a6)](_0x397e95,_0x47da09),_0x47da09;}function a129_0x2f8f(_0x2f2e3a,_0x20d108){_0x2f2e3a=_0x2f2e3a-0x183;const _0x81c9f7=a129_0x81c9();let _0x2f8ffb=_0x81c9f7[_0x2f2e3a];return _0x2f8ffb;}export function formatApiJourneyName(_0x20c28a,_0x451b71){return _0x451b71+'\x20('+_0x20c28a+')';}export function isLocalJourneyRef(_0x25b67c){const _0x2d2953=a129_0x2f8f;return _0x25b67c[_0x2d2953(0x1a9)](_0x2d2953(0x1b3))||_0x25b67c['endsWith'](_0x2d2953(0x1ac));}export function buildLocalRuleToNameMapping(_0x360655){const _0x5d7a5c=a129_0x2f8f,_0x3956fc=new Map();if(!_0x360655)return _0x3956fc;for(const [_0x3194d1,_0x32b101]of Object[_0x5d7a5c(0x1c5)](_0x360655)){if(_0x32b101[_0x5d7a5c(0x1b6)]){const _0x1c1255=serializeRule(_0x32b101[_0x5d7a5c(0x1b6)]),_0x1eaf71=_0x3956fc[_0x5d7a5c(0x1cc)](_0x1c1255)||[];_0x1eaf71['push'](_0x3194d1),_0x3956fc['set'](_0x1c1255,_0x1eaf71);}}return _0x3956fc;}export function buildLocalRuleToNameMappingFromJourney(_0x14b868){const _0x13f379=a129_0x2f8f,_0x1ac9e4=_0x14b868[_0x13f379(0x1bc)];if(!_0x1ac9e4)return new Map();const _0x4263d3=collectSegmentUsageCounts(_0x14b868),_0x263251=new Map();let _0x2de609=0x0;for(const [_0x5c77a8,_0x53c235]of Object[_0x13f379(0x1c5)](_0x1ac9e4)){if(!_0x53c235[_0x13f379(0x1b6)]){_0x2de609++;continue;}const _0x4a1763=serializeRule(_0x53c235[_0x13f379(0x1b6)]),_0x449a1e=_0x263251[_0x13f379(0x1cc)](_0x4a1763)||[];_0x449a1e['push']({'name':_0x5c77a8,'index':_0x2de609}),_0x263251['set'](_0x4a1763,_0x449a1e),_0x2de609++;}const _0x416068=new Map();for(const [_0x300901,_0x4cf38e]of _0x263251){const _0x1139be=_0x4cf38e['slice']()[_0x13f379(0x195)]((_0x12f4e5,_0x24018e)=>{const _0x2a3d61=_0x13f379,_0x52b495=_0x4263d3['get'](_0x12f4e5[_0x2a3d61(0x1c7)])||0x0,_0x4d5fb7=_0x4263d3[_0x2a3d61(0x1cc)](_0x24018e['name'])||0x0;if(_0x52b495!==_0x4d5fb7)return _0x4d5fb7-_0x52b495;return _0x12f4e5[_0x2a3d61(0x1a7)]-_0x24018e[_0x2a3d61(0x1a7)];})[_0x13f379(0x1c0)](_0x4a70c4=>_0x4a70c4['name']);_0x416068[_0x13f379(0x1a6)](_0x300901,_0x1139be);}return _0x416068;}export function collectSegmentUsageCounts(_0x275858){const _0xb1e710=a129_0x2f8f,_0x550075=new Map(),_0x17f641=_0x1d5538=>{const _0x2c372c=a129_0x2f8f;if(!_0x1d5538)return;_0x550075[_0x2c372c(0x1a6)](_0x1d5538,(_0x550075[_0x2c372c(0x1cc)](_0x1d5538)||0x0)+0x1);},_0x5d5b96=_0x37b498=>{const _0x47fd52=a129_0x2f8f;for(const _0x33985b of _0x37b498){_0x17f641(_0x33985b['entry_criteria']?.[_0x47fd52(0x1cf)]);if(_0x33985b[_0x47fd52(0x190)])for(const _0x5c93e9 of _0x33985b[_0x47fd52(0x190)]){_0x17f641(_0x5c93e9[_0x47fd52(0x1cf)]);}_0x17f641(_0x33985b[_0x47fd52(0x1ce)]?.[_0x47fd52(0x1cf)]);if(_0x33985b[_0x47fd52(0x184)])for(const _0x24bb66 of _0x33985b[_0x47fd52(0x184)]){if(_0x24bb66[_0x47fd52(0x1ba)]===_0x47fd52(0x194))for(const _0x5a9399 of _0x24bb66[_0x47fd52(0x18a)][_0x47fd52(0x1b4)]){_0x17f641(_0x5a9399[_0x47fd52(0x1cf)]);}else _0x24bb66[_0x47fd52(0x1ba)]===_0x47fd52(0x19e)&&_0x17f641(_0x24bb66[_0x47fd52(0x18a)][_0x47fd52(0x1af)]?.[_0x47fd52(0x1cf)]);}}};_0x17f641(_0x275858[_0xb1e710(0x1ca)]?.[_0xb1e710(0x1cf)]);if(_0x275858[_0xb1e710(0x1c9)])for(const _0x309f1e of _0x275858[_0xb1e710(0x1c9)]){_0x17f641(_0x309f1e['goal']?.[_0xb1e710(0x1cf)]),_0x5d5b96(_0x309f1e[_0xb1e710(0x19d)]);}_0x275858[_0xb1e710(0x19d)]&&_0x5d5b96(_0x275858[_0xb1e710(0x19d)]);if(_0x275858[_0xb1e710(0x19f)])for(const _0x3292d5 of _0x275858[_0xb1e710(0x19f)]){_0x5d5b96(_0x3292d5[_0xb1e710(0x19d)]);}return _0x550075;}
1
+ (function(_0x3fed0a,_0x28d3e7){const _0xa3f290=a133_0x3661,_0x13b2f6=_0x3fed0a();while(!![]){try{const _0x43bde6=parseInt(_0xa3f290(0x14c))/0x1+-parseInt(_0xa3f290(0x185))/0x2*(parseInt(_0xa3f290(0x142))/0x3)+-parseInt(_0xa3f290(0x145))/0x4*(parseInt(_0xa3f290(0x18b))/0x5)+-parseInt(_0xa3f290(0x168))/0x6*(-parseInt(_0xa3f290(0x14b))/0x7)+-parseInt(_0xa3f290(0x156))/0x8+-parseInt(_0xa3f290(0x16e))/0x9*(parseInt(_0xa3f290(0x16a))/0xa)+parseInt(_0xa3f290(0x15c))/0xb*(parseInt(_0xa3f290(0x15a))/0xc);if(_0x43bde6===_0x28d3e7)break;else _0x13b2f6['push'](_0x13b2f6['shift']());}catch(_0x21b7c7){_0x13b2f6['push'](_0x13b2f6['shift']());}}}(a133_0x1578,0x61884));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x262df8){const _0x587f46=a133_0x3661;return _0x262df8[_0x587f46(0x17c)]()[_0x587f46(0x141)](/\s+/g,'_')[_0x587f46(0x141)](/[^a-z0-9_]/g,'')[_0x587f46(0x141)](/_+/g,'_')[_0x587f46(0x141)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5836ac){const _0x143021=a133_0x3661,_0x204f79=_0x5836ac[_0x143021(0x158)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x204f79){const _0x37eecb=_0x204f79[0x1]['toLowerCase'](),_0x5d03c5=_0x204f79[0x2],_0x1e798d=_0x5d03c5[_0x143021(0x141)](/-/g,'')[_0x143021(0x17f)](0x0,0x4)[_0x143021(0x17c)]();return _0x37eecb+'_'+_0x1e798d;}const _0xb1ada8=_0x5836ac[_0x143021(0x158)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0xb1ada8){const _0x5c715f=_0xb1ada8[0x1],_0x380070=_0xb1ada8[0x2][_0x143021(0x17c)](),_0x306f97=_0x5c715f[_0x143021(0x141)](/-/g,'')[_0x143021(0x17f)](0x0,0x4)['toLowerCase']();return _0x380070+'_'+_0x306f97;}return undefined;}function stableStringify(_0x4f9880){const _0x5bfa63=a133_0x3661;if(Array[_0x5bfa63(0x15b)](_0x4f9880))return'['+_0x4f9880['map'](_0x372b88=>stableStringify(_0x372b88))[_0x5bfa63(0x189)](',')+']';if(_0x4f9880&&typeof _0x4f9880===_0x5bfa63(0x187)){const _0xcfc81b=_0x4f9880,_0x459c5f=Object[_0x5bfa63(0x157)](_0xcfc81b)[_0x5bfa63(0x17d)](),_0x1b24fe=_0x459c5f['map'](_0x7e3e3=>'\x22'+_0x7e3e3+'\x22:'+stableStringify(_0xcfc81b[_0x7e3e3]));return'{'+_0x1b24fe[_0x5bfa63(0x189)](',')+'}';}const _0x470e4e=JSON[_0x5bfa63(0x171)](_0x4f9880);return _0x470e4e===undefined?'null':_0x470e4e;}function a133_0x1578(){const _0x438ac2=['wait','milestone','connector_config','condition','map','replace','410637ObQkFX','all_columns','draft','84244oLTIKN','segments','bundle_name','activation','branches','trim','59556WHqUpp','726966zqJutL','segment','item','with','launched','.yml','name','stages','journeys','behavior','551024WqfCtr','keys','match','get','11569344GynvAF','isArray','11aZVRSA','has','string','reentry','entry_criteria','description','index','find','goal','exclude','version_number','attributes','132qGiOQG','journey','2120bLDEGd','exit_criteria','decision_point','entries','20961XSWGCj','columns','version','stringify','values','yaml','type','nameMapping','activation_template_id','rule','some','versions','include','endsWith','toLowerCase','sort','schedule','slice','conditions','length','startsWith','notification','steps','2Bthshj','set','object','state','join','push','185gfxzXb'];a133_0x1578=function(){return _0x438ac2;};return a133_0x1578();}export function consolidateActivationsByContent(_0x10a05c){const _0x1932bd=a133_0x3661,_0x317a4f={},_0x408336=new Map(),_0x63d517=new Map();for(const _0x2dd1ad of _0x10a05c){if(!_0x2dd1ad)continue;for(const [_0x3acf3d,_0x258e24]of Object[_0x1932bd(0x16d)](_0x2dd1ad)){const _0x902efe={'connection':_0x258e24['connection'],..._0x258e24[_0x1932bd(0x143)]!==undefined&&{'all_columns':_0x258e24[_0x1932bd(0x143)]},..._0x258e24[_0x1932bd(0x16f)]!==undefined&&{'columns':_0x258e24['columns']},..._0x258e24[_0x1932bd(0x155)]!==undefined&&{'behavior':_0x258e24[_0x1932bd(0x155)]},..._0x258e24['schedule']!==undefined&&{'schedule':_0x258e24[_0x1932bd(0x17e)]},..._0x258e24[_0x1932bd(0x183)]!==undefined&&{'notification':_0x258e24['notification']},..._0x258e24[_0x1932bd(0x13e)]!==undefined&&{'connector_config':_0x258e24[_0x1932bd(0x13e)]},..._0x258e24[_0x1932bd(0x176)]!==undefined&&{'activation_template_id':_0x258e24[_0x1932bd(0x176)]}},_0x34145c=stableStringify(_0x902efe),_0x3773fd=_0x63d517[_0x1932bd(0x159)](_0x34145c);_0x3773fd?_0x408336[_0x1932bd(0x186)](_0x3acf3d,_0x3773fd):(_0x317a4f[_0x3acf3d]=_0x258e24,_0x408336[_0x1932bd(0x186)](_0x3acf3d,_0x3acf3d),_0x63d517[_0x1932bd(0x186)](_0x34145c,_0x3acf3d));}}return{'merged':_0x317a4f,'nameMapping':_0x408336};}export function updateActivationReferences(_0x3fe74b,_0x18dcec){const _0x5395c0=a133_0x3661;if(!_0x3fe74b)return;for(const _0x180764 of _0x3fe74b){if(!_0x180764[_0x5395c0(0x184)])continue;for(const _0x1a9b8d of _0x180764[_0x5395c0(0x184)]){if(_0x1a9b8d[_0x5395c0(0x174)]===_0x5395c0(0x148)&&_0x1a9b8d[_0x5395c0(0x14f)]?.[_0x5395c0(0x148)]){const _0x165555=_0x18dcec['get'](_0x1a9b8d['with']['activation']);_0x165555&&_0x165555!==_0x1a9b8d[_0x5395c0(0x14f)][_0x5395c0(0x148)]&&(_0x1a9b8d[_0x5395c0(0x14f)][_0x5395c0(0x148)]=_0x165555);}}}}function a133_0x3661(_0x5e4b2a,_0x1c629e){_0x5e4b2a=_0x5e4b2a-0x13e;const _0x157826=a133_0x1578();let _0x3661b3=_0x157826[_0x5e4b2a];return _0x3661b3;}export function consolidateSegmentsByContent(_0x102916,_0x42a567){const _0xa0b21a=a133_0x3661,_0x32f819={},_0x41a142=new Map(),_0x409e69=new Map();for(const _0xaf136d of _0x102916){if(!_0xaf136d)continue;for(const [_0x149c24,_0x1f42d1]of Object[_0xa0b21a(0x16d)](_0xaf136d)){if(!_0x1f42d1[_0xa0b21a(0x177)]){_0x32f819[_0x149c24]=_0x1f42d1,_0x41a142[_0xa0b21a(0x186)](_0x149c24,_0x149c24);continue;}const _0x68d3ed=_0x1f42d1[_0xa0b21a(0x161)]&&_0x1f42d1[_0xa0b21a(0x161)][_0xa0b21a(0x14a)]()?_0x1f42d1[_0xa0b21a(0x161)]:undefined,_0x1ab997=JSON[_0xa0b21a(0x171)]({'description':_0x68d3ed,'rule':deepSortObject(_0x1f42d1[_0xa0b21a(0x177)])}),_0x4a9a67=_0x409e69[_0xa0b21a(0x159)](_0x1ab997);if(_0x4a9a67){const _0x4f2d52={..._0x1f42d1[_0xa0b21a(0x161)]!==undefined&&{'description':_0x1f42d1[_0xa0b21a(0x161)]},'rule':_0x1f42d1[_0xa0b21a(0x177)]?deepSortObject(_0x1f42d1['rule']):_0x1f42d1[_0xa0b21a(0x177)]};if(_0x149c24<_0x4a9a67){_0x32f819[_0x149c24]=_0x4f2d52,delete _0x32f819[_0x4a9a67];for(const [_0x24498a,_0x340ba1]of _0x41a142[_0xa0b21a(0x16d)]()){_0x340ba1===_0x4a9a67&&_0x41a142[_0xa0b21a(0x186)](_0x24498a,_0x149c24);}_0x41a142[_0xa0b21a(0x186)](_0x149c24,_0x149c24),_0x409e69[_0xa0b21a(0x186)](_0x1ab997,_0x149c24);}else _0x32f819[_0x4a9a67]=_0x4f2d52,_0x41a142['set'](_0x149c24,_0x4a9a67);}else{let _0x17937d=_0x149c24;if(_0x42a567){const _0x47aff2=_0x42a567[_0xa0b21a(0x159)](_0x1ab997);_0x47aff2&&_0x47aff2['length']>0x0&&(_0x17937d=_0x47aff2[_0xa0b21a(0x17f)]()[_0xa0b21a(0x17d)]()[0x0]);}const _0x38e19d={..._0x1f42d1[_0xa0b21a(0x161)]!==undefined&&{'description':_0x1f42d1[_0xa0b21a(0x161)]},'rule':_0x1f42d1[_0xa0b21a(0x177)]?deepSortObject(_0x1f42d1['rule']):_0x1f42d1['rule']};_0x32f819[_0x17937d]=_0x38e19d,_0x41a142[_0xa0b21a(0x186)](_0x149c24,_0x17937d),_0x409e69['set'](_0x1ab997,_0x17937d);}}}return{'merged':_0x32f819,'nameMapping':_0x41a142};}export function updateSegmentReferences(_0x29f8d6,_0x52c242){const _0x566632=a133_0x3661;if(!_0x29f8d6)return;for(const _0x277cc0 of _0x29f8d6){if(_0x277cc0['entry_criteria']?.[_0x566632(0x14d)]){const _0x11e80d=_0x52c242[_0x566632(0x159)](_0x277cc0[_0x566632(0x160)][_0x566632(0x14d)]);_0x11e80d&&(_0x277cc0[_0x566632(0x160)][_0x566632(0x14d)]=_0x11e80d);}if(_0x277cc0['exit_criteria'])for(const _0x1b1a58 of _0x277cc0[_0x566632(0x16b)]){if(_0x1b1a58[_0x566632(0x14d)]){const _0x392e19=_0x52c242[_0x566632(0x159)](_0x1b1a58[_0x566632(0x14d)]);_0x392e19&&(_0x1b1a58[_0x566632(0x14d)]=_0x392e19);}}if(_0x277cc0[_0x566632(0x18d)]?.['segment']){const _0x30109f=_0x52c242[_0x566632(0x159)](_0x277cc0[_0x566632(0x18d)][_0x566632(0x14d)]);_0x30109f&&(_0x277cc0[_0x566632(0x18d)]['segment']=_0x30109f);}if(_0x277cc0[_0x566632(0x184)])for(const _0xa42681 of _0x277cc0['steps']){if(_0xa42681[_0x566632(0x174)]===_0x566632(0x16c)&&_0xa42681[_0x566632(0x14f)]?.[_0x566632(0x149)])for(const _0x2ee122 of _0xa42681[_0x566632(0x14f)][_0x566632(0x149)]){if(_0x2ee122[_0x566632(0x14d)]){const _0x93622d=_0x52c242[_0x566632(0x159)](_0x2ee122['segment']);_0x93622d&&(_0x2ee122[_0x566632(0x14d)]=_0x93622d);}}if(_0xa42681[_0x566632(0x174)]===_0x566632(0x18c)&&_0xa42681[_0x566632(0x14f)]?.[_0x566632(0x13f)]?.[_0x566632(0x14d)]){const _0x1d069d=_0x52c242[_0x566632(0x159)](_0xa42681[_0x566632(0x14f)]['condition'][_0x566632(0x14d)]);_0x1d069d&&(_0xa42681[_0x566632(0x14f)]['condition'][_0x566632(0x14d)]=_0x1d069d);}}}}export function updateSegmentRefsInSegments(_0x2e34d7,_0x4ba545){const _0x190dc8=a133_0x3661;for(const _0x477c72 of Object[_0x190dc8(0x172)](_0x2e34d7)){_0x477c72[_0x190dc8(0x177)]&&updateSegmentRefsInRule(_0x477c72['rule'],_0x4ba545);}}function updateSegmentRefsInRule(_0x317045,_0x2da4c3){const _0x1fcd15=a133_0x3661;if(_0x317045===null||typeof _0x317045!=='object')return;if(Array[_0x1fcd15(0x15b)](_0x317045)){for(const _0x456b15 of _0x317045){updateSegmentRefsInRule(_0x456b15,_0x2da4c3);}return;}const _0x3e95a3=_0x317045;if((_0x3e95a3[_0x1fcd15(0x174)]===_0x1fcd15(0x17a)||_0x3e95a3[_0x1fcd15(0x174)]===_0x1fcd15(0x165))&&typeof _0x3e95a3[_0x1fcd15(0x14d)]===_0x1fcd15(0x15e)){const _0x38d14b=_0x2da4c3[_0x1fcd15(0x159)](_0x3e95a3[_0x1fcd15(0x14d)]);_0x38d14b&&(_0x3e95a3[_0x1fcd15(0x14d)]=_0x38d14b);}if(_0x3e95a3['conditions']&&Array['isArray'](_0x3e95a3[_0x1fcd15(0x180)]))for(const _0xea4d5a of _0x3e95a3[_0x1fcd15(0x180)]){updateSegmentRefsInRule(_0xea4d5a,_0x2da4c3);}}export function buildJourneysArray(_0x38281b,_0xba5ae9){const _0x41fff5=a133_0x3661;return _0x38281b[_0x41fff5(0x140)](_0x56aaa5=>{const _0x1dbcf1=_0x41fff5,_0x5cd1e0=_0xba5ae9?_0x56aaa5[_0x1dbcf1(0x14e)]['id']===_0xba5ae9:_0x38281b[_0x1dbcf1(0x181)]===0x1,_0x544cf9=_0x56aaa5[_0x1dbcf1(0x173)]['journeys']?.[0x0],_0x4fb5b4=_0x544cf9?.[_0x1dbcf1(0x164)]||_0x56aaa5['yaml']['goal'],_0x397e67={'version':_0x544cf9?.['version']||_0x56aaa5[_0x1dbcf1(0x173)][_0x1dbcf1(0x170)]||_0x56aaa5['item']['name'],'state':_0x56aaa5[_0x1dbcf1(0x14e)][_0x1dbcf1(0x188)]==='launched'?_0x1dbcf1(0x150):_0x1dbcf1(0x144),'stages':_0x544cf9?.['stages']||_0x56aaa5[_0x1dbcf1(0x173)][_0x1dbcf1(0x153)]||[],'id':_0x544cf9?.['id']||_0x56aaa5['yaml']['id'],'version_number':_0x544cf9?.[_0x1dbcf1(0x166)]||_0x56aaa5[_0x1dbcf1(0x173)][_0x1dbcf1(0x166)]};return _0x4fb5b4&&(_0x397e67[_0x1dbcf1(0x164)]=_0x4fb5b4),_0x5cd1e0&&(_0x397e67['latest']=!![]),_0x397e67;});}export function buildMergedJourneyDef(_0x2d1cde,_0x1234f0,_0x5a49f9){const _0x15512c=a133_0x3661,_0x165e29=_0x2d1cde[0x0][_0x15512c(0x173)],_0x112a2d=buildJourneysArray(_0x2d1cde,_0x5a49f9),{merged:_0x243895,nameMapping:_0x1bd5ef}=consolidateSegmentsByContent(_0x2d1cde['map'](_0x53ca07=>_0x53ca07[_0x15512c(0x173)][_0x15512c(0x146)]),_0x1234f0);updateSegmentRefsInSegments(_0x243895,_0x1bd5ef);const _0x53b1b0=Array['from'](_0x1bd5ef['entries']())[_0x15512c(0x178)](([_0x395bb0,_0x1f78ff])=>_0x395bb0!==_0x1f78ff&&_0x395bb0[_0x15512c(0x182)](_0x15512c(0x160)));let _0x59c79d=_0x243895,_0x3f1bd8=new Map();if(_0x53b1b0){const _0x185ee7=consolidateSegmentsByContent([_0x243895],_0x1234f0);_0x59c79d=_0x185ee7['merged'],_0x3f1bd8=_0x185ee7[_0x15512c(0x175)];}const _0x4de7ad=new Map(_0x1bd5ef);for(const [_0x4eaddd,_0x59de91]of _0x3f1bd8['entries']()){_0x4de7ad[_0x15512c(0x186)](_0x4eaddd,_0x59de91);}for(const [_0x3bd8e2,_0x581f2f]of _0x4de7ad['entries']()){let _0x5cab3f=_0x581f2f,_0x73813a=0x0;while(_0x4de7ad[_0x15512c(0x15d)](_0x5cab3f)&&_0x4de7ad['get'](_0x5cab3f)!==_0x5cab3f&&_0x73813a<MAX_MAPPING_CHAIN_DEPTH){_0x5cab3f=_0x4de7ad[_0x15512c(0x159)](_0x5cab3f),_0x73813a++;}_0x5cab3f!==_0x581f2f&&_0x4de7ad['set'](_0x3bd8e2,_0x5cab3f);}for(const _0x54af02 of _0x112a2d){updateSegmentReferences(_0x54af02[_0x15512c(0x153)],_0x4de7ad);}const {merged:_0x516d6d,nameMapping:_0x3e22d1}=consolidateActivationsByContent(_0x2d1cde[_0x15512c(0x140)](_0x5e3c99=>_0x5e3c99[_0x15512c(0x173)]['activations']));for(const _0x1d4aaf of _0x112a2d){updateActivationReferences(_0x1d4aaf[_0x15512c(0x153)],_0x3e22d1);}let _0x10dca1=_0x165e29[_0x15512c(0x164)];if(_0x10dca1?.['segment']){const _0x5652c8=_0x4de7ad[_0x15512c(0x159)](_0x10dca1[_0x15512c(0x14d)]);_0x5652c8&&(_0x10dca1={..._0x10dca1,'segment':_0x5652c8});}for(const _0x110454 of _0x112a2d){if(_0x110454[_0x15512c(0x164)]?.[_0x15512c(0x14d)]){const _0x61975f=_0x4de7ad['get'](_0x110454[_0x15512c(0x164)][_0x15512c(0x14d)]);_0x61975f&&(_0x110454[_0x15512c(0x164)]={..._0x110454[_0x15512c(0x164)],'segment':_0x61975f});}}return _0x112a2d['some'](_0x4d1ebe=>_0x4d1ebe[_0x15512c(0x164)])&&(_0x10dca1=undefined),{'type':_0x15512c(0x169),'name':_0x165e29['name'],'description':_0x165e29[_0x15512c(0x161)],'goal':_0x10dca1,'reentry':_0x165e29[_0x15512c(0x15f)],'segments':Object[_0x15512c(0x157)](_0x59c79d)['length']>0x0?_0x59c79d:undefined,'activations':Object[_0x15512c(0x157)](_0x516d6d)[_0x15512c(0x181)]>0x0?_0x516d6d:undefined,'journeys':_0x112a2d,'bundle_id':_0x165e29['bundle_id'],'bundle_name':_0x165e29[_0x15512c(0x147)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x11004c,_0x8770ee,_0x5a76ee,_0x2c5b58){const _0x35ee29=a133_0x3661,_0x5be02c=_0x11004c+':'+_0x8770ee,_0x5260f6=_0x5a76ee[_0x35ee29(0x159)](_0x5be02c);if(_0x5260f6)return _0x5260f6;const _0x5ae6c3=await _0x2c5b58(_0x11004c),_0x273062=_0x5ae6c3[_0x35ee29(0x167)]['journeyBundleName']||_0x5ae6c3[_0x35ee29(0x167)]['name'],_0x4682fa=_0x5ae6c3[_0x35ee29(0x167)]['journeyStages'][_0x35ee29(0x163)](_0x8f12e=>String(_0x8f12e['id'])===String(_0x8770ee)),_0x14a3fe=_0x4682fa?.[_0x35ee29(0x152)]||_0x8770ee,_0x5934cf={'journeyName':_0x273062,'stageName':_0x14a3fe};return _0x5a76ee[_0x35ee29(0x186)](_0x5be02c,_0x5934cf),_0x5934cf;}export function formatApiJourneyName(_0x598ed1,_0x56b8e2){return _0x56b8e2+'\x20('+_0x598ed1+')';}export function isLocalJourneyRef(_0x286570){const _0x331a6f=a133_0x3661;return _0x286570['endsWith'](_0x331a6f(0x151))||_0x286570[_0x331a6f(0x17b)]('.yaml');}export function buildLocalRuleToNameMapping(_0x56b3fd){const _0x339585=a133_0x3661,_0x188ef3=new Map();if(!_0x56b3fd)return _0x188ef3;for(const [_0x1ee9c0,_0x39fcc0]of Object[_0x339585(0x16d)](_0x56b3fd)){if(_0x39fcc0['rule']){const _0x15905d=serializeRule(_0x39fcc0[_0x339585(0x177)]),_0x250132=_0x188ef3[_0x339585(0x159)](_0x15905d)||[];_0x250132['push'](_0x1ee9c0),_0x188ef3['set'](_0x15905d,_0x250132);}}return _0x188ef3;}export function buildLocalRuleToNameMappingFromJourney(_0x4bb430){const _0x3aef03=a133_0x3661,_0x4213b2=_0x4bb430['segments'];if(!_0x4213b2)return new Map();const _0x15b946=collectSegmentUsageCounts(_0x4bb430),_0xa0e0ea=new Map();let _0x122c2e=0x0;for(const [_0x34611e,_0x593034]of Object['entries'](_0x4213b2)){if(!_0x593034[_0x3aef03(0x177)]){_0x122c2e++;continue;}const _0x4530b6=serializeRule(_0x593034[_0x3aef03(0x177)]),_0x2d1315=_0xa0e0ea['get'](_0x4530b6)||[];_0x2d1315[_0x3aef03(0x18a)]({'name':_0x34611e,'index':_0x122c2e}),_0xa0e0ea[_0x3aef03(0x186)](_0x4530b6,_0x2d1315),_0x122c2e++;}const _0x14a63c=new Map();for(const [_0x59b409,_0x39c82b]of _0xa0e0ea){const _0x184e4b=_0x39c82b[_0x3aef03(0x17f)]()[_0x3aef03(0x17d)]((_0x1aa176,_0x2adc62)=>{const _0x36f4ca=_0x3aef03,_0x2980cf=_0x15b946[_0x36f4ca(0x159)](_0x1aa176[_0x36f4ca(0x152)])||0x0,_0x3c5799=_0x15b946[_0x36f4ca(0x159)](_0x2adc62[_0x36f4ca(0x152)])||0x0;if(_0x2980cf!==_0x3c5799)return _0x3c5799-_0x2980cf;return _0x1aa176[_0x36f4ca(0x162)]-_0x2adc62[_0x36f4ca(0x162)];})['map'](_0x2a987b=>_0x2a987b[_0x3aef03(0x152)]);_0x14a63c[_0x3aef03(0x186)](_0x59b409,_0x184e4b);}return _0x14a63c;}export function collectSegmentUsageCounts(_0x27772e){const _0x20179e=a133_0x3661,_0x481ebc=new Map(),_0x5ded52=_0x3b612a=>{const _0x7b7dcc=a133_0x3661;if(!_0x3b612a)return;_0x481ebc[_0x7b7dcc(0x186)](_0x3b612a,(_0x481ebc[_0x7b7dcc(0x159)](_0x3b612a)||0x0)+0x1);},_0x1f23e7=_0x1a5f4f=>{const _0x15e9bd=a133_0x3661;for(const _0x5df0a8 of _0x1a5f4f){_0x5ded52(_0x5df0a8[_0x15e9bd(0x160)]?.[_0x15e9bd(0x14d)]);if(_0x5df0a8[_0x15e9bd(0x16b)])for(const _0x475cc9 of _0x5df0a8[_0x15e9bd(0x16b)]){_0x5ded52(_0x475cc9['segment']);}_0x5ded52(_0x5df0a8[_0x15e9bd(0x18d)]?.[_0x15e9bd(0x14d)]);if(_0x5df0a8[_0x15e9bd(0x184)])for(const _0x236fda of _0x5df0a8[_0x15e9bd(0x184)]){if(_0x236fda[_0x15e9bd(0x174)]==='decision_point')for(const _0x2b0a3c of _0x236fda[_0x15e9bd(0x14f)]['branches']){_0x5ded52(_0x2b0a3c[_0x15e9bd(0x14d)]);}else _0x236fda[_0x15e9bd(0x174)]===_0x15e9bd(0x18c)&&_0x5ded52(_0x236fda[_0x15e9bd(0x14f)][_0x15e9bd(0x13f)]?.['segment']);}}};_0x5ded52(_0x27772e['goal']?.[_0x20179e(0x14d)]);if(_0x27772e[_0x20179e(0x154)])for(const _0x3c65cd of _0x27772e[_0x20179e(0x154)]){_0x5ded52(_0x3c65cd[_0x20179e(0x164)]?.[_0x20179e(0x14d)]),_0x1f23e7(_0x3c65cd['stages']);}_0x27772e[_0x20179e(0x153)]&&_0x1f23e7(_0x27772e[_0x20179e(0x153)]);if(_0x27772e[_0x20179e(0x179)])for(const _0x3036dd of _0x27772e[_0x20179e(0x179)]){_0x1f23e7(_0x3036dd[_0x20179e(0x153)]);}return _0x481ebc;}
@@ -1 +1 @@
1
- (function(_0x2b9f8c,_0x5077b8){const _0x3f7f11=a130_0x3d22,_0x1aa8e0=_0x2b9f8c();while(!![]){try{const _0x36b317=parseInt(_0x3f7f11(0x1f9))/0x1+-parseInt(_0x3f7f11(0x1cc))/0x2*(-parseInt(_0x3f7f11(0x1ba))/0x3)+-parseInt(_0x3f7f11(0x1f8))/0x4+-parseInt(_0x3f7f11(0x1b7))/0x5+parseInt(_0x3f7f11(0x17f))/0x6+-parseInt(_0x3f7f11(0x1ef))/0x7*(parseInt(_0x3f7f11(0x18e))/0x8)+parseInt(_0x3f7f11(0x194))/0x9;if(_0x36b317===_0x5077b8)break;else _0x1aa8e0['push'](_0x1aa8e0['shift']());}catch(_0x2abf63){_0x1aa8e0['push'](_0x1aa8e0['shift']());}}}(a130_0x317b,0x75810));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x317eb5,_0x207382,_0x3af0de,_0x3aa49b,_0x5be70f,_0x3eea41){const _0x9773ff=a130_0x3d22;return{'level':_0x317eb5,'path':_0x207382,'code':_0x3af0de,'message':_0x3aa49b,'location':getLocationFromPath(_0x5be70f[_0x9773ff(0x1c5)],_0x5be70f[_0x9773ff(0x1d6)],pathToArray(_0x3eea41??_0x207382))};}function validateVersionStructure(_0xb32ab1,_0x2956d7){const _0x4fe3ad=a130_0x3d22,_0x1d9a6f=[];return _0xb32ab1[_0x4fe3ad(0x180)]>MAX_STAGES&&_0x1d9a6f[_0x4fe3ad(0x160)](createIssue(_0x4fe3ad(0x1a6),_0x4fe3ad(0x1c7),'TOO_MANY_STAGES',_0x4fe3ad(0x1e6)+_0xb32ab1['length']+_0x4fe3ad(0x15a)+MAX_STAGES,_0x2956d7)),_0x1d9a6f;}function validateStageStructure(_0x39ddd5,_0x4e7a7e,_0x5c36d2,_0x1d444b){const _0x4386de=a130_0x3d22,_0x5054e9=[],_0x4d00aa=_0x4386de(0x1ed)+_0x4e7a7e+']';_0x4e7a7e===0x0&&!_0x39ddd5['entry_criteria']&&_0x5054e9['push'](createIssue(_0x4386de(0x1a6),_0x4d00aa+'.entry_criteria','MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x39ddd5[_0x4386de(0x1d4)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x1d444b,_0x4d00aa));const _0x52880e=_0x4e7a7e===_0x5c36d2-0x1;!_0x52880e&&!_0x39ddd5[_0x4386de(0x16e)]&&_0x5054e9['push'](createIssue(_0x4386de(0x1a6),_0x4d00aa+'.milestone',_0x4386de(0x16b),'Stage\x20\x27'+_0x39ddd5['name']+'\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone',_0x1d444b,_0x4d00aa));(!_0x39ddd5[_0x4386de(0x1a1)]||_0x39ddd5['exit_criteria']['length']===0x0)&&_0x5054e9['push'](createIssue(_0x4386de(0x196),_0x4d00aa+'.exit_criteria',_0x4386de(0x1bc),_0x4386de(0x1e2)+_0x39ddd5[_0x4386de(0x1d4)]+_0x4386de(0x16f),_0x1d444b,_0x4d00aa));const _0x1a7f9b=_0x39ddd5[_0x4386de(0x14a)]?.[_0x4386de(0x180)]??0x0;if(_0x1a7f9b===0x0)_0x5054e9['push'](createIssue(_0x4386de(0x1a6),_0x4d00aa+_0x4386de(0x1ae),_0x4386de(0x187),_0x4386de(0x1e2)+_0x39ddd5[_0x4386de(0x1d4)]+_0x4386de(0x1c6),_0x1d444b,_0x4d00aa+_0x4386de(0x1ae)));else{if(_0x1a7f9b===0x1)_0x5054e9[_0x4386de(0x160)](createIssue('warning',_0x4d00aa+_0x4386de(0x1ae),'INSUFFICIENT_STEPS',_0x4386de(0x1e2)+_0x39ddd5['name']+_0x4386de(0x1e5),_0x1d444b,_0x4d00aa+_0x4386de(0x1ae)));else _0x1a7f9b<=0x3&&_0x5054e9[_0x4386de(0x160)](createIssue(_0x4386de(0x196),_0x4d00aa+'.steps',_0x4386de(0x193),_0x4386de(0x1e2)+_0x39ddd5['name']+_0x4386de(0x14b)+_0x1a7f9b+_0x4386de(0x178),_0x1d444b,_0x4d00aa+_0x4386de(0x1ae)));}return _0x5054e9;}function a130_0x317b(){const _0x321ca8=['.with.target','goalIsInherited','match','journeys[','activationKeys','next','code','step\x20\x27','1793864bQOmhi','645108tfbxUW','launched','End\x20step\x20\x27','safeParse','.with.condition.segment','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','sort','Jump\x20step\x20requires\x20a\x20target','goal','indices','segments.','steps','\x27\x20has\x20only\x20','branch\x20\x27','data','issues','\x20versions)','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','endsWith','has','segment','DUPLICATE_LATEST','.with.activation','ACTIVATION_SCHEMA_ERROR','success','size','\x20stages\x20but\x20maximum\x20is\x20','activation','timeout\x20of\x20\x27','message','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','.with.condition','push','variants','join','.with.condition.timeout','A/B\x20test\x20variant\x20\x27','includes','MISSING_NAME','MISSING_GOAL','values','journeys,\x20stages,\x20or\x20versions','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','MISSING_MILESTONE','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.exit_criteria[','milestone','\x27\x20has\x20no\x20exit_criteria\x20defined',').\x20Use\x20a\x20merge\x20step.','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','ref:','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Activation\x20step\x20requires\x20an\x20activation\x20reference',').\x20Merge\x20is\x20unnecessary.','segments','MISSING_SEGMENT_REFERENCE','\x20steps\x20(may\x20be\x20too\x20simple)','splice','SINGLE_INPUT_MERGE','journeys','\x27\x20(first\x20defined\x20at\x20steps[','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','.rule','1067766CzExmA','length','jump','.with.branches','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20has\x20no\x20end\x20step','rule','stepNames','INSUFFICIENT_STEPS','.with.condition.timeout.next','state','map','merge','get','latest','8DTRoWC','versions[','.stages','trim','.with','FEW_STEPS','6433290invtNc','add','warning','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','\x20(across\x20','Journey\x20name\x20is\x20required','END_STEP_HAS_NEXT_OR_WITH','journey\x20entry','set','condition','type','.next','embeddedSegments','exit_criteria','percentage','MISSING_WAIT_PARAMS','branches','INVALID_NEXT_REFERENCE','error','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','path','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','skipSchema','BRANCH_DIRECTLY_TO_MERGE','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','.steps','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','version','MISSING_CONDITIONS','MISSING_ACTIVATION_REF','.with.condition.next','INVALID_AB_TEST_PERCENTAGES','versions','MISSING_STAGES','3302720wNsdws','condition\x20of\x20\x27','entries','3PqGbca','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','MISSING_EXIT_CRITERIA','startsWith','DUPLICATE_STEP_NAME','MISSING_ACTIVATION_DEFINITION','MISSING_END_STEP','Embedded\x20segment\x20\x27','Journey\x20has\x20no\x20goal\x20defined','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','\x27\x20(from:\x20','document','\x27\x20has\x20no\x20steps','stages','description','every','excluded','.entry_criteria','1398236OgPcax','end','level','with','decision_point','target','.with.variants','variant\x20\x27','name','referencedSegments','source','reduce','Merge\x20step\x20\x27','JOURNEY_SCHEMA_ERROR','timeout','\x27\x20of\x20\x27','ab_test','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','INVALID_JUMP_TARGET','excluded_','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','Stage\x20\x27','wait','entry_criteria','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','Journey\x20has\x20','activations','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','symbol','some','keys','Decision\x20branch\x20\x27','stages[','.segment','4526837niaSdC'];a130_0x317b=function(){return _0x321ca8;};return a130_0x317b();}function validateStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef){const _0x967244=a130_0x3d22,_0x3b50eb=[];if(_0x33efba[_0x967244(0x19e)]==='end')return _0x33efba['next']&&_0x3b50eb[_0x967244(0x160)](createIssue(_0x967244(0x1a6),_0x3b4a3f+_0x967244(0x19f),_0x967244(0x19a),_0x967244(0x1fb)+_0x33efba[_0x967244(0x1d4)]+_0x967244(0x1a7),_0x54f7ba)),_0x967244(0x1cf)in _0x33efba&&_0x33efba[_0x967244(0x1cf)]!==undefined&&_0x3b50eb['push'](createIssue(_0x967244(0x1a6),_0x3b4a3f+'.with',_0x967244(0x19a),_0x967244(0x1fb)+_0x33efba[_0x967244(0x1d4)]+_0x967244(0x201),_0x54f7ba)),_0x3b50eb;_0x33efba[_0x967244(0x1f5)]&&(_0x54f7ba[_0x967244(0x186)]&&!_0x54f7ba[_0x967244(0x186)][_0x967244(0x153)](_0x33efba[_0x967244(0x1f5)])&&_0x3b50eb[_0x967244(0x160)](createIssue(_0x967244(0x1a6),_0x3b4a3f+_0x967244(0x19f),_0x967244(0x1a5),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x33efba[_0x967244(0x1f5)]+'\x27',_0x54f7ba)));switch(_0x33efba['type']){case _0x967244(0x1e3):_0x3b50eb['push'](...validateWaitStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef));break;case _0x967244(0x15b):_0x3b50eb[_0x967244(0x160)](...validateActivationStep(_0x33efba,_0x3b4a3f,_0x54f7ba));break;case'decision_point':_0x3b50eb['push'](...validateDecisionPointStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef));break;case'ab_test':_0x3b50eb['push'](...validateAbTestStep(_0x33efba,_0x3b4a3f,_0x54f7ba,_0x4e56ef));break;case _0x967244(0x181):_0x3b50eb[_0x967244(0x160)](...validateJumpStep(_0x33efba,_0x3b4a3f,_0x54f7ba));break;}return _0x3b50eb;}function validateWaitStep(_0x1fdd99,_0x3c727e,_0x668c70,_0x3c0098){const _0x221bd0=a130_0x3d22,_0x4a2a34=[];if(!_0x1fdd99[_0x221bd0(0x1cf)])return _0x4a2a34[_0x221bd0(0x160)](createIssue('error',_0x3c727e+_0x221bd0(0x192),_0x221bd0(0x1a3),_0x221bd0(0x17d),_0x668c70,_0x3c727e)),_0x4a2a34;if(_0x1fdd99[_0x221bd0(0x1cf)][_0x221bd0(0x19d)]){const _0x222ecb=_0x1fdd99[_0x221bd0(0x1cf)][_0x221bd0(0x19d)];if(_0x222ecb[_0x221bd0(0x154)]){_0x668c70['referencedSegments']?.[_0x221bd0(0x195)](_0x222ecb[_0x221bd0(0x154)]);!_0x222ecb[_0x221bd0(0x154)][_0x221bd0(0x1bd)](_0x221bd0(0x172))&&(_0x668c70[_0x221bd0(0x1a0)]&&!_0x668c70[_0x221bd0(0x1a0)]['has'](_0x222ecb[_0x221bd0(0x154)])&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x1a6),_0x3c727e+_0x221bd0(0x1fd),'MISSING_SEGMENT_REFERENCE',_0x221bd0(0x150)+_0x222ecb[_0x221bd0(0x154)]+_0x221bd0(0x173),_0x668c70)));_0x222ecb['next']&&_0x668c70['stepNames']&&!_0x668c70[_0x221bd0(0x186)]['has'](_0x222ecb[_0x221bd0(0x1f5)])&&_0x4a2a34[_0x221bd0(0x160)](createIssue('error',_0x3c727e+_0x221bd0(0x1b3),_0x221bd0(0x1a5),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x222ecb[_0x221bd0(0x1f5)]+'\x27',_0x668c70));_0x222ecb[_0x221bd0(0x1da)]?.[_0x221bd0(0x1f5)]&&_0x668c70[_0x221bd0(0x186)]&&!_0x668c70[_0x221bd0(0x186)][_0x221bd0(0x153)](_0x222ecb[_0x221bd0(0x1da)][_0x221bd0(0x1f5)])&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x1a6),_0x3c727e+'.with.condition.timeout.next','INVALID_NEXT_REFERENCE',_0x221bd0(0x171)+_0x222ecb['timeout'][_0x221bd0(0x1f5)]+'\x27',_0x668c70));const _0x1052a4=_0x222ecb[_0x221bd0(0x1f5)]||_0x1fdd99[_0x221bd0(0x1f5)],_0x2c463b=_0x222ecb['timeout']?.[_0x221bd0(0x1f5)]||_0x1fdd99[_0x221bd0(0x1f5)];if(_0x1052a4){const _0x592d49=_0x3c0098['get'](_0x1052a4);_0x592d49?.['type']===_0x221bd0(0x18b)&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x196),_0x3c727e+_0x221bd0(0x1b3),_0x221bd0(0x1ab),_0x221bd0(0x197)+_0x1052a4+_0x221bd0(0x1a9),_0x668c70,_0x3c727e+_0x221bd0(0x15f)));}if(_0x2c463b){const _0x3033ca=_0x3c0098[_0x221bd0(0x18c)](_0x2c463b);_0x3033ca?.['type']===_0x221bd0(0x18b)&&_0x4a2a34[_0x221bd0(0x160)](createIssue(_0x221bd0(0x196),_0x3c727e+_0x221bd0(0x188),_0x221bd0(0x1ab),_0x221bd0(0x16c)+_0x2c463b+_0x221bd0(0x1a9),_0x668c70,_0x3c727e+_0x221bd0(0x163)));}}}return _0x4a2a34;}function validateActivationStep(_0x101b0e,_0x3e806f,_0x375112){const _0x3bfe61=a130_0x3d22,_0x311a0=[];if(!_0x101b0e[_0x3bfe61(0x1cf)]?.[_0x3bfe61(0x15b)])return _0x311a0[_0x3bfe61(0x160)](createIssue(_0x3bfe61(0x1a6),_0x3e806f+_0x3bfe61(0x156),_0x3bfe61(0x1b2),_0x3bfe61(0x174),_0x375112,_0x3e806f)),_0x311a0;const _0x4c8a4e=_0x101b0e[_0x3bfe61(0x1cf)]['activation'];return _0x375112[_0x3bfe61(0x1f4)]&&!_0x4c8a4e[_0x3bfe61(0x1bd)](_0x3bfe61(0x172))&&(!_0x375112[_0x3bfe61(0x1f4)][_0x3bfe61(0x153)](_0x4c8a4e)&&_0x311a0[_0x3bfe61(0x160)](createIssue(_0x3bfe61(0x1a6),_0x3e806f+_0x3bfe61(0x156),_0x3bfe61(0x1bf),_0x3bfe61(0x1af)+_0x4c8a4e+_0x3bfe61(0x1e8),_0x375112))),_0x311a0;}function validateDecisionPointStep(_0xe294f,_0x4513a8,_0x4f8036,_0x30e887){const _0x45f128=a130_0x3d22,_0x48408e=[];if(!_0xe294f[_0x45f128(0x1cf)]?.[_0x45f128(0x1a4)]||_0xe294f[_0x45f128(0x1cf)][_0x45f128(0x1a4)][_0x45f128(0x180)]===0x0)return _0x48408e['push'](createIssue('error',_0x4513a8+_0x45f128(0x182),_0x45f128(0x1b1),_0x45f128(0x15e),_0x4f8036,_0x4513a8)),_0x48408e;for(let _0x56cb28=0x0;_0x56cb28<_0xe294f[_0x45f128(0x1cf)]['branches'][_0x45f128(0x180)];_0x56cb28++){const _0x544d31=_0xe294f['with'][_0x45f128(0x1a4)][_0x56cb28],_0x8df646=_0x4513a8+'.with.branches['+_0x56cb28+']';_0x544d31[_0x45f128(0x154)]&&!_0x544d31[_0x45f128(0x1ca)]&&(_0x4f8036['referencedSegments']?.[_0x45f128(0x195)](_0x544d31[_0x45f128(0x154)]),!_0x544d31[_0x45f128(0x154)]['startsWith']('ref:')&&(_0x4f8036[_0x45f128(0x1a0)]&&!_0x4f8036[_0x45f128(0x1a0)][_0x45f128(0x153)](_0x544d31[_0x45f128(0x154)])&&_0x48408e[_0x45f128(0x160)](createIssue(_0x45f128(0x1a6),_0x8df646+_0x45f128(0x1ee),_0x45f128(0x177),_0x45f128(0x1c3)+_0x544d31['segment']+'\x27',_0x4f8036))));_0x544d31[_0x45f128(0x1f5)]&&_0x4f8036[_0x45f128(0x186)]&&!_0x4f8036[_0x45f128(0x186)][_0x45f128(0x153)](_0x544d31[_0x45f128(0x1f5)])&&_0x48408e[_0x45f128(0x160)](createIssue(_0x45f128(0x1a6),_0x8df646+_0x45f128(0x19f),'INVALID_NEXT_REFERENCE',_0x45f128(0x16a)+_0x544d31[_0x45f128(0x1f5)]+'\x27',_0x4f8036));if(_0x544d31[_0x45f128(0x1f5)]){const _0x16dd2b=_0x30e887[_0x45f128(0x18c)](_0x544d31[_0x45f128(0x1f5)]);_0x16dd2b?.[_0x45f128(0x19e)]==='merge'&&_0x48408e[_0x45f128(0x160)](createIssue(_0x45f128(0x196),_0x8df646+_0x45f128(0x19f),_0x45f128(0x1ab),_0x45f128(0x1ec)+_0x544d31[_0x45f128(0x1d4)]+_0x45f128(0x1e1)+_0x544d31[_0x45f128(0x1f5)]+_0x45f128(0x200),_0x4f8036));}}return _0x48408e;}function validateAbTestStep(_0x3e0e44,_0x4fb272,_0x267b4e,_0x7d746b){const _0x2f9bbc=a130_0x3d22,_0xba0772=[];if(!_0x3e0e44[_0x2f9bbc(0x1cf)]?.['variants']||_0x3e0e44['with'][_0x2f9bbc(0x161)][_0x2f9bbc(0x180)]===0x0)return _0xba0772['push'](createIssue(_0x2f9bbc(0x1a6),_0x4fb272+_0x2f9bbc(0x1d2),_0x2f9bbc(0x1b1),_0x2f9bbc(0x1ad),_0x267b4e,_0x4fb272)),_0xba0772;const _0x4796e1=_0x3e0e44['with'][_0x2f9bbc(0x161)][_0x2f9bbc(0x1d7)]((_0xab72fb,_0x1e7374)=>_0xab72fb+(_0x1e7374[_0x2f9bbc(0x1a2)]||0x0),0x0);Math['abs'](_0x4796e1-0x64)>0.01&&_0xba0772[_0x2f9bbc(0x160)](createIssue(_0x2f9bbc(0x1a6),_0x4fb272+_0x2f9bbc(0x1d2),_0x2f9bbc(0x1b4),_0x2f9bbc(0x151)+_0x4796e1+'%)',_0x267b4e));for(let _0x196504=0x0;_0x196504<_0x3e0e44[_0x2f9bbc(0x1cf)][_0x2f9bbc(0x161)][_0x2f9bbc(0x180)];_0x196504++){const _0x2425bf=_0x3e0e44['with'][_0x2f9bbc(0x161)][_0x196504],_0x4e9475=_0x4fb272+'.with.variants['+_0x196504+']';_0x2425bf[_0x2f9bbc(0x1f5)]&&_0x267b4e[_0x2f9bbc(0x186)]&&!_0x267b4e[_0x2f9bbc(0x186)][_0x2f9bbc(0x153)](_0x2425bf[_0x2f9bbc(0x1f5)])&&_0xba0772[_0x2f9bbc(0x160)](createIssue('error',_0x4e9475+_0x2f9bbc(0x19f),_0x2f9bbc(0x1a5),_0x2f9bbc(0x1bb)+_0x2425bf[_0x2f9bbc(0x1f5)]+'\x27',_0x267b4e));if(_0x2425bf[_0x2f9bbc(0x1f5)]){const _0x2916fc=_0x7d746b[_0x2f9bbc(0x18c)](_0x2425bf[_0x2f9bbc(0x1f5)]);_0x2916fc?.[_0x2f9bbc(0x19e)]==='merge'&&_0xba0772[_0x2f9bbc(0x160)](createIssue(_0x2f9bbc(0x196),_0x4e9475+'.next','BRANCH_DIRECTLY_TO_MERGE',_0x2f9bbc(0x164)+_0x2425bf['name']+_0x2f9bbc(0x1e1)+_0x2425bf[_0x2f9bbc(0x1f5)]+_0x2f9bbc(0x200),_0x267b4e));}}return _0xba0772;}function validateJumpStep(_0x5662c3,_0x28ce4f,_0xff115a){const _0x9c8ce3=a130_0x3d22,_0x5404c6=[];if(!_0x5662c3[_0x9c8ce3(0x1cf)]?.[_0x9c8ce3(0x1d1)])return _0x5404c6['push'](createIssue('error',_0x28ce4f+_0x9c8ce3(0x1f0),'INVALID_JUMP_TARGET',_0x9c8ce3(0x203),_0xff115a,_0x28ce4f)),_0x5404c6;return(!_0x5662c3['with'][_0x9c8ce3(0x1d1)]['journey']||!_0x5662c3['with']['target']['stage'])&&_0x5404c6[_0x9c8ce3(0x160)](createIssue(_0x9c8ce3(0x1a6),_0x28ce4f+_0x9c8ce3(0x1f0),_0x9c8ce3(0x1de),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0xff115a)),_0x5404c6;}function buildConvergenceMap(_0x305030){const _0x4bd2a1=a130_0x3d22,_0x46a698=new Map();function _0x1fdd14(_0x1876bc,_0x305b4d){const _0x2e052e=a130_0x3d22,_0x4fe063=_0x46a698['get'](_0x1876bc)||[];_0x4fe063[_0x2e052e(0x160)](_0x305b4d),_0x46a698[_0x2e052e(0x19c)](_0x1876bc,_0x4fe063);}for(const _0x244d3a of _0x305030){_0x244d3a[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x244d3a[_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x1f7)+_0x244d3a['name']+'\x27'});if(_0x244d3a[_0x4bd2a1(0x19e)]===_0x4bd2a1(0x1d0)&&_0x244d3a[_0x4bd2a1(0x1cf)]?.[_0x4bd2a1(0x1a4)])for(const _0x44558d of _0x244d3a['with'][_0x4bd2a1(0x1a4)]){_0x44558d[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x44558d[_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x14c)+_0x44558d[_0x4bd2a1(0x1d4)]+_0x4bd2a1(0x1db)+_0x244d3a[_0x4bd2a1(0x1d4)]+'\x27'});}if(_0x244d3a['type']===_0x4bd2a1(0x1dc)&&_0x244d3a[_0x4bd2a1(0x1cf)]?.[_0x4bd2a1(0x161)])for(const _0x2d3bca of _0x244d3a[_0x4bd2a1(0x1cf)][_0x4bd2a1(0x161)]){_0x2d3bca[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x2d3bca['next'],{'stepName':_0x244d3a['name'],'description':_0x4bd2a1(0x1d3)+_0x2d3bca[_0x4bd2a1(0x1d4)]+'\x27\x20of\x20\x27'+_0x244d3a['name']+'\x27'});}_0x244d3a[_0x4bd2a1(0x19e)]===_0x4bd2a1(0x1e3)&&_0x244d3a['with']?.[_0x4bd2a1(0x19d)]&&(_0x244d3a[_0x4bd2a1(0x1cf)]['condition'][_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x244d3a[_0x4bd2a1(0x1cf)][_0x4bd2a1(0x19d)][_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x1b8)+_0x244d3a[_0x4bd2a1(0x1d4)]+'\x27'}),_0x244d3a[_0x4bd2a1(0x1cf)]['condition'][_0x4bd2a1(0x1da)]?.[_0x4bd2a1(0x1f5)]&&_0x1fdd14(_0x244d3a[_0x4bd2a1(0x1cf)][_0x4bd2a1(0x19d)]['timeout'][_0x4bd2a1(0x1f5)],{'stepName':_0x244d3a[_0x4bd2a1(0x1d4)],'description':_0x4bd2a1(0x15c)+_0x244d3a['name']+'\x27'}));}return _0x46a698;}function validateFlowControl(_0x2c3d5d,_0x1410b7,_0x214b58){const _0x2e07cd=a130_0x3d22,_0x90d948=[],_0x3b9bae='stages['+_0x1410b7+']',_0x2009a1=_0x2c3d5d['steps']||[];if(_0x2009a1[_0x2e07cd(0x180)]===0x0)return _0x90d948;const _0x2e85c8=new Map();for(const _0x5b5b97 of _0x2009a1){_0x5b5b97[_0x2e07cd(0x1d4)]&&_0x2e85c8[_0x2e07cd(0x19c)](_0x5b5b97['name'],_0x5b5b97);}const _0x2226c5=buildConvergenceMap(_0x2009a1),_0x17dab8=_0x2009a1[_0x2e07cd(0x1ea)](_0x4cb20a=>_0x4cb20a[_0x2e07cd(0x19e)]===_0x2e07cd(0x1cd));!_0x17dab8&&_0x90d948[_0x2e07cd(0x160)](createIssue('error',_0x3b9bae+_0x2e07cd(0x1ae),_0x2e07cd(0x1c0),'Stage\x20\x27'+_0x2c3d5d[_0x2e07cd(0x1d4)]+_0x2e07cd(0x184),_0x214b58));for(const [_0x4fdac5,_0x208a02]of _0x2226c5){const _0x55039f=_0x2e85c8[_0x2e07cd(0x18c)](_0x4fdac5);if(!_0x55039f)continue;if(_0x208a02[_0x2e07cd(0x180)]>0x1&&_0x55039f[_0x2e07cd(0x19e)]!==_0x2e07cd(0x18b)){const _0x315efc=_0x208a02[_0x2e07cd(0x18a)](_0x442225=>_0x442225['description'])[_0x2e07cd(0x162)](',\x20');_0x90d948[_0x2e07cd(0x160)](createIssue('error',_0x3b9bae+_0x2e07cd(0x1ae),'CONVERGENCE_WITHOUT_MERGE',_0x2e07cd(0x1e0)+_0x4fdac5+_0x2e07cd(0x1c4)+_0x315efc+_0x2e07cd(0x170),_0x214b58));}_0x208a02[_0x2e07cd(0x180)]===0x1&&_0x55039f['type']===_0x2e07cd(0x18b)&&_0x90d948[_0x2e07cd(0x160)](createIssue('warning',_0x3b9bae+_0x2e07cd(0x1ae),_0x2e07cd(0x17a),_0x2e07cd(0x1d8)+_0x4fdac5+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x208a02[0x0][_0x2e07cd(0x1c8)]+_0x2e07cd(0x175),_0x214b58));}for(const _0x2a86fb of _0x2009a1){if(_0x2a86fb['type']===_0x2e07cd(0x18b)&&_0x2a86fb[_0x2e07cd(0x1f5)]){const _0x2d9fcf=_0x2e85c8[_0x2e07cd(0x18c)](_0x2a86fb[_0x2e07cd(0x1f5)]);_0x2d9fcf?.[_0x2e07cd(0x19e)]==='merge'&&_0x90d948[_0x2e07cd(0x160)](createIssue(_0x2e07cd(0x1a6),_0x3b9bae+_0x2e07cd(0x1ae),'MERGE_TO_MERGE_CHAIN',_0x2e07cd(0x1d8)+_0x2a86fb['name']+_0x2e07cd(0x1fe)+_0x2a86fb[_0x2e07cd(0x1f5)]+_0x2e07cd(0x1ff),_0x214b58));}}return _0x90d948;}function validateCriteria(_0x54a06f,_0x49f02d,_0x3e772b){const _0xcd4352=a130_0x3d22,_0x3be7ed=[];return _0x54a06f[_0xcd4352(0x154)]&&(_0x3e772b[_0xcd4352(0x1d5)]?.[_0xcd4352(0x195)](_0x54a06f[_0xcd4352(0x154)]),!_0x54a06f[_0xcd4352(0x154)][_0xcd4352(0x1bd)](_0xcd4352(0x172))&&(_0x3e772b[_0xcd4352(0x1a0)]&&!_0x3e772b[_0xcd4352(0x1a0)][_0xcd4352(0x153)](_0x54a06f[_0xcd4352(0x154)])&&_0x3be7ed[_0xcd4352(0x160)](createIssue(_0xcd4352(0x1a6),_0x49f02d+_0xcd4352(0x1ee),_0xcd4352(0x177),_0xcd4352(0x183)+_0x54a06f['segment']+'\x27',_0x3e772b)))),_0x3be7ed;}function validateEmbeddedSegment(_0x162e46,_0x470476,_0x2884f6){const _0x9983ea=a130_0x3d22,_0x3a5a3c=[];return _0x162e46[_0x9983ea(0x185)]&&_0x3a5a3c[_0x9983ea(0x160)](...validateRuleDef(_0x162e46[_0x9983ea(0x185)],_0x470476+_0x9983ea(0x17e),_0x2884f6)),_0x3a5a3c;}function validateStage(_0xff176d,_0x1ecc36,_0x1e6a82,_0x29d09b){const _0xa12df9=a130_0x3d22,_0x22a2a8=[],_0x11da50=_0xa12df9(0x1ed)+_0x1ecc36+']',_0x4d8948=new Map(),_0x357dfa=new Map();if(_0xff176d[_0xa12df9(0x14a)]){for(let _0x10df0e=0x0;_0x10df0e<_0xff176d[_0xa12df9(0x14a)][_0xa12df9(0x180)];_0x10df0e++){const _0x54c907=_0xff176d[_0xa12df9(0x14a)][_0x10df0e];_0x54c907[_0xa12df9(0x1d4)]&&_0x4d8948[_0xa12df9(0x19c)](_0x54c907[_0xa12df9(0x1d4)],_0x54c907);}for(let _0x3d8b54=0x0;_0x3d8b54<_0xff176d[_0xa12df9(0x14a)][_0xa12df9(0x180)];_0x3d8b54++){const _0xf9941e=_0xff176d['steps'][_0x3d8b54],_0x2294f4=_0x11da50+'.steps['+_0x3d8b54+']';if(_0xf9941e[_0xa12df9(0x1d4)]){if(_0x357dfa[_0xa12df9(0x153)](_0xf9941e['name'])){const _0x406e6c=_0x357dfa['get'](_0xf9941e[_0xa12df9(0x1d4)]);_0x22a2a8[_0xa12df9(0x160)](createIssue(_0xa12df9(0x1a6),_0x2294f4+'.name',_0xa12df9(0x1be),'Duplicate\x20step\x20name\x20\x27'+_0xf9941e['name']+_0xa12df9(0x17c)+_0x406e6c+'])',_0x29d09b));}else _0x357dfa[_0xa12df9(0x19c)](_0xf9941e[_0xa12df9(0x1d4)],_0x3d8b54);}_0x22a2a8[_0xa12df9(0x160)](...validateStep(_0xf9941e,_0x2294f4,_0x29d09b,_0x4d8948));}}_0xff176d[_0xa12df9(0x1e4)]&&_0x22a2a8['push'](...validateCriteria(_0xff176d[_0xa12df9(0x1e4)],_0x11da50+_0xa12df9(0x1cb),_0x29d09b));if(_0xff176d[_0xa12df9(0x1a1)])for(let _0x42ef43=0x0;_0x42ef43<_0xff176d[_0xa12df9(0x1a1)][_0xa12df9(0x180)];_0x42ef43++){_0x22a2a8['push'](...validateCriteria(_0xff176d['exit_criteria'][_0x42ef43],_0x11da50+_0xa12df9(0x16d)+_0x42ef43+']',_0x29d09b));}return _0xff176d[_0xa12df9(0x16e)]&&_0x22a2a8[_0xa12df9(0x160)](...validateCriteria(_0xff176d['milestone'],_0x11da50+'.milestone',_0x29d09b)),_0x22a2a8[_0xa12df9(0x160)](...validateStageStructure(_0xff176d,_0x1ecc36,_0x1e6a82,_0x29d09b)),_0x22a2a8[_0xa12df9(0x160)](...validateFlowControl(_0xff176d,_0x1ecc36,_0x29d09b)),_0x22a2a8;}function validateStagesForVersion(_0x2a34fa,_0x5d6bc0,_0x5e478f,_0x17ebfe,_0x225980,_0x343eec,_0x294171){const _0x5f4459=a130_0x3d22;if(_0x2a34fa['length']===0x0){_0x225980[_0x5f4459(0x160)]({'level':_0x5f4459(0x1a6),'path':_0x17ebfe+_0x5f4459(0x1c7),'code':'MISSING_STAGES','message':_0x5f4459(0x1ac),'location':getLocationFromPath(_0x5e478f[_0x5f4459(0x1c5)],_0x5e478f[_0x5f4459(0x1d6)],['stages'])});return;}const _0x4c2234=new Set();for(const _0x54cae2 of _0x2a34fa){if(_0x54cae2[_0x5f4459(0x14a)])for(const _0x437256 of _0x54cae2[_0x5f4459(0x14a)]){_0x437256[_0x5f4459(0x1d4)]&&_0x4c2234[_0x5f4459(0x195)](_0x437256[_0x5f4459(0x1d4)]);}}const _0x5cc24d={..._0x5e478f,'stepNames':_0x4c2234},_0x48f9ce=validateVersionStructure(_0x2a34fa,_0x5cc24d);for(const _0x3e36c7 of _0x48f9ce){const _0x4ac2ac=_0x17ebfe?{..._0x3e36c7,'path':''+_0x17ebfe+_0x3e36c7[_0x5f4459(0x1a8)]}:_0x3e36c7;if(_0x4ac2ac['level']===_0x5f4459(0x1a6))_0x225980[_0x5f4459(0x160)](_0x4ac2ac);else _0x343eec['push'](_0x4ac2ac);}for(let _0x2c0d3f=0x0;_0x2c0d3f<_0x2a34fa[_0x5f4459(0x180)];_0x2c0d3f++){const _0x3ef6a9=validateStage(_0x2a34fa[_0x2c0d3f],_0x2c0d3f,_0x2a34fa[_0x5f4459(0x180)],_0x5cc24d);for(const _0x3bf955 of _0x3ef6a9){const _0x340fbb=_0x17ebfe?{..._0x3bf955,'path':''+_0x17ebfe+_0x3bf955[_0x5f4459(0x1a8)]}:_0x3bf955;if(_0x340fbb[_0x5f4459(0x1ce)]===_0x5f4459(0x1a6))_0x225980[_0x5f4459(0x160)](_0x340fbb);else _0x343eec['push'](_0x340fbb);}}if(_0x5d6bc0['goal']){const _0x3f7b50=_0x294171?.[_0x5f4459(0x1f1)]?_0x5f4459(0x204):_0x17ebfe+_0x5f4459(0x204),_0x39193a=validateCriteria(_0x5d6bc0['goal'],_0x3f7b50,_0x5cc24d);for(const _0x3d7ec0 of _0x39193a){if(_0x3d7ec0[_0x5f4459(0x1ce)]==='error')_0x225980[_0x5f4459(0x160)](_0x3d7ec0);else _0x343eec['push'](_0x3d7ec0);}}}function extractVersionIndex(_0x5bf352){const _0x4584fb=a130_0x3d22,_0x4cc000=_0x5bf352[_0x4584fb(0x1f2)](/^journeys\[(\d+)\]\./);return _0x4cc000?_0x4cc000[0x1]:undefined;}function deduplicateAcrossVersions(_0x2770a1){const _0x1c710a=a130_0x3d22,_0x71d51f=new Map();for(let _0x51c938=0x0;_0x51c938<_0x2770a1['length'];_0x51c938++){const _0x173978=_0x2770a1[_0x51c938][_0x1c710a(0x1f6)]+':'+_0x2770a1[_0x51c938]['message'],_0x447fa6=extractVersionIndex(_0x2770a1[_0x51c938][_0x1c710a(0x1a8)]),_0x2736b6=_0x71d51f['get'](_0x173978);if(_0x2736b6){_0x2736b6[_0x1c710a(0x205)][_0x1c710a(0x160)](_0x51c938);if(_0x447fa6)_0x2736b6[_0x1c710a(0x1b5)][_0x1c710a(0x195)](_0x447fa6);}else _0x71d51f['set'](_0x173978,{'indices':[_0x51c938],'versions':new Set(_0x447fa6?[_0x447fa6]:[])});}const _0x49b60b=new Set();for(const {indices:_0x537fce,versions:_0x282ea8}of _0x71d51f[_0x1c710a(0x168)]()){if(_0x282ea8[_0x1c710a(0x159)]<=0x1)continue;const _0x2a1bc4=_0x2770a1[_0x537fce[0x0]];_0x2a1bc4[_0x1c710a(0x1a8)]=_0x2a1bc4[_0x1c710a(0x1a8)]['replace'](/^journeys\[\d+\]\./,''),_0x2a1bc4[_0x1c710a(0x15d)]=_0x2a1bc4['message']+_0x1c710a(0x198)+_0x282ea8[_0x1c710a(0x159)]+_0x1c710a(0x14f);for(let _0x48a213=0x1;_0x48a213<_0x537fce[_0x1c710a(0x180)];_0x48a213++){_0x49b60b[_0x1c710a(0x195)](_0x537fce[_0x48a213]);}}const _0x24a735=[..._0x49b60b][_0x1c710a(0x202)]((_0x1b5bcf,_0x5ee7a7)=>_0x5ee7a7-_0x1b5bcf);for(const _0x11fc55 of _0x24a735){_0x2770a1[_0x1c710a(0x179)](_0x11fc55,0x1);}}export function validateJourneyDef(_0x4882c4,_0x2e971d={},_0x1fc27f={}){const _0x23f903=a130_0x3d22;if(_0x1fc27f[_0x23f903(0x1aa)])return runJourneySemanticChecks(_0x4882c4,_0x2e971d);const _0x2dd912=JourneyDefSchema[_0x23f903(0x1fc)](_0x4882c4);if(_0x2dd912[_0x23f903(0x158)])return runJourneySemanticChecks(_0x2dd912[_0x23f903(0x14d)],_0x2e971d);return zodErrorsToJourneyValidationResult(_0x2dd912[_0x23f903(0x1a6)],_0x2e971d);}function a130_0x3d22(_0x575ec9,_0x2f9ee0){_0x575ec9=_0x575ec9-0x149;const _0x317b45=a130_0x317b();let _0x3d2247=_0x317b45[_0x575ec9];return _0x3d2247;}function zodErrorsToJourneyValidationResult(_0x5920b4,_0x5ac6fb){const _0xcf8057=a130_0x3d22,_0x366201=flattenZodIssues(_0x5920b4[_0xcf8057(0x14e)]),_0x227941=_0x366201[_0xcf8057(0x18a)](_0x428115=>{const _0x5bb9dc=_0xcf8057,_0x179abf=formatZodPath(_0x428115[_0x5bb9dc(0x1a8)]),_0x21bf70=mapJourneyZodIssueToCode(_0x428115,_0x179abf),_0x612838=getLocationFromPath(_0x5ac6fb[_0x5bb9dc(0x1c5)],_0x5ac6fb[_0x5bb9dc(0x1d6)],_0x428115[_0x5bb9dc(0x1a8)][_0x5bb9dc(0x18a)](_0x1c7447=>typeof _0x1c7447===_0x5bb9dc(0x1e9)?String(_0x1c7447):_0x1c7447));return{'level':_0x5bb9dc(0x1a6),'path':_0x179abf,'code':_0x21bf70,'message':_0x428115[_0x5bb9dc(0x15d)],..._0x612838&&{'location':_0x612838}};});return{'valid':![],'errors':_0x227941,'warnings':[]};}function mapJourneyZodIssueToCode(_0x51a03c,_0x56380c){const _0x4a58b8=a130_0x3d22;if(_0x56380c===_0x4a58b8(0x1d4))return _0x4a58b8(0x166);if(_0x56380c[_0x4a58b8(0x152)]('.type')&&_0x56380c[_0x4a58b8(0x165)](_0x4a58b8(0x14a)))return _0x4a58b8(0x1d9);if(_0x56380c===_0x4a58b8(0x1c7)||_0x56380c['endsWith'](_0x4a58b8(0x190)))return _0x4a58b8(0x1b6);if(_0x56380c===''&&_0x51a03c['message'][_0x4a58b8(0x165)](_0x4a58b8(0x169)))return'MISSING_STAGES';if(_0x56380c['includes'](_0x4a58b8(0x15b)))return _0x4a58b8(0x157);return _0x4a58b8(0x1d9);}function runJourneySemanticChecks(_0x1c0b0a,_0x4a3da2){const _0x32cded=a130_0x3d22,_0x50eb9a=[],_0x20f612=[];(!_0x1c0b0a[_0x32cded(0x1d4)]||_0x1c0b0a[_0x32cded(0x1d4)][_0x32cded(0x191)]()==='')&&_0x50eb9a['push']({'level':'error','path':'name','code':_0x32cded(0x166),'message':_0x32cded(0x199),'location':getLocationFromPath(_0x4a3da2['document'],_0x4a3da2[_0x32cded(0x1d6)],[_0x32cded(0x1d4)])});const _0x58655c=new Set();if(_0x1c0b0a[_0x32cded(0x176)])for(const _0x22d8a1 of Object[_0x32cded(0x1eb)](_0x1c0b0a[_0x32cded(0x176)])){_0x58655c['add'](_0x22d8a1);}const _0x1e497d=new Set();if(_0x1c0b0a[_0x32cded(0x1e7)])for(const _0x46f503 of Object[_0x32cded(0x1eb)](_0x1c0b0a[_0x32cded(0x1e7)])){_0x1e497d[_0x32cded(0x195)](_0x46f503);}const _0x4001c2=new Set(),_0x6a5610={..._0x4a3da2,'embeddedSegments':_0x58655c,'referencedSegments':_0x4001c2,'activationKeys':_0x1e497d['size']>0x0?_0x1e497d:undefined};if(_0x1c0b0a['segments'])for(const [_0x57b481,_0x1001af]of Object[_0x32cded(0x1b9)](_0x1c0b0a[_0x32cded(0x176)])){const _0x5317c0=validateEmbeddedSegment(_0x1001af,'segments.'+_0x57b481,_0x6a5610);for(const _0x3eb68d of _0x5317c0){if(_0x3eb68d[_0x32cded(0x1ce)]==='error')_0x50eb9a['push'](_0x3eb68d);else _0x20f612['push'](_0x3eb68d);}}const _0x1af898=!!_0x1c0b0a[_0x32cded(0x204)],_0x444539=_0x1c0b0a['journeys']?.[_0x32cded(0x1c9)](_0x556a4b=>!!_0x556a4b['goal'])??![];!_0x1af898&&!_0x444539&&_0x20f612['push']({'level':_0x32cded(0x196),'path':'goal','code':_0x32cded(0x167),'message':_0x32cded(0x1c2),'location':getLocationFromPath(_0x4a3da2[_0x32cded(0x1c5)],_0x4a3da2[_0x32cded(0x1d6)],['goal'])});const _0x2b0b59=_0x1c0b0a[_0x32cded(0x17b)]??_0x1c0b0a['versions'];if(_0x2b0b59&&_0x2b0b59['filter'](_0x2f1e7f=>_0x2f1e7f[_0x32cded(0x18d)]===!![])['length']>0x1){const _0xa542c8=_0x1c0b0a[_0x32cded(0x17b)]?'journeys':'versions';_0x50eb9a[_0x32cded(0x160)]({'level':'error','path':_0xa542c8,'code':_0x32cded(0x155),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0xa542c8===_0x32cded(0x17b)?_0x32cded(0x19b):_0x32cded(0x1b0))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x4a3da2[_0x32cded(0x1c5)],_0x4a3da2[_0x32cded(0x1d6)],[_0xa542c8])});}if(_0x1c0b0a[_0x32cded(0x17b)]&&_0x1c0b0a[_0x32cded(0x17b)]['length']>0x0)for(let _0x1d4a63=0x0;_0x1d4a63<_0x1c0b0a[_0x32cded(0x17b)]['length'];_0x1d4a63++){const _0x2acf45=_0x1c0b0a[_0x32cded(0x17b)][_0x1d4a63];if(_0x1c0b0a[_0x32cded(0x17b)]['length']>0x1&&_0x2acf45[_0x32cded(0x189)]===_0x32cded(0x1fa))continue;const _0x4dcd79=_0x2acf45[_0x32cded(0x1c7)]||[],_0x3ab60c=_0x32cded(0x1f3)+_0x1d4a63+'].',_0xc80ded=!!_0x2acf45['goal'],_0x5cfcea=_0xc80ded?{..._0x1c0b0a,'goal':_0x2acf45[_0x32cded(0x204)]}:_0x1c0b0a;validateStagesForVersion(_0x4dcd79,_0x5cfcea,_0x6a5610,_0x3ab60c,_0x50eb9a,_0x20f612,{'goalIsInherited':!_0xc80ded});}else{if(_0x1c0b0a['versions']&&_0x1c0b0a[_0x32cded(0x1b5)]['length']>0x0)for(let _0x4ec399=0x0;_0x4ec399<_0x1c0b0a[_0x32cded(0x1b5)][_0x32cded(0x180)];_0x4ec399++){const _0x49d8f8=_0x1c0b0a[_0x32cded(0x1b5)][_0x4ec399];if(_0x1c0b0a[_0x32cded(0x1b5)][_0x32cded(0x180)]>0x1&&_0x49d8f8[_0x32cded(0x189)]===_0x32cded(0x1fa))continue;const _0x2d54c6=_0x49d8f8[_0x32cded(0x1c7)]||[],_0x573f97=_0x32cded(0x18f)+_0x4ec399+'].';validateStagesForVersion(_0x2d54c6,_0x1c0b0a,_0x6a5610,_0x573f97,_0x50eb9a,_0x20f612);}else{const _0x38ce74=_0x1c0b0a['stages']||[];validateStagesForVersion(_0x38ce74,_0x1c0b0a,_0x6a5610,'',_0x50eb9a,_0x20f612);}}_0x1c0b0a[_0x32cded(0x17b)]&&_0x1c0b0a[_0x32cded(0x17b)]['length']>0x1&&(deduplicateAcrossVersions(_0x50eb9a),deduplicateAcrossVersions(_0x20f612));for(const _0xa9ca59 of _0x58655c){!_0x4001c2[_0x32cded(0x153)](_0xa9ca59)&&!_0xa9ca59[_0x32cded(0x1bd)](_0x32cded(0x1df))&&_0x20f612[_0x32cded(0x160)]({'level':_0x32cded(0x196),'path':_0x32cded(0x149)+_0xa9ca59,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x32cded(0x1c1)+_0xa9ca59+_0x32cded(0x1dd),'location':getLocationFromPath(_0x4a3da2[_0x32cded(0x1c5)],_0x4a3da2['source'],[_0x32cded(0x176),_0xa9ca59])});}return{'valid':_0x50eb9a[_0x32cded(0x180)]===0x0,'errors':_0x50eb9a,'warnings':_0x20f612};}
1
+ (function(_0x1d0930,_0x141671){const _0x2670ad=a134_0x4bcd,_0x17f590=_0x1d0930();while(!![]){try{const _0x320a10=parseInt(_0x2670ad(0x179))/0x1*(-parseInt(_0x2670ad(0x104))/0x2)+parseInt(_0x2670ad(0x15f))/0x3*(-parseInt(_0x2670ad(0x167))/0x4)+-parseInt(_0x2670ad(0x197))/0x5+parseInt(_0x2670ad(0x112))/0x6+-parseInt(_0x2670ad(0x141))/0x7*(-parseInt(_0x2670ad(0x13e))/0x8)+parseInt(_0x2670ad(0xe7))/0x9*(parseInt(_0x2670ad(0x154))/0xa)+parseInt(_0x2670ad(0x16b))/0xb;if(_0x320a10===_0x141671)break;else _0x17f590['push'](_0x17f590['shift']());}catch(_0x547258){_0x17f590['push'](_0x17f590['shift']());}}}(a134_0x1374,0x8e054));import{JourneyDefSchema}from'./types/journey-schema.js';function a134_0x1374(){const _0x492dc0=['variants','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','condition','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','.type','Activation\x20step\x20requires\x20an\x20activation\x20reference','.milestone','.with.condition.timeout.next','Journey\x20has\x20','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','.with.variants','wait','.with.condition.next','BRANCH_DIRECTLY_TO_MERGE','INSUFFICIENT_STEPS','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','73140ZKGuvl','excluded_','replace','9krxPtk','Journey\x20can\x20have\x20at\x20most\x20one\x20','goal','trim','journey\x20entry','reduce','document','.rule','branches','warning','.name','percentage','Decision\x20branch\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','Journey\x20has\x20no\x20goal\x20defined','sort','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','Duplicate\x20step\x20name\x20\x27','UNUSED_EMBEDDED_SEGMENT','journeys,\x20stages,\x20or\x20versions','ACTIVATION_SCHEMA_ERROR','versions[','MISSING_EXIT_CRITERIA','journey','\x20with\x20latest:\x20true','endsWith','TOO_MANY_STAGES','latest','stages[','2jJTNuB','.with.activation','versions','Stage\x20\x27','INVALID_AB_TEST_PERCENTAGES','MISSING_END_STEP','.segment','length','end',').\x20Merge\x20is\x20unnecessary.','every','source','entry_criteria','filter','1379082qEXQmu','size','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','\x27\x20(from:\x20','safeParse','level','.with','milestone','\x27\x20has\x20no\x20exit_criteria\x20defined','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','MISSING_WAIT_PARAMS','DUPLICATE_LATEST','.next','version','MISSING_STAGES','map','stage','Embedded\x20segment\x20\x27','match','timeout','some','decision_point','\x27\x20has\x20no\x20steps','activations','INVALID_JUMP_TARGET','abs','Criteria\x20references\x20undefined\x20segment\x20\x27','activation','INVALID_NEXT_REFERENCE','stages','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','exit_criteria','get','.with.variants[','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','description','stepNames','startsWith','.stages','segments','.with.condition.timeout','error','activationKeys','segment','8XazmkW','MISSING_SEGMENT_REFERENCE','state','2297155axkhNl','.steps[','step\x20\x27','set','indices','issues','message','JOURNEY_SCHEMA_ERROR','steps','launched','success','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','skipSchema','MISSING_CONDITIONS','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','.entry_criteria','.with.branches[','next','\x27\x20of\x20\x27','9227870csplUY','\x27\x20with\x20no\x20action\x20in\x20between','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','SINGLE_INPUT_MERGE','with','End\x20step\x20\x27','\x20stages\x20but\x20maximum\x20is\x20','.steps','push','journeys','variant\x20\x27','1065ZheYdF','Merge\x20step\x20\x27','.with.branches','MISSING_ACTIVATION_REF','jump','condition\x20of\x20\x27','code','embeddedSegments','10852rwbPQz','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','timeout\x20of\x20\x27','MISSING_ENTRY_CRITERIA','2600378NuKNGd','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','merge','referencedSegments','includes','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','add','MISSING_NAME','ref:','path','END_STEP_HAS_NEXT_OR_WITH','excluded','FEW_STEPS','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','157738ovjwZj','name','CONVERGENCE_WITHOUT_MERGE','branch\x20\x27','target','ab_test','.with.condition.segment','rule','type','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','has','entries','splice','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.'];a134_0x1374=function(){return _0x492dc0;};return a134_0x1374();}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x2e982f,_0x8e913a,_0x2dc512,_0x3a7099,_0x2ea6cf,_0x4e43ac){const _0x13404e=a134_0x4bcd;return{'level':_0x2e982f,'path':_0x8e913a,'code':_0x2dc512,'message':_0x3a7099,'location':getLocationFromPath(_0x2ea6cf[_0x13404e(0xed)],_0x2ea6cf[_0x13404e(0x10f)],pathToArray(_0x4e43ac??_0x8e913a))};}function validateVersionStructure(_0x2573ff,_0x56eb3f){const _0x47a47e=a134_0x4bcd,_0x2e7f9d=[];return _0x2573ff[_0x47a47e(0x10b)]>MAX_STAGES&&_0x2e7f9d['push'](createIssue(_0x47a47e(0x13b),_0x47a47e(0x12f),_0x47a47e(0x101),_0x47a47e(0x18f)+_0x2573ff[_0x47a47e(0x10b)]+_0x47a47e(0x15a)+MAX_STAGES,_0x56eb3f)),_0x2e7f9d;}function validateStageStructure(_0x49ba19,_0x2b2ff6,_0x436ab5,_0x52b4ae){const _0x216cc5=a134_0x4bcd,_0x35693c=[],_0x118536='stages['+_0x2b2ff6+']';_0x2b2ff6===0x0&&!_0x49ba19[_0x216cc5(0x110)]&&_0x35693c[_0x216cc5(0x15c)](createIssue(_0x216cc5(0x13b),_0x118536+_0x216cc5(0x150),_0x216cc5(0x16a),_0x216cc5(0x107)+_0x49ba19['name']+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x52b4ae,_0x118536));const _0x3d149b=_0x2b2ff6===_0x436ab5-0x1;!_0x3d149b&&!_0x49ba19[_0x216cc5(0x119)]&&_0x35693c['push'](createIssue(_0x216cc5(0x13b),_0x118536+_0x216cc5(0x18d),'MISSING_MILESTONE',_0x216cc5(0x107)+_0x49ba19[_0x216cc5(0x17a)]+_0x216cc5(0x188),_0x52b4ae,_0x118536));(!_0x49ba19['exit_criteria']||_0x49ba19[_0x216cc5(0x131)][_0x216cc5(0x10b)]===0x0)&&_0x35693c['push'](createIssue(_0x216cc5(0xf0),_0x118536+'.exit_criteria',_0x216cc5(0xfd),'Stage\x20\x27'+_0x49ba19[_0x216cc5(0x17a)]+_0x216cc5(0x11a),_0x52b4ae,_0x118536));const _0x37fbbd=_0x49ba19['steps']?.[_0x216cc5(0x10b)]??0x0;if(_0x37fbbd===0x0)_0x35693c['push'](createIssue(_0x216cc5(0x13b),_0x118536+_0x216cc5(0x15b),_0x216cc5(0x195),_0x216cc5(0x107)+_0x49ba19['name']+_0x216cc5(0x128),_0x52b4ae,_0x118536+'.steps'));else{if(_0x37fbbd===0x1)_0x35693c[_0x216cc5(0x15c)](createIssue('warning',_0x118536+'.steps',_0x216cc5(0x195),_0x216cc5(0x107)+_0x49ba19[_0x216cc5(0x17a)]+_0x216cc5(0x196),_0x52b4ae,_0x118536+_0x216cc5(0x15b)));else _0x37fbbd<=0x3&&_0x35693c[_0x216cc5(0x15c)](createIssue('warning',_0x118536+_0x216cc5(0x15b),_0x216cc5(0x177),_0x216cc5(0x107)+_0x49ba19[_0x216cc5(0x17a)]+'\x27\x20has\x20only\x20'+_0x37fbbd+'\x20steps\x20(may\x20be\x20too\x20simple)',_0x52b4ae,_0x118536+'.steps'));}return _0x35693c;}function validateStep(_0x1ce4c7,_0x17ac3b,_0x50eb60,_0x24f38f){const _0x1a2f1b=a134_0x4bcd,_0x2340ed=[];if(_0x1ce4c7[_0x1a2f1b(0x181)]===_0x1a2f1b(0x10c))return _0x1ce4c7[_0x1a2f1b(0x152)]&&_0x2340ed[_0x1a2f1b(0x15c)](createIssue(_0x1a2f1b(0x13b),_0x17ac3b+_0x1a2f1b(0x11e),_0x1a2f1b(0x175),_0x1a2f1b(0x159)+_0x1ce4c7[_0x1a2f1b(0x17a)]+'\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field',_0x50eb60)),_0x1a2f1b(0x158)in _0x1ce4c7&&_0x1ce4c7[_0x1a2f1b(0x158)]!==undefined&&_0x2340ed[_0x1a2f1b(0x15c)](createIssue('error',_0x17ac3b+_0x1a2f1b(0x118),_0x1a2f1b(0x175),'End\x20step\x20\x27'+_0x1ce4c7[_0x1a2f1b(0x17a)]+_0x1a2f1b(0x14f),_0x50eb60)),_0x2340ed;_0x1ce4c7[_0x1a2f1b(0x152)]&&(_0x50eb60[_0x1a2f1b(0x136)]&&!_0x50eb60[_0x1a2f1b(0x136)][_0x1a2f1b(0x183)](_0x1ce4c7[_0x1a2f1b(0x152)])&&_0x2340ed['push'](createIssue(_0x1a2f1b(0x13b),_0x17ac3b+_0x1a2f1b(0x11e),_0x1a2f1b(0x12e),'Step\x20references\x20non-existent\x20step\x20\x27'+_0x1ce4c7[_0x1a2f1b(0x152)]+'\x27',_0x50eb60)));switch(_0x1ce4c7[_0x1a2f1b(0x181)]){case _0x1a2f1b(0x192):_0x2340ed['push'](...validateWaitStep(_0x1ce4c7,_0x17ac3b,_0x50eb60,_0x24f38f));break;case _0x1a2f1b(0x12d):_0x2340ed[_0x1a2f1b(0x15c)](...validateActivationStep(_0x1ce4c7,_0x17ac3b,_0x50eb60));break;case _0x1a2f1b(0x127):_0x2340ed['push'](...validateDecisionPointStep(_0x1ce4c7,_0x17ac3b,_0x50eb60,_0x24f38f));break;case _0x1a2f1b(0x17e):_0x2340ed[_0x1a2f1b(0x15c)](...validateAbTestStep(_0x1ce4c7,_0x17ac3b,_0x50eb60,_0x24f38f));break;case _0x1a2f1b(0x163):_0x2340ed['push'](...validateJumpStep(_0x1ce4c7,_0x17ac3b,_0x50eb60));break;}return _0x2340ed;}function validateWaitStep(_0x467226,_0x4b404c,_0x4c044c,_0x17427a){const _0x147231=a134_0x4bcd,_0x4bace5=[];if(!_0x467226['with'])return _0x4bace5['push'](createIssue('error',_0x4b404c+_0x147231(0x118),_0x147231(0x11c),'Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field',_0x4c044c,_0x4b404c)),_0x4bace5;if(_0x467226[_0x147231(0x158)][_0x147231(0x189)]){const _0x369f03=_0x467226[_0x147231(0x158)][_0x147231(0x189)];if(_0x369f03[_0x147231(0x13d)]){_0x4c044c['referencedSegments']?.[_0x147231(0x171)](_0x369f03[_0x147231(0x13d)]);!_0x369f03[_0x147231(0x13d)]['startsWith'](_0x147231(0x173))&&(_0x4c044c[_0x147231(0x166)]&&!_0x4c044c['embeddedSegments']['has'](_0x369f03[_0x147231(0x13d)])&&_0x4bace5[_0x147231(0x15c)](createIssue('error',_0x4b404c+_0x147231(0x17f),_0x147231(0x13f),'Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'+_0x369f03[_0x147231(0x13d)]+_0x147231(0x168),_0x4c044c)));_0x369f03['next']&&_0x4c044c[_0x147231(0x136)]&&!_0x4c044c[_0x147231(0x136)][_0x147231(0x183)](_0x369f03[_0x147231(0x152)])&&_0x4bace5[_0x147231(0x15c)](createIssue(_0x147231(0x13b),_0x4b404c+'.with.condition.next',_0x147231(0x12e),_0x147231(0x178)+_0x369f03['next']+'\x27',_0x4c044c));_0x369f03[_0x147231(0x125)]?.['next']&&_0x4c044c[_0x147231(0x136)]&&!_0x4c044c[_0x147231(0x136)][_0x147231(0x183)](_0x369f03[_0x147231(0x125)][_0x147231(0x152)])&&_0x4bace5[_0x147231(0x15c)](createIssue(_0x147231(0x13b),_0x4b404c+_0x147231(0x18e),'INVALID_NEXT_REFERENCE',_0x147231(0xf4)+_0x369f03[_0x147231(0x125)][_0x147231(0x152)]+'\x27',_0x4c044c));const _0x3036cc=_0x369f03[_0x147231(0x152)]||_0x467226[_0x147231(0x152)],_0x19ce53=_0x369f03[_0x147231(0x125)]?.[_0x147231(0x152)]||_0x467226[_0x147231(0x152)];if(_0x3036cc){const _0x8c7bba=_0x17427a[_0x147231(0x132)](_0x3036cc);_0x8c7bba?.['type']===_0x147231(0x16d)&&_0x4bace5[_0x147231(0x15c)](createIssue(_0x147231(0xf0),_0x4b404c+_0x147231(0x193),_0x147231(0x194),'Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x3036cc+_0x147231(0x186),_0x4c044c,_0x4b404c+'.with.condition'));}if(_0x19ce53){const _0xea419=_0x17427a[_0x147231(0x132)](_0x19ce53);_0xea419?.['type']===_0x147231(0x16d)&&_0x4bace5['push'](createIssue(_0x147231(0xf0),_0x4b404c+_0x147231(0x18e),_0x147231(0x194),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x19ce53+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x4c044c,_0x4b404c+_0x147231(0x13a)));}}}return _0x4bace5;}function validateActivationStep(_0x143187,_0x49ea75,_0x1eaac8){const _0x50624d=a134_0x4bcd,_0x208ec7=[];if(!_0x143187[_0x50624d(0x158)]?.['activation'])return _0x208ec7[_0x50624d(0x15c)](createIssue('error',_0x49ea75+_0x50624d(0x105),_0x50624d(0x162),_0x50624d(0x18c),_0x1eaac8,_0x49ea75)),_0x208ec7;const _0xd6e36a=_0x143187[_0x50624d(0x158)][_0x50624d(0x12d)];return _0x1eaac8[_0x50624d(0x13c)]&&!_0xd6e36a[_0x50624d(0x137)]('ref:')&&(!_0x1eaac8['activationKeys'][_0x50624d(0x183)](_0xd6e36a)&&_0x208ec7[_0x50624d(0x15c)](createIssue(_0x50624d(0x13b),_0x49ea75+_0x50624d(0x105),'MISSING_ACTIVATION_DEFINITION','Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0xd6e36a+_0x50624d(0x190),_0x1eaac8))),_0x208ec7;}function validateDecisionPointStep(_0x3d0ec8,_0x2f48f9,_0x12fbdf,_0x3eef41){const _0x3aa9a0=a134_0x4bcd,_0x35c00e=[];if(!_0x3d0ec8[_0x3aa9a0(0x158)]?.[_0x3aa9a0(0xef)]||_0x3d0ec8['with'][_0x3aa9a0(0xef)][_0x3aa9a0(0x10b)]===0x0)return _0x35c00e['push'](createIssue(_0x3aa9a0(0x13b),_0x2f48f9+_0x3aa9a0(0x161),_0x3aa9a0(0x14e),_0x3aa9a0(0xf7),_0x12fbdf,_0x2f48f9)),_0x35c00e;for(let _0x3bd4e7=0x0;_0x3bd4e7<_0x3d0ec8[_0x3aa9a0(0x158)][_0x3aa9a0(0xef)][_0x3aa9a0(0x10b)];_0x3bd4e7++){const _0x601970=_0x3d0ec8[_0x3aa9a0(0x158)][_0x3aa9a0(0xef)][_0x3bd4e7],_0x4df83c=_0x2f48f9+_0x3aa9a0(0x151)+_0x3bd4e7+']';_0x601970[_0x3aa9a0(0x13d)]&&!_0x601970[_0x3aa9a0(0x176)]&&(_0x12fbdf[_0x3aa9a0(0x16e)]?.[_0x3aa9a0(0x171)](_0x601970['segment']),!_0x601970['segment']['startsWith']('ref:')&&(_0x12fbdf[_0x3aa9a0(0x166)]&&!_0x12fbdf[_0x3aa9a0(0x166)][_0x3aa9a0(0x183)](_0x601970[_0x3aa9a0(0x13d)])&&_0x35c00e['push'](createIssue(_0x3aa9a0(0x13b),_0x4df83c+_0x3aa9a0(0x10a),'MISSING_SEGMENT_REFERENCE','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x601970[_0x3aa9a0(0x13d)]+'\x27',_0x12fbdf))));_0x601970[_0x3aa9a0(0x152)]&&_0x12fbdf['stepNames']&&!_0x12fbdf['stepNames']['has'](_0x601970['next'])&&_0x35c00e[_0x3aa9a0(0x15c)](createIssue(_0x3aa9a0(0x13b),_0x4df83c+'.next',_0x3aa9a0(0x12e),_0x3aa9a0(0x16c)+_0x601970[_0x3aa9a0(0x152)]+'\x27',_0x12fbdf));if(_0x601970[_0x3aa9a0(0x152)]){const _0x9a205=_0x3eef41['get'](_0x601970[_0x3aa9a0(0x152)]);_0x9a205?.['type']===_0x3aa9a0(0x16d)&&_0x35c00e[_0x3aa9a0(0x15c)](createIssue('warning',_0x4df83c+'.next',_0x3aa9a0(0x194),_0x3aa9a0(0xf3)+_0x601970[_0x3aa9a0(0x17a)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x601970['next']+_0x3aa9a0(0x155),_0x12fbdf));}}return _0x35c00e;}function validateAbTestStep(_0x4c33e7,_0x1dfac3,_0x483cf,_0x1966c4){const _0xc36016=a134_0x4bcd,_0x4c6a26=[];if(!_0x4c33e7[_0xc36016(0x158)]?.[_0xc36016(0x187)]||_0x4c33e7['with'][_0xc36016(0x187)][_0xc36016(0x10b)]===0x0)return _0x4c6a26[_0xc36016(0x15c)](createIssue('error',_0x1dfac3+_0xc36016(0x191),_0xc36016(0x14e),_0xc36016(0x170),_0x483cf,_0x1dfac3)),_0x4c6a26;const _0x253b8b=_0x4c33e7[_0xc36016(0x158)][_0xc36016(0x187)][_0xc36016(0xec)]((_0x2e1a24,_0x43a31c)=>_0x2e1a24+(_0x43a31c[_0xc36016(0xf2)]||0x0),0x0);Math[_0xc36016(0x12b)](_0x253b8b-0x64)>0.01&&_0x4c6a26['push'](createIssue(_0xc36016(0x13b),_0x1dfac3+_0xc36016(0x191),_0xc36016(0x108),_0xc36016(0x18a)+_0x253b8b+'%)',_0x483cf));for(let _0x3042e9=0x0;_0x3042e9<_0x4c33e7[_0xc36016(0x158)][_0xc36016(0x187)]['length'];_0x3042e9++){const _0x5eacfe=_0x4c33e7[_0xc36016(0x158)][_0xc36016(0x187)][_0x3042e9],_0x5028ac=_0x1dfac3+_0xc36016(0x133)+_0x3042e9+']';_0x5eacfe[_0xc36016(0x152)]&&_0x483cf['stepNames']&&!_0x483cf[_0xc36016(0x136)][_0xc36016(0x183)](_0x5eacfe[_0xc36016(0x152)])&&_0x4c6a26[_0xc36016(0x15c)](createIssue(_0xc36016(0x13b),_0x5028ac+_0xc36016(0x11e),_0xc36016(0x12e),'A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x5eacfe[_0xc36016(0x152)]+'\x27',_0x483cf));if(_0x5eacfe[_0xc36016(0x152)]){const _0xc63e83=_0x1966c4[_0xc36016(0x132)](_0x5eacfe['next']);_0xc63e83?.[_0xc36016(0x181)]===_0xc36016(0x16d)&&_0x4c6a26[_0xc36016(0x15c)](createIssue(_0xc36016(0xf0),_0x5028ac+_0xc36016(0x11e),_0xc36016(0x194),'A/B\x20test\x20variant\x20\x27'+_0x5eacfe[_0xc36016(0x17a)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5eacfe[_0xc36016(0x152)]+_0xc36016(0x155),_0x483cf));}}return _0x4c6a26;}function validateJumpStep(_0x1632ce,_0x530eb9,_0x1f7209){const _0x19800f=a134_0x4bcd,_0x4de995=[];if(!_0x1632ce['with']?.['target'])return _0x4de995['push'](createIssue(_0x19800f(0x13b),_0x530eb9+'.with.target',_0x19800f(0x12a),'Jump\x20step\x20requires\x20a\x20target',_0x1f7209,_0x530eb9)),_0x4de995;return(!_0x1632ce['with']['target'][_0x19800f(0xfe)]||!_0x1632ce[_0x19800f(0x158)][_0x19800f(0x17d)][_0x19800f(0x122)])&&_0x4de995[_0x19800f(0x15c)](createIssue(_0x19800f(0x13b),_0x530eb9+'.with.target','INVALID_JUMP_TARGET',_0x19800f(0x14c),_0x1f7209)),_0x4de995;}function buildConvergenceMap(_0x1efe7d){const _0x74dfd8=a134_0x4bcd,_0x19578e=new Map();function _0x248b14(_0x282d6a,_0x49cbcc){const _0x28fda0=a134_0x4bcd,_0x365c60=_0x19578e[_0x28fda0(0x132)](_0x282d6a)||[];_0x365c60[_0x28fda0(0x15c)](_0x49cbcc),_0x19578e[_0x28fda0(0x144)](_0x282d6a,_0x365c60);}for(const _0x2e4002 of _0x1efe7d){_0x2e4002[_0x74dfd8(0x152)]&&_0x248b14(_0x2e4002['next'],{'stepName':_0x2e4002['name'],'description':_0x74dfd8(0x143)+_0x2e4002['name']+'\x27'});if(_0x2e4002[_0x74dfd8(0x181)]===_0x74dfd8(0x127)&&_0x2e4002[_0x74dfd8(0x158)]?.[_0x74dfd8(0xef)])for(const _0x2333d1 of _0x2e4002[_0x74dfd8(0x158)]['branches']){_0x2333d1[_0x74dfd8(0x152)]&&_0x248b14(_0x2333d1['next'],{'stepName':_0x2e4002[_0x74dfd8(0x17a)],'description':_0x74dfd8(0x17c)+_0x2333d1['name']+_0x74dfd8(0x153)+_0x2e4002[_0x74dfd8(0x17a)]+'\x27'});}if(_0x2e4002['type']==='ab_test'&&_0x2e4002['with']?.[_0x74dfd8(0x187)])for(const _0x3c47f6 of _0x2e4002[_0x74dfd8(0x158)][_0x74dfd8(0x187)]){_0x3c47f6['next']&&_0x248b14(_0x3c47f6[_0x74dfd8(0x152)],{'stepName':_0x2e4002[_0x74dfd8(0x17a)],'description':_0x74dfd8(0x15e)+_0x3c47f6[_0x74dfd8(0x17a)]+_0x74dfd8(0x153)+_0x2e4002[_0x74dfd8(0x17a)]+'\x27'});}_0x2e4002[_0x74dfd8(0x181)]===_0x74dfd8(0x192)&&_0x2e4002[_0x74dfd8(0x158)]?.[_0x74dfd8(0x189)]&&(_0x2e4002[_0x74dfd8(0x158)]['condition'][_0x74dfd8(0x152)]&&_0x248b14(_0x2e4002[_0x74dfd8(0x158)][_0x74dfd8(0x189)]['next'],{'stepName':_0x2e4002['name'],'description':_0x74dfd8(0x164)+_0x2e4002[_0x74dfd8(0x17a)]+'\x27'}),_0x2e4002['with'][_0x74dfd8(0x189)][_0x74dfd8(0x125)]?.[_0x74dfd8(0x152)]&&_0x248b14(_0x2e4002[_0x74dfd8(0x158)][_0x74dfd8(0x189)][_0x74dfd8(0x125)][_0x74dfd8(0x152)],{'stepName':_0x2e4002[_0x74dfd8(0x17a)],'description':_0x74dfd8(0x169)+_0x2e4002[_0x74dfd8(0x17a)]+'\x27'}));}return _0x19578e;}function validateFlowControl(_0x247b2b,_0x2fa34a,_0x1c5fa5){const _0x345be5=a134_0x4bcd,_0x5f4b1d=[],_0x4a41df='stages['+_0x2fa34a+']',_0x471f84=_0x247b2b[_0x345be5(0x149)]||[];if(_0x471f84[_0x345be5(0x10b)]===0x0)return _0x5f4b1d;const _0x4bc469=new Map();for(const _0x4384cd of _0x471f84){_0x4384cd[_0x345be5(0x17a)]&&_0x4bc469[_0x345be5(0x144)](_0x4384cd[_0x345be5(0x17a)],_0x4384cd);}const _0x567342=buildConvergenceMap(_0x471f84),_0x1dee02=_0x471f84[_0x345be5(0x126)](_0x4bb043=>_0x4bb043[_0x345be5(0x181)]===_0x345be5(0x10c));!_0x1dee02&&_0x5f4b1d[_0x345be5(0x15c)](createIssue(_0x345be5(0x13b),_0x4a41df+_0x345be5(0x15b),_0x345be5(0x109),_0x345be5(0x107)+_0x247b2b[_0x345be5(0x17a)]+'\x27\x20has\x20no\x20end\x20step',_0x1c5fa5));for(const [_0x4e8e61,_0x191530]of _0x567342){const _0x5ba5c2=_0x4bc469['get'](_0x4e8e61);if(!_0x5ba5c2)continue;if(_0x191530[_0x345be5(0x10b)]>0x1&&_0x5ba5c2[_0x345be5(0x181)]!==_0x345be5(0x16d)){const _0x5f35e3=_0x191530['map'](_0x22623=>_0x22623[_0x345be5(0x135)])['join'](',\x20');_0x5f4b1d[_0x345be5(0x15c)](createIssue(_0x345be5(0x13b),_0x4a41df+'.steps',_0x345be5(0x17b),_0x345be5(0x114)+_0x4e8e61+_0x345be5(0x115)+_0x5f35e3+').\x20Use\x20a\x20merge\x20step.',_0x1c5fa5));}_0x191530[_0x345be5(0x10b)]===0x1&&_0x5ba5c2['type']===_0x345be5(0x16d)&&_0x5f4b1d[_0x345be5(0x15c)](createIssue(_0x345be5(0xf0),_0x4a41df+_0x345be5(0x15b),_0x345be5(0x157),_0x345be5(0x160)+_0x4e8e61+_0x345be5(0x156)+_0x191530[0x0][_0x345be5(0x135)]+_0x345be5(0x10d),_0x1c5fa5));}for(const _0x30d687 of _0x471f84){if(_0x30d687[_0x345be5(0x181)]==='merge'&&_0x30d687['next']){const _0x4285bb=_0x4bc469[_0x345be5(0x132)](_0x30d687['next']);_0x4285bb?.['type']===_0x345be5(0x16d)&&_0x5f4b1d[_0x345be5(0x15c)](createIssue(_0x345be5(0x13b),_0x4a41df+_0x345be5(0x15b),'MERGE_TO_MERGE_CHAIN',_0x345be5(0x160)+_0x30d687[_0x345be5(0x17a)]+_0x345be5(0x11b)+_0x30d687['next']+_0x345be5(0x130),_0x1c5fa5));}}return _0x5f4b1d;}function validateCriteria(_0x28896a,_0x595311,_0x5a5ebe){const _0x5efa4f=a134_0x4bcd,_0x44dcaf=[];return _0x28896a[_0x5efa4f(0x13d)]&&(_0x5a5ebe[_0x5efa4f(0x16e)]?.[_0x5efa4f(0x171)](_0x28896a[_0x5efa4f(0x13d)]),!_0x28896a[_0x5efa4f(0x13d)][_0x5efa4f(0x137)](_0x5efa4f(0x173))&&(_0x5a5ebe[_0x5efa4f(0x166)]&&!_0x5a5ebe['embeddedSegments'][_0x5efa4f(0x183)](_0x28896a['segment'])&&_0x44dcaf['push'](createIssue('error',_0x595311+'.segment',_0x5efa4f(0x13f),_0x5efa4f(0x12c)+_0x28896a[_0x5efa4f(0x13d)]+'\x27',_0x5a5ebe)))),_0x44dcaf;}function a134_0x4bcd(_0x2727b7,_0x5ae203){_0x2727b7=_0x2727b7-0xe6;const _0x137448=a134_0x1374();let _0x4bcd2e=_0x137448[_0x2727b7];return _0x4bcd2e;}function validateEmbeddedSegment(_0x25a4d1,_0x5b4dcb,_0x3607b9){const _0x2381c6=a134_0x4bcd,_0x447149=[];return _0x25a4d1[_0x2381c6(0x180)]&&_0x447149['push'](...validateRuleDef(_0x25a4d1[_0x2381c6(0x180)],_0x5b4dcb+_0x2381c6(0xee),_0x3607b9)),_0x447149;}function validateStage(_0x40471b,_0x4c8866,_0x11de65,_0x2ac1c5){const _0x3695c6=a134_0x4bcd,_0x4a0536=[],_0x263232=_0x3695c6(0x103)+_0x4c8866+']',_0x4e520b=new Map(),_0x676e58=new Map();if(_0x40471b['steps']){for(let _0x25419d=0x0;_0x25419d<_0x40471b['steps']['length'];_0x25419d++){const _0x152255=_0x40471b[_0x3695c6(0x149)][_0x25419d];_0x152255[_0x3695c6(0x17a)]&&_0x4e520b['set'](_0x152255[_0x3695c6(0x17a)],_0x152255);}for(let _0x58933c=0x0;_0x58933c<_0x40471b[_0x3695c6(0x149)][_0x3695c6(0x10b)];_0x58933c++){const _0x1bbee3=_0x40471b[_0x3695c6(0x149)][_0x58933c],_0x59a528=_0x263232+_0x3695c6(0x142)+_0x58933c+']';if(_0x1bbee3[_0x3695c6(0x17a)]){if(_0x676e58[_0x3695c6(0x183)](_0x1bbee3[_0x3695c6(0x17a)])){const _0xfddb64=_0x676e58['get'](_0x1bbee3[_0x3695c6(0x17a)]);_0x4a0536[_0x3695c6(0x15c)](createIssue(_0x3695c6(0x13b),_0x59a528+_0x3695c6(0xf1),'DUPLICATE_STEP_NAME',_0x3695c6(0xf8)+_0x1bbee3['name']+'\x27\x20(first\x20defined\x20at\x20steps['+_0xfddb64+'])',_0x2ac1c5));}else _0x676e58[_0x3695c6(0x144)](_0x1bbee3[_0x3695c6(0x17a)],_0x58933c);}_0x4a0536['push'](...validateStep(_0x1bbee3,_0x59a528,_0x2ac1c5,_0x4e520b));}}_0x40471b[_0x3695c6(0x110)]&&_0x4a0536['push'](...validateCriteria(_0x40471b[_0x3695c6(0x110)],_0x263232+'.entry_criteria',_0x2ac1c5));if(_0x40471b['exit_criteria'])for(let _0x255fbf=0x0;_0x255fbf<_0x40471b[_0x3695c6(0x131)][_0x3695c6(0x10b)];_0x255fbf++){_0x4a0536[_0x3695c6(0x15c)](...validateCriteria(_0x40471b[_0x3695c6(0x131)][_0x255fbf],_0x263232+'.exit_criteria['+_0x255fbf+']',_0x2ac1c5));}return _0x40471b['milestone']&&_0x4a0536[_0x3695c6(0x15c)](...validateCriteria(_0x40471b[_0x3695c6(0x119)],_0x263232+_0x3695c6(0x18d),_0x2ac1c5)),_0x4a0536[_0x3695c6(0x15c)](...validateStageStructure(_0x40471b,_0x4c8866,_0x11de65,_0x2ac1c5)),_0x4a0536[_0x3695c6(0x15c)](...validateFlowControl(_0x40471b,_0x4c8866,_0x2ac1c5)),_0x4a0536;}function validateStagesForVersion(_0x3ca9a0,_0x171b45,_0x45bd84,_0x4e2d85,_0x338a77,_0x4a55bc,_0x158f5c){const _0x57531b=a134_0x4bcd;if(_0x3ca9a0[_0x57531b(0x10b)]===0x0){_0x338a77['push']({'level':_0x57531b(0x13b),'path':_0x4e2d85+_0x57531b(0x12f),'code':_0x57531b(0x120),'message':_0x57531b(0x182),'location':getLocationFromPath(_0x45bd84[_0x57531b(0xed)],_0x45bd84[_0x57531b(0x10f)],[_0x57531b(0x12f)])});return;}const _0x3489aa=new Set();for(const _0x211ddd of _0x3ca9a0){if(_0x211ddd[_0x57531b(0x149)])for(const _0x3d705c of _0x211ddd[_0x57531b(0x149)]){_0x3d705c[_0x57531b(0x17a)]&&_0x3489aa[_0x57531b(0x171)](_0x3d705c[_0x57531b(0x17a)]);}}const _0x13aa9f={..._0x45bd84,'stepNames':_0x3489aa},_0x4090df=validateVersionStructure(_0x3ca9a0,_0x13aa9f);for(const _0x571665 of _0x4090df){const _0x1d8a07=_0x4e2d85?{..._0x571665,'path':''+_0x4e2d85+_0x571665[_0x57531b(0x174)]}:_0x571665;if(_0x1d8a07[_0x57531b(0x117)]==='error')_0x338a77[_0x57531b(0x15c)](_0x1d8a07);else _0x4a55bc['push'](_0x1d8a07);}for(let _0x98d7fd=0x0;_0x98d7fd<_0x3ca9a0[_0x57531b(0x10b)];_0x98d7fd++){const _0x2c57e0=validateStage(_0x3ca9a0[_0x98d7fd],_0x98d7fd,_0x3ca9a0[_0x57531b(0x10b)],_0x13aa9f);for(const _0x1ef865 of _0x2c57e0){const _0x37f483=_0x4e2d85?{..._0x1ef865,'path':''+_0x4e2d85+_0x1ef865[_0x57531b(0x174)]}:_0x1ef865;if(_0x37f483[_0x57531b(0x117)]===_0x57531b(0x13b))_0x338a77[_0x57531b(0x15c)](_0x37f483);else _0x4a55bc[_0x57531b(0x15c)](_0x37f483);}}if(_0x171b45[_0x57531b(0xe9)]){const _0x372264=_0x158f5c?.['goalIsInherited']?'goal':_0x4e2d85+'goal',_0x43b44b=validateCriteria(_0x171b45['goal'],_0x372264,_0x13aa9f);for(const _0x426f7f of _0x43b44b){if(_0x426f7f['level']===_0x57531b(0x13b))_0x338a77[_0x57531b(0x15c)](_0x426f7f);else _0x4a55bc[_0x57531b(0x15c)](_0x426f7f);}}}function extractVersionIndex(_0x3af6ce){const _0x35f7aa=a134_0x4bcd,_0x448478=_0x3af6ce[_0x35f7aa(0x124)](/^journeys\[(\d+)\]\./);return _0x448478?_0x448478[0x1]:undefined;}function deduplicateAcrossVersions(_0x4f98f7){const _0x528912=a134_0x4bcd,_0xe8b96b=new Map();for(let _0x31c8b2=0x0;_0x31c8b2<_0x4f98f7['length'];_0x31c8b2++){const _0x2d97bb=_0x4f98f7[_0x31c8b2][_0x528912(0x165)]+':'+_0x4f98f7[_0x31c8b2]['message'],_0x55d45a=extractVersionIndex(_0x4f98f7[_0x31c8b2][_0x528912(0x174)]),_0x480b6d=_0xe8b96b['get'](_0x2d97bb);if(_0x480b6d){_0x480b6d[_0x528912(0x145)][_0x528912(0x15c)](_0x31c8b2);if(_0x55d45a)_0x480b6d[_0x528912(0x106)][_0x528912(0x171)](_0x55d45a);}else _0xe8b96b['set'](_0x2d97bb,{'indices':[_0x31c8b2],'versions':new Set(_0x55d45a?[_0x55d45a]:[])});}const _0x34d284=new Set();for(const {indices:_0x2cb8cf,versions:_0x32e882}of _0xe8b96b['values']()){if(_0x32e882[_0x528912(0x113)]<=0x1)continue;const _0x5ba425=_0x4f98f7[_0x2cb8cf[0x0]];_0x5ba425[_0x528912(0x174)]=_0x5ba425[_0x528912(0x174)][_0x528912(0xe6)](/^journeys\[\d+\]\./,''),_0x5ba425['message']=_0x5ba425[_0x528912(0x147)]+'\x20(across\x20'+_0x32e882['size']+'\x20versions)';for(let _0x473c5d=0x1;_0x473c5d<_0x2cb8cf[_0x528912(0x10b)];_0x473c5d++){_0x34d284[_0x528912(0x171)](_0x2cb8cf[_0x473c5d]);}}const _0x2ef43c=[..._0x34d284][_0x528912(0xf6)]((_0x43d2f7,_0x5a498b)=>_0x5a498b-_0x43d2f7);for(const _0x27921f of _0x2ef43c){_0x4f98f7[_0x528912(0x185)](_0x27921f,0x1);}}export function validateJourneyDef(_0x3771ac,_0x2091d5={},_0x2042a4={}){const _0x1ee2d5=a134_0x4bcd;if(_0x2042a4[_0x1ee2d5(0x14d)])return runJourneySemanticChecks(_0x3771ac,_0x2091d5);const _0x103b46=JourneyDefSchema[_0x1ee2d5(0x116)](_0x3771ac);if(_0x103b46[_0x1ee2d5(0x14b)])return runJourneySemanticChecks(_0x103b46['data'],_0x2091d5);return zodErrorsToJourneyValidationResult(_0x103b46['error'],_0x2091d5);}function zodErrorsToJourneyValidationResult(_0x5bcd63,_0x40a6ed){const _0x239488=a134_0x4bcd,_0x11299f=flattenZodIssues(_0x5bcd63[_0x239488(0x146)]),_0x56aebe=_0x11299f[_0x239488(0x121)](_0x41c6ee=>{const _0x10dea3=_0x239488,_0x234ea6=formatZodPath(_0x41c6ee['path']),_0x178178=mapJourneyZodIssueToCode(_0x41c6ee,_0x234ea6),_0x4c8626=getLocationFromPath(_0x40a6ed[_0x10dea3(0xed)],_0x40a6ed['source'],_0x41c6ee[_0x10dea3(0x174)][_0x10dea3(0x121)](_0x1f9219=>typeof _0x1f9219==='symbol'?String(_0x1f9219):_0x1f9219));return{'level':_0x10dea3(0x13b),'path':_0x234ea6,'code':_0x178178,'message':_0x41c6ee[_0x10dea3(0x147)],..._0x4c8626&&{'location':_0x4c8626}};});return{'valid':![],'errors':_0x56aebe,'warnings':[]};}function mapJourneyZodIssueToCode(_0x12beab,_0x48ec81){const _0xe9dbc6=a134_0x4bcd;if(_0x48ec81==='name')return _0xe9dbc6(0x172);if(_0x48ec81[_0xe9dbc6(0x100)](_0xe9dbc6(0x18b))&&_0x48ec81['includes'](_0xe9dbc6(0x149)))return _0xe9dbc6(0x148);if(_0x48ec81===_0xe9dbc6(0x12f)||_0x48ec81[_0xe9dbc6(0x100)](_0xe9dbc6(0x138)))return _0xe9dbc6(0x120);if(_0x48ec81===''&&_0x12beab[_0xe9dbc6(0x147)][_0xe9dbc6(0x16f)](_0xe9dbc6(0xfa)))return _0xe9dbc6(0x120);if(_0x48ec81[_0xe9dbc6(0x16f)]('activation'))return _0xe9dbc6(0xfb);return _0xe9dbc6(0x148);}function runJourneySemanticChecks(_0x69857d,_0x2a429f){const _0x1923aa=a134_0x4bcd,_0x527a0d=[],_0x26c977=[];(!_0x69857d[_0x1923aa(0x17a)]||_0x69857d['name'][_0x1923aa(0xea)]()==='')&&_0x527a0d[_0x1923aa(0x15c)]({'level':'error','path':'name','code':_0x1923aa(0x172),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x2a429f['document'],_0x2a429f[_0x1923aa(0x10f)],['name'])});const _0x53a0ea=new Set();if(_0x69857d[_0x1923aa(0x139)])for(const _0x218010 of Object['keys'](_0x69857d[_0x1923aa(0x139)])){_0x53a0ea[_0x1923aa(0x171)](_0x218010);}const _0x2a1fa4=new Set();if(_0x69857d['activations'])for(const _0x31ec8f of Object['keys'](_0x69857d[_0x1923aa(0x129)])){_0x2a1fa4[_0x1923aa(0x171)](_0x31ec8f);}const _0x929235=new Set(),_0x1c194d={..._0x2a429f,'embeddedSegments':_0x53a0ea,'referencedSegments':_0x929235,'activationKeys':_0x2a1fa4[_0x1923aa(0x113)]>0x0?_0x2a1fa4:undefined};if(_0x69857d[_0x1923aa(0x139)])for(const [_0x496fe1,_0x90b334]of Object[_0x1923aa(0x184)](_0x69857d[_0x1923aa(0x139)])){const _0x17428d=validateEmbeddedSegment(_0x90b334,'segments.'+_0x496fe1,_0x1c194d);for(const _0x4bdcd of _0x17428d){if(_0x4bdcd[_0x1923aa(0x117)]==='error')_0x527a0d[_0x1923aa(0x15c)](_0x4bdcd);else _0x26c977[_0x1923aa(0x15c)](_0x4bdcd);}}const _0x2b6c6b=!!_0x69857d[_0x1923aa(0xe9)],_0x225b71=_0x69857d[_0x1923aa(0x15d)]?.[_0x1923aa(0x10e)](_0x263060=>!!_0x263060[_0x1923aa(0xe9)])??![];!_0x2b6c6b&&!_0x225b71&&_0x26c977[_0x1923aa(0x15c)]({'level':_0x1923aa(0xf0),'path':_0x1923aa(0xe9),'code':'MISSING_GOAL','message':_0x1923aa(0xf5),'location':getLocationFromPath(_0x2a429f[_0x1923aa(0xed)],_0x2a429f[_0x1923aa(0x10f)],[_0x1923aa(0xe9)])});const _0x5bc33e=_0x69857d[_0x1923aa(0x15d)]??_0x69857d[_0x1923aa(0x106)];if(_0x5bc33e&&_0x5bc33e[_0x1923aa(0x111)](_0x5f4610=>_0x5f4610[_0x1923aa(0x102)]===!![])[_0x1923aa(0x10b)]>0x1){const _0x57d20f=_0x69857d[_0x1923aa(0x15d)]?'journeys':_0x1923aa(0x106);_0x527a0d[_0x1923aa(0x15c)]({'level':'error','path':_0x57d20f,'code':_0x1923aa(0x11d),'message':_0x1923aa(0xe8)+(_0x57d20f===_0x1923aa(0x15d)?_0x1923aa(0xeb):_0x1923aa(0x11f))+_0x1923aa(0xff),'location':getLocationFromPath(_0x2a429f[_0x1923aa(0xed)],_0x2a429f[_0x1923aa(0x10f)],[_0x57d20f])});}if(_0x69857d[_0x1923aa(0x15d)]&&_0x69857d['journeys']['length']>0x0)for(let _0xe5a909=0x0;_0xe5a909<_0x69857d[_0x1923aa(0x15d)][_0x1923aa(0x10b)];_0xe5a909++){const _0x3e03b4=_0x69857d[_0x1923aa(0x15d)][_0xe5a909];if(_0x69857d['journeys'][_0x1923aa(0x10b)]>0x1&&_0x3e03b4['state']===_0x1923aa(0x14a))continue;const _0x1a395e=_0x3e03b4[_0x1923aa(0x12f)]||[],_0x130b70='journeys['+_0xe5a909+'].',_0x386b37=!!_0x3e03b4[_0x1923aa(0xe9)],_0x49d9fc=_0x386b37?{..._0x69857d,'goal':_0x3e03b4[_0x1923aa(0xe9)]}:_0x69857d;validateStagesForVersion(_0x1a395e,_0x49d9fc,_0x1c194d,_0x130b70,_0x527a0d,_0x26c977,{'goalIsInherited':!_0x386b37});}else{if(_0x69857d[_0x1923aa(0x106)]&&_0x69857d['versions'][_0x1923aa(0x10b)]>0x0)for(let _0x3d6b08=0x0;_0x3d6b08<_0x69857d[_0x1923aa(0x106)][_0x1923aa(0x10b)];_0x3d6b08++){const _0x1a4707=_0x69857d[_0x1923aa(0x106)][_0x3d6b08];if(_0x69857d[_0x1923aa(0x106)][_0x1923aa(0x10b)]>0x1&&_0x1a4707[_0x1923aa(0x140)]===_0x1923aa(0x14a))continue;const _0x7a1a37=_0x1a4707[_0x1923aa(0x12f)]||[],_0x191a44=_0x1923aa(0xfc)+_0x3d6b08+'].';validateStagesForVersion(_0x7a1a37,_0x69857d,_0x1c194d,_0x191a44,_0x527a0d,_0x26c977);}else{const _0x54d8ca=_0x69857d['stages']||[];validateStagesForVersion(_0x54d8ca,_0x69857d,_0x1c194d,'',_0x527a0d,_0x26c977);}}_0x69857d[_0x1923aa(0x15d)]&&_0x69857d['journeys']['length']>0x1&&(deduplicateAcrossVersions(_0x527a0d),deduplicateAcrossVersions(_0x26c977));for(const _0x2ef813 of _0x53a0ea){!_0x929235[_0x1923aa(0x183)](_0x2ef813)&&!_0x2ef813[_0x1923aa(0x137)](_0x1923aa(0x198))&&_0x26c977[_0x1923aa(0x15c)]({'level':_0x1923aa(0xf0),'path':'segments.'+_0x2ef813,'code':_0x1923aa(0xf9),'message':_0x1923aa(0x123)+_0x2ef813+_0x1923aa(0x134),'location':getLocationFromPath(_0x2a429f[_0x1923aa(0xed)],_0x2a429f[_0x1923aa(0x10f)],[_0x1923aa(0x139),_0x2ef813])});}return{'valid':_0x527a0d['length']===0x0,'errors':_0x527a0d,'warnings':_0x26c977};}