@treasuredata/tdx 2026.3.21 → 2026.3.23

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 (203) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/connection-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/delivery-command.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-campaign-pull-command.js +1 -1
  21. package/dist/commands/engage-campaign-push-command.js +1 -1
  22. package/dist/commands/engage-campaign-validate-command.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/engage-template-pull-command.js +1 -1
  25. package/dist/commands/engage-template-push-command.js +1 -1
  26. package/dist/commands/engage-template-validate-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/journey-validate-command.js +1 -1
  30. package/dist/commands/llm-command.js +1 -1
  31. package/dist/commands/mcp-command.js +1 -1
  32. package/dist/commands/parent-segment-command.js +1 -1
  33. package/dist/commands/policy-command.js +1 -1
  34. package/dist/commands/profile-command.js +1 -1
  35. package/dist/commands/profiles-command.js +1 -1
  36. package/dist/commands/query-command.js +1 -1
  37. package/dist/commands/schedule-command.js +1 -1
  38. package/dist/commands/segment-command.js +1 -1
  39. package/dist/commands/segment-create-command.js +1 -1
  40. package/dist/commands/segment-fields-command.js +1 -1
  41. package/dist/commands/segment-pull-command.js +1 -1
  42. package/dist/commands/segment-push-command.js +1 -1
  43. package/dist/commands/segment-update-command.js +1 -1
  44. package/dist/commands/segment-use-command.js +1 -1
  45. package/dist/commands/segment-validate-command.js +1 -1
  46. package/dist/commands/segments.js +1 -1
  47. package/dist/commands/show.js +1 -1
  48. package/dist/commands/status-command.js +1 -1
  49. package/dist/commands/tables.js +1 -1
  50. package/dist/commands/unset-command.js +1 -1
  51. package/dist/commands/upgrade-command.js +1 -1
  52. package/dist/commands/use-command.js +1 -1
  53. package/dist/commands/user-command.js +1 -1
  54. package/dist/commands/workflow-command.js +1 -1
  55. package/dist/core/auth.js +1 -1
  56. package/dist/core/command-output.js +1 -1
  57. package/dist/core/config.js +1 -1
  58. package/dist/core/connection-cache.js +1 -1
  59. package/dist/core/constants.js +1 -1
  60. package/dist/core/credential-cache.js +1 -1
  61. package/dist/core/global-context.js +1 -1
  62. package/dist/core/keychain.js +1 -1
  63. package/dist/core/oauth-keychain.js +1 -1
  64. package/dist/core/oauth.js +1 -1
  65. package/dist/core/profile.js +1 -1
  66. package/dist/core/project-config.js +1 -1
  67. package/dist/core/session.js +1 -1
  68. package/dist/core/user-cache.js +1 -1
  69. package/dist/core/version.js +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/mcp/server.js +1 -1
  72. package/dist/mcp/tools/index.js +1 -1
  73. package/dist/mcp/tools/tdx-run.js +1 -1
  74. package/dist/mcp/tools/tdx-search.js +1 -1
  75. package/dist/mcp/utils.js +1 -1
  76. package/dist/proxy/claude-usage-tracker.js +1 -1
  77. package/dist/proxy/passthrough-server.js +1 -1
  78. package/dist/proxy/sse-usage-parser.js +1 -1
  79. package/dist/sdk/agent/agent-config.js +1 -1
  80. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  81. package/dist/sdk/agent/agent-yaml.js +1 -1
  82. package/dist/sdk/agent/test/evaluator.js +1 -1
  83. package/dist/sdk/agent/test/executor.js +1 -1
  84. package/dist/sdk/agent/test/index.js +1 -1
  85. package/dist/sdk/agent/test/output.js +1 -1
  86. package/dist/sdk/agent/test/parser.js +1 -1
  87. package/dist/sdk/agent/tool-target-registry.js +1 -1
  88. package/dist/sdk/api.js +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/delivery-api-client.js +1 -1
  91. package/dist/sdk/client/endpoints.js +1 -1
  92. package/dist/sdk/client/engage-api-client.js +1 -1
  93. package/dist/sdk/client/http-client.js +1 -1
  94. package/dist/sdk/client/llm-api-client.js +1 -1
  95. package/dist/sdk/client/oauth-refresh.js +1 -1
  96. package/dist/sdk/client/rate-limiter.js +1 -1
  97. package/dist/sdk/client/td-api-client.js +1 -1
  98. package/dist/sdk/client/trino-api-client.js +1 -1
  99. package/dist/sdk/client/workflow-client.js +1 -1
  100. package/dist/sdk/connection-validator.js +1 -1
  101. package/dist/sdk/connection.js +1 -1
  102. package/dist/sdk/delivery.js +1 -1
  103. package/dist/sdk/engage/campaign-pull.js +1 -1
  104. package/dist/sdk/engage/campaign-push.js +1 -1
  105. package/dist/sdk/engage/campaign-validator.js +1 -1
  106. package/dist/sdk/engage/campaign-yaml.js +1 -1
  107. package/dist/sdk/engage/template-pull.js +1 -1
  108. package/dist/sdk/engage/template-push.js +1 -1
  109. package/dist/sdk/engage/template-validator.js +1 -1
  110. package/dist/sdk/engage/template-yaml.js +1 -1
  111. package/dist/sdk/engage/types/campaign-def.js +1 -1
  112. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  113. package/dist/sdk/engage/types/template-schema.js +1 -1
  114. package/dist/sdk/engage.js +1 -1
  115. package/dist/sdk/errors.js +1 -1
  116. package/dist/sdk/index.js +1 -1
  117. package/dist/sdk/io/index.js +1 -1
  118. package/dist/sdk/io/node-filesystem.js +1 -1
  119. package/dist/sdk/job.js +1 -1
  120. package/dist/sdk/journey.js +1 -1
  121. package/dist/sdk/llm/chat-cache.js +1 -1
  122. package/dist/sdk/llm/index.js +1 -1
  123. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  124. package/dist/sdk/llm/model-factors.js +1 -1
  125. package/dist/sdk/personalization.js +1 -1
  126. package/dist/sdk/policy.js +1 -1
  127. package/dist/sdk/query/index.js +1 -1
  128. package/dist/sdk/query/sql-parser.js +1 -1
  129. package/dist/sdk/realtime.js +1 -1
  130. package/dist/sdk/schedule.js +1 -1
  131. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  132. package/dist/sdk/segment/fields-display.js +1 -1
  133. package/dist/sdk/segment/file-discovery.js +1 -1
  134. package/dist/sdk/segment/journey-utils.js +1 -1
  135. package/dist/sdk/segment/journey-validator.js +1 -1
  136. package/dist/sdk/segment/journey-yaml.js +1 -1
  137. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  138. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  139. package/dist/sdk/segment/pull-workflow.js +1 -1
  140. package/dist/sdk/segment/push-recovery.js +1 -1
  141. package/dist/sdk/segment/push-workflow.js +1 -1
  142. package/dist/sdk/segment/resolution-context.js +1 -1
  143. package/dist/sdk/segment/segment-path-parser.js +1 -1
  144. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  145. package/dist/sdk/segment/segment-validator.js +1 -1
  146. package/dist/sdk/segment/target-resolution.js +1 -1
  147. package/dist/sdk/segment/tdx-config.js +1 -1
  148. package/dist/sdk/segment/types/activation-schema.js +1 -1
  149. package/dist/sdk/segment/types/journey-def.js +1 -1
  150. package/dist/sdk/segment/types/journey-schema.js +1 -1
  151. package/dist/sdk/segment/types/segment-def.js +1 -1
  152. package/dist/sdk/segment/types/segment-schema.js +1 -1
  153. package/dist/sdk/segment/validate-files.js +1 -1
  154. package/dist/sdk/segment/yaml-validator.js +1 -1
  155. package/dist/sdk/segment.js +1 -1
  156. package/dist/sdk/types/index.js +1 -1
  157. package/dist/sdk/types/progress.js +1 -1
  158. package/dist/sdk/user.js +1 -1
  159. package/dist/sdk/util/format-detector.js +1 -1
  160. package/dist/sdk/util/formatters.js +1 -1
  161. package/dist/sdk/util/index.js +1 -1
  162. package/dist/sdk/util/paginate.js +1 -1
  163. package/dist/sdk/util/tree-formatter.js +1 -1
  164. package/dist/sdk/workflow/archive-validation.js +1 -1
  165. package/dist/sdk/workflow/clone-workflow.js +1 -1
  166. package/dist/sdk/workflow/index.js +1 -1
  167. package/dist/sdk/workflow/pull-workflow.js +1 -1
  168. package/dist/sdk/workflow/push-workflow.js +1 -1
  169. package/dist/sdk/workflow/tdx-config.js +1 -1
  170. package/dist/sdk/workflow/workflow-utils.js +1 -1
  171. package/dist/test-utils/command-runner.js +1 -1
  172. package/dist/test-utils/factories.js +1 -1
  173. package/dist/test-utils/fixtures.js +1 -1
  174. package/dist/test-utils/http-mock.js +1 -1
  175. package/dist/test-utils/index.js +1 -1
  176. package/dist/utils/async.js +1 -1
  177. package/dist/utils/colors.js +1 -1
  178. package/dist/utils/diff.js +1 -1
  179. package/dist/utils/file-permissions.js +1 -1
  180. package/dist/utils/file-reader.js +1 -1
  181. package/dist/utils/github-releases.js +1 -1
  182. package/dist/utils/global-cache.js +1 -1
  183. package/dist/utils/json-loader.js +1 -1
  184. package/dist/utils/local-cache.js +1 -1
  185. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  186. package/dist/utils/logger/formatters/index.js +1 -1
  187. package/dist/utils/logger/handlers/console-handler.js +1 -1
  188. package/dist/utils/logger/handlers/file-handler.js +1 -1
  189. package/dist/utils/logger/handlers/index.js +1 -1
  190. package/dist/utils/logger/handlers/null-handler.js +1 -1
  191. package/dist/utils/logger/index.js +1 -1
  192. package/dist/utils/logger/logger.js +1 -1
  193. package/dist/utils/logger/types.js +1 -1
  194. package/dist/utils/option-validation.js +1 -1
  195. package/dist/utils/process.js +1 -1
  196. package/dist/utils/prompt.js +1 -1
  197. package/dist/utils/spinner.js +1 -1
  198. package/dist/utils/sse-parser.js +1 -1
  199. package/dist/utils/string-utils.js +1 -1
  200. package/dist/utils/table-ref-parser.js +1 -1
  201. package/dist/utils/tdx-logger.js +1 -1
  202. package/dist/utils/version-check.js +1 -1
  203. package/package.json +1 -1
