@treasuredata/tdx 2026.7.0 → 2026.7.2

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 (283) 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.js +1 -1
  12. package/dist/commands/cas-command.d.ts +20 -0
  13. package/dist/commands/cas-command.d.ts.map +1 -1
  14. package/dist/commands/cas-command.js +1 -1
  15. package/dist/commands/cas-command.js.map +1 -1
  16. package/dist/commands/cas-segment-command.d.ts +24 -0
  17. package/dist/commands/cas-segment-command.d.ts.map +1 -1
  18. package/dist/commands/cas-segment-command.js +1 -1
  19. package/dist/commands/cas-segment-command.js.map +1 -1
  20. package/dist/commands/chat-command.js +1 -1
  21. package/dist/commands/claude-command.js +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-usage-command.js +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/connection-command.js +1 -1
  26. package/dist/commands/databases.js +1 -1
  27. package/dist/commands/delivery-command.js +1 -1
  28. package/dist/commands/describe.js +1 -1
  29. package/dist/commands/engage-campaign-pull-command.js +1 -1
  30. package/dist/commands/engage-campaign-push-command.js +1 -1
  31. package/dist/commands/engage-campaign-validate-command.js +1 -1
  32. package/dist/commands/engage-command.js +1 -1
  33. package/dist/commands/engage-template-pull-command.js +1 -1
  34. package/dist/commands/engage-template-push-command.js +1 -1
  35. package/dist/commands/engage-template-validate-command.js +1 -1
  36. package/dist/commands/job-command.js +1 -1
  37. package/dist/commands/journey-command.js +1 -1
  38. package/dist/commands/journey-validate-command.js +1 -1
  39. package/dist/commands/llm-command.js +1 -1
  40. package/dist/commands/mcp-command.js +1 -1
  41. package/dist/commands/parent-segment-command.js +1 -1
  42. package/dist/commands/policy-command.js +1 -1
  43. package/dist/commands/profile-command.js +1 -1
  44. package/dist/commands/profiles-command.js +1 -1
  45. package/dist/commands/query-command.js +1 -1
  46. package/dist/commands/schedule-command.js +1 -1
  47. package/dist/commands/segment-command.js +1 -1
  48. package/dist/commands/segment-create-command.js +1 -1
  49. package/dist/commands/segment-fields-command.js +1 -1
  50. package/dist/commands/segment-move-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.js +1 -1
  59. package/dist/commands/table-deleted.js +1 -1
  60. package/dist/commands/tables.js +1 -1
  61. package/dist/commands/unset-command.js +1 -1
  62. package/dist/commands/upgrade-command.js +1 -1
  63. package/dist/commands/use-command.js +1 -1
  64. package/dist/commands/user-command.js +1 -1
  65. package/dist/commands/work-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.js +1 -1
  72. package/dist/core/credential-cache.js +1 -1
  73. package/dist/core/global-context.js +1 -1
  74. package/dist/core/keychain.js +1 -1
  75. package/dist/core/oauth-keychain.js +1 -1
  76. package/dist/core/oauth.js +1 -1
  77. package/dist/core/profile.js +1 -1
  78. package/dist/core/project-config.js +1 -1
  79. package/dist/core/session.js +1 -1
  80. package/dist/core/user-cache.js +1 -1
  81. package/dist/core/version.js +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/mcp/server.js +1 -1
  84. package/dist/mcp/tools/index.js +1 -1
  85. package/dist/mcp/tools/tdx-run.js +1 -1
  86. package/dist/mcp/tools/tdx-search.js +1 -1
  87. package/dist/mcp/tools/work-create-item.js +1 -1
  88. package/dist/mcp/utils.js +1 -1
  89. package/dist/proxy/claude-usage-tracker.js +1 -1
  90. package/dist/proxy/passthrough-server.js +1 -1
  91. package/dist/proxy/sse-usage-parser.js +1 -1
  92. package/dist/sdk/agent/agent-config.js +1 -1
  93. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  94. package/dist/sdk/agent/agent-yaml.js +1 -1
  95. package/dist/sdk/agent/test/evaluator.js +1 -1
  96. package/dist/sdk/agent/test/executor.js +1 -1
  97. package/dist/sdk/agent/test/index.js +1 -1
  98. package/dist/sdk/agent/test/output.js +1 -1
  99. package/dist/sdk/agent/test/parser.js +1 -1
  100. package/dist/sdk/agent/tool-target-registry.js +1 -1
  101. package/dist/sdk/api.js +1 -1
  102. package/dist/sdk/cas/cas-api-client.d.ts +83 -3
  103. package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
  104. package/dist/sdk/cas/cas-api-client.js +1 -1
  105. package/dist/sdk/cas/cas-api-client.js.map +1 -1
  106. package/dist/sdk/cas/cas-audience-schema.d.ts +149 -0
  107. package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -0
  108. package/dist/sdk/cas/cas-audience-schema.js +1 -0
  109. package/dist/sdk/cas/cas-audience-schema.js.map +1 -0
  110. package/dist/sdk/cas/cas-audience-validator.d.ts +57 -0
  111. package/dist/sdk/cas/cas-audience-validator.d.ts.map +1 -0
  112. package/dist/sdk/cas/cas-audience-validator.js +1 -0
  113. package/dist/sdk/cas/cas-audience-validator.js.map +1 -0
  114. package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -1
  115. package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
  116. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  117. package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
  118. package/dist/sdk/cas/cas-segment-yaml.d.ts +30 -2
  119. package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -1
  120. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  121. package/dist/sdk/cas/cas-segment-yaml.js.map +1 -1
  122. package/dist/sdk/cas/index.d.ts +21 -0
  123. package/dist/sdk/cas/index.d.ts.map +1 -1
  124. package/dist/sdk/cas/index.js +1 -1
  125. package/dist/sdk/cas/index.js.map +1 -1
  126. package/dist/sdk/cas/pull-workflow.js +1 -1
  127. package/dist/sdk/cas/push-workflow.d.ts +131 -0
  128. package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
  129. package/dist/sdk/cas/push-workflow.js +1 -1
  130. package/dist/sdk/cas/push-workflow.js.map +1 -1
  131. package/dist/sdk/cas/types.d.ts +33 -4
  132. package/dist/sdk/cas/types.d.ts.map +1 -1
  133. package/dist/sdk/cas/validate-files.d.ts +64 -0
  134. package/dist/sdk/cas/validate-files.d.ts.map +1 -0
  135. package/dist/sdk/cas/validate-files.js +1 -0
  136. package/dist/sdk/cas/validate-files.js.map +1 -0
  137. package/dist/sdk/client/cdp-api-client.js +1 -1
  138. package/dist/sdk/client/delivery-api-client.js +1 -1
  139. package/dist/sdk/client/endpoints.d.ts +11 -1
  140. package/dist/sdk/client/endpoints.d.ts.map +1 -1
  141. package/dist/sdk/client/endpoints.js +1 -1
  142. package/dist/sdk/client/endpoints.js.map +1 -1
  143. package/dist/sdk/client/engage-api-client.js +1 -1
  144. package/dist/sdk/client/http-client.d.ts +1 -0
  145. package/dist/sdk/client/http-client.d.ts.map +1 -1
  146. package/dist/sdk/client/http-client.js +1 -1
  147. package/dist/sdk/client/http-client.js.map +1 -1
  148. package/dist/sdk/client/llm-api-client.js +1 -1
  149. package/dist/sdk/client/oauth-refresh.js +1 -1
  150. package/dist/sdk/client/rate-limiter.js +1 -1
  151. package/dist/sdk/client/td-api-client.js +1 -1
  152. package/dist/sdk/client/trino-api-client.js +1 -1
  153. package/dist/sdk/client/workflow-client.js +1 -1
  154. package/dist/sdk/connection-validator.js +1 -1
  155. package/dist/sdk/connection.js +1 -1
  156. package/dist/sdk/delivery.js +1 -1
  157. package/dist/sdk/engage/campaign-pull.js +1 -1
  158. package/dist/sdk/engage/campaign-push.js +1 -1
  159. package/dist/sdk/engage/campaign-validator.js +1 -1
  160. package/dist/sdk/engage/campaign-yaml.js +1 -1
  161. package/dist/sdk/engage/template-pull.js +1 -1
  162. package/dist/sdk/engage/template-push.js +1 -1
  163. package/dist/sdk/engage/template-validator.js +1 -1
  164. package/dist/sdk/engage/template-yaml.js +1 -1
  165. package/dist/sdk/engage/types/campaign-def.js +1 -1
  166. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  167. package/dist/sdk/engage/types/template-schema.js +1 -1
  168. package/dist/sdk/engage.js +1 -1
  169. package/dist/sdk/errors.d.ts +20 -0
  170. package/dist/sdk/errors.d.ts.map +1 -1
  171. package/dist/sdk/errors.js +1 -1
  172. package/dist/sdk/errors.js.map +1 -1
  173. package/dist/sdk/index.js +1 -1
  174. package/dist/sdk/io/index.js +1 -1
  175. package/dist/sdk/io/node-filesystem.js +1 -1
  176. package/dist/sdk/job.js +1 -1
  177. package/dist/sdk/journey.js +1 -1
  178. package/dist/sdk/llm/chat-cache.js +1 -1
  179. package/dist/sdk/llm/index.js +1 -1
  180. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  181. package/dist/sdk/llm/model-factors.js +1 -1
  182. package/dist/sdk/llm/user-settings.js +1 -1
  183. package/dist/sdk/personalization.js +1 -1
  184. package/dist/sdk/policy.js +1 -1
  185. package/dist/sdk/query/deleted-table-validation.js +1 -1
  186. package/dist/sdk/query/index.js +1 -1
  187. package/dist/sdk/query/sql-parser.js +1 -1
  188. package/dist/sdk/realtime.js +1 -1
  189. package/dist/sdk/schedule.js +1 -1
  190. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  191. package/dist/sdk/segment/fields-display.js +1 -1
  192. package/dist/sdk/segment/file-discovery.js +1 -1
  193. package/dist/sdk/segment/journey-utils.js +1 -1
  194. package/dist/sdk/segment/journey-validator.js +1 -1
  195. package/dist/sdk/segment/journey-yaml.js +1 -1
  196. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  197. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  198. package/dist/sdk/segment/pull-workflow.js +1 -1
  199. package/dist/sdk/segment/push-recovery.js +1 -1
  200. package/dist/sdk/segment/push-workflow.js +1 -1
  201. package/dist/sdk/segment/resolution-context.d.ts +16 -7
  202. package/dist/sdk/segment/resolution-context.d.ts.map +1 -1
  203. package/dist/sdk/segment/resolution-context.js +1 -1
  204. package/dist/sdk/segment/resolution-context.js.map +1 -1
  205. package/dist/sdk/segment/segment-path-parser.js +1 -1
  206. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  207. package/dist/sdk/segment/segment-validator.js +1 -1
  208. package/dist/sdk/segment/target-resolution.js +1 -1
  209. package/dist/sdk/segment/tdx-config.js +1 -1
  210. package/dist/sdk/segment/types/activation-schema.js +1 -1
  211. package/dist/sdk/segment/types/journey-def.js +1 -1
  212. package/dist/sdk/segment/types/journey-schema.js +1 -1
  213. package/dist/sdk/segment/types/segment-def.js +1 -1
  214. package/dist/sdk/segment/types/segment-schema.js +1 -1
  215. package/dist/sdk/segment/validate-files.js +1 -1
  216. package/dist/sdk/segment/yaml-validator.d.ts +1 -1
  217. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  218. package/dist/sdk/segment/yaml-validator.js +1 -1
  219. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  220. package/dist/sdk/segment.js +1 -1
  221. package/dist/sdk/types/cas.d.ts +99 -26
  222. package/dist/sdk/types/cas.d.ts.map +1 -1
  223. package/dist/sdk/types/index.d.ts +1 -1
  224. package/dist/sdk/types/index.d.ts.map +1 -1
  225. package/dist/sdk/types/index.js +1 -1
  226. package/dist/sdk/types/index.js.map +1 -1
  227. package/dist/sdk/types/progress.js +1 -1
  228. package/dist/sdk/types/workspace.js +1 -1
  229. package/dist/sdk/user.js +1 -1
  230. package/dist/sdk/util/format-detector.js +1 -1
  231. package/dist/sdk/util/formatters.js +1 -1
  232. package/dist/sdk/util/index.js +1 -1
  233. package/dist/sdk/util/paginate.js +1 -1
  234. package/dist/sdk/util/tree-formatter.js +1 -1
  235. package/dist/sdk/util/tree-search.js +1 -1
  236. package/dist/sdk/workflow/archive-validation.js +1 -1
  237. package/dist/sdk/workflow/clone-workflow.js +1 -1
  238. package/dist/sdk/workflow/index.js +1 -1
  239. package/dist/sdk/workflow/pull-workflow.js +1 -1
  240. package/dist/sdk/workflow/push-workflow.js +1 -1
  241. package/dist/sdk/workflow/task-graph.js +1 -1
  242. package/dist/sdk/workflow/tdx-config.js +1 -1
  243. package/dist/sdk/workflow/workflow-utils.js +1 -1
  244. package/dist/sdk/workspace/access-tracker.js +1 -1
  245. package/dist/sdk/workspace/frontmatter.js +1 -1
  246. package/dist/sdk/workspace/git.js +1 -1
  247. package/dist/sdk/workspace/index.js +1 -1
  248. package/dist/sdk/workspace/templates.js +1 -1
  249. package/dist/sdk/workspace/weekly.js +1 -1
  250. package/dist/sdk/workspace/wikilinks.js +1 -1
  251. package/dist/test-utils/command-runner.js +1 -1
  252. package/dist/test-utils/factories.js +1 -1
  253. package/dist/test-utils/fixtures.js +1 -1
  254. package/dist/test-utils/http-mock.js +1 -1
  255. package/dist/test-utils/index.js +1 -1
  256. package/dist/utils/async.js +1 -1
  257. package/dist/utils/colors.js +1 -1
  258. package/dist/utils/diff.js +1 -1
  259. package/dist/utils/file-permissions.js +1 -1
  260. package/dist/utils/file-reader.js +1 -1
  261. package/dist/utils/github-releases.js +1 -1
  262. package/dist/utils/global-cache.js +1 -1
  263. package/dist/utils/json-loader.js +1 -1
  264. package/dist/utils/local-cache.js +1 -1
  265. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  266. package/dist/utils/logger/formatters/index.js +1 -1
  267. package/dist/utils/logger/handlers/console-handler.js +1 -1
  268. package/dist/utils/logger/handlers/file-handler.js +1 -1
  269. package/dist/utils/logger/handlers/index.js +1 -1
  270. package/dist/utils/logger/handlers/null-handler.js +1 -1
  271. package/dist/utils/logger/index.js +1 -1
  272. package/dist/utils/logger/logger.js +1 -1
  273. package/dist/utils/logger/types.js +1 -1
  274. package/dist/utils/option-validation.js +1 -1
  275. package/dist/utils/process.js +1 -1
  276. package/dist/utils/prompt.js +1 -1
  277. package/dist/utils/spinner.js +1 -1
  278. package/dist/utils/sse-parser.js +1 -1
  279. package/dist/utils/string-utils.js +1 -1
  280. package/dist/utils/table-ref-parser.js +1 -1
  281. package/dist/utils/tdx-logger.js +1 -1
  282. package/dist/utils/version-check.js +1 -1
  283. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x117935,_0x1f4155){const _0x59c701=a150_0x1362,_0x3902ba=_0x117935();while(!![]){try{const _0x2d378d=parseInt(_0x59c701(0xf4))/0x1+-parseInt(_0x59c701(0x18d))/0x2+parseInt(_0x59c701(0x19b))/0x3+parseInt(_0x59c701(0x116))/0x4+-parseInt(_0x59c701(0x141))/0x5+parseInt(_0x59c701(0x14d))/0x6+-parseInt(_0x59c701(0x13f))/0x7*(-parseInt(_0x59c701(0x143))/0x8);if(_0x2d378d===_0x1f4155)break;else _0x3902ba['push'](_0x3902ba['shift']());}catch(_0x3c5f1e){_0x3902ba['push'](_0x3902ba['shift']());}}}(a150_0x2ded,0x94960));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1545e2,_0x530fda,_0x4cfb97,_0x234a3c,_0x579354,_0x4ad7f8){const _0x23a2b0=a150_0x1362;return{'level':_0x1545e2,'path':_0x530fda,'code':_0x4cfb97,'message':_0x234a3c,'location':getLocationFromPath(_0x579354['document'],_0x579354[_0x23a2b0(0x171)],pathToArray(_0x4ad7f8??_0x530fda))};}function validateVersionStructure(_0x9895c8,_0x188f26){const _0xb07681=a150_0x1362,_0x163f1f=[];return _0x9895c8[_0xb07681(0x16b)]>MAX_STAGES&&_0x163f1f[_0xb07681(0x19c)](createIssue(_0xb07681(0x166),_0xb07681(0x151),_0xb07681(0xf6),_0xb07681(0x13e)+_0x9895c8[_0xb07681(0x16b)]+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x188f26)),_0x163f1f;}function validateStageStructure(_0x4ffdee,_0x463b4e,_0x12b400,_0x1a990d){const _0x22b8a2=a150_0x1362,_0x376c04=[],_0x919e00=_0x22b8a2(0x17d)+_0x463b4e+']';_0x463b4e===0x0&&!_0x4ffdee['entry_criteria']&&_0x376c04['push'](createIssue(_0x22b8a2(0x166),_0x919e00+_0x22b8a2(0xf7),_0x22b8a2(0x133),_0x22b8a2(0x176)+_0x4ffdee[_0x22b8a2(0xf9)]+'\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)',_0x1a990d,_0x919e00));const _0x20575a=_0x463b4e===_0x12b400-0x1;!_0x20575a&&!_0x4ffdee[_0x22b8a2(0x192)]&&_0x376c04[_0x22b8a2(0x19c)](createIssue(_0x22b8a2(0x166),_0x919e00+'.milestone','MISSING_MILESTONE','Stage\x20\x27'+_0x4ffdee['name']+_0x22b8a2(0x130),_0x1a990d,_0x919e00));(!_0x4ffdee[_0x22b8a2(0x10a)]||_0x4ffdee[_0x22b8a2(0x10a)]['length']===0x0)&&_0x376c04[_0x22b8a2(0x19c)](createIssue(_0x22b8a2(0x14e),_0x919e00+_0x22b8a2(0x168),_0x22b8a2(0x18b),_0x22b8a2(0x176)+_0x4ffdee['name']+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x1a990d,_0x919e00));const _0x56e954=_0x4ffdee[_0x22b8a2(0x109)]?.[_0x22b8a2(0x16b)]??0x0;if(_0x56e954===0x0)_0x376c04['push'](createIssue(_0x22b8a2(0x166),_0x919e00+'.steps',_0x22b8a2(0x117),_0x22b8a2(0x176)+_0x4ffdee[_0x22b8a2(0xf9)]+_0x22b8a2(0x149),_0x1a990d,_0x919e00+_0x22b8a2(0x111)));else{if(_0x56e954===0x1)_0x376c04[_0x22b8a2(0x19c)](createIssue(_0x22b8a2(0x14e),_0x919e00+_0x22b8a2(0x111),'INSUFFICIENT_STEPS','Stage\x20\x27'+_0x4ffdee[_0x22b8a2(0xf9)]+_0x22b8a2(0x17f),_0x1a990d,_0x919e00+_0x22b8a2(0x111)));else _0x56e954<=0x3&&_0x376c04['push'](createIssue(_0x22b8a2(0x14e),_0x919e00+_0x22b8a2(0x111),_0x22b8a2(0x170),_0x22b8a2(0x176)+_0x4ffdee[_0x22b8a2(0xf9)]+_0x22b8a2(0x103)+_0x56e954+_0x22b8a2(0x14f),_0x1a990d,_0x919e00+_0x22b8a2(0x111)));}return _0x376c04;}function validateStep(_0x4ddfd0,_0x7c7538,_0x2ebe15,_0x395c21){const _0x884c6=a150_0x1362,_0x5ab8a5=[];if(_0x4ddfd0['type']===_0x884c6(0x177))return _0x4ddfd0[_0x884c6(0x15b)]&&_0x5ab8a5['push'](createIssue(_0x884c6(0x166),_0x7c7538+_0x884c6(0x163),_0x884c6(0x147),_0x884c6(0x179)+_0x4ddfd0[_0x884c6(0xf9)]+_0x884c6(0x10d),_0x2ebe15)),_0x884c6(0x118)in _0x4ddfd0&&_0x4ddfd0[_0x884c6(0x118)]!==undefined&&_0x5ab8a5[_0x884c6(0x19c)](createIssue('error',_0x7c7538+_0x884c6(0x13d),'END_STEP_HAS_NEXT_OR_WITH',_0x884c6(0x179)+_0x4ddfd0[_0x884c6(0xf9)]+_0x884c6(0x189),_0x2ebe15)),_0x5ab8a5;_0x4ddfd0['next']&&(_0x2ebe15[_0x884c6(0x165)]&&!_0x2ebe15[_0x884c6(0x165)][_0x884c6(0x11d)](_0x4ddfd0[_0x884c6(0x15b)])&&_0x5ab8a5[_0x884c6(0x19c)](createIssue(_0x884c6(0x166),_0x7c7538+_0x884c6(0x163),_0x884c6(0x16c),_0x884c6(0x15c)+_0x4ddfd0[_0x884c6(0x15b)]+'\x27',_0x2ebe15)));switch(_0x4ddfd0['type']){case _0x884c6(0x10b):_0x5ab8a5[_0x884c6(0x19c)](...validateWaitStep(_0x4ddfd0,_0x7c7538,_0x2ebe15,_0x395c21));break;case _0x884c6(0x146):_0x5ab8a5[_0x884c6(0x19c)](...validateActivationStep(_0x4ddfd0,_0x7c7538,_0x2ebe15));break;case _0x884c6(0xfa):_0x5ab8a5[_0x884c6(0x19c)](...validateDecisionPointStep(_0x4ddfd0,_0x7c7538,_0x2ebe15,_0x395c21));break;case _0x884c6(0x198):_0x5ab8a5[_0x884c6(0x19c)](...validateAbTestStep(_0x4ddfd0,_0x7c7538,_0x2ebe15,_0x395c21));break;case _0x884c6(0x10f):_0x5ab8a5[_0x884c6(0x19c)](...validateJumpStep(_0x4ddfd0,_0x7c7538,_0x2ebe15));break;}return _0x5ab8a5;}function validateWaitStep(_0x25cc27,_0x412de8,_0x7930e9,_0x3f58dc){const _0x5ed491=a150_0x1362,_0x6bd855=[];if(!_0x25cc27[_0x5ed491(0x118)])return _0x6bd855['push'](createIssue(_0x5ed491(0x166),_0x412de8+'.with',_0x5ed491(0x150),_0x5ed491(0x18a),_0x7930e9,_0x412de8)),_0x6bd855;if(_0x25cc27[_0x5ed491(0x118)][_0x5ed491(0x13b)]){const _0x2568dc=_0x25cc27[_0x5ed491(0x118)][_0x5ed491(0x13b)];if(_0x2568dc[_0x5ed491(0x174)]){_0x7930e9[_0x5ed491(0xef)]?.[_0x5ed491(0x1a3)](_0x2568dc['segment']);!_0x2568dc[_0x5ed491(0x174)][_0x5ed491(0x157)]('ref:')&&(_0x7930e9[_0x5ed491(0x186)]&&!_0x7930e9[_0x5ed491(0x186)]['has'](_0x2568dc[_0x5ed491(0x174)])&&_0x6bd855[_0x5ed491(0x19c)](createIssue(_0x5ed491(0x166),_0x412de8+_0x5ed491(0x17b),_0x5ed491(0x128),_0x5ed491(0x175)+_0x2568dc['segment']+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x7930e9)));_0x2568dc['next']&&_0x7930e9[_0x5ed491(0x165)]&&!_0x7930e9['stepNames']['has'](_0x2568dc[_0x5ed491(0x15b)])&&_0x6bd855[_0x5ed491(0x19c)](createIssue(_0x5ed491(0x166),_0x412de8+_0x5ed491(0x13a),'INVALID_NEXT_REFERENCE',_0x5ed491(0x188)+_0x2568dc[_0x5ed491(0x15b)]+'\x27',_0x7930e9));_0x2568dc[_0x5ed491(0x169)]?.['next']&&_0x7930e9[_0x5ed491(0x165)]&&!_0x7930e9[_0x5ed491(0x165)][_0x5ed491(0x11d)](_0x2568dc[_0x5ed491(0x169)][_0x5ed491(0x15b)])&&_0x6bd855[_0x5ed491(0x19c)](createIssue(_0x5ed491(0x166),_0x412de8+_0x5ed491(0x125),_0x5ed491(0x16c),_0x5ed491(0x135)+_0x2568dc[_0x5ed491(0x169)][_0x5ed491(0x15b)]+'\x27',_0x7930e9));const _0x41de24=_0x2568dc[_0x5ed491(0x15b)]||_0x25cc27[_0x5ed491(0x15b)],_0x21173e=_0x2568dc['timeout']?.['next']||_0x25cc27[_0x5ed491(0x15b)];if(_0x41de24){const _0x175ce1=_0x3f58dc[_0x5ed491(0x14a)](_0x41de24);_0x175ce1?.['type']===_0x5ed491(0x101)&&_0x6bd855[_0x5ed491(0x19c)](createIssue(_0x5ed491(0x14e),_0x412de8+_0x5ed491(0x13a),_0x5ed491(0x156),'Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x41de24+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x7930e9,_0x412de8+'.with.condition'));}if(_0x21173e){const _0x1f010b=_0x3f58dc[_0x5ed491(0x14a)](_0x21173e);_0x1f010b?.['type']===_0x5ed491(0x101)&&_0x6bd855['push'](createIssue('warning',_0x412de8+'.with.condition.timeout.next',_0x5ed491(0x156),_0x5ed491(0x18e)+_0x21173e+'\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.',_0x7930e9,_0x412de8+_0x5ed491(0x15d)));}}}return _0x6bd855;}function validateActivationStep(_0x211ac4,_0x380ed7,_0x27a3fc){const _0x473009=a150_0x1362,_0x19d4f6=[];if(!_0x211ac4['with']?.[_0x473009(0x146)])return _0x19d4f6['push'](createIssue(_0x473009(0x166),_0x380ed7+'.with.activation',_0x473009(0x11b),_0x473009(0x185),_0x27a3fc,_0x380ed7)),_0x19d4f6;const _0x562be5=_0x211ac4[_0x473009(0x118)][_0x473009(0x146)];return _0x27a3fc[_0x473009(0x197)]&&!_0x562be5[_0x473009(0x157)](_0x473009(0x148))&&(!_0x27a3fc[_0x473009(0x197)][_0x473009(0x11d)](_0x562be5)&&_0x19d4f6['push'](createIssue(_0x473009(0x166),_0x380ed7+_0x473009(0x1a1),_0x473009(0x164),'Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x562be5+_0x473009(0x12f),_0x27a3fc))),_0x19d4f6;}function validateDecisionPointStep(_0x5d4bf9,_0x4ce09b,_0x5dfb39,_0x36f628){const _0x54de00=a150_0x1362,_0x3e59f2=[];if(!_0x5d4bf9[_0x54de00(0x118)]?.[_0x54de00(0x160)]||_0x5d4bf9[_0x54de00(0x118)][_0x54de00(0x160)][_0x54de00(0x16b)]===0x0)return _0x3e59f2[_0x54de00(0x19c)](createIssue('error',_0x4ce09b+_0x54de00(0x180),_0x54de00(0x178),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x5dfb39,_0x4ce09b)),_0x3e59f2;for(let _0x38565f=0x0;_0x38565f<_0x5d4bf9[_0x54de00(0x118)][_0x54de00(0x160)][_0x54de00(0x16b)];_0x38565f++){const _0x5e6710=_0x5d4bf9[_0x54de00(0x118)]['branches'][_0x38565f],_0x5899a3=_0x4ce09b+_0x54de00(0x136)+_0x38565f+']';_0x5e6710[_0x54de00(0x174)]&&!_0x5e6710[_0x54de00(0x127)]&&(_0x5dfb39[_0x54de00(0xef)]?.[_0x54de00(0x1a3)](_0x5e6710[_0x54de00(0x174)]),!_0x5e6710['segment'][_0x54de00(0x157)]('ref:')&&(_0x5dfb39[_0x54de00(0x186)]&&!_0x5dfb39[_0x54de00(0x186)][_0x54de00(0x11d)](_0x5e6710[_0x54de00(0x174)])&&_0x3e59f2[_0x54de00(0x19c)](createIssue(_0x54de00(0x166),_0x5899a3+_0x54de00(0x121),_0x54de00(0x128),_0x54de00(0x119)+_0x5e6710[_0x54de00(0x174)]+'\x27',_0x5dfb39))));_0x5e6710['next']&&_0x5dfb39['stepNames']&&!_0x5dfb39[_0x54de00(0x165)][_0x54de00(0x11d)](_0x5e6710[_0x54de00(0x15b)])&&_0x3e59f2[_0x54de00(0x19c)](createIssue(_0x54de00(0x166),_0x5899a3+_0x54de00(0x163),'INVALID_NEXT_REFERENCE',_0x54de00(0x19f)+_0x5e6710[_0x54de00(0x15b)]+'\x27',_0x5dfb39));if(_0x5e6710[_0x54de00(0x15b)]){const _0x415b97=_0x36f628[_0x54de00(0x14a)](_0x5e6710[_0x54de00(0x15b)]);_0x415b97?.[_0x54de00(0x12c)]==='merge'&&_0x3e59f2[_0x54de00(0x19c)](createIssue(_0x54de00(0x14e),_0x5899a3+_0x54de00(0x163),_0x54de00(0x156),_0x54de00(0x16f)+_0x5e6710[_0x54de00(0xf9)]+_0x54de00(0x181)+_0x5e6710[_0x54de00(0x15b)]+_0x54de00(0x100),_0x5dfb39));}}return _0x3e59f2;}function validateAbTestStep(_0x388268,_0x18e270,_0x2e6588,_0x2548e2){const _0x43d938=a150_0x1362,_0x339737=[];if(!_0x388268[_0x43d938(0x118)]?.[_0x43d938(0x12b)]||_0x388268['with'][_0x43d938(0x12b)][_0x43d938(0x16b)]===0x0)return _0x339737[_0x43d938(0x19c)](createIssue(_0x43d938(0x166),_0x18e270+_0x43d938(0x1a2),_0x43d938(0x178),_0x43d938(0x199),_0x2e6588,_0x18e270)),_0x339737;const _0x145608=_0x388268[_0x43d938(0x118)][_0x43d938(0x12b)]['reduce']((_0x2b74af,_0x1a06dd)=>_0x2b74af+(_0x1a06dd[_0x43d938(0x131)]||0x0),0x0);Math[_0x43d938(0x140)](_0x145608-0x64)>0.01&&_0x339737[_0x43d938(0x19c)](createIssue(_0x43d938(0x166),_0x18e270+'.with.variants',_0x43d938(0x190),_0x43d938(0x152)+_0x145608+'%)',_0x2e6588));for(let _0x3f2a29=0x0;_0x3f2a29<_0x388268['with'][_0x43d938(0x12b)][_0x43d938(0x16b)];_0x3f2a29++){const _0xe359d3=_0x388268[_0x43d938(0x118)][_0x43d938(0x12b)][_0x3f2a29],_0xd7111d=_0x18e270+'.with.variants['+_0x3f2a29+']';_0xe359d3[_0x43d938(0x15b)]&&_0x2e6588['stepNames']&&!_0x2e6588[_0x43d938(0x165)][_0x43d938(0x11d)](_0xe359d3['next'])&&_0x339737['push'](createIssue(_0x43d938(0x166),_0xd7111d+'.next','INVALID_NEXT_REFERENCE',_0x43d938(0x14c)+_0xe359d3['next']+'\x27',_0x2e6588));if(_0xe359d3[_0x43d938(0x15b)]){const _0x183837=_0x2548e2[_0x43d938(0x14a)](_0xe359d3[_0x43d938(0x15b)]);_0x183837?.[_0x43d938(0x12c)]===_0x43d938(0x101)&&_0x339737[_0x43d938(0x19c)](createIssue('warning',_0xd7111d+_0x43d938(0x163),_0x43d938(0x156),_0x43d938(0x15a)+_0xe359d3[_0x43d938(0xf9)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0xe359d3[_0x43d938(0x15b)]+_0x43d938(0x100),_0x2e6588));}}return _0x339737;}function validateJumpStep(_0x386146,_0x5f10e1,_0x1d6b3c){const _0x4a24b1=a150_0x1362,_0x2a831b=[];if(!_0x386146[_0x4a24b1(0x118)]?.[_0x4a24b1(0x18c)])return _0x2a831b[_0x4a24b1(0x19c)](createIssue(_0x4a24b1(0x166),_0x5f10e1+_0x4a24b1(0x183),'INVALID_JUMP_TARGET',_0x4a24b1(0x110),_0x1d6b3c,_0x5f10e1)),_0x2a831b;return(!_0x386146[_0x4a24b1(0x118)][_0x4a24b1(0x18c)][_0x4a24b1(0x17a)]||!_0x386146[_0x4a24b1(0x118)]['target'][_0x4a24b1(0x196)])&&_0x2a831b[_0x4a24b1(0x19c)](createIssue('error',_0x5f10e1+_0x4a24b1(0x183),_0x4a24b1(0x144),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x1d6b3c)),_0x2a831b;}function a150_0x1362(_0x1e31d7,_0x361c40){_0x1e31d7=_0x1e31d7-0xed;const _0x2ded0d=a150_0x2ded();let _0x1362fb=_0x2ded0d[_0x1e31d7];return _0x1362fb;}function buildConvergenceMap(_0x520848){const _0xccb713=a150_0x1362,_0x4fe245=new Map();function _0x20b11f(_0x1b6c9c,_0x47a17b){const _0x4fd92d=a150_0x1362,_0x18d5bd=_0x4fe245['get'](_0x1b6c9c)||[];_0x18d5bd[_0x4fd92d(0x19c)](_0x47a17b),_0x4fe245[_0x4fd92d(0x11e)](_0x1b6c9c,_0x18d5bd);}for(const _0x4ac696 of _0x520848){_0x4ac696[_0xccb713(0x15b)]&&_0x20b11f(_0x4ac696['next'],{'stepName':_0x4ac696[_0xccb713(0xf9)],'description':'step\x20\x27'+_0x4ac696[_0xccb713(0xf9)]+'\x27'});if(_0x4ac696['type']==='decision_point'&&_0x4ac696[_0xccb713(0x118)]?.[_0xccb713(0x160)])for(const _0x18990a of _0x4ac696[_0xccb713(0x118)][_0xccb713(0x160)]){_0x18990a[_0xccb713(0x15b)]&&_0x20b11f(_0x18990a[_0xccb713(0x15b)],{'stepName':_0x4ac696['name'],'description':_0xccb713(0xff)+_0x18990a[_0xccb713(0xf9)]+_0xccb713(0x19a)+_0x4ac696[_0xccb713(0xf9)]+'\x27'});}if(_0x4ac696[_0xccb713(0x12c)]===_0xccb713(0x198)&&_0x4ac696[_0xccb713(0x118)]?.['variants'])for(const _0x194f3f of _0x4ac696['with']['variants']){_0x194f3f[_0xccb713(0x15b)]&&_0x20b11f(_0x194f3f[_0xccb713(0x15b)],{'stepName':_0x4ac696['name'],'description':_0xccb713(0x155)+_0x194f3f['name']+_0xccb713(0x19a)+_0x4ac696['name']+'\x27'});}_0x4ac696[_0xccb713(0x12c)]===_0xccb713(0x10b)&&_0x4ac696['with']?.[_0xccb713(0x13b)]&&(_0x4ac696['with'][_0xccb713(0x13b)][_0xccb713(0x15b)]&&_0x20b11f(_0x4ac696[_0xccb713(0x118)][_0xccb713(0x13b)][_0xccb713(0x15b)],{'stepName':_0x4ac696['name'],'description':'condition\x20of\x20\x27'+_0x4ac696[_0xccb713(0xf9)]+'\x27'}),_0x4ac696['with'][_0xccb713(0x13b)][_0xccb713(0x169)]?.['next']&&_0x20b11f(_0x4ac696[_0xccb713(0x118)][_0xccb713(0x13b)][_0xccb713(0x169)]['next'],{'stepName':_0x4ac696[_0xccb713(0xf9)],'description':'timeout\x20of\x20\x27'+_0x4ac696[_0xccb713(0xf9)]+'\x27'}));}return _0x4fe245;}function validateFlowControl(_0xbee48c,_0xd3de3f,_0x426d7){const _0x5b0258=a150_0x1362,_0x36b601=[],_0x313708=_0x5b0258(0x17d)+_0xd3de3f+']',_0x246bb5=_0xbee48c[_0x5b0258(0x109)]||[];if(_0x246bb5[_0x5b0258(0x16b)]===0x0)return _0x36b601;const _0x27e22c=new Map();for(const _0xd39041 of _0x246bb5){_0xd39041[_0x5b0258(0xf9)]&&_0x27e22c['set'](_0xd39041[_0x5b0258(0xf9)],_0xd39041);}const _0x4ec495=buildConvergenceMap(_0x246bb5),_0x1dff3a=_0x246bb5['some'](_0x357c58=>_0x357c58[_0x5b0258(0x12c)]===_0x5b0258(0x177));!_0x1dff3a&&_0x36b601[_0x5b0258(0x19c)](createIssue(_0x5b0258(0x166),_0x313708+_0x5b0258(0x111),_0x5b0258(0x105),_0x5b0258(0x176)+_0xbee48c['name']+_0x5b0258(0x12d),_0x426d7));for(const [_0x3db408,_0x1719b6]of _0x4ec495){const _0x3627be=_0x27e22c[_0x5b0258(0x14a)](_0x3db408);if(!_0x3627be)continue;if(_0x1719b6[_0x5b0258(0x16b)]>0x1&&_0x3627be[_0x5b0258(0x12c)]!==_0x5b0258(0x101)){const _0x11da4b=_0x1719b6[_0x5b0258(0x12e)](_0x283c67=>_0x283c67[_0x5b0258(0x10e)])[_0x5b0258(0x191)](',\x20');_0x36b601['push'](createIssue('error',_0x313708+'.steps',_0x5b0258(0x107),'Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27'+_0x3db408+_0x5b0258(0x172)+_0x11da4b+_0x5b0258(0x104),_0x426d7));}_0x1719b6['length']===0x1&&_0x3627be[_0x5b0258(0x12c)]===_0x5b0258(0x101)&&_0x36b601[_0x5b0258(0x19c)](createIssue(_0x5b0258(0x14e),_0x313708+_0x5b0258(0x111),_0x5b0258(0xf2),_0x5b0258(0x15f)+_0x3db408+_0x5b0258(0x113)+_0x1719b6[0x0][_0x5b0258(0x10e)]+_0x5b0258(0x167),_0x426d7));}for(const _0x3798c1 of _0x246bb5){if(_0x3798c1['type']==='merge'&&_0x3798c1['next']){const _0x2bf728=_0x27e22c['get'](_0x3798c1['next']);_0x2bf728?.[_0x5b0258(0x12c)]===_0x5b0258(0x101)&&_0x36b601[_0x5b0258(0x19c)](createIssue(_0x5b0258(0x166),_0x313708+'.steps',_0x5b0258(0x13c),_0x5b0258(0x15f)+_0x3798c1[_0x5b0258(0xf9)]+_0x5b0258(0xfb)+_0x3798c1[_0x5b0258(0x15b)]+_0x5b0258(0x134),_0x426d7));}}return _0x36b601;}function validateCriteria(_0x59d142,_0x4700ca,_0x232388){const _0x30f47c=a150_0x1362,_0xea67d3=[];return _0x59d142[_0x30f47c(0x174)]&&(_0x232388[_0x30f47c(0xef)]?.[_0x30f47c(0x1a3)](_0x59d142[_0x30f47c(0x174)]),!_0x59d142[_0x30f47c(0x174)][_0x30f47c(0x157)](_0x30f47c(0x148))&&(_0x232388['embeddedSegments']&&!_0x232388['embeddedSegments']['has'](_0x59d142[_0x30f47c(0x174)])&&_0xea67d3[_0x30f47c(0x19c)](createIssue('error',_0x4700ca+_0x30f47c(0x121),_0x30f47c(0x128),'Criteria\x20references\x20undefined\x20segment\x20\x27'+_0x59d142[_0x30f47c(0x174)]+'\x27',_0x232388)))),_0xea67d3;}function validateEmbeddedSegment(_0x1c789c,_0x316a6e,_0x400b59){const _0xd91677=a150_0x1362,_0x1671ba=[];return _0x1c789c['rule']&&_0x1671ba['push'](...validateRuleDef(_0x1c789c[_0xd91677(0x193)],_0x316a6e+_0xd91677(0x173),_0x400b59)),_0x1671ba;}function validateStage(_0x592648,_0x19e8bc,_0x5c45cb,_0x4aa551){const _0x5d1a31=a150_0x1362,_0x244e4e=[],_0x9f3377=_0x5d1a31(0x17d)+_0x19e8bc+']',_0x55bab6=new Map(),_0x346fe0=new Map();if(_0x592648[_0x5d1a31(0x109)]){for(let _0x34ba94=0x0;_0x34ba94<_0x592648[_0x5d1a31(0x109)][_0x5d1a31(0x16b)];_0x34ba94++){const _0x3da570=_0x592648[_0x5d1a31(0x109)][_0x34ba94];_0x3da570['name']&&_0x55bab6['set'](_0x3da570[_0x5d1a31(0xf9)],_0x3da570);}for(let _0x2e8d89=0x0;_0x2e8d89<_0x592648[_0x5d1a31(0x109)][_0x5d1a31(0x16b)];_0x2e8d89++){const _0x588e77=_0x592648[_0x5d1a31(0x109)][_0x2e8d89],_0x3c499b=_0x9f3377+_0x5d1a31(0xf3)+_0x2e8d89+']';if(_0x588e77[_0x5d1a31(0xf9)]){if(_0x346fe0[_0x5d1a31(0x11d)](_0x588e77[_0x5d1a31(0xf9)])){const _0x37c676=_0x346fe0['get'](_0x588e77[_0x5d1a31(0xf9)]);_0x244e4e[_0x5d1a31(0x19c)](createIssue(_0x5d1a31(0x166),_0x3c499b+'.name',_0x5d1a31(0x114),_0x5d1a31(0x162)+_0x588e77[_0x5d1a31(0xf9)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x37c676+'])',_0x4aa551));}else _0x346fe0['set'](_0x588e77[_0x5d1a31(0xf9)],_0x2e8d89);}_0x244e4e['push'](...validateStep(_0x588e77,_0x3c499b,_0x4aa551,_0x55bab6));}}_0x592648['entry_criteria']&&_0x244e4e[_0x5d1a31(0x19c)](...validateCriteria(_0x592648[_0x5d1a31(0x138)],_0x9f3377+_0x5d1a31(0xf7),_0x4aa551));if(_0x592648['exit_criteria'])for(let _0x31ace9=0x0;_0x31ace9<_0x592648['exit_criteria']['length'];_0x31ace9++){_0x244e4e[_0x5d1a31(0x19c)](...validateCriteria(_0x592648[_0x5d1a31(0x10a)][_0x31ace9],_0x9f3377+_0x5d1a31(0x123)+_0x31ace9+']',_0x4aa551));}return _0x592648[_0x5d1a31(0x192)]&&_0x244e4e[_0x5d1a31(0x19c)](...validateCriteria(_0x592648[_0x5d1a31(0x192)],_0x9f3377+_0x5d1a31(0x195),_0x4aa551)),_0x244e4e[_0x5d1a31(0x19c)](...validateStageStructure(_0x592648,_0x19e8bc,_0x5c45cb,_0x4aa551)),_0x244e4e[_0x5d1a31(0x19c)](...validateFlowControl(_0x592648,_0x19e8bc,_0x4aa551)),_0x244e4e;}function validateStagesForVersion(_0x2d7afb,_0x406df4,_0x36ba4f,_0x22401c,_0x318c4e,_0x1851b0,_0x2711a6){const _0x1508f5=a150_0x1362;if(_0x2d7afb[_0x1508f5(0x16b)]===0x0){_0x318c4e[_0x1508f5(0x19c)]({'level':_0x1508f5(0x166),'path':_0x22401c+'stages','code':_0x1508f5(0x12a),'message':_0x1508f5(0x124),'location':getLocationFromPath(_0x36ba4f['document'],_0x36ba4f['source'],[_0x1508f5(0x151)])});return;}const _0x4311a5=new Set();for(const _0xf847eb of _0x2d7afb){if(_0xf847eb[_0x1508f5(0x109)])for(const _0x1bc96d of _0xf847eb[_0x1508f5(0x109)]){_0x1bc96d[_0x1508f5(0xf9)]&&_0x4311a5[_0x1508f5(0x1a3)](_0x1bc96d['name']);}}const _0x5639fd={..._0x36ba4f,'stepNames':_0x4311a5},_0x46a946=validateVersionStructure(_0x2d7afb,_0x5639fd);for(const _0x2a5536 of _0x46a946){const _0x2f6b66=_0x22401c?{..._0x2a5536,'path':''+_0x22401c+_0x2a5536['path']}:_0x2a5536;if(_0x2f6b66[_0x1508f5(0xfc)]===_0x1508f5(0x166))_0x318c4e[_0x1508f5(0x19c)](_0x2f6b66);else _0x1851b0[_0x1508f5(0x19c)](_0x2f6b66);}for(let _0x52d473=0x0;_0x52d473<_0x2d7afb['length'];_0x52d473++){const _0x24b436=validateStage(_0x2d7afb[_0x52d473],_0x52d473,_0x2d7afb[_0x1508f5(0x16b)],_0x5639fd);for(const _0x33883b of _0x24b436){const _0x24ad4e=_0x22401c?{..._0x33883b,'path':''+_0x22401c+_0x33883b[_0x1508f5(0x108)]}:_0x33883b;if(_0x24ad4e[_0x1508f5(0xfc)]==='error')_0x318c4e[_0x1508f5(0x19c)](_0x24ad4e);else _0x1851b0[_0x1508f5(0x19c)](_0x24ad4e);}}if(_0x406df4[_0x1508f5(0x16a)]){const _0x5c4852=_0x2711a6?.[_0x1508f5(0x142)]?_0x1508f5(0x16a):_0x22401c+'goal',_0x5e79b3=validateCriteria(_0x406df4[_0x1508f5(0x16a)],_0x5c4852,_0x5639fd);for(const _0x314f1b of _0x5e79b3){if(_0x314f1b[_0x1508f5(0xfc)]===_0x1508f5(0x166))_0x318c4e[_0x1508f5(0x19c)](_0x314f1b);else _0x1851b0[_0x1508f5(0x19c)](_0x314f1b);}}}function extractVersionIndex(_0x26b747){const _0x7828c3=a150_0x1362,_0xfdf99f=_0x26b747[_0x7828c3(0x112)](/^journeys\[(\d+)\]\./);return _0xfdf99f?_0xfdf99f[0x1]:undefined;}function deduplicateAcrossVersions(_0x336d1e){const _0x17ee97=a150_0x1362,_0x3667c8=new Map();for(let _0x2cdf3d=0x0;_0x2cdf3d<_0x336d1e[_0x17ee97(0x16b)];_0x2cdf3d++){const _0x4efb4d=_0x336d1e[_0x2cdf3d][_0x17ee97(0x10c)]+':'+_0x336d1e[_0x2cdf3d]['message'],_0x2d4112=extractVersionIndex(_0x336d1e[_0x2cdf3d][_0x17ee97(0x108)]),_0xecb493=_0x3667c8[_0x17ee97(0x14a)](_0x4efb4d);if(_0xecb493){_0xecb493[_0x17ee97(0x120)][_0x17ee97(0x19c)](_0x2cdf3d);if(_0x2d4112)_0xecb493[_0x17ee97(0x187)][_0x17ee97(0x1a3)](_0x2d4112);}else _0x3667c8[_0x17ee97(0x11e)](_0x4efb4d,{'indices':[_0x2cdf3d],'versions':new Set(_0x2d4112?[_0x2d4112]:[])});}const _0x40dbd9=new Set();for(const {indices:_0xb9a080,versions:_0xb53487}of _0x3667c8['values']()){if(_0xb53487[_0x17ee97(0x122)]<=0x1)continue;const _0x13a15b=_0x336d1e[_0xb9a080[0x0]];_0x13a15b['path']=_0x13a15b['path'][_0x17ee97(0x194)](/^journeys\[\d+\]\./,''),_0x13a15b[_0x17ee97(0x137)]=_0x13a15b[_0x17ee97(0x137)]+_0x17ee97(0x159)+_0xb53487[_0x17ee97(0x122)]+'\x20versions)';for(let _0x3459e4=0x1;_0x3459e4<_0xb9a080[_0x17ee97(0x16b)];_0x3459e4++){_0x40dbd9[_0x17ee97(0x1a3)](_0xb9a080[_0x3459e4]);}}const _0x4f9d94=[..._0x40dbd9][_0x17ee97(0x145)]((_0x3833a3,_0x5a6092)=>_0x5a6092-_0x3833a3);for(const _0x84c59d of _0x4f9d94){_0x336d1e['splice'](_0x84c59d,0x1);}}function a150_0x2ded(){const _0x495dac=['condition','MERGE_TO_MERGE_CHAIN','.with','Journey\x20has\x20','154ZGNIKf','abs','206630tfPbwT','goalIsInherited','174104aUQIXE','INVALID_JUMP_TARGET','sort','activation','END_STEP_HAS_NEXT_OR_WITH','ref:','\x27\x20has\x20no\x20steps','get','DUPLICATE_LATEST','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','1161612XoyAdw','warning','\x20steps\x20(may\x20be\x20too\x20simple)','MISSING_WAIT_PARAMS','stages','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','activations','journeys','variant\x20\x27','BRANCH_DIRECTLY_TO_MERGE','startsWith','keys','\x20(across\x20','A/B\x20test\x20variant\x20\x27','next','Step\x20references\x20non-existent\x20step\x20\x27','.with.condition.timeout','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','Merge\x20step\x20\x27','branches','Journey\x20has\x20no\x20goal\x20defined','Duplicate\x20step\x20name\x20\x27','.next','MISSING_ACTIVATION_DEFINITION','stepNames','error',').\x20Merge\x20is\x20unnecessary.','.exit_criteria','timeout','goal','length','INVALID_NEXT_REFERENCE','excluded_','every','Decision\x20branch\x20\x27','FEW_STEPS','source','\x27\x20(from:\x20','.rule','segment','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','Stage\x20\x27','end','MISSING_CONDITIONS','End\x20step\x20\x27','journey','.with.condition.segment','MISSING_NAME','stages[','MISSING_GOAL','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.branches','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','segments.','.with.target','journey\x20entry','Activation\x20step\x20requires\x20an\x20activation\x20reference','embeddedSegments','versions','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','MISSING_EXIT_CRITERIA','target','1966408XGeiTU','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','trim','INVALID_AB_TEST_PERCENTAGES','join','milestone','rule','replace','.milestone','stage','activationKeys','ab_test','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','\x27\x20of\x20\x27','212388xmcYNv','push','UNUSED_EMBEDDED_SEGMENT','journeys,\x20stages,\x20or\x20versions','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','versions[','.with.activation','.with.variants','add','launched','success','endsWith','referencedSegments','Journey\x20name\x20is\x20required','entries','SINGLE_INPUT_MERGE','.steps[','489839gbzHCh','issues','TOO_MANY_STAGES','.entry_criteria','version','name','decision_point','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','level','JOURNEY_SCHEMA_ERROR','document','branch\x20\x27','\x27\x20with\x20no\x20action\x20in\x20between','merge','.stages','\x27\x20has\x20only\x20',').\x20Use\x20a\x20merge\x20step.','MISSING_END_STEP','state','CONVERGENCE_WITHOUT_MERGE','path','steps','exit_criteria','wait','code','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','description','jump','Jump\x20step\x20requires\x20a\x20target','.steps','match','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','DUPLICATE_STEP_NAME','symbol','1600460qozvMh','INSUFFICIENT_STEPS','with','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','data','MISSING_ACTIVATION_REF','filter','has','set','journeys[','indices','.segment','size','.exit_criteria[','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','.with.condition.timeout.next','latest','excluded','MISSING_SEGMENT_REFERENCE','segments','MISSING_STAGES','variants','type','\x27\x20has\x20no\x20end\x20step','map','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','percentage','includes','MISSING_ENTRY_CRITERIA','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.with.branches[','message','entry_criteria','safeParse','.with.condition.next'];a150_0x2ded=function(){return _0x495dac;};return a150_0x2ded();}export function validateJourneyDef(_0x5eb6c0,_0x5b3256={},_0x2c55d1={}){const _0x3417c5=a150_0x1362;if(_0x2c55d1['skipSchema'])return runJourneySemanticChecks(_0x5eb6c0,_0x5b3256);const _0x5c9162=JourneyDefSchema[_0x3417c5(0x139)](_0x5eb6c0);if(_0x5c9162[_0x3417c5(0xed)])return runJourneySemanticChecks(_0x5c9162[_0x3417c5(0x11a)],_0x5b3256);return zodErrorsToJourneyValidationResult(_0x5c9162[_0x3417c5(0x166)],_0x5b3256);}function zodErrorsToJourneyValidationResult(_0x1c6cb8,_0x30d3c4){const _0x3389a6=a150_0x1362,_0x16fca0=flattenZodIssues(_0x1c6cb8[_0x3389a6(0xf5)]),_0x568d25=_0x16fca0[_0x3389a6(0x12e)](_0x26f05b=>{const _0x193b14=_0x3389a6,_0x5b197a=formatZodPath(_0x26f05b[_0x193b14(0x108)]),_0x3c6f68=mapJourneyZodIssueToCode(_0x26f05b,_0x5b197a),_0x1d0a91=getLocationFromPath(_0x30d3c4[_0x193b14(0xfe)],_0x30d3c4['source'],_0x26f05b[_0x193b14(0x108)][_0x193b14(0x12e)](_0x210316=>typeof _0x210316===_0x193b14(0x115)?String(_0x210316):_0x210316));return{'level':_0x193b14(0x166),'path':_0x5b197a,'code':_0x3c6f68,'message':_0x26f05b[_0x193b14(0x137)],..._0x1d0a91&&{'location':_0x1d0a91}};});return{'valid':![],'errors':_0x568d25,'warnings':[]};}function mapJourneyZodIssueToCode(_0x119568,_0x1d9a4a){const _0x441d7d=a150_0x1362;if(_0x1d9a4a===_0x441d7d(0xf9))return _0x441d7d(0x17c);if(_0x1d9a4a['endsWith']('.type')&&_0x1d9a4a[_0x441d7d(0x132)](_0x441d7d(0x109)))return'JOURNEY_SCHEMA_ERROR';if(_0x1d9a4a==='stages'||_0x1d9a4a[_0x441d7d(0xee)](_0x441d7d(0x102)))return _0x441d7d(0x12a);if(_0x1d9a4a===''&&_0x119568[_0x441d7d(0x137)][_0x441d7d(0x132)](_0x441d7d(0x19e)))return _0x441d7d(0x12a);if(_0x1d9a4a[_0x441d7d(0x132)](_0x441d7d(0x146)))return'ACTIVATION_SCHEMA_ERROR';return _0x441d7d(0xfd);}function runJourneySemanticChecks(_0x8e2de9,_0x2761f2){const _0x464fda=a150_0x1362,_0x3489bd=[],_0x490906=[];(!_0x8e2de9[_0x464fda(0xf9)]||_0x8e2de9[_0x464fda(0xf9)][_0x464fda(0x18f)]()==='')&&_0x3489bd[_0x464fda(0x19c)]({'level':_0x464fda(0x166),'path':_0x464fda(0xf9),'code':_0x464fda(0x17c),'message':_0x464fda(0xf0),'location':getLocationFromPath(_0x2761f2['document'],_0x2761f2[_0x464fda(0x171)],[_0x464fda(0xf9)])});const _0x68dbe9=new Set();if(_0x8e2de9[_0x464fda(0x129)])for(const _0xa154b0 of Object['keys'](_0x8e2de9[_0x464fda(0x129)])){_0x68dbe9[_0x464fda(0x1a3)](_0xa154b0);}const _0x2fff74=new Set();if(_0x8e2de9[_0x464fda(0x153)])for(const _0x4fc659 of Object[_0x464fda(0x158)](_0x8e2de9['activations'])){_0x2fff74[_0x464fda(0x1a3)](_0x4fc659);}const _0x3697ca=new Set(),_0x3edf3c={..._0x2761f2,'embeddedSegments':_0x68dbe9,'referencedSegments':_0x3697ca,'activationKeys':_0x2fff74[_0x464fda(0x122)]>0x0?_0x2fff74:undefined};if(_0x8e2de9[_0x464fda(0x129)])for(const [_0x4b13bd,_0x8462da]of Object[_0x464fda(0xf1)](_0x8e2de9[_0x464fda(0x129)])){const _0x5957b9=validateEmbeddedSegment(_0x8462da,_0x464fda(0x182)+_0x4b13bd,_0x3edf3c);for(const _0x5e3036 of _0x5957b9){if(_0x5e3036['level']===_0x464fda(0x166))_0x3489bd[_0x464fda(0x19c)](_0x5e3036);else _0x490906[_0x464fda(0x19c)](_0x5e3036);}}const _0x122b3d=!!_0x8e2de9[_0x464fda(0x16a)],_0x14c384=_0x8e2de9[_0x464fda(0x154)]?.[_0x464fda(0x16e)](_0x43f6a8=>!!_0x43f6a8[_0x464fda(0x16a)])??![];!_0x122b3d&&!_0x14c384&&_0x490906[_0x464fda(0x19c)]({'level':_0x464fda(0x14e),'path':_0x464fda(0x16a),'code':_0x464fda(0x17e),'message':_0x464fda(0x161),'location':getLocationFromPath(_0x2761f2['document'],_0x2761f2[_0x464fda(0x171)],['goal'])});const _0x38976d=_0x8e2de9[_0x464fda(0x154)]??_0x8e2de9[_0x464fda(0x187)];if(_0x38976d&&_0x38976d[_0x464fda(0x11c)](_0x5a4f77=>_0x5a4f77[_0x464fda(0x126)]===!![])[_0x464fda(0x16b)]>0x1){const _0x48d2a4=_0x8e2de9[_0x464fda(0x154)]?_0x464fda(0x154):'versions';_0x3489bd[_0x464fda(0x19c)]({'level':'error','path':_0x48d2a4,'code':_0x464fda(0x14b),'message':'Journey\x20can\x20have\x20at\x20most\x20one\x20'+(_0x48d2a4===_0x464fda(0x154)?_0x464fda(0x184):_0x464fda(0xf8))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0x2761f2[_0x464fda(0xfe)],_0x2761f2[_0x464fda(0x171)],[_0x48d2a4])});}if(_0x8e2de9['journeys']&&_0x8e2de9['journeys']['length']>0x0)for(let _0x42eea4=0x0;_0x42eea4<_0x8e2de9['journeys'][_0x464fda(0x16b)];_0x42eea4++){const _0x419257=_0x8e2de9['journeys'][_0x42eea4];if(_0x8e2de9[_0x464fda(0x154)][_0x464fda(0x16b)]>0x1&&_0x419257[_0x464fda(0x106)]===_0x464fda(0x1a4))continue;const _0x566f1a=_0x419257['stages']||[],_0x5f4a4c=_0x464fda(0x11f)+_0x42eea4+'].',_0x54c878=!!_0x419257[_0x464fda(0x16a)],_0x30d7f6=_0x54c878?{..._0x8e2de9,'goal':_0x419257[_0x464fda(0x16a)]}:_0x8e2de9;validateStagesForVersion(_0x566f1a,_0x30d7f6,_0x3edf3c,_0x5f4a4c,_0x3489bd,_0x490906,{'goalIsInherited':!_0x54c878});}else{if(_0x8e2de9[_0x464fda(0x187)]&&_0x8e2de9[_0x464fda(0x187)]['length']>0x0)for(let _0x23c32f=0x0;_0x23c32f<_0x8e2de9['versions']['length'];_0x23c32f++){const _0x2b93fa=_0x8e2de9[_0x464fda(0x187)][_0x23c32f];if(_0x8e2de9[_0x464fda(0x187)]['length']>0x1&&_0x2b93fa['state']===_0x464fda(0x1a4))continue;const _0x2c5f92=_0x2b93fa['stages']||[],_0x1aecaa=_0x464fda(0x1a0)+_0x23c32f+'].';validateStagesForVersion(_0x2c5f92,_0x8e2de9,_0x3edf3c,_0x1aecaa,_0x3489bd,_0x490906);}else{const _0x5e681b=_0x8e2de9[_0x464fda(0x151)]||[];validateStagesForVersion(_0x5e681b,_0x8e2de9,_0x3edf3c,'',_0x3489bd,_0x490906);}}_0x8e2de9[_0x464fda(0x154)]&&_0x8e2de9[_0x464fda(0x154)][_0x464fda(0x16b)]>0x1&&(deduplicateAcrossVersions(_0x3489bd),deduplicateAcrossVersions(_0x490906));for(const _0x5b452b of _0x68dbe9){!_0x3697ca[_0x464fda(0x11d)](_0x5b452b)&&!_0x5b452b['startsWith'](_0x464fda(0x16d))&&_0x490906[_0x464fda(0x19c)]({'level':_0x464fda(0x14e),'path':_0x464fda(0x182)+_0x5b452b,'code':_0x464fda(0x19d),'message':'Embedded\x20segment\x20\x27'+_0x5b452b+_0x464fda(0x15e),'location':getLocationFromPath(_0x2761f2[_0x464fda(0xfe)],_0x2761f2['source'],[_0x464fda(0x129),_0x5b452b])});}return{'valid':_0x3489bd[_0x464fda(0x16b)]===0x0,'errors':_0x3489bd,'warnings':_0x490906};}
1
+ (function(_0xd4ed20,_0x3d931a){const _0x302c83=a153_0x37f8,_0x31015b=_0xd4ed20();while(!![]){try{const _0x2be57d=parseInt(_0x302c83(0x1fd))/0x1+-parseInt(_0x302c83(0x1c1))/0x2+parseInt(_0x302c83(0x212))/0x3+-parseInt(_0x302c83(0x217))/0x4*(-parseInt(_0x302c83(0x25c))/0x5)+parseInt(_0x302c83(0x23c))/0x6+parseInt(_0x302c83(0x24d))/0x7*(-parseInt(_0x302c83(0x24e))/0x8)+-parseInt(_0x302c83(0x269))/0x9;if(_0x2be57d===_0x3d931a)break;else _0x31015b['push'](_0x31015b['shift']());}catch(_0x20fc4b){_0x31015b['push'](_0x31015b['shift']());}}}(a153_0x1f06,0x79540));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function a153_0x1f06(){const _0x2832a1=['MISSING_ACTIVATION_DEFINITION','decision_point','segment','MISSING_SEGMENT_REFERENCE','.with.condition.next','.exit_criteria[','\x20stages\x20but\x20maximum\x20is\x20','merge','.segment','trim','1023584WBZnvD','get','.with.target','endsWith','sort','\x27\x20has\x20no\x20exit_criteria\x20defined','size','stage','TOO_MANY_STAGES','condition','.name','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','A/B\x20test\x20variant\x20\x27','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','name','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','exit_criteria','.with.condition.timeout.next','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','.next','variants','MISSING_ENTRY_CRITERIA','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','MISSING_END_STEP','\x27\x20has\x20no\x20end\x20step','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','INSUFFICIENT_STEPS','versions','Merge\x20step\x20\x27','path','state','issues','splice','steps','\x27\x20of\x20\x27','level','goalIsInherited','end','Journey\x20has\x20','activation','values','End\x20step\x20\x27','safeParse','.with.condition.timeout','MISSING_NAME','.entry_criteria','SINGLE_INPUT_MERGE','error','JOURNEY_SCHEMA_ERROR','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','segments','variant\x20\x27','embeddedSegments','ab_test','segments.','MISSING_STAGES','.steps[','journeys','375486JEnLCd','\x27\x20has\x20no\x20steps','add','has','with','stepNames','BRANCH_DIRECTLY_TO_MERGE','MISSING_MILESTONE','timeout\x20of\x20\x27','warning',').\x20Use\x20a\x20merge\x20step.','jump','source','MERGE_TO_MERGE_CHAIN','Stage\x20\x27','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','keys','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','push','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','symbol','1815108HNxkIF','activations','.rule','branches','INVALID_NEXT_REFERENCE','1056364lmgvzn','.with.branches[','filter','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','step\x20\x27','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','version','Journey\x20name\x20is\x20required','END_STEP_HAS_NEXT_OR_WITH','DUPLICATE_LATEST','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','\x20versions)','.steps','latest','condition\x20of\x20\x27','document','INVALID_JUMP_TARGET','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','goal','journey','.with.activation','activationKeys','data','entry_criteria','\x20(across\x20','\x27\x20has\x20only\x20','Criteria\x20references\x20undefined\x20segment\x20\x27','target','success','length','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','type','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','ref:','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','rule','description','5247624WFRFJh','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','timeout','skipSchema','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27',').\x20Merge\x20is\x20unnecessary.','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','join','wait','entries','startsWith','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','\x27\x20with\x20no\x20action\x20in\x20between','.with','Embedded\x20segment\x20\x27','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','343CzcXZx','92656hxjKaa','milestone','stages[','versions[','percentage','\x20with\x20latest:\x20true','Activation\x20step\x20requires\x20an\x20activation\x20reference','next','branch\x20\x27','map','.milestone','journey\x20entry','referencedSegments','Duplicate\x20step\x20name\x20\x27','5LVRAjI','.with.variants','MISSING_ACTIVATION_REF','match','.with.branches','abs','message','set','Jump\x20step\x20requires\x20a\x20target','Journey\x20can\x20have\x20at\x20most\x20one\x20','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','code','includes','4886523KOpfkA','Step\x20references\x20non-existent\x20step\x20\x27','\x20steps\x20(may\x20be\x20too\x20simple)','stages'];a153_0x1f06=function(){return _0x2832a1;};return a153_0x1f06();}function createIssue(_0x574e4f,_0x21e9f0,_0x4d020e,_0x541b46,_0x1b9109,_0x4e64e9){const _0x5ce509=a153_0x37f8;return{'level':_0x574e4f,'path':_0x21e9f0,'code':_0x4d020e,'message':_0x541b46,'location':getLocationFromPath(_0x1b9109[_0x5ce509(0x226)],_0x1b9109[_0x5ce509(0x209)],pathToArray(_0x4e64e9??_0x21e9f0))};}function validateVersionStructure(_0x326c63,_0x345a7b){const _0x4b2f71=a153_0x37f8,_0x4eb06f=[];return _0x326c63['length']>MAX_STAGES&&_0x4eb06f[_0x4b2f71(0x20f)](createIssue(_0x4b2f71(0x1f1),'stages',_0x4b2f71(0x1c9),_0x4b2f71(0x1e8)+_0x326c63[_0x4b2f71(0x234)]+_0x4b2f71(0x1bd)+MAX_STAGES,_0x345a7b)),_0x4eb06f;}function validateStageStructure(_0x52f2fd,_0x349827,_0x1c2a2f,_0x302210){const _0x4143e7=a153_0x37f8,_0x1c0528=[],_0x5c5c8d=_0x4143e7(0x250)+_0x349827+']';_0x349827===0x0&&!_0x52f2fd['entry_criteria']&&_0x1c0528['push'](createIssue(_0x4143e7(0x1f1),_0x5c5c8d+_0x4143e7(0x1ef),_0x4143e7(0x1d7),'Stage\x20\x27'+_0x52f2fd[_0x4143e7(0x1cf)]+_0x4143e7(0x21a),_0x302210,_0x5c5c8d));const _0x1ffaf9=_0x349827===_0x1c2a2f-0x1;!_0x1ffaf9&&!_0x52f2fd['milestone']&&_0x1c0528[_0x4143e7(0x20f)](createIssue(_0x4143e7(0x1f1),_0x5c5c8d+_0x4143e7(0x258),_0x4143e7(0x204),'Stage\x20\x27'+_0x52f2fd[_0x4143e7(0x1cf)]+_0x4143e7(0x1d3),_0x302210,_0x5c5c8d));(!_0x52f2fd[_0x4143e7(0x1d1)]||_0x52f2fd['exit_criteria'][_0x4143e7(0x234)]===0x0)&&_0x1c0528[_0x4143e7(0x20f)](createIssue(_0x4143e7(0x206),_0x5c5c8d+'.exit_criteria','MISSING_EXIT_CRITERIA',_0x4143e7(0x20b)+_0x52f2fd[_0x4143e7(0x1cf)]+_0x4143e7(0x1c6),_0x302210,_0x5c5c8d));const _0x313052=_0x52f2fd[_0x4143e7(0x1e3)]?.[_0x4143e7(0x234)]??0x0;if(_0x313052===0x0)_0x1c0528['push'](createIssue(_0x4143e7(0x1f1),_0x5c5c8d+_0x4143e7(0x223),_0x4143e7(0x1dc),_0x4143e7(0x20b)+_0x52f2fd['name']+_0x4143e7(0x1fe),_0x302210,_0x5c5c8d+'.steps'));else{if(_0x313052===0x1)_0x1c0528[_0x4143e7(0x20f)](createIssue(_0x4143e7(0x206),_0x5c5c8d+_0x4143e7(0x223),_0x4143e7(0x1dc),'Stage\x20\x27'+_0x52f2fd['name']+_0x4143e7(0x235),_0x302210,_0x5c5c8d+_0x4143e7(0x223)));else _0x313052<=0x3&&_0x1c0528[_0x4143e7(0x20f)](createIssue('warning',_0x5c5c8d+'.steps','FEW_STEPS','Stage\x20\x27'+_0x52f2fd[_0x4143e7(0x1cf)]+_0x4143e7(0x230)+_0x313052+_0x4143e7(0x26b),_0x302210,_0x5c5c8d+'.steps'));}return _0x1c0528;}function validateStep(_0x38990b,_0x1f0354,_0x45de39,_0x202219){const _0x259032=a153_0x37f8,_0x1a4bfd=[];if(_0x38990b[_0x259032(0x236)]===_0x259032(0x1e7))return _0x38990b[_0x259032(0x255)]&&_0x1a4bfd[_0x259032(0x20f)](createIssue(_0x259032(0x1f1),_0x1f0354+_0x259032(0x1d5),_0x259032(0x21f),_0x259032(0x1eb)+_0x38990b[_0x259032(0x1cf)]+_0x259032(0x1d4),_0x45de39)),'with'in _0x38990b&&_0x38990b['with']!==undefined&&_0x1a4bfd[_0x259032(0x20f)](createIssue(_0x259032(0x1f1),_0x1f0354+_0x259032(0x24a),_0x259032(0x21f),_0x259032(0x1eb)+_0x38990b[_0x259032(0x1cf)]+_0x259032(0x266),_0x45de39)),_0x1a4bfd;_0x38990b['next']&&(_0x45de39['stepNames']&&!_0x45de39[_0x259032(0x202)]['has'](_0x38990b[_0x259032(0x255)])&&_0x1a4bfd[_0x259032(0x20f)](createIssue('error',_0x1f0354+'.next','INVALID_NEXT_REFERENCE',_0x259032(0x26a)+_0x38990b[_0x259032(0x255)]+'\x27',_0x45de39)));switch(_0x38990b['type']){case _0x259032(0x245):_0x1a4bfd[_0x259032(0x20f)](...validateWaitStep(_0x38990b,_0x1f0354,_0x45de39,_0x202219));break;case _0x259032(0x1e9):_0x1a4bfd[_0x259032(0x20f)](...validateActivationStep(_0x38990b,_0x1f0354,_0x45de39));break;case _0x259032(0x26e):_0x1a4bfd['push'](...validateDecisionPointStep(_0x38990b,_0x1f0354,_0x45de39,_0x202219));break;case _0x259032(0x1f8):_0x1a4bfd[_0x259032(0x20f)](...validateAbTestStep(_0x38990b,_0x1f0354,_0x45de39,_0x202219));break;case _0x259032(0x208):_0x1a4bfd[_0x259032(0x20f)](...validateJumpStep(_0x38990b,_0x1f0354,_0x45de39));break;}return _0x1a4bfd;}function validateWaitStep(_0x32575f,_0x193396,_0x4e9c1a,_0xede64c){const _0x3398f9=a153_0x37f8,_0x3c0755=[];if(!_0x32575f[_0x3398f9(0x201)])return _0x3c0755[_0x3398f9(0x20f)](createIssue(_0x3398f9(0x1f1),_0x193396+_0x3398f9(0x24a),'MISSING_WAIT_PARAMS',_0x3398f9(0x1d0),_0x4e9c1a,_0x193396)),_0x3c0755;if(_0x32575f[_0x3398f9(0x201)][_0x3398f9(0x1ca)]){const _0x138736=_0x32575f[_0x3398f9(0x201)][_0x3398f9(0x1ca)];if(_0x138736[_0x3398f9(0x26f)]){_0x4e9c1a[_0x3398f9(0x25a)]?.['add'](_0x138736['segment']);!_0x138736[_0x3398f9(0x26f)]['startsWith'](_0x3398f9(0x238))&&(_0x4e9c1a['embeddedSegments']&&!_0x4e9c1a['embeddedSegments'][_0x3398f9(0x200)](_0x138736[_0x3398f9(0x26f)])&&_0x3c0755[_0x3398f9(0x20f)](createIssue(_0x3398f9(0x1f1),_0x193396+'.with.condition.segment',_0x3398f9(0x270),_0x3398f9(0x1ce)+_0x138736['segment']+_0x3398f9(0x248),_0x4e9c1a)));_0x138736[_0x3398f9(0x255)]&&_0x4e9c1a[_0x3398f9(0x202)]&&!_0x4e9c1a[_0x3398f9(0x202)][_0x3398f9(0x200)](_0x138736[_0x3398f9(0x255)])&&_0x3c0755[_0x3398f9(0x20f)](createIssue(_0x3398f9(0x1f1),_0x193396+_0x3398f9(0x1bb),'INVALID_NEXT_REFERENCE',_0x3398f9(0x240)+_0x138736['next']+'\x27',_0x4e9c1a));_0x138736[_0x3398f9(0x23e)]?.['next']&&_0x4e9c1a['stepNames']&&!_0x4e9c1a[_0x3398f9(0x202)][_0x3398f9(0x200)](_0x138736[_0x3398f9(0x23e)][_0x3398f9(0x255)])&&_0x3c0755[_0x3398f9(0x20f)](createIssue('error',_0x193396+'.with.condition.timeout.next',_0x3398f9(0x216),'Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27'+_0x138736['timeout'][_0x3398f9(0x255)]+'\x27',_0x4e9c1a));const _0x38f548=_0x138736['next']||_0x32575f[_0x3398f9(0x255)],_0x17465c=_0x138736[_0x3398f9(0x23e)]?.[_0x3398f9(0x255)]||_0x32575f['next'];if(_0x38f548){const _0x1522a=_0xede64c['get'](_0x38f548);_0x1522a?.[_0x3398f9(0x236)]===_0x3398f9(0x1be)&&_0x3c0755[_0x3398f9(0x20f)](createIssue(_0x3398f9(0x206),_0x193396+'.with.condition.next','BRANCH_DIRECTLY_TO_MERGE',_0x3398f9(0x20e)+_0x38f548+_0x3398f9(0x1f3),_0x4e9c1a,_0x193396+'.with.condition'));}if(_0x17465c){const _0x3d7a28=_0xede64c[_0x3398f9(0x1c2)](_0x17465c);_0x3d7a28?.[_0x3398f9(0x236)]===_0x3398f9(0x1be)&&_0x3c0755[_0x3398f9(0x20f)](createIssue(_0x3398f9(0x206),_0x193396+_0x3398f9(0x1d2),_0x3398f9(0x203),_0x3398f9(0x1f4)+_0x17465c+_0x3398f9(0x1f3),_0x4e9c1a,_0x193396+_0x3398f9(0x1ed)));}}}return _0x3c0755;}function validateActivationStep(_0x176f73,_0x3fe5a4,_0x5893e5){const _0x4debc4=a153_0x37f8,_0x21f396=[];if(!_0x176f73['with']?.[_0x4debc4(0x1e9)])return _0x21f396['push'](createIssue(_0x4debc4(0x1f1),_0x3fe5a4+_0x4debc4(0x22b),_0x4debc4(0x25e),_0x4debc4(0x254),_0x5893e5,_0x3fe5a4)),_0x21f396;const _0x4c40d8=_0x176f73[_0x4debc4(0x201)][_0x4debc4(0x1e9)];return _0x5893e5[_0x4debc4(0x22c)]&&!_0x4c40d8[_0x4debc4(0x247)](_0x4debc4(0x238))&&(!_0x5893e5[_0x4debc4(0x22c)][_0x4debc4(0x200)](_0x4c40d8)&&_0x21f396[_0x4debc4(0x20f)](createIssue(_0x4debc4(0x1f1),_0x3fe5a4+_0x4debc4(0x22b),_0x4debc4(0x26d),_0x4debc4(0x23d)+_0x4c40d8+_0x4debc4(0x24c),_0x5893e5))),_0x21f396;}function validateDecisionPointStep(_0x57f949,_0x55391b,_0x161661,_0x2a7608){const _0x53f799=a153_0x37f8,_0x1275cd=[];if(!_0x57f949['with']?.['branches']||_0x57f949[_0x53f799(0x201)][_0x53f799(0x215)]['length']===0x0)return _0x1275cd[_0x53f799(0x20f)](createIssue(_0x53f799(0x1f1),_0x55391b+_0x53f799(0x260),'MISSING_CONDITIONS',_0x53f799(0x20c),_0x161661,_0x55391b)),_0x1275cd;for(let _0x1ca40c=0x0;_0x1ca40c<_0x57f949['with']['branches']['length'];_0x1ca40c++){const _0x2dc03f=_0x57f949['with'][_0x53f799(0x215)][_0x1ca40c],_0x2d62fc=_0x55391b+_0x53f799(0x218)+_0x1ca40c+']';_0x2dc03f['segment']&&!_0x2dc03f['excluded']&&(_0x161661[_0x53f799(0x25a)]?.[_0x53f799(0x1ff)](_0x2dc03f[_0x53f799(0x26f)]),!_0x2dc03f[_0x53f799(0x26f)][_0x53f799(0x247)](_0x53f799(0x238))&&(_0x161661['embeddedSegments']&&!_0x161661[_0x53f799(0x1f7)][_0x53f799(0x200)](_0x2dc03f[_0x53f799(0x26f)])&&_0x1275cd[_0x53f799(0x20f)](createIssue(_0x53f799(0x1f1),_0x2d62fc+_0x53f799(0x1bf),_0x53f799(0x270),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x2dc03f['segment']+'\x27',_0x161661))));_0x2dc03f[_0x53f799(0x255)]&&_0x161661[_0x53f799(0x202)]&&!_0x161661[_0x53f799(0x202)][_0x53f799(0x200)](_0x2dc03f[_0x53f799(0x255)])&&_0x1275cd['push'](createIssue(_0x53f799(0x1f1),_0x2d62fc+'.next',_0x53f799(0x216),_0x53f799(0x21c)+_0x2dc03f[_0x53f799(0x255)]+'\x27',_0x161661));if(_0x2dc03f[_0x53f799(0x255)]){const _0x428ac8=_0x2a7608['get'](_0x2dc03f[_0x53f799(0x255)]);_0x428ac8?.[_0x53f799(0x236)]===_0x53f799(0x1be)&&_0x1275cd[_0x53f799(0x20f)](createIssue(_0x53f799(0x206),_0x2d62fc+_0x53f799(0x1d5),'BRANCH_DIRECTLY_TO_MERGE','Decision\x20branch\x20\x27'+_0x2dc03f['name']+_0x53f799(0x210)+_0x2dc03f[_0x53f799(0x255)]+_0x53f799(0x249),_0x161661));}}return _0x1275cd;}function validateAbTestStep(_0x1d00ed,_0x30fab2,_0x41468d,_0x5c2b64){const _0x6adc9c=a153_0x37f8,_0x3c4d7f=[];if(!_0x1d00ed[_0x6adc9c(0x201)]?.[_0x6adc9c(0x1d6)]||_0x1d00ed[_0x6adc9c(0x201)]['variants'][_0x6adc9c(0x234)]===0x0)return _0x3c4d7f['push'](createIssue(_0x6adc9c(0x1f1),_0x30fab2+_0x6adc9c(0x25d),'MISSING_CONDITIONS',_0x6adc9c(0x237),_0x41468d,_0x30fab2)),_0x3c4d7f;const _0x43278d=_0x1d00ed[_0x6adc9c(0x201)]['variants']['reduce']((_0x629c8e,_0x242b1b)=>_0x629c8e+(_0x242b1b[_0x6adc9c(0x252)]||0x0),0x0);Math[_0x6adc9c(0x261)](_0x43278d-0x64)>0.01&&_0x3c4d7f[_0x6adc9c(0x20f)](createIssue(_0x6adc9c(0x1f1),_0x30fab2+_0x6adc9c(0x25d),'INVALID_AB_TEST_PERCENTAGES',_0x6adc9c(0x242)+_0x43278d+'%)',_0x41468d));for(let _0xc77dd8=0x0;_0xc77dd8<_0x1d00ed[_0x6adc9c(0x201)][_0x6adc9c(0x1d6)][_0x6adc9c(0x234)];_0xc77dd8++){const _0x267e2b=_0x1d00ed[_0x6adc9c(0x201)][_0x6adc9c(0x1d6)][_0xc77dd8],_0x3a93f7=_0x30fab2+'.with.variants['+_0xc77dd8+']';_0x267e2b[_0x6adc9c(0x255)]&&_0x41468d[_0x6adc9c(0x202)]&&!_0x41468d[_0x6adc9c(0x202)]['has'](_0x267e2b[_0x6adc9c(0x255)])&&_0x3c4d7f['push'](createIssue('error',_0x3a93f7+_0x6adc9c(0x1d5),_0x6adc9c(0x216),_0x6adc9c(0x221)+_0x267e2b[_0x6adc9c(0x255)]+'\x27',_0x41468d));if(_0x267e2b['next']){const _0xe92868=_0x5c2b64[_0x6adc9c(0x1c2)](_0x267e2b[_0x6adc9c(0x255)]);_0xe92868?.[_0x6adc9c(0x236)]===_0x6adc9c(0x1be)&&_0x3c4d7f['push'](createIssue(_0x6adc9c(0x206),_0x3a93f7+_0x6adc9c(0x1d5),'BRANCH_DIRECTLY_TO_MERGE',_0x6adc9c(0x1cd)+_0x267e2b['name']+_0x6adc9c(0x210)+_0x267e2b[_0x6adc9c(0x255)]+_0x6adc9c(0x249),_0x41468d));}}return _0x3c4d7f;}function validateJumpStep(_0x14dbba,_0x49e5c1,_0x8814d9){const _0xfcb454=a153_0x37f8,_0x3ca295=[];if(!_0x14dbba[_0xfcb454(0x201)]?.[_0xfcb454(0x232)])return _0x3ca295['push'](createIssue(_0xfcb454(0x1f1),_0x49e5c1+_0xfcb454(0x1c3),'INVALID_JUMP_TARGET',_0xfcb454(0x264),_0x8814d9,_0x49e5c1)),_0x3ca295;return(!_0x14dbba[_0xfcb454(0x201)][_0xfcb454(0x232)][_0xfcb454(0x22a)]||!_0x14dbba['with'][_0xfcb454(0x232)][_0xfcb454(0x1c8)])&&_0x3ca295[_0xfcb454(0x20f)](createIssue(_0xfcb454(0x1f1),_0x49e5c1+_0xfcb454(0x1c3),_0xfcb454(0x227),'Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names',_0x8814d9)),_0x3ca295;}function buildConvergenceMap(_0x456a48){const _0x2b968c=a153_0x37f8,_0x2ae495=new Map();function _0xa4ac0d(_0x393ede,_0x1ccc85){const _0x46afb0=a153_0x37f8,_0x98c97b=_0x2ae495[_0x46afb0(0x1c2)](_0x393ede)||[];_0x98c97b[_0x46afb0(0x20f)](_0x1ccc85),_0x2ae495[_0x46afb0(0x263)](_0x393ede,_0x98c97b);}for(const _0xdf6bd7 of _0x456a48){_0xdf6bd7[_0x2b968c(0x255)]&&_0xa4ac0d(_0xdf6bd7['next'],{'stepName':_0xdf6bd7['name'],'description':_0x2b968c(0x21b)+_0xdf6bd7[_0x2b968c(0x1cf)]+'\x27'});if(_0xdf6bd7[_0x2b968c(0x236)]===_0x2b968c(0x26e)&&_0xdf6bd7[_0x2b968c(0x201)]?.['branches'])for(const _0x3e3576 of _0xdf6bd7[_0x2b968c(0x201)][_0x2b968c(0x215)]){_0x3e3576['next']&&_0xa4ac0d(_0x3e3576[_0x2b968c(0x255)],{'stepName':_0xdf6bd7[_0x2b968c(0x1cf)],'description':_0x2b968c(0x256)+_0x3e3576['name']+_0x2b968c(0x1e4)+_0xdf6bd7[_0x2b968c(0x1cf)]+'\x27'});}if(_0xdf6bd7['type']===_0x2b968c(0x1f8)&&_0xdf6bd7[_0x2b968c(0x201)]?.[_0x2b968c(0x1d6)])for(const _0x34b702 of _0xdf6bd7[_0x2b968c(0x201)][_0x2b968c(0x1d6)]){_0x34b702[_0x2b968c(0x255)]&&_0xa4ac0d(_0x34b702[_0x2b968c(0x255)],{'stepName':_0xdf6bd7[_0x2b968c(0x1cf)],'description':_0x2b968c(0x1f6)+_0x34b702[_0x2b968c(0x1cf)]+'\x27\x20of\x20\x27'+_0xdf6bd7[_0x2b968c(0x1cf)]+'\x27'});}_0xdf6bd7[_0x2b968c(0x236)]===_0x2b968c(0x245)&&_0xdf6bd7['with']?.[_0x2b968c(0x1ca)]&&(_0xdf6bd7[_0x2b968c(0x201)][_0x2b968c(0x1ca)][_0x2b968c(0x255)]&&_0xa4ac0d(_0xdf6bd7[_0x2b968c(0x201)][_0x2b968c(0x1ca)][_0x2b968c(0x255)],{'stepName':_0xdf6bd7[_0x2b968c(0x1cf)],'description':_0x2b968c(0x225)+_0xdf6bd7[_0x2b968c(0x1cf)]+'\x27'}),_0xdf6bd7[_0x2b968c(0x201)][_0x2b968c(0x1ca)][_0x2b968c(0x23e)]?.[_0x2b968c(0x255)]&&_0xa4ac0d(_0xdf6bd7[_0x2b968c(0x201)][_0x2b968c(0x1ca)]['timeout']['next'],{'stepName':_0xdf6bd7[_0x2b968c(0x1cf)],'description':_0x2b968c(0x205)+_0xdf6bd7[_0x2b968c(0x1cf)]+'\x27'}));}return _0x2ae495;}function validateFlowControl(_0x1b7b62,_0x39d7c6,_0x29d2d7){const _0x18c64d=a153_0x37f8,_0x1106ba=[],_0x4c0c6d=_0x18c64d(0x250)+_0x39d7c6+']',_0xfd363a=_0x1b7b62['steps']||[];if(_0xfd363a[_0x18c64d(0x234)]===0x0)return _0x1106ba;const _0x5abd20=new Map();for(const _0xc23aff of _0xfd363a){_0xc23aff[_0x18c64d(0x1cf)]&&_0x5abd20['set'](_0xc23aff['name'],_0xc23aff);}const _0x58c01e=buildConvergenceMap(_0xfd363a),_0x2d4f59=_0xfd363a['some'](_0x3c3f16=>_0x3c3f16[_0x18c64d(0x236)]===_0x18c64d(0x1e7));!_0x2d4f59&&_0x1106ba[_0x18c64d(0x20f)](createIssue('error',_0x4c0c6d+_0x18c64d(0x223),_0x18c64d(0x1d9),_0x18c64d(0x20b)+_0x1b7b62[_0x18c64d(0x1cf)]+_0x18c64d(0x1da),_0x29d2d7));for(const [_0x639063,_0x1537d2]of _0x58c01e){const _0x1ee483=_0x5abd20[_0x18c64d(0x1c2)](_0x639063);if(!_0x1ee483)continue;if(_0x1537d2[_0x18c64d(0x234)]>0x1&&_0x1ee483[_0x18c64d(0x236)]!=='merge'){const _0x1db61e=_0x1537d2[_0x18c64d(0x257)](_0x20d4cc=>_0x20d4cc[_0x18c64d(0x23b)])[_0x18c64d(0x244)](',\x20');_0x1106ba[_0x18c64d(0x20f)](createIssue('error',_0x4c0c6d+_0x18c64d(0x223),'CONVERGENCE_WITHOUT_MERGE',_0x18c64d(0x1db)+_0x639063+'\x27\x20(from:\x20'+_0x1db61e+_0x18c64d(0x207),_0x29d2d7));}_0x1537d2['length']===0x1&&_0x1ee483[_0x18c64d(0x236)]==='merge'&&_0x1106ba[_0x18c64d(0x20f)](createIssue(_0x18c64d(0x206),_0x4c0c6d+'.steps',_0x18c64d(0x1f0),_0x18c64d(0x1de)+_0x639063+_0x18c64d(0x243)+_0x1537d2[0x0][_0x18c64d(0x23b)]+_0x18c64d(0x241),_0x29d2d7));}for(const _0x4eb9a1 of _0xfd363a){if(_0x4eb9a1[_0x18c64d(0x236)]===_0x18c64d(0x1be)&&_0x4eb9a1[_0x18c64d(0x255)]){const _0x3a1ba4=_0x5abd20[_0x18c64d(0x1c2)](_0x4eb9a1[_0x18c64d(0x255)]);_0x3a1ba4?.[_0x18c64d(0x236)]===_0x18c64d(0x1be)&&_0x1106ba[_0x18c64d(0x20f)](createIssue(_0x18c64d(0x1f1),_0x4c0c6d+_0x18c64d(0x223),_0x18c64d(0x20a),'Merge\x20step\x20\x27'+_0x4eb9a1[_0x18c64d(0x1cf)]+_0x18c64d(0x1cc)+_0x4eb9a1[_0x18c64d(0x255)]+_0x18c64d(0x239),_0x29d2d7));}}return _0x1106ba;}function validateCriteria(_0x2b353b,_0x2e05ef,_0x1ee4e5){const _0x2af3cb=a153_0x37f8,_0xa5834e=[];return _0x2b353b[_0x2af3cb(0x26f)]&&(_0x1ee4e5['referencedSegments']?.[_0x2af3cb(0x1ff)](_0x2b353b[_0x2af3cb(0x26f)]),!_0x2b353b[_0x2af3cb(0x26f)][_0x2af3cb(0x247)]('ref:')&&(_0x1ee4e5[_0x2af3cb(0x1f7)]&&!_0x1ee4e5[_0x2af3cb(0x1f7)][_0x2af3cb(0x200)](_0x2b353b[_0x2af3cb(0x26f)])&&_0xa5834e[_0x2af3cb(0x20f)](createIssue('error',_0x2e05ef+_0x2af3cb(0x1bf),_0x2af3cb(0x270),_0x2af3cb(0x231)+_0x2b353b[_0x2af3cb(0x26f)]+'\x27',_0x1ee4e5)))),_0xa5834e;}function validateEmbeddedSegment(_0x46c903,_0x1f94db,_0x34757d){const _0x256eb6=a153_0x37f8,_0x225801=[];return _0x46c903[_0x256eb6(0x23a)]&&_0x225801[_0x256eb6(0x20f)](...validateRuleDef(_0x46c903[_0x256eb6(0x23a)],_0x1f94db+_0x256eb6(0x214),_0x34757d)),_0x225801;}function validateStage(_0x4fed42,_0x3eabe5,_0x4e4b97,_0x572d32){const _0x4fdd83=a153_0x37f8,_0x5bcb6d=[],_0xf8b34b=_0x4fdd83(0x250)+_0x3eabe5+']',_0x2515f1=new Map(),_0x444d89=new Map();if(_0x4fed42[_0x4fdd83(0x1e3)]){for(let _0x1354a8=0x0;_0x1354a8<_0x4fed42['steps'][_0x4fdd83(0x234)];_0x1354a8++){const _0x4361de=_0x4fed42[_0x4fdd83(0x1e3)][_0x1354a8];_0x4361de[_0x4fdd83(0x1cf)]&&_0x2515f1[_0x4fdd83(0x263)](_0x4361de[_0x4fdd83(0x1cf)],_0x4361de);}for(let _0x1b3a4f=0x0;_0x1b3a4f<_0x4fed42[_0x4fdd83(0x1e3)][_0x4fdd83(0x234)];_0x1b3a4f++){const _0x52704f=_0x4fed42[_0x4fdd83(0x1e3)][_0x1b3a4f],_0x2703d2=_0xf8b34b+_0x4fdd83(0x1fb)+_0x1b3a4f+']';if(_0x52704f[_0x4fdd83(0x1cf)]){if(_0x444d89[_0x4fdd83(0x200)](_0x52704f[_0x4fdd83(0x1cf)])){const _0x111765=_0x444d89[_0x4fdd83(0x1c2)](_0x52704f[_0x4fdd83(0x1cf)]);_0x5bcb6d[_0x4fdd83(0x20f)](createIssue('error',_0x2703d2+_0x4fdd83(0x1cb),'DUPLICATE_STEP_NAME',_0x4fdd83(0x25b)+_0x52704f[_0x4fdd83(0x1cf)]+'\x27\x20(first\x20defined\x20at\x20steps['+_0x111765+'])',_0x572d32));}else _0x444d89['set'](_0x52704f['name'],_0x1b3a4f);}_0x5bcb6d[_0x4fdd83(0x20f)](...validateStep(_0x52704f,_0x2703d2,_0x572d32,_0x2515f1));}}_0x4fed42[_0x4fdd83(0x22e)]&&_0x5bcb6d['push'](...validateCriteria(_0x4fed42[_0x4fdd83(0x22e)],_0xf8b34b+_0x4fdd83(0x1ef),_0x572d32));if(_0x4fed42[_0x4fdd83(0x1d1)])for(let _0x1927f5=0x0;_0x1927f5<_0x4fed42[_0x4fdd83(0x1d1)][_0x4fdd83(0x234)];_0x1927f5++){_0x5bcb6d[_0x4fdd83(0x20f)](...validateCriteria(_0x4fed42[_0x4fdd83(0x1d1)][_0x1927f5],_0xf8b34b+_0x4fdd83(0x1bc)+_0x1927f5+']',_0x572d32));}return _0x4fed42[_0x4fdd83(0x24f)]&&_0x5bcb6d[_0x4fdd83(0x20f)](...validateCriteria(_0x4fed42[_0x4fdd83(0x24f)],_0xf8b34b+'.milestone',_0x572d32)),_0x5bcb6d[_0x4fdd83(0x20f)](...validateStageStructure(_0x4fed42,_0x3eabe5,_0x4e4b97,_0x572d32)),_0x5bcb6d[_0x4fdd83(0x20f)](...validateFlowControl(_0x4fed42,_0x3eabe5,_0x572d32)),_0x5bcb6d;}function validateStagesForVersion(_0x2b1dc6,_0x5c3a62,_0x43fd14,_0x1ca143,_0x20c0af,_0x3173c0,_0x5e9ee3){const _0xce28c0=a153_0x37f8;if(_0x2b1dc6['length']===0x0){_0x20c0af[_0xce28c0(0x20f)]({'level':_0xce28c0(0x1f1),'path':_0x1ca143+'stages','code':'MISSING_STAGES','message':_0xce28c0(0x1d8),'location':getLocationFromPath(_0x43fd14[_0xce28c0(0x226)],_0x43fd14[_0xce28c0(0x209)],['stages'])});return;}const _0x4ce0b6=new Set();for(const _0x3d768a of _0x2b1dc6){if(_0x3d768a['steps'])for(const _0x5752d4 of _0x3d768a[_0xce28c0(0x1e3)]){_0x5752d4['name']&&_0x4ce0b6[_0xce28c0(0x1ff)](_0x5752d4[_0xce28c0(0x1cf)]);}}const _0x597e38={..._0x43fd14,'stepNames':_0x4ce0b6},_0x12e72b=validateVersionStructure(_0x2b1dc6,_0x597e38);for(const _0x6702d7 of _0x12e72b){const _0x5929f6=_0x1ca143?{..._0x6702d7,'path':''+_0x1ca143+_0x6702d7['path']}:_0x6702d7;if(_0x5929f6[_0xce28c0(0x1e5)]==='error')_0x20c0af[_0xce28c0(0x20f)](_0x5929f6);else _0x3173c0[_0xce28c0(0x20f)](_0x5929f6);}for(let _0x254a9f=0x0;_0x254a9f<_0x2b1dc6['length'];_0x254a9f++){const _0x4f038a=validateStage(_0x2b1dc6[_0x254a9f],_0x254a9f,_0x2b1dc6[_0xce28c0(0x234)],_0x597e38);for(const _0x1160bd of _0x4f038a){const _0x4a95d1=_0x1ca143?{..._0x1160bd,'path':''+_0x1ca143+_0x1160bd[_0xce28c0(0x1df)]}:_0x1160bd;if(_0x4a95d1[_0xce28c0(0x1e5)]===_0xce28c0(0x1f1))_0x20c0af[_0xce28c0(0x20f)](_0x4a95d1);else _0x3173c0['push'](_0x4a95d1);}}if(_0x5c3a62[_0xce28c0(0x229)]){const _0x591bc6=_0x5e9ee3?.[_0xce28c0(0x1e6)]?'goal':_0x1ca143+_0xce28c0(0x229),_0x45d622=validateCriteria(_0x5c3a62[_0xce28c0(0x229)],_0x591bc6,_0x597e38);for(const _0x58b83d of _0x45d622){if(_0x58b83d[_0xce28c0(0x1e5)]===_0xce28c0(0x1f1))_0x20c0af[_0xce28c0(0x20f)](_0x58b83d);else _0x3173c0[_0xce28c0(0x20f)](_0x58b83d);}}}function a153_0x37f8(_0x2c21a9,_0x32b881){_0x2c21a9=_0x2c21a9-0x1bb;const _0x1f0648=a153_0x1f06();let _0x37f857=_0x1f0648[_0x2c21a9];return _0x37f857;}function extractVersionIndex(_0x39373c){const _0x23bfad=a153_0x37f8,_0xbfcd79=_0x39373c[_0x23bfad(0x25f)](/^journeys\[(\d+)\]\./);return _0xbfcd79?_0xbfcd79[0x1]:undefined;}function deduplicateAcrossVersions(_0x166ee2){const _0x472398=a153_0x37f8,_0x40636e=new Map();for(let _0xabf301=0x0;_0xabf301<_0x166ee2[_0x472398(0x234)];_0xabf301++){const _0x7642a7=_0x166ee2[_0xabf301][_0x472398(0x267)]+':'+_0x166ee2[_0xabf301]['message'],_0x5f0086=extractVersionIndex(_0x166ee2[_0xabf301][_0x472398(0x1df)]),_0x4d687b=_0x40636e[_0x472398(0x1c2)](_0x7642a7);if(_0x4d687b){_0x4d687b['indices']['push'](_0xabf301);if(_0x5f0086)_0x4d687b[_0x472398(0x1dd)][_0x472398(0x1ff)](_0x5f0086);}else _0x40636e[_0x472398(0x263)](_0x7642a7,{'indices':[_0xabf301],'versions':new Set(_0x5f0086?[_0x5f0086]:[])});}const _0xdf3b90=new Set();for(const {indices:_0x3bb323,versions:_0x2f9b8b}of _0x40636e[_0x472398(0x1ea)]()){if(_0x2f9b8b[_0x472398(0x1c7)]<=0x1)continue;const _0x1be38c=_0x166ee2[_0x3bb323[0x0]];_0x1be38c['path']=_0x1be38c[_0x472398(0x1df)]['replace'](/^journeys\[\d+\]\./,''),_0x1be38c[_0x472398(0x262)]=_0x1be38c['message']+_0x472398(0x22f)+_0x2f9b8b['size']+_0x472398(0x222);for(let _0x374065=0x1;_0x374065<_0x3bb323[_0x472398(0x234)];_0x374065++){_0xdf3b90[_0x472398(0x1ff)](_0x3bb323[_0x374065]);}}const _0x2dc2cd=[..._0xdf3b90][_0x472398(0x1c5)]((_0x53a690,_0x273e46)=>_0x273e46-_0x53a690);for(const _0x420099 of _0x2dc2cd){_0x166ee2[_0x472398(0x1e2)](_0x420099,0x1);}}export function validateJourneyDef(_0x4cc9c9,_0x313be7={},_0x5d4f5a={}){const _0x3c8bf1=a153_0x37f8;if(_0x5d4f5a[_0x3c8bf1(0x23f)])return runJourneySemanticChecks(_0x4cc9c9,_0x313be7);const _0x2b6e79=JourneyDefSchema[_0x3c8bf1(0x1ec)](_0x4cc9c9);if(_0x2b6e79[_0x3c8bf1(0x233)])return runJourneySemanticChecks(_0x2b6e79[_0x3c8bf1(0x22d)],_0x313be7);return zodErrorsToJourneyValidationResult(_0x2b6e79[_0x3c8bf1(0x1f1)],_0x313be7);}function zodErrorsToJourneyValidationResult(_0x2e390b,_0x459cba){const _0x50b823=a153_0x37f8,_0x1e835c=flattenZodIssues(_0x2e390b[_0x50b823(0x1e1)]),_0x25560e=_0x1e835c['map'](_0x5e28b0=>{const _0x3c8eea=_0x50b823,_0x5ac13a=formatZodPath(_0x5e28b0[_0x3c8eea(0x1df)]),_0xedd6cc=mapJourneyZodIssueToCode(_0x5e28b0,_0x5ac13a),_0x337708=getLocationFromPath(_0x459cba[_0x3c8eea(0x226)],_0x459cba['source'],_0x5e28b0['path'][_0x3c8eea(0x257)](_0x22e7db=>typeof _0x22e7db===_0x3c8eea(0x211)?String(_0x22e7db):_0x22e7db));return{'level':_0x3c8eea(0x1f1),'path':_0x5ac13a,'code':_0xedd6cc,'message':_0x5e28b0['message'],..._0x337708&&{'location':_0x337708}};});return{'valid':![],'errors':_0x25560e,'warnings':[]};}function mapJourneyZodIssueToCode(_0x525b23,_0x5734cb){const _0x312b66=a153_0x37f8;if(_0x5734cb==='name')return'MISSING_NAME';if(_0x5734cb[_0x312b66(0x1c4)]('.type')&&_0x5734cb[_0x312b66(0x268)](_0x312b66(0x1e3)))return _0x312b66(0x1f2);if(_0x5734cb===_0x312b66(0x26c)||_0x5734cb['endsWith']('.stages'))return _0x312b66(0x1fa);if(_0x5734cb===''&&_0x525b23['message'][_0x312b66(0x268)]('journeys,\x20stages,\x20or\x20versions'))return _0x312b66(0x1fa);if(_0x5734cb['includes'](_0x312b66(0x1e9)))return'ACTIVATION_SCHEMA_ERROR';return'JOURNEY_SCHEMA_ERROR';}function runJourneySemanticChecks(_0x51c08b,_0x2b1b30){const _0x52b4b6=a153_0x37f8,_0x1db1ed=[],_0x44f3ec=[];(!_0x51c08b[_0x52b4b6(0x1cf)]||_0x51c08b[_0x52b4b6(0x1cf)][_0x52b4b6(0x1c0)]()==='')&&_0x1db1ed[_0x52b4b6(0x20f)]({'level':'error','path':_0x52b4b6(0x1cf),'code':_0x52b4b6(0x1ee),'message':_0x52b4b6(0x21e),'location':getLocationFromPath(_0x2b1b30[_0x52b4b6(0x226)],_0x2b1b30['source'],['name'])});const _0x4d8842=new Set();if(_0x51c08b[_0x52b4b6(0x1f5)])for(const _0x5944ed of Object[_0x52b4b6(0x20d)](_0x51c08b[_0x52b4b6(0x1f5)])){_0x4d8842[_0x52b4b6(0x1ff)](_0x5944ed);}const _0x5b2faf=new Set();if(_0x51c08b[_0x52b4b6(0x213)])for(const _0x2ac9c2 of Object[_0x52b4b6(0x20d)](_0x51c08b[_0x52b4b6(0x213)])){_0x5b2faf[_0x52b4b6(0x1ff)](_0x2ac9c2);}const _0x146396=new Set(),_0x211495={..._0x2b1b30,'embeddedSegments':_0x4d8842,'referencedSegments':_0x146396,'activationKeys':_0x5b2faf[_0x52b4b6(0x1c7)]>0x0?_0x5b2faf:undefined};if(_0x51c08b[_0x52b4b6(0x1f5)])for(const [_0x2dde52,_0x1e33ee]of Object[_0x52b4b6(0x246)](_0x51c08b[_0x52b4b6(0x1f5)])){const _0x24bf56=validateEmbeddedSegment(_0x1e33ee,_0x52b4b6(0x1f9)+_0x2dde52,_0x211495);for(const _0x2ca1b9 of _0x24bf56){if(_0x2ca1b9[_0x52b4b6(0x1e5)]===_0x52b4b6(0x1f1))_0x1db1ed[_0x52b4b6(0x20f)](_0x2ca1b9);else _0x44f3ec[_0x52b4b6(0x20f)](_0x2ca1b9);}}const _0x332549=!!_0x51c08b[_0x52b4b6(0x229)],_0x30ff45=_0x51c08b[_0x52b4b6(0x1fc)]?.['every'](_0x58ab18=>!!_0x58ab18[_0x52b4b6(0x229)])??![];!_0x332549&&!_0x30ff45&&_0x44f3ec[_0x52b4b6(0x20f)]({'level':_0x52b4b6(0x206),'path':_0x52b4b6(0x229),'code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x2b1b30[_0x52b4b6(0x226)],_0x2b1b30[_0x52b4b6(0x209)],[_0x52b4b6(0x229)])});const _0x2db357=_0x51c08b[_0x52b4b6(0x1fc)]??_0x51c08b[_0x52b4b6(0x1dd)];if(_0x2db357&&_0x2db357[_0x52b4b6(0x219)](_0x664992=>_0x664992[_0x52b4b6(0x224)]===!![])[_0x52b4b6(0x234)]>0x1){const _0x3a15c2=_0x51c08b[_0x52b4b6(0x1fc)]?'journeys':_0x52b4b6(0x1dd);_0x1db1ed[_0x52b4b6(0x20f)]({'level':_0x52b4b6(0x1f1),'path':_0x3a15c2,'code':_0x52b4b6(0x220),'message':_0x52b4b6(0x265)+(_0x3a15c2==='journeys'?_0x52b4b6(0x259):_0x52b4b6(0x21d))+_0x52b4b6(0x253),'location':getLocationFromPath(_0x2b1b30[_0x52b4b6(0x226)],_0x2b1b30['source'],[_0x3a15c2])});}if(_0x51c08b['journeys']&&_0x51c08b['journeys'][_0x52b4b6(0x234)]>0x0)for(let _0x3b3e36=0x0;_0x3b3e36<_0x51c08b['journeys'][_0x52b4b6(0x234)];_0x3b3e36++){const _0x525825=_0x51c08b[_0x52b4b6(0x1fc)][_0x3b3e36];if(_0x51c08b['journeys'][_0x52b4b6(0x234)]>0x1&&_0x525825['state']==='launched')continue;const _0x20c32c=_0x525825[_0x52b4b6(0x26c)]||[],_0x332ee3='journeys['+_0x3b3e36+'].',_0x527b95=!!_0x525825[_0x52b4b6(0x229)],_0x33473f=_0x527b95?{..._0x51c08b,'goal':_0x525825[_0x52b4b6(0x229)]}:_0x51c08b;validateStagesForVersion(_0x20c32c,_0x33473f,_0x211495,_0x332ee3,_0x1db1ed,_0x44f3ec,{'goalIsInherited':!_0x527b95});}else{if(_0x51c08b[_0x52b4b6(0x1dd)]&&_0x51c08b[_0x52b4b6(0x1dd)][_0x52b4b6(0x234)]>0x0)for(let _0x188719=0x0;_0x188719<_0x51c08b['versions'][_0x52b4b6(0x234)];_0x188719++){const _0x3588a4=_0x51c08b[_0x52b4b6(0x1dd)][_0x188719];if(_0x51c08b[_0x52b4b6(0x1dd)][_0x52b4b6(0x234)]>0x1&&_0x3588a4[_0x52b4b6(0x1e0)]==='launched')continue;const _0x207719=_0x3588a4[_0x52b4b6(0x26c)]||[],_0x8b99a0=_0x52b4b6(0x251)+_0x188719+'].';validateStagesForVersion(_0x207719,_0x51c08b,_0x211495,_0x8b99a0,_0x1db1ed,_0x44f3ec);}else{const _0x1bfd33=_0x51c08b['stages']||[];validateStagesForVersion(_0x1bfd33,_0x51c08b,_0x211495,'',_0x1db1ed,_0x44f3ec);}}_0x51c08b[_0x52b4b6(0x1fc)]&&_0x51c08b[_0x52b4b6(0x1fc)][_0x52b4b6(0x234)]>0x1&&(deduplicateAcrossVersions(_0x1db1ed),deduplicateAcrossVersions(_0x44f3ec));for(const _0x3bce6d of _0x4d8842){!_0x146396['has'](_0x3bce6d)&&!_0x3bce6d['startsWith']('excluded_')&&_0x44f3ec[_0x52b4b6(0x20f)]({'level':'warning','path':_0x52b4b6(0x1f9)+_0x3bce6d,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x52b4b6(0x24b)+_0x3bce6d+_0x52b4b6(0x228),'location':getLocationFromPath(_0x2b1b30[_0x52b4b6(0x226)],_0x2b1b30[_0x52b4b6(0x209)],[_0x52b4b6(0x1f5),_0x3bce6d])});}return{'valid':_0x1db1ed[_0x52b4b6(0x234)]===0x0,'errors':_0x1db1ed,'warnings':_0x44f3ec};}
@@ -1 +1 @@
1
- const a151_0x837e=a151_0x468e;(function(_0x57b645,_0x17f197){const _0x85a1c2=a151_0x468e,_0x5836a9=_0x57b645();while(!![]){try{const _0xfa66a4=parseInt(_0x85a1c2(0x16e))/0x1*(-parseInt(_0x85a1c2(0x16f))/0x2)+parseInt(_0x85a1c2(0x1de))/0x3+-parseInt(_0x85a1c2(0x1e7))/0x4+-parseInt(_0x85a1c2(0x13b))/0x5+parseInt(_0x85a1c2(0x1e1))/0x6+parseInt(_0x85a1c2(0x168))/0x7+parseInt(_0x85a1c2(0x1b7))/0x8;if(_0xfa66a4===_0x17f197)break;else _0x5836a9['push'](_0x5836a9['shift']());}catch(_0x2fd357){_0x5836a9['push'](_0x5836a9['shift']());}}}(a151_0x4258,0xc2d02));import*as a151_0x358dec from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0xc043c3){const _0x6f62a0=a151_0x468e,_0x1d8a35=_0xc043c3[_0x6f62a0(0x139)]();if(_0x1d8a35===_0x6f62a0(0x1a3)||_0x1d8a35===_0x6f62a0(0x1a0))return _0x6f62a0(0x1a0);if(_0x1d8a35===_0x6f62a0(0x18b)||_0x1d8a35==='week')return _0x6f62a0(0x1e3);return _0xc043c3;}export function journeyResponseToDefSync(_0x3183d0){const _0x5a77f0=a151_0x468e,_0x3ebc15=_0x3183d0[_0x5a77f0(0x1aa)],_0x3bcdfa=_0x3ebc15['journeyBundleName']||_0x3ebc15[_0x5a77f0(0x15c)],_0xd79202={'stages':_0x3ebc15[_0x5a77f0(0x1d0)][_0x5a77f0(0x160)](convertApiStageToYaml),'id':_0x3183d0['id']};_0x3ebc15[_0x5a77f0(0x15d)]&&(_0xd79202[_0x5a77f0(0x15d)]=convertApiCriteriaToYaml(_0x3ebc15[_0x5a77f0(0x15d)]));_0x3ebc15[_0x5a77f0(0x15c)]&&_0x3ebc15['name']!==_0x3bcdfa&&(_0xd79202['version']=_0x3ebc15[_0x5a77f0(0x15c)]);_0x3ebc15[_0x5a77f0(0x14e)]!==undefined&&(_0xd79202[_0x5a77f0(0x1f0)]=_0x3ebc15['versionNumber']);_0x3ebc15[_0x5a77f0(0x1b9)]&&(_0xd79202[_0x5a77f0(0x1b9)]=_0x3ebc15['state']==='launched'?'launched':_0x5a77f0(0x1bf));const _0x31728a={'type':_0x5a77f0(0x1a2),'name':_0x3bcdfa,'journeys':[_0xd79202]};_0x3ebc15[_0x5a77f0(0x174)]&&(_0x31728a[_0x5a77f0(0x174)]=_0x3ebc15[_0x5a77f0(0x174)]);_0x3ebc15['goal']&&(_0x31728a['goal']=convertApiCriteriaToYaml(_0x3ebc15[_0x5a77f0(0x15d)]));if(_0x3ebc15[_0x5a77f0(0x185)])_0x31728a[_0x5a77f0(0x196)]=_0x3ebc15[_0x5a77f0(0x185)];else _0x3ebc15[_0x5a77f0(0x143)]!==undefined&&(_0x31728a[_0x5a77f0(0x196)]=_0x3ebc15[_0x5a77f0(0x143)]?'reentry_always':_0x5a77f0(0x1da));return _0x3ebc15[_0x5a77f0(0x14a)]&&(_0x31728a[_0x5a77f0(0x1db)]=_0x3ebc15['journeyBundleId']),_0x3ebc15['journeyBundleName']&&(_0x31728a['bundle_name']=_0x3ebc15[_0x5a77f0(0x1a7)]),_0x3183d0[_0x5a77f0(0x1cf)]?.[_0x5a77f0(0x1d1)]?.[_0x5a77f0(0x151)]?.['id']&&(_0x31728a[_0x5a77f0(0x148)]=_0x3183d0[_0x5a77f0(0x1cf)][_0x5a77f0(0x1d1)][_0x5a77f0(0x151)]['id']),_0x31728a;}export async function journeyResponseToDef(_0x2362e3,_0x1c9115){const _0x183a3b=a151_0x468e,_0x2e63e5=journeyResponseToDefSync(_0x2362e3);if(!_0x1c9115)return _0x2e63e5;const _0x4bc413=new Set();collectSegmentIdsFromJourney(_0x2e63e5,_0x4bc413);const _0x16617e=new Set();collectActivationIdsFromJourney(_0x2e63e5,_0x16617e);const _0xa95d92={},_0x26024b=new Map();for(const _0x2c5d76 of Array['from'](_0x4bc413)[_0x183a3b(0x1ae)]()){if(_0x1c9115[_0x183a3b(0x181)]){const _0x3d747b=await _0x1c9115['resolveSegment'](_0x2c5d76);if(_0x3d747b[_0x183a3b(0x1a6)]){_0x26024b[_0x183a3b(0x1e8)](_0x2c5d76,_0x3d747b[_0x183a3b(0x15c)]);if(_0x3d747b[_0x183a3b(0x1ec)]){const _0x1b8a8f={..._0x3d747b['definition'],'rule':deepSortObject(_0x3d747b[_0x183a3b(0x1ec)][_0x183a3b(0x15f)])};_0xa95d92[_0x3d747b[_0x183a3b(0x15c)]]=_0x1b8a8f;}}else _0x26024b[_0x183a3b(0x1e8)](_0x2c5d76,makeSegmentRef(_0x3d747b[_0x183a3b(0x15c)]));}else{if(_0x1c9115[_0x183a3b(0x16d)]){const _0x208ce3=await _0x1c9115[_0x183a3b(0x16d)](_0x2c5d76);_0x26024b[_0x183a3b(0x1e8)](_0x2c5d76,_0x208ce3);}}}const _0x284f75={},_0x553af7=new Map();for(const _0x59d3aa of Array[_0x183a3b(0x165)](_0x16617e)[_0x183a3b(0x1ae)]()){if(_0x1c9115['resolveActivation']){const _0x9562d7=await _0x1c9115[_0x183a3b(0x1a8)](_0x59d3aa);_0x9562d7[_0x183a3b(0x1a6)]?(_0x553af7[_0x183a3b(0x1e8)](_0x59d3aa,_0x9562d7['name']),_0x9562d7[_0x183a3b(0x1ec)]&&(_0x284f75[_0x9562d7[_0x183a3b(0x15c)]]=_0x9562d7['definition'])):_0x553af7[_0x183a3b(0x1e8)](_0x59d3aa,makeSegmentRef(_0x9562d7[_0x183a3b(0x15c)]));}else{if(_0x1c9115[_0x183a3b(0x1ed)]){const _0x56a32b=await _0x1c9115[_0x183a3b(0x1ed)](_0x59d3aa);_0x553af7[_0x183a3b(0x1e8)](_0x59d3aa,_0x56a32b);}}}_0x26024b[_0x183a3b(0x191)]>0x0&&replaceSegmentIdsInJourney(_0x2e63e5,_0x26024b);_0x553af7['size']>0x0&&replaceActivationIdsInJourney(_0x2e63e5,_0x553af7);if(_0x1c9115[_0x183a3b(0x17f)]){const _0x1831a6=[];collectJumpTargetsFromJourney(_0x2e63e5,_0x1831a6);if(_0x1831a6[_0x183a3b(0x193)]>0x0){const _0x2d76b3=new Map();for(const _0x34d398 of _0x1831a6){try{const _0x2e108b=await _0x1c9115['resolveJumpTarget'](_0x34d398[_0x183a3b(0x1e4)],_0x34d398[_0x183a3b(0x1eb)]);_0x2d76b3[_0x183a3b(0x1e8)](_0x34d398[_0x183a3b(0x1e4)]+':'+_0x34d398['stageId'],_0x2e108b);}catch{}}_0x2d76b3['size']>0x0&&replaceJumpTargetsInJourney(_0x2e63e5,_0x2d76b3);}}return Object[_0x183a3b(0x18f)](_0xa95d92)[_0x183a3b(0x193)]>0x0&&(_0x2e63e5[_0x183a3b(0x172)]=_0xa95d92),Object[_0x183a3b(0x18f)](_0x284f75)[_0x183a3b(0x193)]>0x0&&(_0x2e63e5[_0x183a3b(0x1ce)]=_0x284f75),_0x2e63e5;}function collectSegmentIdsFromJourney(_0x27a2e,_0x127438){const _0x28eccb=a151_0x468e;_0x27a2e['goal']?.['segment']&&_0x127438[_0x28eccb(0x17d)](_0x27a2e[_0x28eccb(0x15d)][_0x28eccb(0x1f1)]);const _0xf8f371=_0x1f4c89=>{const _0x5a3b5a=_0x28eccb;for(const _0x338d6d of _0x1f4c89){_0x338d6d[_0x5a3b5a(0x146)]?.['segment']&&_0x127438[_0x5a3b5a(0x17d)](_0x338d6d[_0x5a3b5a(0x146)][_0x5a3b5a(0x1f1)]);if(_0x338d6d['exit_criteria'])for(const _0xaa49cd of _0x338d6d[_0x5a3b5a(0x1b4)]){_0xaa49cd[_0x5a3b5a(0x1f1)]&&_0x127438['add'](_0xaa49cd[_0x5a3b5a(0x1f1)]);}_0x338d6d[_0x5a3b5a(0x17c)]?.['segment']&&_0x127438[_0x5a3b5a(0x17d)](_0x338d6d[_0x5a3b5a(0x17c)][_0x5a3b5a(0x1f1)]);if(_0x338d6d[_0x5a3b5a(0x1ac)])for(const _0x1aa622 of _0x338d6d['steps']){if(_0x1aa622[_0x5a3b5a(0x183)]==='decision_point'){const _0x185100=_0x1aa622;for(const _0x3982cd of _0x185100[_0x5a3b5a(0x178)][_0x5a3b5a(0x1c4)]){_0x3982cd[_0x5a3b5a(0x1f1)]&&_0x127438['add'](_0x3982cd['segment']);}}else{if(_0x1aa622[_0x5a3b5a(0x183)]==='wait'){const _0x32dbef=_0x1aa622;_0x32dbef['with']['condition']?.['segment']&&_0x127438['add'](_0x32dbef[_0x5a3b5a(0x178)]['condition'][_0x5a3b5a(0x1f1)]);}}}}};if(_0x27a2e['journeys'])for(const _0x57fa3d of _0x27a2e[_0x28eccb(0x1a1)]){_0x57fa3d[_0x28eccb(0x15d)]?.[_0x28eccb(0x1f1)]&&_0x127438[_0x28eccb(0x17d)](_0x57fa3d[_0x28eccb(0x15d)][_0x28eccb(0x1f1)]),_0xf8f371(_0x57fa3d[_0x28eccb(0x15e)]);}_0x27a2e['stages']&&_0xf8f371(_0x27a2e['stages']);if(_0x27a2e[_0x28eccb(0x136)])for(const _0x55f4c7 of _0x27a2e[_0x28eccb(0x136)]){_0xf8f371(_0x55f4c7[_0x28eccb(0x15e)]);}}function replaceSegmentIdsInJourney(_0x5b5515,_0x547f00){const _0x7c3450=a151_0x468e,_0x348151=_0x924ab8=>_0x547f00[_0x7c3450(0x1d3)](_0x924ab8)||_0x924ab8;_0x5b5515[_0x7c3450(0x15d)]?.[_0x7c3450(0x1f1)]&&(_0x5b5515[_0x7c3450(0x15d)][_0x7c3450(0x1f1)]=_0x348151(_0x5b5515[_0x7c3450(0x15d)][_0x7c3450(0x1f1)]));const _0x32360c=_0xd0fb33=>{const _0x59b641=_0x7c3450;for(const _0x4456d6 of _0xd0fb33){_0x4456d6['entry_criteria']?.[_0x59b641(0x1f1)]&&(_0x4456d6['entry_criteria']['segment']=_0x348151(_0x4456d6[_0x59b641(0x146)]['segment']));if(_0x4456d6[_0x59b641(0x1b4)])for(const _0x45ec07 of _0x4456d6[_0x59b641(0x1b4)]){_0x45ec07['segment']&&(_0x45ec07['segment']=_0x348151(_0x45ec07[_0x59b641(0x1f1)]));}_0x4456d6[_0x59b641(0x17c)]?.[_0x59b641(0x1f1)]&&(_0x4456d6[_0x59b641(0x17c)][_0x59b641(0x1f1)]=_0x348151(_0x4456d6[_0x59b641(0x17c)][_0x59b641(0x1f1)]));if(_0x4456d6['steps'])for(const _0x1d1e4d of _0x4456d6['steps']){if(_0x1d1e4d[_0x59b641(0x183)]===_0x59b641(0x182)){const _0x503795=_0x1d1e4d;for(const _0x6890e5 of _0x503795['with'][_0x59b641(0x1c4)]){_0x6890e5['segment']&&(_0x6890e5['segment']=_0x348151(_0x6890e5[_0x59b641(0x1f1)]));}}else{if(_0x1d1e4d[_0x59b641(0x183)]===_0x59b641(0x1d8)){const _0x2a6ea2=_0x1d1e4d;_0x2a6ea2['with'][_0x59b641(0x18d)]?.[_0x59b641(0x1f1)]&&(_0x2a6ea2[_0x59b641(0x178)][_0x59b641(0x18d)][_0x59b641(0x1f1)]=_0x348151(_0x2a6ea2[_0x59b641(0x178)][_0x59b641(0x18d)][_0x59b641(0x1f1)]));}}}}};if(_0x5b5515[_0x7c3450(0x1a1)])for(const _0x39776f of _0x5b5515[_0x7c3450(0x1a1)]){_0x39776f[_0x7c3450(0x15d)]?.[_0x7c3450(0x1f1)]&&(_0x39776f[_0x7c3450(0x15d)]['segment']=_0x348151(_0x39776f[_0x7c3450(0x15d)]['segment'])),_0x32360c(_0x39776f[_0x7c3450(0x15e)]);}_0x5b5515[_0x7c3450(0x15e)]&&_0x32360c(_0x5b5515[_0x7c3450(0x15e)]);if(_0x5b5515[_0x7c3450(0x136)])for(const _0x33b58c of _0x5b5515[_0x7c3450(0x136)]){_0x32360c(_0x33b58c['stages']);}}function collectActivationIdsFromJourney(_0x3810a3,_0x35e9ef){const _0x12251c=a151_0x468e,_0x3c0a92=_0x1e7da4=>{const _0x314fe4=a151_0x468e;for(const _0x5eb7f1 of _0x1e7da4){if(_0x5eb7f1[_0x314fe4(0x1ac)])for(const _0x14eaa9 of _0x5eb7f1[_0x314fe4(0x1ac)]){if(_0x14eaa9[_0x314fe4(0x183)]==='activation'){const _0x58e333=_0x14eaa9;_0x58e333[_0x314fe4(0x178)][_0x314fe4(0x14f)]&&/^\d+$/['test'](_0x58e333[_0x314fe4(0x178)]['activation'])&&_0x35e9ef['add'](_0x58e333[_0x314fe4(0x178)]['activation']);}}}};if(_0x3810a3[_0x12251c(0x1a1)])for(const _0x34b52a of _0x3810a3[_0x12251c(0x1a1)]){_0x3c0a92(_0x34b52a[_0x12251c(0x15e)]);}_0x3810a3[_0x12251c(0x15e)]&&_0x3c0a92(_0x3810a3[_0x12251c(0x15e)]);if(_0x3810a3[_0x12251c(0x136)])for(const _0x45e683 of _0x3810a3[_0x12251c(0x136)]){_0x3c0a92(_0x45e683[_0x12251c(0x15e)]);}}function replaceActivationIdsInJourney(_0x315199,_0x1ff023){const _0x53734a=a151_0x468e,_0x1a6ba8=_0x3ab8a5=>_0x1ff023['get'](_0x3ab8a5)||_0x3ab8a5,_0x298671=_0x578ba9=>{const _0x2c2fcb=a151_0x468e;for(const _0x13ec5d of _0x578ba9){if(_0x13ec5d[_0x2c2fcb(0x1ac)])for(const _0x3f4a0f of _0x13ec5d[_0x2c2fcb(0x1ac)]){if(_0x3f4a0f['type']===_0x2c2fcb(0x14f)){const _0x3a4b54=_0x3f4a0f;_0x3a4b54[_0x2c2fcb(0x178)]['activation']&&(_0x3a4b54[_0x2c2fcb(0x178)][_0x2c2fcb(0x14f)]=_0x1a6ba8(_0x3a4b54[_0x2c2fcb(0x178)][_0x2c2fcb(0x14f)]));}}}};if(_0x315199[_0x53734a(0x1a1)])for(const _0x5a138e of _0x315199[_0x53734a(0x1a1)]){_0x298671(_0x5a138e[_0x53734a(0x15e)]);}_0x315199[_0x53734a(0x15e)]&&_0x298671(_0x315199[_0x53734a(0x15e)]);if(_0x315199['versions'])for(const _0x219a3c of _0x315199[_0x53734a(0x136)]){_0x298671(_0x219a3c[_0x53734a(0x15e)]);}}function collectJumpTargetsFromJourney(_0x3681b0,_0x51b481){const _0x1b55d5=a151_0x468e,_0x25ef8d=new Set(),_0x5c3f33=_0x6b1862=>{const _0x32469c=a151_0x468e;for(const _0x5b2baf of _0x6b1862){if(_0x5b2baf[_0x32469c(0x1ac)])for(const _0x4b49fc of _0x5b2baf[_0x32469c(0x1ac)]){if(_0x4b49fc[_0x32469c(0x183)]===_0x32469c(0x1af)){const _0x3ce3d2=_0x4b49fc,_0x22fd9c=_0x3ce3d2[_0x32469c(0x178)]['target'];if(_0x22fd9c[_0x32469c(0x1a2)]&&_0x22fd9c[_0x32469c(0x1ad)]&&/^\d+$/['test'](_0x22fd9c['journey'])&&/^\d+$/['test'](_0x22fd9c[_0x32469c(0x1ad)])){const _0x291ab0=_0x22fd9c[_0x32469c(0x1a2)]+':'+_0x22fd9c[_0x32469c(0x1ad)];!_0x25ef8d[_0x32469c(0x147)](_0x291ab0)&&(_0x25ef8d['add'](_0x291ab0),_0x51b481[_0x32469c(0x16a)]({'journeyId':_0x22fd9c['journey'],'stageId':_0x22fd9c[_0x32469c(0x1ad)]}));}}}}};if(_0x3681b0[_0x1b55d5(0x1a1)])for(const _0x3c5bee of _0x3681b0[_0x1b55d5(0x1a1)]){_0x5c3f33(_0x3c5bee[_0x1b55d5(0x15e)]);}_0x3681b0[_0x1b55d5(0x15e)]&&_0x5c3f33(_0x3681b0['stages']);if(_0x3681b0[_0x1b55d5(0x136)])for(const _0x2fa9cb of _0x3681b0[_0x1b55d5(0x136)]){_0x5c3f33(_0x2fa9cb[_0x1b55d5(0x15e)]);}}function replaceJumpTargetsInJourney(_0x38e3e9,_0x40b2bc){const _0x14467d=a151_0x468e,_0x510b0a=_0x2d92e4=>{const _0x1979c2=a151_0x468e;for(const _0x25f8fc of _0x2d92e4){if(_0x25f8fc[_0x1979c2(0x1ac)])for(const _0x38769c of _0x25f8fc[_0x1979c2(0x1ac)]){if(_0x38769c[_0x1979c2(0x183)]===_0x1979c2(0x1af)){const _0x1fba48=_0x38769c,_0x45c7ab=_0x1fba48[_0x1979c2(0x178)][_0x1979c2(0x15b)],_0x1a8bf6=_0x45c7ab[_0x1979c2(0x1a2)]+':'+_0x45c7ab['stage'],_0x5b17f0=_0x40b2bc['get'](_0x1a8bf6);_0x5b17f0&&(_0x45c7ab['journey']=_0x5b17f0[_0x1979c2(0x189)],_0x45c7ab[_0x1979c2(0x1ad)]=_0x5b17f0[_0x1979c2(0x164)]);}}}};if(_0x38e3e9[_0x14467d(0x1a1)])for(const _0x4482ef of _0x38e3e9['journeys']){_0x510b0a(_0x4482ef[_0x14467d(0x15e)]);}_0x38e3e9[_0x14467d(0x15e)]&&_0x510b0a(_0x38e3e9[_0x14467d(0x15e)]);if(_0x38e3e9['versions'])for(const _0x539a0d of _0x38e3e9['versions']){_0x510b0a(_0x539a0d['stages']);}}function generateReadableStepName(_0x2cc94c,_0x63ce35){const _0x599617=a151_0x468e;if(_0x2cc94c[_0x599617(0x15c)]&&_0x2cc94c[_0x599617(0x15c)]!==_0x2cc94c['type']){const _0x26ef7f=_0x2cc94c['name'][_0x599617(0x197)]();if(_0x26ef7f&&/[a-z0-9\p{L}]/iu[_0x599617(0x153)](_0x26ef7f))return _0x26ef7f;}const _0xc73688=_0x2cc94c[_0x599617(0x183)][_0x599617(0x139)]()['replace'](/step$/i,'');return _0xc73688+'_'+(_0x63ce35+0x1);}function a151_0x468e(_0x43d724,_0x2bcc50){_0x43d724=_0x43d724-0x135;const _0x425850=a151_0x4258();let _0x468e76=_0x425850[_0x43d724];return _0x468e76;}function getStepNextRefs(_0x340b22){const _0x4bf194=a151_0x468e,_0x3f172c=[];if(_0x340b22[_0x4bf194(0x171)])_0x3f172c[_0x4bf194(0x16a)](_0x340b22[_0x4bf194(0x171)]);if(_0x340b22[_0x4bf194(0x1c4)])for(const _0x5bf4a6 of _0x340b22['branches']){if(_0x5bf4a6['next'])_0x3f172c[_0x4bf194(0x16a)](_0x5bf4a6[_0x4bf194(0x171)]);}if(_0x340b22[_0x4bf194(0x1a9)])for(const _0x558923 of _0x340b22[_0x4bf194(0x1a9)]){if(_0x558923[_0x4bf194(0x171)])_0x3f172c[_0x4bf194(0x16a)](_0x558923['next']);}if(_0x340b22['conditions'])for(const _0x573a79 of _0x340b22[_0x4bf194(0x13a)]){if(_0x573a79[_0x4bf194(0x171)])_0x3f172c['push'](_0x573a79[_0x4bf194(0x171)]);}return _0x3f172c;}function parseJumpTargetDisplayName(_0x397b7a){const _0x593f73=a151_0x468e,_0x5ad661=_0x397b7a[_0x593f73(0x1e6)](/^(.+?)\s*\(([^/)]+)/);if(!_0x5ad661)return undefined;const _0x4dcc66=_0x5ad661[0x1][_0x593f73(0x197)](),_0x55ae88=_0x5ad661[0x2]['trim']();if(!_0x4dcc66||!_0x55ae88)return undefined;return{'stageName':_0x4dcc66,'journeyName':_0x55ae88};}function orderStepsFromRoot(_0x5d6712,_0x1c75c9){const _0x4025da=a151_0x468e,_0xdf8503=Object[_0x4025da(0x19b)](_0x5d6712);if(_0xdf8503[_0x4025da(0x193)]===0x0)return[];const _0x402a38=new Set(_0xdf8503[_0x4025da(0x160)](([_0x47c4c3])=>_0x47c4c3)),_0x241953=new Set();for(const [,_0x35de84]of _0xdf8503){for(const _0x141397 of getStepNextRefs(_0x35de84)){if(_0x402a38['has'](_0x141397))_0x241953['add'](_0x141397);}}let _0x3ab3c3=_0x1c75c9&&_0x402a38[_0x4025da(0x147)](_0x1c75c9)?_0x1c75c9:undefined;if(!_0x3ab3c3){const _0x251304=_0xdf8503[_0x4025da(0x19d)](([_0x259777])=>!_0x241953['has'](_0x259777));_0x251304[_0x4025da(0x193)]>0x0?_0x3ab3c3=_0x251304[0x0][0x0]:_0x3ab3c3=_0xdf8503[0x0][0x0];}const _0x1c64af=[],_0x1a68df=new Set(),_0x44bca9=[_0x3ab3c3];while(_0x44bca9['length']>0x0){const _0x227073=_0x44bca9[_0x4025da(0x162)]();if(_0x1a68df[_0x4025da(0x147)](_0x227073))continue;_0x1a68df['add'](_0x227073);const _0x48b847=_0x5d6712[_0x227073];if(!_0x48b847)continue;_0x1c64af[_0x4025da(0x16a)]({'uuid':_0x227073,'step':_0x48b847});for(const _0x261a14 of getStepNextRefs(_0x48b847)){_0x402a38[_0x4025da(0x147)](_0x261a14)&&!_0x1a68df['has'](_0x261a14)&&_0x44bca9[_0x4025da(0x16a)](_0x261a14);}}for(const [_0x25a5c6,_0xa2c5fc]of _0xdf8503){!_0x1a68df['has'](_0x25a5c6)&&_0x1c64af[_0x4025da(0x16a)]({'uuid':_0x25a5c6,'step':_0xa2c5fc});}return _0x1c64af;}function resolveStepReferences(_0x353af2,_0x5439fb,_0x2552bd,_0x36613c){const _0x429ff9=a151_0x468e;if(_0x353af2[_0x429ff9(0x183)]!==_0x429ff9(0x16b)){_0x353af2['next']&&_0x36613c[_0x429ff9(0x147)](_0x353af2['next'])&&(_0x353af2['next']=_0x36613c['get'](_0x353af2['next']));const _0x14773a=_0x5439fb+0x1;if(_0x14773a<_0x2552bd[_0x429ff9(0x193)]){const _0x2804cc=_0x36613c[_0x429ff9(0x1d3)](_0x2552bd[_0x14773a][_0x429ff9(0x1d4)]);_0x353af2[_0x429ff9(0x171)]===_0x2804cc&&delete _0x353af2[_0x429ff9(0x171)];}}if(_0x353af2[_0x429ff9(0x183)]===_0x429ff9(0x182))for(const _0x597027 of _0x353af2['with'][_0x429ff9(0x1c4)]){_0x597027['next']&&_0x36613c[_0x429ff9(0x147)](_0x597027[_0x429ff9(0x171)])&&(_0x597027['next']=_0x36613c[_0x429ff9(0x1d3)](_0x597027[_0x429ff9(0x171)]));}if(_0x353af2[_0x429ff9(0x183)]===_0x429ff9(0x1c8))for(const _0xc84287 of _0x353af2[_0x429ff9(0x178)][_0x429ff9(0x1a9)]){_0xc84287['next']&&_0x36613c['has'](_0xc84287[_0x429ff9(0x171)])&&(_0xc84287[_0x429ff9(0x171)]=_0x36613c[_0x429ff9(0x1d3)](_0xc84287[_0x429ff9(0x171)]));}if(_0x353af2['type']==='wait'&&_0x353af2['with'][_0x429ff9(0x18d)]){const _0x59de92=_0x353af2[_0x429ff9(0x178)][_0x429ff9(0x18d)];_0x59de92[_0x429ff9(0x171)]&&_0x36613c[_0x429ff9(0x147)](_0x59de92[_0x429ff9(0x171)])&&(_0x59de92[_0x429ff9(0x171)]=_0x36613c[_0x429ff9(0x1d3)](_0x59de92['next'])),_0x59de92[_0x429ff9(0x1e2)]?.[_0x429ff9(0x171)]&&_0x36613c[_0x429ff9(0x147)](_0x59de92[_0x429ff9(0x1e2)]['next'])&&(_0x59de92[_0x429ff9(0x1e2)][_0x429ff9(0x171)]=_0x36613c[_0x429ff9(0x1d3)](_0x59de92['timeout'][_0x429ff9(0x171)]));}}function convertApiStageToYaml(_0x342743){const _0x50ea73=a151_0x468e,_0x2b1391={'name':_0x342743[_0x50ea73(0x15c)]};_0x342743['id']&&(_0x2b1391['id']=_0x342743['id']);_0x342743[_0x50ea73(0x174)]&&(_0x2b1391[_0x50ea73(0x174)]=_0x342743[_0x50ea73(0x174)]);_0x342743['entryCriteria']&&(_0x2b1391[_0x50ea73(0x146)]=convertApiCriteriaToYaml(_0x342743[_0x50ea73(0x14b)]));_0x342743[_0x50ea73(0x149)]&&_0x342743['exitCriterias'][_0x50ea73(0x193)]>0x0&&(_0x2b1391['exit_criteria']=_0x342743[_0x50ea73(0x149)]['map'](convertApiCriteriaToYaml));_0x342743[_0x50ea73(0x17c)]&&(_0x2b1391[_0x50ea73(0x17c)]=convertApiCriteriaToYaml(_0x342743[_0x50ea73(0x17c)]));if(_0x342743[_0x50ea73(0x1ac)]&&Object[_0x50ea73(0x18f)](_0x342743[_0x50ea73(0x1ac)])[_0x50ea73(0x193)]>0x0){const _0x1b8c6e=orderStepsFromRoot(_0x342743['steps'],_0x342743[_0x50ea73(0x1c2)]),_0xc6809=new Map(),_0x1853bb=new Set();for(let _0x4f395a=0x0;_0x4f395a<_0x1b8c6e[_0x50ea73(0x193)];_0x4f395a++){const {uuid:_0x9bcb3e,step:_0x28f6bb}=_0x1b8c6e[_0x4f395a];let _0x519464=generateReadableStepName(_0x28f6bb,_0x4f395a),_0x162cde=_0x519464,_0x51de06=0x2;while(_0x1853bb[_0x50ea73(0x147)](_0x162cde)){_0x162cde=_0x519464+'_'+_0x51de06,_0x51de06++;}_0x1853bb[_0x50ea73(0x17d)](_0x162cde),_0xc6809[_0x50ea73(0x1e8)](_0x9bcb3e,_0x162cde);}_0x2b1391[_0x50ea73(0x1ac)]=_0x1b8c6e[_0x50ea73(0x160)](({uuid:_0x496982,step:_0x4f8d48},_0xb11ffa)=>{const _0x23a9c9=_0x50ea73,_0x4ebad6=convertApiStepToYaml(_0x4f8d48,_0xc6809[_0x23a9c9(0x1d3)](_0x496982));return resolveStepReferences(_0x4ebad6,_0xb11ffa,_0x1b8c6e,_0xc6809),_0x4ebad6;});}return _0x2b1391;}function convertApiCriteriaToYaml(_0x32b4c6){const _0x3f06aa=a151_0x468e,_0x341b25={'name':_0x32b4c6[_0x3f06aa(0x15c)],'segment':_0x32b4c6[_0x3f06aa(0x156)]};_0x32b4c6[_0x3f06aa(0x174)]&&(_0x341b25['description']=_0x32b4c6[_0x3f06aa(0x174)]);if(_0x32b4c6['target']){let _0x172278=_0x32b4c6[_0x3f06aa(0x15b)][_0x3f06aa(0x1e4)],_0x3eb94f=_0x32b4c6[_0x3f06aa(0x15b)][_0x3f06aa(0x1b2)];if(_0x32b4c6[_0x3f06aa(0x15b)][_0x3f06aa(0x189)]){const _0x374724=parseJumpTargetDisplayName(_0x32b4c6[_0x3f06aa(0x15b)]['journeyName']);_0x374724&&(_0x3eb94f=_0x374724['stageName'],_0x172278=_0x374724[_0x3f06aa(0x189)]);}_0x341b25['target']={'journey':_0x172278,'stage':_0x3eb94f},_0x32b4c6[_0x3f06aa(0x15b)][_0x3f06aa(0x14a)]&&(_0x341b25[_0x3f06aa(0x15b)]['bundle_id']=_0x32b4c6[_0x3f06aa(0x15b)][_0x3f06aa(0x14a)]);}return _0x341b25;}function convertApiStepToYaml(_0x48e6ff,_0x1501cf){const _0x25ff91=a151_0x468e;switch(_0x48e6ff[_0x25ff91(0x183)]){case _0x25ff91(0x199):{const _0x5a34be={};if(_0x48e6ff[_0x25ff91(0x18e)]==='Duration'&&_0x48e6ff['waitStep']!==undefined)_0x5a34be[_0x25ff91(0x186)]=_0x48e6ff[_0x25ff91(0x1be)],_0x5a34be[_0x25ff91(0x1b6)]=_0x48e6ff[_0x25ff91(0x17e)];else{if(_0x48e6ff[_0x25ff91(0x18e)]===_0x25ff91(0x1b8)&&_0x48e6ff[_0x25ff91(0x175)])_0x5a34be[_0x25ff91(0x1c1)]=_0x48e6ff[_0x25ff91(0x175)];else{if(_0x48e6ff[_0x25ff91(0x18e)]==='DaysOfTheWeek'&&_0x48e6ff[_0x25ff91(0x157)])_0x5a34be[_0x25ff91(0x145)]=_0x48e6ff[_0x25ff91(0x157)];else{if(_0x48e6ff[_0x25ff91(0x18e)]===_0x25ff91(0x1cb)){if(_0x48e6ff['conditions']&&_0x48e6ff['conditions'][_0x25ff91(0x193)]>0x0){const _0x6866c3=_0x48e6ff[_0x25ff91(0x13a)][_0x25ff91(0x135)](_0x3f4e79=>!_0x3f4e79[_0x25ff91(0x17a)]),_0x37b48c=_0x48e6ff[_0x25ff91(0x13a)][_0x25ff91(0x135)](_0x1c1d5e=>_0x1c1d5e[_0x25ff91(0x17a)]);_0x6866c3?.[_0x25ff91(0x156)]&&(_0x5a34be[_0x25ff91(0x18d)]={'segment':_0x6866c3[_0x25ff91(0x156)],..._0x6866c3[_0x25ff91(0x171)]?{'next':_0x6866c3[_0x25ff91(0x171)]}:{}},_0x37b48c&&_0x37b48c[_0x25ff91(0x194)]!==undefined&&_0x37b48c['unit']&&(_0x5a34be[_0x25ff91(0x18d)][_0x25ff91(0x1e2)]={'duration':_0x37b48c[_0x25ff91(0x194)],'unit':_0x37b48c[_0x25ff91(0x1b6)],..._0x37b48c[_0x25ff91(0x171)]?{'next':_0x37b48c['next']}:{}}));}else _0x48e6ff[_0x25ff91(0x16c)]&&(_0x5a34be[_0x25ff91(0x18d)]={'segment':_0x48e6ff['conditionSegmentId']},_0x48e6ff[_0x25ff91(0x14d)]!==undefined&&_0x48e6ff['conditionTimeoutUnit']&&(_0x5a34be[_0x25ff91(0x18d)][_0x25ff91(0x1e2)]={'duration':_0x48e6ff['conditionTimeoutDuration'],'unit':_0x48e6ff[_0x25ff91(0x1a4)]}));}}}}const _0x96587d={'type':_0x25ff91(0x1d8),'name':_0x1501cf,..._0x48e6ff['next']?{'next':_0x48e6ff[_0x25ff91(0x171)]}:{},'with':_0x5a34be};return _0x96587d;}case _0x25ff91(0x195):{const _0x2d0c41={'type':_0x25ff91(0x14f),'name':_0x1501cf,..._0x48e6ff[_0x25ff91(0x171)]?{'next':_0x48e6ff[_0x25ff91(0x171)]}:{},'with':{'activation':_0x48e6ff[_0x25ff91(0x1e9)]||''}};return _0x2d0c41;}case _0x25ff91(0x19a):{const _0x236193={'type':_0x25ff91(0x182),'name':_0x1501cf,..._0x48e6ff[_0x25ff91(0x171)]?{'next':_0x48e6ff[_0x25ff91(0x171)]}:{},'with':{'branches':(_0x48e6ff[_0x25ff91(0x1c4)]||[])[_0x25ff91(0x160)](_0x29099d=>({'name':_0x29099d['name'],'segment':_0x29099d[_0x25ff91(0x156)],'excluded':_0x29099d['excludedPath'],..._0x29099d[_0x25ff91(0x171)]?{'next':_0x29099d[_0x25ff91(0x171)]}:{}}))}};return _0x236193;}case _0x25ff91(0x1ab):case'AbTest':case _0x25ff91(0x1f3):{const _0x2fc11e=_0x48e6ff['variants']||(_0x48e6ff[_0x25ff91(0x1c4)]||[])[_0x25ff91(0x160)](_0x1f48ed=>({'name':_0x1f48ed[_0x25ff91(0x15c)],'percentage':0x0,'next':_0x1f48ed[_0x25ff91(0x171)]})),_0x14477b={'type':_0x25ff91(0x1c8),'name':_0x1501cf,..._0x48e6ff[_0x25ff91(0x171)]?{'next':_0x48e6ff['next']}:{},'with':{'customized_split':_0x48e6ff[_0x25ff91(0x138)],'unique_id':_0x48e6ff['uniqueId'],'variants':_0x2fc11e[_0x25ff91(0x160)](_0xf0106d=>({'name':_0xf0106d[_0x25ff91(0x15c)],'percentage':_0xf0106d[_0x25ff91(0x1cc)],..._0xf0106d['next']?{'next':_0xf0106d[_0x25ff91(0x171)]}:{}}))}};return _0x14477b;}case _0x25ff91(0x1cd):{const _0x4b1fff={'type':_0x25ff91(0x1ea),'name':_0x1501cf,..._0x48e6ff[_0x25ff91(0x171)]?{'next':_0x48e6ff[_0x25ff91(0x171)]}:{}};return _0x4b1fff;}case'Jump':{let _0x413112='',_0x1ba8f3='',_0x16556c;if(_0x48e6ff[_0x25ff91(0x15b)]){_0x413112=_0x48e6ff['target'][_0x25ff91(0x1e4)],_0x1ba8f3=_0x48e6ff[_0x25ff91(0x15b)]['journeyStageId'],_0x16556c=_0x48e6ff[_0x25ff91(0x15b)][_0x25ff91(0x14a)];if(_0x48e6ff['target'][_0x25ff91(0x189)]){const _0x4e0963=parseJumpTargetDisplayName(_0x48e6ff['target']['journeyName']);_0x4e0963&&(_0x1ba8f3=_0x4e0963[_0x25ff91(0x164)],_0x413112=_0x4e0963['journeyName']);}}const _0x14075d={'type':'jump','name':_0x1501cf,..._0x48e6ff[_0x25ff91(0x171)]?{'next':_0x48e6ff['next']}:{},'with':{'target':{'journey':_0x413112,'stage':_0x1ba8f3,..._0x16556c?{'bundle_id':_0x16556c}:{}}}};return _0x14075d;}case _0x25ff91(0x1c3):{const _0x5b973b={'type':'end','name':_0x1501cf};return _0x5b973b;}default:{const _0x17ce7e={'type':'end','name':_0x1501cf};return _0x17ce7e;}}}export async function journeyDefToRequest(_0x40f8c4,_0x1748c7,_0x23e5f2){const _0x7da05f=a151_0x468e,_0x5df16a=_0x40f8c4[_0x7da05f(0x15e)]||getActiveStages(_0x40f8c4),_0x1d1a68=isJourneysArrayMode(_0x40f8c4)||isMultiVersionMode(_0x40f8c4)?getLatestJourneyEntry(_0x40f8c4):undefined,_0x49985c=_0x1d1a68?.[_0x7da05f(0x18c)]??_0x40f8c4[_0x7da05f(0x15c)],_0x53e40b=_0x40f8c4['segments']||{},_0x4f435c=_0x40f8c4['activations']||{},_0x374423={'type':_0x7da05f(0x1a2),'attributes':{'name':_0x49985c,'audienceId':_0x1748c7,'journeyStages':await Promise[_0x7da05f(0x137)](_0x5df16a[_0x7da05f(0x160)](_0x19ec82=>convertYamlStageToApi(_0x19ec82,_0x23e5f2,_0x53e40b,_0x4f435c)))}},_0x31584b=_0x1d1a68?.['id']??_0x40f8c4['id'];_0x31584b&&(_0x374423['id']=_0x31584b);_0x40f8c4['description']&&(_0x374423[_0x7da05f(0x1aa)][_0x7da05f(0x174)]=_0x40f8c4['description']);const _0x4b5a80=getEffectiveGoal(_0x40f8c4);_0x4b5a80&&(_0x374423[_0x7da05f(0x1aa)][_0x7da05f(0x15d)]=await convertYamlCriteriaToApi(_0x4b5a80,_0x23e5f2,_0x53e40b));const _0x477f3a=getEffectiveReentry(_0x40f8c4);return _0x477f3a&&(_0x374423[_0x7da05f(0x1aa)][_0x7da05f(0x185)]=_0x477f3a,_0x374423['attributes'][_0x7da05f(0x143)]=_0x477f3a!==_0x7da05f(0x1da)),_0x40f8c4[_0x7da05f(0x148)]&&(_0x374423[_0x7da05f(0x1cf)]={'parentFolder':{'data':{'id':_0x40f8c4[_0x7da05f(0x148)],'type':'folder'}}}),_0x374423;}async function convertYamlStageToApi(_0x5f5a95,_0x453cef,_0x2d863c={},_0x41d77c={}){const _0x5b620e=a151_0x468e,_0x1d3e93={'name':_0x5f5a95[_0x5b620e(0x15c)]};_0x5f5a95['id']&&(_0x1d3e93['id']=_0x5f5a95['id']);_0x5f5a95['description']&&(_0x1d3e93[_0x5b620e(0x174)]=_0x5f5a95['description']);_0x5f5a95[_0x5b620e(0x146)]&&(_0x1d3e93['entryCriteria']=await convertYamlCriteriaToApi(_0x5f5a95[_0x5b620e(0x146)],_0x453cef,_0x2d863c));_0x5f5a95['exit_criteria']&&_0x5f5a95['exit_criteria'][_0x5b620e(0x193)]>0x0&&(_0x1d3e93[_0x5b620e(0x149)]=await Promise[_0x5b620e(0x137)](_0x5f5a95[_0x5b620e(0x1b4)][_0x5b620e(0x160)](_0xbc17c8=>convertYamlCriteriaToApi(_0xbc17c8,_0x453cef,_0x2d863c))));_0x5f5a95[_0x5b620e(0x17c)]&&(_0x1d3e93['milestone']=await convertYamlCriteriaToApi(_0x5f5a95[_0x5b620e(0x17c)],_0x453cef,_0x2d863c));if(_0x5f5a95['steps']&&_0x5f5a95[_0x5b620e(0x1ac)][_0x5b620e(0x193)]>0x0){const _0x4a79b5={},_0x963a5e=_0x5f5a95[_0x5b620e(0x1ac)][_0x5b620e(0x160)]((_0x56504b,_0x3c8701)=>{const _0x121b47=_0x5b620e,_0x4d7872=_0x56504b[_0x121b47(0x1d4)]||generateUUID(),_0x6ab4e5=_0x56504b[_0x121b47(0x15c)]||_0x56504b[_0x121b47(0x183)]+'_'+_0x3c8701;return _0x4a79b5[_0x6ab4e5]=_0x4d7872,{..._0x56504b,'name':_0x6ab4e5};});_0x1d3e93[_0x5b620e(0x1c2)]=_0x4a79b5[_0x963a5e[0x0][_0x5b620e(0x15c)]],_0x1d3e93[_0x5b620e(0x1ac)]={};for(let _0x12503a=0x0;_0x12503a<_0x963a5e['length'];_0x12503a++){const _0x135235=_0x963a5e[_0x12503a],_0x5791a7=_0x4a79b5[_0x135235[_0x5b620e(0x15c)]],_0x1825ba=!_0x135235['next']&&_0x12503a<_0x963a5e[_0x5b620e(0x193)]-0x1&&_0x135235[_0x5b620e(0x183)]!==_0x5b620e(0x16b)?_0x963a5e[_0x12503a+0x1][_0x5b620e(0x15c)]:_0x135235['next'],_0x5d76f1=_0x1825ba!==_0x135235['next']?{..._0x135235,'next':_0x1825ba}:_0x135235;_0x1d3e93[_0x5b620e(0x1ac)][_0x5791a7]=await convertYamlStepToApi(_0x5d76f1,_0x453cef,_0x2d863c,_0x4a79b5,_0x41d77c);}}else _0x5f5a95[_0x5b620e(0x180)]&&(_0x1d3e93[_0x5b620e(0x1c2)]=_0x5f5a95[_0x5b620e(0x180)]);return _0x1d3e93;}async function convertYamlCriteriaToApi(_0x216d2b,_0x41154d,_0x5a6c2e={}){const _0x44eba5=a151_0x468e;let _0x295c94=_0x216d2b['segment'];if(_0x295c94&&!/^\d+$/[_0x44eba5(0x153)](_0x295c94)){const _0xc6417c=parseSegmentRef(_0x295c94);if(_0xc6417c['type']==='ref')_0x41154d?.[_0x44eba5(0x169)]&&(_0x295c94=await _0x41154d[_0x44eba5(0x169)](_0xc6417c[_0x44eba5(0x15c)]));else{if(_0xc6417c[_0x44eba5(0x183)]===_0x44eba5(0x13d)&&_0x5a6c2e[_0xc6417c['name']])_0x41154d?.[_0x44eba5(0x152)]&&(_0x295c94=await _0x41154d['resolveEmbeddedSegmentId'](_0xc6417c[_0x44eba5(0x15c)],_0x5a6c2e[_0xc6417c['name']]));else _0x41154d?.[_0x44eba5(0x169)]&&(_0x295c94=await _0x41154d[_0x44eba5(0x169)](_0xc6417c[_0x44eba5(0x15c)]));}}const _0x22aa73={'name':_0x216d2b[_0x44eba5(0x15c)],'segmentId':_0x295c94};_0x216d2b[_0x44eba5(0x174)]&&(_0x22aa73[_0x44eba5(0x174)]=_0x216d2b['description']);if(_0x216d2b[_0x44eba5(0x15b)]){const _0x50c55c=_0x216d2b[_0x44eba5(0x15b)][_0x44eba5(0x1a2)],_0x57a453=_0x216d2b['target'][_0x44eba5(0x1ad)];let _0x23ca55=_0x216d2b['target'][_0x44eba5(0x1a2)];_0x41154d?.[_0x44eba5(0x173)]&&!/^\d+$/[_0x44eba5(0x153)](_0x23ca55)&&(_0x23ca55=await _0x41154d[_0x44eba5(0x173)](_0x23ca55));let _0x1fab3a=_0x216d2b[_0x44eba5(0x15b)]['stage'];_0x41154d?.[_0x44eba5(0x155)]&&!/^\d+$/[_0x44eba5(0x153)](_0x1fab3a)&&(_0x1fab3a=await _0x41154d[_0x44eba5(0x155)](_0x23ca55,_0x1fab3a));const _0x463725=!/^\d+$/['test'](_0x50c55c)&&!isLocalJourneyRef(_0x50c55c)?formatApiJourneyName(_0x50c55c,_0x57a453):undefined;_0x22aa73[_0x44eba5(0x15b)]={'journeyId':_0x23ca55,'journeyStageId':_0x1fab3a,'journeyName':_0x463725,'confirmed':!![]},_0x216d2b[_0x44eba5(0x15b)]['bundle_id']&&(_0x22aa73['target'][_0x44eba5(0x14a)]=_0x216d2b[_0x44eba5(0x15b)][_0x44eba5(0x1db)]);}return _0x22aa73;}async function convertYamlStepToApi(_0x560721,_0x559968,_0x100462={},_0xb3fb9c={},_0x413b62={}){const _0x519186=a151_0x468e,_0x331b2b=async _0x33f58c=>{const _0x930f9a=a151_0x468e;if(/^\d+$/['test'](_0x33f58c))return _0x33f58c;const _0x43185b=parseSegmentRef(_0x33f58c);if(_0x43185b[_0x930f9a(0x183)]===_0x930f9a(0x1df)){if(_0x559968?.['resolveSegmentId'])return await _0x559968[_0x930f9a(0x169)](_0x43185b[_0x930f9a(0x15c)]);}else{if(_0x43185b[_0x930f9a(0x183)]===_0x930f9a(0x13d)&&_0x100462[_0x43185b[_0x930f9a(0x15c)]]){if(_0x559968?.[_0x930f9a(0x152)])return await _0x559968[_0x930f9a(0x152)](_0x43185b[_0x930f9a(0x15c)],_0x100462[_0x43185b['name']]);}else{if(_0x559968?.[_0x930f9a(0x169)])return await _0x559968[_0x930f9a(0x169)](_0x43185b[_0x930f9a(0x15c)]);}}return _0x33f58c;},_0x668561=async _0x57a540=>{const _0x4d11d7=a151_0x468e;if(/^\d+$/[_0x4d11d7(0x153)](_0x57a540))return _0x57a540;const _0x4c7deb=parseSegmentRef(_0x57a540);if(_0x4c7deb['type']==='ref'){if(_0x559968?.['resolveActivationId'])return await _0x559968['resolveActivationId'](_0x4c7deb[_0x4d11d7(0x15c)]);return _0x4c7deb[_0x4d11d7(0x15c)];}else{if(_0x4c7deb[_0x4d11d7(0x183)]===_0x4d11d7(0x13d)&&_0x413b62[_0x4c7deb['name']]){if(_0x559968?.[_0x4d11d7(0x1bc)])return await _0x559968['resolveEmbeddedActivationId'](_0x4c7deb[_0x4d11d7(0x15c)],_0x413b62[_0x4c7deb[_0x4d11d7(0x15c)]]);if(_0x559968?.[_0x4d11d7(0x1d7)])return await _0x559968['resolveActivationId'](_0x4c7deb['name']);}else{if(_0x559968?.[_0x4d11d7(0x1d7)])return await _0x559968['resolveActivationId'](_0x4c7deb[_0x4d11d7(0x15c)]);}}return _0x57a540;},_0x5256bf=_0xf58ad9=>{if(!_0xf58ad9)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0xf58ad9))return _0xf58ad9;return _0xb3fb9c[_0xf58ad9]||_0xf58ad9;};switch(_0x560721[_0x519186(0x183)]){case'wait':{const _0x22f203=_0x560721,_0x1822d5=_0x22f203[_0x519186(0x178)],_0x24ef39={'type':_0x519186(0x199),'name':_0x22f203['name'],'next':_0x5256bf(_0x22f203[_0x519186(0x171)])};if(_0x1822d5[_0x519186(0x186)]!==undefined&&_0x1822d5[_0x519186(0x1b6)])_0x24ef39[_0x519186(0x18e)]=_0x519186(0x1c9),_0x24ef39[_0x519186(0x1be)]=_0x1822d5['duration'],_0x24ef39['waitStepUnit']=normalizeWaitUnit(_0x1822d5['unit']);else{if(_0x1822d5[_0x519186(0x1c1)])_0x24ef39['waitStepType']=_0x519186(0x1b8),_0x24ef39[_0x519186(0x175)]=_0x1822d5['wait_until'];else{if(_0x1822d5[_0x519186(0x145)])_0x24ef39[_0x519186(0x18e)]=_0x519186(0x1ee),_0x24ef39[_0x519186(0x157)]=_0x1822d5[_0x519186(0x145)];else{if(_0x1822d5['condition']){_0x24ef39[_0x519186(0x18e)]='Condition';const _0x438bc6=await _0x331b2b(_0x1822d5[_0x519186(0x18d)][_0x519186(0x1f1)]),_0x6ae500=_0x1822d5[_0x519186(0x18d)][_0x519186(0x1e2)]?.[_0x519186(0x171)]!==undefined;if(_0x6ae500){const _0x4a929e=[];_0x4a929e['push']({'id':generateUUID(),'segmentId':_0x438bc6,'timedOutPath':![],'name':_0x519186(0x1ca),'next':_0x5256bf(_0x1822d5['condition'][_0x519186(0x171)]??_0x22f203[_0x519186(0x171)])});if(_0x1822d5['condition'][_0x519186(0x1e2)]){const _0x363751=_0x1822d5['condition'][_0x519186(0x1e2)]['duration'],_0x2142e2=normalizeWaitUnit(_0x1822d5['condition'][_0x519186(0x1e2)][_0x519186(0x1b6)]);_0x4a929e[_0x519186(0x16a)]({'id':generateUUID(),'timedOutPath':!![],'name':_0x519186(0x1dc)+_0x363751+'\x20'+_0x2142e2,'moveAfter':_0x363751,'unit':_0x2142e2,'next':_0x5256bf(_0x1822d5[_0x519186(0x18d)][_0x519186(0x1e2)][_0x519186(0x171)])});}_0x24ef39['conditions']=_0x4a929e,delete _0x24ef39[_0x519186(0x171)];}else _0x24ef39[_0x519186(0x16c)]=_0x438bc6,_0x1822d5[_0x519186(0x18d)]['timeout']&&(_0x24ef39[_0x519186(0x14d)]=_0x1822d5[_0x519186(0x18d)]['timeout'][_0x519186(0x186)],_0x1822d5[_0x519186(0x18d)][_0x519186(0x1e2)][_0x519186(0x1b6)]&&(_0x24ef39[_0x519186(0x1a4)]=normalizeWaitUnit(_0x1822d5[_0x519186(0x18d)]['timeout']['unit'])));}}}}return _0x24ef39;}case _0x519186(0x14f):{const _0x375dea=_0x560721,_0x4d91e0=_0x375dea[_0x519186(0x178)][_0x519186(0x14f)],_0x3cdddb=await _0x668561(_0x4d91e0);return{'type':_0x519186(0x195),'name':_0x375dea[_0x519186(0x15c)],'journeyActivationStepId':_0x3cdddb,'next':_0x5256bf(_0x375dea['next'])};}case _0x519186(0x182):{const _0x5d92f2=_0x560721,_0x483258=_0x5d92f2[_0x519186(0x178)]['branches'];return{'type':'DecisionPoint','name':_0x5d92f2[_0x519186(0x15c)],'branches':await Promise[_0x519186(0x137)](_0x483258[_0x519186(0x160)](async _0x25e87c=>{const _0x5867c3=_0x519186;let _0x140b63='';if(!_0x25e87c[_0x5867c3(0x1a5)]){const _0x21361c=_0x25e87c[_0x5867c3(0x1f1)]||_0x25e87c[_0x5867c3(0x1d5)]||'';_0x140b63=_0x21361c?await _0x331b2b(_0x21361c):'';}return{'id':crypto[_0x5867c3(0x177)](),'name':_0x25e87c['name'],'description':null,'segmentId':_0x140b63,'excludedPath':_0x25e87c[_0x5867c3(0x1a5)]??![],'next':_0x5256bf(_0x25e87c[_0x5867c3(0x171)])};})),'next':_0x5256bf(_0x5d92f2['next'])};}case _0x519186(0x1c8):{const _0x29af1f=_0x560721,_0x496c20=_0x29af1f[_0x519186(0x178)];return{'type':_0x519186(0x1ab),'name':_0x29af1f['name'],'customizedSplit':_0x496c20[_0x519186(0x179)],'uniqueId':_0x496c20['unique_id'],'variants':_0x496c20[_0x519186(0x1a9)][_0x519186(0x160)](_0x4ed656=>({'id':_0x4ed656['id']||generateUUID(),'name':_0x4ed656['name'],'percentage':_0x4ed656[_0x519186(0x1cc)],'next':_0x5256bf(_0x4ed656[_0x519186(0x171)])})),'next':_0x5256bf(_0x29af1f[_0x519186(0x171)])};}case'merge':return{'type':'Merge','name':_0x560721[_0x519186(0x15c)],'next':_0x5256bf(_0x560721[_0x519186(0x171)])};case _0x519186(0x1af):{const _0x56caf5=_0x560721,_0x84366a=_0x56caf5['with'][_0x519186(0x15b)],_0x383f94=_0x84366a['journey'],_0x3a8a0d=_0x84366a[_0x519186(0x1ad)];let _0x4b65c2=_0x84366a[_0x519186(0x1a2)];_0x559968?.['resolveJourneyId']&&!/^\d+$/['test'](_0x4b65c2)&&(_0x4b65c2=await _0x559968['resolveJourneyId'](_0x4b65c2));let _0xb083e2=_0x84366a[_0x519186(0x1ad)];_0x559968?.[_0x519186(0x155)]&&!/^\d+$/[_0x519186(0x153)](_0xb083e2)&&(_0xb083e2=await _0x559968[_0x519186(0x155)](_0x4b65c2,_0xb083e2));const _0x20f74a=!/^\d+$/['test'](_0x383f94)&&!isLocalJourneyRef(_0x383f94)?formatApiJourneyName(_0x383f94,_0x3a8a0d):undefined;return{'type':'Jump','name':_0x56caf5[_0x519186(0x15c)],'target':{'journeyId':_0x4b65c2,'journeyStageId':_0xb083e2,'journeyBundleId':_0x84366a[_0x519186(0x1db)],'journeyName':_0x20f74a,'confirmed':!![]},'next':_0x5256bf(_0x56caf5[_0x519186(0x171)])};}case'end':return{'type':_0x519186(0x1c3),'name':_0x560721[_0x519186(0x15c)]};default:{const _0x269784=_0x560721;return{'type':_0x519186(0x1c3),'name':_0x269784['name']};}}}export function toYamlString(_0x2861c9){const _0x3c5997=a151_0x468e,_0x475375=stripInternalFields(_0x2861c9),_0x2383a3=a151_0x358dec['stringify'](_0x475375,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x3c5997(0x1e5)}),_0x23982c=[_0x3c5997(0x1d9),'activations:','goal:',_0x3c5997(0x190),'journeys:',_0x3c5997(0x198),_0x3c5997(0x1b0)];let _0x5ebeb9=_0x2383a3;for(const _0x27f332 of _0x23982c){_0x5ebeb9=_0x5ebeb9[_0x3c5997(0x1ef)](new RegExp('^('+_0x27f332+')','m'),(_0x2bd3de,_0x1c5761,_0x4c0725)=>{if(_0x4c0725===0x0||_0x5ebeb9[_0x4c0725-0x1]==='\x0a'&&_0x5ebeb9[_0x4c0725-0x2]==='\x0a')return _0x1c5761;return'\x0a'+_0x1c5761;});}return _0x5ebeb9;}function stripInternalFields(_0x93b861){const _0x47dc2b=a151_0x468e,{id:_0x5b7881,folder_id:_0x542b71,bundle_id:_0xed7015,bundle_name:_0x2a0769,version:_0xd63434,allow_reentry:_0x172790,..._0x4f871f}=_0x93b861;return _0x4f871f[_0x47dc2b(0x1a1)]&&(_0x4f871f['journeys']=_0x4f871f[_0x47dc2b(0x1a1)]['map'](_0x4e42e8=>{const _0x1047b7=_0x47dc2b,{id:_0x2e1f40,..._0x1a2681}=_0x4e42e8;return{..._0x1a2681,'stages':_0x1a2681[_0x1047b7(0x15e)][_0x1047b7(0x160)](stripStageInternalFields),..._0x4e42e8[_0x1047b7(0x19c)]===!![]?{'latest':!![]}:{},..._0x4f871f[_0x1047b7(0x1a1)][_0x1047b7(0x193)]===0x1&&_0x1a2681['version']==='v1'?{'version':undefined}:{}};})),_0x4f871f[_0x47dc2b(0x15e)]&&(_0x4f871f[_0x47dc2b(0x15e)]=_0x4f871f[_0x47dc2b(0x15e)][_0x47dc2b(0x160)](stripStageInternalFields)),_0x4f871f[_0x47dc2b(0x136)]&&(_0x4f871f[_0x47dc2b(0x136)]=_0x4f871f[_0x47dc2b(0x136)][_0x47dc2b(0x160)](_0x1b55c1=>{const _0xcd8309=_0x47dc2b,{id:_0x27627f,..._0x11286e}=_0x1b55c1;return{..._0x11286e,'stages':_0x11286e[_0xcd8309(0x15e)]['map'](stripStageInternalFields),..._0x1b55c1[_0xcd8309(0x19c)]===!![]?{'latest':!![]}:{}};})),_0x4f871f;}function stripStageInternalFields(_0x2f4c53){const {id:_0x2f1ce6,..._0x1906ad}=_0x2f4c53;return _0x1906ad;}export function parseYamlString(_0x32d945){return safeParseYaml(_0x32d945,JourneyDefSchema);}export function isJourneyDef(_0x8666f5,_0x68d12){const _0x12ded3=a151_0x468e;if(_0x68d12&&(_0x68d12['endsWith'](_0x12ded3(0x144))||_0x68d12[_0x12ded3(0x17b)]('.journey.yaml')))return!![];return typeof _0x8666f5===_0x12ded3(0x1f2)&&_0x8666f5!==null&&_0x12ded3(0x183)in _0x8666f5&&_0x8666f5[_0x12ded3(0x183)]===_0x12ded3(0x1a2);}export function generateTemplate(_0xfbcf80,_0x196999){const _0x4da7e8=a151_0x468e,_0x5fbdd0={'type':'journey','name':_0xfbcf80,'description':_0x4da7e8(0x1dd),'reentry':_0x4da7e8(0x1da),'goal':{'name':'Goal\x20Achieved','segment':_0x4da7e8(0x163)},'stages':[{'name':_0x4da7e8(0x13e),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0x196999},'steps':[{'type':_0x4da7e8(0x1d8),'name':_0x4da7e8(0x1b1),'with':{'duration':0x1,'unit':_0x4da7e8(0x1a0)}},{'type':_0x4da7e8(0x14f),'name':_0x4da7e8(0x140),'with':{'activation':_0x4da7e8(0x18a)}},{'type':_0x4da7e8(0x16b),'name':_0x4da7e8(0x1ba)}]}]};return toYamlString(_0x5fbdd0);}function generateUUID(){const _0x120da0=a151_0x468e;return crypto[_0x120da0(0x177)]();}export const SEGMENT_REF_PREFIX=a151_0x837e(0x1c6);export function parseSegmentRef(_0x2f886e){const _0x518596=a151_0x837e;if(_0x2f886e[_0x518596(0x1bb)](SEGMENT_REF_PREFIX))return{'type':_0x518596(0x1df),'name':_0x2f886e[_0x518596(0x1c5)](SEGMENT_REF_PREFIX[_0x518596(0x193)])};if(/^\d+$/[_0x518596(0x153)](_0x2f886e))return{'type':'id','name':_0x2f886e};return{'type':'embedded','name':_0x2f886e};}export function makeSegmentRef(_0x35f6bd){return''+SEGMENT_REF_PREFIX+_0x35f6bd;}export function isExternalSegmentRef(_0x14c14c){const _0x1850ae=a151_0x837e;return _0x14c14c[_0x1850ae(0x1bb)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x32ad4c){const _0x37ff0f=a151_0x837e;return!!(_0x32ad4c[_0x37ff0f(0x1a1)]&&_0x32ad4c['journeys'][_0x37ff0f(0x193)]>0x0);}export function isMultiVersionMode(_0x319a3f){const _0x356bf2=a151_0x837e;return!!(_0x319a3f[_0x356bf2(0x136)]&&_0x319a3f[_0x356bf2(0x136)][_0x356bf2(0x193)]>0x0);}export function isSingleVersionMode(_0xbd5eca){const _0x1b0e2a=a151_0x837e;return!!(_0xbd5eca[_0x1b0e2a(0x15e)]&&_0xbd5eca['stages'][_0x1b0e2a(0x193)]>0x0);}export function hasMultipleVersions(_0x589960){const _0x59d53c=a151_0x837e;if(isJourneysArrayMode(_0x589960))return(_0x589960[_0x59d53c(0x1a1)]?.[_0x59d53c(0x193)]||0x0)>0x1;if(isMultiVersionMode(_0x589960))return(_0x589960['versions']?.[_0x59d53c(0x193)]||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x286c66){const _0x308f61=a151_0x837e;if(isJourneysArrayMode(_0x286c66))return _0x286c66;if(isSingleVersionMode(_0x286c66)){const {stages:_0x1c2763,id:_0x56b455,version:_0x181182,version_number:_0x52a2fb,..._0x424f60}=_0x286c66;return{..._0x424f60,'journeys':[{'version':_0x181182||'v1','stages':_0x1c2763||[],'id':_0x56b455,'version_number':_0x52a2fb}]};}if(isMultiVersionMode(_0x286c66)){const {versions:_0x36f94c,..._0x3414bf}=_0x286c66;return{..._0x3414bf,'journeys':(_0x36f94c||[])[_0x308f61(0x160)](_0x432e08=>({'version':_0x432e08[_0x308f61(0x15c)],'state':_0x432e08[_0x308f61(0x1b9)],'latest':_0x432e08['latest'],'stages':_0x432e08[_0x308f61(0x15e)],'id':_0x432e08['id'],'version_number':_0x432e08['version_number']}))};}return _0x286c66;}export function normalizeJourneyDef(_0x21a884,_0x207b22){const _0x236723=a151_0x837e,_0x48f93b=normalizeToJourneysFormat(_0x21a884),_0x1a940=_0x207b22?.['segments']?Object[_0x236723(0x18f)](_0x207b22[_0x236723(0x172)]):undefined,_0x22f2ec=_0x207b22?.[_0x236723(0x1ce)]?Object[_0x236723(0x18f)](_0x207b22[_0x236723(0x1ce)]):undefined;return{'type':_0x236723(0x1a2),'name':_0x48f93b[_0x236723(0x15c)],..._0x48f93b['description']!==undefined&&{'description':_0x48f93b[_0x236723(0x174)]},..._0x48f93b[_0x236723(0x15d)]&&{'goal':normalizeJourneyCriteria(_0x48f93b['goal'])},..._0x48f93b[_0x236723(0x196)]!==undefined&&{'reentry':_0x48f93b[_0x236723(0x196)]},..._0x48f93b[_0x236723(0x172)]&&{'segments':normalizeEmbeddedSegments(_0x48f93b['segments'],_0x1a940)},..._0x48f93b[_0x236723(0x1ce)]&&{'activations':normalizeEmbeddedActivations(_0x48f93b['activations'],_0x22f2ec)},..._0x48f93b['journeys']&&{'journeys':_0x48f93b[_0x236723(0x1a1)][_0x236723(0x160)](_0x6cb878=>normalizeJourneyEntry(_0x6cb878,_0x48f93b[_0x236723(0x1a1)]['length']===0x1))}};}function normalizeJourneyEntry(_0x17b2dd,_0x6881fb){const _0x2496d6=a151_0x837e;return{...!_0x6881fb&&_0x17b2dd[_0x2496d6(0x18c)]!==undefined&&{'version':_0x17b2dd['version']},..._0x17b2dd[_0x2496d6(0x1b9)]!==undefined&&{'state':_0x17b2dd[_0x2496d6(0x1b9)]},...!_0x6881fb&&_0x17b2dd[_0x2496d6(0x19c)]!==undefined&&{'latest':_0x17b2dd['latest']},..._0x17b2dd[_0x2496d6(0x1f0)]!==undefined&&{'version_number':_0x17b2dd['version_number']},..._0x17b2dd[_0x2496d6(0x15d)]&&{'goal':normalizeJourneyCriteria(_0x17b2dd['goal'])},..._0x17b2dd['reentry']!==undefined&&{'reentry':_0x17b2dd[_0x2496d6(0x196)]},'stages':_0x17b2dd[_0x2496d6(0x15e)]['map'](normalizeJourneyStage)};}function normalizeJourneyStage(_0xf85cb6){const _0x102a5a=a151_0x837e;return{'name':_0xf85cb6[_0x102a5a(0x15c)],..._0xf85cb6[_0x102a5a(0x174)]!==undefined&&{'description':_0xf85cb6[_0x102a5a(0x174)]},..._0xf85cb6[_0x102a5a(0x146)]&&{'entry_criteria':normalizeJourneyCriteria(_0xf85cb6[_0x102a5a(0x146)])},..._0xf85cb6[_0x102a5a(0x1b4)]&&{'exit_criteria':_0xf85cb6[_0x102a5a(0x1b4)][_0x102a5a(0x160)](normalizeJourneyCriteria)},..._0xf85cb6['milestone']&&{'milestone':normalizeJourneyCriteria(_0xf85cb6[_0x102a5a(0x17c)])},..._0xf85cb6[_0x102a5a(0x1ac)]&&{'steps':normalizeStepsWithImplicitNext(_0xf85cb6['steps'])}};}function normalizeStepsWithImplicitNext(_0x4b0356){return _0x4b0356['map']((_0x461ff5,_0x2f0ded)=>{const _0x5f14ef=a151_0x468e,_0x2f85fb=_0x2f0ded<_0x4b0356['length']-0x1?_0x4b0356[_0x2f0ded+0x1][_0x5f14ef(0x15c)]:undefined;return normalizeJourneyStep(_0x461ff5,_0x2f85fb);});}function normalizeJourneyCriteria(_0x5d9d75){const _0x1d74b5=a151_0x837e;return{'name':_0x5d9d75[_0x1d74b5(0x15c)],..._0x5d9d75['description']!==undefined&&{'description':_0x5d9d75[_0x1d74b5(0x174)]},'segment':_0x5d9d75[_0x1d74b5(0x1f1)],..._0x5d9d75[_0x1d74b5(0x15b)]&&{'target':normalizeJumpTarget(_0x5d9d75[_0x1d74b5(0x15b)])}};}function normalizeJourneyStep(_0x486dd5,_0x10daa6){const _0x375fce=a151_0x837e,_0x4eabf6=_0x486dd5[_0x375fce(0x171)]!==undefined&&_0x486dd5['next']!==_0x10daa6,_0x14281c={'type':_0x486dd5['type'],'name':_0x486dd5[_0x375fce(0x15c)],..._0x4eabf6&&{'next':_0x486dd5['next']}};if(_0x375fce(0x178)in _0x486dd5&&_0x486dd5[_0x375fce(0x178)])return{..._0x14281c,'with':normalizeStepParams(_0x486dd5[_0x375fce(0x183)],_0x486dd5[_0x375fce(0x178)])};return _0x14281c;}function normalizeStepParams(_0x1a1c3f,_0x166b18){const _0xd713e2=a151_0x837e;switch(_0x1a1c3f){case _0xd713e2(0x1d8):{const _0x26641b=_0x166b18;let _0x766f76;return _0x26641b[_0xd713e2(0x18d)]&&(_0x766f76={'segment':_0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x1f1)],..._0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x171)]!==undefined&&{'next':_0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x171)]},..._0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x1e2)]&&{'timeout':{'duration':_0x26641b['condition'][_0xd713e2(0x1e2)][_0xd713e2(0x186)],'unit':_0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x1e2)]['unit'],..._0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x1e2)][_0xd713e2(0x171)]!==undefined&&{'next':_0x26641b[_0xd713e2(0x18d)][_0xd713e2(0x1e2)]['next']}}}}),{..._0x26641b['duration']!==undefined&&{'duration':_0x26641b[_0xd713e2(0x186)]},..._0x26641b[_0xd713e2(0x1b6)]!==undefined&&{'unit':_0x26641b[_0xd713e2(0x1b6)]},..._0x26641b['wait_until']!==undefined&&{'wait_until':_0x26641b[_0xd713e2(0x1c1)]},..._0x26641b['days_of_week']!==undefined&&{'days_of_week':_0x26641b[_0xd713e2(0x145)]},..._0x766f76&&{'condition':_0x766f76}};}case'activation':{const _0x34f8c2=_0x166b18;return{'activation':_0x34f8c2[_0xd713e2(0x14f)]};}case'decision_point':{const _0x9eeadb=_0x166b18;return{'branches':_0x9eeadb[_0xd713e2(0x1c4)][_0xd713e2(0x160)](normalizeDecisionBranch)};}case _0xd713e2(0x1c8):{const _0x1383a6=_0x166b18;return{..._0x1383a6[_0xd713e2(0x179)]!==undefined&&{'customized_split':_0x1383a6[_0xd713e2(0x179)]},..._0x1383a6[_0xd713e2(0x170)]!==undefined&&{'unique_id':_0x1383a6[_0xd713e2(0x170)]},'variants':_0x1383a6['variants'][_0xd713e2(0x160)](normalizeAbTestVariant)};}case _0xd713e2(0x1af):{const _0x4585ef=_0x166b18;return{'target':normalizeJumpTarget(_0x4585ef[_0xd713e2(0x15b)])};}default:return _0x166b18;}}function normalizeDecisionBranch(_0x375b26){const _0x11d32b=a151_0x837e;return{'name':_0x375b26[_0x11d32b(0x15c)],..._0x375b26[_0x11d32b(0x1f1)]!==undefined&&{'segment':_0x375b26[_0x11d32b(0x1f1)]},..._0x375b26[_0x11d32b(0x1a5)]!==undefined&&{'excluded':_0x375b26[_0x11d32b(0x1a5)]},..._0x375b26['next']!==undefined&&{'next':_0x375b26[_0x11d32b(0x171)]}};}function a151_0x4258(){const _0x2e7013=['match','5306508xIvhTn','set','journeyActivationStepId','merge','stageId','definition','resolveActivationName','DaysOfTheWeek','replace','version_number','segment','object','Variant','find','versions','all','customizedSplit','toLowerCase','conditions','2747715KdEkzo','Expected\x20format:\x0a','embedded','Stage\x201','all_columns','Send\x20Notification','\x27:\x20','JOURNEY_SYNTAX_ERROR','allowReentry','.journey.yml','days_of_week','entry_criteria','has','folder_id','exitCriterias','journeyBundleId','entryCriteria','rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a','conditionTimeoutDuration','versionNumber','activation','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','data','resolveEmbeddedSegmentId','test','\x20\x20\x20\x20type:\x20And\x0a','resolveStageId','segmentId','daysOfWeek','behavior','schedule','\x20\x20\x20\x20conditions:\x0a','target','name','goal','stages','rule','map','notification','shift','goal-segment','stageName','from','\x20\x20rule:\x0a','connection','8537165LTcwxd','resolveSegmentId','push','end','conditionSegmentId','resolveSegmentName','105wTipYX','28144RyYJux','unique_id','next','segments','resolveJourneyId','description','waitUntilDate','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','randomUUID','with','customized_split','timedOutPath','endsWith','milestone','add','waitStepUnit','resolveJumpTarget','root_step','resolveSegment','decision_point','type','includes','reentryMode','duration','exitCriteria','isArray','journeyName','your-activation-name','weeks','version','condition','waitStepType','keys','reentry:','size','\x20\x20\x20\x20type:\x20','length','moveAfter','Activation','reentry','trim','stages:','WaitStep','DecisionPoint','entries','latest','filter','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','connector_config','day','journeys','journey','days','conditionTimeoutUnit','excluded','isJourneyLocal','journeyBundleName','resolveActivation','variants','attributes','ABTest','steps','stage','sort','jump','versions:','Wait\x201\x20Day','journeyStageId','rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27','exit_criteria','activation_template_id','unit','10725416YgWZUM','Date','state','Stage\x20Complete','startsWith','resolveEmbeddedActivationId','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','waitStep','draft','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','wait_until','rootStep','End','branches','slice','ref:','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','ab_test','Duration','Met\x20condition(s)','Condition','percentage','Merge','activations','relationships','journeyStages','parentFolder','Unknown\x20segment\x20\x22','get','uuid','segment_id','columns','resolveActivationId','wait','segments:','no_reentry','bundle_id','*Max\x20wait\x20','Journey\x20description','3180945JifqgV','ref','Composite','3186582CNMQOF','timeout','week','journeyId','null'];a151_0x4258=function(){return _0x2e7013;};return a151_0x4258();}function normalizeAbTestVariant(_0x162307){const _0x3cdbbb=a151_0x837e;return{..._0x162307['id']!==undefined&&{'id':_0x162307['id']},'name':_0x162307[_0x3cdbbb(0x15c)],'percentage':_0x162307[_0x3cdbbb(0x1cc)],..._0x162307['next']!==undefined&&{'next':_0x162307['next']}};}function normalizeJumpTarget(_0x286e0c){const _0x46563e=a151_0x837e;return{'journey':_0x286e0c[_0x46563e(0x1a2)],'stage':_0x286e0c[_0x46563e(0x1ad)],..._0x286e0c[_0x46563e(0x1db)]!==undefined&&{'bundle_id':_0x286e0c[_0x46563e(0x1db)]}};}function normalizeEmbeddedSegments(_0xea7633,_0x3973fd){const _0xb5092e=a151_0x837e,_0x3101b1={},_0x2f8a02=Object[_0xb5092e(0x18f)](_0xea7633),_0x190b8c=_0x3973fd?[..._0x3973fd[_0xb5092e(0x19d)](_0x46de26=>_0x2f8a02[_0xb5092e(0x184)](_0x46de26)),..._0x2f8a02[_0xb5092e(0x19d)](_0x2ba51d=>!_0x3973fd['includes'](_0x2ba51d))[_0xb5092e(0x1ae)]()]:_0x2f8a02['sort']();for(const _0x5d1baa of _0x190b8c){const _0x1d2762=_0xea7633[_0x5d1baa];if(_0x1d2762[_0xb5092e(0x15f)]){const _0x525862=_0x1d2762['rule'];if(_0x525862[_0xb5092e(0x183)]!=='And'&&_0x525862[_0xb5092e(0x183)]!=='Or'&&_0x525862[_0xb5092e(0x183)]!==_0xb5092e(0x1e0)){const _0x10fd63=_0x525862[_0xb5092e(0x183)]??'(missing)';throw new SDKError(ErrorCode[_0xb5092e(0x142)],_0xb5092e(0x19e)+_0x5d1baa+_0xb5092e(0x141)+(_0xb5092e(0x1b3)+_0x10fd63+'\x27.\x0a')+'Expected\x20format:\x0a'+_0xb5092e(0x166)+_0xb5092e(0x154)+_0xb5092e(0x15a)+_0xb5092e(0x1c7)+_0xb5092e(0x1c0)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x525862[_0xb5092e(0x13a)]||!Array[_0xb5092e(0x188)](_0x525862['conditions']))throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0xb5092e(0x19e)+_0x5d1baa+_0xb5092e(0x141)+_0xb5092e(0x14c)+_0xb5092e(0x13c)+'\x20\x20rule:\x0a'+(_0xb5092e(0x192)+_0x525862['type']+'\x0a')+_0xb5092e(0x15a)+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a'+_0xb5092e(0x150));}_0x3101b1[_0x5d1baa]={..._0x1d2762[_0xb5092e(0x174)]&&_0x1d2762['description'][_0xb5092e(0x197)]()&&{'description':_0x1d2762[_0xb5092e(0x174)]},..._0x1d2762[_0xb5092e(0x15f)]&&{'rule':deepSortObject(_0x1d2762[_0xb5092e(0x15f)])}};}return _0x3101b1;}function normalizeEmbeddedActivations(_0x5e9d64,_0x42973e){const _0x18fc53=a151_0x837e,_0x4f9bf9={},_0x274df4=Object[_0x18fc53(0x18f)](_0x5e9d64),_0x51d7d7=_0x42973e?[..._0x42973e[_0x18fc53(0x19d)](_0x33b629=>_0x274df4[_0x18fc53(0x184)](_0x33b629)),..._0x274df4[_0x18fc53(0x19d)](_0x174567=>!_0x42973e[_0x18fc53(0x184)](_0x174567))[_0x18fc53(0x1ae)]()]:_0x274df4[_0x18fc53(0x1ae)]();for(const _0x351d5d of _0x51d7d7){const _0x21ea50=_0x5e9d64[_0x351d5d];_0x4f9bf9[_0x351d5d]={'name':_0x21ea50[_0x18fc53(0x15c)],'connection':_0x21ea50[_0x18fc53(0x167)],..._0x21ea50[_0x18fc53(0x174)]!==undefined&&{'description':_0x21ea50[_0x18fc53(0x174)]},..._0x21ea50[_0x18fc53(0x13f)]!==undefined&&{'all_columns':_0x21ea50[_0x18fc53(0x13f)]},..._0x21ea50[_0x18fc53(0x1d6)]!==undefined&&{'columns':_0x21ea50[_0x18fc53(0x1d6)]},..._0x21ea50[_0x18fc53(0x158)]!==undefined&&{'behavior':_0x21ea50[_0x18fc53(0x158)]},..._0x21ea50[_0x18fc53(0x159)]!==undefined&&{'schedule':_0x21ea50[_0x18fc53(0x159)]},..._0x21ea50[_0x18fc53(0x161)]!==undefined&&{'notification':_0x21ea50[_0x18fc53(0x161)]},..._0x21ea50[_0x18fc53(0x19f)]!==undefined&&{'connector_config':_0x21ea50['connector_config']},..._0x21ea50[_0x18fc53(0x1b5)]!==undefined&&{'activation_template_id':_0x21ea50['activation_template_id']}};}return _0x4f9bf9;}export function getActiveStages(_0x576ee5){const _0x4a37d4=a151_0x837e;if(isJourneysArrayMode(_0x576ee5)){const _0x1cf873=_0x576ee5['journeys']||[],_0x590a95=_0x1cf873['find'](_0x488890=>_0x488890[_0x4a37d4(0x19c)]===!![])||_0x1cf873[0x0];return _0x590a95?.[_0x4a37d4(0x15e)]||[];}if(isSingleVersionMode(_0x576ee5))return _0x576ee5[_0x4a37d4(0x15e)]||[];if(isMultiVersionMode(_0x576ee5)){const _0x445c86=_0x576ee5[_0x4a37d4(0x136)]||[],_0x3c160a=_0x445c86[_0x4a37d4(0x135)](_0x12f6fe=>_0x12f6fe[_0x4a37d4(0x19c)]===!![])||_0x445c86[0x0];return _0x3c160a?.[_0x4a37d4(0x15e)]||[];}return[];}export function getLatestJourneyEntry(_0x1e78ea){const _0x246346=a151_0x837e;if(isJourneysArrayMode(_0x1e78ea)){const _0x48936b=_0x1e78ea[_0x246346(0x1a1)]||[];return _0x48936b[_0x246346(0x135)](_0x456e4a=>_0x456e4a[_0x246346(0x19c)]===!![])||_0x48936b[0x0];}if(isMultiVersionMode(_0x1e78ea)){const _0x420acc=_0x1e78ea[_0x246346(0x136)]||[],_0x3b771b=_0x420acc[_0x246346(0x135)](_0x461e87=>_0x461e87[_0x246346(0x19c)]===!![])||_0x420acc[0x0];if(_0x3b771b)return{'version':_0x3b771b[_0x246346(0x15c)],'state':_0x3b771b[_0x246346(0x1b9)],'latest':_0x3b771b[_0x246346(0x19c)],'stages':_0x3b771b[_0x246346(0x15e)],'id':_0x3b771b['id'],'version_number':_0x3b771b['version_number']};}if(isSingleVersionMode(_0x1e78ea))return{'version':_0x1e78ea['version']||'v1','state':_0x246346(0x1bf),'stages':_0x1e78ea[_0x246346(0x15e)]||[],'id':_0x1e78ea['id'],'version_number':_0x1e78ea[_0x246346(0x1f0)],'goal':_0x1e78ea[_0x246346(0x15d)],'reentry':_0x1e78ea[_0x246346(0x196)]};return undefined;}export function getLatestVersion(_0x4ca505){const _0x4921ab=a151_0x837e;if(!isMultiVersionMode(_0x4ca505))return undefined;const _0x1afc8e=_0x4ca505[_0x4921ab(0x136)]||[];return _0x1afc8e['find'](_0x47320c=>_0x47320c[_0x4921ab(0x19c)]===!![])||_0x1afc8e[0x0];}export function getEffectiveGoal(_0x3a9022){const _0x14e904=a151_0x837e,_0x165ee3=getLatestJourneyEntry(_0x3a9022);return _0x165ee3?.[_0x14e904(0x15d)]||_0x3a9022['goal'];}export function getEffectiveReentry(_0xfab978){const _0x424b09=a151_0x837e,_0x58e0ae=getLatestJourneyEntry(_0xfab978);return _0x58e0ae?.[_0x424b09(0x196)]||_0xfab978[_0x424b09(0x196)];}export function collectSegmentRefs(_0x337fb2){const _0x25a39d=a151_0x837e,_0x42cfed=new Set();_0x337fb2[_0x25a39d(0x15d)]?.[_0x25a39d(0x1f1)]&&_0x42cfed[_0x25a39d(0x17d)](_0x337fb2['goal'][_0x25a39d(0x1f1)]);const _0x31246c=_0xb009da=>{const _0x47b586=_0x25a39d;for(const _0x4bbb66 of _0xb009da){_0x4bbb66[_0x47b586(0x146)]?.[_0x47b586(0x1f1)]&&_0x42cfed[_0x47b586(0x17d)](_0x4bbb66['entry_criteria'][_0x47b586(0x1f1)]);if(_0x4bbb66[_0x47b586(0x1b4)])for(const _0x45d4a1 of _0x4bbb66[_0x47b586(0x1b4)]){_0x45d4a1[_0x47b586(0x1f1)]&&_0x42cfed['add'](_0x45d4a1[_0x47b586(0x1f1)]);}_0x4bbb66['milestone']?.[_0x47b586(0x1f1)]&&_0x42cfed[_0x47b586(0x17d)](_0x4bbb66['milestone']['segment']);if(_0x4bbb66[_0x47b586(0x1ac)])for(const _0x4ad204 of _0x4bbb66['steps']){if(_0x4ad204[_0x47b586(0x183)]==='decision_point'){const _0x55a207=_0x4ad204;for(const _0x25c3ec of _0x55a207[_0x47b586(0x178)][_0x47b586(0x1c4)]){_0x25c3ec[_0x47b586(0x1f1)]&&_0x42cfed[_0x47b586(0x17d)](_0x25c3ec['segment']);}}else{if(_0x4ad204[_0x47b586(0x183)]===_0x47b586(0x1d8)){const _0x54588a=_0x4ad204;_0x54588a[_0x47b586(0x178)][_0x47b586(0x18d)]?.[_0x47b586(0x1f1)]&&_0x42cfed['add'](_0x54588a[_0x47b586(0x178)]['condition'][_0x47b586(0x1f1)]);}}}}};_0x337fb2[_0x25a39d(0x15e)]&&_0x31246c(_0x337fb2[_0x25a39d(0x15e)]);if(_0x337fb2[_0x25a39d(0x136)])for(const _0x235e86 of _0x337fb2[_0x25a39d(0x136)]){_0x31246c(_0x235e86[_0x25a39d(0x15e)]);}return _0x42cfed;}export function validateSegmentRefs(_0x5b87c6){const _0x26dc97=a151_0x837e,_0x159019=[],_0x2c7016=collectSegmentRefs(_0x5b87c6),_0x38393d=new Set(Object[_0x26dc97(0x18f)](_0x5b87c6[_0x26dc97(0x172)]||{}));for(const _0x20cf76 of _0x2c7016){const _0x2b928b=parseSegmentRef(_0x20cf76);_0x2b928b['type']==='embedded'&&!_0x38393d['has'](_0x2b928b[_0x26dc97(0x15c)])&&_0x159019[_0x26dc97(0x16a)](_0x26dc97(0x1d2)+_0x2b928b[_0x26dc97(0x15c)]+_0x26dc97(0x176)+_0x2b928b[_0x26dc97(0x15c)]+_0x26dc97(0x1bd));}return _0x159019;}export function collectSegmentIdsFromJourneyApi(_0x3183e6){const _0x297018=a151_0x837e,_0x4b783c=new Set();_0x3183e6[_0x297018(0x1aa)]['goal']?.['segmentId']&&_0x4b783c[_0x297018(0x17d)](_0x3183e6[_0x297018(0x1aa)][_0x297018(0x15d)][_0x297018(0x156)]);const _0x208889=_0x3183e6[_0x297018(0x1aa)][_0x297018(0x1d0)];if(Array['isArray'](_0x208889))for(const _0x3b0bd3 of _0x208889){_0x3b0bd3[_0x297018(0x14b)]?.[_0x297018(0x156)]&&_0x4b783c[_0x297018(0x17d)](_0x3b0bd3[_0x297018(0x14b)][_0x297018(0x156)]);const _0x49dad8=_0x3b0bd3[_0x297018(0x149)]??_0x3b0bd3[_0x297018(0x187)];if(Array[_0x297018(0x188)](_0x49dad8))for(const _0x548077 of _0x49dad8){_0x548077[_0x297018(0x156)]&&_0x4b783c[_0x297018(0x17d)](_0x548077[_0x297018(0x156)]);}_0x3b0bd3['milestone']?.[_0x297018(0x156)]&&_0x4b783c[_0x297018(0x17d)](_0x3b0bd3[_0x297018(0x17c)][_0x297018(0x156)]);if(_0x3b0bd3[_0x297018(0x1ac)]&&typeof _0x3b0bd3[_0x297018(0x1ac)]===_0x297018(0x1f2)){const _0x41ba15=Array[_0x297018(0x188)](_0x3b0bd3[_0x297018(0x1ac)])?_0x3b0bd3[_0x297018(0x1ac)]:Object['values'](_0x3b0bd3[_0x297018(0x1ac)]);for(const _0x3e238b of _0x41ba15){_0x3e238b['waitCondition']?.[_0x297018(0x156)]&&_0x4b783c[_0x297018(0x17d)](_0x3e238b['waitCondition'][_0x297018(0x156)]);const _0x114dd9=_0x3e238b;_0x114dd9[_0x297018(0x16c)]&&_0x4b783c[_0x297018(0x17d)](_0x114dd9['conditionSegmentId']);if(Array[_0x297018(0x188)](_0x114dd9['conditions']))for(const _0x279dd9 of _0x114dd9[_0x297018(0x13a)]){_0x279dd9[_0x297018(0x156)]&&_0x4b783c['add'](_0x279dd9[_0x297018(0x156)]);}if(Array[_0x297018(0x188)](_0x3e238b[_0x297018(0x1c4)]))for(const _0x4e4586 of _0x3e238b[_0x297018(0x1c4)]){_0x4e4586[_0x297018(0x156)]&&_0x4b783c[_0x297018(0x17d)](_0x4e4586[_0x297018(0x156)]);}}}}return _0x4b783c;}
1
+ const a154_0x11b0f2=a154_0x5a67;(function(_0xa6c3c5,_0x444975){const _0x81dbff=a154_0x5a67,_0x16f60b=_0xa6c3c5();while(!![]){try{const _0x27db45=-parseInt(_0x81dbff(0x27c))/0x1+-parseInt(_0x81dbff(0x21a))/0x2*(parseInt(_0x81dbff(0x25c))/0x3)+-parseInt(_0x81dbff(0x26a))/0x4*(-parseInt(_0x81dbff(0x1cb))/0x5)+parseInt(_0x81dbff(0x220))/0x6*(-parseInt(_0x81dbff(0x1d6))/0x7)+parseInt(_0x81dbff(0x25e))/0x8+-parseInt(_0x81dbff(0x1c3))/0x9+parseInt(_0x81dbff(0x1f4))/0xa;if(_0x27db45===_0x444975)break;else _0x16f60b['push'](_0x16f60b['shift']());}catch(_0x4dda10){_0x16f60b['push'](_0x16f60b['shift']());}}}(a154_0x178a,0x3e686));import*as a154_0x4fec58 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{deepSortObject}from'./child-segment-yaml.js';import{safeParseYaml}from'./yaml-validator.js';import{JourneyDefSchema}from'./types/journey-schema.js';import{formatApiJourneyName,isLocalJourneyRef}from'./journey-utils.js';export function normalizeWaitUnit(_0x2c8c53){const _0x1d0410=a154_0x5a67,_0x56a68f=_0x2c8c53[_0x1d0410(0x274)]();if(_0x56a68f==='days'||_0x56a68f===_0x1d0410(0x258))return _0x1d0410(0x258);if(_0x56a68f===_0x1d0410(0x1de)||_0x56a68f===_0x1d0410(0x1c4))return _0x1d0410(0x1c4);return _0x2c8c53;}export function journeyResponseToDefSync(_0x3f1d65){const _0x33f30b=a154_0x5a67,_0x395b3a=_0x3f1d65[_0x33f30b(0x23b)],_0xc9e051=_0x395b3a[_0x33f30b(0x1e4)]||_0x395b3a[_0x33f30b(0x214)],_0x33c41d={'stages':_0x395b3a['journeyStages']['map'](convertApiStageToYaml),'id':_0x3f1d65['id']};_0x395b3a['goal']&&(_0x33c41d[_0x33f30b(0x270)]=convertApiCriteriaToYaml(_0x395b3a[_0x33f30b(0x270)]));_0x395b3a[_0x33f30b(0x214)]&&_0x395b3a[_0x33f30b(0x214)]!==_0xc9e051&&(_0x33c41d['version']=_0x395b3a[_0x33f30b(0x214)]);_0x395b3a[_0x33f30b(0x227)]!==undefined&&(_0x33c41d['version_number']=_0x395b3a[_0x33f30b(0x227)]);_0x395b3a[_0x33f30b(0x1dc)]&&(_0x33c41d[_0x33f30b(0x1dc)]=_0x395b3a[_0x33f30b(0x1dc)]==='launched'?_0x33f30b(0x206):_0x33f30b(0x1db));const _0xfbff9a={'type':_0x33f30b(0x22e),'name':_0xc9e051,'journeys':[_0x33c41d]};_0x395b3a[_0x33f30b(0x262)]&&(_0xfbff9a[_0x33f30b(0x262)]=_0x395b3a[_0x33f30b(0x262)]);_0x395b3a[_0x33f30b(0x270)]&&(_0xfbff9a[_0x33f30b(0x270)]=convertApiCriteriaToYaml(_0x395b3a['goal']));if(_0x395b3a['reentryMode'])_0xfbff9a[_0x33f30b(0x207)]=_0x395b3a[_0x33f30b(0x209)];else _0x395b3a['allowReentry']!==undefined&&(_0xfbff9a[_0x33f30b(0x207)]=_0x395b3a[_0x33f30b(0x22d)]?_0x33f30b(0x27f):_0x33f30b(0x1d3));return _0x395b3a[_0x33f30b(0x228)]&&(_0xfbff9a[_0x33f30b(0x22f)]=_0x395b3a[_0x33f30b(0x228)]),_0x395b3a[_0x33f30b(0x1e4)]&&(_0xfbff9a[_0x33f30b(0x1d7)]=_0x395b3a[_0x33f30b(0x1e4)]),_0x3f1d65[_0x33f30b(0x281)]?.['parentFolder']?.[_0x33f30b(0x26b)]?.['id']&&(_0xfbff9a[_0x33f30b(0x1f7)]=_0x3f1d65['relationships'][_0x33f30b(0x27e)]['data']['id']),_0xfbff9a;}export async function journeyResponseToDef(_0x58fdd6,_0x2c3c03){const _0x1b3691=a154_0x5a67,_0x45bed1=journeyResponseToDefSync(_0x58fdd6);if(!_0x2c3c03)return _0x45bed1;const _0x58c044=new Set();collectSegmentIdsFromJourney(_0x45bed1,_0x58c044);const _0x3474ab=new Set();collectActivationIdsFromJourney(_0x45bed1,_0x3474ab);const _0x1ca9ae={},_0x28c3fd=new Map();for(const _0x28b79f of Array[_0x1b3691(0x280)](_0x58c044)[_0x1b3691(0x212)]()){if(_0x2c3c03[_0x1b3691(0x205)]){const _0x35ee44=await _0x2c3c03[_0x1b3691(0x205)](_0x28b79f);if(_0x35ee44[_0x1b3691(0x1c8)]){_0x28c3fd[_0x1b3691(0x1f3)](_0x28b79f,_0x35ee44[_0x1b3691(0x214)]);if(_0x35ee44['definition']){const _0x1a47a8={..._0x35ee44[_0x1b3691(0x256)],'rule':deepSortObject(_0x35ee44[_0x1b3691(0x256)]['rule'])};_0x1ca9ae[_0x35ee44[_0x1b3691(0x214)]]=_0x1a47a8;}}else _0x28c3fd['set'](_0x28b79f,makeSegmentRef(_0x35ee44[_0x1b3691(0x214)]));}else{if(_0x2c3c03[_0x1b3691(0x27a)]){const _0x4fd1d0=await _0x2c3c03[_0x1b3691(0x27a)](_0x28b79f);_0x28c3fd[_0x1b3691(0x1f3)](_0x28b79f,_0x4fd1d0);}}}const _0x1369ef={},_0x24a88b=new Map();for(const _0x254dbe of Array[_0x1b3691(0x280)](_0x3474ab)[_0x1b3691(0x212)]()){if(_0x2c3c03[_0x1b3691(0x251)]){const _0xab30aa=await _0x2c3c03[_0x1b3691(0x251)](_0x254dbe);_0xab30aa['isJourneyLocal']?(_0x24a88b[_0x1b3691(0x1f3)](_0x254dbe,_0xab30aa[_0x1b3691(0x214)]),_0xab30aa[_0x1b3691(0x256)]&&(_0x1369ef[_0xab30aa['name']]=_0xab30aa[_0x1b3691(0x256)])):_0x24a88b[_0x1b3691(0x1f3)](_0x254dbe,makeSegmentRef(_0xab30aa[_0x1b3691(0x214)]));}else{if(_0x2c3c03[_0x1b3691(0x210)]){const _0x3f78c4=await _0x2c3c03['resolveActivationName'](_0x254dbe);_0x24a88b[_0x1b3691(0x1f3)](_0x254dbe,_0x3f78c4);}}}_0x28c3fd[_0x1b3691(0x20a)]>0x0&&replaceSegmentIdsInJourney(_0x45bed1,_0x28c3fd);_0x24a88b[_0x1b3691(0x20a)]>0x0&&replaceActivationIdsInJourney(_0x45bed1,_0x24a88b);if(_0x2c3c03[_0x1b3691(0x1e9)]){const _0x289b4b=[];collectJumpTargetsFromJourney(_0x45bed1,_0x289b4b);if(_0x289b4b[_0x1b3691(0x1f9)]>0x0){const _0x3337b7=new Map();for(const _0x57e0a2 of _0x289b4b){try{const _0x2a8d04=await _0x2c3c03['resolveJumpTarget'](_0x57e0a2['journeyId'],_0x57e0a2[_0x1b3691(0x1eb)]);_0x3337b7['set'](_0x57e0a2[_0x1b3691(0x259)]+':'+_0x57e0a2['stageId'],_0x2a8d04);}catch{}}_0x3337b7[_0x1b3691(0x20a)]>0x0&&replaceJumpTargetsInJourney(_0x45bed1,_0x3337b7);}}return Object[_0x1b3691(0x202)](_0x1ca9ae)[_0x1b3691(0x1f9)]>0x0&&(_0x45bed1[_0x1b3691(0x278)]=_0x1ca9ae),Object[_0x1b3691(0x202)](_0x1369ef)[_0x1b3691(0x1f9)]>0x0&&(_0x45bed1[_0x1b3691(0x1c6)]=_0x1369ef),_0x45bed1;}function collectSegmentIdsFromJourney(_0x22bd32,_0x2aca42){const _0x5386e1=a154_0x5a67;_0x22bd32['goal']?.[_0x5386e1(0x23d)]&&_0x2aca42['add'](_0x22bd32['goal'][_0x5386e1(0x23d)]);const _0x3e3967=_0x2772d=>{const _0x257911=_0x5386e1;for(const _0x423a73 of _0x2772d){_0x423a73['entry_criteria']?.['segment']&&_0x2aca42[_0x257911(0x21c)](_0x423a73['entry_criteria']['segment']);if(_0x423a73[_0x257911(0x23e)])for(const _0x3497b1 of _0x423a73[_0x257911(0x23e)]){_0x3497b1['segment']&&_0x2aca42[_0x257911(0x21c)](_0x3497b1['segment']);}_0x423a73[_0x257911(0x229)]?.[_0x257911(0x23d)]&&_0x2aca42[_0x257911(0x21c)](_0x423a73['milestone']['segment']);if(_0x423a73[_0x257911(0x245)])for(const _0x2b8a0f of _0x423a73[_0x257911(0x245)]){if(_0x2b8a0f[_0x257911(0x268)]==='decision_point'){const _0x53fa41=_0x2b8a0f;for(const _0x31510c of _0x53fa41[_0x257911(0x266)][_0x257911(0x1fe)]){_0x31510c[_0x257911(0x23d)]&&_0x2aca42[_0x257911(0x21c)](_0x31510c[_0x257911(0x23d)]);}}else{if(_0x2b8a0f['type']===_0x257911(0x244)){const _0x5b689f=_0x2b8a0f;_0x5b689f[_0x257911(0x266)][_0x257911(0x234)]?.[_0x257911(0x23d)]&&_0x2aca42[_0x257911(0x21c)](_0x5b689f['with'][_0x257911(0x234)][_0x257911(0x23d)]);}}}}};if(_0x22bd32[_0x5386e1(0x26f)])for(const _0x4fb7f8 of _0x22bd32[_0x5386e1(0x26f)]){_0x4fb7f8[_0x5386e1(0x270)]?.[_0x5386e1(0x23d)]&&_0x2aca42[_0x5386e1(0x21c)](_0x4fb7f8[_0x5386e1(0x270)][_0x5386e1(0x23d)]),_0x3e3967(_0x4fb7f8[_0x5386e1(0x1e5)]);}_0x22bd32[_0x5386e1(0x1e5)]&&_0x3e3967(_0x22bd32[_0x5386e1(0x1e5)]);if(_0x22bd32[_0x5386e1(0x22a)])for(const _0x182d3d of _0x22bd32[_0x5386e1(0x22a)]){_0x3e3967(_0x182d3d[_0x5386e1(0x1e5)]);}}function replaceSegmentIdsInJourney(_0x5c0ab7,_0x466215){const _0x14c084=a154_0x5a67,_0x571adc=_0x4e806e=>_0x466215[_0x14c084(0x21f)](_0x4e806e)||_0x4e806e;_0x5c0ab7['goal']?.[_0x14c084(0x23d)]&&(_0x5c0ab7[_0x14c084(0x270)]['segment']=_0x571adc(_0x5c0ab7[_0x14c084(0x270)][_0x14c084(0x23d)]));const _0x1d2c81=_0x56b2c0=>{const _0x15c9e2=_0x14c084;for(const _0x1c636e of _0x56b2c0){_0x1c636e[_0x15c9e2(0x25d)]?.[_0x15c9e2(0x23d)]&&(_0x1c636e[_0x15c9e2(0x25d)][_0x15c9e2(0x23d)]=_0x571adc(_0x1c636e[_0x15c9e2(0x25d)][_0x15c9e2(0x23d)]));if(_0x1c636e[_0x15c9e2(0x23e)])for(const _0x3aebf2 of _0x1c636e[_0x15c9e2(0x23e)]){_0x3aebf2[_0x15c9e2(0x23d)]&&(_0x3aebf2[_0x15c9e2(0x23d)]=_0x571adc(_0x3aebf2[_0x15c9e2(0x23d)]));}_0x1c636e[_0x15c9e2(0x229)]?.[_0x15c9e2(0x23d)]&&(_0x1c636e[_0x15c9e2(0x229)][_0x15c9e2(0x23d)]=_0x571adc(_0x1c636e[_0x15c9e2(0x229)]['segment']));if(_0x1c636e[_0x15c9e2(0x245)])for(const _0x42bc0d of _0x1c636e[_0x15c9e2(0x245)]){if(_0x42bc0d[_0x15c9e2(0x268)]==='decision_point'){const _0x4afac9=_0x42bc0d;for(const _0x5f4b45 of _0x4afac9[_0x15c9e2(0x266)][_0x15c9e2(0x1fe)]){_0x5f4b45['segment']&&(_0x5f4b45[_0x15c9e2(0x23d)]=_0x571adc(_0x5f4b45[_0x15c9e2(0x23d)]));}}else{if(_0x42bc0d[_0x15c9e2(0x268)]==='wait'){const _0x4f008e=_0x42bc0d;_0x4f008e[_0x15c9e2(0x266)]['condition']?.[_0x15c9e2(0x23d)]&&(_0x4f008e['with']['condition'][_0x15c9e2(0x23d)]=_0x571adc(_0x4f008e[_0x15c9e2(0x266)]['condition'][_0x15c9e2(0x23d)]));}}}}};if(_0x5c0ab7['journeys'])for(const _0x199764 of _0x5c0ab7[_0x14c084(0x26f)]){_0x199764[_0x14c084(0x270)]?.[_0x14c084(0x23d)]&&(_0x199764['goal']['segment']=_0x571adc(_0x199764[_0x14c084(0x270)][_0x14c084(0x23d)])),_0x1d2c81(_0x199764[_0x14c084(0x1e5)]);}_0x5c0ab7[_0x14c084(0x1e5)]&&_0x1d2c81(_0x5c0ab7[_0x14c084(0x1e5)]);if(_0x5c0ab7[_0x14c084(0x22a)])for(const _0xee9d31 of _0x5c0ab7[_0x14c084(0x22a)]){_0x1d2c81(_0xee9d31[_0x14c084(0x1e5)]);}}function a154_0x178a(){const _0x4c1332=['from','relationships','root_step','stages:','Activation','End','1035819oKcyDr','week','conditionTimeoutUnit','activations','waitStep','isJourneyLocal','resolveEmbeddedActivationId','connection','5XpPSeb','waitStepType','Condition','DaysOfTheWeek','\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...','Stage\x20Complete','unique_id','\x20\x20\x20\x20conditions:\x0a','no_reentry','latest','has','197218yUTrMY','bundle_name','customizedSplit','moveAfter','waitCondition','draft','state','activation_template_id','weeks','Invalid\x20rule\x20in\x20embedded\x20segment\x20\x27','test','all','Jump','\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a','journeyBundleName','stages','exitCriteria','jump','push','resolveJumpTarget','resolveEmbeddedSegmentId','stageId','duration','\x20\x20\x20\x20\x20\x20\x20\x20attribute:\x20...\x0a','waitUntilDate','randomUUID','null','JOURNEY_SYNTAX_ERROR','journeyStages','set','5503140ojpBOh','variants','\x20\x20\x20\x20type:\x20','folder_id','entryCriteria','length','waitStepUnit','target','wait_until','next','branches','merge','includes','rule.type\x20must\x20be\x20\x27And\x27,\x20\x27Or\x27,\x20or\x20\x27Composite\x27,\x20got\x20\x27','keys','startsWith','behavior','resolveSegment','launched','reentry','timedOutPath','reentryMode','size','customized_split','notification','.journey.yml','days_of_week','\x27.\x0a','resolveActivationName','ab_test','sort','goal-segment','name','Composite','entries','Met\x20condition(s)','values','Merge','1906fttHlM','columns','add','timeout','versions:','get','36sazipP','journeyStageId','Duration','rule','\x22\x20to\x20reference\x20an\x20existing\x20child\x20segment.','Unknown\x20segment\x20\x22','DecisionPoint','versionNumber','journeyBundleId','milestone','versions','resolveSegmentId','decision_point','allowReentry','journey','bundle_id','ABTest','conditions','reentry:','rootStep','condition','excluded','Stage\x201','WaitStep','journeyName','version','slice','attributes','\x20\x20\x20\x20type:\x20And\x0a','segment','exit_criteria','percentage','resolveStageId','Date','conditionTimeoutDuration','\x20\x20rule:\x0a','wait','steps','folder','trim','.journey.yaml','conditionSegmentId','replace','find','Expected\x20format:\x0a','endsWith','your-activation-name','segmentId','uuid','resolveActivation','stage','ref','schedule','(missing)','definition','exitCriterias','day','journeyId','ref:','AbTest','1290uXoLCK','entry_criteria','841936viWVUQ','Send\x20Notification','embedded','stageName','description','end','filter','*Max\x20wait\x20','with','unit','type','map','1731748dbTSLn','data','all_columns','And','resolveJourneyId','journeys','goal','excludedPath','object','Variant','toLowerCase','version_number','activation','resolveActivationId','segments','connector_config','resolveSegmentName','\x22.\x20Define\x20it\x20in\x20the\x20segments\x20section\x20or\x20use\x20\x22ref:','138946MYrHQf','isArray','parentFolder','reentry_always'];a154_0x178a=function(){return _0x4c1332;};return a154_0x178a();}function collectActivationIdsFromJourney(_0x5b4b18,_0x2aec48){const _0x5541f9=a154_0x5a67,_0xd777dc=_0x21bb16=>{const _0x4f69c4=a154_0x5a67;for(const _0xca3951 of _0x21bb16){if(_0xca3951[_0x4f69c4(0x245)])for(const _0x11eb44 of _0xca3951['steps']){if(_0x11eb44[_0x4f69c4(0x268)]===_0x4f69c4(0x276)){const _0x35903e=_0x11eb44;_0x35903e[_0x4f69c4(0x266)][_0x4f69c4(0x276)]&&/^\d+$/[_0x4f69c4(0x1e0)](_0x35903e[_0x4f69c4(0x266)][_0x4f69c4(0x276)])&&_0x2aec48[_0x4f69c4(0x21c)](_0x35903e[_0x4f69c4(0x266)][_0x4f69c4(0x276)]);}}}};if(_0x5b4b18[_0x5541f9(0x26f)])for(const _0x3d453c of _0x5b4b18[_0x5541f9(0x26f)]){_0xd777dc(_0x3d453c[_0x5541f9(0x1e5)]);}_0x5b4b18[_0x5541f9(0x1e5)]&&_0xd777dc(_0x5b4b18[_0x5541f9(0x1e5)]);if(_0x5b4b18['versions'])for(const _0x2d78c0 of _0x5b4b18[_0x5541f9(0x22a)]){_0xd777dc(_0x2d78c0[_0x5541f9(0x1e5)]);}}function replaceActivationIdsInJourney(_0x51c976,_0x28ac10){const _0x410574=a154_0x5a67,_0x274cb0=_0x1abd82=>_0x28ac10[_0x410574(0x21f)](_0x1abd82)||_0x1abd82,_0x54d8df=_0x477452=>{const _0x5917b6=_0x410574;for(const _0x71e869 of _0x477452){if(_0x71e869['steps'])for(const _0x4bee92 of _0x71e869[_0x5917b6(0x245)]){if(_0x4bee92[_0x5917b6(0x268)]===_0x5917b6(0x276)){const _0x33afd0=_0x4bee92;_0x33afd0['with'][_0x5917b6(0x276)]&&(_0x33afd0['with'][_0x5917b6(0x276)]=_0x274cb0(_0x33afd0[_0x5917b6(0x266)][_0x5917b6(0x276)]));}}}};if(_0x51c976[_0x410574(0x26f)])for(const _0x175ae9 of _0x51c976['journeys']){_0x54d8df(_0x175ae9['stages']);}_0x51c976[_0x410574(0x1e5)]&&_0x54d8df(_0x51c976[_0x410574(0x1e5)]);if(_0x51c976[_0x410574(0x22a)])for(const _0x7e826f of _0x51c976[_0x410574(0x22a)]){_0x54d8df(_0x7e826f[_0x410574(0x1e5)]);}}function collectJumpTargetsFromJourney(_0x1d233e,_0x7b848e){const _0xaeb738=a154_0x5a67,_0x35a0b8=new Set(),_0x371894=_0x12a6e8=>{const _0x15b25a=a154_0x5a67;for(const _0x14f93e of _0x12a6e8){if(_0x14f93e['steps'])for(const _0x7548b5 of _0x14f93e[_0x15b25a(0x245)]){if(_0x7548b5[_0x15b25a(0x268)]===_0x15b25a(0x1e7)){const _0x48a405=_0x7548b5,_0x3247d2=_0x48a405[_0x15b25a(0x266)][_0x15b25a(0x1fb)];if(_0x3247d2[_0x15b25a(0x22e)]&&_0x3247d2['stage']&&/^\d+$/[_0x15b25a(0x1e0)](_0x3247d2['journey'])&&/^\d+$/[_0x15b25a(0x1e0)](_0x3247d2['stage'])){const _0x48a551=_0x3247d2[_0x15b25a(0x22e)]+':'+_0x3247d2['stage'];!_0x35a0b8[_0x15b25a(0x1d5)](_0x48a551)&&(_0x35a0b8['add'](_0x48a551),_0x7b848e[_0x15b25a(0x1e8)]({'journeyId':_0x3247d2[_0x15b25a(0x22e)],'stageId':_0x3247d2[_0x15b25a(0x252)]}));}}}}};if(_0x1d233e[_0xaeb738(0x26f)])for(const _0x7915ab of _0x1d233e['journeys']){_0x371894(_0x7915ab[_0xaeb738(0x1e5)]);}_0x1d233e[_0xaeb738(0x1e5)]&&_0x371894(_0x1d233e[_0xaeb738(0x1e5)]);if(_0x1d233e[_0xaeb738(0x22a)])for(const _0x4b17c7 of _0x1d233e['versions']){_0x371894(_0x4b17c7[_0xaeb738(0x1e5)]);}}function replaceJumpTargetsInJourney(_0xeca358,_0x1dd2b0){const _0x531fab=a154_0x5a67,_0x4936ff=_0x18f88e=>{const _0x30bcc6=a154_0x5a67;for(const _0x4478cf of _0x18f88e){if(_0x4478cf[_0x30bcc6(0x245)])for(const _0x1198b6 of _0x4478cf[_0x30bcc6(0x245)]){if(_0x1198b6[_0x30bcc6(0x268)]==='jump'){const _0x23c974=_0x1198b6,_0x9ab527=_0x23c974['with'][_0x30bcc6(0x1fb)],_0x51acab=_0x9ab527[_0x30bcc6(0x22e)]+':'+_0x9ab527[_0x30bcc6(0x252)],_0xaa5c3a=_0x1dd2b0[_0x30bcc6(0x21f)](_0x51acab);_0xaa5c3a&&(_0x9ab527[_0x30bcc6(0x22e)]=_0xaa5c3a[_0x30bcc6(0x238)],_0x9ab527['stage']=_0xaa5c3a[_0x30bcc6(0x261)]);}}}};if(_0xeca358['journeys'])for(const _0x2ae5ef of _0xeca358[_0x531fab(0x26f)]){_0x4936ff(_0x2ae5ef[_0x531fab(0x1e5)]);}_0xeca358[_0x531fab(0x1e5)]&&_0x4936ff(_0xeca358[_0x531fab(0x1e5)]);if(_0xeca358[_0x531fab(0x22a)])for(const _0x4353c9 of _0xeca358[_0x531fab(0x22a)]){_0x4936ff(_0x4353c9[_0x531fab(0x1e5)]);}}function generateReadableStepName(_0x297bda,_0x2433ed){const _0x360d7b=a154_0x5a67;if(_0x297bda[_0x360d7b(0x214)]&&_0x297bda[_0x360d7b(0x214)]!==_0x297bda[_0x360d7b(0x268)]){const _0x216e61=_0x297bda[_0x360d7b(0x214)][_0x360d7b(0x247)]();if(_0x216e61&&/[a-z0-9\p{L}]/iu[_0x360d7b(0x1e0)](_0x216e61))return _0x216e61;}const _0x1ba525=_0x297bda['type'][_0x360d7b(0x274)]()[_0x360d7b(0x24a)](/step$/i,'');return _0x1ba525+'_'+(_0x2433ed+0x1);}function getStepNextRefs(_0x1e22f0){const _0x5890e1=a154_0x5a67,_0x4edc05=[];if(_0x1e22f0[_0x5890e1(0x1fd)])_0x4edc05[_0x5890e1(0x1e8)](_0x1e22f0[_0x5890e1(0x1fd)]);if(_0x1e22f0[_0x5890e1(0x1fe)])for(const _0x14b79b of _0x1e22f0['branches']){if(_0x14b79b['next'])_0x4edc05[_0x5890e1(0x1e8)](_0x14b79b[_0x5890e1(0x1fd)]);}if(_0x1e22f0[_0x5890e1(0x1f5)])for(const _0x15a1b4 of _0x1e22f0['variants']){if(_0x15a1b4[_0x5890e1(0x1fd)])_0x4edc05[_0x5890e1(0x1e8)](_0x15a1b4[_0x5890e1(0x1fd)]);}if(_0x1e22f0[_0x5890e1(0x231)])for(const _0x4c7e7b of _0x1e22f0['conditions']){if(_0x4c7e7b['next'])_0x4edc05[_0x5890e1(0x1e8)](_0x4c7e7b[_0x5890e1(0x1fd)]);}return _0x4edc05;}function parseJumpTargetDisplayName(_0x156d83){const _0x49cf62=a154_0x5a67,_0x53182a=_0x156d83['match'](/^(.+?)\s*\(([^/)]+)/);if(!_0x53182a)return undefined;const _0x56ff9c=_0x53182a[0x1][_0x49cf62(0x247)](),_0x30010c=_0x53182a[0x2][_0x49cf62(0x247)]();if(!_0x56ff9c||!_0x30010c)return undefined;return{'stageName':_0x56ff9c,'journeyName':_0x30010c};}function orderStepsFromRoot(_0x4115ac,_0x3b8764){const _0x1c33d5=a154_0x5a67,_0x1092af=Object[_0x1c33d5(0x216)](_0x4115ac);if(_0x1092af[_0x1c33d5(0x1f9)]===0x0)return[];const _0x16a6f1=new Set(_0x1092af['map'](([_0x3d8895])=>_0x3d8895)),_0xb7030f=new Set();for(const [,_0x403f37]of _0x1092af){for(const _0x5bc549 of getStepNextRefs(_0x403f37)){if(_0x16a6f1['has'](_0x5bc549))_0xb7030f[_0x1c33d5(0x21c)](_0x5bc549);}}let _0x58affc=_0x3b8764&&_0x16a6f1['has'](_0x3b8764)?_0x3b8764:undefined;if(!_0x58affc){const _0x453ff0=_0x1092af[_0x1c33d5(0x264)](([_0x2b187e])=>!_0xb7030f[_0x1c33d5(0x1d5)](_0x2b187e));_0x453ff0[_0x1c33d5(0x1f9)]>0x0?_0x58affc=_0x453ff0[0x0][0x0]:_0x58affc=_0x1092af[0x0][0x0];}const _0xb8dbde=[],_0x5f10e1=new Set(),_0x394128=[_0x58affc];while(_0x394128[_0x1c33d5(0x1f9)]>0x0){const _0x347598=_0x394128['shift']();if(_0x5f10e1['has'](_0x347598))continue;_0x5f10e1[_0x1c33d5(0x21c)](_0x347598);const _0x470e89=_0x4115ac[_0x347598];if(!_0x470e89)continue;_0xb8dbde[_0x1c33d5(0x1e8)]({'uuid':_0x347598,'step':_0x470e89});for(const _0x481c1c of getStepNextRefs(_0x470e89)){_0x16a6f1[_0x1c33d5(0x1d5)](_0x481c1c)&&!_0x5f10e1[_0x1c33d5(0x1d5)](_0x481c1c)&&_0x394128[_0x1c33d5(0x1e8)](_0x481c1c);}}for(const [_0x4683fa,_0x5ace4f]of _0x1092af){!_0x5f10e1[_0x1c33d5(0x1d5)](_0x4683fa)&&_0xb8dbde[_0x1c33d5(0x1e8)]({'uuid':_0x4683fa,'step':_0x5ace4f});}return _0xb8dbde;}function resolveStepReferences(_0x36d98b,_0x3cb0d0,_0x566928,_0xc64ad6){const _0xc547ae=a154_0x5a67;if(_0x36d98b['type']!==_0xc547ae(0x263)){_0x36d98b[_0xc547ae(0x1fd)]&&_0xc64ad6[_0xc547ae(0x1d5)](_0x36d98b[_0xc547ae(0x1fd)])&&(_0x36d98b[_0xc547ae(0x1fd)]=_0xc64ad6['get'](_0x36d98b[_0xc547ae(0x1fd)]));const _0x269545=_0x3cb0d0+0x1;if(_0x269545<_0x566928[_0xc547ae(0x1f9)]){const _0x5f4e6f=_0xc64ad6[_0xc547ae(0x21f)](_0x566928[_0x269545][_0xc547ae(0x250)]);_0x36d98b[_0xc547ae(0x1fd)]===_0x5f4e6f&&delete _0x36d98b['next'];}}if(_0x36d98b[_0xc547ae(0x268)]==='decision_point')for(const _0x3b86a4 of _0x36d98b[_0xc547ae(0x266)]['branches']){_0x3b86a4['next']&&_0xc64ad6['has'](_0x3b86a4['next'])&&(_0x3b86a4['next']=_0xc64ad6[_0xc547ae(0x21f)](_0x3b86a4['next']));}if(_0x36d98b[_0xc547ae(0x268)]===_0xc547ae(0x211))for(const _0x6e469b of _0x36d98b[_0xc547ae(0x266)]['variants']){_0x6e469b[_0xc547ae(0x1fd)]&&_0xc64ad6['has'](_0x6e469b[_0xc547ae(0x1fd)])&&(_0x6e469b[_0xc547ae(0x1fd)]=_0xc64ad6[_0xc547ae(0x21f)](_0x6e469b[_0xc547ae(0x1fd)]));}if(_0x36d98b[_0xc547ae(0x268)]===_0xc547ae(0x244)&&_0x36d98b[_0xc547ae(0x266)][_0xc547ae(0x234)]){const _0x4e0c32=_0x36d98b[_0xc547ae(0x266)][_0xc547ae(0x234)];_0x4e0c32[_0xc547ae(0x1fd)]&&_0xc64ad6[_0xc547ae(0x1d5)](_0x4e0c32[_0xc547ae(0x1fd)])&&(_0x4e0c32['next']=_0xc64ad6[_0xc547ae(0x21f)](_0x4e0c32[_0xc547ae(0x1fd)])),_0x4e0c32[_0xc547ae(0x21d)]?.[_0xc547ae(0x1fd)]&&_0xc64ad6[_0xc547ae(0x1d5)](_0x4e0c32[_0xc547ae(0x21d)][_0xc547ae(0x1fd)])&&(_0x4e0c32[_0xc547ae(0x21d)]['next']=_0xc64ad6[_0xc547ae(0x21f)](_0x4e0c32[_0xc547ae(0x21d)][_0xc547ae(0x1fd)]));}}function convertApiStageToYaml(_0x5f59ca){const _0x2a7c12=a154_0x5a67,_0x598c57={'name':_0x5f59ca['name']};_0x5f59ca['id']&&(_0x598c57['id']=_0x5f59ca['id']);_0x5f59ca[_0x2a7c12(0x262)]&&(_0x598c57[_0x2a7c12(0x262)]=_0x5f59ca['description']);_0x5f59ca[_0x2a7c12(0x1f8)]&&(_0x598c57[_0x2a7c12(0x25d)]=convertApiCriteriaToYaml(_0x5f59ca['entryCriteria']));_0x5f59ca['exitCriterias']&&_0x5f59ca[_0x2a7c12(0x257)][_0x2a7c12(0x1f9)]>0x0&&(_0x598c57[_0x2a7c12(0x23e)]=_0x5f59ca[_0x2a7c12(0x257)]['map'](convertApiCriteriaToYaml));_0x5f59ca[_0x2a7c12(0x229)]&&(_0x598c57[_0x2a7c12(0x229)]=convertApiCriteriaToYaml(_0x5f59ca[_0x2a7c12(0x229)]));if(_0x5f59ca[_0x2a7c12(0x245)]&&Object[_0x2a7c12(0x202)](_0x5f59ca['steps'])[_0x2a7c12(0x1f9)]>0x0){const _0x2cfeb7=orderStepsFromRoot(_0x5f59ca[_0x2a7c12(0x245)],_0x5f59ca[_0x2a7c12(0x233)]),_0x4ed487=new Map(),_0x3c5e4b=new Set();for(let _0xe7ffbc=0x0;_0xe7ffbc<_0x2cfeb7['length'];_0xe7ffbc++){const {uuid:_0x3f375f,step:_0x247c3a}=_0x2cfeb7[_0xe7ffbc];let _0x3a9efb=generateReadableStepName(_0x247c3a,_0xe7ffbc),_0x53b4ee=_0x3a9efb,_0x40f15b=0x2;while(_0x3c5e4b[_0x2a7c12(0x1d5)](_0x53b4ee)){_0x53b4ee=_0x3a9efb+'_'+_0x40f15b,_0x40f15b++;}_0x3c5e4b['add'](_0x53b4ee),_0x4ed487[_0x2a7c12(0x1f3)](_0x3f375f,_0x53b4ee);}_0x598c57[_0x2a7c12(0x245)]=_0x2cfeb7[_0x2a7c12(0x269)](({uuid:_0x323141,step:_0x21bc8e},_0x27946b)=>{const _0x19a2d5=_0x2a7c12,_0x478a43=convertApiStepToYaml(_0x21bc8e,_0x4ed487[_0x19a2d5(0x21f)](_0x323141));return resolveStepReferences(_0x478a43,_0x27946b,_0x2cfeb7,_0x4ed487),_0x478a43;});}return _0x598c57;}function convertApiCriteriaToYaml(_0x32ab58){const _0x5c92dd=a154_0x5a67,_0x4be402={'name':_0x32ab58[_0x5c92dd(0x214)],'segment':_0x32ab58[_0x5c92dd(0x24f)]};_0x32ab58[_0x5c92dd(0x262)]&&(_0x4be402['description']=_0x32ab58[_0x5c92dd(0x262)]);if(_0x32ab58[_0x5c92dd(0x1fb)]){let _0x4ca769=_0x32ab58[_0x5c92dd(0x1fb)]['journeyId'],_0x1bd884=_0x32ab58['target'][_0x5c92dd(0x221)];if(_0x32ab58['target'][_0x5c92dd(0x238)]){const _0x5afb9e=parseJumpTargetDisplayName(_0x32ab58[_0x5c92dd(0x1fb)][_0x5c92dd(0x238)]);_0x5afb9e&&(_0x1bd884=_0x5afb9e[_0x5c92dd(0x261)],_0x4ca769=_0x5afb9e[_0x5c92dd(0x238)]);}_0x4be402[_0x5c92dd(0x1fb)]={'journey':_0x4ca769,'stage':_0x1bd884},_0x32ab58[_0x5c92dd(0x1fb)][_0x5c92dd(0x228)]&&(_0x4be402['target'][_0x5c92dd(0x22f)]=_0x32ab58['target'][_0x5c92dd(0x228)]);}return _0x4be402;}function convertApiStepToYaml(_0x3c6926,_0x11d10e){const _0x58bfab=a154_0x5a67;switch(_0x3c6926[_0x58bfab(0x268)]){case _0x58bfab(0x237):{const _0x3e5fef={};if(_0x3c6926[_0x58bfab(0x1cc)]===_0x58bfab(0x222)&&_0x3c6926[_0x58bfab(0x1c7)]!==undefined)_0x3e5fef[_0x58bfab(0x1ec)]=_0x3c6926[_0x58bfab(0x1c7)],_0x3e5fef['unit']=_0x3c6926[_0x58bfab(0x1fa)];else{if(_0x3c6926['waitStepType']===_0x58bfab(0x241)&&_0x3c6926[_0x58bfab(0x1ee)])_0x3e5fef['wait_until']=_0x3c6926[_0x58bfab(0x1ee)];else{if(_0x3c6926[_0x58bfab(0x1cc)]===_0x58bfab(0x1ce)&&_0x3c6926['daysOfWeek'])_0x3e5fef[_0x58bfab(0x20e)]=_0x3c6926['daysOfWeek'];else{if(_0x3c6926[_0x58bfab(0x1cc)]===_0x58bfab(0x1cd)){if(_0x3c6926[_0x58bfab(0x231)]&&_0x3c6926[_0x58bfab(0x231)]['length']>0x0){const _0x5a2855=_0x3c6926[_0x58bfab(0x231)][_0x58bfab(0x24b)](_0x1ff99c=>!_0x1ff99c[_0x58bfab(0x208)]),_0x4ab590=_0x3c6926['conditions'][_0x58bfab(0x24b)](_0x29ed4d=>_0x29ed4d[_0x58bfab(0x208)]);_0x5a2855?.[_0x58bfab(0x24f)]&&(_0x3e5fef['condition']={'segment':_0x5a2855[_0x58bfab(0x24f)],..._0x5a2855[_0x58bfab(0x1fd)]?{'next':_0x5a2855['next']}:{}},_0x4ab590&&_0x4ab590[_0x58bfab(0x1d9)]!==undefined&&_0x4ab590[_0x58bfab(0x267)]&&(_0x3e5fef['condition'][_0x58bfab(0x21d)]={'duration':_0x4ab590[_0x58bfab(0x1d9)],'unit':_0x4ab590[_0x58bfab(0x267)],..._0x4ab590[_0x58bfab(0x1fd)]?{'next':_0x4ab590['next']}:{}}));}else _0x3c6926[_0x58bfab(0x249)]&&(_0x3e5fef[_0x58bfab(0x234)]={'segment':_0x3c6926[_0x58bfab(0x249)]},_0x3c6926[_0x58bfab(0x242)]!==undefined&&_0x3c6926[_0x58bfab(0x1c5)]&&(_0x3e5fef[_0x58bfab(0x234)][_0x58bfab(0x21d)]={'duration':_0x3c6926[_0x58bfab(0x242)],'unit':_0x3c6926[_0x58bfab(0x1c5)]}));}}}}const _0x2df9bd={'type':_0x58bfab(0x244),'name':_0x11d10e,..._0x3c6926[_0x58bfab(0x1fd)]?{'next':_0x3c6926[_0x58bfab(0x1fd)]}:{},'with':_0x3e5fef};return _0x2df9bd;}case'Activation':{const _0x52c015={'type':'activation','name':_0x11d10e,..._0x3c6926[_0x58bfab(0x1fd)]?{'next':_0x3c6926[_0x58bfab(0x1fd)]}:{},'with':{'activation':_0x3c6926['journeyActivationStepId']||''}};return _0x52c015;}case _0x58bfab(0x226):{const _0x493ba9={'type':_0x58bfab(0x22c),'name':_0x11d10e,..._0x3c6926[_0x58bfab(0x1fd)]?{'next':_0x3c6926['next']}:{},'with':{'branches':(_0x3c6926[_0x58bfab(0x1fe)]||[])['map'](_0x2cb2bf=>({'name':_0x2cb2bf[_0x58bfab(0x214)],'segment':_0x2cb2bf[_0x58bfab(0x24f)],'excluded':_0x2cb2bf[_0x58bfab(0x271)],..._0x2cb2bf[_0x58bfab(0x1fd)]?{'next':_0x2cb2bf['next']}:{}}))}};return _0x493ba9;}case'ABTest':case _0x58bfab(0x25b):case _0x58bfab(0x273):{const _0xdf4f2e=_0x3c6926[_0x58bfab(0x1f5)]||(_0x3c6926['branches']||[])['map'](_0x9c0d70=>({'name':_0x9c0d70['name'],'percentage':0x0,'next':_0x9c0d70[_0x58bfab(0x1fd)]})),_0x3b5258={'type':'ab_test','name':_0x11d10e,..._0x3c6926['next']?{'next':_0x3c6926['next']}:{},'with':{'customized_split':_0x3c6926[_0x58bfab(0x1d8)],'unique_id':_0x3c6926['uniqueId'],'variants':_0xdf4f2e[_0x58bfab(0x269)](_0x37af95=>({'name':_0x37af95[_0x58bfab(0x214)],'percentage':_0x37af95[_0x58bfab(0x23f)],..._0x37af95[_0x58bfab(0x1fd)]?{'next':_0x37af95['next']}:{}}))}};return _0x3b5258;}case'Merge':{const _0x3db4c5={'type':_0x58bfab(0x1ff),'name':_0x11d10e,..._0x3c6926['next']?{'next':_0x3c6926[_0x58bfab(0x1fd)]}:{}};return _0x3db4c5;}case _0x58bfab(0x1e2):{let _0x2baf25='',_0x2b1a3b='',_0x3f381e;if(_0x3c6926['target']){_0x2baf25=_0x3c6926[_0x58bfab(0x1fb)]['journeyId'],_0x2b1a3b=_0x3c6926[_0x58bfab(0x1fb)][_0x58bfab(0x221)],_0x3f381e=_0x3c6926[_0x58bfab(0x1fb)][_0x58bfab(0x228)];if(_0x3c6926[_0x58bfab(0x1fb)][_0x58bfab(0x238)]){const _0x38bcb4=parseJumpTargetDisplayName(_0x3c6926[_0x58bfab(0x1fb)]['journeyName']);_0x38bcb4&&(_0x2b1a3b=_0x38bcb4[_0x58bfab(0x261)],_0x2baf25=_0x38bcb4[_0x58bfab(0x238)]);}}const _0x1a46df={'type':_0x58bfab(0x1e7),'name':_0x11d10e,..._0x3c6926[_0x58bfab(0x1fd)]?{'next':_0x3c6926[_0x58bfab(0x1fd)]}:{},'with':{'target':{'journey':_0x2baf25,'stage':_0x2b1a3b,..._0x3f381e?{'bundle_id':_0x3f381e}:{}}}};return _0x1a46df;}case _0x58bfab(0x285):{const _0x48f7de={'type':_0x58bfab(0x263),'name':_0x11d10e};return _0x48f7de;}default:{const _0x173f51={'type':_0x58bfab(0x263),'name':_0x11d10e};return _0x173f51;}}}export async function journeyDefToRequest(_0x42d627,_0x4b7a39,_0x287592){const _0x34f530=a154_0x5a67,_0x5f1d38=_0x42d627[_0x34f530(0x1e5)]||getActiveStages(_0x42d627),_0x261c80=isJourneysArrayMode(_0x42d627)||isMultiVersionMode(_0x42d627)?getLatestJourneyEntry(_0x42d627):undefined,_0x295283=_0x261c80?.[_0x34f530(0x239)]??_0x42d627[_0x34f530(0x214)],_0x66812c=_0x42d627[_0x34f530(0x278)]||{},_0x4e9873=_0x42d627[_0x34f530(0x1c6)]||{},_0x137c10={'type':_0x34f530(0x22e),'attributes':{'name':_0x295283,'audienceId':_0x4b7a39,'journeyStages':await Promise[_0x34f530(0x1e1)](_0x5f1d38['map'](_0x1eb925=>convertYamlStageToApi(_0x1eb925,_0x287592,_0x66812c,_0x4e9873)))}},_0x5dd4eb=_0x261c80?.['id']??_0x42d627['id'];_0x5dd4eb&&(_0x137c10['id']=_0x5dd4eb);_0x42d627[_0x34f530(0x262)]&&(_0x137c10[_0x34f530(0x23b)][_0x34f530(0x262)]=_0x42d627[_0x34f530(0x262)]);const _0x226c68=getEffectiveGoal(_0x42d627);_0x226c68&&(_0x137c10[_0x34f530(0x23b)][_0x34f530(0x270)]=await convertYamlCriteriaToApi(_0x226c68,_0x287592,_0x66812c));const _0x26770d=getEffectiveReentry(_0x42d627);return _0x26770d&&(_0x137c10['attributes'][_0x34f530(0x209)]=_0x26770d,_0x137c10[_0x34f530(0x23b)][_0x34f530(0x22d)]=_0x26770d!==_0x34f530(0x1d3)),_0x42d627[_0x34f530(0x1f7)]&&(_0x137c10[_0x34f530(0x281)]={'parentFolder':{'data':{'id':_0x42d627['folder_id'],'type':_0x34f530(0x246)}}}),_0x137c10;}async function convertYamlStageToApi(_0x236cf9,_0x4fc4f0,_0x3488f2={},_0x4e1cb6={}){const _0x596c76=a154_0x5a67,_0xd63a38={'name':_0x236cf9['name']};_0x236cf9['id']&&(_0xd63a38['id']=_0x236cf9['id']);_0x236cf9[_0x596c76(0x262)]&&(_0xd63a38[_0x596c76(0x262)]=_0x236cf9[_0x596c76(0x262)]);_0x236cf9[_0x596c76(0x25d)]&&(_0xd63a38[_0x596c76(0x1f8)]=await convertYamlCriteriaToApi(_0x236cf9[_0x596c76(0x25d)],_0x4fc4f0,_0x3488f2));_0x236cf9['exit_criteria']&&_0x236cf9[_0x596c76(0x23e)]['length']>0x0&&(_0xd63a38[_0x596c76(0x257)]=await Promise[_0x596c76(0x1e1)](_0x236cf9[_0x596c76(0x23e)][_0x596c76(0x269)](_0xfa5f81=>convertYamlCriteriaToApi(_0xfa5f81,_0x4fc4f0,_0x3488f2))));_0x236cf9[_0x596c76(0x229)]&&(_0xd63a38['milestone']=await convertYamlCriteriaToApi(_0x236cf9['milestone'],_0x4fc4f0,_0x3488f2));if(_0x236cf9[_0x596c76(0x245)]&&_0x236cf9['steps'][_0x596c76(0x1f9)]>0x0){const _0x6a2e6a={},_0x4fa8c1=_0x236cf9['steps'][_0x596c76(0x269)]((_0x4abf88,_0x26ae49)=>{const _0x1c9842=_0x596c76,_0x6b0220=_0x4abf88[_0x1c9842(0x250)]||generateUUID(),_0x43b894=_0x4abf88[_0x1c9842(0x214)]||_0x4abf88[_0x1c9842(0x268)]+'_'+_0x26ae49;return _0x6a2e6a[_0x43b894]=_0x6b0220,{..._0x4abf88,'name':_0x43b894};});_0xd63a38[_0x596c76(0x233)]=_0x6a2e6a[_0x4fa8c1[0x0][_0x596c76(0x214)]],_0xd63a38[_0x596c76(0x245)]={};for(let _0xf3c943=0x0;_0xf3c943<_0x4fa8c1[_0x596c76(0x1f9)];_0xf3c943++){const _0x259a81=_0x4fa8c1[_0xf3c943],_0x3df7ab=_0x6a2e6a[_0x259a81['name']],_0x55bae0=!_0x259a81[_0x596c76(0x1fd)]&&_0xf3c943<_0x4fa8c1[_0x596c76(0x1f9)]-0x1&&_0x259a81[_0x596c76(0x268)]!==_0x596c76(0x263)?_0x4fa8c1[_0xf3c943+0x1][_0x596c76(0x214)]:_0x259a81[_0x596c76(0x1fd)],_0xd66635=_0x55bae0!==_0x259a81['next']?{..._0x259a81,'next':_0x55bae0}:_0x259a81;_0xd63a38[_0x596c76(0x245)][_0x3df7ab]=await convertYamlStepToApi(_0xd66635,_0x4fc4f0,_0x3488f2,_0x6a2e6a,_0x4e1cb6);}}else _0x236cf9[_0x596c76(0x282)]&&(_0xd63a38[_0x596c76(0x233)]=_0x236cf9['root_step']);return _0xd63a38;}async function convertYamlCriteriaToApi(_0x2b7f05,_0x437366,_0x91dba={}){const _0x1d5b31=a154_0x5a67;let _0x4a54f1=_0x2b7f05['segment'];if(_0x4a54f1&&!/^\d+$/['test'](_0x4a54f1)){const _0x8a26c=parseSegmentRef(_0x4a54f1);if(_0x8a26c[_0x1d5b31(0x268)]===_0x1d5b31(0x253))_0x437366?.['resolveSegmentId']&&(_0x4a54f1=await _0x437366[_0x1d5b31(0x22b)](_0x8a26c['name']));else{if(_0x8a26c[_0x1d5b31(0x268)]===_0x1d5b31(0x260)&&_0x91dba[_0x8a26c[_0x1d5b31(0x214)]])_0x437366?.['resolveEmbeddedSegmentId']&&(_0x4a54f1=await _0x437366[_0x1d5b31(0x1ea)](_0x8a26c[_0x1d5b31(0x214)],_0x91dba[_0x8a26c[_0x1d5b31(0x214)]]));else _0x437366?.['resolveSegmentId']&&(_0x4a54f1=await _0x437366[_0x1d5b31(0x22b)](_0x8a26c[_0x1d5b31(0x214)]));}}const _0x2096a9={'name':_0x2b7f05[_0x1d5b31(0x214)],'segmentId':_0x4a54f1};_0x2b7f05[_0x1d5b31(0x262)]&&(_0x2096a9[_0x1d5b31(0x262)]=_0x2b7f05[_0x1d5b31(0x262)]);if(_0x2b7f05[_0x1d5b31(0x1fb)]){const _0x3b6789=_0x2b7f05[_0x1d5b31(0x1fb)][_0x1d5b31(0x22e)],_0x2d62ba=_0x2b7f05['target'][_0x1d5b31(0x252)];let _0x7a8c2b=_0x2b7f05['target'][_0x1d5b31(0x22e)];_0x437366?.['resolveJourneyId']&&!/^\d+$/[_0x1d5b31(0x1e0)](_0x7a8c2b)&&(_0x7a8c2b=await _0x437366['resolveJourneyId'](_0x7a8c2b));let _0x4a4c71=_0x2b7f05['target'][_0x1d5b31(0x252)];_0x437366?.[_0x1d5b31(0x240)]&&!/^\d+$/[_0x1d5b31(0x1e0)](_0x4a4c71)&&(_0x4a4c71=await _0x437366[_0x1d5b31(0x240)](_0x7a8c2b,_0x4a4c71));const _0x1f2e7f=!/^\d+$/['test'](_0x3b6789)&&!isLocalJourneyRef(_0x3b6789)?formatApiJourneyName(_0x3b6789,_0x2d62ba):undefined;_0x2096a9['target']={'journeyId':_0x7a8c2b,'journeyStageId':_0x4a4c71,'journeyName':_0x1f2e7f,'confirmed':!![]},_0x2b7f05[_0x1d5b31(0x1fb)][_0x1d5b31(0x22f)]&&(_0x2096a9['target']['journeyBundleId']=_0x2b7f05['target'][_0x1d5b31(0x22f)]);}return _0x2096a9;}async function convertYamlStepToApi(_0x121986,_0x2b0dec,_0xdcb3f0={},_0x2230f4={},_0x34e1bd={}){const _0x184ba8=a154_0x5a67,_0xb9e8=async _0x2944e9=>{const _0x5b318e=a154_0x5a67;if(/^\d+$/[_0x5b318e(0x1e0)](_0x2944e9))return _0x2944e9;const _0x1a87fd=parseSegmentRef(_0x2944e9);if(_0x1a87fd[_0x5b318e(0x268)]==='ref'){if(_0x2b0dec?.[_0x5b318e(0x22b)])return await _0x2b0dec[_0x5b318e(0x22b)](_0x1a87fd[_0x5b318e(0x214)]);}else{if(_0x1a87fd['type']===_0x5b318e(0x260)&&_0xdcb3f0[_0x1a87fd[_0x5b318e(0x214)]]){if(_0x2b0dec?.[_0x5b318e(0x1ea)])return await _0x2b0dec[_0x5b318e(0x1ea)](_0x1a87fd['name'],_0xdcb3f0[_0x1a87fd[_0x5b318e(0x214)]]);}else{if(_0x2b0dec?.[_0x5b318e(0x22b)])return await _0x2b0dec[_0x5b318e(0x22b)](_0x1a87fd[_0x5b318e(0x214)]);}}return _0x2944e9;},_0x5dec71=async _0x590d6c=>{const _0x5f3e27=a154_0x5a67;if(/^\d+$/[_0x5f3e27(0x1e0)](_0x590d6c))return _0x590d6c;const _0x23de77=parseSegmentRef(_0x590d6c);if(_0x23de77[_0x5f3e27(0x268)]===_0x5f3e27(0x253)){if(_0x2b0dec?.['resolveActivationId'])return await _0x2b0dec[_0x5f3e27(0x277)](_0x23de77[_0x5f3e27(0x214)]);return _0x23de77['name'];}else{if(_0x23de77[_0x5f3e27(0x268)]===_0x5f3e27(0x260)&&_0x34e1bd[_0x23de77['name']]){if(_0x2b0dec?.[_0x5f3e27(0x1c9)])return await _0x2b0dec[_0x5f3e27(0x1c9)](_0x23de77[_0x5f3e27(0x214)],_0x34e1bd[_0x23de77[_0x5f3e27(0x214)]]);if(_0x2b0dec?.['resolveActivationId'])return await _0x2b0dec[_0x5f3e27(0x277)](_0x23de77['name']);}else{if(_0x2b0dec?.[_0x5f3e27(0x277)])return await _0x2b0dec[_0x5f3e27(0x277)](_0x23de77['name']);}}return _0x590d6c;},_0x84ec8d=_0x2e23cf=>{if(!_0x2e23cf)return undefined;if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x2e23cf))return _0x2e23cf;return _0x2230f4[_0x2e23cf]||_0x2e23cf;};switch(_0x121986[_0x184ba8(0x268)]){case _0x184ba8(0x244):{const _0x385212=_0x121986,_0xe81add=_0x385212['with'],_0x208e8c={'type':_0x184ba8(0x237),'name':_0x385212[_0x184ba8(0x214)],'next':_0x84ec8d(_0x385212[_0x184ba8(0x1fd)])};if(_0xe81add[_0x184ba8(0x1ec)]!==undefined&&_0xe81add[_0x184ba8(0x267)])_0x208e8c[_0x184ba8(0x1cc)]=_0x184ba8(0x222),_0x208e8c['waitStep']=_0xe81add[_0x184ba8(0x1ec)],_0x208e8c[_0x184ba8(0x1fa)]=normalizeWaitUnit(_0xe81add[_0x184ba8(0x267)]);else{if(_0xe81add[_0x184ba8(0x1fc)])_0x208e8c[_0x184ba8(0x1cc)]='Date',_0x208e8c[_0x184ba8(0x1ee)]=_0xe81add[_0x184ba8(0x1fc)];else{if(_0xe81add[_0x184ba8(0x20e)])_0x208e8c[_0x184ba8(0x1cc)]='DaysOfTheWeek',_0x208e8c['daysOfWeek']=_0xe81add[_0x184ba8(0x20e)];else{if(_0xe81add[_0x184ba8(0x234)]){_0x208e8c[_0x184ba8(0x1cc)]=_0x184ba8(0x1cd);const _0x1facd7=await _0xb9e8(_0xe81add[_0x184ba8(0x234)][_0x184ba8(0x23d)]),_0x4ffb96=_0xe81add[_0x184ba8(0x234)][_0x184ba8(0x21d)]?.[_0x184ba8(0x1fd)]!==undefined;if(_0x4ffb96){const _0x101d43=[];_0x101d43[_0x184ba8(0x1e8)]({'id':generateUUID(),'segmentId':_0x1facd7,'timedOutPath':![],'name':_0x184ba8(0x217),'next':_0x84ec8d(_0xe81add[_0x184ba8(0x234)]['next']??_0x385212[_0x184ba8(0x1fd)])});if(_0xe81add['condition'][_0x184ba8(0x21d)]){const _0x428034=_0xe81add['condition']['timeout'][_0x184ba8(0x1ec)],_0x4b696d=normalizeWaitUnit(_0xe81add[_0x184ba8(0x234)]['timeout']['unit']);_0x101d43['push']({'id':generateUUID(),'timedOutPath':!![],'name':_0x184ba8(0x265)+_0x428034+'\x20'+_0x4b696d,'moveAfter':_0x428034,'unit':_0x4b696d,'next':_0x84ec8d(_0xe81add['condition'][_0x184ba8(0x21d)][_0x184ba8(0x1fd)])});}_0x208e8c['conditions']=_0x101d43,delete _0x208e8c['next'];}else _0x208e8c[_0x184ba8(0x249)]=_0x1facd7,_0xe81add['condition']['timeout']&&(_0x208e8c[_0x184ba8(0x242)]=_0xe81add[_0x184ba8(0x234)]['timeout'][_0x184ba8(0x1ec)],_0xe81add[_0x184ba8(0x234)]['timeout'][_0x184ba8(0x267)]&&(_0x208e8c[_0x184ba8(0x1c5)]=normalizeWaitUnit(_0xe81add[_0x184ba8(0x234)][_0x184ba8(0x21d)][_0x184ba8(0x267)])));}}}}return _0x208e8c;}case _0x184ba8(0x276):{const _0x4eac87=_0x121986,_0xf8cde8=_0x4eac87[_0x184ba8(0x266)][_0x184ba8(0x276)],_0x415a4c=await _0x5dec71(_0xf8cde8);return{'type':_0x184ba8(0x284),'name':_0x4eac87[_0x184ba8(0x214)],'journeyActivationStepId':_0x415a4c,'next':_0x84ec8d(_0x4eac87[_0x184ba8(0x1fd)])};}case _0x184ba8(0x22c):{const _0xe755ce=_0x121986,_0x1a6e85=_0xe755ce['with'][_0x184ba8(0x1fe)];return{'type':'DecisionPoint','name':_0xe755ce[_0x184ba8(0x214)],'branches':await Promise[_0x184ba8(0x1e1)](_0x1a6e85[_0x184ba8(0x269)](async _0x56bba2=>{const _0x3875fa=_0x184ba8;let _0x5ec0fa='';if(!_0x56bba2['excluded']){const _0x2b6eb7=_0x56bba2[_0x3875fa(0x23d)]||_0x56bba2['segment_id']||'';_0x5ec0fa=_0x2b6eb7?await _0xb9e8(_0x2b6eb7):'';}return{'id':crypto[_0x3875fa(0x1ef)](),'name':_0x56bba2['name'],'description':null,'segmentId':_0x5ec0fa,'excludedPath':_0x56bba2[_0x3875fa(0x235)]??![],'next':_0x84ec8d(_0x56bba2[_0x3875fa(0x1fd)])};})),'next':_0x84ec8d(_0xe755ce[_0x184ba8(0x1fd)])};}case _0x184ba8(0x211):{const _0x113ee8=_0x121986,_0x247a86=_0x113ee8['with'];return{'type':_0x184ba8(0x230),'name':_0x113ee8[_0x184ba8(0x214)],'customizedSplit':_0x247a86[_0x184ba8(0x20b)],'uniqueId':_0x247a86[_0x184ba8(0x1d1)],'variants':_0x247a86[_0x184ba8(0x1f5)][_0x184ba8(0x269)](_0x3e043e=>({'id':_0x3e043e['id']||generateUUID(),'name':_0x3e043e[_0x184ba8(0x214)],'percentage':_0x3e043e[_0x184ba8(0x23f)],'next':_0x84ec8d(_0x3e043e[_0x184ba8(0x1fd)])})),'next':_0x84ec8d(_0x113ee8[_0x184ba8(0x1fd)])};}case'merge':return{'type':_0x184ba8(0x219),'name':_0x121986[_0x184ba8(0x214)],'next':_0x84ec8d(_0x121986[_0x184ba8(0x1fd)])};case _0x184ba8(0x1e7):{const _0x396575=_0x121986,_0x17ee81=_0x396575[_0x184ba8(0x266)]['target'],_0x316fd7=_0x17ee81['journey'],_0x11e2c9=_0x17ee81[_0x184ba8(0x252)];let _0x1ce269=_0x17ee81[_0x184ba8(0x22e)];_0x2b0dec?.[_0x184ba8(0x26e)]&&!/^\d+$/[_0x184ba8(0x1e0)](_0x1ce269)&&(_0x1ce269=await _0x2b0dec[_0x184ba8(0x26e)](_0x1ce269));let _0x6bdd4=_0x17ee81[_0x184ba8(0x252)];_0x2b0dec?.[_0x184ba8(0x240)]&&!/^\d+$/[_0x184ba8(0x1e0)](_0x6bdd4)&&(_0x6bdd4=await _0x2b0dec[_0x184ba8(0x240)](_0x1ce269,_0x6bdd4));const _0x1ff96f=!/^\d+$/[_0x184ba8(0x1e0)](_0x316fd7)&&!isLocalJourneyRef(_0x316fd7)?formatApiJourneyName(_0x316fd7,_0x11e2c9):undefined;return{'type':'Jump','name':_0x396575[_0x184ba8(0x214)],'target':{'journeyId':_0x1ce269,'journeyStageId':_0x6bdd4,'journeyBundleId':_0x17ee81['bundle_id'],'journeyName':_0x1ff96f,'confirmed':!![]},'next':_0x84ec8d(_0x396575[_0x184ba8(0x1fd)])};}case'end':return{'type':_0x184ba8(0x285),'name':_0x121986[_0x184ba8(0x214)]};default:{const _0x1841cb=_0x121986;return{'type':_0x184ba8(0x285),'name':_0x1841cb[_0x184ba8(0x214)]};}}}export function toYamlString(_0x28bcdf){const _0x1f6c6a=a154_0x5a67,_0x5bca8d=stripInternalFields(_0x28bcdf),_0x516ffc=a154_0x4fec58['stringify'](_0x5bca8d,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x1f6c6a(0x1f0)}),_0x12c82e=['segments:','activations:','goal:',_0x1f6c6a(0x232),'journeys:',_0x1f6c6a(0x283),_0x1f6c6a(0x21e)];let _0x186f78=_0x516ffc;for(const _0x40ef7d of _0x12c82e){_0x186f78=_0x186f78[_0x1f6c6a(0x24a)](new RegExp('^('+_0x40ef7d+')','m'),(_0x4677de,_0x3519fa,_0x178a7c)=>{if(_0x178a7c===0x0||_0x186f78[_0x178a7c-0x1]==='\x0a'&&_0x186f78[_0x178a7c-0x2]==='\x0a')return _0x3519fa;return'\x0a'+_0x3519fa;});}return _0x186f78;}function stripInternalFields(_0x1bb20c){const _0x53f1de=a154_0x5a67,{id:_0xd0e45,folder_id:_0x524f57,bundle_id:_0x5cb118,bundle_name:_0x34d486,version:_0x3a2bf1,allow_reentry:_0x154ad5,..._0x1d4b93}=_0x1bb20c;return _0x1d4b93[_0x53f1de(0x26f)]&&(_0x1d4b93[_0x53f1de(0x26f)]=_0x1d4b93[_0x53f1de(0x26f)][_0x53f1de(0x269)](_0x2b9837=>{const _0x3c0607=_0x53f1de,{id:_0x165cbc,..._0x5f4b78}=_0x2b9837;return{..._0x5f4b78,'stages':_0x5f4b78[_0x3c0607(0x1e5)][_0x3c0607(0x269)](stripStageInternalFields),..._0x2b9837['latest']===!![]?{'latest':!![]}:{},..._0x1d4b93[_0x3c0607(0x26f)]['length']===0x1&&_0x5f4b78['version']==='v1'?{'version':undefined}:{}};})),_0x1d4b93[_0x53f1de(0x1e5)]&&(_0x1d4b93[_0x53f1de(0x1e5)]=_0x1d4b93[_0x53f1de(0x1e5)]['map'](stripStageInternalFields)),_0x1d4b93[_0x53f1de(0x22a)]&&(_0x1d4b93[_0x53f1de(0x22a)]=_0x1d4b93[_0x53f1de(0x22a)][_0x53f1de(0x269)](_0x296701=>{const _0x3adb3e=_0x53f1de,{id:_0x183289,..._0x295309}=_0x296701;return{..._0x295309,'stages':_0x295309[_0x3adb3e(0x1e5)][_0x3adb3e(0x269)](stripStageInternalFields),..._0x296701[_0x3adb3e(0x1d4)]===!![]?{'latest':!![]}:{}};})),_0x1d4b93;}function stripStageInternalFields(_0x329cf8){const {id:_0x10ed82,..._0x554b1e}=_0x329cf8;return _0x554b1e;}export function parseYamlString(_0x5db639){return safeParseYaml(_0x5db639,JourneyDefSchema);}export function isJourneyDef(_0x5001ef,_0xda096c){const _0x44695a=a154_0x5a67;if(_0xda096c&&(_0xda096c[_0x44695a(0x24d)](_0x44695a(0x20d))||_0xda096c['endsWith'](_0x44695a(0x248))))return!![];return typeof _0x5001ef===_0x44695a(0x272)&&_0x5001ef!==null&&'type'in _0x5001ef&&_0x5001ef[_0x44695a(0x268)]===_0x44695a(0x22e);}export function generateTemplate(_0x5298d8,_0x1e4745){const _0x183941=a154_0x5a67,_0x216e12={'type':'journey','name':_0x5298d8,'description':'Journey\x20description','reentry':_0x183941(0x1d3),'goal':{'name':'Goal\x20Achieved','segment':_0x183941(0x213)},'stages':[{'name':_0x183941(0x236),'description':'First\x20stage\x20of\x20the\x20journey','entry_criteria':{'name':'Entry\x20Criteria','segment':_0x1e4745},'steps':[{'type':'wait','name':'Wait\x201\x20Day','with':{'duration':0x1,'unit':_0x183941(0x258)}},{'type':_0x183941(0x276),'name':_0x183941(0x25f),'with':{'activation':_0x183941(0x24e)}},{'type':_0x183941(0x263),'name':_0x183941(0x1d0)}]}]};return toYamlString(_0x216e12);}function generateUUID(){return crypto['randomUUID']();}export const SEGMENT_REF_PREFIX=a154_0x11b0f2(0x25a);export function parseSegmentRef(_0x1b34ef){const _0x18ee6b=a154_0x11b0f2;if(_0x1b34ef[_0x18ee6b(0x203)](SEGMENT_REF_PREFIX))return{'type':_0x18ee6b(0x253),'name':_0x1b34ef[_0x18ee6b(0x23a)](SEGMENT_REF_PREFIX[_0x18ee6b(0x1f9)])};if(/^\d+$/[_0x18ee6b(0x1e0)](_0x1b34ef))return{'type':'id','name':_0x1b34ef};return{'type':_0x18ee6b(0x260),'name':_0x1b34ef};}export function makeSegmentRef(_0xbb56bc){return''+SEGMENT_REF_PREFIX+_0xbb56bc;}export function isExternalSegmentRef(_0x12805e){const _0xd87431=a154_0x11b0f2;return _0x12805e[_0xd87431(0x203)](SEGMENT_REF_PREFIX);}export function isJourneysArrayMode(_0x726e14){const _0x470c2c=a154_0x11b0f2;return!!(_0x726e14[_0x470c2c(0x26f)]&&_0x726e14['journeys'][_0x470c2c(0x1f9)]>0x0);}export function isMultiVersionMode(_0x10994a){const _0xc206ee=a154_0x11b0f2;return!!(_0x10994a[_0xc206ee(0x22a)]&&_0x10994a[_0xc206ee(0x22a)]['length']>0x0);}export function isSingleVersionMode(_0x3f63d7){const _0x1ab7a0=a154_0x11b0f2;return!!(_0x3f63d7[_0x1ab7a0(0x1e5)]&&_0x3f63d7['stages'][_0x1ab7a0(0x1f9)]>0x0);}function a154_0x5a67(_0x19a98c,_0x53a6f7){_0x19a98c=_0x19a98c-0x1c3;const _0x178a2=a154_0x178a();let _0x5a679e=_0x178a2[_0x19a98c];return _0x5a679e;}export function hasMultipleVersions(_0x58bc63){const _0x5b939e=a154_0x11b0f2;if(isJourneysArrayMode(_0x58bc63))return(_0x58bc63['journeys']?.['length']||0x0)>0x1;if(isMultiVersionMode(_0x58bc63))return(_0x58bc63[_0x5b939e(0x22a)]?.['length']||0x0)>0x1;return![];}export function normalizeToJourneysFormat(_0x1c3d08){const _0x219412=a154_0x11b0f2;if(isJourneysArrayMode(_0x1c3d08))return _0x1c3d08;if(isSingleVersionMode(_0x1c3d08)){const {stages:_0xa8c730,id:_0x6f5122,version:_0x30b6e7,version_number:_0x4a3b52,..._0x59d4ae}=_0x1c3d08;return{..._0x59d4ae,'journeys':[{'version':_0x30b6e7||'v1','stages':_0xa8c730||[],'id':_0x6f5122,'version_number':_0x4a3b52}]};}if(isMultiVersionMode(_0x1c3d08)){const {versions:_0x1b0641,..._0x2ea04b}=_0x1c3d08;return{..._0x2ea04b,'journeys':(_0x1b0641||[])[_0x219412(0x269)](_0x34b3f5=>({'version':_0x34b3f5[_0x219412(0x214)],'state':_0x34b3f5[_0x219412(0x1dc)],'latest':_0x34b3f5[_0x219412(0x1d4)],'stages':_0x34b3f5[_0x219412(0x1e5)],'id':_0x34b3f5['id'],'version_number':_0x34b3f5['version_number']}))};}return _0x1c3d08;}export function normalizeJourneyDef(_0x49f597,_0x54095e){const _0x8aaf23=a154_0x11b0f2,_0x46585a=normalizeToJourneysFormat(_0x49f597),_0x290f03=_0x54095e?.['segments']?Object[_0x8aaf23(0x202)](_0x54095e[_0x8aaf23(0x278)]):undefined,_0x394aa4=_0x54095e?.[_0x8aaf23(0x1c6)]?Object[_0x8aaf23(0x202)](_0x54095e[_0x8aaf23(0x1c6)]):undefined;return{'type':_0x8aaf23(0x22e),'name':_0x46585a[_0x8aaf23(0x214)],..._0x46585a['description']!==undefined&&{'description':_0x46585a['description']},..._0x46585a[_0x8aaf23(0x270)]&&{'goal':normalizeJourneyCriteria(_0x46585a[_0x8aaf23(0x270)])},..._0x46585a[_0x8aaf23(0x207)]!==undefined&&{'reentry':_0x46585a['reentry']},..._0x46585a[_0x8aaf23(0x278)]&&{'segments':normalizeEmbeddedSegments(_0x46585a[_0x8aaf23(0x278)],_0x290f03)},..._0x46585a[_0x8aaf23(0x1c6)]&&{'activations':normalizeEmbeddedActivations(_0x46585a[_0x8aaf23(0x1c6)],_0x394aa4)},..._0x46585a[_0x8aaf23(0x26f)]&&{'journeys':_0x46585a[_0x8aaf23(0x26f)][_0x8aaf23(0x269)](_0x5696fe=>normalizeJourneyEntry(_0x5696fe,_0x46585a[_0x8aaf23(0x26f)][_0x8aaf23(0x1f9)]===0x1))}};}function normalizeJourneyEntry(_0x27459b,_0x437cb8){const _0x50c8cb=a154_0x11b0f2;return{...!_0x437cb8&&_0x27459b[_0x50c8cb(0x239)]!==undefined&&{'version':_0x27459b[_0x50c8cb(0x239)]},..._0x27459b[_0x50c8cb(0x1dc)]!==undefined&&{'state':_0x27459b[_0x50c8cb(0x1dc)]},...!_0x437cb8&&_0x27459b[_0x50c8cb(0x1d4)]!==undefined&&{'latest':_0x27459b[_0x50c8cb(0x1d4)]},..._0x27459b['version_number']!==undefined&&{'version_number':_0x27459b[_0x50c8cb(0x275)]},..._0x27459b[_0x50c8cb(0x270)]&&{'goal':normalizeJourneyCriteria(_0x27459b[_0x50c8cb(0x270)])},..._0x27459b[_0x50c8cb(0x207)]!==undefined&&{'reentry':_0x27459b[_0x50c8cb(0x207)]},'stages':_0x27459b[_0x50c8cb(0x1e5)][_0x50c8cb(0x269)](normalizeJourneyStage)};}function normalizeJourneyStage(_0x51968a){const _0x3c30b4=a154_0x11b0f2;return{'name':_0x51968a['name'],..._0x51968a[_0x3c30b4(0x262)]!==undefined&&{'description':_0x51968a['description']},..._0x51968a['entry_criteria']&&{'entry_criteria':normalizeJourneyCriteria(_0x51968a[_0x3c30b4(0x25d)])},..._0x51968a[_0x3c30b4(0x23e)]&&{'exit_criteria':_0x51968a[_0x3c30b4(0x23e)][_0x3c30b4(0x269)](normalizeJourneyCriteria)},..._0x51968a[_0x3c30b4(0x229)]&&{'milestone':normalizeJourneyCriteria(_0x51968a[_0x3c30b4(0x229)])},..._0x51968a['steps']&&{'steps':normalizeStepsWithImplicitNext(_0x51968a[_0x3c30b4(0x245)])}};}function normalizeStepsWithImplicitNext(_0x259dab){const _0x2aad73=a154_0x11b0f2;return _0x259dab[_0x2aad73(0x269)]((_0x329882,_0x106350)=>{const _0x10d81e=_0x2aad73,_0x378741=_0x106350<_0x259dab[_0x10d81e(0x1f9)]-0x1?_0x259dab[_0x106350+0x1][_0x10d81e(0x214)]:undefined;return normalizeJourneyStep(_0x329882,_0x378741);});}function normalizeJourneyCriteria(_0x315b74){const _0x1af9bc=a154_0x11b0f2;return{'name':_0x315b74[_0x1af9bc(0x214)],..._0x315b74[_0x1af9bc(0x262)]!==undefined&&{'description':_0x315b74[_0x1af9bc(0x262)]},'segment':_0x315b74[_0x1af9bc(0x23d)],..._0x315b74[_0x1af9bc(0x1fb)]&&{'target':normalizeJumpTarget(_0x315b74['target'])}};}function normalizeJourneyStep(_0x164641,_0x9bca16){const _0x250ea7=a154_0x11b0f2,_0x3fac9b=_0x164641[_0x250ea7(0x1fd)]!==undefined&&_0x164641[_0x250ea7(0x1fd)]!==_0x9bca16,_0x304d5c={'type':_0x164641[_0x250ea7(0x268)],'name':_0x164641[_0x250ea7(0x214)],..._0x3fac9b&&{'next':_0x164641[_0x250ea7(0x1fd)]}};if(_0x250ea7(0x266)in _0x164641&&_0x164641[_0x250ea7(0x266)])return{..._0x304d5c,'with':normalizeStepParams(_0x164641[_0x250ea7(0x268)],_0x164641[_0x250ea7(0x266)])};return _0x304d5c;}function normalizeStepParams(_0xa7fcac,_0x5d3eeb){const _0x2f07c2=a154_0x11b0f2;switch(_0xa7fcac){case _0x2f07c2(0x244):{const _0x40e91b=_0x5d3eeb;let _0x5ee9d7;return _0x40e91b[_0x2f07c2(0x234)]&&(_0x5ee9d7={'segment':_0x40e91b[_0x2f07c2(0x234)][_0x2f07c2(0x23d)],..._0x40e91b[_0x2f07c2(0x234)]['next']!==undefined&&{'next':_0x40e91b['condition']['next']},..._0x40e91b[_0x2f07c2(0x234)][_0x2f07c2(0x21d)]&&{'timeout':{'duration':_0x40e91b['condition'][_0x2f07c2(0x21d)][_0x2f07c2(0x1ec)],'unit':_0x40e91b[_0x2f07c2(0x234)]['timeout'][_0x2f07c2(0x267)],..._0x40e91b['condition'][_0x2f07c2(0x21d)][_0x2f07c2(0x1fd)]!==undefined&&{'next':_0x40e91b[_0x2f07c2(0x234)]['timeout'][_0x2f07c2(0x1fd)]}}}}),{..._0x40e91b[_0x2f07c2(0x1ec)]!==undefined&&{'duration':_0x40e91b[_0x2f07c2(0x1ec)]},..._0x40e91b['unit']!==undefined&&{'unit':_0x40e91b['unit']},..._0x40e91b['wait_until']!==undefined&&{'wait_until':_0x40e91b[_0x2f07c2(0x1fc)]},..._0x40e91b['days_of_week']!==undefined&&{'days_of_week':_0x40e91b['days_of_week']},..._0x5ee9d7&&{'condition':_0x5ee9d7}};}case'activation':{const _0x4331dc=_0x5d3eeb;return{'activation':_0x4331dc[_0x2f07c2(0x276)]};}case _0x2f07c2(0x22c):{const _0x21c297=_0x5d3eeb;return{'branches':_0x21c297[_0x2f07c2(0x1fe)][_0x2f07c2(0x269)](normalizeDecisionBranch)};}case _0x2f07c2(0x211):{const _0x82abd0=_0x5d3eeb;return{..._0x82abd0[_0x2f07c2(0x20b)]!==undefined&&{'customized_split':_0x82abd0[_0x2f07c2(0x20b)]},..._0x82abd0[_0x2f07c2(0x1d1)]!==undefined&&{'unique_id':_0x82abd0['unique_id']},'variants':_0x82abd0[_0x2f07c2(0x1f5)][_0x2f07c2(0x269)](normalizeAbTestVariant)};}case'jump':{const _0x1b72b3=_0x5d3eeb;return{'target':normalizeJumpTarget(_0x1b72b3[_0x2f07c2(0x1fb)])};}default:return _0x5d3eeb;}}function normalizeDecisionBranch(_0x2dbc9e){const _0x56b1e0=a154_0x11b0f2;return{'name':_0x2dbc9e[_0x56b1e0(0x214)],..._0x2dbc9e[_0x56b1e0(0x23d)]!==undefined&&{'segment':_0x2dbc9e[_0x56b1e0(0x23d)]},..._0x2dbc9e['excluded']!==undefined&&{'excluded':_0x2dbc9e['excluded']},..._0x2dbc9e[_0x56b1e0(0x1fd)]!==undefined&&{'next':_0x2dbc9e[_0x56b1e0(0x1fd)]}};}function normalizeAbTestVariant(_0x3e3c06){const _0x20fd0c=a154_0x11b0f2;return{..._0x3e3c06['id']!==undefined&&{'id':_0x3e3c06['id']},'name':_0x3e3c06['name'],'percentage':_0x3e3c06[_0x20fd0c(0x23f)],..._0x3e3c06[_0x20fd0c(0x1fd)]!==undefined&&{'next':_0x3e3c06[_0x20fd0c(0x1fd)]}};}function normalizeJumpTarget(_0x1f72e7){const _0x20d3f6=a154_0x11b0f2;return{'journey':_0x1f72e7[_0x20d3f6(0x22e)],'stage':_0x1f72e7[_0x20d3f6(0x252)],..._0x1f72e7['bundle_id']!==undefined&&{'bundle_id':_0x1f72e7['bundle_id']}};}function normalizeEmbeddedSegments(_0x323497,_0x2146de){const _0x1390f1=a154_0x11b0f2,_0x119886={},_0x2b8e0e=Object[_0x1390f1(0x202)](_0x323497),_0x516d48=_0x2146de?[..._0x2146de[_0x1390f1(0x264)](_0x3741b7=>_0x2b8e0e[_0x1390f1(0x200)](_0x3741b7)),..._0x2b8e0e[_0x1390f1(0x264)](_0x3cdf5b=>!_0x2146de['includes'](_0x3cdf5b))['sort']()]:_0x2b8e0e[_0x1390f1(0x212)]();for(const _0x75270 of _0x516d48){const _0x4cfc71=_0x323497[_0x75270];if(_0x4cfc71[_0x1390f1(0x223)]){const _0x1e5441=_0x4cfc71[_0x1390f1(0x223)];if(_0x1e5441[_0x1390f1(0x268)]!==_0x1390f1(0x26d)&&_0x1e5441['type']!=='Or'&&_0x1e5441['type']!==_0x1390f1(0x215)){const _0x193b7=_0x1e5441[_0x1390f1(0x268)]??_0x1390f1(0x255);throw new SDKError(ErrorCode[_0x1390f1(0x1f1)],_0x1390f1(0x1df)+_0x75270+'\x27:\x20'+(_0x1390f1(0x201)+_0x193b7+_0x1390f1(0x20f))+_0x1390f1(0x24c)+_0x1390f1(0x243)+_0x1390f1(0x23c)+'\x20\x20\x20\x20conditions:\x0a'+'\x20\x20\x20\x20\x20\x20-\x20type:\x20Value\x0a'+_0x1390f1(0x1ed)+'\x20\x20\x20\x20\x20\x20\x20\x20operator:\x20...');}if(!_0x1e5441[_0x1390f1(0x231)]||!Array[_0x1390f1(0x27d)](_0x1e5441['conditions']))throw new SDKError(ErrorCode[_0x1390f1(0x1f1)],_0x1390f1(0x1df)+_0x75270+'\x27:\x20'+'rule.conditions\x20must\x20be\x20an\x20array\x20of\x20conditions.\x0a'+_0x1390f1(0x24c)+'\x20\x20rule:\x0a'+(_0x1390f1(0x1f6)+_0x1e5441[_0x1390f1(0x268)]+'\x0a')+_0x1390f1(0x1d2)+_0x1390f1(0x1e3)+_0x1390f1(0x1ed)+_0x1390f1(0x1cf));}_0x119886[_0x75270]={..._0x4cfc71[_0x1390f1(0x262)]&&_0x4cfc71[_0x1390f1(0x262)]['trim']()&&{'description':_0x4cfc71['description']},..._0x4cfc71['rule']&&{'rule':deepSortObject(_0x4cfc71[_0x1390f1(0x223)])}};}return _0x119886;}function normalizeEmbeddedActivations(_0xea015c,_0x360c1e){const _0x260f08=a154_0x11b0f2,_0x5397dc={},_0x4e0e63=Object[_0x260f08(0x202)](_0xea015c),_0x58ae9c=_0x360c1e?[..._0x360c1e[_0x260f08(0x264)](_0x477cba=>_0x4e0e63[_0x260f08(0x200)](_0x477cba)),..._0x4e0e63[_0x260f08(0x264)](_0x5b734c=>!_0x360c1e[_0x260f08(0x200)](_0x5b734c))[_0x260f08(0x212)]()]:_0x4e0e63[_0x260f08(0x212)]();for(const _0x308166 of _0x58ae9c){const _0x402305=_0xea015c[_0x308166];_0x5397dc[_0x308166]={'name':_0x402305[_0x260f08(0x214)],'connection':_0x402305[_0x260f08(0x1ca)],..._0x402305[_0x260f08(0x262)]!==undefined&&{'description':_0x402305['description']},..._0x402305['all_columns']!==undefined&&{'all_columns':_0x402305[_0x260f08(0x26c)]},..._0x402305[_0x260f08(0x21b)]!==undefined&&{'columns':_0x402305[_0x260f08(0x21b)]},..._0x402305[_0x260f08(0x204)]!==undefined&&{'behavior':_0x402305['behavior']},..._0x402305[_0x260f08(0x254)]!==undefined&&{'schedule':_0x402305[_0x260f08(0x254)]},..._0x402305[_0x260f08(0x20c)]!==undefined&&{'notification':_0x402305['notification']},..._0x402305['connector_config']!==undefined&&{'connector_config':_0x402305[_0x260f08(0x279)]},..._0x402305['activation_template_id']!==undefined&&{'activation_template_id':_0x402305[_0x260f08(0x1dd)]}};}return _0x5397dc;}export function getActiveStages(_0xba11d9){const _0x10a47f=a154_0x11b0f2;if(isJourneysArrayMode(_0xba11d9)){const _0x367992=_0xba11d9['journeys']||[],_0x3ab269=_0x367992[_0x10a47f(0x24b)](_0x2ce053=>_0x2ce053[_0x10a47f(0x1d4)]===!![])||_0x367992[0x0];return _0x3ab269?.['stages']||[];}if(isSingleVersionMode(_0xba11d9))return _0xba11d9[_0x10a47f(0x1e5)]||[];if(isMultiVersionMode(_0xba11d9)){const _0x2b92ec=_0xba11d9[_0x10a47f(0x22a)]||[],_0x36b108=_0x2b92ec[_0x10a47f(0x24b)](_0x438ad6=>_0x438ad6[_0x10a47f(0x1d4)]===!![])||_0x2b92ec[0x0];return _0x36b108?.[_0x10a47f(0x1e5)]||[];}return[];}export function getLatestJourneyEntry(_0x11a1f3){const _0x54ac6f=a154_0x11b0f2;if(isJourneysArrayMode(_0x11a1f3)){const _0xdbfa9e=_0x11a1f3[_0x54ac6f(0x26f)]||[];return _0xdbfa9e[_0x54ac6f(0x24b)](_0x4732cf=>_0x4732cf['latest']===!![])||_0xdbfa9e[0x0];}if(isMultiVersionMode(_0x11a1f3)){const _0x33e252=_0x11a1f3[_0x54ac6f(0x22a)]||[],_0x24509e=_0x33e252[_0x54ac6f(0x24b)](_0x3ed450=>_0x3ed450[_0x54ac6f(0x1d4)]===!![])||_0x33e252[0x0];if(_0x24509e)return{'version':_0x24509e[_0x54ac6f(0x214)],'state':_0x24509e['state'],'latest':_0x24509e['latest'],'stages':_0x24509e[_0x54ac6f(0x1e5)],'id':_0x24509e['id'],'version_number':_0x24509e[_0x54ac6f(0x275)]};}if(isSingleVersionMode(_0x11a1f3))return{'version':_0x11a1f3[_0x54ac6f(0x239)]||'v1','state':_0x54ac6f(0x1db),'stages':_0x11a1f3[_0x54ac6f(0x1e5)]||[],'id':_0x11a1f3['id'],'version_number':_0x11a1f3[_0x54ac6f(0x275)],'goal':_0x11a1f3[_0x54ac6f(0x270)],'reentry':_0x11a1f3[_0x54ac6f(0x207)]};return undefined;}export function getLatestVersion(_0x3bf1be){const _0x3b0c5b=a154_0x11b0f2;if(!isMultiVersionMode(_0x3bf1be))return undefined;const _0x41eaf8=_0x3bf1be[_0x3b0c5b(0x22a)]||[];return _0x41eaf8[_0x3b0c5b(0x24b)](_0x32c80f=>_0x32c80f[_0x3b0c5b(0x1d4)]===!![])||_0x41eaf8[0x0];}export function getEffectiveGoal(_0x49f854){const _0x43218c=a154_0x11b0f2,_0x26f1a3=getLatestJourneyEntry(_0x49f854);return _0x26f1a3?.['goal']||_0x49f854[_0x43218c(0x270)];}export function getEffectiveReentry(_0x3aec7a){const _0x53c744=a154_0x11b0f2,_0x5c230c=getLatestJourneyEntry(_0x3aec7a);return _0x5c230c?.[_0x53c744(0x207)]||_0x3aec7a['reentry'];}export function collectSegmentRefs(_0x58b2a9){const _0x19ab52=a154_0x11b0f2,_0x1a0654=new Set();_0x58b2a9[_0x19ab52(0x270)]?.[_0x19ab52(0x23d)]&&_0x1a0654[_0x19ab52(0x21c)](_0x58b2a9[_0x19ab52(0x270)][_0x19ab52(0x23d)]);const _0xda22cf=_0x5c8f26=>{const _0x58549d=_0x19ab52;for(const _0x1c7da4 of _0x5c8f26){_0x1c7da4[_0x58549d(0x25d)]?.[_0x58549d(0x23d)]&&_0x1a0654['add'](_0x1c7da4[_0x58549d(0x25d)][_0x58549d(0x23d)]);if(_0x1c7da4[_0x58549d(0x23e)])for(const _0x416eb6 of _0x1c7da4[_0x58549d(0x23e)]){_0x416eb6[_0x58549d(0x23d)]&&_0x1a0654[_0x58549d(0x21c)](_0x416eb6[_0x58549d(0x23d)]);}_0x1c7da4['milestone']?.[_0x58549d(0x23d)]&&_0x1a0654['add'](_0x1c7da4[_0x58549d(0x229)][_0x58549d(0x23d)]);if(_0x1c7da4[_0x58549d(0x245)])for(const _0x377ae3 of _0x1c7da4['steps']){if(_0x377ae3[_0x58549d(0x268)]===_0x58549d(0x22c)){const _0x54844f=_0x377ae3;for(const _0x379cdb of _0x54844f[_0x58549d(0x266)][_0x58549d(0x1fe)]){_0x379cdb[_0x58549d(0x23d)]&&_0x1a0654[_0x58549d(0x21c)](_0x379cdb[_0x58549d(0x23d)]);}}else{if(_0x377ae3['type']===_0x58549d(0x244)){const _0x45d37e=_0x377ae3;_0x45d37e[_0x58549d(0x266)]['condition']?.['segment']&&_0x1a0654[_0x58549d(0x21c)](_0x45d37e[_0x58549d(0x266)][_0x58549d(0x234)][_0x58549d(0x23d)]);}}}}};_0x58b2a9[_0x19ab52(0x1e5)]&&_0xda22cf(_0x58b2a9[_0x19ab52(0x1e5)]);if(_0x58b2a9['versions'])for(const _0x2763fd of _0x58b2a9[_0x19ab52(0x22a)]){_0xda22cf(_0x2763fd[_0x19ab52(0x1e5)]);}return _0x1a0654;}export function validateSegmentRefs(_0x396ca6){const _0x46ac63=a154_0x11b0f2,_0x33ae17=[],_0x11d297=collectSegmentRefs(_0x396ca6),_0x50b047=new Set(Object[_0x46ac63(0x202)](_0x396ca6[_0x46ac63(0x278)]||{}));for(const _0x217f93 of _0x11d297){const _0x3b4c08=parseSegmentRef(_0x217f93);_0x3b4c08[_0x46ac63(0x268)]===_0x46ac63(0x260)&&!_0x50b047['has'](_0x3b4c08[_0x46ac63(0x214)])&&_0x33ae17[_0x46ac63(0x1e8)](_0x46ac63(0x225)+_0x3b4c08['name']+_0x46ac63(0x27b)+_0x3b4c08[_0x46ac63(0x214)]+_0x46ac63(0x224));}return _0x33ae17;}export function collectSegmentIdsFromJourneyApi(_0x3fc3ed){const _0xc8f09e=a154_0x11b0f2,_0x5a0224=new Set();_0x3fc3ed[_0xc8f09e(0x23b)][_0xc8f09e(0x270)]?.[_0xc8f09e(0x24f)]&&_0x5a0224[_0xc8f09e(0x21c)](_0x3fc3ed[_0xc8f09e(0x23b)][_0xc8f09e(0x270)][_0xc8f09e(0x24f)]);const _0x395f41=_0x3fc3ed[_0xc8f09e(0x23b)][_0xc8f09e(0x1f2)];if(Array[_0xc8f09e(0x27d)](_0x395f41))for(const _0x5baed8 of _0x395f41){_0x5baed8[_0xc8f09e(0x1f8)]?.['segmentId']&&_0x5a0224[_0xc8f09e(0x21c)](_0x5baed8[_0xc8f09e(0x1f8)][_0xc8f09e(0x24f)]);const _0x317ba3=_0x5baed8['exitCriterias']??_0x5baed8[_0xc8f09e(0x1e6)];if(Array[_0xc8f09e(0x27d)](_0x317ba3))for(const _0x3f458c of _0x317ba3){_0x3f458c[_0xc8f09e(0x24f)]&&_0x5a0224[_0xc8f09e(0x21c)](_0x3f458c[_0xc8f09e(0x24f)]);}_0x5baed8[_0xc8f09e(0x229)]?.[_0xc8f09e(0x24f)]&&_0x5a0224[_0xc8f09e(0x21c)](_0x5baed8['milestone'][_0xc8f09e(0x24f)]);if(_0x5baed8[_0xc8f09e(0x245)]&&typeof _0x5baed8[_0xc8f09e(0x245)]===_0xc8f09e(0x272)){const _0x40e752=Array[_0xc8f09e(0x27d)](_0x5baed8[_0xc8f09e(0x245)])?_0x5baed8[_0xc8f09e(0x245)]:Object[_0xc8f09e(0x218)](_0x5baed8['steps']);for(const _0x118c9f of _0x40e752){_0x118c9f[_0xc8f09e(0x1da)]?.[_0xc8f09e(0x24f)]&&_0x5a0224[_0xc8f09e(0x21c)](_0x118c9f[_0xc8f09e(0x1da)]['segmentId']);const _0x377ec9=_0x118c9f;_0x377ec9['conditionSegmentId']&&_0x5a0224[_0xc8f09e(0x21c)](_0x377ec9[_0xc8f09e(0x249)]);if(Array[_0xc8f09e(0x27d)](_0x377ec9[_0xc8f09e(0x231)]))for(const _0x44fc59 of _0x377ec9[_0xc8f09e(0x231)]){_0x44fc59[_0xc8f09e(0x24f)]&&_0x5a0224[_0xc8f09e(0x21c)](_0x44fc59[_0xc8f09e(0x24f)]);}if(Array['isArray'](_0x118c9f[_0xc8f09e(0x1fe)]))for(const _0xabde5c of _0x118c9f[_0xc8f09e(0x1fe)]){_0xabde5c[_0xc8f09e(0x24f)]&&_0x5a0224[_0xc8f09e(0x21c)](_0xabde5c['segmentId']);}}}}return _0x5a0224;}
@@ -1 +1 @@
1
- (function(_0x51e40a,_0x2d623b){const _0x447a68=a152_0x341e,_0x12c7cf=_0x51e40a();while(!![]){try{const _0xefdb1c=parseInt(_0x447a68(0x1ae))/0x1+parseInt(_0x447a68(0x1ac))/0x2*(parseInt(_0x447a68(0x1dc))/0x3)+parseInt(_0x447a68(0x1bf))/0x4*(parseInt(_0x447a68(0x1ad))/0x5)+parseInt(_0x447a68(0x1d7))/0x6*(parseInt(_0x447a68(0x1ab))/0x7)+-parseInt(_0x447a68(0x1ba))/0x8*(-parseInt(_0x447a68(0x1da))/0x9)+parseInt(_0x447a68(0x1c1))/0xa+parseInt(_0x447a68(0x1aa))/0xb*(-parseInt(_0x447a68(0x1c2))/0xc);if(_0xefdb1c===_0x2d623b)break;else _0x12c7cf['push'](_0x12c7cf['shift']());}catch(_0x360230){_0x12c7cf['push'](_0x12c7cf['shift']());}}}(a152_0x4fda,0xe43d5));export const DEFAULT_TIME_RANGE='-1d';export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x5e9ce8,_0x5268f8,_0x2131f1){const _0x119e10=a152_0x341e,_0x1e1b36=_0x2131f1&&_0x2131f1['length']>0x0?_0x2131f1[_0x119e10(0x1bd)](',\x20'):'*';return _0x119e10(0x1b9)+_0x1e1b36+'\x20FROM\x20'+_0x5e9ce8+'.'+_0x5268f8+_0x119e10(0x1a8);}export function generateMasterCountSQL(_0x973e41){const _0x29eef9=a152_0x341e,{database:_0x3eb448,table:_0x4b2dee}=_0x973e41['master'];return _0x29eef9(0x1b7)+_0x3eb448+'.'+_0x4b2dee;}export function generateMasterSampleSQL(_0x136e4a,_0x4f9ae6=0x5){const _0x3d836c=a152_0x341e,{database:_0x4d2a0e,table:_0x231b98}=_0x136e4a[_0x3d836c(0x1ca)];return _0x3d836c(0x1b4)+_0x4d2a0e+'.'+_0x231b98+_0x3d836c(0x1b3)+_0x4f9ae6;}export function generateAttributeCoverageSQL(_0x35e16c,_0x30d8de){const _0x1bb739=a152_0x341e,_0x1db4e3=_0x35e16c['master'];return('\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20'+_0x1db4e3[_0x1bb739(0x1c8)]+'.'+_0x1db4e3[_0x1bb739(0x1d9)]+_0x1bb739(0x1c4)+_0x30d8de[_0x1bb739(0x1c0)][_0x1bb739(0x1c8)]+'.'+_0x30d8de[_0x1bb739(0x1c0)]['table']+_0x1bb739(0x1d0)+_0x30d8de['join'][_0x1bb739(0x1cc)]+'\x20=\x20a.'+_0x30d8de[_0x1bb739(0x1bd)][_0x1bb739(0x1d8)]+'\x0aWHERE\x20a.'+_0x30d8de[_0x1bb739(0x1bd)][_0x1bb739(0x1d8)]+_0x1bb739(0x1d6))[_0x1bb739(0x1bc)]();}export function generateBehaviorStatsSQL(_0x22c6f3,_0x140926,_0x503754=DEFAULT_TIME_RANGE){const _0x22b3c9=a152_0x341e,_0x228763=_0x22c6f3[_0x22b3c9(0x1ca)];return(_0x22b3c9(0x1c7)+_0x140926[_0x22b3c9(0x1bd)][_0x22b3c9(0x1cc)]+')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20'+_0x228763[_0x22b3c9(0x1c8)]+'.'+_0x228763['table']+_0x22b3c9(0x1cd)+_0x140926['source'][_0x22b3c9(0x1c8)]+'.'+_0x140926[_0x22b3c9(0x1c0)][_0x22b3c9(0x1d9)]+_0x22b3c9(0x1db)+_0x140926[_0x22b3c9(0x1bd)]['parent_key']+_0x22b3c9(0x1a7)+_0x140926[_0x22b3c9(0x1bd)][_0x22b3c9(0x1d8)]+_0x22b3c9(0x1cf)+_0x503754+'\x27)\x0a')['trim']();}export function generateAttributeSampleSQL(_0x5421e5,_0x2bb606,_0x330896=0x5){const _0x466257=a152_0x341e,_0xd7c477=_0x5421e5[_0x466257(0x1ca)],_0x302eaf=_0x2bb606[_0x466257(0x1bd)][_0x466257(0x1cc)],_0x321dfa=_0x2bb606['columns']['map'](_0x2799d8=>'a.'+_0x2799d8[_0x466257(0x1cb)])['join'](',\x20');return(_0x466257(0x1b2)+_0x302eaf+',\x20'+_0x321dfa+'\x0aFROM\x20'+_0xd7c477[_0x466257(0x1c8)]+'.'+_0xd7c477['table']+_0x466257(0x1cd)+_0x2bb606[_0x466257(0x1c0)]['database']+'.'+_0x2bb606[_0x466257(0x1c0)][_0x466257(0x1d9)]+'\x20a\x0a\x20\x20ON\x20m.'+_0x2bb606['join']['parent_key']+_0x466257(0x1b6)+_0x2bb606['join']['child_key']+_0x466257(0x1af)+_0x330896+'\x0a')[_0x466257(0x1bc)]();}export function generateBehaviorSampleSQL(_0x329467,_0x3abaeb,_0x2471cc=0x5,_0x11921d=DEFAULT_TIME_RANGE){const _0xca5f61=a152_0x341e,_0x5d0f29=_0x329467[_0xca5f61(0x1ca)],_0x6f5e17=_0x3abaeb['join'][_0xca5f61(0x1cc)];let _0x4f8854;if(_0x3abaeb[_0xca5f61(0x1d4)])_0x4f8854=_0xca5f61(0x1d2);else _0x3abaeb[_0xca5f61(0x1dd)]&&_0x3abaeb[_0xca5f61(0x1dd)][_0xca5f61(0x1bb)]>0x0?_0x4f8854=_0x3abaeb[_0xca5f61(0x1dd)]['map'](_0x55c080=>'b.'+_0x55c080[_0xca5f61(0x1cb)])[_0xca5f61(0x1bd)](',\x20'):_0x4f8854=_0xca5f61(0x1d2);return(_0xca5f61(0x1b2)+_0x6f5e17+',\x20'+_0x4f8854+_0xca5f61(0x1c5)+_0x5d0f29[_0xca5f61(0x1c8)]+'.'+_0x5d0f29[_0xca5f61(0x1d9)]+_0xca5f61(0x1cd)+_0x3abaeb['source'][_0xca5f61(0x1c8)]+'.'+_0x3abaeb['source']['table']+_0xca5f61(0x1db)+_0x3abaeb['join']['parent_key']+_0xca5f61(0x1a7)+_0x3abaeb[_0xca5f61(0x1bd)][_0xca5f61(0x1d8)]+_0xca5f61(0x1cf)+_0x11921d+_0xca5f61(0x1c9)+_0x2471cc+'\x0a')[_0xca5f61(0x1bc)]();}function quoteIdentifier(_0x47ea9b){const _0x4bc937=a152_0x341e;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/['test'](_0x47ea9b))return'\x22'+_0x47ea9b[_0x4bc937(0x1b8)](/"/g,'\x22\x22')+'\x22';return _0x47ea9b;}function a152_0x4fda(){const _0x484889=['SELECT\x20*\x20FROM\x20','name','\x20=\x20a.','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','replace','SELECT\x20','5368ylawFU','length','trim','join','\x20AS\x20','204604cyNTsY','source','16189740yHSGGK','37113684OqnvNC','label','\x20m\x0aLEFT\x20JOIN\x20','\x0aFROM\x20','map','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','database','\x27)\x0aLIMIT\x20','master','column','parent_key','\x20m\x0aJOIN\x20','toLowerCase','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','\x20a\x0a\x20\x20ON\x20m.','find','b.*','\x20=\x20','all_columns','attributes','\x20IS\x20NOT\x20NULL\x0a','72216DCkFMg','child_key','table','20727lalyNG','\x20b\x0a\x20\x20ON\x20m.','22503yzqQvW','columns','behaviors','push','LEFT\x20JOIN\x20','(all\x20columns)','\x20=\x20b.','\x20LIMIT\x200','\x0aLIMIT\x200\x0a','11VqAByj','133AjtjcV','10bErzMb','5saLcTG','546049siQQiL','\x0aLIMIT\x20','forEach','\x20m\x0a','\x0aSELECT\x20m.','\x20LIMIT\x20'];a152_0x4fda=function(){return _0x484889;};return a152_0x4fda();}export function generateEnrichedSQL(_0x37fe8f,_0x2f465f=0x5){const _0x20ef37=a152_0x341e,_0xd5462=_0x37fe8f['master'],_0x217628=_0x37fe8f[_0x20ef37(0x1d5)]||[];if(_0x217628[_0x20ef37(0x1bb)]===0x0)return _0x20ef37(0x1b4)+_0xd5462[_0x20ef37(0x1c8)]+'.'+_0xd5462['table']+_0x20ef37(0x1b3)+_0x2f465f;const _0x9fd3e5=['m.*'],_0x571e6d=[];return _0x217628[_0x20ef37(0x1b0)]((_0x37d466,_0x1b1cd8)=>{const _0x260127=_0x20ef37,_0x225e87='a'+_0x1b1cd8;_0x37d466[_0x260127(0x1dd)]['forEach'](_0xac619c=>{const _0x509b43=_0x260127,_0x185914=quoteIdentifier(_0xac619c[_0x509b43(0x1c3)]||_0xac619c['column']);_0x9fd3e5[_0x509b43(0x1df)](_0x225e87+'.'+_0xac619c['column']+_0x509b43(0x1be)+_0x185914);}),_0x571e6d[_0x260127(0x1df)](_0x260127(0x1e0)+_0x37d466[_0x260127(0x1c0)]['database']+'.'+_0x37d466[_0x260127(0x1c0)][_0x260127(0x1d9)]+'\x20'+_0x225e87+'\x0a\x20\x20ON\x20m.'+_0x37d466[_0x260127(0x1bd)][_0x260127(0x1cc)]+_0x260127(0x1d3)+_0x225e87+'.'+_0x37d466[_0x260127(0x1bd)][_0x260127(0x1d8)]);}),('\x0aSELECT\x20'+_0x9fd3e5[_0x20ef37(0x1bd)](',\x20')+'\x0aFROM\x20'+_0xd5462['database']+'.'+_0xd5462[_0x20ef37(0x1d9)]+_0x20ef37(0x1b1)+_0x571e6d[_0x20ef37(0x1bd)]('\x0a')+_0x20ef37(0x1af)+_0x2f465f+'\x0a')[_0x20ef37(0x1bc)]();}export function generateAttributeSchemaSQL(_0x420b39,_0x5653b2){const _0x260689=a152_0x341e,_0x3e4337=_0x420b39[_0x260689(0x1ca)],_0x52a893=_0x5653b2['join'][_0x260689(0x1cc)],_0x3a051b=_0x5653b2[_0x260689(0x1dd)][_0x260689(0x1c6)](_0x9521d1=>'a.'+_0x9521d1[_0x260689(0x1cb)])[_0x260689(0x1bd)](',\x20');return('\x0aSELECT\x20m.'+_0x52a893+',\x20'+_0x3a051b+_0x260689(0x1c5)+_0x3e4337[_0x260689(0x1c8)]+'.'+_0x3e4337['table']+_0x260689(0x1cd)+_0x5653b2[_0x260689(0x1c0)][_0x260689(0x1c8)]+'.'+_0x5653b2[_0x260689(0x1c0)][_0x260689(0x1d9)]+_0x260689(0x1d0)+_0x5653b2['join'][_0x260689(0x1cc)]+_0x260689(0x1b6)+_0x5653b2['join'][_0x260689(0x1d8)]+_0x260689(0x1a9))[_0x260689(0x1bc)]();}export function generateBehaviorSchemaSQL(_0x414fa0,_0x211fd4){const _0x1e684c=a152_0x341e,_0x3eab4b=_0x414fa0['master'],_0x819987=_0x211fd4['join'][_0x1e684c(0x1cc)];let _0x29b5c5;if(_0x211fd4[_0x1e684c(0x1d4)])_0x29b5c5='b.*';else _0x211fd4[_0x1e684c(0x1dd)]&&_0x211fd4[_0x1e684c(0x1dd)][_0x1e684c(0x1bb)]>0x0?_0x29b5c5=_0x211fd4['columns'][_0x1e684c(0x1c6)](_0x3ffcf9=>'b.'+_0x3ffcf9[_0x1e684c(0x1cb)])[_0x1e684c(0x1bd)](',\x20'):_0x29b5c5=_0x1e684c(0x1d2);return(_0x1e684c(0x1b2)+_0x819987+',\x20'+_0x29b5c5+_0x1e684c(0x1c5)+_0x3eab4b['database']+'.'+_0x3eab4b[_0x1e684c(0x1d9)]+_0x1e684c(0x1cd)+_0x211fd4['source'][_0x1e684c(0x1c8)]+'.'+_0x211fd4[_0x1e684c(0x1c0)][_0x1e684c(0x1d9)]+_0x1e684c(0x1db)+_0x211fd4['join'][_0x1e684c(0x1cc)]+_0x1e684c(0x1a7)+_0x211fd4['join'][_0x1e684c(0x1d8)]+_0x1e684c(0x1a9))[_0x1e684c(0x1bc)]();}function a152_0x341e(_0x247a21,_0x40658c){_0x247a21=_0x247a21-0x1a6;const _0x4fda14=a152_0x4fda();let _0x341e32=_0x4fda14[_0x247a21];return _0x341e32;}export function getAttributeColumns(_0x55535b){const _0x5477ed=a152_0x341e;return _0x55535b[_0x5477ed(0x1dd)][_0x5477ed(0x1c6)](_0x1758c7=>({'label':_0x1758c7[_0x5477ed(0x1c3)]||_0x1758c7[_0x5477ed(0x1cb)],'column':_0x1758c7[_0x5477ed(0x1cb)]}));}export function getBehaviorColumns(_0x1c7e82){const _0x43cb3f=a152_0x341e;if(_0x1c7e82['all_columns'])return[{'label':_0x43cb3f(0x1a6),'column':'*'}];if(_0x1c7e82[_0x43cb3f(0x1dd)]&&_0x1c7e82[_0x43cb3f(0x1dd)][_0x43cb3f(0x1bb)]>0x0)return _0x1c7e82[_0x43cb3f(0x1dd)][_0x43cb3f(0x1c6)](_0x5ed0dd=>({'label':_0x5ed0dd['label']||_0x5ed0dd[_0x43cb3f(0x1cb)],'column':_0x5ed0dd[_0x43cb3f(0x1cb)]}));return[{'label':'(all\x20columns)','column':'*'}];}export function findAttributeByName(_0x2c0012,_0x525ab4){const _0x512331=a152_0x341e;return _0x2c0012[_0x512331(0x1d5)]?.[_0x512331(0x1d1)](_0x222f9f=>_0x222f9f[_0x512331(0x1b5)][_0x512331(0x1ce)]()===_0x525ab4[_0x512331(0x1ce)]());}export function findBehaviorByName(_0x1b7acf,_0x458127){const _0x4bdbb7=a152_0x341e;return _0x1b7acf[_0x4bdbb7(0x1de)]?.[_0x4bdbb7(0x1d1)](_0x44dc3a=>_0x44dc3a[_0x4bdbb7(0x1b5)][_0x4bdbb7(0x1ce)]()===_0x458127[_0x4bdbb7(0x1ce)]());}
1
+ const a155_0x471a48=a155_0x550f;function a155_0x550f(_0x2110fe,_0x36bff6){_0x2110fe=_0x2110fe-0x1b9;const _0x3bbf15=a155_0x3bbf();let _0x550f8b=_0x3bbf15[_0x2110fe];return _0x550f8b;}(function(_0x4cf388,_0x372c6f){const _0x39913f=a155_0x550f,_0x124a03=_0x4cf388();while(!![]){try{const _0x178cf6=-parseInt(_0x39913f(0x1d8))/0x1+parseInt(_0x39913f(0x1d0))/0x2*(-parseInt(_0x39913f(0x1c5))/0x3)+parseInt(_0x39913f(0x1ba))/0x4*(-parseInt(_0x39913f(0x1d1))/0x5)+parseInt(_0x39913f(0x1c1))/0x6*(parseInt(_0x39913f(0x1db))/0x7)+-parseInt(_0x39913f(0x1c8))/0x8*(-parseInt(_0x39913f(0x1c7))/0x9)+parseInt(_0x39913f(0x1e3))/0xa*(parseInt(_0x39913f(0x1d6))/0xb)+parseInt(_0x39913f(0x1e7))/0xc;if(_0x178cf6===_0x372c6f)break;else _0x124a03['push'](_0x124a03['shift']());}catch(_0x4e74cd){_0x124a03['push'](_0x124a03['shift']());}}}(a155_0x3bbf,0x69025));export const DEFAULT_TIME_RANGE=a155_0x471a48(0x1e2);export const DEFAULT_SAMPLE_LIMIT=0x28;export function generateSchemaValidationSQL(_0x2f16a7,_0x136666,_0x1d9b66){const _0x2b6cba=a155_0x471a48,_0x520910=_0x1d9b66&&_0x1d9b66[_0x2b6cba(0x1ca)]>0x0?_0x1d9b66[_0x2b6cba(0x1ec)](',\x20'):'*';return _0x2b6cba(0x1d7)+_0x520910+'\x20FROM\x20'+_0x2f16a7+'.'+_0x136666+'\x20LIMIT\x200';}export function generateMasterCountSQL(_0xc3e6b5){const _0x36ff34=a155_0x471a48,{database:_0x11a20c,table:_0x22a15c}=_0xc3e6b5['master'];return _0x36ff34(0x1ed)+_0x11a20c+'.'+_0x22a15c;}export function generateMasterSampleSQL(_0x73d1e5,_0x20bc6c=0x5){const _0x57d5d1=a155_0x471a48,{database:_0x750a31,table:_0x3787ae}=_0x73d1e5['master'];return _0x57d5d1(0x1f1)+_0x750a31+'.'+_0x3787ae+_0x57d5d1(0x1eb)+_0x20bc6c;}export function generateAttributeCoverageSQL(_0x22cdec,_0x1f926b){const _0x2c8fb3=a155_0x471a48,_0xba58c9=_0x22cdec['master'];return('\x0aSELECT\x20COUNT(*)\x20AS\x20matched_count\x0aFROM\x20'+_0xba58c9[_0x2c8fb3(0x1ea)]+'.'+_0xba58c9[_0x2c8fb3(0x1d2)]+_0x2c8fb3(0x1e9)+_0x1f926b[_0x2c8fb3(0x1c6)][_0x2c8fb3(0x1ea)]+'.'+_0x1f926b[_0x2c8fb3(0x1c6)][_0x2c8fb3(0x1d2)]+'\x20a\x0a\x20\x20ON\x20m.'+_0x1f926b[_0x2c8fb3(0x1ec)][_0x2c8fb3(0x1ef)]+_0x2c8fb3(0x1c3)+_0x1f926b[_0x2c8fb3(0x1ec)][_0x2c8fb3(0x1dc)]+'\x0aWHERE\x20a.'+_0x1f926b[_0x2c8fb3(0x1ec)][_0x2c8fb3(0x1dc)]+'\x20IS\x20NOT\x20NULL\x0a')[_0x2c8fb3(0x1cc)]();}export function generateBehaviorStatsSQL(_0x829a2c,_0x45c1df,_0x28cfd5=DEFAULT_TIME_RANGE){const _0x4588a9=a155_0x471a48,_0x4c7287=_0x829a2c['master'];return(_0x4588a9(0x1be)+_0x45c1df['join'][_0x4588a9(0x1ef)]+')\x20AS\x20customers_with_events,\x0a\x20\x20COUNT(*)\x20AS\x20total_events\x0aFROM\x20'+_0x4c7287[_0x4588a9(0x1ea)]+'.'+_0x4c7287[_0x4588a9(0x1d2)]+_0x4588a9(0x1da)+_0x45c1df[_0x4588a9(0x1c6)]['database']+'.'+_0x45c1df[_0x4588a9(0x1c6)][_0x4588a9(0x1d2)]+_0x4588a9(0x1bb)+_0x45c1df['join'][_0x4588a9(0x1ef)]+_0x4588a9(0x1bf)+_0x45c1df[_0x4588a9(0x1ec)][_0x4588a9(0x1dc)]+_0x4588a9(0x1bd)+_0x28cfd5+'\x27)\x0a')['trim']();}function a155_0x3bbf(){const _0x50f744=['replace','SELECT\x20*\x20FROM\x20','find','LEFT\x20JOIN\x20','4aArmCL','\x20b\x0a\x20\x20ON\x20m.','master','\x0aWHERE\x20TD_INTERVAL(b.time,\x20\x27','\x0aSELECT\x0a\x20\x20COUNT(DISTINCT\x20m.','\x20=\x20b.','attributes','279204QDsnLm','\x0aLIMIT\x200\x0a','\x20=\x20a.','map','3108wHULsL','source','27BGprwV','444632OkZbJd','columns','length','\x20a\x0a\x20\x20ON\x20m.','trim','column','name','\x0aSELECT\x20','1532ZmsRDv','3906125inguLg','table','m.*','push','\x20m\x0a','7634liyphX','SELECT\x20','771639GzaoaW','behaviors','\x20m\x0aJOIN\x20','77Ohwncd','child_key','\x0aFROM\x20','forEach','toLowerCase','label','\x0aSELECT\x20m.','-1d','1070UPGXKW','b.*','\x20=\x20','all_columns','24284256eCxQTn','\x0aLIMIT\x20','\x20m\x0aLEFT\x20JOIN\x20','database','\x20LIMIT\x20','join','SELECT\x20COUNT(*)\x20AS\x20row_count\x20FROM\x20','(all\x20columns)','parent_key'];a155_0x3bbf=function(){return _0x50f744;};return a155_0x3bbf();}export function generateAttributeSampleSQL(_0x1a4af6,_0x291d03,_0x2b8cae=0x5){const _0x500fae=a155_0x471a48,_0x965f54=_0x1a4af6['master'],_0x321d53=_0x291d03[_0x500fae(0x1ec)][_0x500fae(0x1ef)],_0x46ecaf=_0x291d03[_0x500fae(0x1c9)][_0x500fae(0x1c4)](_0x39fd73=>'a.'+_0x39fd73[_0x500fae(0x1cd)])[_0x500fae(0x1ec)](',\x20');return('\x0aSELECT\x20m.'+_0x321d53+',\x20'+_0x46ecaf+_0x500fae(0x1dd)+_0x965f54['database']+'.'+_0x965f54[_0x500fae(0x1d2)]+_0x500fae(0x1da)+_0x291d03[_0x500fae(0x1c6)][_0x500fae(0x1ea)]+'.'+_0x291d03[_0x500fae(0x1c6)][_0x500fae(0x1d2)]+_0x500fae(0x1cb)+_0x291d03[_0x500fae(0x1ec)][_0x500fae(0x1ef)]+_0x500fae(0x1c3)+_0x291d03['join'][_0x500fae(0x1dc)]+_0x500fae(0x1e8)+_0x2b8cae+'\x0a')['trim']();}export function generateBehaviorSampleSQL(_0x3d5528,_0x191631,_0x3f52b3=0x5,_0x358ebe=DEFAULT_TIME_RANGE){const _0x41353c=a155_0x471a48,_0x4fe032=_0x3d5528['master'],_0x4eed21=_0x191631[_0x41353c(0x1ec)]['parent_key'];let _0x162ff1;if(_0x191631['all_columns'])_0x162ff1=_0x41353c(0x1e4);else _0x191631[_0x41353c(0x1c9)]&&_0x191631[_0x41353c(0x1c9)][_0x41353c(0x1ca)]>0x0?_0x162ff1=_0x191631[_0x41353c(0x1c9)][_0x41353c(0x1c4)](_0x23c566=>'b.'+_0x23c566[_0x41353c(0x1cd)])[_0x41353c(0x1ec)](',\x20'):_0x162ff1=_0x41353c(0x1e4);return(_0x41353c(0x1e1)+_0x4eed21+',\x20'+_0x162ff1+_0x41353c(0x1dd)+_0x4fe032[_0x41353c(0x1ea)]+'.'+_0x4fe032['table']+_0x41353c(0x1da)+_0x191631[_0x41353c(0x1c6)][_0x41353c(0x1ea)]+'.'+_0x191631[_0x41353c(0x1c6)][_0x41353c(0x1d2)]+_0x41353c(0x1bb)+_0x191631[_0x41353c(0x1ec)][_0x41353c(0x1ef)]+_0x41353c(0x1bf)+_0x191631[_0x41353c(0x1ec)][_0x41353c(0x1dc)]+_0x41353c(0x1bd)+_0x358ebe+'\x27)\x0aLIMIT\x20'+_0x3f52b3+'\x0a')[_0x41353c(0x1cc)]();}function quoteIdentifier(_0x1566db){const _0x59d99d=a155_0x471a48;if(/[\s\-\.\#\[\]\(\)]|^[0-9]/['test'](_0x1566db))return'\x22'+_0x1566db[_0x59d99d(0x1f0)](/"/g,'\x22\x22')+'\x22';return _0x1566db;}export function generateEnrichedSQL(_0x137d7d,_0x386510=0x5){const _0x525311=a155_0x471a48,_0x10d57a=_0x137d7d['master'],_0x23b778=_0x137d7d[_0x525311(0x1c0)]||[];if(_0x23b778['length']===0x0)return _0x525311(0x1f1)+_0x10d57a[_0x525311(0x1ea)]+'.'+_0x10d57a['table']+_0x525311(0x1eb)+_0x386510;const _0xeacb6a=[_0x525311(0x1d3)],_0x3811f0=[];return _0x23b778[_0x525311(0x1de)]((_0x1401bb,_0x412690)=>{const _0x2c3dd9=_0x525311,_0x2f337='a'+_0x412690;_0x1401bb[_0x2c3dd9(0x1c9)]['forEach'](_0x510d4d=>{const _0x24a0b8=_0x2c3dd9,_0x4f302e=quoteIdentifier(_0x510d4d[_0x24a0b8(0x1e0)]||_0x510d4d[_0x24a0b8(0x1cd)]);_0xeacb6a[_0x24a0b8(0x1d4)](_0x2f337+'.'+_0x510d4d[_0x24a0b8(0x1cd)]+'\x20AS\x20'+_0x4f302e);}),_0x3811f0[_0x2c3dd9(0x1d4)](_0x2c3dd9(0x1b9)+_0x1401bb[_0x2c3dd9(0x1c6)][_0x2c3dd9(0x1ea)]+'.'+_0x1401bb[_0x2c3dd9(0x1c6)][_0x2c3dd9(0x1d2)]+'\x20'+_0x2f337+'\x0a\x20\x20ON\x20m.'+_0x1401bb[_0x2c3dd9(0x1ec)][_0x2c3dd9(0x1ef)]+_0x2c3dd9(0x1e5)+_0x2f337+'.'+_0x1401bb[_0x2c3dd9(0x1ec)][_0x2c3dd9(0x1dc)]);}),(_0x525311(0x1cf)+_0xeacb6a[_0x525311(0x1ec)](',\x20')+_0x525311(0x1dd)+_0x10d57a['database']+'.'+_0x10d57a[_0x525311(0x1d2)]+_0x525311(0x1d5)+_0x3811f0[_0x525311(0x1ec)]('\x0a')+_0x525311(0x1e8)+_0x386510+'\x0a')[_0x525311(0x1cc)]();}export function generateAttributeSchemaSQL(_0x178b06,_0x35cccf){const _0x51bcde=a155_0x471a48,_0x1d68c9=_0x178b06[_0x51bcde(0x1bc)],_0x3ccb28=_0x35cccf[_0x51bcde(0x1ec)][_0x51bcde(0x1ef)],_0xf08602=_0x35cccf[_0x51bcde(0x1c9)][_0x51bcde(0x1c4)](_0x27fac7=>'a.'+_0x27fac7[_0x51bcde(0x1cd)])['join'](',\x20');return('\x0aSELECT\x20m.'+_0x3ccb28+',\x20'+_0xf08602+_0x51bcde(0x1dd)+_0x1d68c9['database']+'.'+_0x1d68c9[_0x51bcde(0x1d2)]+_0x51bcde(0x1da)+_0x35cccf[_0x51bcde(0x1c6)]['database']+'.'+_0x35cccf[_0x51bcde(0x1c6)][_0x51bcde(0x1d2)]+_0x51bcde(0x1cb)+_0x35cccf['join'][_0x51bcde(0x1ef)]+_0x51bcde(0x1c3)+_0x35cccf[_0x51bcde(0x1ec)][_0x51bcde(0x1dc)]+_0x51bcde(0x1c2))[_0x51bcde(0x1cc)]();}export function generateBehaviorSchemaSQL(_0x32716a,_0x53df01){const _0x3db1f5=a155_0x471a48,_0x431286=_0x32716a[_0x3db1f5(0x1bc)],_0x296fe2=_0x53df01['join'][_0x3db1f5(0x1ef)];let _0x2fd671;if(_0x53df01['all_columns'])_0x2fd671='b.*';else _0x53df01[_0x3db1f5(0x1c9)]&&_0x53df01['columns']['length']>0x0?_0x2fd671=_0x53df01[_0x3db1f5(0x1c9)][_0x3db1f5(0x1c4)](_0x1d0861=>'b.'+_0x1d0861[_0x3db1f5(0x1cd)])['join'](',\x20'):_0x2fd671=_0x3db1f5(0x1e4);return(_0x3db1f5(0x1e1)+_0x296fe2+',\x20'+_0x2fd671+'\x0aFROM\x20'+_0x431286[_0x3db1f5(0x1ea)]+'.'+_0x431286[_0x3db1f5(0x1d2)]+'\x20m\x0aJOIN\x20'+_0x53df01[_0x3db1f5(0x1c6)][_0x3db1f5(0x1ea)]+'.'+_0x53df01[_0x3db1f5(0x1c6)][_0x3db1f5(0x1d2)]+_0x3db1f5(0x1bb)+_0x53df01[_0x3db1f5(0x1ec)][_0x3db1f5(0x1ef)]+_0x3db1f5(0x1bf)+_0x53df01[_0x3db1f5(0x1ec)][_0x3db1f5(0x1dc)]+_0x3db1f5(0x1c2))[_0x3db1f5(0x1cc)]();}export function getAttributeColumns(_0x4cd165){const _0x1732be=a155_0x471a48;return _0x4cd165[_0x1732be(0x1c9)][_0x1732be(0x1c4)](_0x55ca0d=>({'label':_0x55ca0d[_0x1732be(0x1e0)]||_0x55ca0d[_0x1732be(0x1cd)],'column':_0x55ca0d[_0x1732be(0x1cd)]}));}export function getBehaviorColumns(_0x1fa14a){const _0x230f05=a155_0x471a48;if(_0x1fa14a[_0x230f05(0x1e6)])return[{'label':_0x230f05(0x1ee),'column':'*'}];if(_0x1fa14a[_0x230f05(0x1c9)]&&_0x1fa14a['columns']['length']>0x0)return _0x1fa14a[_0x230f05(0x1c9)][_0x230f05(0x1c4)](_0x21f44c=>({'label':_0x21f44c[_0x230f05(0x1e0)]||_0x21f44c['column'],'column':_0x21f44c['column']}));return[{'label':_0x230f05(0x1ee),'column':'*'}];}export function findAttributeByName(_0x5b303a,_0x44567f){const _0x3755cf=a155_0x471a48;return _0x5b303a[_0x3755cf(0x1c0)]?.[_0x3755cf(0x1f2)](_0x37c94b=>_0x37c94b[_0x3755cf(0x1ce)][_0x3755cf(0x1df)]()===_0x44567f[_0x3755cf(0x1df)]());}export function findBehaviorByName(_0x16bf3d,_0x2cd84b){const _0xe5c8fd=a155_0x471a48;return _0x16bf3d[_0xe5c8fd(0x1d9)]?.['find'](_0xddd89b=>_0xddd89b[_0xe5c8fd(0x1ce)][_0xe5c8fd(0x1df)]()===_0x2cd84b[_0xe5c8fd(0x1df)]());}