@@ -1 +1 @@
1
- function a133_0x2d29(){const _0x514921=['column_name','cyan','data','entries','query','set','size','Attributes','extra','error','columns','fields','some','setJobId','behavior','matrixTableName','localeCompare','298880IDGFLd','2128176ojRJWY','varchar','Unknown','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','column_type','bold','parentTableName','1604490mXhtmQ','Behaviors','1074iiHvay','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','push','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','displayName','filter','execute','Schema\x20query:\x0a','slice','4235yZGDdS','attribute','source','1565721ZPbYYD','name','dim','SELECT\x20*\x20FROM\x20(\x0a','8CFZSBV','379799HCUbnF','543065uktxEX','key','sort','tableName','matrixColumnName','behaviorName','length','get','type','groupingName','information_schema','null','parentColumn','verbose','default'];a133_0x2d29=function(){return _0x514921;};return a133_0x2d29();}(function(_0x1e8f53,_0x3fe4aa){const _0x52e710=a133_0x4264,_0x5560ee=_0x1e8f53();while(!![]){try{const _0x286f02=-parseInt(_0x52e710(0x113))/0x1+parseInt(_0x52e710(0xf7))/0x2+parseInt(_0x52e710(0xff))/0x3+parseInt(_0x52e710(0xf8))/0x4+-parseInt(_0x52e710(0x10a))/0x5*(parseInt(_0x52e710(0x101))/0x6)+-parseInt(_0x52e710(0x112))/0x7+-parseInt(_0x52e710(0x111))/0x8*(parseInt(_0x52e710(0x10d))/0x9);if(_0x286f02===_0x3fe4aa)break;else _0x5560ee['push'](_0x5560ee['shift']());}catch(_0x30f8d9){_0x5560ee['push'](_0x5560ee['shift']());}}}(a133_0x2d29,0x47a22));import a133_0xfcf1e6 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x53deef){const _0xf59503=a133_0x4264,_0x35534a=_0x53deef[_0xf59503(0xf0)]['map'](_0x2eb42d=>({'column_name':_0x2eb42d['name'],'column_type':_0x2eb42d['type'],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x53deef,'columns':[{'name':_0xf59503(0xe6),'type':_0xf59503(0xf9)},{'name':_0xf59503(0xfc),'type':_0xf59503(0xf9)},{'name':_0xf59503(0xe2),'type':'varchar'},{'name':_0xf59503(0x114),'type':_0xf59503(0xf9)},{'name':_0xf59503(0xe5),'type':_0xf59503(0xf9)},{'name':_0xf59503(0xee),'type':_0xf59503(0xf9)}],'data':_0x35534a};}export async function executeSchemaQuery(_0x52a3f7,_0x42403e,_0x1732f1){const _0x1f69f5=a133_0x4264,_0x443654=_0x52a3f7['trim']()['replace'](/;+$/,''),_0x212f95=_0x1f69f5(0x110)+_0x443654+_0x1f69f5(0x102);_0x1732f1[_0x1f69f5(0xe4)]&&console[_0x1f69f5(0xef)](_0x1f69f5(0x108)+_0x212f95);const _0xcf4c81=await withProgressSpinner('Fetching\x20schema...',async _0x370231=>{const _0x1f5e00=_0x1f69f5,_0x2f071f=await _0x42403e[_0x1f5e00(0xea)][_0x1f5e00(0x107)](_0x212f95,{'catalog':'td','schema':_0x1f5e00(0xe1),'onJobId':_0x31fd8b=>{const _0x25c54a=_0x1f5e00;_0x370231[_0x25c54a(0xf3)](_0x31fd8b);}});return _0x2f071f;},{'verbose':_0x1732f1[_0x1f69f5(0xe4)]});return buildSchemaResult(_0xcf4c81[_0x1f69f5(0xe8)]);}function columnName(_0x1fc9a7){const _0x56c6b8=a133_0x4264;return _0x1fc9a7[_0x56c6b8(0x117)]||_0x1fc9a7[_0x56c6b8(0xe3)]||_0x1fc9a7[_0x56c6b8(0x10e)];}function formatFieldLine(_0x10c2ac,_0x2119da,_0x56f4dd){const _0x2cc53c=a133_0x4264,_0x1f40a3=_0x10c2ac!==_0x2119da?'\x20'+a133_0xfcf1e6['dim']('('+_0x2119da+')'):'';return'\x20\x20\x20\x20'+_0x10c2ac+_0x1f40a3+':\x20'+a133_0xfcf1e6[_0x2cc53c(0xe7)](_0x56f4dd);}function sortByColumnName(_0x235759){const _0x140353=a133_0x4264;return[..._0x235759][_0x140353(0x115)]((_0x3bc0c6,_0x4e99bb)=>columnName(_0x3bc0c6)[_0x140353(0xf6)](columnName(_0x4e99bb)));}function a133_0x4264(_0x1604cb,_0x6e118c){_0x1604cb=_0x1604cb-0xe1;const _0x2d29bb=a133_0x2d29();let _0x426445=_0x2d29bb[_0x1604cb];return _0x426445;}export function displayFieldsHumanReadable(_0x28ade1,_0x1b7b5c){const _0x2f0038=a133_0x4264,_0x27612c=_0x28ade1[_0x2f0038(0x106)](_0x59ebff=>_0x59ebff[_0x2f0038(0x10c)]===_0x2f0038(0x10b)),_0x261dc6=_0x28ade1['filter'](_0x1fdc0=>_0x1fdc0[_0x2f0038(0x10c)]===_0x2f0038(0xf4)),_0x15fa4d=new Map();for(const _0x3e2098 of _0x27612c){const _0x3ea49f=_0x3e2098[_0x2f0038(0x11c)]||_0x3e2098[_0x2f0038(0xfe)]||_0x2f0038(0xfa),_0x2de2ea=_0x15fa4d['get'](_0x3ea49f);_0x2de2ea?_0x2de2ea[_0x2f0038(0xf1)][_0x2f0038(0x103)](_0x3e2098):_0x15fa4d[_0x2f0038(0xeb)](_0x3ea49f,{'displayName':_0x3ea49f,'tableName':_0x3e2098[_0x2f0038(0xfe)],'fields':[_0x3e2098]});}const _0x167c18=new Map();for(const _0x5ccc69 of _0x261dc6){const _0x5d52d8=_0x5ccc69[_0x2f0038(0x118)]||'Unknown',_0x35919d=_0x167c18[_0x2f0038(0x11a)](_0x5d52d8)||[];_0x35919d[_0x2f0038(0x103)](_0x5ccc69),_0x167c18['set'](_0x5d52d8,_0x35919d);}console[_0x2f0038(0xef)]('\x0a'+a133_0xfcf1e6['bold'](_0x1b7b5c));if(_0x15fa4d[_0x2f0038(0xec)]>0x0){console[_0x2f0038(0xef)]('\x0a'+a133_0xfcf1e6[_0x2f0038(0x10f)](_0x2f0038(0xed)));const _0x42e219=[..._0x15fa4d[_0x2f0038(0xe9)]()][_0x2f0038(0x115)]((_0x22de1d,_0x214c1c)=>_0x22de1d[0x0][_0x2f0038(0xf6)](_0x214c1c[0x0]));for(const [,_0x8016c2]of _0x42e219){const _0x3887e8=_0x8016c2['tableName']&&_0x8016c2[_0x2f0038(0x116)]!==_0x8016c2[_0x2f0038(0x105)]?'\x20'+a133_0xfcf1e6['dim']('('+_0x8016c2[_0x2f0038(0x116)]+')'):'';console[_0x2f0038(0xef)]('\x20\x20'+a133_0xfcf1e6[_0x2f0038(0xfd)](_0x8016c2[_0x2f0038(0x105)])+_0x3887e8);for(const _0x2f8463 of sortByColumnName(_0x8016c2[_0x2f0038(0xf1)])){console[_0x2f0038(0xef)](formatFieldLine(columnName(_0x2f8463),_0x2f8463[_0x2f0038(0x10e)],_0x2f8463['type']));}}}if(_0x167c18[_0x2f0038(0xec)]>0x0){console[_0x2f0038(0xef)]('\x0a'+a133_0xfcf1e6[_0x2f0038(0x10f)](_0x2f0038(0x100)));const _0x4abd8b=[..._0x167c18['entries']()]['sort']((_0x42fcc5,_0x2d5760)=>_0x42fcc5[0x0][_0x2f0038(0xf6)](_0x2d5760[0x0]));for(const [_0x3f876f,_0x14a2a0]of _0x4abd8b){const _0xbb50=_0x14a2a0[0x0],_0x5775cb=_0xbb50?.[_0x2f0038(0xf5)];if(_0x5775cb){const _0x447cf7=_0x5775cb!==_0x3f876f?'\x20'+a133_0xfcf1e6[_0x2f0038(0x10f)]('('+_0x3f876f+')'):'';console['error']('\x20\x20'+a133_0xfcf1e6[_0x2f0038(0xfd)](_0x5775cb)+_0x447cf7);}else{const _0x1220ca=_0xbb50?.['parentTableName']||'';console[_0x2f0038(0xef)]('\x20\x20'+a133_0xfcf1e6[_0x2f0038(0xfd)](_0x3f876f)+(_0x1220ca?'\x20'+a133_0xfcf1e6['dim']('('+_0x1220ca+')'):''));}for(const _0x1ce0c1 of sortByColumnName(_0x14a2a0)){const _0x3661d4=_0x1ce0c1[_0x2f0038(0x10e)]['startsWith'](_0x3f876f+'.')?_0x1ce0c1[_0x2f0038(0x10e)][_0x2f0038(0x109)](_0x3f876f[_0x2f0038(0x119)]+0x1):_0x1ce0c1[_0x2f0038(0x10e)];console[_0x2f0038(0xef)](formatFieldLine(columnName(_0x1ce0c1),_0x3661d4,_0x1ce0c1[_0x2f0038(0x11b)]));}}}const _0x5527c2=_0x28ade1[_0x2f0038(0xf2)](_0x3ce2d6=>_0x3ce2d6[_0x2f0038(0x117)]||_0x3ce2d6['matrixTableName']);_0x5527c2&&(console[_0x2f0038(0xef)]('\x0a'+a133_0xfcf1e6[_0x2f0038(0x10f)](_0x2f0038(0x104))),console[_0x2f0038(0xef)](a133_0xfcf1e6[_0x2f0038(0x10f)](_0x2f0038(0xfb)))),console['error']('');}
1
+ (function(_0x4c7435,_0x1fd1aa){const _0x3f1140=a133_0xd68b,_0x5ad13d=_0x4c7435();while(!![]){try{const _0x7f5264=-parseInt(_0x3f1140(0x150))/0x1+parseInt(_0x3f1140(0x176))/0x2*(parseInt(_0x3f1140(0x160))/0x3)+-parseInt(_0x3f1140(0x155))/0x4+parseInt(_0x3f1140(0x174))/0x5*(parseInt(_0x3f1140(0x14f))/0x6)+-parseInt(_0x3f1140(0x167))/0x7+parseInt(_0x3f1140(0x15f))/0x8*(parseInt(_0x3f1140(0x173))/0x9)+-parseInt(_0x3f1140(0x166))/0xa*(-parseInt(_0x3f1140(0x14e))/0xb);if(_0x7f5264===_0x1fd1aa)break;else _0x5ad13d['push'](_0x5ad13d['shift']());}catch(_0x2e24f6){_0x5ad13d['push'](_0x5ad13d['shift']());}}}(a133_0x26ab,0x60e20));function a133_0x26ab(){const _0x6505a5=['sort','columns','entries','filter','SELECT\x20*\x20FROM\x20(\x0a','9105294VfFixx','269592CrUPgu','784644iTaDxg','startsWith','\x20\x20\x20\x20','key','Fetching\x20schema...','971180JSHNrl','information_schema','push','cyan','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','query','trim','execute','source','fields','363080gSImLy','29469zdiryi','type','length','matrixColumnName','verbose','tableName','10UFIrHu','3365187ERhkXU','size','matrixTableName','map','Attributes','default','displayName','varchar','some','replace','name','column_name','90rhNBrr','65mhTuRD','set','8ypCbMF','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','parentTableName','error','localeCompare','bold','behavior','behaviorName','Unknown','get','null','dim'];a133_0x26ab=function(){return _0x6505a5;};return a133_0x26ab();}import a133_0x2e1e07 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x1845bb){const _0x2535ea=a133_0xd68b,_0x363afc=_0x1845bb[_0x2535ea(0x183)][_0x2535ea(0x16a)](_0x5678ce=>({'column_name':_0x5678ce[_0x2535ea(0x171)],'column_type':_0x5678ce[_0x2535ea(0x161)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x1845bb,'columns':[{'name':_0x2535ea(0x172),'type':_0x2535ea(0x16e)},{'name':'column_type','type':_0x2535ea(0x16e)},{'name':_0x2535ea(0x180),'type':_0x2535ea(0x16e)},{'name':_0x2535ea(0x153),'type':_0x2535ea(0x16e)},{'name':_0x2535ea(0x16c),'type':_0x2535ea(0x16e)},{'name':'extra','type':'varchar'}],'data':_0x363afc};}export async function executeSchemaQuery(_0x5bd971,_0x4f602b,_0x3c0f3e){const _0x1f739d=a133_0xd68b,_0x55c67a=_0x5bd971[_0x1f739d(0x15b)]()[_0x1f739d(0x170)](/;+$/,''),_0x5c3670=_0x1f739d(0x14d)+_0x55c67a+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x3c0f3e[_0x1f739d(0x164)]&&console['error']('Schema\x20query:\x0a'+_0x5c3670);const _0x18e3c4=await withProgressSpinner(_0x1f739d(0x154),async _0x3516cd=>{const _0xa541d0=_0x1f739d,_0x1e8c36=await _0x4f602b[_0xa541d0(0x15a)][_0xa541d0(0x15c)](_0x5c3670,{'catalog':'td','schema':_0xa541d0(0x156),'onJobId':_0x4c7c94=>{_0x3516cd['setJobId'](_0x4c7c94);}});return _0x1e8c36;},{'verbose':_0x3c0f3e['verbose']});return buildSchemaResult(_0x18e3c4['data']);}function columnName(_0x18bfe6){const _0x893ff9=a133_0xd68b;return _0x18bfe6[_0x893ff9(0x163)]||_0x18bfe6['parentColumn']||_0x18bfe6[_0x893ff9(0x171)];}function a133_0xd68b(_0x49deca,_0x41ddc9){_0x49deca=_0x49deca-0x14d;const _0x26ab1a=a133_0x26ab();let _0xd68bb5=_0x26ab1a[_0x49deca];return _0xd68bb5;}function formatFieldLine(_0x4a4edb,_0x395030,_0x2dc089){const _0x3509d4=a133_0xd68b,_0x3e3d8a=_0x4a4edb!==_0x395030?'\x20'+a133_0x2e1e07['dim']('('+_0x395030+')'):'';return _0x3509d4(0x152)+_0x4a4edb+_0x3e3d8a+':\x20'+a133_0x2e1e07[_0x3509d4(0x158)](_0x2dc089);}function sortByColumnName(_0x4aafd0){const _0x2e6390=a133_0xd68b;return[..._0x4aafd0][_0x2e6390(0x182)]((_0x38d478,_0x170300)=>columnName(_0x38d478)[_0x2e6390(0x17a)](columnName(_0x170300)));}export function displayFieldsHumanReadable(_0x23a8e0,_0x551266){const _0x1435b6=a133_0xd68b,_0x34421f=_0x23a8e0['filter'](_0x31907b=>_0x31907b[_0x1435b6(0x15d)]==='attribute'),_0x4c9b76=_0x23a8e0[_0x1435b6(0x185)](_0x198226=>_0x198226[_0x1435b6(0x15d)]===_0x1435b6(0x17c)),_0x3d8926=new Map();for(const _0x2a299a of _0x34421f){const _0x20948f=_0x2a299a['groupingName']||_0x2a299a[_0x1435b6(0x178)]||'Unknown',_0x33a4bf=_0x3d8926[_0x1435b6(0x17f)](_0x20948f);_0x33a4bf?_0x33a4bf[_0x1435b6(0x15e)][_0x1435b6(0x157)](_0x2a299a):_0x3d8926[_0x1435b6(0x175)](_0x20948f,{'displayName':_0x20948f,'tableName':_0x2a299a[_0x1435b6(0x178)],'fields':[_0x2a299a]});}const _0x33e078=new Map();for(const _0x914ce1 of _0x4c9b76){const _0x213b9b=_0x914ce1[_0x1435b6(0x17d)]||_0x1435b6(0x17e),_0xb1a7f8=_0x33e078[_0x1435b6(0x17f)](_0x213b9b)||[];_0xb1a7f8[_0x1435b6(0x157)](_0x914ce1),_0x33e078['set'](_0x213b9b,_0xb1a7f8);}console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x551266));if(_0x3d8926['size']>0x0){console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07[_0x1435b6(0x181)](_0x1435b6(0x16b)));const _0x135e7c=[..._0x3d8926[_0x1435b6(0x184)]()][_0x1435b6(0x182)]((_0x46761f,_0x330024)=>_0x46761f[0x0][_0x1435b6(0x17a)](_0x330024[0x0]));for(const [,_0x52e647]of _0x135e7c){const _0x4961c7=_0x52e647['tableName']&&_0x52e647[_0x1435b6(0x165)]!==_0x52e647['displayName']?'\x20'+a133_0x2e1e07[_0x1435b6(0x181)]('('+_0x52e647[_0x1435b6(0x165)]+')'):'';console['error']('\x20\x20'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x52e647[_0x1435b6(0x16d)])+_0x4961c7);for(const _0x10aa05 of sortByColumnName(_0x52e647['fields'])){console[_0x1435b6(0x179)](formatFieldLine(columnName(_0x10aa05),_0x10aa05[_0x1435b6(0x171)],_0x10aa05[_0x1435b6(0x161)]));}}}if(_0x33e078[_0x1435b6(0x168)]>0x0){console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07['dim']('Behaviors'));const _0x6ab04a=[..._0x33e078['entries']()][_0x1435b6(0x182)]((_0x3e03ff,_0x57cb79)=>_0x3e03ff[0x0][_0x1435b6(0x17a)](_0x57cb79[0x0]));for(const [_0x228776,_0x6cf595]of _0x6ab04a){const _0x4d48c9=_0x6cf595[0x0],_0x5d7bc1=_0x4d48c9?.[_0x1435b6(0x169)];if(_0x5d7bc1){const _0x112019=_0x5d7bc1!==_0x228776?'\x20'+a133_0x2e1e07['dim']('('+_0x228776+')'):'';console[_0x1435b6(0x179)]('\x20\x20'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x5d7bc1)+_0x112019);}else{const _0x11d639=_0x4d48c9?.[_0x1435b6(0x178)]||'';console[_0x1435b6(0x179)]('\x20\x20'+a133_0x2e1e07[_0x1435b6(0x17b)](_0x228776)+(_0x11d639?'\x20'+a133_0x2e1e07[_0x1435b6(0x181)]('('+_0x11d639+')'):''));}for(const _0x2334de of sortByColumnName(_0x6cf595)){const _0x86ba11=_0x2334de[_0x1435b6(0x171)][_0x1435b6(0x151)](_0x228776+'.')?_0x2334de[_0x1435b6(0x171)]['slice'](_0x228776[_0x1435b6(0x162)]+0x1):_0x2334de[_0x1435b6(0x171)];console[_0x1435b6(0x179)](formatFieldLine(columnName(_0x2334de),_0x86ba11,_0x2334de['type']));}}}const _0x3d2ec9=_0x23a8e0[_0x1435b6(0x16f)](_0x2be3ef=>_0x2be3ef['matrixColumnName']||_0x2be3ef[_0x1435b6(0x169)]);_0x3d2ec9&&(console[_0x1435b6(0x179)]('\x0a'+a133_0x2e1e07[_0x1435b6(0x181)](_0x1435b6(0x177))),console[_0x1435b6(0x179)](a133_0x2e1e07[_0x1435b6(0x181)](_0x1435b6(0x159)))),console['error']('');}
@@ -1 +1 @@
1
- function a134_0x1b73(){const _0x27ae46=['42sXxmAc','231136jyaHNt','182089kFbJtl','relative','isFile','isDirectory','387904ZTPLgK','132822WlLoKJ','endsWith','map','.yaml','258046bIjJvd','name','toLowerCase','263103eMFabQ','dirname','140765TEsyBD','join','.yml','extname'];a134_0x1b73=function(){return _0x27ae46;};return a134_0x1b73();}(function(_0x4ba18d,_0x4f8abf){const _0x3dddc6=a134_0x3652,_0x55bf23=_0x4ba18d();while(!![]){try{const _0x51c074=parseInt(_0x3dddc6(0xe8))/0x1+-parseInt(_0x3dddc6(0xdd))/0x2+-parseInt(_0x3dddc6(0xe0))/0x3+parseInt(_0x3dddc6(0xd8))/0x4+-parseInt(_0x3dddc6(0xe2))/0x5+-parseInt(_0x3dddc6(0xd9))/0x6*(-parseInt(_0x3dddc6(0xe6))/0x7)+-parseInt(_0x3dddc6(0xe7))/0x8;if(_0x51c074===_0x4f8abf)break;else _0x55bf23['push'](_0x55bf23['shift']());}catch(_0x84e540){_0x55bf23['push'](_0x55bf23['shift']());}}}(a134_0x1b73,0x21b86));import{readdirSync,statSync}from'fs';import a134_0x5ab5b2 from'path';function a134_0x3652(_0x4cb388,_0x340dc5){_0x4cb388=_0x4cb388-0xd6;const _0x1b73e8=a134_0x1b73();let _0x3652cc=_0x1b73e8[_0x4cb388];return _0x3652cc;}export function findYamlFiles(_0x23fcfc){const _0x36ade3=[];function _0x1a91ec(_0xcc189a){const _0x56325a=a134_0x3652,_0x214c14=readdirSync(_0xcc189a,{'withFileTypes':!![]});for(const _0x357782 of _0x214c14){const _0x36a92e=a134_0x5ab5b2[_0x56325a(0xe3)](_0xcc189a,_0x357782[_0x56325a(0xde)]);if(_0x357782[_0x56325a(0xd7)]())_0x1a91ec(_0x36a92e);else(_0x357782[_0x56325a(0xde)][_0x56325a(0xda)](_0x56325a(0xe4))||_0x357782[_0x56325a(0xde)]['endsWith'](_0x56325a(0xdc)))&&_0x36ade3['push'](_0x36a92e);}}return _0x1a91ec(_0x23fcfc),_0x36ade3;}export function discoverYamlFiles(_0x3f7da5){const _0x3c54f8=a134_0x3652,_0x4520cc=findYamlFiles(_0x3f7da5);return _0x4520cc[_0x3c54f8(0xdb)](_0x4fdf40=>{const _0x2b17e7=_0x3c54f8,_0x15fb41=a134_0x5ab5b2[_0x2b17e7(0xe9)](_0x3f7da5,_0x4fdf40),_0x3a7022=a134_0x5ab5b2[_0x2b17e7(0xe1)](_0x15fb41);return{'absolutePath':_0x4fdf40,'relativePath':_0x15fb41,'folderPath':_0x3a7022==='.'?'':_0x3a7022};});}export function isYamlFile(_0xf1f4ee){const _0x1164d8=a134_0x3652;try{const _0x3f173c=statSync(_0xf1f4ee);if(!_0x3f173c[_0x1164d8(0xd6)]())return![];const _0x1c4ed2=a134_0x5ab5b2[_0x1164d8(0xe5)](_0xf1f4ee)[_0x1164d8(0xdf)]();return _0x1c4ed2===_0x1164d8(0xe4)||_0x1c4ed2===_0x1164d8(0xdc);}catch{return![];}}
1
+ function a134_0x4416(_0x6deb89,_0x11b2e6){_0x6deb89=_0x6deb89-0xbb;const _0xa110ab=a134_0xa110();let _0x4416d0=_0xa110ab[_0x6deb89];return _0x4416d0;}function a134_0xa110(){const _0x3fe340=['9chyuxd','65922PjtWoT','70NuNxGA','map','9debeld','105682ZzcTHL','name','566930SBsYdY','.yml','121649LCTRPm','toLowerCase','252WfbfzH','14171zYHBqX','relative','dirname','8iUgAFE','.yaml','611191EnviVs','287504JzZmDB','endsWith'];a134_0xa110=function(){return _0x3fe340;};return a134_0xa110();}(function(_0x1bd058,_0x27f94f){const _0x106b29=a134_0x4416,_0x2e58b6=_0x1bd058();while(!![]){try{const _0x25cd93=-parseInt(_0x106b29(0xcd))/0x1+parseInt(_0x106b29(0xc6))/0x2*(parseInt(_0x106b29(0xc5))/0x3)+-parseInt(_0x106b29(0xbf))/0x4+parseInt(_0x106b29(0xc3))/0x5*(-parseInt(_0x106b29(0xc2))/0x6)+-parseInt(_0x106b29(0xbe))/0x7*(parseInt(_0x106b29(0xbc))/0x8)+parseInt(_0x106b29(0xc1))/0x9*(parseInt(_0x106b29(0xc8))/0xa)+parseInt(_0x106b29(0xca))/0xb*(parseInt(_0x106b29(0xcc))/0xc);if(_0x25cd93===_0x27f94f)break;else _0x2e58b6['push'](_0x2e58b6['shift']());}catch(_0x4c8bbc){_0x2e58b6['push'](_0x2e58b6['shift']());}}}(a134_0xa110,0x1d5d5));import{readdirSync,statSync}from'fs';import a134_0x3c80e7 from'path';export function findYamlFiles(_0x9901){const _0x5dce64=[];function _0x23ebff(_0x22cba6){const _0x4c1b33=a134_0x4416,_0x43a876=readdirSync(_0x22cba6,{'withFileTypes':!![]});for(const _0x1272d3 of _0x43a876){const _0x6675c4=a134_0x3c80e7['join'](_0x22cba6,_0x1272d3['name']);if(_0x1272d3['isDirectory']())_0x23ebff(_0x6675c4);else(_0x1272d3[_0x4c1b33(0xc7)][_0x4c1b33(0xc0)]('.yml')||_0x1272d3[_0x4c1b33(0xc7)]['endsWith'](_0x4c1b33(0xbd)))&&_0x5dce64['push'](_0x6675c4);}}return _0x23ebff(_0x9901),_0x5dce64;}export function discoverYamlFiles(_0x373a8b){const _0xea7c1c=a134_0x4416,_0x44173d=findYamlFiles(_0x373a8b);return _0x44173d[_0xea7c1c(0xc4)](_0x39fe80=>{const _0x199dfb=_0xea7c1c,_0x1b74de=a134_0x3c80e7[_0x199dfb(0xce)](_0x373a8b,_0x39fe80),_0x43395c=a134_0x3c80e7[_0x199dfb(0xbb)](_0x1b74de);return{'absolutePath':_0x39fe80,'relativePath':_0x1b74de,'folderPath':_0x43395c==='.'?'':_0x43395c};});}export function isYamlFile(_0x281aaf){const _0xf4375c=a134_0x4416;try{const _0x436bdb=statSync(_0x281aaf);if(!_0x436bdb['isFile']())return![];const _0x4286d5=a134_0x3c80e7['extname'](_0x281aaf)[_0xf4375c(0xcb)]();return _0x4286d5===_0xf4375c(0xc9)||_0x4286d5===_0xf4375c(0xbd);}catch{return![];}}
@@ -1 +1 @@
1
- function a135_0x2def(_0x1e68e1,_0x125b58){_0x1e68e1=_0x1e68e1-0x9e;const _0x315f1c=a135_0x315f();let _0x2def0c=_0x315f1c[_0x1e68e1];return _0x2def0c;}(function(_0x3083f4,_0x4e6245){const _0x16c1de=a135_0x2def,_0x11a33b=_0x3083f4();while(!![]){try{const _0x5cf000=parseInt(_0x16c1de(0xbc))/0x1+-parseInt(_0x16c1de(0xe2))/0x2+parseInt(_0x16c1de(0xb8))/0x3*(-parseInt(_0x16c1de(0xdf))/0x4)+parseInt(_0x16c1de(0xba))/0x5+parseInt(_0x16c1de(0xec))/0x6*(-parseInt(_0x16c1de(0xd5))/0x7)+-parseInt(_0x16c1de(0xcb))/0x8*(parseInt(_0x16c1de(0xe4))/0x9)+parseInt(_0x16c1de(0xc2))/0xa;if(_0x5cf000===_0x4e6245)break;else _0x11a33b['push'](_0x11a33b['shift']());}catch(_0x34dc1b){_0x11a33b['push'](_0x11a33b['shift']());}}}(a135_0x315f,0xc58d4));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x35ba7b){const _0x875060=a135_0x2def;return _0x35ba7b[_0x875060(0xa4)]()[_0x875060(0xcd)](/\s+/g,'_')[_0x875060(0xcd)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x875060(0xcd)](/_+/g,'_')[_0x875060(0xcd)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x227232){const _0x49d7ee=a135_0x2def,_0x2721ac=_0x227232[_0x49d7ee(0xbf)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x2721ac){const _0x21dadc=_0x2721ac[0x1][_0x49d7ee(0xa4)](),_0xe94bbf=_0x2721ac[0x2],_0x5ba6e5=_0xe94bbf[_0x49d7ee(0xcd)](/-/g,'')[_0x49d7ee(0x9f)](0x0,0x4)[_0x49d7ee(0xa4)]();return _0x21dadc+'_'+_0x5ba6e5;}const _0x4fcbd8=_0x227232['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x4fcbd8){const _0x1f5cba=_0x4fcbd8[0x1],_0x103f42=_0x4fcbd8[0x2][_0x49d7ee(0xa4)](),_0x17e31a=_0x1f5cba[_0x49d7ee(0xcd)](/-/g,'')[_0x49d7ee(0x9f)](0x0,0x4)[_0x49d7ee(0xa4)]();return _0x103f42+'_'+_0x17e31a;}return undefined;}function stableStringify(_0x19bb2b){const _0x3ab394=a135_0x2def;if(Array['isArray'](_0x19bb2b))return'['+_0x19bb2b[_0x3ab394(0xdd)](_0x2eec4c=>stableStringify(_0x2eec4c))[_0x3ab394(0xd4)](',')+']';if(_0x19bb2b&&typeof _0x19bb2b===_0x3ab394(0xda)){const _0x1f36e3=_0x19bb2b,_0x41fd2a=Object[_0x3ab394(0xc9)](_0x1f36e3)[_0x3ab394(0xc3)](),_0x3d7c31=_0x41fd2a['map'](_0x198334=>'\x22'+_0x198334+'\x22:'+stableStringify(_0x1f36e3[_0x198334]));return'{'+_0x3d7c31[_0x3ab394(0xd4)](',')+'}';}const _0x5a6ccb=JSON['stringify'](_0x19bb2b);return _0x5a6ccb===undefined?_0x3ab394(0xb6):_0x5a6ccb;}export function consolidateActivationsByContent(_0x4ac283){const _0x5b206d=a135_0x2def,_0x5158b0={},_0x279936=new Map(),_0x2e5eb5=new Map();for(const _0x108184 of _0x4ac283){if(!_0x108184)continue;for(const [_0x11a615,_0x3e9c7d]of Object['entries'](_0x108184)){const _0x199c6c={'name':_0x3e9c7d[_0x5b206d(0xa2)],'connection':_0x3e9c7d['connection'],..._0x3e9c7d[_0x5b206d(0xd9)]!==undefined&&{'all_columns':_0x3e9c7d['all_columns']},..._0x3e9c7d[_0x5b206d(0xe7)]!==undefined&&{'columns':_0x3e9c7d['columns']},..._0x3e9c7d[_0x5b206d(0xe3)]!==undefined&&{'behavior':_0x3e9c7d['behavior']},..._0x3e9c7d[_0x5b206d(0xce)]!==undefined&&{'schedule':_0x3e9c7d[_0x5b206d(0xce)]},..._0x3e9c7d['notification']!==undefined&&{'notification':_0x3e9c7d['notification']},..._0x3e9c7d[_0x5b206d(0xca)]!==undefined&&{'connector_config':_0x3e9c7d[_0x5b206d(0xca)]},..._0x3e9c7d[_0x5b206d(0xdb)]!==undefined&&{'activation_template_id':_0x3e9c7d[_0x5b206d(0xdb)]}},_0x5a6bd5=stableStringify(_0x199c6c),_0x168555=_0x2e5eb5[_0x5b206d(0xbb)](_0x5a6bd5);_0x168555?_0x279936[_0x5b206d(0xb5)](_0x11a615,_0x168555):(_0x5158b0[_0x11a615]=_0x3e9c7d,_0x279936[_0x5b206d(0xb5)](_0x11a615,_0x11a615),_0x2e5eb5['set'](_0x5a6bd5,_0x11a615));}}return{'merged':_0x5158b0,'nameMapping':_0x279936};}export function updateActivationReferences(_0x58e4b3,_0x2258fb){const _0x1e3f59=a135_0x2def;if(!_0x58e4b3)return;for(const _0x428989 of _0x58e4b3){if(!_0x428989[_0x1e3f59(0xc6)])continue;for(const _0x5e7065 of _0x428989[_0x1e3f59(0xc6)]){if(_0x5e7065[_0x1e3f59(0x9e)]===_0x1e3f59(0xeb)&&_0x5e7065[_0x1e3f59(0xe5)]?.['activation']){const _0x4d18d3=_0x2258fb[_0x1e3f59(0xbb)](_0x5e7065[_0x1e3f59(0xe5)]['activation']);_0x4d18d3&&_0x4d18d3!==_0x5e7065['with'][_0x1e3f59(0xeb)]&&(_0x5e7065[_0x1e3f59(0xe5)][_0x1e3f59(0xeb)]=_0x4d18d3);}}}}export function consolidateSegmentsByContent(_0x222bde,_0x58593f){const _0x429edb=a135_0x2def,_0x448af5={},_0x945d33=new Map(),_0x2f73a4=new Map();for(const _0x2e1ddf of _0x222bde){if(!_0x2e1ddf)continue;for(const [_0xffdb18,_0x4c1190]of Object[_0x429edb(0xd1)](_0x2e1ddf)){if(!_0x4c1190[_0x429edb(0xe0)]){_0x448af5[_0xffdb18]=_0x4c1190,_0x945d33[_0x429edb(0xb5)](_0xffdb18,_0xffdb18);continue;}const _0xf50d25=_0x4c1190[_0x429edb(0xc8)]&&_0x4c1190[_0x429edb(0xc8)][_0x429edb(0xac)]()?_0x4c1190[_0x429edb(0xc8)]:undefined,_0x5aab6b=JSON[_0x429edb(0xab)]({'description':_0xf50d25,'rule':deepSortObject(_0x4c1190[_0x429edb(0xe0)])}),_0x265738=_0x2f73a4[_0x429edb(0xbb)](_0x5aab6b);if(_0x265738){const _0x24e78c={..._0x4c1190[_0x429edb(0xc8)]!==undefined&&{'description':_0x4c1190['description']},'rule':_0x4c1190[_0x429edb(0xe0)]?deepSortObject(_0x4c1190[_0x429edb(0xe0)]):_0x4c1190['rule']};if(_0xffdb18<_0x265738){_0x448af5[_0xffdb18]=_0x24e78c,delete _0x448af5[_0x265738];for(const [_0x16c316,_0x106b5f]of _0x945d33[_0x429edb(0xd1)]()){_0x106b5f===_0x265738&&_0x945d33[_0x429edb(0xb5)](_0x16c316,_0xffdb18);}_0x945d33[_0x429edb(0xb5)](_0xffdb18,_0xffdb18),_0x2f73a4[_0x429edb(0xb5)](_0x5aab6b,_0xffdb18);}else _0x448af5[_0x265738]=_0x24e78c,_0x945d33['set'](_0xffdb18,_0x265738);}else{let _0x2b3c5d=_0xffdb18;if(_0x58593f){const _0x4edf5b=_0x58593f[_0x429edb(0xbb)](_0x5aab6b);_0x4edf5b&&_0x4edf5b[_0x429edb(0xe8)]>0x0&&(_0x2b3c5d=_0x4edf5b[_0x429edb(0x9f)]()['sort']()[0x0]);}const _0x331899={..._0x4c1190[_0x429edb(0xc8)]!==undefined&&{'description':_0x4c1190['description']},'rule':_0x4c1190['rule']?deepSortObject(_0x4c1190[_0x429edb(0xe0)]):_0x4c1190[_0x429edb(0xe0)]};_0x448af5[_0x2b3c5d]=_0x331899,_0x945d33[_0x429edb(0xb5)](_0xffdb18,_0x2b3c5d),_0x2f73a4[_0x429edb(0xb5)](_0x5aab6b,_0x2b3c5d);}}}return{'merged':_0x448af5,'nameMapping':_0x945d33};}export function updateSegmentReferences(_0x188af5,_0x11eabe){const _0x552770=a135_0x2def;if(!_0x188af5)return;for(const _0x34426d of _0x188af5){if(_0x34426d[_0x552770(0xb1)]?.[_0x552770(0xa6)]){const _0xa27b6c=_0x11eabe[_0x552770(0xbb)](_0x34426d['entry_criteria'][_0x552770(0xa6)]);_0xa27b6c&&(_0x34426d[_0x552770(0xb1)][_0x552770(0xa6)]=_0xa27b6c);}if(_0x34426d['exit_criteria'])for(const _0x5e4237 of _0x34426d[_0x552770(0xde)]){if(_0x5e4237[_0x552770(0xa6)]){const _0x2fd508=_0x11eabe[_0x552770(0xbb)](_0x5e4237[_0x552770(0xa6)]);_0x2fd508&&(_0x5e4237['segment']=_0x2fd508);}}if(_0x34426d[_0x552770(0xb3)]?.[_0x552770(0xa6)]){const _0x22c22d=_0x11eabe[_0x552770(0xbb)](_0x34426d[_0x552770(0xb3)][_0x552770(0xa6)]);_0x22c22d&&(_0x34426d['milestone'][_0x552770(0xa6)]=_0x22c22d);}if(_0x34426d[_0x552770(0xc6)])for(const _0xb0b0cd of _0x34426d['steps']){if(_0xb0b0cd[_0x552770(0x9e)]==='decision_point'&&_0xb0b0cd[_0x552770(0xe5)]?.[_0x552770(0xc1)])for(const _0x342f9b of _0xb0b0cd[_0x552770(0xe5)]['branches']){if(_0x342f9b[_0x552770(0xa6)]){const _0x54c6ba=_0x11eabe[_0x552770(0xbb)](_0x342f9b[_0x552770(0xa6)]);_0x54c6ba&&(_0x342f9b[_0x552770(0xa6)]=_0x54c6ba);}}if(_0xb0b0cd[_0x552770(0x9e)]===_0x552770(0xa8)&&_0xb0b0cd['with']?.[_0x552770(0xd7)]?.[_0x552770(0xa6)]){const _0x5795fc=_0x11eabe['get'](_0xb0b0cd[_0x552770(0xe5)][_0x552770(0xd7)][_0x552770(0xa6)]);_0x5795fc&&(_0xb0b0cd['with'][_0x552770(0xd7)][_0x552770(0xa6)]=_0x5795fc);}}}}export function updateSegmentRefsInSegments(_0x106889,_0x154bbb){const _0x1807b6=a135_0x2def;for(const _0x3fbb7c of Object[_0x1807b6(0xbd)](_0x106889)){_0x3fbb7c[_0x1807b6(0xe0)]&&updateSegmentRefsInRule(_0x3fbb7c['rule'],_0x154bbb);}}function updateSegmentRefsInRule(_0x15cdc5,_0x445f66){const _0x5e0fdf=a135_0x2def;if(_0x15cdc5===null||typeof _0x15cdc5!==_0x5e0fdf(0xda))return;if(Array[_0x5e0fdf(0xb2)](_0x15cdc5)){for(const _0x48bcb5 of _0x15cdc5){updateSegmentRefsInRule(_0x48bcb5,_0x445f66);}return;}const _0x1fde2d=_0x15cdc5;if((_0x1fde2d['type']==='include'||_0x1fde2d[_0x5e0fdf(0x9e)]===_0x5e0fdf(0xdc))&&typeof _0x1fde2d['segment']===_0x5e0fdf(0xd0)){const _0x180665=_0x445f66[_0x5e0fdf(0xbb)](_0x1fde2d[_0x5e0fdf(0xa6)]);_0x180665&&(_0x1fde2d[_0x5e0fdf(0xa6)]=_0x180665);}if(_0x1fde2d[_0x5e0fdf(0xcf)]&&Array[_0x5e0fdf(0xb2)](_0x1fde2d[_0x5e0fdf(0xcf)]))for(const _0x523576 of _0x1fde2d['conditions']){updateSegmentRefsInRule(_0x523576,_0x445f66);}}export function buildJourneysArray(_0x16e513,_0x18e163){const _0xd676f=a135_0x2def;return _0x16e513[_0xd676f(0xdd)](_0x50da40=>{const _0x1ca61b=_0xd676f,_0x455ac5=_0x18e163?_0x50da40[_0x1ca61b(0xb9)]['id']===_0x18e163:_0x16e513[_0x1ca61b(0xe8)]===0x1,_0x2070da=_0x50da40['yaml']['journeys']?.[0x0],_0x53c8b5=_0x2070da?.[_0x1ca61b(0xb7)]||_0x50da40[_0x1ca61b(0xc4)]['goal'],_0x3ff14e={'version':_0x2070da?.[_0x1ca61b(0xe9)]||_0x50da40[_0x1ca61b(0xc4)]['version']||_0x50da40[_0x1ca61b(0xb9)][_0x1ca61b(0xa2)],'state':_0x50da40['item']['state']===_0x1ca61b(0xb0)?'launched':_0x1ca61b(0xae),'stages':_0x2070da?.[_0x1ca61b(0xc7)]||_0x50da40['yaml'][_0x1ca61b(0xc7)]||[],'id':_0x2070da?.['id']||_0x50da40[_0x1ca61b(0xc4)]['id'],'version_number':_0x2070da?.[_0x1ca61b(0xa5)]||_0x50da40[_0x1ca61b(0xc4)][_0x1ca61b(0xa5)]};return _0x53c8b5&&(_0x3ff14e[_0x1ca61b(0xb7)]=_0x53c8b5),_0x455ac5&&(_0x3ff14e[_0x1ca61b(0xd3)]=!![]),_0x3ff14e;});}export function buildMergedJourneyDef(_0x27f4bc,_0xe8279f,_0x1c61c5){const _0x4c6c50=a135_0x2def,_0x6d7044=_0x27f4bc[0x0][_0x4c6c50(0xc4)],_0xd55712=buildJourneysArray(_0x27f4bc,_0x1c61c5),{merged:_0x25bcc5,nameMapping:_0x41148a}=consolidateSegmentsByContent(_0x27f4bc[_0x4c6c50(0xdd)](_0x220dba=>_0x220dba['yaml'][_0x4c6c50(0xcc)]),_0xe8279f);updateSegmentRefsInSegments(_0x25bcc5,_0x41148a);const _0x49490a=Array[_0x4c6c50(0xe1)](_0x41148a[_0x4c6c50(0xd1)]())[_0x4c6c50(0xc5)](([_0xe1d962,_0x3f1bab])=>_0xe1d962!==_0x3f1bab&&_0xe1d962[_0x4c6c50(0xea)]('entry_criteria'));let _0x2a367b=_0x25bcc5,_0x2a0f58=new Map();if(_0x49490a){const _0x95edc0=consolidateSegmentsByContent([_0x25bcc5],_0xe8279f);_0x2a367b=_0x95edc0[_0x4c6c50(0xe6)],_0x2a0f58=_0x95edc0[_0x4c6c50(0xa0)];}const _0xdf34a3=new Map(_0x41148a);for(const [_0x4da7b8,_0x2b3968]of _0x2a0f58[_0x4c6c50(0xd1)]()){_0xdf34a3['set'](_0x4da7b8,_0x2b3968);}for(const [_0x2be749,_0x176405]of _0xdf34a3[_0x4c6c50(0xd1)]()){let _0x563be6=_0x176405,_0x59b565=0x0;while(_0xdf34a3[_0x4c6c50(0xaf)](_0x563be6)&&_0xdf34a3[_0x4c6c50(0xbb)](_0x563be6)!==_0x563be6&&_0x59b565<MAX_MAPPING_CHAIN_DEPTH){_0x563be6=_0xdf34a3[_0x4c6c50(0xbb)](_0x563be6),_0x59b565++;}_0x563be6!==_0x176405&&_0xdf34a3[_0x4c6c50(0xb5)](_0x2be749,_0x563be6);}for(const _0x526010 of _0xd55712){updateSegmentReferences(_0x526010[_0x4c6c50(0xc7)],_0xdf34a3);}const {merged:_0x1a8d2e,nameMapping:_0x2db8d8}=consolidateActivationsByContent(_0x27f4bc[_0x4c6c50(0xdd)](_0x3d5356=>_0x3d5356[_0x4c6c50(0xc4)]['activations']));for(const _0x400355 of _0xd55712){updateActivationReferences(_0x400355[_0x4c6c50(0xc7)],_0x2db8d8);}let _0x4fe856=_0x6d7044['goal'];if(_0x4fe856?.['segment']){const _0x12ce36=_0xdf34a3[_0x4c6c50(0xbb)](_0x4fe856[_0x4c6c50(0xa6)]);_0x12ce36&&(_0x4fe856={..._0x4fe856,'segment':_0x12ce36});}for(const _0x38305d of _0xd55712){if(_0x38305d[_0x4c6c50(0xb7)]?.[_0x4c6c50(0xa6)]){const _0x3758a9=_0xdf34a3[_0x4c6c50(0xbb)](_0x38305d[_0x4c6c50(0xb7)][_0x4c6c50(0xa6)]);_0x3758a9&&(_0x38305d[_0x4c6c50(0xb7)]={..._0x38305d[_0x4c6c50(0xb7)],'segment':_0x3758a9});}}return _0xd55712[_0x4c6c50(0xc5)](_0x1e2634=>_0x1e2634[_0x4c6c50(0xb7)])&&(_0x4fe856=undefined),{'type':_0x4c6c50(0xa7),'name':_0x6d7044[_0x4c6c50(0xa2)],'description':_0x6d7044[_0x4c6c50(0xc8)],'goal':_0x4fe856,'reentry':_0x6d7044[_0x4c6c50(0xaa)],'segments':Object[_0x4c6c50(0xc9)](_0x2a367b)[_0x4c6c50(0xe8)]>0x0?_0x2a367b:undefined,'activations':Object[_0x4c6c50(0xc9)](_0x1a8d2e)['length']>0x0?_0x1a8d2e:undefined,'journeys':_0xd55712,'bundle_id':_0x6d7044[_0x4c6c50(0xa1)],'bundle_name':_0x6d7044[_0x4c6c50(0xd6)]};}export function createJumpTargetCache(){return new Map();}function a135_0x315f(){const _0x2a2c91=['slice','nameMapping','bundle_id','name','versions','toLowerCase','version_number','segment','journey','wait','decision_point','reentry','stringify','trim','endsWith','draft','has','launched','entry_criteria','isArray','milestone','push','set','null','goal','54HnuQNS','item','3662675WDIxTV','get','1115692QoAoaH','values','journeys','match','attributes','branches','38765800qMVwjI','sort','yaml','some','steps','stages','description','keys','connector_config','8CvRtbP','segments','replace','schedule','conditions','string','entries','index','latest','join','7OsKEeE','bundle_name','condition','journeyStages','all_columns','object','activation_template_id','exclude','map','exit_criteria','295188vBIvRF','rule','from','2540798XWdySv','behavior','13243491UUdQrk','with','merged','columns','length','version','startsWith','activation','5072346EfPJZg','type'];a135_0x315f=function(){return _0x2a2c91;};return a135_0x315f();}export async function resolveJumpTarget(_0x458ab4,_0x211610,_0x4e3d6d,_0x3fed90){const _0x235e39=a135_0x2def,_0x5bcd91=_0x458ab4+':'+_0x211610,_0x3245b3=_0x4e3d6d[_0x235e39(0xbb)](_0x5bcd91);if(_0x3245b3)return _0x3245b3;const _0x3cb9cd=await _0x3fed90(_0x458ab4),_0xea42e1=_0x3cb9cd[_0x235e39(0xc0)]['journeyBundleName']||_0x3cb9cd[_0x235e39(0xc0)][_0x235e39(0xa2)],_0x124868=_0x3cb9cd['attributes'][_0x235e39(0xd8)]['find'](_0x47d112=>String(_0x47d112['id'])===String(_0x211610)),_0x409bf6=_0x124868?.['name']||_0x211610,_0x1d70cf={'journeyName':_0xea42e1,'stageName':_0x409bf6};return _0x4e3d6d[_0x235e39(0xb5)](_0x5bcd91,_0x1d70cf),_0x1d70cf;}export function formatApiJourneyName(_0x20bfc9,_0x20ed74){return _0x20ed74+'\x20('+_0x20bfc9+')';}export function isLocalJourneyRef(_0x442c7d){const _0xd3a705=a135_0x2def;return _0x442c7d[_0xd3a705(0xad)]('.yml')||_0x442c7d[_0xd3a705(0xad)]('.yaml');}export function buildLocalRuleToNameMapping(_0x4db711){const _0x155e8a=a135_0x2def,_0x9d7b4c=new Map();if(!_0x4db711)return _0x9d7b4c;for(const [_0x3742e7,_0x297530]of Object[_0x155e8a(0xd1)](_0x4db711)){if(_0x297530[_0x155e8a(0xe0)]){const _0x15a341=serializeRule(_0x297530[_0x155e8a(0xe0)]),_0x244b99=_0x9d7b4c['get'](_0x15a341)||[];_0x244b99[_0x155e8a(0xb4)](_0x3742e7),_0x9d7b4c[_0x155e8a(0xb5)](_0x15a341,_0x244b99);}}return _0x9d7b4c;}export function buildLocalRuleToNameMappingFromJourney(_0x4f45f8){const _0x526a72=a135_0x2def,_0xb79b9f=_0x4f45f8[_0x526a72(0xcc)];if(!_0xb79b9f)return new Map();const _0x68e92a=collectSegmentUsageCounts(_0x4f45f8),_0x1bcf02=new Map();let _0x1f5397=0x0;for(const [_0x4189d1,_0xa6daad]of Object[_0x526a72(0xd1)](_0xb79b9f)){if(!_0xa6daad[_0x526a72(0xe0)]){_0x1f5397++;continue;}const _0x49a1ca=serializeRule(_0xa6daad[_0x526a72(0xe0)]),_0x1798de=_0x1bcf02[_0x526a72(0xbb)](_0x49a1ca)||[];_0x1798de['push']({'name':_0x4189d1,'index':_0x1f5397}),_0x1bcf02['set'](_0x49a1ca,_0x1798de),_0x1f5397++;}const _0x312a9f=new Map();for(const [_0x1b62df,_0x29de17]of _0x1bcf02){const _0x55d727=_0x29de17[_0x526a72(0x9f)]()[_0x526a72(0xc3)]((_0x230975,_0x27e966)=>{const _0x14f530=_0x526a72,_0x26b8c8=_0x68e92a[_0x14f530(0xbb)](_0x230975[_0x14f530(0xa2)])||0x0,_0x3f7d5e=_0x68e92a[_0x14f530(0xbb)](_0x27e966['name'])||0x0;if(_0x26b8c8!==_0x3f7d5e)return _0x3f7d5e-_0x26b8c8;return _0x230975['index']-_0x27e966[_0x14f530(0xd2)];})[_0x526a72(0xdd)](_0x5758c4=>_0x5758c4[_0x526a72(0xa2)]);_0x312a9f[_0x526a72(0xb5)](_0x1b62df,_0x55d727);}return _0x312a9f;}export function collectSegmentUsageCounts(_0x30eac8){const _0x29db78=a135_0x2def,_0x234c92=new Map(),_0x2a928a=_0xf10c2f=>{const _0x275367=a135_0x2def;if(!_0xf10c2f)return;_0x234c92['set'](_0xf10c2f,(_0x234c92[_0x275367(0xbb)](_0xf10c2f)||0x0)+0x1);},_0x25e75b=_0x4489cd=>{const _0x270798=a135_0x2def;for(const _0x120d7d of _0x4489cd){_0x2a928a(_0x120d7d[_0x270798(0xb1)]?.[_0x270798(0xa6)]);if(_0x120d7d[_0x270798(0xde)])for(const _0x27e07f of _0x120d7d[_0x270798(0xde)]){_0x2a928a(_0x27e07f[_0x270798(0xa6)]);}_0x2a928a(_0x120d7d[_0x270798(0xb3)]?.[_0x270798(0xa6)]);if(_0x120d7d[_0x270798(0xc6)])for(const _0x192f44 of _0x120d7d[_0x270798(0xc6)]){if(_0x192f44['type']===_0x270798(0xa9))for(const _0x29b5a4 of _0x192f44[_0x270798(0xe5)][_0x270798(0xc1)]){_0x2a928a(_0x29b5a4[_0x270798(0xa6)]);}else _0x192f44['type']===_0x270798(0xa8)&&_0x2a928a(_0x192f44['with']['condition']?.['segment']);}}};_0x2a928a(_0x30eac8[_0x29db78(0xb7)]?.[_0x29db78(0xa6)]);if(_0x30eac8['journeys'])for(const _0x393708 of _0x30eac8[_0x29db78(0xbe)]){_0x2a928a(_0x393708['goal']?.[_0x29db78(0xa6)]),_0x25e75b(_0x393708['stages']);}_0x30eac8[_0x29db78(0xc7)]&&_0x25e75b(_0x30eac8[_0x29db78(0xc7)]);if(_0x30eac8[_0x29db78(0xa3)])for(const _0x1e0d88 of _0x30eac8[_0x29db78(0xa3)]){_0x25e75b(_0x1e0d88[_0x29db78(0xc7)]);}return _0x234c92;}
1
+ (function(_0x1a9cb1,_0x510f1b){const _0x4f517f=a135_0x5508,_0xea41e9=_0x1a9cb1();while(!![]){try{const _0x4b46ce=parseInt(_0x4f517f(0x173))/0x1+parseInt(_0x4f517f(0x1a0))/0x2+-parseInt(_0x4f517f(0x168))/0x3*(-parseInt(_0x4f517f(0x163))/0x4)+-parseInt(_0x4f517f(0x179))/0x5+parseInt(_0x4f517f(0x182))/0x6*(parseInt(_0x4f517f(0x198))/0x7)+parseInt(_0x4f517f(0x170))/0x8+parseInt(_0x4f517f(0x189))/0x9*(-parseInt(_0x4f517f(0x166))/0xa);if(_0x4b46ce===_0x510f1b)break;else _0xea41e9['push'](_0xea41e9['shift']());}catch(_0x1e5e20){_0xea41e9['push'](_0xea41e9['shift']());}}}(a135_0x271f,0xaad2c));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x35eb6c){const _0x1456fe=a135_0x5508;return _0x35eb6c['toLowerCase']()[_0x1456fe(0x1a5)](/\s+/g,'_')[_0x1456fe(0x1a5)](/[^a-z0-9_\p{L}\p{N}]/gu,'')[_0x1456fe(0x1a5)](/_+/g,'_')[_0x1456fe(0x1a5)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x5c77a0){const _0x1e5b7b=a135_0x5508,_0x1c8172=_0x5c77a0['match'](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x1c8172){const _0x129aea=_0x1c8172[0x1][_0x1e5b7b(0x178)](),_0x4c62bd=_0x1c8172[0x2],_0x38254a=_0x4c62bd['replace'](/-/g,'')[_0x1e5b7b(0x185)](0x0,0x4)[_0x1e5b7b(0x178)]();return _0x129aea+'_'+_0x38254a;}const _0x36d556=_0x5c77a0[_0x1e5b7b(0x17f)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x36d556){const _0x2fc388=_0x36d556[0x1],_0x42c408=_0x36d556[0x2][_0x1e5b7b(0x178)](),_0x3bd85d=_0x2fc388['replace'](/-/g,'')['slice'](0x0,0x4)[_0x1e5b7b(0x178)]();return _0x42c408+'_'+_0x3bd85d;}return undefined;}function stableStringify(_0x655006){const _0x209757=a135_0x5508;if(Array[_0x209757(0x18e)](_0x655006))return'['+_0x655006[_0x209757(0x172)](_0x58dca8=>stableStringify(_0x58dca8))[_0x209757(0x18f)](',')+']';if(_0x655006&&typeof _0x655006===_0x209757(0x176)){const _0x57ce81=_0x655006,_0x4ce3d3=Object['keys'](_0x57ce81)[_0x209757(0x191)](),_0x125f35=_0x4ce3d3[_0x209757(0x172)](_0x30b615=>'\x22'+_0x30b615+'\x22:'+stableStringify(_0x57ce81[_0x30b615]));return'{'+_0x125f35[_0x209757(0x18f)](',')+'}';}const _0x4e92fb=JSON[_0x209757(0x1a4)](_0x655006);return _0x4e92fb===undefined?_0x209757(0x164):_0x4e92fb;}export function consolidateActivationsByContent(_0x88af0){const _0x19e537=a135_0x5508,_0x576483={},_0x1d6e9c=new Map(),_0x11a0c0=new Map();for(const _0x440ca8 of _0x88af0){if(!_0x440ca8)continue;for(const [_0x2fc042,_0x42f80]of Object[_0x19e537(0x19e)](_0x440ca8)){const _0x263a7a={'name':_0x42f80[_0x19e537(0x196)],'connection':_0x42f80[_0x19e537(0x1a2)],..._0x42f80[_0x19e537(0x183)]!==undefined&&{'all_columns':_0x42f80['all_columns']},..._0x42f80[_0x19e537(0x16c)]!==undefined&&{'columns':_0x42f80[_0x19e537(0x16c)]},..._0x42f80[_0x19e537(0x188)]!==undefined&&{'behavior':_0x42f80[_0x19e537(0x188)]},..._0x42f80[_0x19e537(0x194)]!==undefined&&{'schedule':_0x42f80['schedule']},..._0x42f80[_0x19e537(0x187)]!==undefined&&{'notification':_0x42f80[_0x19e537(0x187)]},..._0x42f80['connector_config']!==undefined&&{'connector_config':_0x42f80[_0x19e537(0x1a8)]},..._0x42f80['activation_template_id']!==undefined&&{'activation_template_id':_0x42f80['activation_template_id']}},_0x40efa9=stableStringify(_0x263a7a),_0x216dfd=_0x11a0c0['get'](_0x40efa9);_0x216dfd?_0x1d6e9c[_0x19e537(0x1ae)](_0x2fc042,_0x216dfd):(_0x576483[_0x2fc042]=_0x42f80,_0x1d6e9c[_0x19e537(0x1ae)](_0x2fc042,_0x2fc042),_0x11a0c0[_0x19e537(0x1ae)](_0x40efa9,_0x2fc042));}}return{'merged':_0x576483,'nameMapping':_0x1d6e9c};}export function updateActivationReferences(_0xff27bb,_0x17f870){const _0x32bbb6=a135_0x5508;if(!_0xff27bb)return;for(const _0x5bebde of _0xff27bb){if(!_0x5bebde['steps'])continue;for(const _0x1a4d6d of _0x5bebde['steps']){if(_0x1a4d6d[_0x32bbb6(0x18c)]===_0x32bbb6(0x1ab)&&_0x1a4d6d[_0x32bbb6(0x16b)]?.[_0x32bbb6(0x1ab)]){const _0x406476=_0x17f870[_0x32bbb6(0x199)](_0x1a4d6d[_0x32bbb6(0x16b)][_0x32bbb6(0x1ab)]);_0x406476&&_0x406476!==_0x1a4d6d['with'][_0x32bbb6(0x1ab)]&&(_0x1a4d6d[_0x32bbb6(0x16b)][_0x32bbb6(0x1ab)]=_0x406476);}}}}export function consolidateSegmentsByContent(_0xf3b6b0,_0x356301){const _0x1877b7=a135_0x5508,_0x15b835={},_0x5590be=new Map(),_0x285517=new Map();for(const _0x3c912c of _0xf3b6b0){if(!_0x3c912c)continue;for(const [_0xcafea2,_0x3e179d]of Object[_0x1877b7(0x19e)](_0x3c912c)){if(!_0x3e179d[_0x1877b7(0x17e)]){_0x15b835[_0xcafea2]=_0x3e179d,_0x5590be[_0x1877b7(0x1ae)](_0xcafea2,_0xcafea2);continue;}const _0x52929a=_0x3e179d[_0x1877b7(0x190)]&&_0x3e179d[_0x1877b7(0x190)][_0x1877b7(0x193)]()?_0x3e179d[_0x1877b7(0x190)]:undefined,_0x23d7fc=JSON[_0x1877b7(0x1a4)]({'description':_0x52929a,'rule':deepSortObject(_0x3e179d[_0x1877b7(0x17e)])}),_0x26685f=_0x285517['get'](_0x23d7fc);if(_0x26685f){const _0x136e98={..._0x3e179d[_0x1877b7(0x190)]!==undefined&&{'description':_0x3e179d[_0x1877b7(0x190)]},'rule':_0x3e179d[_0x1877b7(0x17e)]?deepSortObject(_0x3e179d[_0x1877b7(0x17e)]):_0x3e179d[_0x1877b7(0x17e)]};if(_0xcafea2<_0x26685f){_0x15b835[_0xcafea2]=_0x136e98,delete _0x15b835[_0x26685f];for(const [_0x4fc167,_0x385c22]of _0x5590be[_0x1877b7(0x19e)]()){_0x385c22===_0x26685f&&_0x5590be['set'](_0x4fc167,_0xcafea2);}_0x5590be['set'](_0xcafea2,_0xcafea2),_0x285517['set'](_0x23d7fc,_0xcafea2);}else _0x15b835[_0x26685f]=_0x136e98,_0x5590be[_0x1877b7(0x1ae)](_0xcafea2,_0x26685f);}else{let _0x5efd51=_0xcafea2;if(_0x356301){const _0x283788=_0x356301[_0x1877b7(0x199)](_0x23d7fc);_0x283788&&_0x283788[_0x1877b7(0x17a)]>0x0&&(_0x5efd51=_0x283788[_0x1877b7(0x185)]()[_0x1877b7(0x191)]()[0x0]);}const _0x472be8={..._0x3e179d[_0x1877b7(0x190)]!==undefined&&{'description':_0x3e179d[_0x1877b7(0x190)]},'rule':_0x3e179d['rule']?deepSortObject(_0x3e179d[_0x1877b7(0x17e)]):_0x3e179d['rule']};_0x15b835[_0x5efd51]=_0x472be8,_0x5590be[_0x1877b7(0x1ae)](_0xcafea2,_0x5efd51),_0x285517[_0x1877b7(0x1ae)](_0x23d7fc,_0x5efd51);}}}return{'merged':_0x15b835,'nameMapping':_0x5590be};}export function updateSegmentReferences(_0x564219,_0x46bea1){const _0x4c6658=a135_0x5508;if(!_0x564219)return;for(const _0x3ef78f of _0x564219){if(_0x3ef78f[_0x4c6658(0x184)]?.[_0x4c6658(0x1a7)]){const _0x3c16be=_0x46bea1[_0x4c6658(0x199)](_0x3ef78f[_0x4c6658(0x184)][_0x4c6658(0x1a7)]);_0x3c16be&&(_0x3ef78f[_0x4c6658(0x184)]['segment']=_0x3c16be);}if(_0x3ef78f[_0x4c6658(0x19b)])for(const _0x35f993 of _0x3ef78f[_0x4c6658(0x19b)]){if(_0x35f993[_0x4c6658(0x1a7)]){const _0x5d21f3=_0x46bea1[_0x4c6658(0x199)](_0x35f993['segment']);_0x5d21f3&&(_0x35f993[_0x4c6658(0x1a7)]=_0x5d21f3);}}if(_0x3ef78f[_0x4c6658(0x180)]?.['segment']){const _0x12c28c=_0x46bea1[_0x4c6658(0x199)](_0x3ef78f[_0x4c6658(0x180)][_0x4c6658(0x1a7)]);_0x12c28c&&(_0x3ef78f['milestone'][_0x4c6658(0x1a7)]=_0x12c28c);}if(_0x3ef78f['steps'])for(const _0xe6cef5 of _0x3ef78f[_0x4c6658(0x186)]){if(_0xe6cef5['type']==='decision_point'&&_0xe6cef5[_0x4c6658(0x16b)]?.[_0x4c6658(0x181)])for(const _0x3ef27d of _0xe6cef5[_0x4c6658(0x16b)]['branches']){if(_0x3ef27d[_0x4c6658(0x1a7)]){const _0x29a7f8=_0x46bea1[_0x4c6658(0x199)](_0x3ef27d[_0x4c6658(0x1a7)]);_0x29a7f8&&(_0x3ef27d[_0x4c6658(0x1a7)]=_0x29a7f8);}}if(_0xe6cef5['type']===_0x4c6658(0x177)&&_0xe6cef5['with']?.[_0x4c6658(0x18b)]?.[_0x4c6658(0x1a7)]){const _0x32826f=_0x46bea1[_0x4c6658(0x199)](_0xe6cef5[_0x4c6658(0x16b)]['condition'][_0x4c6658(0x1a7)]);_0x32826f&&(_0xe6cef5['with'][_0x4c6658(0x18b)][_0x4c6658(0x1a7)]=_0x32826f);}}}}function a135_0x271f(){const _0x1ff158=['join','description','sort','version','trim','schedule','bundle_id','name','include','7IlPqpI','get','reentry','exit_criteria','keys','journey','entries','has','2696342JZOCwb','latest','connection','some','stringify','replace','find','segment','connector_config','segments','bundle_name','activation','journeys','item','set','attributes','yaml','.yaml','28nsxAKy','null','activations','10umjoDB','draft','88383LfvzFZ','string','goal','with','columns','startsWith','conditions','launched','1798728erIpSh','push','map','1090737wdVZAN','journeyStages','stages','object','wait','toLowerCase','1541145CFfgNC','length','exclude','merged','journeyBundleName','rule','match','milestone','branches','4732656aBZTcA','all_columns','entry_criteria','slice','steps','notification','behavior','23857479zzhxiI','version_number','condition','type','index','isArray'];a135_0x271f=function(){return _0x1ff158;};return a135_0x271f();}export function updateSegmentRefsInSegments(_0x5b50e1,_0xf331aa){const _0x267a62=a135_0x5508;for(const _0x285ec3 of Object['values'](_0x5b50e1)){_0x285ec3[_0x267a62(0x17e)]&&updateSegmentRefsInRule(_0x285ec3[_0x267a62(0x17e)],_0xf331aa);}}function updateSegmentRefsInRule(_0x15bc64,_0x3e2796){const _0x2915dd=a135_0x5508;if(_0x15bc64===null||typeof _0x15bc64!==_0x2915dd(0x176))return;if(Array[_0x2915dd(0x18e)](_0x15bc64)){for(const _0x1a5602 of _0x15bc64){updateSegmentRefsInRule(_0x1a5602,_0x3e2796);}return;}const _0xa0a01d=_0x15bc64;if((_0xa0a01d['type']===_0x2915dd(0x197)||_0xa0a01d[_0x2915dd(0x18c)]===_0x2915dd(0x17b))&&typeof _0xa0a01d[_0x2915dd(0x1a7)]===_0x2915dd(0x169)){const _0x3c7384=_0x3e2796[_0x2915dd(0x199)](_0xa0a01d['segment']);_0x3c7384&&(_0xa0a01d[_0x2915dd(0x1a7)]=_0x3c7384);}if(_0xa0a01d[_0x2915dd(0x16e)]&&Array[_0x2915dd(0x18e)](_0xa0a01d[_0x2915dd(0x16e)]))for(const _0x47013c of _0xa0a01d[_0x2915dd(0x16e)]){updateSegmentRefsInRule(_0x47013c,_0x3e2796);}}export function buildJourneysArray(_0x3e7d54,_0x5672a5){const _0x21e132=a135_0x5508;return _0x3e7d54[_0x21e132(0x172)](_0x49072a=>{const _0x3bd81a=_0x21e132,_0x5a34f9=_0x5672a5?_0x49072a[_0x3bd81a(0x1ad)]['id']===_0x5672a5:_0x3e7d54[_0x3bd81a(0x17a)]===0x1,_0x13bd4e=_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x1ac)]?.[0x0],_0x44a469=_0x13bd4e?.[_0x3bd81a(0x16a)]||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x16a)],_0x2f2e2a={'version':_0x13bd4e?.[_0x3bd81a(0x192)]||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x192)]||_0x49072a[_0x3bd81a(0x1ad)][_0x3bd81a(0x196)],'state':_0x49072a['item']['state']===_0x3bd81a(0x16f)?_0x3bd81a(0x16f):_0x3bd81a(0x167),'stages':_0x13bd4e?.['stages']||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x175)]||[],'id':_0x13bd4e?.['id']||_0x49072a['yaml']['id'],'version_number':_0x13bd4e?.[_0x3bd81a(0x18a)]||_0x49072a[_0x3bd81a(0x161)][_0x3bd81a(0x18a)]};return _0x44a469&&(_0x2f2e2a['goal']=_0x44a469),_0x5a34f9&&(_0x2f2e2a[_0x3bd81a(0x1a1)]=!![]),_0x2f2e2a;});}export function buildMergedJourneyDef(_0x3844db,_0x37e808,_0x3f84d7){const _0xa65d3=a135_0x5508,_0xd045ed=_0x3844db[0x0][_0xa65d3(0x161)],_0x5f27d2=buildJourneysArray(_0x3844db,_0x3f84d7),{merged:_0x2094e5,nameMapping:_0x22ffdc}=consolidateSegmentsByContent(_0x3844db[_0xa65d3(0x172)](_0x225d52=>_0x225d52[_0xa65d3(0x161)][_0xa65d3(0x1a9)]),_0x37e808);updateSegmentRefsInSegments(_0x2094e5,_0x22ffdc);const _0x3ddd2b=Array['from'](_0x22ffdc[_0xa65d3(0x19e)]())[_0xa65d3(0x1a3)](([_0x98fec6,_0x5db429])=>_0x98fec6!==_0x5db429&&_0x98fec6[_0xa65d3(0x16d)](_0xa65d3(0x184)));let _0x5796b6=_0x2094e5,_0x48d46e=new Map();if(_0x3ddd2b){const _0x23f43d=consolidateSegmentsByContent([_0x2094e5],_0x37e808);_0x5796b6=_0x23f43d[_0xa65d3(0x17c)],_0x48d46e=_0x23f43d['nameMapping'];}const _0x4da1e3=new Map(_0x22ffdc);for(const [_0x423e16,_0x22520d]of _0x48d46e[_0xa65d3(0x19e)]()){_0x4da1e3[_0xa65d3(0x1ae)](_0x423e16,_0x22520d);}for(const [_0x21ca1a,_0x5a7a09]of _0x4da1e3[_0xa65d3(0x19e)]()){let _0x49c42f=_0x5a7a09,_0x37bc19=0x0;while(_0x4da1e3[_0xa65d3(0x19f)](_0x49c42f)&&_0x4da1e3[_0xa65d3(0x199)](_0x49c42f)!==_0x49c42f&&_0x37bc19<MAX_MAPPING_CHAIN_DEPTH){_0x49c42f=_0x4da1e3[_0xa65d3(0x199)](_0x49c42f),_0x37bc19++;}_0x49c42f!==_0x5a7a09&&_0x4da1e3[_0xa65d3(0x1ae)](_0x21ca1a,_0x49c42f);}for(const _0x4d3ccc of _0x5f27d2){updateSegmentReferences(_0x4d3ccc[_0xa65d3(0x175)],_0x4da1e3);}const {merged:_0x38e991,nameMapping:_0xe88e35}=consolidateActivationsByContent(_0x3844db[_0xa65d3(0x172)](_0x207ca1=>_0x207ca1[_0xa65d3(0x161)][_0xa65d3(0x165)]));for(const _0x2c2f0e of _0x5f27d2){updateActivationReferences(_0x2c2f0e[_0xa65d3(0x175)],_0xe88e35);}let _0x13eb2f=_0xd045ed[_0xa65d3(0x16a)];if(_0x13eb2f?.[_0xa65d3(0x1a7)]){const _0x125b46=_0x4da1e3[_0xa65d3(0x199)](_0x13eb2f[_0xa65d3(0x1a7)]);_0x125b46&&(_0x13eb2f={..._0x13eb2f,'segment':_0x125b46});}for(const _0x11ea3d of _0x5f27d2){if(_0x11ea3d[_0xa65d3(0x16a)]?.[_0xa65d3(0x1a7)]){const _0x318150=_0x4da1e3[_0xa65d3(0x199)](_0x11ea3d[_0xa65d3(0x16a)][_0xa65d3(0x1a7)]);_0x318150&&(_0x11ea3d[_0xa65d3(0x16a)]={..._0x11ea3d[_0xa65d3(0x16a)],'segment':_0x318150});}}return _0x5f27d2[_0xa65d3(0x1a3)](_0x4f6d9b=>_0x4f6d9b[_0xa65d3(0x16a)])&&(_0x13eb2f=undefined),{'type':_0xa65d3(0x19d),'name':_0xd045ed['name'],'description':_0xd045ed[_0xa65d3(0x190)],'goal':_0x13eb2f,'reentry':_0xd045ed[_0xa65d3(0x19a)],'segments':Object[_0xa65d3(0x19c)](_0x5796b6)['length']>0x0?_0x5796b6:undefined,'activations':Object[_0xa65d3(0x19c)](_0x38e991)[_0xa65d3(0x17a)]>0x0?_0x38e991:undefined,'journeys':_0x5f27d2,'bundle_id':_0xd045ed[_0xa65d3(0x195)],'bundle_name':_0xd045ed[_0xa65d3(0x1aa)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x52375c,_0x2a27d9,_0x39b44a,_0x21c8cf){const _0xbbf167=a135_0x5508,_0x13d39a=_0x52375c+':'+_0x2a27d9,_0x42eb67=_0x39b44a[_0xbbf167(0x199)](_0x13d39a);if(_0x42eb67)return _0x42eb67;const _0x2cb88a=await _0x21c8cf(_0x52375c),_0x14a052=_0x2cb88a[_0xbbf167(0x160)][_0xbbf167(0x17d)]||_0x2cb88a[_0xbbf167(0x160)]['name'],_0x16b08f=_0x2cb88a[_0xbbf167(0x160)][_0xbbf167(0x174)][_0xbbf167(0x1a6)](_0x2e8f66=>String(_0x2e8f66['id'])===String(_0x2a27d9)),_0x35985f=_0x16b08f?.['name']||_0x2a27d9,_0x22fbf6={'journeyName':_0x14a052,'stageName':_0x35985f};return _0x39b44a[_0xbbf167(0x1ae)](_0x13d39a,_0x22fbf6),_0x22fbf6;}export function formatApiJourneyName(_0x9aae3b,_0x2191ee){return _0x2191ee+'\x20('+_0x9aae3b+')';}export function isLocalJourneyRef(_0x475358){const _0x219d8b=a135_0x5508;return _0x475358['endsWith']('.yml')||_0x475358['endsWith'](_0x219d8b(0x162));}export function buildLocalRuleToNameMapping(_0x11fa5e){const _0x28a073=a135_0x5508,_0x12f8bd=new Map();if(!_0x11fa5e)return _0x12f8bd;for(const [_0x1dbb01,_0x336ddc]of Object['entries'](_0x11fa5e)){if(_0x336ddc['rule']){const _0x1204d8=serializeRule(_0x336ddc[_0x28a073(0x17e)]),_0x23aff6=_0x12f8bd[_0x28a073(0x199)](_0x1204d8)||[];_0x23aff6[_0x28a073(0x171)](_0x1dbb01),_0x12f8bd['set'](_0x1204d8,_0x23aff6);}}return _0x12f8bd;}export function buildLocalRuleToNameMappingFromJourney(_0x1e821d){const _0x1d79eb=a135_0x5508,_0x1fa9bc=_0x1e821d[_0x1d79eb(0x1a9)];if(!_0x1fa9bc)return new Map();const _0x583414=collectSegmentUsageCounts(_0x1e821d),_0x27f1fc=new Map();let _0x38fb7e=0x0;for(const [_0x584f73,_0x105277]of Object[_0x1d79eb(0x19e)](_0x1fa9bc)){if(!_0x105277[_0x1d79eb(0x17e)]){_0x38fb7e++;continue;}const _0x1ba5d5=serializeRule(_0x105277[_0x1d79eb(0x17e)]),_0x58652b=_0x27f1fc[_0x1d79eb(0x199)](_0x1ba5d5)||[];_0x58652b[_0x1d79eb(0x171)]({'name':_0x584f73,'index':_0x38fb7e}),_0x27f1fc[_0x1d79eb(0x1ae)](_0x1ba5d5,_0x58652b),_0x38fb7e++;}const _0x1001e1=new Map();for(const [_0x42de12,_0x582d71]of _0x27f1fc){const _0x40d562=_0x582d71['slice']()[_0x1d79eb(0x191)]((_0x210ece,_0xedc478)=>{const _0xa921aa=_0x1d79eb,_0x8ee21b=_0x583414[_0xa921aa(0x199)](_0x210ece[_0xa921aa(0x196)])||0x0,_0x4fd4d3=_0x583414[_0xa921aa(0x199)](_0xedc478[_0xa921aa(0x196)])||0x0;if(_0x8ee21b!==_0x4fd4d3)return _0x4fd4d3-_0x8ee21b;return _0x210ece[_0xa921aa(0x18d)]-_0xedc478['index'];})[_0x1d79eb(0x172)](_0x2dc7a8=>_0x2dc7a8['name']);_0x1001e1[_0x1d79eb(0x1ae)](_0x42de12,_0x40d562);}return _0x1001e1;}function a135_0x5508(_0x1f6f1d,_0x52f063){_0x1f6f1d=_0x1f6f1d-0x160;const _0x271ffb=a135_0x271f();let _0x5508b4=_0x271ffb[_0x1f6f1d];return _0x5508b4;}export function collectSegmentUsageCounts(_0x8c8981){const _0x47d3af=a135_0x5508,_0x485d26=new Map(),_0x55e44e=_0x3a88b6=>{const _0xa8544b=a135_0x5508;if(!_0x3a88b6)return;_0x485d26['set'](_0x3a88b6,(_0x485d26[_0xa8544b(0x199)](_0x3a88b6)||0x0)+0x1);},_0x20894d=_0x401787=>{const _0x4e0d1c=a135_0x5508;for(const _0x209d37 of _0x401787){_0x55e44e(_0x209d37['entry_criteria']?.[_0x4e0d1c(0x1a7)]);if(_0x209d37[_0x4e0d1c(0x19b)])for(const _0x348342 of _0x209d37['exit_criteria']){_0x55e44e(_0x348342['segment']);}_0x55e44e(_0x209d37[_0x4e0d1c(0x180)]?.[_0x4e0d1c(0x1a7)]);if(_0x209d37[_0x4e0d1c(0x186)])for(const _0x28d253 of _0x209d37[_0x4e0d1c(0x186)]){if(_0x28d253[_0x4e0d1c(0x18c)]==='decision_point')for(const _0x2a7861 of _0x28d253[_0x4e0d1c(0x16b)]['branches']){_0x55e44e(_0x2a7861[_0x4e0d1c(0x1a7)]);}else _0x28d253[_0x4e0d1c(0x18c)]===_0x4e0d1c(0x177)&&_0x55e44e(_0x28d253[_0x4e0d1c(0x16b)][_0x4e0d1c(0x18b)]?.[_0x4e0d1c(0x1a7)]);}}};_0x55e44e(_0x8c8981[_0x47d3af(0x16a)]?.['segment']);if(_0x8c8981[_0x47d3af(0x1ac)])for(const _0x2f9af9 of _0x8c8981[_0x47d3af(0x1ac)]){_0x55e44e(_0x2f9af9['goal']?.[_0x47d3af(0x1a7)]),_0x20894d(_0x2f9af9[_0x47d3af(0x175)]);}_0x8c8981[_0x47d3af(0x175)]&&_0x20894d(_0x8c8981[_0x47d3af(0x175)]);if(_0x8c8981['versions'])for(const _0x56f623 of _0x8c8981['versions']){_0x20894d(_0x56f623[_0x47d3af(0x175)]);}return _0x485d26;}
@@ -1 +1 @@
1
- (function(_0x226be3,_0x4f33ef){const _0x2e9b9b=a136_0x44f5,_0x3ad4e1=_0x226be3();while(!![]){try{const _0x5aad8e=parseInt(_0x2e9b9b(0x1da))/0x1*(parseInt(_0x2e9b9b(0x15e))/0x2)+-parseInt(_0x2e9b9b(0x1a5))/0x3*(-parseInt(_0x2e9b9b(0x173))/0x4)+-parseInt(_0x2e9b9b(0x1e6))/0x5*(-parseInt(_0x2e9b9b(0x152))/0x6)+parseInt(_0x2e9b9b(0x194))/0x7+parseInt(_0x2e9b9b(0x172))/0x8*(parseInt(_0x2e9b9b(0x18c))/0x9)+parseInt(_0x2e9b9b(0x184))/0xa+-parseInt(_0x2e9b9b(0x1a4))/0xb;if(_0x5aad8e===_0x4f33ef)break;else _0x3ad4e1['push'](_0x3ad4e1['shift']());}catch(_0x85af89){_0x3ad4e1['push'](_0x3ad4e1['shift']());}}}(a136_0x1ae1,0xbb25f));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x1e9c78,_0x52f787,_0x3dbe71,_0x263ddf,_0x43e46e,_0x52da19){const _0x2837fa=a136_0x44f5;return{'level':_0x1e9c78,'path':_0x52f787,'code':_0x3dbe71,'message':_0x263ddf,'location':getLocationFromPath(_0x43e46e[_0x2837fa(0x15c)],_0x43e46e[_0x2837fa(0x1bd)],pathToArray(_0x52da19??_0x52f787))};}function validateVersionStructure(_0x21c304,_0x2c46b2){const _0x3098ed=a136_0x44f5,_0x26366a=[];return _0x21c304['length']>MAX_STAGES&&_0x26366a[_0x3098ed(0x159)](createIssue(_0x3098ed(0x1ba),_0x3098ed(0x1bb),_0x3098ed(0x1d4),_0x3098ed(0x1a0)+_0x21c304['length']+_0x3098ed(0x14f)+MAX_STAGES,_0x2c46b2)),_0x26366a;}function validateStageStructure(_0x329dc6,_0x3371cb,_0x49868f,_0x2fa9eb){const _0x15572a=a136_0x44f5,_0x4f8655=[],_0x4c1be0=_0x15572a(0x17b)+_0x3371cb+']';_0x3371cb===0x0&&!_0x329dc6['entry_criteria']&&_0x4f8655[_0x15572a(0x159)](createIssue(_0x15572a(0x1ba),_0x4c1be0+_0x15572a(0x136),_0x15572a(0x1e5),_0x15572a(0x149)+_0x329dc6[_0x15572a(0x190)]+_0x15572a(0x1ad),_0x2fa9eb,_0x4c1be0));const _0x29f1a7=_0x3371cb===_0x49868f-0x1;!_0x29f1a7&&!_0x329dc6['milestone']&&_0x4f8655[_0x15572a(0x159)](createIssue(_0x15572a(0x1ba),_0x4c1be0+_0x15572a(0x139),_0x15572a(0x1a3),_0x15572a(0x149)+_0x329dc6[_0x15572a(0x190)]+_0x15572a(0x1b1),_0x2fa9eb,_0x4c1be0));(!_0x329dc6[_0x15572a(0x176)]||_0x329dc6[_0x15572a(0x176)][_0x15572a(0x154)]===0x0)&&_0x4f8655['push'](createIssue(_0x15572a(0x17e),_0x4c1be0+_0x15572a(0x1bc),_0x15572a(0x1ca),'Stage\x20\x27'+_0x329dc6[_0x15572a(0x190)]+_0x15572a(0x198),_0x2fa9eb,_0x4c1be0));const _0x23ab85=_0x329dc6[_0x15572a(0x14b)]?.[_0x15572a(0x154)]??0x0;if(_0x23ab85===0x0)_0x4f8655[_0x15572a(0x159)](createIssue(_0x15572a(0x1ba),_0x4c1be0+_0x15572a(0x142),_0x15572a(0x1c7),_0x15572a(0x149)+_0x329dc6['name']+_0x15572a(0x1e1),_0x2fa9eb,_0x4c1be0+_0x15572a(0x142)));else{if(_0x23ab85===0x1)_0x4f8655['push'](createIssue(_0x15572a(0x17e),_0x4c1be0+'.steps',_0x15572a(0x1c7),_0x15572a(0x149)+_0x329dc6['name']+_0x15572a(0x185),_0x2fa9eb,_0x4c1be0+_0x15572a(0x142)));else _0x23ab85<=0x3&&_0x4f8655[_0x15572a(0x159)](createIssue(_0x15572a(0x17e),_0x4c1be0+_0x15572a(0x142),_0x15572a(0x1a8),_0x15572a(0x149)+_0x329dc6[_0x15572a(0x190)]+_0x15572a(0x188)+_0x23ab85+_0x15572a(0x1b3),_0x2fa9eb,_0x4c1be0+_0x15572a(0x142)));}return _0x4f8655;}function validateStep(_0x1e4ab6,_0x29a272,_0x364bf0,_0x5227cb){const _0x1857d9=a136_0x44f5,_0x239cdc=[];if(_0x1e4ab6['type']===_0x1857d9(0x14c))return _0x1e4ab6['next']&&_0x239cdc[_0x1857d9(0x159)](createIssue(_0x1857d9(0x1ba),_0x29a272+_0x1857d9(0x16d),_0x1857d9(0x133),_0x1857d9(0x164)+_0x1e4ab6['name']+_0x1857d9(0x131),_0x364bf0)),'with'in _0x1e4ab6&&_0x1e4ab6['with']!==undefined&&_0x239cdc[_0x1857d9(0x159)](createIssue(_0x1857d9(0x1ba),_0x29a272+_0x1857d9(0x193),_0x1857d9(0x133),_0x1857d9(0x164)+_0x1e4ab6[_0x1857d9(0x190)]+_0x1857d9(0x140),_0x364bf0)),_0x239cdc;_0x1e4ab6['next']&&(_0x364bf0[_0x1857d9(0x1ab)]&&!_0x364bf0[_0x1857d9(0x1ab)][_0x1857d9(0x13e)](_0x1e4ab6[_0x1857d9(0x13f)])&&_0x239cdc[_0x1857d9(0x159)](createIssue(_0x1857d9(0x1ba),_0x29a272+'.next','INVALID_NEXT_REFERENCE',_0x1857d9(0x16e)+_0x1e4ab6['next']+'\x27',_0x364bf0)));switch(_0x1e4ab6[_0x1857d9(0x1be)]){case'wait':_0x239cdc['push'](...validateWaitStep(_0x1e4ab6,_0x29a272,_0x364bf0,_0x5227cb));break;case'activation':_0x239cdc[_0x1857d9(0x159)](...validateActivationStep(_0x1e4ab6,_0x29a272,_0x364bf0));break;case'decision_point':_0x239cdc[_0x1857d9(0x159)](...validateDecisionPointStep(_0x1e4ab6,_0x29a272,_0x364bf0,_0x5227cb));break;case _0x1857d9(0x138):_0x239cdc[_0x1857d9(0x159)](...validateAbTestStep(_0x1e4ab6,_0x29a272,_0x364bf0,_0x5227cb));break;case _0x1857d9(0x196):_0x239cdc[_0x1857d9(0x159)](...validateJumpStep(_0x1e4ab6,_0x29a272,_0x364bf0));break;}return _0x239cdc;}function validateWaitStep(_0x17224a,_0x553a76,_0x18cb6b,_0x32953c){const _0x294770=a136_0x44f5,_0x50ce64=[];if(!_0x17224a[_0x294770(0x187)])return _0x50ce64[_0x294770(0x159)](createIssue(_0x294770(0x1ba),_0x553a76+'.with',_0x294770(0x1d9),_0x294770(0x1ac),_0x18cb6b,_0x553a76)),_0x50ce64;if(_0x17224a[_0x294770(0x187)][_0x294770(0x1c4)]){const _0x44ce7c=_0x17224a[_0x294770(0x187)]['condition'];if(_0x44ce7c[_0x294770(0x1d1)]){_0x18cb6b[_0x294770(0x13b)]?.[_0x294770(0x1b7)](_0x44ce7c['segment']);!_0x44ce7c[_0x294770(0x1d1)]['startsWith'](_0x294770(0x17f))&&(_0x18cb6b[_0x294770(0x1d6)]&&!_0x18cb6b[_0x294770(0x1d6)][_0x294770(0x13e)](_0x44ce7c[_0x294770(0x1d1)])&&_0x50ce64[_0x294770(0x159)](createIssue('error',_0x553a76+_0x294770(0x186),'MISSING_SEGMENT_REFERENCE',_0x294770(0x1e4)+_0x44ce7c[_0x294770(0x1d1)]+_0x294770(0x1b6),_0x18cb6b)));_0x44ce7c[_0x294770(0x13f)]&&_0x18cb6b['stepNames']&&!_0x18cb6b[_0x294770(0x1ab)][_0x294770(0x13e)](_0x44ce7c[_0x294770(0x13f)])&&_0x50ce64[_0x294770(0x159)](createIssue('error',_0x553a76+'.with.condition.next',_0x294770(0x17d),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x44ce7c[_0x294770(0x13f)]+'\x27',_0x18cb6b));_0x44ce7c[_0x294770(0x1e7)]?.[_0x294770(0x13f)]&&_0x18cb6b[_0x294770(0x1ab)]&&!_0x18cb6b[_0x294770(0x1ab)][_0x294770(0x13e)](_0x44ce7c[_0x294770(0x1e7)][_0x294770(0x13f)])&&_0x50ce64[_0x294770(0x159)](createIssue(_0x294770(0x1ba),_0x553a76+_0x294770(0x174),_0x294770(0x17d),_0x294770(0x19c)+_0x44ce7c[_0x294770(0x1e7)][_0x294770(0x13f)]+'\x27',_0x18cb6b));const _0x370517=_0x44ce7c[_0x294770(0x13f)]||_0x17224a['next'],_0x1605c3=_0x44ce7c[_0x294770(0x1e7)]?.[_0x294770(0x13f)]||_0x17224a[_0x294770(0x13f)];if(_0x370517){const _0x3c3714=_0x32953c[_0x294770(0x134)](_0x370517);_0x3c3714?.[_0x294770(0x1be)]==='merge'&&_0x50ce64['push'](createIssue('warning',_0x553a76+'.with.condition.next','BRANCH_DIRECTLY_TO_MERGE','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x370517+_0x294770(0x19f),_0x18cb6b,_0x553a76+_0x294770(0x1d5)));}if(_0x1605c3){const _0x552fef=_0x32953c['get'](_0x1605c3);_0x552fef?.[_0x294770(0x1be)]===_0x294770(0x1a9)&&_0x50ce64['push'](createIssue('warning',_0x553a76+_0x294770(0x174),_0x294770(0x1cd),_0x294770(0x183)+_0x1605c3+_0x294770(0x19f),_0x18cb6b,_0x553a76+'.with.condition.timeout'));}}}return _0x50ce64;}function validateActivationStep(_0x3d6d2e,_0x368a1c,_0x5ece90){const _0x47f60f=a136_0x44f5,_0x12ba59=[];if(!_0x3d6d2e[_0x47f60f(0x187)]?.[_0x47f60f(0x1a7)])return _0x12ba59[_0x47f60f(0x159)](createIssue(_0x47f60f(0x1ba),_0x368a1c+'.with.activation',_0x47f60f(0x13a),_0x47f60f(0x1a2),_0x5ece90,_0x368a1c)),_0x12ba59;const _0x38eb6e=_0x3d6d2e[_0x47f60f(0x187)][_0x47f60f(0x1a7)];return _0x5ece90[_0x47f60f(0x16b)]&&!_0x38eb6e[_0x47f60f(0x14d)](_0x47f60f(0x17f))&&(!_0x5ece90['activationKeys'][_0x47f60f(0x13e)](_0x38eb6e)&&_0x12ba59[_0x47f60f(0x159)](createIssue('error',_0x368a1c+_0x47f60f(0x156),'MISSING_ACTIVATION_DEFINITION','Activation\x20step\x20references\x20undefined\x20activation\x20\x27'+_0x38eb6e+_0x47f60f(0x1cc),_0x5ece90))),_0x12ba59;}function a136_0x1ae1(){const _0x269693=['Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','End\x20step\x20\x27','.type','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','.with.variants','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','Journey\x20name\x20is\x20required','launched','activationKeys','MISSING_STAGES','.next','Step\x20references\x20non-existent\x20step\x20\x27','version','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','.with.branches','509752mejnWb','344592PxanBp','.with.condition.timeout.next','issues','exit_criteria','\x27\x20has\x20only\x20one\x20input\x20(from:\x20','Decision\x20branch\x20\x27','Journey\x20can\x20have\x20at\x20most\x20one\x20','size','stages[','state','INVALID_NEXT_REFERENCE','warning','ref:','safeParse','versions','filter','Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','11203710yZxzmt','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','.with.condition.segment','with','\x27\x20has\x20only\x20','entries','indices','skipSchema','99qcQdna','milestone',').\x20Use\x20a\x20merge\x20step.','journeys[','name','.with.variants[','data','.with','7549584spChza','A/B\x20test\x20variant\x20\x27','jump','set','\x27\x20has\x20no\x20exit_criteria\x20defined','entry_criteria','rule','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','.rule','Duplicate\x20step\x20name\x20\x27','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','Journey\x20has\x20','wait','Activation\x20step\x20requires\x20an\x20activation\x20reference','MISSING_MILESTONE','52795919LOfNQh','18PVTCyt','versions[','activation','FEW_STEPS','merge','JOURNEY_SCHEMA_ERROR','stepNames','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','timeout\x20of\x20\x27','journeys','.segment','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','path','\x20steps\x20(may\x20be\x20too\x20simple)','keys','excluded_','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','add','message','Criteria\x20references\x20undefined\x20segment\x20\x27','error','stages','.exit_criteria','source','type','endsWith','replace','branches','trim','variants','condition','INVALID_JUMP_TARGET','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','INSUFFICIENT_STEPS','success','Merge\x20step\x20\x27','MISSING_EXIT_CRITERIA','target','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','BRANCH_DIRECTLY_TO_MERGE','symbol','\x27\x20has\x20no\x20end\x20step','\x27\x20with\x20no\x20action\x20in\x20between','segment','segments','\x20versions)','TOO_MANY_STAGES','.with.condition','embeddedSegments','.name','splice','MISSING_WAIT_PARAMS','929683ZhKIJD','match','Journey\x20has\x20no\x20goal\x20defined','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','DUPLICATE_STEP_NAME','segments.','\x20(across\x20','\x27\x20has\x20no\x20steps','SINGLE_INPUT_MERGE','Embedded\x20segment\x20\x27','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','MISSING_ENTRY_CRITERIA','7375vaeZOO','timeout','MISSING_SEGMENT_REFERENCE','sort','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','activations','END_STEP_HAS_NEXT_OR_WITH','get','MISSING_GOAL','.entry_criteria','percentage','ab_test','.milestone','MISSING_ACTIVATION_REF','referencedSegments','map','includes','has','next','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','decision_point','.steps','journey','.exit_criteria[','MISSING_END_STEP','reduce','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','MISSING_CONDITIONS','Stage\x20\x27','join','steps','end','startsWith','.stages','\x20stages\x20but\x20maximum\x20is\x20','description','level','4962UbTMwX','MISSING_NAME','length','condition\x20of\x20\x27','.with.activation','goalIsInherited','goal','push','\x27\x20(first\x20defined\x20at\x20steps[','Jump\x20step\x20requires\x20a\x20target','document','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','2lFMWzQ','CONVERGENCE_WITHOUT_MERGE','some','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','.with.target'];a136_0x1ae1=function(){return _0x269693;};return a136_0x1ae1();}function validateDecisionPointStep(_0x5e9b62,_0x17cff7,_0x3820d7,_0x2496d7){const _0x397962=a136_0x44f5,_0xb1c16=[];if(!_0x5e9b62['with']?.[_0x397962(0x1c1)]||_0x5e9b62[_0x397962(0x187)][_0x397962(0x1c1)][_0x397962(0x154)]===0x0)return _0xb1c16[_0x397962(0x159)](createIssue('error',_0x17cff7+_0x397962(0x171),_0x397962(0x148),'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch',_0x3820d7,_0x17cff7)),_0xb1c16;for(let _0x29ead0=0x0;_0x29ead0<_0x5e9b62[_0x397962(0x187)][_0x397962(0x1c1)][_0x397962(0x154)];_0x29ead0++){const _0xc9e154=_0x5e9b62[_0x397962(0x187)]['branches'][_0x29ead0],_0x4de51e=_0x17cff7+'.with.branches['+_0x29ead0+']';_0xc9e154['segment']&&!_0xc9e154['excluded']&&(_0x3820d7['referencedSegments']?.['add'](_0xc9e154[_0x397962(0x1d1)]),!_0xc9e154[_0x397962(0x1d1)][_0x397962(0x14d)](_0x397962(0x17f))&&(_0x3820d7['embeddedSegments']&&!_0x3820d7['embeddedSegments'][_0x397962(0x13e)](_0xc9e154[_0x397962(0x1d1)])&&_0xb1c16[_0x397962(0x159)](createIssue('error',_0x4de51e+_0x397962(0x1b0),_0x397962(0x1e8),_0x397962(0x166)+_0xc9e154[_0x397962(0x1d1)]+'\x27',_0x3820d7))));_0xc9e154['next']&&_0x3820d7[_0x397962(0x1ab)]&&!_0x3820d7['stepNames'][_0x397962(0x13e)](_0xc9e154['next'])&&_0xb1c16[_0x397962(0x159)](createIssue(_0x397962(0x1ba),_0x4de51e+_0x397962(0x16d),_0x397962(0x17d),_0x397962(0x163)+_0xc9e154['next']+'\x27',_0x3820d7));if(_0xc9e154[_0x397962(0x13f)]){const _0x4c8471=_0x2496d7['get'](_0xc9e154[_0x397962(0x13f)]);_0x4c8471?.['type']===_0x397962(0x1a9)&&_0xb1c16[_0x397962(0x159)](createIssue('warning',_0x4de51e+_0x397962(0x16d),'BRANCH_DIRECTLY_TO_MERGE',_0x397962(0x178)+_0xc9e154[_0x397962(0x190)]+_0x397962(0x170)+_0xc9e154[_0x397962(0x13f)]+'\x27\x20with\x20no\x20action\x20in\x20between',_0x3820d7));}}return _0xb1c16;}function validateAbTestStep(_0x5039d3,_0x2dfce8,_0x4d3f98,_0x3b7041){const _0x2f72a6=a136_0x44f5,_0x56b1e1=[];if(!_0x5039d3['with']?.[_0x2f72a6(0x1c3)]||_0x5039d3[_0x2f72a6(0x187)][_0x2f72a6(0x1c3)][_0x2f72a6(0x154)]===0x0)return _0x56b1e1[_0x2f72a6(0x159)](createIssue(_0x2f72a6(0x1ba),_0x2dfce8+'.with.variants',_0x2f72a6(0x148),_0x2f72a6(0x161),_0x4d3f98,_0x2dfce8)),_0x56b1e1;const _0x20f763=_0x5039d3[_0x2f72a6(0x187)][_0x2f72a6(0x1c3)][_0x2f72a6(0x146)]((_0x277b42,_0x3eb72e)=>_0x277b42+(_0x3eb72e[_0x2f72a6(0x137)]||0x0),0x0);Math['abs'](_0x20f763-0x64)>0.01&&_0x56b1e1[_0x2f72a6(0x159)](createIssue('error',_0x2dfce8+_0x2f72a6(0x167),'INVALID_AB_TEST_PERCENTAGES','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x20f763+'%)',_0x4d3f98));for(let _0x1d7cab=0x0;_0x1d7cab<_0x5039d3[_0x2f72a6(0x187)][_0x2f72a6(0x1c3)][_0x2f72a6(0x154)];_0x1d7cab++){const _0x5e49ae=_0x5039d3[_0x2f72a6(0x187)][_0x2f72a6(0x1c3)][_0x1d7cab],_0x3b52ea=_0x2dfce8+_0x2f72a6(0x191)+_0x1d7cab+']';_0x5e49ae['next']&&_0x4d3f98[_0x2f72a6(0x1ab)]&&!_0x4d3f98[_0x2f72a6(0x1ab)][_0x2f72a6(0x13e)](_0x5e49ae[_0x2f72a6(0x13f)])&&_0x56b1e1[_0x2f72a6(0x159)](createIssue(_0x2f72a6(0x1ba),_0x3b52ea+'.next','INVALID_NEXT_REFERENCE','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27'+_0x5e49ae['next']+'\x27',_0x4d3f98));if(_0x5e49ae[_0x2f72a6(0x13f)]){const _0x31c8f0=_0x3b7041[_0x2f72a6(0x134)](_0x5e49ae[_0x2f72a6(0x13f)]);_0x31c8f0?.[_0x2f72a6(0x1be)]===_0x2f72a6(0x1a9)&&_0x56b1e1[_0x2f72a6(0x159)](createIssue(_0x2f72a6(0x17e),_0x3b52ea+_0x2f72a6(0x16d),_0x2f72a6(0x1cd),_0x2f72a6(0x195)+_0x5e49ae[_0x2f72a6(0x190)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5e49ae[_0x2f72a6(0x13f)]+_0x2f72a6(0x1d0),_0x4d3f98));}}return _0x56b1e1;}function validateJumpStep(_0x211740,_0x4f89f7,_0x1b249d){const _0x52aa4f=a136_0x44f5,_0x132e2f=[];if(!_0x211740[_0x52aa4f(0x187)]?.['target'])return _0x132e2f['push'](createIssue(_0x52aa4f(0x1ba),_0x4f89f7+_0x52aa4f(0x162),_0x52aa4f(0x1c5),_0x52aa4f(0x15b),_0x1b249d,_0x4f89f7)),_0x132e2f;return(!_0x211740[_0x52aa4f(0x187)]['target'][_0x52aa4f(0x143)]||!_0x211740['with'][_0x52aa4f(0x1cb)]['stage'])&&_0x132e2f[_0x52aa4f(0x159)](createIssue(_0x52aa4f(0x1ba),_0x4f89f7+'.with.target',_0x52aa4f(0x1c5),_0x52aa4f(0x1dd),_0x1b249d)),_0x132e2f;}function buildConvergenceMap(_0x4b9aa9){const _0x3d49a2=a136_0x44f5,_0x350980=new Map();function _0x5a1174(_0x43b5d5,_0x5087fe){const _0x13092d=a136_0x44f5,_0x52a882=_0x350980[_0x13092d(0x134)](_0x43b5d5)||[];_0x52a882['push'](_0x5087fe),_0x350980[_0x13092d(0x197)](_0x43b5d5,_0x52a882);}for(const _0x3fb72e of _0x4b9aa9){_0x3fb72e['next']&&_0x5a1174(_0x3fb72e[_0x3d49a2(0x13f)],{'stepName':_0x3fb72e['name'],'description':'step\x20\x27'+_0x3fb72e[_0x3d49a2(0x190)]+'\x27'});if(_0x3fb72e[_0x3d49a2(0x1be)]===_0x3d49a2(0x141)&&_0x3fb72e[_0x3d49a2(0x187)]?.['branches'])for(const _0x3a9c84 of _0x3fb72e[_0x3d49a2(0x187)][_0x3d49a2(0x1c1)]){_0x3a9c84[_0x3d49a2(0x13f)]&&_0x5a1174(_0x3a9c84[_0x3d49a2(0x13f)],{'stepName':_0x3fb72e[_0x3d49a2(0x190)],'description':'branch\x20\x27'+_0x3a9c84[_0x3d49a2(0x190)]+'\x27\x20of\x20\x27'+_0x3fb72e[_0x3d49a2(0x190)]+'\x27'});}if(_0x3fb72e['type']===_0x3d49a2(0x138)&&_0x3fb72e['with']?.[_0x3d49a2(0x1c3)])for(const _0x34c4fd of _0x3fb72e['with'][_0x3d49a2(0x1c3)]){_0x34c4fd['next']&&_0x5a1174(_0x34c4fd[_0x3d49a2(0x13f)],{'stepName':_0x3fb72e[_0x3d49a2(0x190)],'description':'variant\x20\x27'+_0x34c4fd[_0x3d49a2(0x190)]+'\x27\x20of\x20\x27'+_0x3fb72e[_0x3d49a2(0x190)]+'\x27'});}_0x3fb72e['type']===_0x3d49a2(0x1a1)&&_0x3fb72e[_0x3d49a2(0x187)]?.[_0x3d49a2(0x1c4)]&&(_0x3fb72e[_0x3d49a2(0x187)]['condition'][_0x3d49a2(0x13f)]&&_0x5a1174(_0x3fb72e[_0x3d49a2(0x187)][_0x3d49a2(0x1c4)][_0x3d49a2(0x13f)],{'stepName':_0x3fb72e[_0x3d49a2(0x190)],'description':_0x3d49a2(0x155)+_0x3fb72e['name']+'\x27'}),_0x3fb72e[_0x3d49a2(0x187)][_0x3d49a2(0x1c4)]['timeout']?.[_0x3d49a2(0x13f)]&&_0x5a1174(_0x3fb72e['with']['condition']['timeout']['next'],{'stepName':_0x3fb72e[_0x3d49a2(0x190)],'description':_0x3d49a2(0x1ae)+_0x3fb72e['name']+'\x27'}));}return _0x350980;}function validateFlowControl(_0x4e1089,_0x344186,_0x1a2e90){const _0x3abef4=a136_0x44f5,_0x471268=[],_0x376cdb=_0x3abef4(0x17b)+_0x344186+']',_0xec050a=_0x4e1089[_0x3abef4(0x14b)]||[];if(_0xec050a['length']===0x0)return _0x471268;const _0x16c153=new Map();for(const _0x5efd10 of _0xec050a){_0x5efd10[_0x3abef4(0x190)]&&_0x16c153[_0x3abef4(0x197)](_0x5efd10[_0x3abef4(0x190)],_0x5efd10);}const _0x325985=buildConvergenceMap(_0xec050a),_0x51890b=_0xec050a[_0x3abef4(0x160)](_0x37a5fd=>_0x37a5fd[_0x3abef4(0x1be)]==='end');!_0x51890b&&_0x471268[_0x3abef4(0x159)](createIssue(_0x3abef4(0x1ba),_0x376cdb+_0x3abef4(0x142),_0x3abef4(0x145),_0x3abef4(0x149)+_0x4e1089[_0x3abef4(0x190)]+_0x3abef4(0x1cf),_0x1a2e90));for(const [_0x2876d3,_0x338c03]of _0x325985){const _0xb8b27c=_0x16c153[_0x3abef4(0x134)](_0x2876d3);if(!_0xb8b27c)continue;if(_0x338c03[_0x3abef4(0x154)]>0x1&&_0xb8b27c[_0x3abef4(0x1be)]!==_0x3abef4(0x1a9)){const _0x2202ee=_0x338c03['map'](_0x1dcc18=>_0x1dcc18[_0x3abef4(0x150)])[_0x3abef4(0x14a)](',\x20');_0x471268['push'](createIssue(_0x3abef4(0x1ba),_0x376cdb+'.steps',_0x3abef4(0x15f),_0x3abef4(0x19b)+_0x2876d3+'\x27\x20(from:\x20'+_0x2202ee+_0x3abef4(0x18e),_0x1a2e90));}_0x338c03['length']===0x1&&_0xb8b27c[_0x3abef4(0x1be)]===_0x3abef4(0x1a9)&&_0x471268[_0x3abef4(0x159)](createIssue(_0x3abef4(0x17e),_0x376cdb+_0x3abef4(0x142),_0x3abef4(0x1e2),_0x3abef4(0x1c9)+_0x2876d3+_0x3abef4(0x177)+_0x338c03[0x0][_0x3abef4(0x150)]+').\x20Merge\x20is\x20unnecessary.',_0x1a2e90));}for(const _0x166a39 of _0xec050a){if(_0x166a39['type']===_0x3abef4(0x1a9)&&_0x166a39[_0x3abef4(0x13f)]){const _0x2c1254=_0x16c153['get'](_0x166a39[_0x3abef4(0x13f)]);_0x2c1254?.['type']===_0x3abef4(0x1a9)&&_0x471268[_0x3abef4(0x159)](createIssue(_0x3abef4(0x1ba),_0x376cdb+'.steps','MERGE_TO_MERGE_CHAIN',_0x3abef4(0x1c9)+_0x166a39['name']+_0x3abef4(0x147)+_0x166a39['next']+_0x3abef4(0x168),_0x1a2e90));}}return _0x471268;}function validateCriteria(_0x509def,_0x258ec3,_0x1209b6){const _0x23599e=a136_0x44f5,_0x1b1105=[];return _0x509def['segment']&&(_0x1209b6[_0x23599e(0x13b)]?.[_0x23599e(0x1b7)](_0x509def[_0x23599e(0x1d1)]),!_0x509def['segment'][_0x23599e(0x14d)]('ref:')&&(_0x1209b6[_0x23599e(0x1d6)]&&!_0x1209b6[_0x23599e(0x1d6)][_0x23599e(0x13e)](_0x509def[_0x23599e(0x1d1)])&&_0x1b1105[_0x23599e(0x159)](createIssue('error',_0x258ec3+'.segment',_0x23599e(0x1e8),_0x23599e(0x1b9)+_0x509def[_0x23599e(0x1d1)]+'\x27',_0x1209b6)))),_0x1b1105;}function validateEmbeddedSegment(_0x25c0e4,_0x57896a,_0xf4c16b){const _0x583e86=a136_0x44f5,_0x425dd7=[];return _0x25c0e4['rule']&&_0x425dd7['push'](...validateRuleDef(_0x25c0e4[_0x583e86(0x19a)],_0x57896a+_0x583e86(0x19d),_0xf4c16b)),_0x425dd7;}function a136_0x44f5(_0x4ba297,_0x231707){_0x4ba297=_0x4ba297-0x131;const _0x1ae162=a136_0x1ae1();let _0x44f599=_0x1ae162[_0x4ba297];return _0x44f599;}function validateStage(_0x12ec46,_0xbc6c03,_0x137e31,_0x3bd257){const _0xe36149=a136_0x44f5,_0x44317d=[],_0x12eee7=_0xe36149(0x17b)+_0xbc6c03+']',_0x5ef217=new Map(),_0x2a55c4=new Map();if(_0x12ec46[_0xe36149(0x14b)]){for(let _0x23fc24=0x0;_0x23fc24<_0x12ec46['steps'][_0xe36149(0x154)];_0x23fc24++){const _0x10594a=_0x12ec46['steps'][_0x23fc24];_0x10594a[_0xe36149(0x190)]&&_0x5ef217[_0xe36149(0x197)](_0x10594a['name'],_0x10594a);}for(let _0x285299=0x0;_0x285299<_0x12ec46[_0xe36149(0x14b)][_0xe36149(0x154)];_0x285299++){const _0x31ec29=_0x12ec46['steps'][_0x285299],_0x536965=_0x12eee7+'.steps['+_0x285299+']';if(_0x31ec29[_0xe36149(0x190)]){if(_0x2a55c4['has'](_0x31ec29['name'])){const _0x4e8a86=_0x2a55c4['get'](_0x31ec29[_0xe36149(0x190)]);_0x44317d[_0xe36149(0x159)](createIssue('error',_0x536965+_0xe36149(0x1d7),_0xe36149(0x1de),_0xe36149(0x19e)+_0x31ec29[_0xe36149(0x190)]+_0xe36149(0x15a)+_0x4e8a86+'])',_0x3bd257));}else _0x2a55c4[_0xe36149(0x197)](_0x31ec29[_0xe36149(0x190)],_0x285299);}_0x44317d['push'](...validateStep(_0x31ec29,_0x536965,_0x3bd257,_0x5ef217));}}_0x12ec46[_0xe36149(0x199)]&&_0x44317d['push'](...validateCriteria(_0x12ec46['entry_criteria'],_0x12eee7+'.entry_criteria',_0x3bd257));if(_0x12ec46[_0xe36149(0x176)])for(let _0x3d3781=0x0;_0x3d3781<_0x12ec46[_0xe36149(0x176)][_0xe36149(0x154)];_0x3d3781++){_0x44317d[_0xe36149(0x159)](...validateCriteria(_0x12ec46[_0xe36149(0x176)][_0x3d3781],_0x12eee7+_0xe36149(0x144)+_0x3d3781+']',_0x3bd257));}return _0x12ec46[_0xe36149(0x18d)]&&_0x44317d['push'](...validateCriteria(_0x12ec46[_0xe36149(0x18d)],_0x12eee7+_0xe36149(0x139),_0x3bd257)),_0x44317d['push'](...validateStageStructure(_0x12ec46,_0xbc6c03,_0x137e31,_0x3bd257)),_0x44317d['push'](...validateFlowControl(_0x12ec46,_0xbc6c03,_0x3bd257)),_0x44317d;}function validateStagesForVersion(_0x30bcdf,_0x20a9c1,_0x3ea55d,_0x10e244,_0x414ee6,_0x233f1d,_0x3f5b9d){const _0x5b489b=a136_0x44f5;if(_0x30bcdf[_0x5b489b(0x154)]===0x0){_0x414ee6[_0x5b489b(0x159)]({'level':_0x5b489b(0x1ba),'path':_0x10e244+_0x5b489b(0x1bb),'code':'MISSING_STAGES','message':_0x5b489b(0x1c6),'location':getLocationFromPath(_0x3ea55d[_0x5b489b(0x15c)],_0x3ea55d['source'],[_0x5b489b(0x1bb)])});return;}const _0x2d7997=new Set();for(const _0x240593 of _0x30bcdf){if(_0x240593[_0x5b489b(0x14b)])for(const _0x4a770f of _0x240593[_0x5b489b(0x14b)]){_0x4a770f[_0x5b489b(0x190)]&&_0x2d7997[_0x5b489b(0x1b7)](_0x4a770f[_0x5b489b(0x190)]);}}const _0x5bea30={..._0x3ea55d,'stepNames':_0x2d7997},_0x123bc9=validateVersionStructure(_0x30bcdf,_0x5bea30);for(const _0x1ac567 of _0x123bc9){const _0x1542b5=_0x10e244?{..._0x1ac567,'path':''+_0x10e244+_0x1ac567[_0x5b489b(0x1b2)]}:_0x1ac567;if(_0x1542b5['level']===_0x5b489b(0x1ba))_0x414ee6['push'](_0x1542b5);else _0x233f1d['push'](_0x1542b5);}for(let _0x1a4512=0x0;_0x1a4512<_0x30bcdf[_0x5b489b(0x154)];_0x1a4512++){const _0x17eaf3=validateStage(_0x30bcdf[_0x1a4512],_0x1a4512,_0x30bcdf[_0x5b489b(0x154)],_0x5bea30);for(const _0x6b8e23 of _0x17eaf3){const _0x127059=_0x10e244?{..._0x6b8e23,'path':''+_0x10e244+_0x6b8e23[_0x5b489b(0x1b2)]}:_0x6b8e23;if(_0x127059[_0x5b489b(0x151)]===_0x5b489b(0x1ba))_0x414ee6[_0x5b489b(0x159)](_0x127059);else _0x233f1d[_0x5b489b(0x159)](_0x127059);}}if(_0x20a9c1[_0x5b489b(0x158)]){const _0x17fcda=_0x3f5b9d?.[_0x5b489b(0x157)]?'goal':_0x10e244+'goal',_0x9b211c=validateCriteria(_0x20a9c1['goal'],_0x17fcda,_0x5bea30);for(const _0xe6842d of _0x9b211c){if(_0xe6842d[_0x5b489b(0x151)]==='error')_0x414ee6[_0x5b489b(0x159)](_0xe6842d);else _0x233f1d[_0x5b489b(0x159)](_0xe6842d);}}}function extractVersionIndex(_0x3b4536){const _0x1bebb4=a136_0x44f5,_0x191941=_0x3b4536[_0x1bebb4(0x1db)](/^journeys\[(\d+)\]\./);return _0x191941?_0x191941[0x1]:undefined;}function deduplicateAcrossVersions(_0x70eabc){const _0x1baef0=a136_0x44f5,_0x1fafdf=new Map();for(let _0x3b119b=0x0;_0x3b119b<_0x70eabc[_0x1baef0(0x154)];_0x3b119b++){const _0x58ec27=_0x70eabc[_0x3b119b]['code']+':'+_0x70eabc[_0x3b119b][_0x1baef0(0x1b8)],_0x27db7f=extractVersionIndex(_0x70eabc[_0x3b119b][_0x1baef0(0x1b2)]),_0x24fa4b=_0x1fafdf['get'](_0x58ec27);if(_0x24fa4b){_0x24fa4b[_0x1baef0(0x18a)]['push'](_0x3b119b);if(_0x27db7f)_0x24fa4b['versions'][_0x1baef0(0x1b7)](_0x27db7f);}else _0x1fafdf[_0x1baef0(0x197)](_0x58ec27,{'indices':[_0x3b119b],'versions':new Set(_0x27db7f?[_0x27db7f]:[])});}const _0x2c6e86=new Set();for(const {indices:_0x433e4f,versions:_0x260cda}of _0x1fafdf['values']()){if(_0x260cda[_0x1baef0(0x17a)]<=0x1)continue;const _0x29187d=_0x70eabc[_0x433e4f[0x0]];_0x29187d[_0x1baef0(0x1b2)]=_0x29187d[_0x1baef0(0x1b2)][_0x1baef0(0x1c0)](/^journeys\[\d+\]\./,''),_0x29187d[_0x1baef0(0x1b8)]=_0x29187d[_0x1baef0(0x1b8)]+_0x1baef0(0x1e0)+_0x260cda[_0x1baef0(0x17a)]+_0x1baef0(0x1d3);for(let _0x50db48=0x1;_0x50db48<_0x433e4f[_0x1baef0(0x154)];_0x50db48++){_0x2c6e86[_0x1baef0(0x1b7)](_0x433e4f[_0x50db48]);}}const _0x90fbf=[..._0x2c6e86][_0x1baef0(0x1e9)]((_0x8c6aa4,_0x20ffe9)=>_0x20ffe9-_0x8c6aa4);for(const _0x19b0be of _0x90fbf){_0x70eabc[_0x1baef0(0x1d8)](_0x19b0be,0x1);}}export function validateJourneyDef(_0x7c15cb,_0xa83a0c={},_0x2f3b18={}){const _0x148add=a136_0x44f5;if(_0x2f3b18[_0x148add(0x18b)])return runJourneySemanticChecks(_0x7c15cb,_0xa83a0c);const _0x113508=JourneyDefSchema[_0x148add(0x180)](_0x7c15cb);if(_0x113508[_0x148add(0x1c8)])return runJourneySemanticChecks(_0x113508[_0x148add(0x192)],_0xa83a0c);return zodErrorsToJourneyValidationResult(_0x113508[_0x148add(0x1ba)],_0xa83a0c);}function zodErrorsToJourneyValidationResult(_0x29aae6,_0x4365d9){const _0x455b1c=a136_0x44f5,_0x541d0e=flattenZodIssues(_0x29aae6[_0x455b1c(0x175)]),_0x12438a=_0x541d0e[_0x455b1c(0x13c)](_0x280e2e=>{const _0x3f5e8f=_0x455b1c,_0x5d5a0b=formatZodPath(_0x280e2e[_0x3f5e8f(0x1b2)]),_0x54559e=mapJourneyZodIssueToCode(_0x280e2e,_0x5d5a0b),_0x5da205=getLocationFromPath(_0x4365d9['document'],_0x4365d9['source'],_0x280e2e[_0x3f5e8f(0x1b2)]['map'](_0x56edf8=>typeof _0x56edf8===_0x3f5e8f(0x1ce)?String(_0x56edf8):_0x56edf8));return{'level':_0x3f5e8f(0x1ba),'path':_0x5d5a0b,'code':_0x54559e,'message':_0x280e2e[_0x3f5e8f(0x1b8)],..._0x5da205&&{'location':_0x5da205}};});return{'valid':![],'errors':_0x12438a,'warnings':[]};}function mapJourneyZodIssueToCode(_0xb66569,_0x14093e){const _0x3908cc=a136_0x44f5;if(_0x14093e===_0x3908cc(0x190))return'MISSING_NAME';if(_0x14093e[_0x3908cc(0x1bf)](_0x3908cc(0x165))&&_0x14093e[_0x3908cc(0x13d)](_0x3908cc(0x14b)))return _0x3908cc(0x1aa);if(_0x14093e===_0x3908cc(0x1bb)||_0x14093e[_0x3908cc(0x1bf)](_0x3908cc(0x14e)))return _0x3908cc(0x16c);if(_0x14093e===''&&_0xb66569[_0x3908cc(0x1b8)][_0x3908cc(0x13d)]('journeys,\x20stages,\x20or\x20versions'))return _0x3908cc(0x16c);if(_0x14093e[_0x3908cc(0x13d)](_0x3908cc(0x1a7)))return'ACTIVATION_SCHEMA_ERROR';return _0x3908cc(0x1aa);}function runJourneySemanticChecks(_0x101f5b,_0xe30b69){const _0x49e18f=a136_0x44f5,_0x3431ea=[],_0x58823a=[];(!_0x101f5b[_0x49e18f(0x190)]||_0x101f5b[_0x49e18f(0x190)][_0x49e18f(0x1c2)]()==='')&&_0x3431ea['push']({'level':_0x49e18f(0x1ba),'path':'name','code':_0x49e18f(0x153),'message':_0x49e18f(0x169),'location':getLocationFromPath(_0xe30b69[_0x49e18f(0x15c)],_0xe30b69[_0x49e18f(0x1bd)],['name'])});const _0x3b9435=new Set();if(_0x101f5b[_0x49e18f(0x1d2)])for(const _0x2be0d7 of Object[_0x49e18f(0x1b4)](_0x101f5b['segments'])){_0x3b9435[_0x49e18f(0x1b7)](_0x2be0d7);}const _0x45a8b1=new Set();if(_0x101f5b['activations'])for(const _0x4ac9d6 of Object[_0x49e18f(0x1b4)](_0x101f5b[_0x49e18f(0x132)])){_0x45a8b1['add'](_0x4ac9d6);}const _0x5b988f=new Set(),_0x573431={..._0xe30b69,'embeddedSegments':_0x3b9435,'referencedSegments':_0x5b988f,'activationKeys':_0x45a8b1[_0x49e18f(0x17a)]>0x0?_0x45a8b1:undefined};if(_0x101f5b[_0x49e18f(0x1d2)])for(const [_0x2eb080,_0x43ca0e]of Object[_0x49e18f(0x189)](_0x101f5b[_0x49e18f(0x1d2)])){const _0x5e462c=validateEmbeddedSegment(_0x43ca0e,_0x49e18f(0x1df)+_0x2eb080,_0x573431);for(const _0x5892e1 of _0x5e462c){if(_0x5892e1[_0x49e18f(0x151)]===_0x49e18f(0x1ba))_0x3431ea[_0x49e18f(0x159)](_0x5892e1);else _0x58823a['push'](_0x5892e1);}}const _0x1ba5c4=!!_0x101f5b['goal'],_0x1b152f=_0x101f5b['journeys']?.['every'](_0x115cf3=>!!_0x115cf3['goal'])??![];!_0x1ba5c4&&!_0x1b152f&&_0x58823a['push']({'level':_0x49e18f(0x17e),'path':_0x49e18f(0x158),'code':_0x49e18f(0x135),'message':_0x49e18f(0x1dc),'location':getLocationFromPath(_0xe30b69['document'],_0xe30b69[_0x49e18f(0x1bd)],[_0x49e18f(0x158)])});const _0x2e3f0d=_0x101f5b[_0x49e18f(0x1af)]??_0x101f5b['versions'];if(_0x2e3f0d&&_0x2e3f0d[_0x49e18f(0x182)](_0x3f62b9=>_0x3f62b9['latest']===!![])['length']>0x1){const _0x2256fe=_0x101f5b[_0x49e18f(0x1af)]?_0x49e18f(0x1af):_0x49e18f(0x181);_0x3431ea[_0x49e18f(0x159)]({'level':'error','path':_0x2256fe,'code':'DUPLICATE_LATEST','message':_0x49e18f(0x179)+(_0x2256fe===_0x49e18f(0x1af)?'journey\x20entry':_0x49e18f(0x16f))+'\x20with\x20latest:\x20true','location':getLocationFromPath(_0xe30b69['document'],_0xe30b69['source'],[_0x2256fe])});}if(_0x101f5b['journeys']&&_0x101f5b[_0x49e18f(0x1af)][_0x49e18f(0x154)]>0x0)for(let _0xfd754=0x0;_0xfd754<_0x101f5b[_0x49e18f(0x1af)][_0x49e18f(0x154)];_0xfd754++){const _0x97ee51=_0x101f5b[_0x49e18f(0x1af)][_0xfd754];if(_0x101f5b[_0x49e18f(0x1af)][_0x49e18f(0x154)]>0x1&&_0x97ee51['state']===_0x49e18f(0x16a))continue;const _0x47987f=_0x97ee51['stages']||[],_0x419d40=_0x49e18f(0x18f)+_0xfd754+'].',_0x30c188=!!_0x97ee51[_0x49e18f(0x158)],_0x281da0=_0x30c188?{..._0x101f5b,'goal':_0x97ee51[_0x49e18f(0x158)]}:_0x101f5b;validateStagesForVersion(_0x47987f,_0x281da0,_0x573431,_0x419d40,_0x3431ea,_0x58823a,{'goalIsInherited':!_0x30c188});}else{if(_0x101f5b[_0x49e18f(0x181)]&&_0x101f5b[_0x49e18f(0x181)]['length']>0x0)for(let _0x282ec6=0x0;_0x282ec6<_0x101f5b[_0x49e18f(0x181)][_0x49e18f(0x154)];_0x282ec6++){const _0x9c1d2d=_0x101f5b[_0x49e18f(0x181)][_0x282ec6];if(_0x101f5b['versions'][_0x49e18f(0x154)]>0x1&&_0x9c1d2d[_0x49e18f(0x17c)]===_0x49e18f(0x16a))continue;const _0x1c844b=_0x9c1d2d[_0x49e18f(0x1bb)]||[],_0x35ea8a=_0x49e18f(0x1a6)+_0x282ec6+'].';validateStagesForVersion(_0x1c844b,_0x101f5b,_0x573431,_0x35ea8a,_0x3431ea,_0x58823a);}else{const _0x1540a0=_0x101f5b['stages']||[];validateStagesForVersion(_0x1540a0,_0x101f5b,_0x573431,'',_0x3431ea,_0x58823a);}}_0x101f5b[_0x49e18f(0x1af)]&&_0x101f5b['journeys'][_0x49e18f(0x154)]>0x1&&(deduplicateAcrossVersions(_0x3431ea),deduplicateAcrossVersions(_0x58823a));for(const _0x17b1e2 of _0x3b9435){!_0x5b988f[_0x49e18f(0x13e)](_0x17b1e2)&&!_0x17b1e2['startsWith'](_0x49e18f(0x1b5))&&_0x58823a[_0x49e18f(0x159)]({'level':_0x49e18f(0x17e),'path':_0x49e18f(0x1df)+_0x17b1e2,'code':'UNUSED_EMBEDDED_SEGMENT','message':_0x49e18f(0x1e3)+_0x17b1e2+_0x49e18f(0x15d),'location':getLocationFromPath(_0xe30b69[_0x49e18f(0x15c)],_0xe30b69[_0x49e18f(0x1bd)],[_0x49e18f(0x1d2),_0x17b1e2])});}return{'valid':_0x3431ea['length']===0x0,'errors':_0x3431ea,'warnings':_0x58823a};}
1
+ (function(_0x285eff,_0x4ffb15){const _0x59dece=a136_0x43e8,_0x119971=_0x285eff();while(!![]){try{const _0x4f690f=parseInt(_0x59dece(0x164))/0x1+parseInt(_0x59dece(0xf8))/0x2*(parseInt(_0x59dece(0x160))/0x3)+-parseInt(_0x59dece(0x11c))/0x4*(parseInt(_0x59dece(0x139))/0x5)+-parseInt(_0x59dece(0x115))/0x6+-parseInt(_0x59dece(0x16b))/0x7+-parseInt(_0x59dece(0x1a8))/0x8*(parseInt(_0x59dece(0x120))/0x9)+parseInt(_0x59dece(0x138))/0xa;if(_0x4f690f===_0x4ffb15)break;else _0x119971['push'](_0x119971['shift']());}catch(_0x5e0d4a){_0x119971['push'](_0x119971['shift']());}}}(a136_0x3e32,0xee344));import{JourneyDefSchema}from'./types/journey-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray,validateRuleDef}from'./yaml-validator.js';const MAX_STAGES=0x8;function createIssue(_0x5c71cc,_0x37bc24,_0x301579,_0x28986d,_0x397714,_0x4115ba){const _0x512576=a136_0x43e8;return{'level':_0x5c71cc,'path':_0x37bc24,'code':_0x301579,'message':_0x28986d,'location':getLocationFromPath(_0x397714[_0x512576(0x17b)],_0x397714[_0x512576(0x108)],pathToArray(_0x4115ba??_0x37bc24))};}function validateVersionStructure(_0x2a9a3b,_0x117538){const _0x3a53ab=a136_0x43e8,_0x2582a1=[];return _0x2a9a3b[_0x3a53ab(0x135)]>MAX_STAGES&&_0x2582a1[_0x3a53ab(0xfd)](createIssue(_0x3a53ab(0x13b),_0x3a53ab(0xfa),_0x3a53ab(0x144),_0x3a53ab(0x15d)+_0x2a9a3b[_0x3a53ab(0x135)]+'\x20stages\x20but\x20maximum\x20is\x20'+MAX_STAGES,_0x117538)),_0x2582a1;}function a136_0x43e8(_0x2f14bd,_0x5867e4){_0x2f14bd=_0x2f14bd-0xf5;const _0x3e32d2=a136_0x3e32();let _0x43e8c6=_0x3e32d2[_0x2f14bd];return _0x43e8c6;}function validateStageStructure(_0x29ec7f,_0x2a7e1d,_0x515ee0,_0x201c4f){const _0x5cd894=a136_0x43e8,_0xa08753=[],_0x1092a0='stages['+_0x2a7e1d+']';_0x2a7e1d===0x0&&!_0x29ec7f[_0x5cd894(0x192)]&&_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x13b),_0x1092a0+_0x5cd894(0x191),'MISSING_ENTRY_CRITERIA','Stage\x20\x27'+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x172),_0x201c4f,_0x1092a0));const _0xfafad6=_0x2a7e1d===_0x515ee0-0x1;!_0xfafad6&&!_0x29ec7f['milestone']&&_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x13b),_0x1092a0+_0x5cd894(0x14a),'MISSING_MILESTONE',_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x193),_0x201c4f,_0x1092a0));(!_0x29ec7f['exit_criteria']||_0x29ec7f['exit_criteria'][_0x5cd894(0x135)]===0x0)&&_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x163),_0x1092a0+_0x5cd894(0x11a),'MISSING_EXIT_CRITERIA',_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+'\x27\x20has\x20no\x20exit_criteria\x20defined',_0x201c4f,_0x1092a0));const _0x2d38c9=_0x29ec7f[_0x5cd894(0xfe)]?.[_0x5cd894(0x135)]??0x0;if(_0x2d38c9===0x0)_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x13b),_0x1092a0+_0x5cd894(0x12e),'INSUFFICIENT_STEPS',_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x18d),_0x201c4f,_0x1092a0+_0x5cd894(0x12e)));else{if(_0x2d38c9===0x1)_0xa08753[_0x5cd894(0xfd)](createIssue(_0x5cd894(0x163),_0x1092a0+_0x5cd894(0x12e),_0x5cd894(0x159),_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x1a9),_0x201c4f,_0x1092a0+_0x5cd894(0x12e)));else _0x2d38c9<=0x3&&_0xa08753[_0x5cd894(0xfd)](createIssue('warning',_0x1092a0+'.steps',_0x5cd894(0x131),_0x5cd894(0xf7)+_0x29ec7f[_0x5cd894(0x198)]+_0x5cd894(0x16f)+_0x2d38c9+_0x5cd894(0x17d),_0x201c4f,_0x1092a0+_0x5cd894(0x12e)));}return _0xa08753;}function validateStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740){const _0x163de4=a136_0x43e8,_0x41f805=[];if(_0x16c51b[_0x163de4(0x154)]===_0x163de4(0x187))return _0x16c51b['next']&&_0x41f805[_0x163de4(0xfd)](createIssue('error',_0xebeb9a+_0x163de4(0x14e),_0x163de4(0x146),_0x163de4(0x100)+_0x16c51b[_0x163de4(0x198)]+_0x163de4(0x1a0),_0x4d7328)),'with'in _0x16c51b&&_0x16c51b[_0x163de4(0xf9)]!==undefined&&_0x41f805[_0x163de4(0xfd)](createIssue('error',_0xebeb9a+_0x163de4(0x10e),_0x163de4(0x146),_0x163de4(0x100)+_0x16c51b[_0x163de4(0x198)]+_0x163de4(0x19d),_0x4d7328)),_0x41f805;_0x16c51b['next']&&(_0x4d7328[_0x163de4(0x185)]&&!_0x4d7328['stepNames'][_0x163de4(0x109)](_0x16c51b['next'])&&_0x41f805[_0x163de4(0xfd)](createIssue(_0x163de4(0x13b),_0xebeb9a+_0x163de4(0x14e),_0x163de4(0x13c),_0x163de4(0x13f)+_0x16c51b['next']+'\x27',_0x4d7328)));switch(_0x16c51b[_0x163de4(0x154)]){case _0x163de4(0x133):_0x41f805['push'](...validateWaitStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740));break;case _0x163de4(0x189):_0x41f805['push'](...validateActivationStep(_0x16c51b,_0xebeb9a,_0x4d7328));break;case _0x163de4(0x1a2):_0x41f805[_0x163de4(0xfd)](...validateDecisionPointStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740));break;case _0x163de4(0x12b):_0x41f805[_0x163de4(0xfd)](...validateAbTestStep(_0x16c51b,_0xebeb9a,_0x4d7328,_0x3c6740));break;case _0x163de4(0xf6):_0x41f805[_0x163de4(0xfd)](...validateJumpStep(_0x16c51b,_0xebeb9a,_0x4d7328));break;}return _0x41f805;}function validateWaitStep(_0x796af3,_0x496fa7,_0x288eb1,_0x1e17ad){const _0x4b01d4=a136_0x43e8,_0x50eb74=[];if(!_0x796af3[_0x4b01d4(0xf9)])return _0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+_0x4b01d4(0x10e),_0x4b01d4(0x11b),_0x4b01d4(0x10d),_0x288eb1,_0x496fa7)),_0x50eb74;if(_0x796af3[_0x4b01d4(0xf9)][_0x4b01d4(0x1a5)]){const _0x5b3d6e=_0x796af3[_0x4b01d4(0xf9)][_0x4b01d4(0x1a5)];if(_0x5b3d6e['segment']){_0x288eb1[_0x4b01d4(0x127)]?.[_0x4b01d4(0x103)](_0x5b3d6e[_0x4b01d4(0x167)]);!_0x5b3d6e['segment'][_0x4b01d4(0x107)](_0x4b01d4(0x134))&&(_0x288eb1[_0x4b01d4(0x1a1)]&&!_0x288eb1[_0x4b01d4(0x1a1)][_0x4b01d4(0x109)](_0x5b3d6e['segment'])&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+'.with.condition.segment',_0x4b01d4(0x125),_0x4b01d4(0x19c)+_0x5b3d6e[_0x4b01d4(0x167)]+'\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.',_0x288eb1)));_0x5b3d6e[_0x4b01d4(0x14d)]&&_0x288eb1[_0x4b01d4(0x185)]&&!_0x288eb1['stepNames']['has'](_0x5b3d6e[_0x4b01d4(0x14d)])&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+_0x4b01d4(0x168),_0x4b01d4(0x13c),'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x5b3d6e[_0x4b01d4(0x14d)]+'\x27',_0x288eb1));_0x5b3d6e['timeout']?.[_0x4b01d4(0x14d)]&&_0x288eb1[_0x4b01d4(0x185)]&&!_0x288eb1[_0x4b01d4(0x185)][_0x4b01d4(0x109)](_0x5b3d6e[_0x4b01d4(0x110)]['next'])&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x13b),_0x496fa7+_0x4b01d4(0x121),_0x4b01d4(0x13c),_0x4b01d4(0x182)+_0x5b3d6e[_0x4b01d4(0x110)][_0x4b01d4(0x14d)]+'\x27',_0x288eb1));const _0x31c21a=_0x5b3d6e['next']||_0x796af3[_0x4b01d4(0x14d)],_0x18c282=_0x5b3d6e[_0x4b01d4(0x110)]?.[_0x4b01d4(0x14d)]||_0x796af3['next'];if(_0x31c21a){const _0x22f59b=_0x1e17ad[_0x4b01d4(0x173)](_0x31c21a);_0x22f59b?.[_0x4b01d4(0x154)]===_0x4b01d4(0x175)&&_0x50eb74['push'](createIssue(_0x4b01d4(0x163),_0x496fa7+'.with.condition.next',_0x4b01d4(0x180),_0x4b01d4(0xf5)+_0x31c21a+_0x4b01d4(0x132),_0x288eb1,_0x496fa7+'.with.condition'));}if(_0x18c282){const _0x2aaedf=_0x1e17ad[_0x4b01d4(0x173)](_0x18c282);_0x2aaedf?.['type']===_0x4b01d4(0x175)&&_0x50eb74[_0x4b01d4(0xfd)](createIssue(_0x4b01d4(0x163),_0x496fa7+_0x4b01d4(0x121),_0x4b01d4(0x180),'Wait\x20condition\x20timeout\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x18c282+_0x4b01d4(0x132),_0x288eb1,_0x496fa7+_0x4b01d4(0x179)));}}}return _0x50eb74;}function validateActivationStep(_0x1f69b0,_0x15fac0,_0x375ff4){const _0x1fa35a=a136_0x43e8,_0x11c465=[];if(!_0x1f69b0[_0x1fa35a(0xf9)]?.[_0x1fa35a(0x189)])return _0x11c465['push'](createIssue(_0x1fa35a(0x13b),_0x15fac0+_0x1fa35a(0x1a7),_0x1fa35a(0x1ae),_0x1fa35a(0x162),_0x375ff4,_0x15fac0)),_0x11c465;const _0x4d26a8=_0x1f69b0[_0x1fa35a(0xf9)]['activation'];return _0x375ff4[_0x1fa35a(0x17a)]&&!_0x4d26a8[_0x1fa35a(0x107)](_0x1fa35a(0x134))&&(!_0x375ff4['activationKeys'][_0x1fa35a(0x109)](_0x4d26a8)&&_0x11c465[_0x1fa35a(0xfd)](createIssue('error',_0x15fac0+_0x1fa35a(0x1a7),_0x1fa35a(0x113),_0x1fa35a(0x15c)+_0x4d26a8+_0x1fa35a(0x150),_0x375ff4))),_0x11c465;}function validateDecisionPointStep(_0x3c67ea,_0x387599,_0x3139eb,_0x25ec5e){const _0x3bd4e6=a136_0x43e8,_0x4e28cb=[];if(!_0x3c67ea[_0x3bd4e6(0xf9)]?.[_0x3bd4e6(0x15f)]||_0x3c67ea['with'][_0x3bd4e6(0x15f)][_0x3bd4e6(0x135)]===0x0)return _0x4e28cb[_0x3bd4e6(0xfd)](createIssue('error',_0x387599+_0x3bd4e6(0x11d),_0x3bd4e6(0x176),_0x3bd4e6(0xff),_0x3139eb,_0x387599)),_0x4e28cb;for(let _0xbb7a21=0x0;_0xbb7a21<_0x3c67ea[_0x3bd4e6(0xf9)][_0x3bd4e6(0x15f)][_0x3bd4e6(0x135)];_0xbb7a21++){const _0x5bd965=_0x3c67ea[_0x3bd4e6(0xf9)][_0x3bd4e6(0x15f)][_0xbb7a21],_0x207058=_0x387599+'.with.branches['+_0xbb7a21+']';_0x5bd965['segment']&&!_0x5bd965[_0x3bd4e6(0x112)]&&(_0x3139eb['referencedSegments']?.[_0x3bd4e6(0x103)](_0x5bd965[_0x3bd4e6(0x167)]),!_0x5bd965[_0x3bd4e6(0x167)][_0x3bd4e6(0x107)](_0x3bd4e6(0x134))&&(_0x3139eb[_0x3bd4e6(0x1a1)]&&!_0x3139eb[_0x3bd4e6(0x1a1)][_0x3bd4e6(0x109)](_0x5bd965[_0x3bd4e6(0x167)])&&_0x4e28cb['push'](createIssue('error',_0x207058+_0x3bd4e6(0x122),_0x3bd4e6(0x125),'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x5bd965['segment']+'\x27',_0x3139eb))));_0x5bd965[_0x3bd4e6(0x14d)]&&_0x3139eb[_0x3bd4e6(0x185)]&&!_0x3139eb[_0x3bd4e6(0x185)][_0x3bd4e6(0x109)](_0x5bd965[_0x3bd4e6(0x14d)])&&_0x4e28cb[_0x3bd4e6(0xfd)](createIssue(_0x3bd4e6(0x13b),_0x207058+_0x3bd4e6(0x14e),_0x3bd4e6(0x13c),_0x3bd4e6(0x186)+_0x5bd965[_0x3bd4e6(0x14d)]+'\x27',_0x3139eb));if(_0x5bd965[_0x3bd4e6(0x14d)]){const _0x5290b7=_0x25ec5e[_0x3bd4e6(0x173)](_0x5bd965[_0x3bd4e6(0x14d)]);_0x5290b7?.['type']===_0x3bd4e6(0x175)&&_0x4e28cb[_0x3bd4e6(0xfd)](createIssue(_0x3bd4e6(0x163),_0x207058+'.next',_0x3bd4e6(0x180),_0x3bd4e6(0x152)+_0x5bd965[_0x3bd4e6(0x198)]+'\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27'+_0x5bd965['next']+_0x3bd4e6(0x11e),_0x3139eb));}}return _0x4e28cb;}function validateAbTestStep(_0x393e65,_0x1435ae,_0x5bf8da,_0x28328c){const _0x1464dd=a136_0x43e8,_0x4a0a34=[];if(!_0x393e65[_0x1464dd(0xf9)]?.[_0x1464dd(0x111)]||_0x393e65['with'][_0x1464dd(0x111)][_0x1464dd(0x135)]===0x0)return _0x4a0a34[_0x1464dd(0xfd)](createIssue(_0x1464dd(0x13b),_0x1435ae+_0x1464dd(0x140),_0x1464dd(0x176),'A/B\x20test\x20requires\x20at\x20least\x20one\x20variant',_0x5bf8da,_0x1435ae)),_0x4a0a34;const _0x3c9e20=_0x393e65[_0x1464dd(0xf9)]['variants'][_0x1464dd(0x1aa)]((_0x500fc7,_0x579cae)=>_0x500fc7+(_0x579cae[_0x1464dd(0x18c)]||0x0),0x0);Math[_0x1464dd(0x177)](_0x3c9e20-0x64)>0.01&&_0x4a0a34[_0x1464dd(0xfd)](createIssue(_0x1464dd(0x13b),_0x1435ae+_0x1464dd(0x140),'INVALID_AB_TEST_PERCENTAGES',_0x1464dd(0x129)+_0x3c9e20+'%)',_0x5bf8da));for(let _0x216a4a=0x0;_0x216a4a<_0x393e65[_0x1464dd(0xf9)][_0x1464dd(0x111)][_0x1464dd(0x135)];_0x216a4a++){const _0x16227b=_0x393e65[_0x1464dd(0xf9)][_0x1464dd(0x111)][_0x216a4a],_0x42af05=_0x1435ae+_0x1464dd(0x181)+_0x216a4a+']';_0x16227b[_0x1464dd(0x14d)]&&_0x5bf8da[_0x1464dd(0x185)]&&!_0x5bf8da[_0x1464dd(0x185)][_0x1464dd(0x109)](_0x16227b['next'])&&_0x4a0a34[_0x1464dd(0xfd)](createIssue(_0x1464dd(0x13b),_0x42af05+_0x1464dd(0x14e),_0x1464dd(0x13c),_0x1464dd(0x11f)+_0x16227b[_0x1464dd(0x14d)]+'\x27',_0x5bf8da));if(_0x16227b['next']){const _0x26795a=_0x28328c[_0x1464dd(0x173)](_0x16227b['next']);_0x26795a?.[_0x1464dd(0x154)]==='merge'&&_0x4a0a34[_0x1464dd(0xfd)](createIssue('warning',_0x42af05+_0x1464dd(0x14e),_0x1464dd(0x180),_0x1464dd(0x161)+_0x16227b[_0x1464dd(0x198)]+_0x1464dd(0x17f)+_0x16227b[_0x1464dd(0x14d)]+_0x1464dd(0x11e),_0x5bf8da));}}return _0x4a0a34;}function validateJumpStep(_0x37178e,_0x3c11ad,_0x344b36){const _0x10cedd=a136_0x43e8,_0x140204=[];if(!_0x37178e[_0x10cedd(0xf9)]?.[_0x10cedd(0x149)])return _0x140204['push'](createIssue(_0x10cedd(0x13b),_0x3c11ad+_0x10cedd(0x156),'INVALID_JUMP_TARGET',_0x10cedd(0x184),_0x344b36,_0x3c11ad)),_0x140204;return(!_0x37178e[_0x10cedd(0xf9)][_0x10cedd(0x149)][_0x10cedd(0x195)]||!_0x37178e[_0x10cedd(0xf9)][_0x10cedd(0x149)][_0x10cedd(0x116)])&&_0x140204[_0x10cedd(0xfd)](createIssue(_0x10cedd(0x13b),_0x3c11ad+'.with.target',_0x10cedd(0x169),_0x10cedd(0x118),_0x344b36)),_0x140204;}function buildConvergenceMap(_0x5b18f2){const _0x138aac=a136_0x43e8,_0x461d41=new Map();function _0x211733(_0x188ca9,_0x3d0048){const _0x2b452d=a136_0x43e8,_0x2732e7=_0x461d41[_0x2b452d(0x173)](_0x188ca9)||[];_0x2732e7[_0x2b452d(0xfd)](_0x3d0048),_0x461d41['set'](_0x188ca9,_0x2732e7);}for(const _0x574457 of _0x5b18f2){_0x574457[_0x138aac(0x14d)]&&_0x211733(_0x574457[_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x123)+_0x574457[_0x138aac(0x198)]+'\x27'});if(_0x574457[_0x138aac(0x154)]==='decision_point'&&_0x574457[_0x138aac(0xf9)]?.[_0x138aac(0x15f)])for(const _0x176086 of _0x574457[_0x138aac(0xf9)]['branches']){_0x176086[_0x138aac(0x14d)]&&_0x211733(_0x176086[_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x137)+_0x176086[_0x138aac(0x198)]+_0x138aac(0x183)+_0x574457['name']+'\x27'});}if(_0x574457['type']===_0x138aac(0x12b)&&_0x574457['with']?.[_0x138aac(0x111)])for(const _0x4531b2 of _0x574457[_0x138aac(0xf9)]['variants']){_0x4531b2[_0x138aac(0x14d)]&&_0x211733(_0x4531b2[_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x10b)+_0x4531b2[_0x138aac(0x198)]+_0x138aac(0x183)+_0x574457[_0x138aac(0x198)]+'\x27'});}_0x574457[_0x138aac(0x154)]==='wait'&&_0x574457[_0x138aac(0xf9)]?.[_0x138aac(0x1a5)]&&(_0x574457[_0x138aac(0xf9)][_0x138aac(0x1a5)]['next']&&_0x211733(_0x574457['with']['condition'][_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x10a)+_0x574457['name']+'\x27'}),_0x574457[_0x138aac(0xf9)][_0x138aac(0x1a5)]['timeout']?.[_0x138aac(0x14d)]&&_0x211733(_0x574457['with'][_0x138aac(0x1a5)][_0x138aac(0x110)][_0x138aac(0x14d)],{'stepName':_0x574457[_0x138aac(0x198)],'description':_0x138aac(0x12c)+_0x574457[_0x138aac(0x198)]+'\x27'}));}return _0x461d41;}function validateFlowControl(_0x18b54e,_0x12fa4e,_0xef76d7){const _0x12b6bb=a136_0x43e8,_0x4b862d=[],_0x475d02='stages['+_0x12fa4e+']',_0x399c60=_0x18b54e[_0x12b6bb(0xfe)]||[];if(_0x399c60['length']===0x0)return _0x4b862d;const _0x15f144=new Map();for(const _0x515ed7 of _0x399c60){_0x515ed7[_0x12b6bb(0x198)]&&_0x15f144[_0x12b6bb(0x142)](_0x515ed7['name'],_0x515ed7);}const _0x513bfd=buildConvergenceMap(_0x399c60),_0x2b3654=_0x399c60['some'](_0x10396a=>_0x10396a['type']===_0x12b6bb(0x187));!_0x2b3654&&_0x4b862d['push'](createIssue(_0x12b6bb(0x13b),_0x475d02+'.steps',_0x12b6bb(0x117),_0x12b6bb(0xf7)+_0x18b54e[_0x12b6bb(0x198)]+_0x12b6bb(0x1a3),_0xef76d7));for(const [_0x1c6641,_0x3e97d7]of _0x513bfd){const _0x2e5039=_0x15f144[_0x12b6bb(0x173)](_0x1c6641);if(!_0x2e5039)continue;if(_0x3e97d7[_0x12b6bb(0x135)]>0x1&&_0x2e5039[_0x12b6bb(0x154)]!=='merge'){const _0x4f2315=_0x3e97d7['map'](_0x12a5f8=>_0x12a5f8[_0x12b6bb(0x165)])[_0x12b6bb(0x16e)](',\x20');_0x4b862d[_0x12b6bb(0xfd)](createIssue('error',_0x475d02+_0x12b6bb(0x12e),'CONVERGENCE_WITHOUT_MERGE',_0x12b6bb(0x130)+_0x1c6641+'\x27\x20(from:\x20'+_0x4f2315+_0x12b6bb(0x157),_0xef76d7));}_0x3e97d7[_0x12b6bb(0x135)]===0x1&&_0x2e5039[_0x12b6bb(0x154)]==='merge'&&_0x4b862d[_0x12b6bb(0xfd)](createIssue(_0x12b6bb(0x163),_0x475d02+_0x12b6bb(0x12e),_0x12b6bb(0x13e),_0x12b6bb(0x151)+_0x1c6641+'\x27\x20has\x20only\x20one\x20input\x20(from:\x20'+_0x3e97d7[0x0][_0x12b6bb(0x165)]+_0x12b6bb(0x14f),_0xef76d7));}for(const _0xed4bce of _0x399c60){if(_0xed4bce[_0x12b6bb(0x154)]===_0x12b6bb(0x175)&&_0xed4bce[_0x12b6bb(0x14d)]){const _0x4dd36a=_0x15f144['get'](_0xed4bce[_0x12b6bb(0x14d)]);_0x4dd36a?.[_0x12b6bb(0x154)]===_0x12b6bb(0x175)&&_0x4b862d['push'](createIssue('error',_0x475d02+'.steps',_0x12b6bb(0x126),_0x12b6bb(0x151)+_0xed4bce[_0x12b6bb(0x198)]+_0x12b6bb(0x18a)+_0xed4bce[_0x12b6bb(0x14d)]+_0x12b6bb(0x119),_0xef76d7));}}return _0x4b862d;}function validateCriteria(_0xe19640,_0x3fc47f,_0x352926){const _0x1a699c=a136_0x43e8,_0x14216a=[];return _0xe19640[_0x1a699c(0x167)]&&(_0x352926['referencedSegments']?.[_0x1a699c(0x103)](_0xe19640[_0x1a699c(0x167)]),!_0xe19640[_0x1a699c(0x167)][_0x1a699c(0x107)]('ref:')&&(_0x352926[_0x1a699c(0x1a1)]&&!_0x352926['embeddedSegments'][_0x1a699c(0x109)](_0xe19640[_0x1a699c(0x167)])&&_0x14216a[_0x1a699c(0xfd)](createIssue(_0x1a699c(0x13b),_0x3fc47f+_0x1a699c(0x122),_0x1a699c(0x125),_0x1a699c(0x18f)+_0xe19640[_0x1a699c(0x167)]+'\x27',_0x352926)))),_0x14216a;}function validateEmbeddedSegment(_0x1307ca,_0x345c53,_0x4f2516){const _0x4ae5ba=a136_0x43e8,_0x1cf3f4=[];return _0x1307ca[_0x4ae5ba(0x190)]&&_0x1cf3f4[_0x4ae5ba(0xfd)](...validateRuleDef(_0x1307ca[_0x4ae5ba(0x190)],_0x345c53+_0x4ae5ba(0x105),_0x4f2516)),_0x1cf3f4;}function validateStage(_0x479b07,_0x346110,_0x3e8e31,_0x1c5f6f){const _0x26fc11=a136_0x43e8,_0x2e4628=[],_0x4a9140='stages['+_0x346110+']',_0x1a9652=new Map(),_0x5ed6de=new Map();if(_0x479b07['steps']){for(let _0x5e089e=0x0;_0x5e089e<_0x479b07[_0x26fc11(0xfe)][_0x26fc11(0x135)];_0x5e089e++){const _0x215ab2=_0x479b07[_0x26fc11(0xfe)][_0x5e089e];_0x215ab2[_0x26fc11(0x198)]&&_0x1a9652[_0x26fc11(0x142)](_0x215ab2[_0x26fc11(0x198)],_0x215ab2);}for(let _0x39541d=0x0;_0x39541d<_0x479b07[_0x26fc11(0xfe)]['length'];_0x39541d++){const _0x279c46=_0x479b07[_0x26fc11(0xfe)][_0x39541d],_0x4fd9cb=_0x4a9140+_0x26fc11(0x16a)+_0x39541d+']';if(_0x279c46[_0x26fc11(0x198)]){if(_0x5ed6de[_0x26fc11(0x109)](_0x279c46[_0x26fc11(0x198)])){const _0x1a5f68=_0x5ed6de[_0x26fc11(0x173)](_0x279c46[_0x26fc11(0x198)]);_0x2e4628['push'](createIssue(_0x26fc11(0x13b),_0x4fd9cb+_0x26fc11(0x101),_0x26fc11(0x197),'Duplicate\x20step\x20name\x20\x27'+_0x279c46[_0x26fc11(0x198)]+_0x26fc11(0x145)+_0x1a5f68+'])',_0x1c5f6f));}else _0x5ed6de['set'](_0x279c46[_0x26fc11(0x198)],_0x39541d);}_0x2e4628[_0x26fc11(0xfd)](...validateStep(_0x279c46,_0x4fd9cb,_0x1c5f6f,_0x1a9652));}}_0x479b07[_0x26fc11(0x192)]&&_0x2e4628[_0x26fc11(0xfd)](...validateCriteria(_0x479b07[_0x26fc11(0x192)],_0x4a9140+_0x26fc11(0x191),_0x1c5f6f));if(_0x479b07[_0x26fc11(0xfc)])for(let _0x4675e2=0x0;_0x4675e2<_0x479b07[_0x26fc11(0xfc)][_0x26fc11(0x135)];_0x4675e2++){_0x2e4628['push'](...validateCriteria(_0x479b07['exit_criteria'][_0x4675e2],_0x4a9140+'.exit_criteria['+_0x4675e2+']',_0x1c5f6f));}return _0x479b07[_0x26fc11(0x106)]&&_0x2e4628[_0x26fc11(0xfd)](...validateCriteria(_0x479b07[_0x26fc11(0x106)],_0x4a9140+_0x26fc11(0x14a),_0x1c5f6f)),_0x2e4628['push'](...validateStageStructure(_0x479b07,_0x346110,_0x3e8e31,_0x1c5f6f)),_0x2e4628[_0x26fc11(0xfd)](...validateFlowControl(_0x479b07,_0x346110,_0x1c5f6f)),_0x2e4628;}function validateStagesForVersion(_0x458f0a,_0x5b4740,_0x5aa506,_0x28a1e6,_0x1dd6c6,_0x3c5bdd,_0x48a097){const _0x2138de=a136_0x43e8;if(_0x458f0a['length']===0x0){_0x1dd6c6[_0x2138de(0xfd)]({'level':_0x2138de(0x13b),'path':_0x28a1e6+_0x2138de(0xfa),'code':_0x2138de(0x10f),'message':_0x2138de(0x13a),'location':getLocationFromPath(_0x5aa506[_0x2138de(0x17b)],_0x5aa506[_0x2138de(0x108)],['stages'])});return;}const _0x1ff9a1=new Set();for(const _0x2ae7df of _0x458f0a){if(_0x2ae7df[_0x2138de(0xfe)])for(const _0x449784 of _0x2ae7df[_0x2138de(0xfe)]){_0x449784['name']&&_0x1ff9a1[_0x2138de(0x103)](_0x449784[_0x2138de(0x198)]);}}const _0x4eaf7f={..._0x5aa506,'stepNames':_0x1ff9a1},_0x42df02=validateVersionStructure(_0x458f0a,_0x4eaf7f);for(const _0x2aaa4c of _0x42df02){const _0xdb016a=_0x28a1e6?{..._0x2aaa4c,'path':''+_0x28a1e6+_0x2aaa4c[_0x2138de(0x19b)]}:_0x2aaa4c;if(_0xdb016a[_0x2138de(0x12a)]==='error')_0x1dd6c6[_0x2138de(0xfd)](_0xdb016a);else _0x3c5bdd['push'](_0xdb016a);}for(let _0x54b17c=0x0;_0x54b17c<_0x458f0a[_0x2138de(0x135)];_0x54b17c++){const _0x2b0755=validateStage(_0x458f0a[_0x54b17c],_0x54b17c,_0x458f0a[_0x2138de(0x135)],_0x4eaf7f);for(const _0xa7b7a6 of _0x2b0755){const _0x161f52=_0x28a1e6?{..._0xa7b7a6,'path':''+_0x28a1e6+_0xa7b7a6[_0x2138de(0x19b)]}:_0xa7b7a6;if(_0x161f52[_0x2138de(0x12a)]===_0x2138de(0x13b))_0x1dd6c6['push'](_0x161f52);else _0x3c5bdd[_0x2138de(0xfd)](_0x161f52);}}if(_0x5b4740[_0x2138de(0x158)]){const _0x820c8d=_0x48a097?.['goalIsInherited']?_0x2138de(0x158):_0x28a1e6+'goal',_0xccc321=validateCriteria(_0x5b4740[_0x2138de(0x158)],_0x820c8d,_0x4eaf7f);for(const _0x551fce of _0xccc321){if(_0x551fce['level']===_0x2138de(0x13b))_0x1dd6c6[_0x2138de(0xfd)](_0x551fce);else _0x3c5bdd[_0x2138de(0xfd)](_0x551fce);}}}function extractVersionIndex(_0x41c27c){const _0x3f3e3f=a136_0x43e8,_0x286f6c=_0x41c27c[_0x3f3e3f(0x136)](/^journeys\[(\d+)\]\./);return _0x286f6c?_0x286f6c[0x1]:undefined;}function deduplicateAcrossVersions(_0x224064){const _0x26e62c=a136_0x43e8,_0xba7cba=new Map();for(let _0x38a60e=0x0;_0x38a60e<_0x224064[_0x26e62c(0x135)];_0x38a60e++){const _0x426aaa=_0x224064[_0x38a60e][_0x26e62c(0x19e)]+':'+_0x224064[_0x38a60e][_0x26e62c(0xfb)],_0x503ee2=extractVersionIndex(_0x224064[_0x38a60e][_0x26e62c(0x19b)]),_0x25f6cb=_0xba7cba[_0x26e62c(0x173)](_0x426aaa);if(_0x25f6cb){_0x25f6cb[_0x26e62c(0x1a6)][_0x26e62c(0xfd)](_0x38a60e);if(_0x503ee2)_0x25f6cb['versions'][_0x26e62c(0x103)](_0x503ee2);}else _0xba7cba[_0x26e62c(0x142)](_0x426aaa,{'indices':[_0x38a60e],'versions':new Set(_0x503ee2?[_0x503ee2]:[])});}const _0x3de14a=new Set();for(const {indices:_0x501ba4,versions:_0x24f382}of _0xba7cba[_0x26e62c(0x1ab)]()){if(_0x24f382[_0x26e62c(0x170)]<=0x1)continue;const _0xefdd10=_0x224064[_0x501ba4[0x0]];_0xefdd10[_0x26e62c(0x19b)]=_0xefdd10[_0x26e62c(0x19b)][_0x26e62c(0x18e)](/^journeys\[\d+\]\./,''),_0xefdd10[_0x26e62c(0xfb)]=_0xefdd10[_0x26e62c(0xfb)]+_0x26e62c(0x1ac)+_0x24f382[_0x26e62c(0x170)]+_0x26e62c(0x19f);for(let _0x3eae5d=0x1;_0x3eae5d<_0x501ba4[_0x26e62c(0x135)];_0x3eae5d++){_0x3de14a[_0x26e62c(0x103)](_0x501ba4[_0x3eae5d]);}}const _0x307445=[..._0x3de14a][_0x26e62c(0x13d)]((_0x4a41f7,_0x370dce)=>_0x370dce-_0x4a41f7);for(const _0x3e2ab4 of _0x307445){_0x224064[_0x26e62c(0x15b)](_0x3e2ab4,0x1);}}export function validateJourneyDef(_0x13b7b3,_0x49c6b6={},_0x3f99bc={}){const _0x117480=a136_0x43e8;if(_0x3f99bc[_0x117480(0x14c)])return runJourneySemanticChecks(_0x13b7b3,_0x49c6b6);const _0x1eb3e3=JourneyDefSchema[_0x117480(0x18b)](_0x13b7b3);if(_0x1eb3e3['success'])return runJourneySemanticChecks(_0x1eb3e3[_0x117480(0x196)],_0x49c6b6);return zodErrorsToJourneyValidationResult(_0x1eb3e3[_0x117480(0x13b)],_0x49c6b6);}function zodErrorsToJourneyValidationResult(_0x291a07,_0x19b161){const _0x56d047=a136_0x43e8,_0x322f6d=flattenZodIssues(_0x291a07[_0x56d047(0x174)]),_0x40ac83=_0x322f6d['map'](_0x2ca54b=>{const _0x8a12f6=_0x56d047,_0x55ad40=formatZodPath(_0x2ca54b[_0x8a12f6(0x19b)]),_0x5757c8=mapJourneyZodIssueToCode(_0x2ca54b,_0x55ad40),_0x26d24c=getLocationFromPath(_0x19b161['document'],_0x19b161[_0x8a12f6(0x108)],_0x2ca54b[_0x8a12f6(0x19b)][_0x8a12f6(0x15a)](_0x4055bf=>typeof _0x4055bf==='symbol'?String(_0x4055bf):_0x4055bf));return{'level':_0x8a12f6(0x13b),'path':_0x55ad40,'code':_0x5757c8,'message':_0x2ca54b[_0x8a12f6(0xfb)],..._0x26d24c&&{'location':_0x26d24c}};});return{'valid':![],'errors':_0x40ac83,'warnings':[]};}function mapJourneyZodIssueToCode(_0x416a98,_0x53997d){const _0x4b04ee=a136_0x43e8;if(_0x53997d===_0x4b04ee(0x198))return _0x4b04ee(0x104);if(_0x53997d[_0x4b04ee(0x153)](_0x4b04ee(0x1a4))&&_0x53997d[_0x4b04ee(0x147)]('steps'))return _0x4b04ee(0x128);if(_0x53997d===_0x4b04ee(0xfa)||_0x53997d[_0x4b04ee(0x153)](_0x4b04ee(0x155)))return _0x4b04ee(0x10f);if(_0x53997d===''&&_0x416a98[_0x4b04ee(0xfb)][_0x4b04ee(0x147)](_0x4b04ee(0x14b)))return _0x4b04ee(0x10f);if(_0x53997d[_0x4b04ee(0x147)](_0x4b04ee(0x189)))return _0x4b04ee(0x12f);return _0x4b04ee(0x128);}function a136_0x3e32(){const _0x374a64=['.with.variants','filter','set','journey\x20entry','TOO_MANY_STAGES','\x27\x20(first\x20defined\x20at\x20steps[','END_STEP_HAS_NEXT_OR_WITH','includes','entries','target','.milestone','journeys,\x20stages,\x20or\x20versions','skipSchema','next','.next',').\x20Merge\x20is\x20unnecessary.','\x27.\x20Define\x20it\x20in\x20the\x20\x27activations\x27\x20section\x20or\x20use\x20\x27ref:Name\x27\x20for\x20external\x20activations.','Merge\x20step\x20\x27','Decision\x20branch\x20\x27','endsWith','type','.stages','.with.target',').\x20Use\x20a\x20merge\x20step.','goal','INSUFFICIENT_STEPS','map','splice','Activation\x20step\x20references\x20undefined\x20activation\x20\x27','Journey\x20has\x20','keys','branches','3vYYMol','A/B\x20test\x20variant\x20\x27','Activation\x20step\x20requires\x20an\x20activation\x20reference','warning','665107hPsRor','description','launched','segment','.with.condition.next','INVALID_JUMP_TARGET','.steps[','5270825JLrlmD','Embedded\x20segment\x20\x27','segments.','join','\x27\x20has\x20only\x20','size','versions','\x27\x20is\x20missing\x20entry_criteria\x20(required\x20for\x20the\x20first\x20stage)','get','issues','merge','MISSING_CONDITIONS','abs','activations','.with.condition.timeout','activationKeys','document','\x20with\x20latest:\x20true','\x20steps\x20(may\x20be\x20too\x20simple)','latest','\x27\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','BRANCH_DIRECTLY_TO_MERGE','.with.variants[','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','\x27\x20of\x20\x27','Jump\x20step\x20requires\x20a\x20target','stepNames','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','end','UNUSED_EMBEDDED_SEGMENT','activation','\x27\x20leads\x20to\x20another\x20merge\x20step\x20\x27','safeParse','percentage','\x27\x20has\x20no\x20steps','replace','Criteria\x20references\x20undefined\x20segment\x20\x27','rule','.entry_criteria','entry_criteria','\x27\x20(non-last\x20stage)\x20is\x20missing\x20a\x20milestone','segments','journey','data','DUPLICATE_STEP_NAME','name','trim','Journey\x20can\x20have\x20at\x20most\x20one\x20','path','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','\x27\x20should\x20not\x20have\x20a\x20\x27with\x27\x20field','code','\x20versions)','\x27\x20should\x20not\x20have\x20a\x20\x27next\x27\x20field','embeddedSegments','decision_point','\x27\x20has\x20no\x20end\x20step','.type','condition','indices','.with.activation','1850864iceKNr','\x27\x20has\x20only\x201\x20step\x20(may\x20be\x20too\x20simple)','reduce','values','\x20(across\x20','excluded_','MISSING_ACTIVATION_REF','Wait\x20condition\x20matched\x20path\x20goes\x20directly\x20to\x20merge\x20step\x20\x27','jump','Stage\x20\x27','3523714RLmbZF','with','stages','message','exit_criteria','push','steps','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','End\x20step\x20\x27','.name','state','add','MISSING_NAME','.rule','milestone','startsWith','source','has','condition\x20of\x20\x27','variant\x20\x27','Journey\x20name\x20is\x20required','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','.with','MISSING_STAGES','timeout','variants','excluded','MISSING_ACTIVATION_DEFINITION','journeys[','2622378kjlPvZ','stage','MISSING_END_STEP','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','\x27.\x20Merge\x20chains\x20are\x20not\x20allowed.','.exit_criteria','MISSING_WAIT_PARAMS','40PKZzRI','.with.branches','\x27\x20with\x20no\x20action\x20in\x20between','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','9WrzXUh','.with.condition.timeout.next','.segment','step\x20\x27','every','MISSING_SEGMENT_REFERENCE','MERGE_TO_MERGE_CHAIN','referencedSegments','JOURNEY_SCHEMA_ERROR','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','level','ab_test','timeout\x20of\x20\x27','journeys','.steps','ACTIVATION_SCHEMA_ERROR','Multiple\x20paths\x20converge\x20on\x20non-merge\x20step\x20\x27','FEW_STEPS','\x27\x20with\x20no\x20action.\x20Each\x20branch\x20of\x20a\x20condition\x20wait\x20must\x20perform\x20a\x20different\x20action.','wait','ref:','length','match','branch\x20\x27','1930960mGLrXs','111490ZIUucX','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','error','INVALID_NEXT_REFERENCE','sort','SINGLE_INPUT_MERGE','Step\x20references\x20non-existent\x20step\x20\x27'];a136_0x3e32=function(){return _0x374a64;};return a136_0x3e32();}function runJourneySemanticChecks(_0x8102c2,_0x2911ed){const _0x18c0f9=a136_0x43e8,_0x5e7597=[],_0x3307a9=[];(!_0x8102c2['name']||_0x8102c2[_0x18c0f9(0x198)][_0x18c0f9(0x199)]()==='')&&_0x5e7597[_0x18c0f9(0xfd)]({'level':_0x18c0f9(0x13b),'path':_0x18c0f9(0x198),'code':_0x18c0f9(0x104),'message':_0x18c0f9(0x10c),'location':getLocationFromPath(_0x2911ed[_0x18c0f9(0x17b)],_0x2911ed[_0x18c0f9(0x108)],[_0x18c0f9(0x198)])});const _0x2bca13=new Set();if(_0x8102c2[_0x18c0f9(0x194)])for(const _0x550896 of Object[_0x18c0f9(0x15e)](_0x8102c2[_0x18c0f9(0x194)])){_0x2bca13[_0x18c0f9(0x103)](_0x550896);}const _0x3ec87f=new Set();if(_0x8102c2[_0x18c0f9(0x178)])for(const _0x255292 of Object[_0x18c0f9(0x15e)](_0x8102c2[_0x18c0f9(0x178)])){_0x3ec87f[_0x18c0f9(0x103)](_0x255292);}const _0x159b8e=new Set(),_0x3585b2={..._0x2911ed,'embeddedSegments':_0x2bca13,'referencedSegments':_0x159b8e,'activationKeys':_0x3ec87f['size']>0x0?_0x3ec87f:undefined};if(_0x8102c2[_0x18c0f9(0x194)])for(const [_0x21c92a,_0x52573f]of Object[_0x18c0f9(0x148)](_0x8102c2[_0x18c0f9(0x194)])){const _0x23f178=validateEmbeddedSegment(_0x52573f,_0x18c0f9(0x16d)+_0x21c92a,_0x3585b2);for(const _0x135b6c of _0x23f178){if(_0x135b6c[_0x18c0f9(0x12a)]===_0x18c0f9(0x13b))_0x5e7597[_0x18c0f9(0xfd)](_0x135b6c);else _0x3307a9[_0x18c0f9(0xfd)](_0x135b6c);}}const _0x225023=!!_0x8102c2[_0x18c0f9(0x158)],_0x16058c=_0x8102c2[_0x18c0f9(0x12d)]?.[_0x18c0f9(0x124)](_0x21e110=>!!_0x21e110[_0x18c0f9(0x158)])??![];!_0x225023&&!_0x16058c&&_0x3307a9[_0x18c0f9(0xfd)]({'level':_0x18c0f9(0x163),'path':'goal','code':'MISSING_GOAL','message':'Journey\x20has\x20no\x20goal\x20defined','location':getLocationFromPath(_0x2911ed[_0x18c0f9(0x17b)],_0x2911ed[_0x18c0f9(0x108)],[_0x18c0f9(0x158)])});const _0x6e8a1e=_0x8102c2[_0x18c0f9(0x12d)]??_0x8102c2[_0x18c0f9(0x171)];if(_0x6e8a1e&&_0x6e8a1e[_0x18c0f9(0x141)](_0x209599=>_0x209599[_0x18c0f9(0x17e)]===!![])[_0x18c0f9(0x135)]>0x1){const _0x1c4266=_0x8102c2[_0x18c0f9(0x12d)]?_0x18c0f9(0x12d):_0x18c0f9(0x171);_0x5e7597['push']({'level':'error','path':_0x1c4266,'code':'DUPLICATE_LATEST','message':_0x18c0f9(0x19a)+(_0x1c4266===_0x18c0f9(0x12d)?_0x18c0f9(0x143):'version')+_0x18c0f9(0x17c),'location':getLocationFromPath(_0x2911ed[_0x18c0f9(0x17b)],_0x2911ed['source'],[_0x1c4266])});}if(_0x8102c2[_0x18c0f9(0x12d)]&&_0x8102c2[_0x18c0f9(0x12d)][_0x18c0f9(0x135)]>0x0)for(let _0x429dac=0x0;_0x429dac<_0x8102c2[_0x18c0f9(0x12d)][_0x18c0f9(0x135)];_0x429dac++){const _0x459b30=_0x8102c2[_0x18c0f9(0x12d)][_0x429dac];if(_0x8102c2[_0x18c0f9(0x12d)]['length']>0x1&&_0x459b30[_0x18c0f9(0x102)]==='launched')continue;const _0x1f006b=_0x459b30['stages']||[],_0x4f5621=_0x18c0f9(0x114)+_0x429dac+'].',_0x5702d1=!!_0x459b30['goal'],_0xf211b0=_0x5702d1?{..._0x8102c2,'goal':_0x459b30[_0x18c0f9(0x158)]}:_0x8102c2;validateStagesForVersion(_0x1f006b,_0xf211b0,_0x3585b2,_0x4f5621,_0x5e7597,_0x3307a9,{'goalIsInherited':!_0x5702d1});}else{if(_0x8102c2[_0x18c0f9(0x171)]&&_0x8102c2['versions'][_0x18c0f9(0x135)]>0x0)for(let _0x2ce532=0x0;_0x2ce532<_0x8102c2[_0x18c0f9(0x171)]['length'];_0x2ce532++){const _0x41f3bb=_0x8102c2['versions'][_0x2ce532];if(_0x8102c2[_0x18c0f9(0x171)][_0x18c0f9(0x135)]>0x1&&_0x41f3bb['state']===_0x18c0f9(0x166))continue;const _0x43f2d6=_0x41f3bb[_0x18c0f9(0xfa)]||[],_0x3aa38f='versions['+_0x2ce532+'].';validateStagesForVersion(_0x43f2d6,_0x8102c2,_0x3585b2,_0x3aa38f,_0x5e7597,_0x3307a9);}else{const _0x50293c=_0x8102c2[_0x18c0f9(0xfa)]||[];validateStagesForVersion(_0x50293c,_0x8102c2,_0x3585b2,'',_0x5e7597,_0x3307a9);}}_0x8102c2[_0x18c0f9(0x12d)]&&_0x8102c2['journeys'][_0x18c0f9(0x135)]>0x1&&(deduplicateAcrossVersions(_0x5e7597),deduplicateAcrossVersions(_0x3307a9));for(const _0x157ce1 of _0x2bca13){!_0x159b8e['has'](_0x157ce1)&&!_0x157ce1[_0x18c0f9(0x107)](_0x18c0f9(0x1ad))&&_0x3307a9['push']({'level':_0x18c0f9(0x163),'path':_0x18c0f9(0x16d)+_0x157ce1,'code':_0x18c0f9(0x188),'message':_0x18c0f9(0x16c)+_0x157ce1+'\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','location':getLocationFromPath(_0x2911ed['document'],_0x2911ed['source'],['segments',_0x157ce1])});}return{'valid':_0x5e7597[_0x18c0f9(0x135)]===0x0,'errors':_0x5e7597,'warnings':_0x3307a9};}