@treasuredata/tdx 2026.3.15 → 2026.3.17

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 (202) hide show
  1. package/README.md +9 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/commands/activations.js +1 -1
  7. package/dist/commands/agent-command.js +1 -1
  8. package/dist/commands/agent-test-command.js +1 -1
  9. package/dist/commands/api-command.js +1 -1
  10. package/dist/commands/auth-command.js +1 -1
  11. package/dist/commands/auth-login-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-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/query/index.js +1 -1
  127. package/dist/sdk/query/sql-parser.js +1 -1
  128. package/dist/sdk/realtime.js +1 -1
  129. package/dist/sdk/schedule.js +1 -1
  130. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  131. package/dist/sdk/segment/fields-display.js +1 -1
  132. package/dist/sdk/segment/file-discovery.js +1 -1
  133. package/dist/sdk/segment/journey-utils.js +1 -1
  134. package/dist/sdk/segment/journey-validator.js +1 -1
  135. package/dist/sdk/segment/journey-yaml.js +1 -1
  136. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  137. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  138. package/dist/sdk/segment/pull-workflow.js +1 -1
  139. package/dist/sdk/segment/push-recovery.js +1 -1
  140. package/dist/sdk/segment/push-workflow.js +1 -1
  141. package/dist/sdk/segment/resolution-context.js +1 -1
  142. package/dist/sdk/segment/segment-path-parser.js +1 -1
  143. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  144. package/dist/sdk/segment/segment-validator.js +1 -1
  145. package/dist/sdk/segment/target-resolution.js +1 -1
  146. package/dist/sdk/segment/tdx-config.js +1 -1
  147. package/dist/sdk/segment/types/activation-schema.js +1 -1
  148. package/dist/sdk/segment/types/journey-def.js +1 -1
  149. package/dist/sdk/segment/types/journey-schema.js +1 -1
  150. package/dist/sdk/segment/types/segment-def.js +1 -1
  151. package/dist/sdk/segment/types/segment-schema.js +1 -1
  152. package/dist/sdk/segment/validate-files.js +1 -1
  153. package/dist/sdk/segment/yaml-validator.js +1 -1
  154. package/dist/sdk/segment.js +1 -1
  155. package/dist/sdk/types/index.js +1 -1
  156. package/dist/sdk/types/progress.js +1 -1
  157. package/dist/sdk/user.js +1 -1
  158. package/dist/sdk/util/format-detector.js +1 -1
  159. package/dist/sdk/util/formatters.js +1 -1
  160. package/dist/sdk/util/index.js +1 -1
  161. package/dist/sdk/util/paginate.js +1 -1
  162. package/dist/sdk/util/tree-formatter.js +1 -1
  163. package/dist/sdk/workflow/archive-validation.js +1 -1
  164. package/dist/sdk/workflow/clone-workflow.js +1 -1
  165. package/dist/sdk/workflow/index.js +1 -1
  166. package/dist/sdk/workflow/pull-workflow.js +1 -1
  167. package/dist/sdk/workflow/push-workflow.js +1 -1
  168. package/dist/sdk/workflow/tdx-config.js +1 -1
  169. package/dist/sdk/workflow/workflow-utils.js +1 -1
  170. package/dist/test-utils/command-runner.js +1 -1
  171. package/dist/test-utils/factories.js +1 -1
  172. package/dist/test-utils/fixtures.js +1 -1
  173. package/dist/test-utils/http-mock.js +1 -1
  174. package/dist/test-utils/index.js +1 -1
  175. package/dist/utils/async.js +1 -1
  176. package/dist/utils/colors.js +1 -1
  177. package/dist/utils/diff.js +1 -1
  178. package/dist/utils/file-permissions.js +1 -1
  179. package/dist/utils/file-reader.js +1 -1
  180. package/dist/utils/github-releases.js +1 -1
  181. package/dist/utils/global-cache.js +1 -1
  182. package/dist/utils/json-loader.js +1 -1
  183. package/dist/utils/local-cache.js +1 -1
  184. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  185. package/dist/utils/logger/formatters/index.js +1 -1
  186. package/dist/utils/logger/handlers/console-handler.js +1 -1
  187. package/dist/utils/logger/handlers/file-handler.js +1 -1
  188. package/dist/utils/logger/handlers/index.js +1 -1
  189. package/dist/utils/logger/handlers/null-handler.js +1 -1
  190. package/dist/utils/logger/index.js +1 -1
  191. package/dist/utils/logger/logger.js +1 -1
  192. package/dist/utils/logger/types.js +1 -1
  193. package/dist/utils/option-validation.js +1 -1
  194. package/dist/utils/process.js +1 -1
  195. package/dist/utils/prompt.js +1 -1
  196. package/dist/utils/spinner.js +1 -1
  197. package/dist/utils/sse-parser.js +1 -1
  198. package/dist/utils/string-utils.js +1 -1
  199. package/dist/utils/table-ref-parser.js +1 -1
  200. package/dist/utils/tdx-logger.js +1 -1
  201. package/dist/utils/version-check.js +1 -1
  202. package/package.json +3 -3
@@ -1 +1 @@
1
- (function(_0x224936,_0x463071){const _0x307796=a144_0x1dec,_0x226d92=_0x224936();while(!![]){try{const _0x155d79=-parseInt(_0x307796(0x1b9))/0x1*(-parseInt(_0x307796(0x188))/0x2)+-parseInt(_0x307796(0x1bd))/0x3*(parseInt(_0x307796(0x1a8))/0x4)+parseInt(_0x307796(0x187))/0x5+parseInt(_0x307796(0x1a5))/0x6+parseInt(_0x307796(0x1a9))/0x7+parseInt(_0x307796(0x197))/0x8+-parseInt(_0x307796(0x19f))/0x9;if(_0x155d79===_0x463071)break;else _0x226d92['push'](_0x226d92['shift']());}catch(_0x1ee2bc){_0x226d92['push'](_0x226d92['shift']());}}}(a144_0x3111,0xbd21c));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x5ec286,_0x27188a={},_0x9fe75d={}){const _0x25e6ab=a144_0x1dec;if(_0x9fe75d[_0x25e6ab(0x199)])return runSemanticChecks(_0x5ec286,_0x27188a);const _0x31ac47=SegmentDefSchema[_0x25e6ab(0x18b)](_0x5ec286);if(_0x31ac47['success'])return runSemanticChecks(_0x31ac47[_0x25e6ab(0x19e)],_0x27188a);return zodErrorsToValidationResult(_0x31ac47['error'],_0x27188a);}export function validateRuleDef(_0x558f0a,_0x3a97cf,_0xe63a08){const _0xabcad8=a144_0x1dec;if(!_0x558f0a)return[];const _0x51ef57=RuleDefSchema[_0xabcad8(0x18b)](_0x558f0a);if(_0x51ef57['success'])return checkRule(_0x51ef57[_0xabcad8(0x19e)],_0x3a97cf,_0xe63a08);const _0x445c37=flattenZodIssues(_0x51ef57[_0xabcad8(0x1a1)][_0xabcad8(0x184)]);return _0x445c37[_0xabcad8(0x18a)](_0x41ed3d=>{const _0x5af81a=_0xabcad8,_0x146570=formatZodPath(_0x41ed3d[_0x5af81a(0x1b8)]),_0x229b41=_0x146570?_0x3a97cf+'.'+_0x146570:_0x3a97cf,_0x1b3285=mapZodIssueToCode(_0x41ed3d,_0x146570),_0x22c07d=getLocationFromPath(_0xe63a08['document'],_0xe63a08[_0x5af81a(0x1af)],pathToArray(_0x229b41));return{'level':'error','path':_0x229b41,'code':_0x1b3285,'message':_0x41ed3d[_0x5af81a(0x1b7)],..._0x22c07d&&{'location':_0x22c07d}};});}function zodErrorsToValidationResult(_0x341a8a,_0x106c32){const _0x9b19e=a144_0x1dec,_0x439dd8=flattenZodIssues(_0x341a8a['issues']),_0x398168=_0x439dd8[_0x9b19e(0x18a)](_0x13208d=>{const _0x3cf385=_0x9b19e,_0x66641e=formatZodPath(_0x13208d[_0x3cf385(0x1b8)]),_0x4e04bd=mapZodIssueToCode(_0x13208d,_0x66641e),_0x28d212=getLocationFromPath(_0x106c32[_0x3cf385(0x1c1)],_0x106c32['source'],_0x13208d[_0x3cf385(0x1b8)][_0x3cf385(0x18a)](_0x4f289f=>typeof _0x4f289f===_0x3cf385(0x189)?String(_0x4f289f):_0x4f289f));return{'level':_0x3cf385(0x1a1),'path':_0x66641e,'code':_0x4e04bd,'message':_0x13208d[_0x3cf385(0x1b7)],..._0x28d212&&{'location':_0x28d212}};});return{'valid':![],'errors':_0x398168,'warnings':[]};}function mapZodIssueToCode(_0x2589f5,_0x9a19d5){const _0x1dac43=a144_0x1dec,_0x28e3c3=_0x2589f5['code']===_0x1dac43(0x194)?_0x2589f5['params']:undefined;if(_0x9a19d5===_0x1dac43(0x1b2))return _0x1dac43(0x1a4);if(_0x9a19d5===_0x1dac43(0x1a0)||_0x9a19d5[_0x1dac43(0x1c3)]('.type')){if(_0x2589f5[_0x1dac43(0x1a6)]===_0x1dac43(0x1b1)){if(_0x9a19d5===_0x1dac43(0x1a0)||_0x9a19d5['match'](/\.conditions\[\d+\]\.type$/))return _0x1dac43(0x183);}}if(_0x9a19d5[_0x1dac43(0x1c3)](_0x1dac43(0x1b3)))return _0x1dac43(0x1a7);if(_0x9a19d5[_0x1dac43(0x1c3)](_0x1dac43(0x1ae)))return _0x1dac43(0x1bf);if(_0x28e3c3?.[_0x1dac43(0x198)]===_0x1dac43(0x18d))return _0x1dac43(0x18d);if(_0x28e3c3?.[_0x1dac43(0x198)]===_0x1dac43(0x17e))return _0x1dac43(0x17e);if(_0x9a19d5[_0x1dac43(0x1c3)](_0x1dac43(0x1c0))||_0x9a19d5==='conditions')return _0x1dac43(0x1b4);if(_0x9a19d5['includes'](_0x1dac43(0x1ad)))return _0x1dac43(0x185);if(_0x9a19d5[_0x1dac43(0x1c3)](_0x1dac43(0x18e)))return'MISSING_SEGMENT_REFERENCE';return _0x1dac43(0x1b6);}function runSemanticChecks(_0x1ef0a5,_0xb5c93e){const _0x6708ec=a144_0x1dec,_0x19b3cd=[];_0x1ef0a5[_0x6708ec(0x180)]&&_0x19b3cd[_0x6708ec(0x18c)](...checkRule(_0x1ef0a5[_0x6708ec(0x180)],_0x6708ec(0x180),_0xb5c93e));const _0x4e85f6=_0x19b3cd[_0x6708ec(0x1aa)](_0x1dcec1=>_0x1dcec1[_0x6708ec(0x1ba)]===_0x6708ec(0x1a1)),_0xe0ef=_0x19b3cd['filter'](_0x339564=>_0x339564['level']===_0x6708ec(0x1bc));return{'valid':_0x4e85f6[_0x6708ec(0x1be)]===0x0,'errors':_0x4e85f6,'warnings':_0xe0ef};}function checkRule(_0x138050,_0x117147,_0x10d5f2){const _0x6961d9=a144_0x1dec,_0x389a28=[];if(_0x138050[_0x6961d9(0x1b0)][_0x6961d9(0x1be)]===0x0)return _0x389a28['push']({'level':_0x6961d9(0x1a1),'path':_0x117147+'.conditions','code':_0x6961d9(0x186),'message':_0x6961d9(0x191),'location':getLocationFromPath(_0x10d5f2['document'],_0x10d5f2['source'],pathToArray(_0x117147+'.conditions'))}),_0x389a28;return _0x389a28[_0x6961d9(0x18c)](...checkConditions(_0x138050['conditions'],_0x117147,_0x10d5f2)),_0x389a28;}function checkConditions(_0x2e47f2,_0x105bbc,_0x226db8){const _0x3bc076=a144_0x1dec,_0xa68243=[];for(let _0x411bd4=0x0;_0x411bd4<_0x2e47f2[_0x3bc076(0x1be)];_0x411bd4++){const _0x1abd91=_0x2e47f2[_0x411bd4],_0x5992e2=_0x105bbc+_0x3bc076(0x1ac)+_0x411bd4+']';_0xa68243[_0x3bc076(0x18c)](...checkCondition(_0x1abd91,_0x5992e2,_0x226db8));}return _0xa68243;}function a144_0x3111(){const _0x40a9fb=['rule.type','error','attribute','BEHAVIOR_SOURCE_MISSING_FILTER','MISSING_NAME','7701360NSTaMb','code','INVALID_OPERATOR_TYPE','972724hQhDUe','8580600jEcfkd','filter','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','.conditions[','arrayMatching','.operator.value','source','conditions','invalid_value','name','.operator.type','MISSING_CONDITIONS','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','SEGMENT_SCHEMA_ERROR','message','path','103LlyuzH','level','Attribute\x20\x27','warning','3HZfUYy','length','MISSING_OPERATOR_VALUE','.conditions','document','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','endsWith','aggregation','MISSING_TIME_UNIT','.filter','rule','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','Value','INVALID_RULE_TYPE','issues','INVALID_ARRAY_MATCHING','EMPTY_CONDITIONS','361665VvWJjs','15882nbqqLy','symbol','map','safeParse','push','MISSING_BETWEEN_BOUNDS','.segment','\x27\x20with\x20attribute\x20\x27','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','custom','type','NESTED_CONDITION_GROUP','12367672UMuywB','validationCode','skipSchema','And','.attribute','.source','Attribute\x20name\x20cannot\x20be\x20empty','data','35349390gnOvXg'];a144_0x3111=function(){return _0x40a9fb;};return a144_0x3111();}function a144_0x1dec(_0x3bc30b,_0x108f92){_0x3bc30b=_0x3bc30b-0x17e;const _0x3111b3=a144_0x3111();let _0x1decb2=_0x3111b3[_0x3bc30b];return _0x1decb2;}function checkCondition(_0x5366c1,_0x68c850,_0x226844){const _0x56ddc0=a144_0x1dec,_0x2c59c3=[];if(_0x5366c1[_0x56ddc0(0x195)]===_0x56ddc0(0x19a)||_0x5366c1[_0x56ddc0(0x195)]==='Or')return _0x5366c1[_0x56ddc0(0x1b0)][_0x56ddc0(0x1be)]===0x0?_0x2c59c3[_0x56ddc0(0x18c)]({'level':_0x56ddc0(0x1a1),'path':_0x68c850+_0x56ddc0(0x1c0),'code':_0x56ddc0(0x186),'message':_0x5366c1[_0x56ddc0(0x195)]+_0x56ddc0(0x181),'location':getLocationFromPath(_0x226844[_0x56ddc0(0x1c1)],_0x226844[_0x56ddc0(0x1af)],pathToArray(_0x68c850+_0x56ddc0(0x1c0)))}):_0x2c59c3['push']({'level':_0x56ddc0(0x1a1),'path':_0x68c850,'code':_0x56ddc0(0x196),'message':_0x5366c1[_0x56ddc0(0x195)]+_0x56ddc0(0x190)+_0x56ddc0(0x1c2)+'use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x226844[_0x56ddc0(0x1c1)],_0x226844[_0x56ddc0(0x1af)],pathToArray(_0x68c850))}),_0x2c59c3;if(_0x5366c1[_0x56ddc0(0x195)]===_0x56ddc0(0x182)||_0x5366c1['type']==='Behavior'){const _0x5b03a7=_0x5366c1,_0x44ee5a=_0x5b03a7['source'],_0x5cd1f6=_0x5b03a7[_0x56ddc0(0x1c4)],_0x5a2ed1=_0x44ee5a||_0x5cd1f6;(!_0x5b03a7[_0x56ddc0(0x1a2)]||_0x5b03a7[_0x56ddc0(0x1a2)]==='')&&(!_0x5a2ed1&&_0x2c59c3[_0x56ddc0(0x18c)]({'level':_0x56ddc0(0x1a1),'path':_0x68c850+_0x56ddc0(0x19b),'code':'EMPTY_ATTRIBUTE','message':_0x56ddc0(0x19d),'location':getLocationFromPath(_0x226844[_0x56ddc0(0x1c1)],_0x226844[_0x56ddc0(0x1af)],pathToArray(_0x68c850+_0x56ddc0(0x19b)))}));_0x5b03a7[_0x56ddc0(0x1aa)]&&_0x2c59c3['push'](...checkRule(_0x5b03a7[_0x56ddc0(0x1aa)],_0x68c850+_0x56ddc0(0x17f),_0x226844));if(_0x5b03a7['source']){const _0x35748a=_0x5b03a7[_0x56ddc0(0x1a2)]&&_0x5b03a7[_0x56ddc0(0x1a2)]!=='';_0x35748a&&!_0x5b03a7['filter']&&_0x2c59c3[_0x56ddc0(0x18c)]({'level':'error','path':_0x68c850+_0x56ddc0(0x19c),'code':_0x56ddc0(0x1a3),'message':'Behavior\x20source\x20\x27'+_0x5b03a7[_0x56ddc0(0x1af)]+_0x56ddc0(0x18f)+_0x5b03a7['attribute']+'\x27\x20'+_0x56ddc0(0x1ab)+_0x56ddc0(0x193)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x226844['document'],_0x226844[_0x56ddc0(0x1af)],pathToArray(_0x68c850+'.source'))}),_0x35748a&&_0x5b03a7[_0x56ddc0(0x1aa)]&&_0x2c59c3[_0x56ddc0(0x18c)]({'level':_0x56ddc0(0x1bc),'path':_0x68c850+_0x56ddc0(0x19b),'code':_0x56ddc0(0x1b5),'message':_0x56ddc0(0x1bb)+_0x5b03a7[_0x56ddc0(0x1a2)]+_0x56ddc0(0x192)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x226844['document'],_0x226844['source'],pathToArray(_0x68c850+'.attribute'))});}}return _0x2c59c3;}
1
+ (function(_0x4c9df3,_0x2a60de){const _0x155ec9=a144_0x3850,_0x17597f=_0x4c9df3();while(!![]){try{const _0x35bb20=-parseInt(_0x155ec9(0x187))/0x1+-parseInt(_0x155ec9(0x15c))/0x2*(-parseInt(_0x155ec9(0x16b))/0x3)+parseInt(_0x155ec9(0x17e))/0x4*(-parseInt(_0x155ec9(0x18f))/0x5)+parseInt(_0x155ec9(0x14f))/0x6*(parseInt(_0x155ec9(0x162))/0x7)+parseInt(_0x155ec9(0x159))/0x8*(parseInt(_0x155ec9(0x183))/0x9)+-parseInt(_0x155ec9(0x172))/0xa+parseInt(_0x155ec9(0x186))/0xb*(parseInt(_0x155ec9(0x16e))/0xc);if(_0x35bb20===_0x2a60de)break;else _0x17597f['push'](_0x17597f['shift']());}catch(_0x2bf3e2){_0x17597f['push'](_0x17597f['shift']());}}}(a144_0x58ca,0x4f9b7));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x14df0d,_0x35ebcd={},_0xde223b={}){const _0x56a6b6=a144_0x3850;if(_0xde223b[_0x56a6b6(0x14c)])return runSemanticChecks(_0x14df0d,_0x35ebcd);const _0x426108=SegmentDefSchema[_0x56a6b6(0x188)](_0x14df0d);if(_0x426108[_0x56a6b6(0x180)])return runSemanticChecks(_0x426108[_0x56a6b6(0x16d)],_0x35ebcd);return zodErrorsToValidationResult(_0x426108['error'],_0x35ebcd);}export function validateRuleDef(_0x3e9bff,_0x43fcc4,_0x535272){const _0x59b91e=a144_0x3850;if(!_0x3e9bff)return[];const _0x4e185a=RuleDefSchema[_0x59b91e(0x188)](_0x3e9bff);if(_0x4e185a[_0x59b91e(0x180)])return checkRule(_0x4e185a[_0x59b91e(0x16d)],_0x43fcc4,_0x535272);const _0x51d7d5=flattenZodIssues(_0x4e185a[_0x59b91e(0x157)][_0x59b91e(0x156)]);return _0x51d7d5['map'](_0x52f1fe=>{const _0x3b0228=_0x59b91e,_0x2b5011=formatZodPath(_0x52f1fe[_0x3b0228(0x141)]),_0x1adc25=_0x2b5011?_0x43fcc4+'.'+_0x2b5011:_0x43fcc4,_0x596101=mapZodIssueToCode(_0x52f1fe,_0x2b5011),_0x135467=getLocationFromPath(_0x535272[_0x3b0228(0x13e)],_0x535272[_0x3b0228(0x18c)],pathToArray(_0x1adc25));return{'level':_0x3b0228(0x157),'path':_0x1adc25,'code':_0x596101,'message':_0x52f1fe[_0x3b0228(0x152)],..._0x135467&&{'location':_0x135467}};});}function a144_0x58ca(){const _0x585aaf=['SEGMENT_SCHEMA_ERROR','.operator.type','path','Value','Behavior','length','invalid_value','code','validationCode','match','BEHAVIOR_SOURCE_MISSING_FILTER','.segment','INVALID_RULE_TYPE','skipSchema','conditions','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','6vXCFfx','use\x20\x27In\x27\x20operator\x20instead:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','message','arrayMatching','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','issues','error','name','808MTkCTg','push','.source','2ZbdcQD','rule','INVALID_ARRAY_MATCHING','EMPTY_ATTRIBUTE','MISSING_BETWEEN_BOUNDS','MISSING_SEGMENT_REFERENCE','2212105UkdOWf','INVALID_OPERATOR_TYPE','level','EMPTY_CONDITIONS','.operator.value','.conditions','includes','.conditions[','.type','1291290DmGHoW','Attribute\x20name\x20cannot\x20be\x20empty','data','216fRexde','warning','rule.type','type','6015820BSuRmz','aggregation','\x27\x20with\x20attribute\x20\x27','groups,\x20causing\x20local/server\x20discrepancy.\x20For\x20same-attribute\x20Or\x20conditions,\x20','.attribute','\x20condition\x20group\x20not\x20supported.\x20Console\x20UI\x20ignores\x20nested\x20condition\x20','endsWith','map','MISSING_TIME_UNIT','params','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','attribute','4dXPKni','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','success','symbol','Behavior\x20source\x20\x27','46791VQubBp','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','MISSING_NAME','42647ewASLB','390158qdFOGj','safeParse','MISSING_CONDITIONS','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','MISSING_OPERATOR_VALUE','source','And','filter','117595psqOBO','document'];a144_0x58ca=function(){return _0x585aaf;};return a144_0x58ca();}function zodErrorsToValidationResult(_0x50cb3e,_0x419f03){const _0x3abb42=a144_0x3850,_0x4f1198=flattenZodIssues(_0x50cb3e[_0x3abb42(0x156)]),_0x2b0779=_0x4f1198[_0x3abb42(0x179)](_0xea337=>{const _0x5e5997=_0x3abb42,_0x1640d8=formatZodPath(_0xea337['path']),_0xfb0257=mapZodIssueToCode(_0xea337,_0x1640d8),_0x4980c8=getLocationFromPath(_0x419f03[_0x5e5997(0x13e)],_0x419f03[_0x5e5997(0x18c)],_0xea337[_0x5e5997(0x141)][_0x5e5997(0x179)](_0x4fc03f=>typeof _0x4fc03f===_0x5e5997(0x181)?String(_0x4fc03f):_0x4fc03f));return{'level':'error','path':_0x1640d8,'code':_0xfb0257,'message':_0xea337['message'],..._0x4980c8&&{'location':_0x4980c8}};});return{'valid':![],'errors':_0x2b0779,'warnings':[]};}function a144_0x3850(_0x29c7e1,_0x1c1374){_0x29c7e1=_0x29c7e1-0x13e;const _0x58cae5=a144_0x58ca();let _0x3850b3=_0x58cae5[_0x29c7e1];return _0x3850b3;}function mapZodIssueToCode(_0x746daf,_0x53bd3e){const _0x3a8c5b=a144_0x3850,_0xc138c4=_0x746daf[_0x3a8c5b(0x146)]==='custom'?_0x746daf[_0x3a8c5b(0x17b)]:undefined;if(_0x53bd3e===_0x3a8c5b(0x158))return _0x3a8c5b(0x185);if(_0x53bd3e===_0x3a8c5b(0x170)||_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x16a))){if(_0x746daf[_0x3a8c5b(0x146)]===_0x3a8c5b(0x145)){if(_0x53bd3e==='rule.type'||_0x53bd3e[_0x3a8c5b(0x148)](/\.conditions\[\d+\]\.type$/))return _0x3a8c5b(0x14b);}}if(_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x140)))return _0x3a8c5b(0x163);if(_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x166)))return _0x3a8c5b(0x18b);if(_0xc138c4?.[_0x3a8c5b(0x147)]===_0x3a8c5b(0x160))return'MISSING_BETWEEN_BOUNDS';if(_0xc138c4?.[_0x3a8c5b(0x147)]==='MISSING_TIME_UNIT')return _0x3a8c5b(0x17a);if(_0x53bd3e['endsWith'](_0x3a8c5b(0x167))||_0x53bd3e===_0x3a8c5b(0x14d))return _0x3a8c5b(0x189);if(_0x53bd3e[_0x3a8c5b(0x168)](_0x3a8c5b(0x153)))return _0x3a8c5b(0x15e);if(_0x53bd3e[_0x3a8c5b(0x178)](_0x3a8c5b(0x14a)))return _0x3a8c5b(0x161);return _0x3a8c5b(0x13f);}function runSemanticChecks(_0xfd4ff,_0xe2468b){const _0x5610ab=a144_0x3850,_0x5aa829=[];_0xfd4ff[_0x5610ab(0x15d)]&&_0x5aa829[_0x5610ab(0x15a)](...checkRule(_0xfd4ff[_0x5610ab(0x15d)],_0x5610ab(0x15d),_0xe2468b));const _0xde6904=_0x5aa829[_0x5610ab(0x18e)](_0x308012=>_0x308012[_0x5610ab(0x164)]===_0x5610ab(0x157)),_0x190bda=_0x5aa829[_0x5610ab(0x18e)](_0x390f99=>_0x390f99[_0x5610ab(0x164)]===_0x5610ab(0x16f));return{'valid':_0xde6904['length']===0x0,'errors':_0xde6904,'warnings':_0x190bda};}function checkRule(_0x2dc4c6,_0x190a97,_0x2cf18e){const _0x1be05c=a144_0x3850,_0x196662=[];if(_0x2dc4c6[_0x1be05c(0x14d)][_0x1be05c(0x144)]===0x0)return _0x196662[_0x1be05c(0x15a)]({'level':'error','path':_0x190a97+_0x1be05c(0x167),'code':_0x1be05c(0x165),'message':_0x1be05c(0x184),'location':getLocationFromPath(_0x2cf18e['document'],_0x2cf18e[_0x1be05c(0x18c)],pathToArray(_0x190a97+_0x1be05c(0x167)))}),_0x196662;return _0x196662[_0x1be05c(0x15a)](...checkConditions(_0x2dc4c6[_0x1be05c(0x14d)],_0x190a97,_0x2cf18e)),_0x196662;}function checkConditions(_0x35a78e,_0x4e928,_0x3f509a){const _0x18e173=a144_0x3850,_0x2c3811=[];for(let _0x50d0a7=0x0;_0x50d0a7<_0x35a78e['length'];_0x50d0a7++){const _0xd0c526=_0x35a78e[_0x50d0a7],_0x2d71d7=_0x4e928+_0x18e173(0x169)+_0x50d0a7+']';_0x2c3811[_0x18e173(0x15a)](...checkCondition(_0xd0c526,_0x2d71d7,_0x3f509a));}return _0x2c3811;}function checkCondition(_0x34e27a,_0xfa9937,_0x18a103){const _0x313d5e=a144_0x3850,_0x9e69fd=[];if(_0x34e27a[_0x313d5e(0x171)]===_0x313d5e(0x18d)||_0x34e27a[_0x313d5e(0x171)]==='Or')return _0x34e27a['conditions'][_0x313d5e(0x144)]===0x0?_0x9e69fd['push']({'level':_0x313d5e(0x157),'path':_0xfa9937+_0x313d5e(0x167),'code':_0x313d5e(0x165),'message':_0x34e27a[_0x313d5e(0x171)]+_0x313d5e(0x14e),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103['source'],pathToArray(_0xfa9937+_0x313d5e(0x167)))}):_0x9e69fd[_0x313d5e(0x15a)]({'level':'error','path':_0xfa9937,'code':'NESTED_CONDITION_GROUP','message':_0x34e27a['type']+_0x313d5e(0x177)+_0x313d5e(0x175)+_0x313d5e(0x150),'location':getLocationFromPath(_0x18a103['document'],_0x18a103[_0x313d5e(0x18c)],pathToArray(_0xfa9937))}),_0x9e69fd;if(_0x34e27a[_0x313d5e(0x171)]===_0x313d5e(0x142)||_0x34e27a[_0x313d5e(0x171)]===_0x313d5e(0x143)){const _0x2ce2eb=_0x34e27a,_0x2b4ede=_0x2ce2eb[_0x313d5e(0x18c)],_0x30be2b=_0x2ce2eb[_0x313d5e(0x173)],_0x27b5ef=_0x2b4ede||_0x30be2b;(!_0x2ce2eb[_0x313d5e(0x17d)]||_0x2ce2eb[_0x313d5e(0x17d)]==='')&&(!_0x27b5ef&&_0x9e69fd['push']({'level':'error','path':_0xfa9937+_0x313d5e(0x176),'code':_0x313d5e(0x15f),'message':_0x313d5e(0x16c),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103['source'],pathToArray(_0xfa9937+_0x313d5e(0x176)))}));_0x2ce2eb[_0x313d5e(0x18e)]&&_0x9e69fd[_0x313d5e(0x15a)](...checkRule(_0x2ce2eb[_0x313d5e(0x18e)],_0xfa9937+'.filter',_0x18a103));if(_0x2ce2eb[_0x313d5e(0x18c)]){const _0x212daa=_0x2ce2eb[_0x313d5e(0x17d)]&&_0x2ce2eb[_0x313d5e(0x17d)]!=='';_0x212daa&&!_0x2ce2eb[_0x313d5e(0x18e)]&&_0x9e69fd['push']({'level':_0x313d5e(0x157),'path':_0xfa9937+_0x313d5e(0x15b),'code':_0x313d5e(0x149),'message':_0x313d5e(0x182)+_0x2ce2eb['source']+_0x313d5e(0x174)+_0x2ce2eb[_0x313d5e(0x17d)]+'\x27\x20'+_0x313d5e(0x17c)+_0x313d5e(0x154)+_0x313d5e(0x17f),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103['source'],pathToArray(_0xfa9937+_0x313d5e(0x15b)))}),_0x212daa&&_0x2ce2eb['filter']&&_0x9e69fd[_0x313d5e(0x15a)]({'level':'warning','path':_0xfa9937+_0x313d5e(0x176),'code':_0x313d5e(0x155),'message':'Attribute\x20\x27'+_0x2ce2eb['attribute']+_0x313d5e(0x151)+_0x313d5e(0x18a),'location':getLocationFromPath(_0x18a103[_0x313d5e(0x13e)],_0x18a103[_0x313d5e(0x18c)],pathToArray(_0xfa9937+_0x313d5e(0x176)))});}}return _0x9e69fd;}
@@ -1 +1 @@
1
- function a145_0x442d(){const _0x44de67=['stat','parent_segment','join','parse','File\x20not\x20found','scopedFolderPath','includes','trim','20nnKNGe','file','configDir','9819kjARPW','root','startsWith','No\x20tdx.json\x20found\x20for\x20file:\x20','845670GiPxGF','20ngKKye','tdx.json','folderPath','resolve','exists','type','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','parentSegment','resourceType','replace','2954237GGlKig','46745SlgKSZ','707200tahyCH','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','parent_name','dirname','isScoped','No\x20tdx.json\x20found','match','error','message','relative','segment','771939bubMUo','journey','no_config','directory','context','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','string','28LUeCeT','156092mtwkQX','readFile','invalid_yaml','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','File\x20not\x20found:\x20','extname','segmentName','isFile','Parent\x20segment\x20not\x20specified','basename','file_not_found','7OWMmMC'];a145_0x442d=function(){return _0x44de67;};return a145_0x442d();}(function(_0x54842d,_0xc0eebb){const _0x2b637a=a145_0x1216,_0x2b7a88=_0x54842d();while(!![]){try{const _0x398ac5=parseInt(_0x2b637a(0x189))/0x1+-parseInt(_0x2b637a(0x161))/0x2*(-parseInt(_0x2b637a(0x179))/0x3)+-parseInt(_0x2b637a(0x162))/0x4*(-parseInt(_0x2b637a(0x176))/0x5)+-parseInt(_0x2b637a(0x17d))/0x6*(parseInt(_0x2b637a(0x16d))/0x7)+-parseInt(_0x2b637a(0x18a))/0x8+-parseInt(_0x2b637a(0x195))/0x9*(parseInt(_0x2b637a(0x17e))/0xa)+parseInt(_0x2b637a(0x188))/0xb;if(_0x398ac5===_0xc0eebb)break;else _0x2b7a88['push'](_0x2b7a88['shift']());}catch(_0x4867b3){_0x2b7a88['push'](_0x2b7a88['shift']());}}}(a145_0x442d,0x1c673));import a145_0x4e7455 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a145_0x1216(_0x401365,_0x33935b){_0x401365=_0x401365-0x161;const _0x442d36=a145_0x442d();let _0x1216be=_0x442d36[_0x401365];return _0x1216be;}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x8a0f90){const _0x3ed09b=a145_0x1216;return _0x8a0f90['type']!==_0x3ed09b(0x191);}export function isScopedResolution(_0xd8e40f){const _0x266d61=a145_0x1216;return _0xd8e40f[_0x266d61(0x183)]===_0x266d61(0x198)||_0xd8e40f[_0x266d61(0x183)]===_0x266d61(0x177)||_0xd8e40f[_0x266d61(0x183)]===_0x266d61(0x199);}export function getScopedDetails(_0x41b6d0){const _0x56b14d=a145_0x1216;if(isScopedResolution(_0x41b6d0))return{'isScoped':_0x41b6d0[_0x56b14d(0x18e)],'scopedFolderPath':_0x41b6d0[_0x56b14d(0x173)]};return undefined;}async function findTdxConfigAsync(_0x17897f,_0x363431){const _0x1427f8=a145_0x1216;let _0x394194=a145_0x4e7455[_0x1427f8(0x181)](_0x17897f);const _0x32d781=a145_0x4e7455[_0x1427f8(0x171)](_0x394194)[_0x1427f8(0x17a)];while(_0x394194!==_0x32d781){const _0x1efa77=a145_0x4e7455[_0x1427f8(0x170)](_0x394194,_0x1427f8(0x17f));if(await _0x363431[_0x1427f8(0x182)](_0x1efa77))try{const _0x2a9089=await _0x363431[_0x1427f8(0x163)](_0x1efa77),_0x5c6ac2=JSON[_0x1427f8(0x171)](_0x2a9089);if(_0x5c6ac2['parent_segment']&&typeof _0x5c6ac2['parent_segment']===_0x1427f8(0x19b))return{'configPath':_0x1efa77,'configDir':_0x394194,'parentSegment':_0x5c6ac2[_0x1427f8(0x16f)]};}catch{}_0x394194=a145_0x4e7455[_0x1427f8(0x18d)](_0x394194);}return null;}function calculateScopedPath(_0x570b68,_0x2bc677){const _0x15bebf=a145_0x1216,_0x4f7880=a145_0x4e7455[_0x15bebf(0x193)](_0x2bc677,_0x570b68),_0x1ad6e7=_0x4f7880!==''&&_0x4f7880!=='.'&&!_0x4f7880[_0x15bebf(0x17b)]('..');return{'isScoped':_0x1ad6e7,'scopedFolderPath':_0x1ad6e7?_0x4f7880[_0x15bebf(0x187)](/\\/g,'/'):''};}export async function resolveTarget(_0x5d81c0){const _0x531367=a145_0x1216,{arg:_0x5683b9,contextParent:_0x2ef3c5,cwd:cwd=process['cwd'](),fs:fs=nodeFileSystem}=_0x5d81c0;if(_0x5683b9&&isYamlFilePath(_0x5683b9))try{const _0x3af143=await resolveYamlFilePath(_0x5683b9,fs),_0x44d6c4=a145_0x4e7455[_0x531367(0x181)](_0x5683b9),_0x2f6ce7=a145_0x4e7455[_0x531367(0x18d)](_0x44d6c4),_0x2e04ee=await findTdxConfigAsync(_0x2f6ce7,fs);if(!_0x2e04ee){if(_0x2ef3c5){const _0x3b871d=a145_0x4e7455[_0x531367(0x18d)](_0x44d6c4);return{'type':'file','parentName':_0x2ef3c5,'targetDir':_0x3b871d,'configRoot':_0x3b871d,'filePath':_0x44d6c4,'resourceName':_0x3af143[_0x531367(0x168)],'folderPath':_0x3af143[_0x531367(0x180)],'resourceType':_0x3af143[_0x531367(0x186)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x531367(0x191),'errorCode':'no_config','message':_0x531367(0x17c)+_0x5683b9,'arg':_0x5683b9,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x50ce58=calculateScopedPath(_0x2f6ce7,_0x2e04ee[_0x531367(0x178)]);return{'type':_0x531367(0x177),'parentName':_0x2e04ee[_0x531367(0x185)],'targetDir':_0x2e04ee[_0x531367(0x178)],'configRoot':_0x2e04ee['configDir'],'filePath':_0x44d6c4,'resourceName':_0x3af143[_0x531367(0x168)],'folderPath':_0x3af143[_0x531367(0x180)],'resourceType':_0x3af143[_0x531367(0x186)],'isScoped':_0x50ce58[_0x531367(0x18e)],'scopedFolderPath':_0x50ce58[_0x531367(0x173)]};}catch(_0x5f024f){const _0x529e0e=_0x5f024f instanceof Error?_0x5f024f[_0x531367(0x192)]:String(_0x5f024f);if(_0x529e0e[_0x531367(0x174)](_0x531367(0x172)))return{'type':_0x531367(0x191),'errorCode':_0x531367(0x16c),'message':_0x531367(0x166)+_0x5683b9,'arg':_0x5683b9};if(_0x529e0e[_0x531367(0x174)](_0x531367(0x18f))){if(_0x2ef3c5){const _0x305937=a145_0x4e7455['resolve'](_0x5683b9);if(await fs[_0x531367(0x182)](_0x305937)){const _0x1f8aae=a145_0x4e7455[_0x531367(0x18d)](_0x305937),_0x5d2d3b=await fs[_0x531367(0x163)](_0x305937),_0x1fe892=_0x5d2d3b[_0x531367(0x190)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x404d69=_0x5d2d3b['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x49fd6a=_0x1fe892?_0x1fe892[0x1]['trim']():a145_0x4e7455[_0x531367(0x16b)](_0x5683b9,a145_0x4e7455[_0x531367(0x167)](_0x5683b9)),_0x11c701=_0x404d69&&_0x404d69[0x1][_0x531367(0x175)]()===_0x531367(0x196)?'journey':_0x531367(0x194);return{'type':_0x531367(0x177),'parentName':_0x2ef3c5,'targetDir':_0x1f8aae,'configRoot':_0x1f8aae,'filePath':_0x305937,'resourceName':_0x49fd6a,'folderPath':'','resourceType':_0x11c701,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x531367(0x191),'errorCode':_0x531367(0x197),'message':_0x531367(0x17c)+_0x5683b9,'arg':_0x5683b9,'helpText':_0x531367(0x184)};}return{'type':_0x531367(0x191),'errorCode':'invalid_yaml','message':_0x529e0e,'arg':_0x5683b9};}if(_0x5683b9){const _0xd7f531=a145_0x4e7455[_0x531367(0x181)](cwd,_0x5683b9);let _0xa1bae5=null;try{_0xa1bae5=await fs[_0x531367(0x16e)](_0xd7f531);}catch{}if(_0xa1bae5?.['isDirectory']()){const _0x390736=await findTdxConfigAsync(_0xd7f531,fs);if(_0x390736){const _0x27c342=calculateScopedPath(_0xd7f531,_0x390736['configDir']);return{'type':_0x531367(0x198),'parentName':_0x390736[_0x531367(0x185)],'targetDir':_0xd7f531,'configRoot':_0x390736[_0x531367(0x178)],'isScoped':_0x27c342[_0x531367(0x18e)],'scopedFolderPath':_0x27c342[_0x531367(0x173)]};}if(_0x2ef3c5)return{'type':_0x531367(0x198),'parentName':_0x2ef3c5,'targetDir':_0xd7f531,'configRoot':_0xd7f531,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x531367(0x165)+_0x5683b9,'arg':_0x5683b9,'helpText':_0x531367(0x184)};}if(_0xa1bae5?.[_0x531367(0x169)]())return{'type':_0x531367(0x191),'errorCode':_0x531367(0x164),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x5683b9,'arg':_0x5683b9,'helpText':_0x531367(0x18b)};const _0x56c4a3=sanitizeFileName(_0x5683b9),_0x12937c=getSegmentRootDir(_0x56c4a3,cwd);return{'type':_0x531367(0x18c),'parentName':_0x5683b9,'targetDir':_0x12937c,'configRoot':_0x12937c};}const _0x3eeba7=await findTdxConfigAsync(cwd,fs);if(_0x3eeba7){const _0x2ad416=calculateScopedPath(cwd,_0x3eeba7['configDir']);return{'type':_0x531367(0x199),'parentName':_0x3eeba7['parentSegment'],'targetDir':cwd,'configRoot':_0x3eeba7[_0x531367(0x178)],'isScoped':_0x2ad416[_0x531367(0x18e)],'scopedFolderPath':_0x2ad416[_0x531367(0x173)]};}if(_0x2ef3c5){const _0x21c26d=sanitizeFileName(_0x2ef3c5),_0xed4d02=getSegmentRootDir(_0x21c26d,cwd);return{'type':'context','parentName':_0x2ef3c5,'targetDir':_0xed4d02,'configRoot':_0xed4d02,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x531367(0x191),'errorCode':'no_parent','message':_0x531367(0x16a),'helpText':_0x531367(0x19a)};}
1
+ (function(_0x2badb4,_0x39f078){const _0x1a48ee=a145_0x536d,_0x4e4b7b=_0x2badb4();while(!![]){try{const _0x5c6461=parseInt(_0x1a48ee(0x192))/0x1+parseInt(_0x1a48ee(0x199))/0x2*(parseInt(_0x1a48ee(0x18b))/0x3)+parseInt(_0x1a48ee(0x1b0))/0x4+-parseInt(_0x1a48ee(0x19c))/0x5*(parseInt(_0x1a48ee(0x19b))/0x6)+-parseInt(_0x1a48ee(0x19e))/0x7+-parseInt(_0x1a48ee(0x1a2))/0x8*(-parseInt(_0x1a48ee(0x1ba))/0x9)+-parseInt(_0x1a48ee(0x18c))/0xa*(parseInt(_0x1a48ee(0x1af))/0xb);if(_0x5c6461===_0x39f078)break;else _0x4e4b7b['push'](_0x4e4b7b['shift']());}catch(_0x435bd7){_0x4e4b7b['push'](_0x4e4b7b['shift']());}}}(a145_0x2f1b,0x7f9b4));import a145_0x17c8d9 from'path';function a145_0x2f1b(){const _0x4fb3e7=['segmentName','2712108dtXbSM','readFile','tdx.json','resourceType','8UQWsNC','File\x20not\x20found:\x20','file_not_found','basename','trim','message','directory','string','Not\x20a\x20YAML\x20file:\x20','File\x20not\x20found','isFile','error','join','16137PSpoXB','2845468BdXzgK','parent_segment','dirname','No\x20tdx.json\x20found\x20for\x20file:\x20','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','invalid_yaml','journey','extname','parentSegment','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','5310198UOwJmd','cwd','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','isScoped','stat','folderPath','root','102gnKALi','6110PJiDJO','type','no_config','parse','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','Parent\x20segment\x20not\x20specified','362814ViQuOn','replace','isDirectory','configDir','match','file','parent_name','11164OkDSoq','scopedFolderPath','6vjRYKm','237670UxTmQt'];a145_0x2f1b=function(){return _0x4fb3e7;};return a145_0x2f1b();}import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x7cfa9a){const _0x48c5f7=a145_0x536d;return _0x7cfa9a[_0x48c5f7(0x18d)]!=='error';}export function isScopedResolution(_0x45e958){const _0x46bd15=a145_0x536d;return _0x45e958[_0x46bd15(0x18d)]==='directory'||_0x45e958[_0x46bd15(0x18d)]==='file'||_0x45e958[_0x46bd15(0x18d)]==='context';}function a145_0x536d(_0x3f21ee,_0x35d51d){_0x3f21ee=_0x3f21ee-0x189;const _0x2f1b6c=a145_0x2f1b();let _0x536d41=_0x2f1b6c[_0x3f21ee];return _0x536d41;}export function getScopedDetails(_0x3b43e7){const _0xb4babf=a145_0x536d;if(isScopedResolution(_0x3b43e7))return{'isScoped':_0x3b43e7['isScoped'],'scopedFolderPath':_0x3b43e7[_0xb4babf(0x19a)]};return undefined;}async function findTdxConfigAsync(_0x2d9764,_0x2109e1){const _0x2f42f8=a145_0x536d;let _0x493a35=a145_0x17c8d9['resolve'](_0x2d9764);const _0x4f5bbb=a145_0x17c8d9['parse'](_0x493a35)[_0x2f42f8(0x18a)];while(_0x493a35!==_0x4f5bbb){const _0xff3e09=a145_0x17c8d9[_0x2f42f8(0x1ae)](_0x493a35,_0x2f42f8(0x1a0));if(await _0x2109e1['exists'](_0xff3e09))try{const _0xa8233a=await _0x2109e1[_0x2f42f8(0x19f)](_0xff3e09),_0x1816f4=JSON[_0x2f42f8(0x18f)](_0xa8233a);if(_0x1816f4[_0x2f42f8(0x1b1)]&&typeof _0x1816f4[_0x2f42f8(0x1b1)]===_0x2f42f8(0x1a9))return{'configPath':_0xff3e09,'configDir':_0x493a35,'parentSegment':_0x1816f4[_0x2f42f8(0x1b1)]};}catch{}_0x493a35=a145_0x17c8d9[_0x2f42f8(0x1b2)](_0x493a35);}return null;}function calculateScopedPath(_0xe3e94a,_0x38f578){const _0x138ba1=a145_0x536d,_0x4bf90c=a145_0x17c8d9['relative'](_0x38f578,_0xe3e94a),_0x210256=_0x4bf90c!==''&&_0x4bf90c!=='.'&&!_0x4bf90c['startsWith']('..');return{'isScoped':_0x210256,'scopedFolderPath':_0x210256?_0x4bf90c[_0x138ba1(0x193)](/\\/g,'/'):''};}export async function resolveTarget(_0x151d88){const _0x4efe03=a145_0x536d,{arg:_0x4c2468,contextParent:_0x2fa81f,cwd:cwd=process[_0x4efe03(0x1bb)](),fs:fs=nodeFileSystem}=_0x151d88;if(_0x4c2468&&isYamlFilePath(_0x4c2468))try{const _0x2d91f3=await resolveYamlFilePath(_0x4c2468,fs),_0xa7d27=a145_0x17c8d9['resolve'](_0x4c2468),_0x321f5b=a145_0x17c8d9[_0x4efe03(0x1b2)](_0xa7d27),_0xa592c0=await findTdxConfigAsync(_0x321f5b,fs);if(!_0xa592c0){if(_0x2fa81f){const _0x1bb21b=a145_0x17c8d9[_0x4efe03(0x1b2)](_0xa7d27);return{'type':'file','parentName':_0x2fa81f,'targetDir':_0x1bb21b,'configRoot':_0x1bb21b,'filePath':_0xa7d27,'resourceName':_0x2d91f3[_0x4efe03(0x19d)],'folderPath':_0x2d91f3[_0x4efe03(0x189)],'resourceType':_0x2d91f3[_0x4efe03(0x1a1)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4efe03(0x1ad),'errorCode':'no_config','message':_0x4efe03(0x1b3)+_0x4c2468,'arg':_0x4c2468,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x83eba6=calculateScopedPath(_0x321f5b,_0xa592c0[_0x4efe03(0x195)]);return{'type':_0x4efe03(0x197),'parentName':_0xa592c0['parentSegment'],'targetDir':_0xa592c0[_0x4efe03(0x195)],'configRoot':_0xa592c0[_0x4efe03(0x195)],'filePath':_0xa7d27,'resourceName':_0x2d91f3['segmentName'],'folderPath':_0x2d91f3['folderPath'],'resourceType':_0x2d91f3[_0x4efe03(0x1a1)],'isScoped':_0x83eba6[_0x4efe03(0x1bd)],'scopedFolderPath':_0x83eba6[_0x4efe03(0x19a)]};}catch(_0x4cb703){const _0x25e353=_0x4cb703 instanceof Error?_0x4cb703[_0x4efe03(0x1a7)]:String(_0x4cb703);if(_0x25e353['includes'](_0x4efe03(0x1ab)))return{'type':_0x4efe03(0x1ad),'errorCode':_0x4efe03(0x1a4),'message':_0x4efe03(0x1a3)+_0x4c2468,'arg':_0x4c2468};if(_0x25e353['includes']('No\x20tdx.json\x20found')){if(_0x2fa81f){const _0x5c9b5d=a145_0x17c8d9['resolve'](_0x4c2468);if(await fs['exists'](_0x5c9b5d)){const _0x340f49=a145_0x17c8d9[_0x4efe03(0x1b2)](_0x5c9b5d),_0x3bb6ca=await fs[_0x4efe03(0x19f)](_0x5c9b5d),_0x528636=_0x3bb6ca[_0x4efe03(0x196)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xdc0fe1=_0x3bb6ca[_0x4efe03(0x196)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3da213=_0x528636?_0x528636[0x1]['trim']():a145_0x17c8d9[_0x4efe03(0x1a5)](_0x4c2468,a145_0x17c8d9[_0x4efe03(0x1b7)](_0x4c2468)),_0x3c3d0d=_0xdc0fe1&&_0xdc0fe1[0x1][_0x4efe03(0x1a6)]()===_0x4efe03(0x1b6)?_0x4efe03(0x1b6):'segment';return{'type':_0x4efe03(0x197),'parentName':_0x2fa81f,'targetDir':_0x340f49,'configRoot':_0x340f49,'filePath':_0x5c9b5d,'resourceName':_0x3da213,'folderPath':'','resourceType':_0x3c3d0d,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x4efe03(0x18e),'message':_0x4efe03(0x1b3)+_0x4c2468,'arg':_0x4c2468,'helpText':_0x4efe03(0x1b4)};}return{'type':_0x4efe03(0x1ad),'errorCode':_0x4efe03(0x1b5),'message':_0x25e353,'arg':_0x4c2468};}if(_0x4c2468){const _0x3abf06=a145_0x17c8d9['resolve'](cwd,_0x4c2468);let _0x524456=null;try{_0x524456=await fs[_0x4efe03(0x1be)](_0x3abf06);}catch{}if(_0x524456?.[_0x4efe03(0x194)]()){const _0x254aec=await findTdxConfigAsync(_0x3abf06,fs);if(_0x254aec){const _0x354dc8=calculateScopedPath(_0x3abf06,_0x254aec[_0x4efe03(0x195)]);return{'type':_0x4efe03(0x1a8),'parentName':_0x254aec[_0x4efe03(0x1b8)],'targetDir':_0x3abf06,'configRoot':_0x254aec[_0x4efe03(0x195)],'isScoped':_0x354dc8[_0x4efe03(0x1bd)],'scopedFolderPath':_0x354dc8[_0x4efe03(0x19a)]};}if(_0x2fa81f)return{'type':_0x4efe03(0x1a8),'parentName':_0x2fa81f,'targetDir':_0x3abf06,'configRoot':_0x3abf06,'isScoped':![],'scopedFolderPath':''};return{'type':_0x4efe03(0x1ad),'errorCode':_0x4efe03(0x18e),'message':_0x4efe03(0x190)+_0x4c2468,'arg':_0x4c2468,'helpText':_0x4efe03(0x1b4)};}if(_0x524456?.[_0x4efe03(0x1ac)]())return{'type':_0x4efe03(0x1ad),'errorCode':'invalid_yaml','message':_0x4efe03(0x1aa)+_0x4c2468,'arg':_0x4c2468,'helpText':_0x4efe03(0x1b9)};const _0x3cb12f=sanitizeFileName(_0x4c2468),_0x5ee12d=getSegmentRootDir(_0x3cb12f,cwd);return{'type':_0x4efe03(0x198),'parentName':_0x4c2468,'targetDir':_0x5ee12d,'configRoot':_0x5ee12d};}const _0x392c3c=await findTdxConfigAsync(cwd,fs);if(_0x392c3c){const _0x8cf023=calculateScopedPath(cwd,_0x392c3c[_0x4efe03(0x195)]);return{'type':'context','parentName':_0x392c3c[_0x4efe03(0x1b8)],'targetDir':cwd,'configRoot':_0x392c3c['configDir'],'isScoped':_0x8cf023[_0x4efe03(0x1bd)],'scopedFolderPath':_0x8cf023['scopedFolderPath']};}if(_0x2fa81f){const _0x482d3f=sanitizeFileName(_0x2fa81f),_0x88339e=getSegmentRootDir(_0x482d3f,cwd);return{'type':'context','parentName':_0x2fa81f,'targetDir':_0x88339e,'configRoot':_0x88339e,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':_0x4efe03(0x191),'helpText':_0x4efe03(0x1bc)};}
@@ -1 +1 @@
1
- const a146_0x215885=a146_0x1867;(function(_0x3ae5f0,_0x2e33a8){const _0x1cb6be=a146_0x1867,_0x21cd9c=_0x3ae5f0();while(!![]){try{const _0x1fa5c3=parseInt(_0x1cb6be(0x11f))/0x1*(parseInt(_0x1cb6be(0x11d))/0x2)+-parseInt(_0x1cb6be(0x12d))/0x3*(parseInt(_0x1cb6be(0x128))/0x4)+-parseInt(_0x1cb6be(0x120))/0x5+parseInt(_0x1cb6be(0x127))/0x6*(-parseInt(_0x1cb6be(0x11b))/0x7)+parseInt(_0x1cb6be(0x125))/0x8+parseInt(_0x1cb6be(0x121))/0x9*(parseInt(_0x1cb6be(0x11e))/0xa)+parseInt(_0x1cb6be(0x114))/0xb*(parseInt(_0x1cb6be(0x115))/0xc);if(_0x1fa5c3===_0x2e33a8)break;else _0x21cd9c['push'](_0x21cd9c['shift']());}catch(_0x610528){_0x21cd9c['push'](_0x21cd9c['shift']());}}}(a146_0x51b9,0x5345f));import{existsSync,readFileSync}from'fs';import a146_0x39b15c from'path';function a146_0x1867(_0x246690,_0x3717ab){_0x246690=_0x246690-0x112;const _0x51b964=a146_0x51b9();let _0x18677a=_0x51b964[_0x246690];return _0x18677a;}const TDX_CONFIG_FILE=a146_0x215885(0x117),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x6c4c22=process['cwd']()){const _0x5928ab=a146_0x215885;let _0x3df64e=a146_0x39b15c[_0x5928ab(0x129)](_0x6c4c22);const _0x161f53=a146_0x39b15c['parse'](_0x3df64e)['root'];while(_0x3df64e!==_0x161f53){const _0x4f3a8f=a146_0x39b15c[_0x5928ab(0x122)](_0x3df64e,TDX_CONFIG_FILE);if(existsSync(_0x4f3a8f))return _0x4f3a8f;_0x3df64e=a146_0x39b15c[_0x5928ab(0x118)](_0x3df64e);}return null;}export function loadTdxConfig(_0x5bad61){const _0x185798=a146_0x215885,_0x3ed342=readFileSync(_0x5bad61,_0x185798(0x12c));let _0x627158;try{_0x627158=JSON[_0x185798(0x11c)](_0x3ed342);}catch{throw new Error(_0x185798(0x116)+_0x5bad61);}if(!_0x627158||typeof _0x627158!==_0x185798(0x119))throw new Error(_0x185798(0x113));const _0x9b26e9=_0x627158,_0x5c13b9=_0x9b26e9['parent_segment']&&typeof _0x9b26e9['parent_segment']===_0x185798(0x126),_0x1f71b=_0x9b26e9['engage_workspace']&&typeof _0x9b26e9['engage_workspace']===_0x185798(0x126);if(!_0x5c13b9&&!_0x1f71b)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x53e811={};return _0x5c13b9&&(_0x53e811[_0x185798(0x11a)]=_0x9b26e9['parent_segment']),_0x1f71b&&(_0x53e811['engage_workspace']=_0x9b26e9[_0x185798(0x112)]),_0x53e811;}export function findTdxConfig(_0x52bf3e=process[a146_0x215885(0x124)]()){const _0x1ddbe4=a146_0x215885,_0x4d93e4=findTdxConfigPath(_0x52bf3e);if(!_0x4d93e4)throw new Error(_0x1ddbe4(0x123));const _0x1b3a8b=loadTdxConfig(_0x4d93e4),_0x36a00c=a146_0x39b15c[_0x1ddbe4(0x118)](_0x4d93e4);return{'config':_0x1b3a8b,'configPath':_0x4d93e4,'configDir':_0x36a00c};}export function tryFindTdxConfig(_0x310bb9){try{return findTdxConfig(_0x310bb9);}catch{return null;}}export function getSegmentRootDir(_0x2a445c,_0x1b3b23=process[a146_0x215885(0x124)]()){return a146_0x39b15c['join'](_0x1b3b23,SEGMENTS_DIR,_0x2a445c);}export function getTdxConfigPath(_0x37b557,_0x571f0f=process[a146_0x215885(0x124)]()){const _0x1dfe94=a146_0x215885;return a146_0x39b15c[_0x1dfe94(0x122)](getSegmentRootDir(_0x37b557,_0x571f0f),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x1aa80f,_0x1ce990){const _0x574eec=a146_0x215885,_0x3b902b=a146_0x39b15c[_0x574eec(0x129)](_0x1aa80f),_0x270e22=a146_0x39b15c[_0x574eec(0x12a)](_0x1ce990,_0x3b902b);if(_0x270e22['startsWith']('..'))return'';return _0x270e22;}export function localPathToTdFolderPath(_0x44dd5d){const _0x4d9bfb=a146_0x215885,_0x261e4e=a146_0x39b15c[_0x4d9bfb(0x118)](_0x44dd5d);if(_0x261e4e==='.'||_0x261e4e==='')return'';return _0x261e4e[_0x4d9bfb(0x12b)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x3c40fb,_0x9daaa8){const _0x150dfb=a146_0x215885;if(!_0x3c40fb)return _0x9daaa8;return a146_0x39b15c[_0x150dfb(0x122)](_0x9daaa8,_0x3c40fb);}export function createTdxConfigContent(_0x23f6e6){const _0x103f0a={'parent_segment':_0x23f6e6};return JSON['stringify'](_0x103f0a,null,0x2)+'\x0a';}function a146_0x51b9(){const _0x3fcaca=['relative','replace','utf-8','1224BBZbET','engage_workspace','Invalid\x20tdx.json:\x20expected\x20object','22MtdGZd','4370736wePBRc','Invalid\x20JSON\x20in\x20','tdx.json','dirname','object','parent_segment','1751029kUpHLc','parse','1328aAzIiw','10NzoiZr','472GgGeMl','3013125Xhzpov','4513527ZAuHlX','join','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','cwd','1989304dhYWvc','string','12tSTBjx','3412EhwkfI','resolve'];a146_0x51b9=function(){return _0x3fcaca;};return a146_0x51b9();}export function createEngageTdxConfigContent(_0x4db965){const _0x2ec219={'engage_workspace':_0x4db965};return JSON['stringify'](_0x2ec219,null,0x2)+'\x0a';}
1
+ const a146_0x564c64=a146_0x5e60;(function(_0x56ecf4,_0x398f0a){const _0x414ac5=a146_0x5e60,_0xe53207=_0x56ecf4();while(!![]){try{const _0x590cff=-parseInt(_0x414ac5(0x17c))/0x1+parseInt(_0x414ac5(0x177))/0x2*(-parseInt(_0x414ac5(0x167))/0x3)+-parseInt(_0x414ac5(0x173))/0x4*(-parseInt(_0x414ac5(0x16a))/0x5)+parseInt(_0x414ac5(0x17b))/0x6+-parseInt(_0x414ac5(0x16c))/0x7*(-parseInt(_0x414ac5(0x16f))/0x8)+-parseInt(_0x414ac5(0x179))/0x9+parseInt(_0x414ac5(0x180))/0xa*(parseInt(_0x414ac5(0x181))/0xb);if(_0x590cff===_0x398f0a)break;else _0xe53207['push'](_0xe53207['shift']());}catch(_0x17508a){_0xe53207['push'](_0xe53207['shift']());}}}(a146_0x5b89,0x37610));import{existsSync,readFileSync}from'fs';import a146_0x390dd from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a146_0x564c64(0x175);export function findTdxConfigPath(_0x35c738=process[a146_0x564c64(0x171)]()){const _0x36faab=a146_0x564c64;let _0x3e73db=a146_0x390dd[_0x36faab(0x174)](_0x35c738);const _0x1fd8d7=a146_0x390dd[_0x36faab(0x17f)](_0x3e73db)[_0x36faab(0x166)];while(_0x3e73db!==_0x1fd8d7){const _0x2bbda3=a146_0x390dd[_0x36faab(0x178)](_0x3e73db,TDX_CONFIG_FILE);if(existsSync(_0x2bbda3))return _0x2bbda3;_0x3e73db=a146_0x390dd[_0x36faab(0x16b)](_0x3e73db);}return null;}export function loadTdxConfig(_0x45d482){const _0x33c571=a146_0x564c64,_0x203cfe=readFileSync(_0x45d482,_0x33c571(0x17d));let _0x1bc323;try{_0x1bc323=JSON[_0x33c571(0x17f)](_0x203cfe);}catch{throw new Error(_0x33c571(0x17a)+_0x45d482);}if(!_0x1bc323||typeof _0x1bc323!=='object')throw new Error(_0x33c571(0x17e));const _0x1f5f47=_0x1bc323,_0x1be670=_0x1f5f47['parent_segment']&&typeof _0x1f5f47[_0x33c571(0x165)]==='string',_0x2360db=_0x1f5f47['engage_workspace']&&typeof _0x1f5f47[_0x33c571(0x176)]===_0x33c571(0x16d);if(!_0x1be670&&!_0x2360db)throw new Error(_0x33c571(0x170));const _0x3c41f0={};return _0x1be670&&(_0x3c41f0[_0x33c571(0x165)]=_0x1f5f47['parent_segment']),_0x2360db&&(_0x3c41f0['engage_workspace']=_0x1f5f47['engage_workspace']),_0x3c41f0;}export function findTdxConfig(_0x1eb377=process['cwd']()){const _0x390cc1=a146_0x564c64,_0x28d09b=findTdxConfigPath(_0x1eb377);if(!_0x28d09b)throw new Error(_0x390cc1(0x16e));const _0x367099=loadTdxConfig(_0x28d09b),_0x1932b0=a146_0x390dd[_0x390cc1(0x16b)](_0x28d09b);return{'config':_0x367099,'configPath':_0x28d09b,'configDir':_0x1932b0};}export function tryFindTdxConfig(_0x17c1e2){try{return findTdxConfig(_0x17c1e2);}catch{return null;}}export function getSegmentRootDir(_0x5b1e32,_0x795a92=process[a146_0x564c64(0x171)]()){return a146_0x390dd['join'](_0x795a92,SEGMENTS_DIR,_0x5b1e32);}export function getTdxConfigPath(_0x13fc09,_0x5ced67=process['cwd']()){const _0x1ec0da=a146_0x564c64;return a146_0x390dd[_0x1ec0da(0x178)](getSegmentRootDir(_0x13fc09,_0x5ced67),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x278d68,_0x1a342b){const _0x522c10=a146_0x564c64,_0x41dc71=a146_0x390dd[_0x522c10(0x174)](_0x278d68),_0x361d56=a146_0x390dd[_0x522c10(0x169)](_0x1a342b,_0x41dc71);if(_0x361d56[_0x522c10(0x172)]('..'))return'';return _0x361d56;}function a146_0x5e60(_0x47057f,_0x290dd1){_0x47057f=_0x47057f-0x165;const _0x5b8987=a146_0x5b89();let _0x5e6007=_0x5b8987[_0x47057f];return _0x5e6007;}export function localPathToTdFolderPath(_0x390f2d){const _0x23f550=a146_0x390dd['dirname'](_0x390f2d);if(_0x23f550==='.'||_0x23f550==='')return'';return _0x23f550['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x4fc33f,_0x788d7){const _0x350836=a146_0x564c64;if(!_0x4fc33f)return _0x788d7;return a146_0x390dd[_0x350836(0x178)](_0x788d7,_0x4fc33f);}export function createTdxConfigContent(_0x299288){const _0x4aeef=a146_0x564c64,_0x33e524={'parent_segment':_0x299288};return JSON[_0x4aeef(0x168)](_0x33e524,null,0x2)+'\x0a';}function a146_0x5b89(){const _0x1cc380=['338946uPIvJv','utf-8','Invalid\x20tdx.json:\x20expected\x20object','parse','2491100vSiFwb','22wygetU','parent_segment','root','3fVRMlg','stringify','relative','5GaUuiv','dirname','1439354JjBHEM','string','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','8JClxpj','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','cwd','startsWith','252476zNTfFc','resolve','segments','engage_workspace','532744OrJNFl','join','2843676epsvBs','Invalid\x20JSON\x20in\x20','2286918LLzPPH'];a146_0x5b89=function(){return _0x1cc380;};return a146_0x5b89();}export function createEngageTdxConfigContent(_0x33dfbc){const _0x2b695f=a146_0x564c64,_0x497c48={'engage_workspace':_0x33dfbc};return JSON[_0x2b695f(0x168)](_0x497c48,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a147_0x3e21d6=a147_0x254d;(function(_0x5e05a4,_0x4ce958){const _0x26e7c0=a147_0x254d,_0x101898=_0x5e05a4();while(!![]){try{const _0x425491=parseInt(_0x26e7c0(0x195))/0x1+parseInt(_0x26e7c0(0x1ab))/0x2+-parseInt(_0x26e7c0(0x1a0))/0x3+parseInt(_0x26e7c0(0x1b1))/0x4+parseInt(_0x26e7c0(0x1b3))/0x5*(parseInt(_0x26e7c0(0x196))/0x6)+parseInt(_0x26e7c0(0x1a9))/0x7*(-parseInt(_0x26e7c0(0x1a2))/0x8)+-parseInt(_0x26e7c0(0x1a6))/0x9*(parseInt(_0x26e7c0(0x19c))/0xa);if(_0x425491===_0x4ce958)break;else _0x101898['push'](_0x101898['shift']());}catch(_0x1f6f22){_0x101898['push'](_0x101898['shift']());}}}(a147_0x36ae,0xcc0da));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x3e21d6(0x1bd)]([a147_0x3e21d6(0x1b4),a147_0x3e21d6(0x1ad),'daily',a147_0x3e21d6(0x19f),a147_0x3e21d6(0x197),a147_0x3e21d6(0x1bc),'minutes_interval']);export const RepeatUnitSchema=z['enum']([a147_0x3e21d6(0x1a3),'hour',a147_0x3e21d6(0x1a7),a147_0x3e21d6(0x1b2),a147_0x3e21d6(0x19d),a147_0x3e21d6(0x198),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a147_0x3e21d6(0x1b7)](),'repeat_frequency':z[a147_0x3e21d6(0x1b9)]()[a147_0x3e21d6(0x1b7)](),'repeat_sub_frequency':z['array'](z[a147_0x3e21d6(0x1b9)]())[a147_0x3e21d6(0x1b7)](),'start_at':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1aa)]()[a147_0x3e21d6(0x1b7)](),'end_on':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1aa)]()[a147_0x3e21d6(0x1b7)](),'timezone':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1b7)]()});export const NotificationDefSchema=z[a147_0x3e21d6(0x1a5)]({'notify_on':z['array'](z['enum']([a147_0x3e21d6(0x19b),a147_0x3e21d6(0x1ac)]))[a147_0x3e21d6(0x1b7)](),'email_recipients':z[a147_0x3e21d6(0x1b5)](z[a147_0x3e21d6(0x1ae)]())['optional']()});export const ActivationColumnDefSchema=z['union']([z[a147_0x3e21d6(0x1ae)](),z[a147_0x3e21d6(0x1a5)]({'name':z[a147_0x3e21d6(0x1ae)](),'type':z['string']()[a147_0x3e21d6(0x1b7)](),'visibility':z['enum']([a147_0x3e21d6(0x1af),a147_0x3e21d6(0x1a8)])[a147_0x3e21d6(0x1b7)]()})]);export const ActivationBehaviorDefSchema=z[a147_0x3e21d6(0x1a5)]({'columns':z[a147_0x3e21d6(0x1b5)](z[a147_0x3e21d6(0x1a5)]({'name':z[a147_0x3e21d6(0x1ae)](),'type':z[a147_0x3e21d6(0x1ae)]()['optional'](),'visibility':z[a147_0x3e21d6(0x1bd)](['clear',a147_0x3e21d6(0x1a8)])[a147_0x3e21d6(0x1b7)]()}))[a147_0x3e21d6(0x1b7)](),'behavior_table':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1b7)](),'join_row':z[a147_0x3e21d6(0x1b9)]()[a147_0x3e21d6(0x1aa)]()[a147_0x3e21d6(0x1b7)](),'join_strategy':z['enum']([a147_0x3e21d6(0x1ba),'First','Last',a147_0x3e21d6(0x199)])[a147_0x3e21d6(0x1b7)](),'formatting':z[a147_0x3e21d6(0x1bd)](['rows',a147_0x3e21d6(0x1be)])[a147_0x3e21d6(0x1b7)](),'order_by':z[a147_0x3e21d6(0x1b5)](z['object']({'key':z['string'](),'order':z[a147_0x3e21d6(0x1bd)]([a147_0x3e21d6(0x1bb),a147_0x3e21d6(0x1b0)])}))[a147_0x3e21d6(0x1b7)]()});export const ActivationDefSchema=z[a147_0x3e21d6(0x1a5)]({'name':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1a4)](0x1,a147_0x3e21d6(0x1b8)),'description':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1b7)](),'connection':z[a147_0x3e21d6(0x1ae)]()[a147_0x3e21d6(0x1a4)](0x1,a147_0x3e21d6(0x19e)),'all_columns':z['boolean']()[a147_0x3e21d6(0x1b7)](),'columns':z[a147_0x3e21d6(0x1b5)](ActivationColumnDefSchema)[a147_0x3e21d6(0x1b7)](),'schedule':ScheduleDefSchema[a147_0x3e21d6(0x1b7)](),'notification':NotificationDefSchema[a147_0x3e21d6(0x1b7)](),'connector_config':z[a147_0x3e21d6(0x1a1)](z[a147_0x3e21d6(0x1ae)](),z[a147_0x3e21d6(0x1b6)]())[a147_0x3e21d6(0x1b7)](),'activation_template_id':z[a147_0x3e21d6(0x1ae)]()['nullable']()[a147_0x3e21d6(0x1b7)](),'behavior':ActivationBehaviorDefSchema[a147_0x3e21d6(0x1aa)]()[a147_0x3e21d6(0x1b7)](),'run_after_journey_refresh':z[a147_0x3e21d6(0x19a)]()[a147_0x3e21d6(0x1b7)]()});function a147_0x254d(_0x383a3e,_0x24390c){_0x383a3e=_0x383a3e-0x195;const _0x36ae0f=a147_0x36ae();let _0x254d57=_0x36ae0f[_0x383a3e];return _0x254d57;}function a147_0x36ae(){const _0x161e7e=['day','masked','10317727CEgVLR','nullable','3262496GcLFaj','onFailure','hourly','string','clear','desc','5019108upuXQt','week','1255GhkqUS','none','array','unknown','optional','Activation\x20name\x20is\x20required','number','All','asc','cron','enum','cols','25604OiAUoT','25446dZolWL','monthly','once','Top-N','boolean','onSuccess','7795630SUmIfG','month','Connection\x20name\x20is\x20required','weekly','321693RwQnXX','record','8MsCoAI','minute','min','object','18GQlSEn'];a147_0x36ae=function(){return _0x161e7e;};return a147_0x36ae();}
1
+ const a147_0x35fdc7=a147_0xed24;(function(_0x136b4f,_0x3eb570){const _0x5871db=a147_0xed24,_0x1ef835=_0x136b4f();while(!![]){try{const _0xadbf50=-parseInt(_0x5871db(0x197))/0x1+parseInt(_0x5871db(0x192))/0x2+parseInt(_0x5871db(0x17d))/0x3+-parseInt(_0x5871db(0x18d))/0x4+-parseInt(_0x5871db(0x180))/0x5+-parseInt(_0x5871db(0x196))/0x6*(-parseInt(_0x5871db(0x19d))/0x7)+-parseInt(_0x5871db(0x1a1))/0x8;if(_0xadbf50===_0x3eb570)break;else _0x1ef835['push'](_0x1ef835['shift']());}catch(_0x1cc92e){_0x1ef835['push'](_0x1ef835['shift']());}}}(a147_0x1b99,0x3b330));import{z}from'zod';export const ScheduleTypeSchema=z[a147_0x35fdc7(0x18c)](['none',a147_0x35fdc7(0x1a0),a147_0x35fdc7(0x182),a147_0x35fdc7(0x194),a147_0x35fdc7(0x18e),a147_0x35fdc7(0x191),a147_0x35fdc7(0x17e)]);export const RepeatUnitSchema=z['enum'](['minute',a147_0x35fdc7(0x184),a147_0x35fdc7(0x18f),'week',a147_0x35fdc7(0x181),a147_0x35fdc7(0x199),a147_0x35fdc7(0x1a2)]);export const ScheduleDefSchema=z[a147_0x35fdc7(0x18a)]({'type':ScheduleTypeSchema[a147_0x35fdc7(0x186)](),'repeat_unit':RepeatUnitSchema[a147_0x35fdc7(0x186)](),'repeat_frequency':z[a147_0x35fdc7(0x19e)]()[a147_0x35fdc7(0x186)](),'repeat_sub_frequency':z[a147_0x35fdc7(0x18b)](z['number']())[a147_0x35fdc7(0x186)](),'start_at':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x193)]()[a147_0x35fdc7(0x186)](),'end_on':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x193)]()[a147_0x35fdc7(0x186)](),'timezone':z['string']()[a147_0x35fdc7(0x186)]()});function a147_0xed24(_0x3696cf,_0x4d484f){_0x3696cf=_0x3696cf-0x17d;const _0x1b99ed=a147_0x1b99();let _0xed2493=_0x1b99ed[_0x3696cf];return _0xed2493;}export const NotificationDefSchema=z['object']({'notify_on':z['array'](z[a147_0x35fdc7(0x18c)](['onSuccess',a147_0x35fdc7(0x17f)]))[a147_0x35fdc7(0x186)](),'email_recipients':z[a147_0x35fdc7(0x18b)](z[a147_0x35fdc7(0x195)]())[a147_0x35fdc7(0x186)]()});export const ActivationColumnDefSchema=z[a147_0x35fdc7(0x189)]([z[a147_0x35fdc7(0x195)](),z[a147_0x35fdc7(0x18a)]({'name':z['string'](),'type':z[a147_0x35fdc7(0x195)]()['optional'](),'visibility':z[a147_0x35fdc7(0x18c)](['clear',a147_0x35fdc7(0x187)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a147_0x35fdc7(0x18a)]({'columns':z[a147_0x35fdc7(0x18b)](z[a147_0x35fdc7(0x18a)]({'name':z[a147_0x35fdc7(0x195)](),'type':z['string']()['optional'](),'visibility':z[a147_0x35fdc7(0x18c)]([a147_0x35fdc7(0x188),a147_0x35fdc7(0x187)])['optional']()}))[a147_0x35fdc7(0x186)](),'behavior_table':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x186)](),'join_row':z[a147_0x35fdc7(0x19e)]()['nullable']()[a147_0x35fdc7(0x186)](),'join_strategy':z[a147_0x35fdc7(0x18c)]([a147_0x35fdc7(0x190),'First','Last','Top-N'])['optional'](),'formatting':z[a147_0x35fdc7(0x18c)](['rows',a147_0x35fdc7(0x185)])[a147_0x35fdc7(0x186)](),'order_by':z[a147_0x35fdc7(0x18b)](z[a147_0x35fdc7(0x18a)]({'key':z[a147_0x35fdc7(0x195)](),'order':z[a147_0x35fdc7(0x18c)]([a147_0x35fdc7(0x19c),'desc'])}))[a147_0x35fdc7(0x186)]()});function a147_0x1b99(){const _0x24a6bb=['345943niHhej','Activation\x20name\x20is\x20required','once','record','min','asc','14mDvNkq','number','unknown','hourly','3180536vpQGnW','none','1438824ruFUdM','minutes_interval','onFailure','608045tnitbf','month','daily','Connection\x20name\x20is\x20required','hour','cols','optional','masked','clear','union','object','array','enum','141300lBQSaz','monthly','day','All','cron','654420RorKtt','nullable','weekly','string','1008318SocVjE'];a147_0x1b99=function(){return _0x24a6bb;};return a147_0x1b99();}export const ActivationDefSchema=z['object']({'name':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x19b)](0x1,a147_0x35fdc7(0x198)),'description':z[a147_0x35fdc7(0x195)]()[a147_0x35fdc7(0x186)](),'connection':z['string']()[a147_0x35fdc7(0x19b)](0x1,a147_0x35fdc7(0x183)),'all_columns':z['boolean']()['optional'](),'columns':z[a147_0x35fdc7(0x18b)](ActivationColumnDefSchema)[a147_0x35fdc7(0x186)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a147_0x35fdc7(0x19a)](z[a147_0x35fdc7(0x195)](),z[a147_0x35fdc7(0x19f)]())[a147_0x35fdc7(0x186)](),'activation_template_id':z['string']()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a147_0x35fdc7(0x193)]()[a147_0x35fdc7(0x186)](),'run_after_journey_refresh':z['boolean']()[a147_0x35fdc7(0x186)]()});
@@ -1 +1 @@
1
- (function(_0x36507a,_0x187d3e){var _0xc62d64=a148_0x2f76,_0x1104b2=_0x36507a();while(!![]){try{var _0x2759d4=parseInt(_0xc62d64(0x17f))/0x1+parseInt(_0xc62d64(0x183))/0x2*(-parseInt(_0xc62d64(0x180))/0x3)+-parseInt(_0xc62d64(0x17e))/0x4+-parseInt(_0xc62d64(0x17d))/0x5+parseInt(_0xc62d64(0x182))/0x6+-parseInt(_0xc62d64(0x17c))/0x7+parseInt(_0xc62d64(0x181))/0x8*(parseInt(_0xc62d64(0x184))/0x9);if(_0x2759d4===_0x187d3e)break;else _0x1104b2['push'](_0x1104b2['shift']());}catch(_0x2930b7){_0x1104b2['push'](_0x1104b2['shift']());}}}(a148_0xc368,0x68fcc));function a148_0x2f76(_0x48ace2,_0x150662){_0x48ace2=_0x48ace2-0x17c;var _0xc36839=a148_0xc368();var _0x2f7626=_0xc36839[_0x48ace2];return _0x2f7626;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a148_0xc368(){var _0x9e3767=['301875FeAsQt','1139344SdHfJi','556040dJvWYQ','1191399aTnnSg','416SfTVJG','945756ysufkh','2uDojoA','208917XytRrg','5238590JvmXTs'];a148_0xc368=function(){return _0x9e3767;};return a148_0xc368();}
1
+ function a148_0x3649(){var _0x3ef08c=['9aBBaIk','213DwecJI','1943611JnohAp','4118892ddFinO','11208WMTwII','8053470qrarCd','745060POojBx','7106505IswmrO','13364184JqbdQl'];a148_0x3649=function(){return _0x3ef08c;};return a148_0x3649();}(function(_0x5d68d2,_0x4cca54){var _0x13e039=a148_0x4db9,_0x4b8414=_0x5d68d2();while(!![]){try{var _0x44727d=-parseInt(_0x13e039(0xa7))/0x1+-parseInt(_0x13e039(0xa9))/0x2*(-parseInt(_0x13e039(0xa6))/0x3)+parseInt(_0x13e039(0xa8))/0x4+parseInt(_0x13e039(0xa2))/0x5+-parseInt(_0x13e039(0xaa))/0x6+parseInt(_0x13e039(0xa3))/0x7+parseInt(_0x13e039(0xa4))/0x8*(parseInt(_0x13e039(0xa5))/0x9);if(_0x44727d===_0x4cca54)break;else _0x4b8414['push'](_0x4b8414['shift']());}catch(_0x37d8e8){_0x4b8414['push'](_0x4b8414['shift']());}}}(a148_0x3649,0xee675));function a148_0x4db9(_0x7d17b6,_0x18ca9d){_0x7d17b6=_0x7d17b6-0xa2;var _0x36498d=a148_0x3649();var _0x4db92c=_0x36498d[_0x7d17b6];return _0x4db92c;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a149_0x402d9d=a149_0xd04d;(function(_0x46be3f,_0x475edc){const _0x4aa252=a149_0xd04d,_0x25f493=_0x46be3f();while(!![]){try{const _0x3bf931=-parseInt(_0x4aa252(0x1f1))/0x1+parseInt(_0x4aa252(0x1fe))/0x2+-parseInt(_0x4aa252(0x1ef))/0x3*(parseInt(_0x4aa252(0x1fa))/0x4)+parseInt(_0x4aa252(0x1fd))/0x5*(-parseInt(_0x4aa252(0x1e3))/0x6)+parseInt(_0x4aa252(0x1fc))/0x7+parseInt(_0x4aa252(0x1ff))/0x8*(parseInt(_0x4aa252(0x1e2))/0x9)+-parseInt(_0x4aa252(0x1f5))/0xa;if(_0x3bf931===_0x475edc)break;else _0x25f493['push'](_0x25f493['shift']());}catch(_0x5e993b){_0x25f493['push'](_0x25f493['shift']());}}}(a149_0x1550,0xc81ce));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a149_0x1550(){const _0x10a4a0=['enum','76000ASggEq','stages','week','Journey\x20name\x20is\x20required','8372170mcRkiY','journeys','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','jump','merge','55972sAuAmH','lazy','2215255eZzrRx','15mrzTME','1956998VORkLw','9381992kFdCSc','string','number','ab_test','object','length','type','day','draft','activation','9dYoZFF','1161822hkZoFe','decision_point','record','isArray','array','end','reentry_always','boolean','literal','discriminatedUnion','optional','min','33IUAkAI'];a149_0x1550=function(){return _0x10a4a0;};return a149_0x1550();}export const JourneyStateTypeSchema=z[a149_0x402d9d(0x1f0)]([a149_0x402d9d(0x1e0),'simulation','launched']);export const ReentryModeTypeSchema=z[a149_0x402d9d(0x1f0)](['no_reentry','reentry_unless_goal_achieved',a149_0x402d9d(0x1e9)]);export const WaitUnitTypeSchema=z[a149_0x402d9d(0x1f0)]([a149_0x402d9d(0x206),a149_0x402d9d(0x1f3)]);export const StepTypeValueSchema=z[a149_0x402d9d(0x1f0)](['wait',a149_0x402d9d(0x1e1),a149_0x402d9d(0x1e4),a149_0x402d9d(0x202),a149_0x402d9d(0x1f9),a149_0x402d9d(0x1f8),'end']);export const EmbeddedSegmentDefSchema=z[a149_0x402d9d(0x203)]({'description':z[a149_0x402d9d(0x200)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0x402d9d(0x203)]({'journey':z[a149_0x402d9d(0x200)](),'stage':z[a149_0x402d9d(0x200)](),'bundle_id':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)]()});export const CriteriaDefSchema=z[a149_0x402d9d(0x203)]({'name':z['string'](),'description':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'segment':z[a149_0x402d9d(0x200)](),'target':JumpTargetDefSchema[a149_0x402d9d(0x1ed)]()});const WaitConditionTimeoutDefSchema=z[a149_0x402d9d(0x203)]({'duration':z[a149_0x402d9d(0x201)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)]()}),WaitConditionDefSchema=z['object']({'segment':z[a149_0x402d9d(0x200)](),'next':z[a149_0x402d9d(0x200)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a149_0x402d9d(0x1ed)]()}),WaitStepParamsDefSchema=z['object']({'duration':z[a149_0x402d9d(0x201)]()[a149_0x402d9d(0x1ed)](),'unit':WaitUnitTypeSchema[a149_0x402d9d(0x1ed)](),'wait_until':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'condition':WaitConditionDefSchema[a149_0x402d9d(0x1ed)](),'days_of_week':z['array'](z[a149_0x402d9d(0x200)]())[a149_0x402d9d(0x1ed)]()}),StepBaseFields={'name':z[a149_0x402d9d(0x200)](),'uuid':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'next':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x402d9d(0x1eb)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x402d9d(0x203)]({'activation':z[a149_0x402d9d(0x200)]()}),ActivationStepDefSchema=z[a149_0x402d9d(0x203)]({...StepBaseFields,'type':z['literal'](a149_0x402d9d(0x1e1)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a149_0x402d9d(0x200)](),'segment':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'segment_id':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'excluded':z[a149_0x402d9d(0x1ea)]()['optional'](),'next':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)]()}),DecisionPointStepParamsDefSchema=z[a149_0x402d9d(0x203)]({'branches':z[a149_0x402d9d(0x1e7)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x402d9d(0x203)]({...StepBaseFields,'type':z['literal'](a149_0x402d9d(0x1e4)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x402d9d(0x203)]({'id':z[a149_0x402d9d(0x200)]()['optional'](),'name':z[a149_0x402d9d(0x200)](),'percentage':z[a149_0x402d9d(0x201)](),'next':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)]()}),AbTestStepParamsDefSchema=z[a149_0x402d9d(0x203)]({'variants':z[a149_0x402d9d(0x1e7)](AbTestVariantDefSchema),'unique_id':z[a149_0x402d9d(0x200)]()['optional'](),'customized_split':z[a149_0x402d9d(0x1ea)]()[a149_0x402d9d(0x1ed)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x402d9d(0x203)]({...StepBaseFields,'type':z[a149_0x402d9d(0x1eb)](a149_0x402d9d(0x1f9))}),JumpStepParamsDefSchema=z[a149_0x402d9d(0x203)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a149_0x402d9d(0x1f8)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x402d9d(0x1eb)](a149_0x402d9d(0x1e8))})['passthrough']();export const StepDefSchema=z[a149_0x402d9d(0x1ec)](a149_0x402d9d(0x205),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a149_0x402d9d(0x203)]({'name':z['string'](),'description':z[a149_0x402d9d(0x200)]()['optional'](),'id':z['string']()['optional'](),'entry_criteria':CriteriaDefSchema[a149_0x402d9d(0x1ed)](),'exit_criteria':z[a149_0x402d9d(0x1e7)](CriteriaDefSchema)[a149_0x402d9d(0x1ed)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z['string']()['optional'](),'steps':z['array'](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z[a149_0x402d9d(0x203)]({'name':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'version':z['string']()[a149_0x402d9d(0x1ed)](),'state':JourneyStateTypeSchema[a149_0x402d9d(0x1ed)](),'latest':z[a149_0x402d9d(0x1ea)]()[a149_0x402d9d(0x1ed)](),'stages':z['array'](StageDefSchema),'id':z['string']()[a149_0x402d9d(0x1ed)](),'version_number':z[a149_0x402d9d(0x201)]()['optional'](),'goal':CriteriaDefSchema[a149_0x402d9d(0x1ed)](),'reentry':ReentryModeTypeSchema[a149_0x402d9d(0x1ed)]()});function a149_0xd04d(_0x5ab481,_0x56c1fe){_0x5ab481=_0x5ab481-0x1e0;const _0x155092=a149_0x1550();let _0xd04d1=_0x155092[_0x5ab481];return _0xd04d1;}export const JourneyDefSchema=z[a149_0x402d9d(0x1fb)](()=>z[a149_0x402d9d(0x203)]({'type':z[a149_0x402d9d(0x1eb)]('journey'),'name':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ee)](0x1,a149_0x402d9d(0x1f4)),'description':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'bundle_id':z['string']()['optional'](),'bundle_name':z[a149_0x402d9d(0x200)]()['optional'](),'folder_id':z['string']()[a149_0x402d9d(0x1ed)](),'reentry':ReentryModeTypeSchema[a149_0x402d9d(0x1ed)](),'allow_reentry':z[a149_0x402d9d(0x1ea)]()[a149_0x402d9d(0x1ed)](),'goal':CriteriaDefSchema[a149_0x402d9d(0x1ed)](),'id':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'version':z[a149_0x402d9d(0x200)]()[a149_0x402d9d(0x1ed)](),'version_number':z[a149_0x402d9d(0x201)]()['optional'](),'stages':z[a149_0x402d9d(0x1e7)](StageDefSchema)[a149_0x402d9d(0x1ed)](),'versions':z[a149_0x402d9d(0x1e7)](JourneyEntryDefSchema)[a149_0x402d9d(0x1ed)](),'journeys':z[a149_0x402d9d(0x1e7)](JourneyEntryDefSchema)['optional'](),'segments':z[a149_0x402d9d(0x1e5)](z[a149_0x402d9d(0x200)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a149_0x402d9d(0x1e5)](z[a149_0x402d9d(0x200)](),ActivationDefSchema)['optional']()})['refine'](_0x264803=>{const _0x503999=a149_0x402d9d,_0x4c21d1=[_0x264803[_0x503999(0x1f6)],_0x264803[_0x503999(0x1f2)],_0x264803['versions']]['filter'](_0x2acc80=>Array[_0x503999(0x1e6)](_0x2acc80)&&_0x2acc80[_0x503999(0x204)]>0x0)['length'];return _0x4c21d1===0x1;},{'message':a149_0x402d9d(0x1f7)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a149_0x28d9ab=a149_0x4b48;(function(_0x44af7d,_0x3ae31b){const _0x20c3d2=a149_0x4b48,_0x52ec9f=_0x44af7d();while(!![]){try{const _0x24629c=-parseInt(_0x20c3d2(0x1bf))/0x1+-parseInt(_0x20c3d2(0x1b9))/0x2*(-parseInt(_0x20c3d2(0x1c0))/0x3)+parseInt(_0x20c3d2(0x1b8))/0x4+parseInt(_0x20c3d2(0x1c1))/0x5+-parseInt(_0x20c3d2(0x1b4))/0x6*(parseInt(_0x20c3d2(0x1c4))/0x7)+parseInt(_0x20c3d2(0x1b5))/0x8*(parseInt(_0x20c3d2(0x1d0))/0x9)+parseInt(_0x20c3d2(0x1b1))/0xa;if(_0x24629c===_0x3ae31b)break;else _0x52ec9f['push'](_0x52ec9f['shift']());}catch(_0x5160f1){_0x52ec9f['push'](_0x52ec9f['shift']());}}}(a149_0x40e6,0xe043e));function a149_0x40e6(){const _0x301ab1=['3928149obxCHH','1545420uPMtbR','filter','isArray','7EpUURk','simulation','literal','ab_test','reentry_unless_goal_achieved','length','type','array','enum','week','jump','wait','342afWOGc','optional','discriminatedUnion','lazy','day','activation','passthrough','number','object','decision_point','end','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','draft','9322370syuweE','min','boolean','9464550GTrwMn','36056RgVYYK','record','journey','2972576gSighE','2yXnDZF','Journey\x20name\x20is\x20required','string','launched','no_reentry','merge','969099GooIHJ'];a149_0x40e6=function(){return _0x301ab1;};return a149_0x40e6();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1dc),a149_0x28d9ab(0x1c5),a149_0x28d9ab(0x1bc)]);export const ReentryModeTypeSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1bd),a149_0x28d9ab(0x1c8),'reentry_always']);function a149_0x4b48(_0x271285,_0x182842){_0x271285=_0x271285-0x1b1;const _0x40e677=a149_0x40e6();let _0x4b48ae=_0x40e677[_0x271285];return _0x4b48ae;}export const WaitUnitTypeSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1d4),a149_0x28d9ab(0x1cd)]);export const StepTypeValueSchema=z[a149_0x28d9ab(0x1cc)]([a149_0x28d9ab(0x1cf),a149_0x28d9ab(0x1d5),a149_0x28d9ab(0x1d9),a149_0x28d9ab(0x1c7),a149_0x28d9ab(0x1be),a149_0x28d9ab(0x1ce),a149_0x28d9ab(0x1da)]);export const EmbeddedSegmentDefSchema=z[a149_0x28d9ab(0x1d8)]({'description':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a149_0x28d9ab(0x1d8)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)]()});export const CriteriaDefSchema=z[a149_0x28d9ab(0x1d8)]({'name':z[a149_0x28d9ab(0x1bb)](),'description':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'segment':z[a149_0x28d9ab(0x1bb)](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z[a149_0x28d9ab(0x1d8)]({'duration':z[a149_0x28d9ab(0x1d7)](),'unit':WaitUnitTypeSchema,'next':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)]()}),WaitConditionDefSchema=z[a149_0x28d9ab(0x1d8)]({'segment':z[a149_0x28d9ab(0x1bb)](),'next':z[a149_0x28d9ab(0x1bb)]()['optional'](),'timeout':WaitConditionTimeoutDefSchema[a149_0x28d9ab(0x1d1)]()}),WaitStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'duration':z['number']()[a149_0x28d9ab(0x1d1)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'condition':WaitConditionDefSchema[a149_0x28d9ab(0x1d1)](),'days_of_week':z[a149_0x28d9ab(0x1cb)](z[a149_0x28d9ab(0x1bb)]())[a149_0x28d9ab(0x1d1)]()}),StepBaseFields={'name':z[a149_0x28d9ab(0x1bb)](),'uuid':z['string']()[a149_0x28d9ab(0x1d1)](),'next':z[a149_0x28d9ab(0x1bb)]()['optional']()},WaitStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z['literal'](a149_0x28d9ab(0x1cf)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'activation':z[a149_0x28d9ab(0x1bb)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a149_0x28d9ab(0x1d8)]({'name':z[a149_0x28d9ab(0x1bb)](),'segment':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'segment_id':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'excluded':z['boolean']()['optional'](),'next':z['string']()[a149_0x28d9ab(0x1d1)]()}),DecisionPointStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'branches':z[a149_0x28d9ab(0x1cb)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1d9)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a149_0x28d9ab(0x1d8)]({'id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'name':z[a149_0x28d9ab(0x1bb)](),'percentage':z[a149_0x28d9ab(0x1d7)](),'next':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)]()}),AbTestStepParamsDefSchema=z[a149_0x28d9ab(0x1d8)]({'variants':z[a149_0x28d9ab(0x1cb)](AbTestVariantDefSchema),'unique_id':z['string']()[a149_0x28d9ab(0x1d1)](),'customized_split':z[a149_0x28d9ab(0x1b3)]()[a149_0x28d9ab(0x1d1)]()}),AbTestStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1c7)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1be))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z['literal'](a149_0x28d9ab(0x1ce)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a149_0x28d9ab(0x1d8)]({...StepBaseFields,'type':z['literal']('end')})[a149_0x28d9ab(0x1d6)]();export const StepDefSchema=z[a149_0x28d9ab(0x1d2)](a149_0x28d9ab(0x1ca),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a149_0x28d9ab(0x1bb)](),'description':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a149_0x28d9ab(0x1cb)](CriteriaDefSchema)[a149_0x28d9ab(0x1d1)](),'milestone':CriteriaDefSchema[a149_0x28d9ab(0x1d1)](),'root_step':z[a149_0x28d9ab(0x1bb)]()['optional'](),'steps':z[a149_0x28d9ab(0x1cb)](StepDefSchema)[a149_0x28d9ab(0x1d1)]()});export const JourneyEntryDefSchema=z[a149_0x28d9ab(0x1d8)]({'name':z['string']()['optional'](),'version':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'state':JourneyStateTypeSchema[a149_0x28d9ab(0x1d1)](),'latest':z[a149_0x28d9ab(0x1b3)]()['optional'](),'stages':z[a149_0x28d9ab(0x1cb)](StageDefSchema),'id':z['string']()[a149_0x28d9ab(0x1d1)](),'version_number':z[a149_0x28d9ab(0x1d7)]()[a149_0x28d9ab(0x1d1)](),'goal':CriteriaDefSchema[a149_0x28d9ab(0x1d1)](),'reentry':ReentryModeTypeSchema[a149_0x28d9ab(0x1d1)]()});export const JourneyDefSchema=z[a149_0x28d9ab(0x1d3)](()=>z['object']({'type':z[a149_0x28d9ab(0x1c6)](a149_0x28d9ab(0x1b7)),'name':z['string']()[a149_0x28d9ab(0x1b2)](0x1,a149_0x28d9ab(0x1ba)),'description':z['string']()[a149_0x28d9ab(0x1d1)](),'bundle_id':z['string']()[a149_0x28d9ab(0x1d1)](),'bundle_name':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'folder_id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'reentry':ReentryModeTypeSchema[a149_0x28d9ab(0x1d1)](),'allow_reentry':z[a149_0x28d9ab(0x1b3)]()[a149_0x28d9ab(0x1d1)](),'goal':CriteriaDefSchema[a149_0x28d9ab(0x1d1)](),'id':z[a149_0x28d9ab(0x1bb)]()['optional'](),'version':z[a149_0x28d9ab(0x1bb)]()[a149_0x28d9ab(0x1d1)](),'version_number':z['number']()[a149_0x28d9ab(0x1d1)](),'stages':z[a149_0x28d9ab(0x1cb)](StageDefSchema)[a149_0x28d9ab(0x1d1)](),'versions':z[a149_0x28d9ab(0x1cb)](JourneyEntryDefSchema)[a149_0x28d9ab(0x1d1)](),'journeys':z['array'](JourneyEntryDefSchema)[a149_0x28d9ab(0x1d1)](),'segments':z[a149_0x28d9ab(0x1b6)](z[a149_0x28d9ab(0x1bb)](),EmbeddedSegmentDefSchema)[a149_0x28d9ab(0x1d1)](),'activations':z[a149_0x28d9ab(0x1b6)](z[a149_0x28d9ab(0x1bb)](),ActivationDefSchema)[a149_0x28d9ab(0x1d1)]()})['refine'](_0x2d4904=>{const _0x5d7b70=a149_0x28d9ab,_0xf84196=[_0x2d4904['journeys'],_0x2d4904['stages'],_0x2d4904['versions']][_0x5d7b70(0x1c2)](_0x51e68a=>Array[_0x5d7b70(0x1c3)](_0x51e68a)&&_0x51e68a[_0x5d7b70(0x1c9)]>0x0)[_0x5d7b70(0x1c9)];return _0xf84196===0x1;},{'message':a149_0x28d9ab(0x1db)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x169479,_0xa68251){var _0x2e637a=a151_0x4262,_0x2d7098=_0x169479();while(!![]){try{var _0x446666=-parseInt(_0x2e637a(0x1cc))/0x1*(-parseInt(_0x2e637a(0x1d2))/0x2)+-parseInt(_0x2e637a(0x1d4))/0x3*(parseInt(_0x2e637a(0x1d0))/0x4)+-parseInt(_0x2e637a(0x1ce))/0x5+-parseInt(_0x2e637a(0x1d3))/0x6*(-parseInt(_0x2e637a(0x1d6))/0x7)+parseInt(_0x2e637a(0x1d1))/0x8+-parseInt(_0x2e637a(0x1d5))/0x9+-parseInt(_0x2e637a(0x1cd))/0xa*(parseInt(_0x2e637a(0x1cf))/0xb);if(_0x446666===_0xa68251)break;else _0x2d7098['push'](_0x2d7098['shift']());}catch(_0x567178){_0x2d7098['push'](_0x2d7098['shift']());}}}(a151_0x8398,0xf2dff));function a151_0x4262(_0x5e02e3,_0x5660bb){_0x5e02e3=_0x5e02e3-0x1cc;var _0x83981b=a151_0x8398();var _0x426211=_0x83981b[_0x5e02e3];return _0x426211;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a151_0x8398(){var _0x1fbb97=['2696036AYprvC','2wQOcbG','2410eEtEES','7069810iKGqoD','23705dDZLrw','1231612QZaIhY','11985392adZUUK','1624762AGkttV','6zlQwHE','3MWIxaW','2448441kuJUpH'];a151_0x8398=function(){return _0x1fbb97;};return a151_0x8398();}
1
+ (function(_0x4cdbca,_0xfa3c79){var _0x4bd7bb=a151_0x27bc,_0xc29e15=_0x4cdbca();while(!![]){try{var _0x2ea3ad=parseInt(_0x4bd7bb(0xf1))/0x1*(parseInt(_0x4bd7bb(0xf7))/0x2)+parseInt(_0x4bd7bb(0xf2))/0x3+-parseInt(_0x4bd7bb(0xf4))/0x4+-parseInt(_0x4bd7bb(0xf8))/0x5*(parseInt(_0x4bd7bb(0xf9))/0x6)+-parseInt(_0x4bd7bb(0xf3))/0x7*(-parseInt(_0x4bd7bb(0xfa))/0x8)+-parseInt(_0x4bd7bb(0xf5))/0x9+parseInt(_0x4bd7bb(0xf6))/0xa;if(_0x2ea3ad===_0xfa3c79)break;else _0xc29e15['push'](_0xc29e15['shift']());}catch(_0x3affed){_0xc29e15['push'](_0xc29e15['shift']());}}}(a151_0x47ab,0x2c568));function a151_0x47ab(){var _0x3dd6bd=['114KiklXw','2062024FymiOr','36386rGnqKv','838770TcGsqO','7iJbsRu','815752TnRiRO','1139157qwhgdF','255580ihwBdn','10iKZSwj','61240CGuIYb'];a151_0x47ab=function(){return _0x3dd6bd;};return a151_0x47ab();}function a151_0x27bc(_0x383c62,_0xba568a){_0x383c62=_0x383c62-0xf1;var _0x47ab80=a151_0x47ab();var _0x27bc08=_0x47ab80[_0x383c62];return _0x27bc08;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a152_0x44dc78=a152_0x1803;(function(_0x4a9a3f,_0x810976){const _0x16c604=a152_0x1803,_0x145a1a=_0x4a9a3f();while(!![]){try{const _0x4effd6=parseInt(_0x16c604(0xa5))/0x1*(-parseInt(_0x16c604(0xe4))/0x2)+-parseInt(_0x16c604(0xd6))/0x3*(-parseInt(_0x16c604(0xc1))/0x4)+-parseInt(_0x16c604(0x9e))/0x5*(-parseInt(_0x16c604(0xc6))/0x6)+parseInt(_0x16c604(0xab))/0x7+parseInt(_0x16c604(0xcd))/0x8*(parseInt(_0x16c604(0xa8))/0x9)+-parseInt(_0x16c604(0xd7))/0xa*(-parseInt(_0x16c604(0xaf))/0xb)+parseInt(_0x16c604(0xb6))/0xc*(-parseInt(_0x16c604(0xa9))/0xd);if(_0x4effd6===_0x810976)break;else _0x145a1a['push'](_0x145a1a['shift']());}catch(_0x554ff0){_0x145a1a['push'](_0x145a1a['shift']());}}}(a152_0x1070,0x6ec8b));function a152_0x1070(){const _0xf42b76=['Max','Regexp','day','discriminatedUnion','number','1tngQfV','Operator\x20\x27','column','124659qPDIiP','39aSEPqb','type','932162gRGLvV','boolean','TimeWithinNext','operator','73513rhoNbc','second','addIssue','GreaterEqual','Last','And','MISSING_BETWEEN_BOUNDS','8054052MTnQBY','enum','Segment\x20name\x20is\x20required','LessEqual','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','custom','literal','object','Value','duration','Min','54052TJzdMI','StartWith','CountDistinct','has','TimeRange\x20operator\x20requires\x20\x27from\x27','143118kGtqHY','Contain','Less','batch','Average','Behavior','Column','352yAnjrx','unit','Greater','Segment\x20reference\x20must\x20not\x20be\x20empty','IsNull','superRefine','union','lazy','EndWith','198NHRFiU','880DjiDhH','array','funnel_stage','TimeWithinPast','record','any','optional','Between','string','all','Equal','hour','TimeRange','1227992zCVibk','TimeRange\x20operator\x20requires\x20\x27duration\x27','value','\x27\x20requires\x20a\x20time\x20unit','Count','min','realtime','Sum','180HYpDCO','from'];a152_0x1070=function(){return _0xf42b76;};return a152_0x1070();}import{z}from'zod';export const OperatorTypeSchema=z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xe1),a152_0x44dc78(0xcf),a152_0x44dc78(0xc8),a152_0x44dc78(0xb2),a152_0x44dc78(0xb9),'In',a152_0x44dc78(0xde),a152_0x44dc78(0xa1),a152_0x44dc78(0xd1),a152_0x44dc78(0xda),a152_0x44dc78(0xad),a152_0x44dc78(0xc7),a152_0x44dc78(0xc2),a152_0x44dc78(0xd5),a152_0x44dc78(0xe3)]);export const TimeUnitSchema=z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xb0),'minute',a152_0x44dc78(0xe2),a152_0x44dc78(0xa2),'week','month','year']);export const AggregationTypeSchema=z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0x9a),'Sum',a152_0x44dc78(0xca),a152_0x44dc78(0xc0),'Max',a152_0x44dc78(0xc3),'First',a152_0x44dc78(0xb3)]);const TemporalValueSchema=z['union']([z[a152_0x44dc78(0xbd)]({'timestamp':z[a152_0x44dc78(0xdf)]()}),z[a152_0x44dc78(0xbd)]({'last':z['union']([z['number'](),z[a152_0x44dc78(0xdb)](z['string'](),z['number']())]),'unit':z[a152_0x44dc78(0xdf)]()})]),OperatorValueSchema=z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xdf)](),z[a152_0x44dc78(0xa4)](),z['boolean'](),TemporalValueSchema,z['array'](z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xdf)](),z[a152_0x44dc78(0xa4)](),z[a152_0x44dc78(0xac)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0x44dc78(0xe1),a152_0x44dc78(0xcf),'GreaterEqual',a152_0x44dc78(0xc8),a152_0x44dc78(0xb9),'In','Contain',a152_0x44dc78(0xc2),a152_0x44dc78(0xd5),a152_0x44dc78(0xa1),a152_0x44dc78(0xda),a152_0x44dc78(0xad)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0x44dc78(0xad)]);export const OperatorDefSchema=z[a152_0x44dc78(0xbd)]({'type':OperatorTypeSchema,'not':z[a152_0x44dc78(0xac)]()[a152_0x44dc78(0xdd)](),'value':OperatorValueSchema['optional'](),'min':z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xa4)](),z['string'](),TemporalValueSchema])[a152_0x44dc78(0xdd)](),'max':z['union']([z[a152_0x44dc78(0xa4)](),z['string'](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z['number']()[a152_0x44dc78(0xdd)](),'week':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)](),'month':z['number']()[a152_0x44dc78(0xdd)](),'year':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)](),'hour':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)](),'minute':z['number']()[a152_0x44dc78(0xdd)](),'second':z[a152_0x44dc78(0xa4)]()[a152_0x44dc78(0xdd)]()})[a152_0x44dc78(0xdd)](),'from':z[a152_0x44dc78(0xbd)]({'last':z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xa4)](),z[a152_0x44dc78(0xdf)]()]),'unit':TimeUnitSchema})[a152_0x44dc78(0xdd)](),'reverse':z[a152_0x44dc78(0xac)]()['optional']()})[a152_0x44dc78(0xd2)]((_0x1df6b0,_0x3fdc78)=>{const _0x1350d9=a152_0x44dc78;OPERATORS_REQUIRING_VALUE[_0x1350d9(0xc4)](_0x1df6b0[_0x1350d9(0xaa)])&&(_0x1df6b0['value']===undefined||_0x1df6b0[_0x1350d9(0x98)]===null)&&_0x3fdc78[_0x1350d9(0xb1)]({'code':'custom','message':_0x1350d9(0xa6)+_0x1df6b0['type']+'\x27\x20requires\x20a\x20value','path':[_0x1350d9(0x98)]}),_0x1df6b0[_0x1350d9(0xaa)]==='Between'&&_0x1df6b0['min']===undefined&&_0x1df6b0['max']===undefined&&_0x3fdc78[_0x1350d9(0xb1)]({'code':_0x1350d9(0xbb),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x1350d9(0xb5)}}),OPERATORS_REQUIRING_UNIT[_0x1350d9(0xc4)](_0x1df6b0[_0x1350d9(0xaa)])&&_0x1df6b0[_0x1350d9(0x98)]!==undefined&&!_0x1df6b0[_0x1350d9(0xce)]&&_0x3fdc78[_0x1350d9(0xb1)]({'code':'custom','message':'Operator\x20\x27'+_0x1df6b0['type']+_0x1350d9(0x99),'path':['unit'],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x1df6b0[_0x1350d9(0xaa)]===_0x1350d9(0xe3)&&(!_0x1df6b0[_0x1350d9(0xbf)]&&_0x3fdc78[_0x1350d9(0xb1)]({'code':_0x1350d9(0xbb),'message':_0x1350d9(0x97),'path':['duration']}),!_0x1df6b0[_0x1350d9(0x9f)]&&_0x3fdc78[_0x1350d9(0xb1)]({'code':_0x1350d9(0xbb),'message':_0x1350d9(0xc5),'path':[_0x1350d9(0x9f)]}));});function a152_0x1803(_0x4766d1,_0xeed43f){_0x4766d1=_0x4766d1-0x97;const _0x107017=a152_0x1070();let _0x180384=_0x107017[_0x4766d1];return _0x180384;}export const ArrayMatchingSchema=z[a152_0x44dc78(0xd3)]([z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xdc)),z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xe0)),z[a152_0x44dc78(0xbd)]({'atLeast':z[a152_0x44dc78(0xa4)]()}),z[a152_0x44dc78(0xbd)]({'atMost':z[a152_0x44dc78(0xa4)]()}),z[a152_0x44dc78(0xbd)]({'exactly':z[a152_0x44dc78(0xa4)]()})]);export const AggregationDefSchema=z[a152_0x44dc78(0xa3)](a152_0x44dc78(0xaa),[z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0x9d),a152_0x44dc78(0xc0),a152_0x44dc78(0xa0),a152_0x44dc78(0xca)]),'column':z[a152_0x44dc78(0xdf)](),'groupingColumns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())[a152_0x44dc78(0xdd)]()}),z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0x9a)),'groupingColumns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())[a152_0x44dc78(0xdd)]()}),z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xc3)),'columns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())}),z['object']({'type':z['enum'](['First',a152_0x44dc78(0xb3)]),'column':z[a152_0x44dc78(0xdf)](),'orderColumn':z[a152_0x44dc78(0xdf)](),'groupingColumns':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdf)]())['optional']()})]);export const TimeWindowDefSchema=z[a152_0x44dc78(0xbd)]({'duration':z[a152_0x44dc78(0xa4)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0x44dc78(0xda),'TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xcc)),'column':z[a152_0x44dc78(0xdf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x44dc78(0xdd)]()})[a152_0x44dc78(0xd2)]((_0x36a5b1,_0x4b6eab)=>{const _0x5bef5f=a152_0x44dc78,_0x1922e7=_0x36a5b1['operator'][_0x5bef5f(0xaa)];_0x36a5b1[_0x5bef5f(0xa7)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x5bef5f(0xc4)](_0x1922e7)&&_0x4b6eab[_0x5bef5f(0xb1)]({'code':_0x5bef5f(0xbb),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x1922e7+'\x27)','path':[_0x5bef5f(0xae),_0x5bef5f(0xaa)]}):TIMESTAMP_OPERATORS[_0x5bef5f(0xc4)](_0x1922e7)&&_0x4b6eab[_0x5bef5f(0xb1)]({'code':_0x5bef5f(0xbb),'message':_0x5bef5f(0xa6)+_0x1922e7+_0x5bef5f(0xba),'path':[_0x5bef5f(0xae),_0x5bef5f(0xaa)]});});export const FilterRuleDefSchema=z[a152_0x44dc78(0xbd)]({'type':z['literal'](a152_0x44dc78(0xb4)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xbe)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x44dc78(0xdd)](),'exclude':z['boolean']()[a152_0x44dc78(0xdd)](),'aggregation':AggregationDefSchema[a152_0x44dc78(0xdd)](),'source':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)](),'filter':FilterRuleDefSchema[a152_0x44dc78(0xdd)](),'limit':z['number']()[a152_0x44dc78(0xdd)]()}));export const BehaviorConditionDefSchema=z[a152_0x44dc78(0xd4)](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xcb)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0x44dc78(0xdd)](),'exclude':z[a152_0x44dc78(0xac)]()[a152_0x44dc78(0xdd)](),'aggregation':AggregationDefSchema[a152_0x44dc78(0xdd)](),'source':z[a152_0x44dc78(0xdf)]()['optional'](),'filter':FilterRuleDefSchema[a152_0x44dc78(0xdd)](),'timeWindow':TimeWindowDefSchema[a152_0x44dc78(0xdd)](),'limit':z[a152_0x44dc78(0xa4)]()['optional']()}));export const ColumnConditionDefSchema=z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)](a152_0x44dc78(0xcc)),'column':z[a152_0x44dc78(0xdf)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xb4),'Or']),'conditions':z[a152_0x44dc78(0xd8)](ConditionDefSchema),'description':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)]()}));export const SegmentRefConditionDefSchema=z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)](['include','exclude']),'segment':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0x9b)](0x1,a152_0x44dc78(0xd0))});export const ConditionDefSchema=z[a152_0x44dc78(0xd4)](()=>z[a152_0x44dc78(0xd3)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a152_0x44dc78(0xd4)](()=>z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xb4),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)]()}));export const SegmentDefSchema=z[a152_0x44dc78(0xbd)]({'type':z[a152_0x44dc78(0xbc)]('segment')[a152_0x44dc78(0xdd)](),'name':z[a152_0x44dc78(0xdf)]()['min'](0x1,a152_0x44dc78(0xb8)),'description':z['string']()[a152_0x44dc78(0xdd)](),'folder':z[a152_0x44dc78(0xdf)]()[a152_0x44dc78(0xdd)](),'rule':RuleDefSchema[a152_0x44dc78(0xdd)](),'kind':z[a152_0x44dc78(0xb7)]([a152_0x44dc78(0xc9),a152_0x44dc78(0x9c),a152_0x44dc78(0xd9)])[a152_0x44dc78(0xdd)](),'visible':z[a152_0x44dc78(0xac)]()[a152_0x44dc78(0xdd)](),'activations':z[a152_0x44dc78(0xd8)](z[a152_0x44dc78(0xdc)]())[a152_0x44dc78(0xdd)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a152_0xf1e1b0=a152_0x35c7;(function(_0x44033c,_0x292059){const _0x357fec=a152_0x35c7,_0x5eb782=_0x44033c();while(!![]){try{const _0x2560cf=parseInt(_0x357fec(0x213))/0x1+-parseInt(_0x357fec(0x229))/0x2*(parseInt(_0x357fec(0x208))/0x3)+-parseInt(_0x357fec(0x218))/0x4*(-parseInt(_0x357fec(0x226))/0x5)+-parseInt(_0x357fec(0x207))/0x6+parseInt(_0x357fec(0x203))/0x7*(parseInt(_0x357fec(0x1f3))/0x8)+parseInt(_0x357fec(0x204))/0x9*(parseInt(_0x357fec(0x21e))/0xa)+parseInt(_0x357fec(0x202))/0xb*(-parseInt(_0x357fec(0x231))/0xc);if(_0x2560cf===_0x292059)break;else _0x5eb782['push'](_0x5eb782['shift']());}catch(_0x3fb05c){_0x5eb782['push'](_0x5eb782['shift']());}}}(a152_0x475c,0xeb82e));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a152_0xf1e1b0(0x1f8),'Greater',a152_0xf1e1b0(0x20c),a152_0xf1e1b0(0x228),a152_0xf1e1b0(0x22b),'In',a152_0xf1e1b0(0x227),a152_0xf1e1b0(0x1ee),a152_0xf1e1b0(0x201),a152_0xf1e1b0(0x20f),a152_0xf1e1b0(0x1eb),a152_0xf1e1b0(0x225),'StartWith',a152_0xf1e1b0(0x235),a152_0xf1e1b0(0x238)]);export const TimeUnitSchema=z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x21a),a152_0xf1e1b0(0x20d),a152_0xf1e1b0(0x236),a152_0xf1e1b0(0x1ec),'week',a152_0xf1e1b0(0x232),a152_0xf1e1b0(0x212)]);export const AggregationTypeSchema=z['enum']([a152_0xf1e1b0(0x217),a152_0xf1e1b0(0x205),a152_0xf1e1b0(0x22f),'Min',a152_0xf1e1b0(0x234),a152_0xf1e1b0(0x1fc),a152_0xf1e1b0(0x221),a152_0xf1e1b0(0x216)]);const TemporalValueSchema=z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x1fd)]({'timestamp':z['string']()}),z[a152_0xf1e1b0(0x1fd)]({'last':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x211)](z['string'](),z[a152_0xf1e1b0(0x20a)]())]),'unit':z[a152_0xf1e1b0(0x22d)]()})]),OperatorValueSchema=z['union']([z['string'](),z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22e)](),TemporalValueSchema,z[a152_0xf1e1b0(0x1fe)](z['union']([z[a152_0xf1e1b0(0x22d)](),z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22e)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a152_0xf1e1b0(0x1f8),'Greater',a152_0xf1e1b0(0x228),'Less',a152_0xf1e1b0(0x22b),'In',a152_0xf1e1b0(0x225),a152_0xf1e1b0(0x22a),a152_0xf1e1b0(0x235),'Regexp',a152_0xf1e1b0(0x20f),a152_0xf1e1b0(0x1eb)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a152_0xf1e1b0(0x1eb)]);export const OperatorDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':OperatorTypeSchema,'not':z['boolean']()[a152_0xf1e1b0(0x1fa)](),'value':OperatorValueSchema[a152_0xf1e1b0(0x1fa)](),'min':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22d)](),TemporalValueSchema])['optional'](),'max':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z['string'](),TemporalValueSchema])[a152_0xf1e1b0(0x1fa)](),'unit':TimeUnitSchema['optional'](),'duration':z[a152_0xf1e1b0(0x1fd)]({'day':z[a152_0xf1e1b0(0x20a)]()['optional'](),'week':z['number']()['optional'](),'month':z['number']()[a152_0xf1e1b0(0x1fa)](),'year':z[a152_0xf1e1b0(0x20a)]()[a152_0xf1e1b0(0x1fa)](),'hour':z['number']()['optional'](),'minute':z['number']()[a152_0xf1e1b0(0x1fa)](),'second':z[a152_0xf1e1b0(0x20a)]()[a152_0xf1e1b0(0x1fa)]()})[a152_0xf1e1b0(0x1fa)](),'from':z['object']({'last':z[a152_0xf1e1b0(0x1e8)]([z[a152_0xf1e1b0(0x20a)](),z[a152_0xf1e1b0(0x22d)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a152_0xf1e1b0(0x22e)]()[a152_0xf1e1b0(0x1fa)]()})[a152_0xf1e1b0(0x21b)]((_0x3ee651,_0x30ffe5)=>{const _0x474ab4=a152_0xf1e1b0;OPERATORS_REQUIRING_VALUE[_0x474ab4(0x1f4)](_0x3ee651[_0x474ab4(0x21f)])&&(_0x3ee651[_0x474ab4(0x1f9)]===undefined||_0x3ee651['value']===null)&&_0x30ffe5[_0x474ab4(0x219)]({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x222)+_0x3ee651['type']+_0x474ab4(0x22c),'path':[_0x474ab4(0x1f9)]}),_0x3ee651[_0x474ab4(0x21f)]===_0x474ab4(0x227)&&_0x3ee651[_0x474ab4(0x1f6)]===undefined&&_0x3ee651[_0x474ab4(0x1ed)]===undefined&&_0x30ffe5[_0x474ab4(0x219)]({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x1f2),'params':{'validationCode':_0x474ab4(0x239)}}),OPERATORS_REQUIRING_UNIT['has'](_0x3ee651[_0x474ab4(0x21f)])&&_0x3ee651['value']!==undefined&&!_0x3ee651[_0x474ab4(0x1f7)]&&_0x30ffe5[_0x474ab4(0x219)]({'code':'custom','message':'Operator\x20\x27'+_0x3ee651[_0x474ab4(0x21f)]+_0x474ab4(0x223),'path':[_0x474ab4(0x1f7)],'params':{'validationCode':_0x474ab4(0x1ff)}}),_0x3ee651['type']===_0x474ab4(0x238)&&(!_0x3ee651[_0x474ab4(0x215)]&&_0x30ffe5[_0x474ab4(0x219)]({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x206),'path':[_0x474ab4(0x215)]}),!_0x3ee651['from']&&_0x30ffe5['addIssue']({'code':_0x474ab4(0x23a),'message':_0x474ab4(0x21d),'path':[_0x474ab4(0x230)]}));});export const ArrayMatchingSchema=z[a152_0xf1e1b0(0x1e8)]([z['literal']('any'),z[a152_0xf1e1b0(0x224)]('all'),z[a152_0xf1e1b0(0x1fd)]({'atLeast':z['number']()}),z[a152_0xf1e1b0(0x1fd)]({'atMost':z['number']()}),z[a152_0xf1e1b0(0x1fd)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a152_0xf1e1b0(0x1f5)]('type',[z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x205),a152_0xf1e1b0(0x200),a152_0xf1e1b0(0x234),'Average']),'column':z['string'](),'groupingColumns':z['array'](z[a152_0xf1e1b0(0x22d)]())['optional']()}),z['object']({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x217)),'groupingColumns':z[a152_0xf1e1b0(0x1fe)](z[a152_0xf1e1b0(0x22d)]())[a152_0xf1e1b0(0x1fa)]()}),z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x1fc)),'columns':z[a152_0xf1e1b0(0x1fe)](z[a152_0xf1e1b0(0x22d)]())}),z['object']({'type':z[a152_0xf1e1b0(0x1ea)](['First','Last']),'column':z[a152_0xf1e1b0(0x22d)](),'orderColumn':z['string'](),'groupingColumns':z[a152_0xf1e1b0(0x1fe)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a152_0xf1e1b0(0x20f),a152_0xf1e1b0(0x1eb),'TimeRange']);export const FilterColumnConditionDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)]('Column'),'column':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0xf1e1b0(0x1fa)]()})[a152_0xf1e1b0(0x21b)]((_0x5b0ce9,_0x54dd21)=>{const _0x3f284b=a152_0xf1e1b0,_0x4b61ce=_0x5b0ce9['operator'][_0x3f284b(0x21f)];_0x5b0ce9[_0x3f284b(0x220)]===_0x3f284b(0x237)?!TIMESTAMP_OPERATORS[_0x3f284b(0x1f4)](_0x4b61ce)&&_0x54dd21['addIssue']({'code':_0x3f284b(0x23a),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x4b61ce+'\x27)','path':[_0x3f284b(0x1f0),'type']}):TIMESTAMP_OPERATORS['has'](_0x4b61ce)&&_0x54dd21['addIssue']({'code':_0x3f284b(0x23a),'message':_0x3f284b(0x222)+_0x4b61ce+_0x3f284b(0x1f1),'path':[_0x3f284b(0x1f0),_0x3f284b(0x21f)]});});export const FilterRuleDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x1ef)),'conditions':z[a152_0xf1e1b0(0x1fe)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z['object']({'type':z['literal']('Value'),'attribute':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0xf1e1b0(0x1fa)](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)](),'filter':FilterRuleDefSchema[a152_0xf1e1b0(0x1fa)](),'limit':z[a152_0xf1e1b0(0x20a)]()['optional']()}));export const BehaviorConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z['object']({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x20e)),'attribute':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a152_0xf1e1b0(0x1fa)](),'exclude':z[a152_0xf1e1b0(0x22e)]()[a152_0xf1e1b0(0x1fa)](),'aggregation':AggregationDefSchema[a152_0xf1e1b0(0x1fa)](),'source':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)](),'filter':FilterRuleDefSchema[a152_0xf1e1b0(0x1fa)](),'timeWindow':TimeWindowDefSchema[a152_0xf1e1b0(0x1fa)](),'limit':z[a152_0xf1e1b0(0x20a)]()[a152_0xf1e1b0(0x1fa)]()}));function a152_0x35c7(_0x2403fc,_0x5b3808){_0x2403fc=_0x2403fc-0x1e8;const _0x475c0=a152_0x475c();let _0x35c7ad=_0x475c0[_0x2403fc];return _0x35c7ad;}export const ColumnConditionDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x23b)),'column':z[a152_0xf1e1b0(0x22d)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x1ef),'Or']),'conditions':z[a152_0xf1e1b0(0x1fe)](ConditionDefSchema),'description':z['string']()[a152_0xf1e1b0(0x1fa)]()}));export const SegmentRefConditionDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x210),'exclude']),'segment':z[a152_0xf1e1b0(0x22d)]()['min'](0x1,a152_0xf1e1b0(0x20b))});export const ConditionDefSchema=z[a152_0xf1e1b0(0x21c)](()=>z[a152_0xf1e1b0(0x1e8)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z['object']({'type':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x1ef),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)]()}));function a152_0x475c(){const _0x177c7d=['Count','20xwQMWL','addIssue','second','superRefine','lazy','TimeRange\x20operator\x20requires\x20\x27from\x27','19176030ybEENa','type','column','First','Operator\x20\x27','\x27\x20requires\x20a\x20time\x20unit','literal','Contain','122890qkMYZV','Between','GreaterEqual','24yChsvY','StartWith','LessEqual','\x27\x20requires\x20a\x20value','string','boolean','Average','from','204JdbbhG','month','funnel_stage','Max','EndWith','hour','timestamp','TimeRange','MISSING_BETWEEN_BOUNDS','custom','Column','Segment\x20name\x20is\x20required','union','realtime','enum','TimeWithinNext','day','max','Regexp','And','operator','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','656HPtHPz','has','discriminatedUnion','min','unit','Equal','value','optional','segment','CountDistinct','object','array','MISSING_TIME_UNIT','Min','IsNull','595342aFZHic','7329gErXVz','9ZjwttE','Sum','TimeRange\x20operator\x20requires\x20\x27duration\x27','7845900msVjke','135021CbmUbI','batch','number','Segment\x20reference\x20must\x20not\x20be\x20empty','Less','minute','Behavior','TimeWithinPast','include','record','year','1606115ivjmFg','any','duration','Last'];a152_0x475c=function(){return _0x177c7d;};return a152_0x475c();}export const SegmentDefSchema=z[a152_0xf1e1b0(0x1fd)]({'type':z[a152_0xf1e1b0(0x224)](a152_0xf1e1b0(0x1fb))[a152_0xf1e1b0(0x1fa)](),'name':z[a152_0xf1e1b0(0x22d)]()['min'](0x1,a152_0xf1e1b0(0x23c)),'description':z['string']()[a152_0xf1e1b0(0x1fa)](),'folder':z[a152_0xf1e1b0(0x22d)]()[a152_0xf1e1b0(0x1fa)](),'rule':RuleDefSchema[a152_0xf1e1b0(0x1fa)](),'kind':z[a152_0xf1e1b0(0x1ea)]([a152_0xf1e1b0(0x209),a152_0xf1e1b0(0x1e9),a152_0xf1e1b0(0x233)])['optional'](),'visible':z[a152_0xf1e1b0(0x22e)]()[a152_0xf1e1b0(0x1fa)](),'activations':z[a152_0xf1e1b0(0x1fe)](z[a152_0xf1e1b0(0x214)]())[a152_0xf1e1b0(0x1fa)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a153_0x3f04b2=a153_0x4a15;(function(_0xb1eef8,_0x121094){const _0x368240=a153_0x4a15,_0x4a67c6=_0xb1eef8();while(!![]){try{const _0x328579=-parseInt(_0x368240(0x1cf))/0x1*(-parseInt(_0x368240(0x1db))/0x2)+-parseInt(_0x368240(0x1d1))/0x3+parseInt(_0x368240(0x1d3))/0x4*(parseInt(_0x368240(0x1c4))/0x5)+parseInt(_0x368240(0x1d9))/0x6*(parseInt(_0x368240(0x1cd))/0x7)+-parseInt(_0x368240(0x1e0))/0x8*(parseInt(_0x368240(0x1c3))/0x9)+parseInt(_0x368240(0x1c7))/0xa+-parseInt(_0x368240(0x1d5))/0xb;if(_0x328579===_0x121094)break;else _0x4a67c6['push'](_0x4a67c6['shift']());}catch(_0x3d670a){_0x4a67c6['push'](_0x4a67c6['shift']());}}}(a153_0x1ed0,0xb68b5));function a153_0x4a15(_0x337a50,_0x110df6){_0x337a50=_0x337a50-0x1c2;const _0x1ed076=a153_0x1ed0();let _0x4a1517=_0x1ed076[_0x337a50];return _0x4a1517;}import{readFileSync}from'fs';import*as a153_0x5e65ce from'path';import*as a153_0x195645 from'yaml';function a153_0x1ed0(){const _0x184092=['filterType','email','utf-8','500160KUOZbU','basename','type','parseDocument','180dINGQX','135GduFUm','push','message','5399710khzONr','object','warnings','campaign_type','campaign','result','49lzCgnL','journey','14oEEobH','relative','2846181UtNJRe','map','106416iVKLCA','valid','3326070SAeACC','YAML\x20parse\x20error:\x20','template','toJSON','1113126kwlUkq','skipped','98896KdBQRd','YAML_PARSE_ERROR'];a153_0x1ed0=function(){return _0x184092;};return a153_0x1ed0();}import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a153_0x3f04b2(0x1de),a153_0x3f04b2(0x1c5)]);export function isJourneyDef(_0x13eae7){const _0x3fa0bc=a153_0x3f04b2;return typeof _0x13eae7===_0x3fa0bc(0x1c8)&&_0x13eae7!==null&&_0x3fa0bc(0x1e2)in _0x13eae7&&_0x13eae7['type']===_0x3fa0bc(0x1ce);}export function isCampaignDef(_0x342a34){const _0x5c8b87=a153_0x3f04b2;if(typeof _0x342a34!==_0x5c8b87(0x1c8)||_0x342a34===null)return![];const _0x159fde=_0x342a34,_0x5059ae=VALID_CAMPAIGN_TYPES['has'](_0x159fde[_0x5c8b87(0x1ca)]);if(_0x159fde[_0x5c8b87(0x1e2)]===_0x5c8b87(0x1cb)&&_0x5059ae)return!![];if(_0x5059ae&&!_0x159fde['type'])return!![];return![];}export function isTemplateDef(_0x34503a){const _0x494751=a153_0x3f04b2;return typeof _0x34503a===_0x494751(0x1c8)&&_0x34503a!==null&&_0x494751(0x1e2)in _0x34503a&&_0x34503a[_0x494751(0x1e2)]===_0x494751(0x1d7);}export function isValidationResult(_0x227258){const _0x128997=a153_0x3f04b2;return!(_0x128997(0x1da)in _0x227258);}export function createParseErrorResult(_0x49bed5,_0x9cb78f,_0x2ee889,_0x2103c1,_0x502ba1='segment'){const _0x1d00ef=a153_0x3f04b2;return{'filePath':_0x49bed5,'relativePath':_0x9cb78f,'source':_0x2ee889,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x1d00ef(0x1dc),'message':_0x2103c1}],'warnings':[]},'fileType':_0x502ba1};}export function validateYamlFile(_0x500a6f,_0xcbe5e9,_0x322cbf={}){const _0xd4d629=a153_0x3f04b2,_0x13e838=a153_0x5e65ce[_0xd4d629(0x1d0)](_0xcbe5e9,_0x500a6f)||a153_0x5e65ce[_0xd4d629(0x1e1)](_0x500a6f);try{const _0x1ca0c2=readFileSync(_0x500a6f,_0xd4d629(0x1df)),_0x51e264=a153_0x195645[_0xd4d629(0x1c2)](_0x1ca0c2),_0xe6de20=_0x51e264[_0xd4d629(0x1d8)]();if(!_0xe6de20)return createParseErrorResult(_0x500a6f,_0x13e838,_0x1ca0c2,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x43c5f3;if(isJourneyDef(_0xe6de20))_0x43c5f3='journey';else{if(isCampaignDef(_0xe6de20))_0x43c5f3=_0xd4d629(0x1cb);else isTemplateDef(_0xe6de20)?_0x43c5f3=_0xd4d629(0x1d7):_0x43c5f3='segment';}if(_0x322cbf['filterType']&&_0x43c5f3!==_0x322cbf[_0xd4d629(0x1dd)])return{'filePath':_0x500a6f,'relativePath':_0x13e838,'skipped':!![],'reason':'not\x20a\x20'+_0x322cbf[_0xd4d629(0x1dd)]};const _0x1aff30={'source':_0x1ca0c2,'document':_0x51e264};let _0x262741;if(_0x43c5f3===_0xd4d629(0x1ce))_0x262741=validateJourneyDef(_0xe6de20,_0x1aff30);else{if(_0x43c5f3===_0xd4d629(0x1cb))_0x262741=validateCampaignDef(_0xe6de20,_0x1aff30);else _0x43c5f3===_0xd4d629(0x1d7)?_0x262741=validateTemplateDef(_0xe6de20,_0x1aff30):_0x262741=validateSegmentDef(_0xe6de20,_0x1aff30);}return{'filePath':_0x500a6f,'relativePath':_0x13e838,'source':_0x1ca0c2,'result':_0x262741,'fileType':_0x43c5f3};}catch(_0x4f46c6){const _0x62e392=_0x4f46c6 instanceof Error?_0x4f46c6[_0xd4d629(0x1c6)]:String(_0x4f46c6);return createParseErrorResult(_0x500a6f,_0x13e838,'',_0xd4d629(0x1d6)+_0x62e392);}}export function validateYamlFiles(_0x2b90f5,_0x28c2f4,_0x7881c7={}){const _0x55ae98=a153_0x3f04b2;return _0x2b90f5[_0x55ae98(0x1d2)](_0x1a9691=>validateYamlFile(_0x1a9691,_0x28c2f4,_0x7881c7));}export function calculateSummary(_0x1748e3){const _0x533704=a153_0x3f04b2;let _0x462871=0x0,_0x3ce35d=0x0,_0x131d2b=0x0,_0x5d0cda=0x0;for(const _0x1521d9 of _0x1748e3){if(!isValidationResult(_0x1521d9)){_0x5d0cda++;continue;}_0x1521d9[_0x533704(0x1cc)][_0x533704(0x1d4)]?_0x462871++:_0x3ce35d++,_0x131d2b+=_0x1521d9['result'][_0x533704(0x1c9)]['length'];}return{'validCount':_0x462871,'invalidCount':_0x3ce35d,'warningCount':_0x131d2b,'skippedCount':_0x5d0cda,'hasErrors':_0x3ce35d>0x0};}
1
+ const a153_0x449fd5=a153_0x2457;(function(_0x17edd2,_0x2e227b){const _0x1ec674=a153_0x2457,_0x565d26=_0x17edd2();while(!![]){try{const _0x382947=parseInt(_0x1ec674(0x132))/0x1+parseInt(_0x1ec674(0x11a))/0x2+-parseInt(_0x1ec674(0x120))/0x3+parseInt(_0x1ec674(0x11e))/0x4*(-parseInt(_0x1ec674(0x12c))/0x5)+-parseInt(_0x1ec674(0x117))/0x6+parseInt(_0x1ec674(0x118))/0x7*(parseInt(_0x1ec674(0x134))/0x8)+parseInt(_0x1ec674(0x12a))/0x9*(parseInt(_0x1ec674(0x12b))/0xa);if(_0x382947===_0x2e227b)break;else _0x565d26['push'](_0x565d26['shift']());}catch(_0x520a23){_0x565d26['push'](_0x565d26['shift']());}}}(a153_0x2f13,0x989ae));import{readFileSync}from'fs';function a153_0x2457(_0x31179f,_0x1fd505){_0x31179f=_0x31179f-0x116;const _0x2f139b=a153_0x2f13();let _0x2457b1=_0x2f139b[_0x31179f];return _0x2457b1;}import*as a153_0x36dd5f from'path';import*as a153_0x3523f9 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a153_0x449fd5(0x133)]);export function isJourneyDef(_0x1e1335){const _0x4be7a5=a153_0x449fd5;return typeof _0x1e1335===_0x4be7a5(0x11f)&&_0x1e1335!==null&&'type'in _0x1e1335&&_0x1e1335[_0x4be7a5(0x127)]===_0x4be7a5(0x126);}export function isCampaignDef(_0x361426){const _0x4bc12c=a153_0x449fd5;if(typeof _0x361426!==_0x4bc12c(0x11f)||_0x361426===null)return![];const _0x34c759=_0x361426,_0x13eac8=VALID_CAMPAIGN_TYPES['has'](_0x34c759['campaign_type']);if(_0x34c759[_0x4bc12c(0x127)]===_0x4bc12c(0x131)&&_0x13eac8)return!![];if(_0x13eac8&&!_0x34c759[_0x4bc12c(0x127)])return!![];return![];}export function isTemplateDef(_0x3a4124){const _0x5095cd=a153_0x449fd5;return typeof _0x3a4124===_0x5095cd(0x11f)&&_0x3a4124!==null&&_0x5095cd(0x127)in _0x3a4124&&_0x3a4124[_0x5095cd(0x127)]===_0x5095cd(0x11b);}export function isValidationResult(_0x8e463c){const _0x29880c=a153_0x449fd5;return!(_0x29880c(0x11d)in _0x8e463c);}function a153_0x2f13(){const _0x2fa73a=['5697923ILEfWu','length','806098NZmJns','template','not\x20a\x20','skipped','4394812yQtyss','object','3303504eASbhL','segment','warnings','parseDocument','valid','relative','journey','type','error','toJSON','9tUInaY','16249670KcuKLu','5axlYYf','utf-8','message','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','basename','campaign','112423xvcSJa','push','8CnaRog','filterType','result','YAML\x20parse\x20error:\x20','776922QWllGq'];a153_0x2f13=function(){return _0x2fa73a;};return a153_0x2f13();}export function createParseErrorResult(_0x53c476,_0x5c4f4c,_0x3b8421,_0x126678,_0x15f706=a153_0x449fd5(0x121)){const _0x539ab1=a153_0x449fd5;return{'filePath':_0x53c476,'relativePath':_0x5c4f4c,'source':_0x3b8421,'result':{'valid':![],'errors':[{'level':_0x539ab1(0x128),'path':'','code':'YAML_PARSE_ERROR','message':_0x126678}],'warnings':[]},'fileType':_0x15f706};}export function validateYamlFile(_0x393882,_0x6f0087,_0x3823e9={}){const _0x57b508=a153_0x449fd5,_0x481aeb=a153_0x36dd5f[_0x57b508(0x125)](_0x6f0087,_0x393882)||a153_0x36dd5f[_0x57b508(0x130)](_0x393882);try{const _0x4efb14=readFileSync(_0x393882,_0x57b508(0x12d)),_0x33f968=a153_0x3523f9[_0x57b508(0x123)](_0x4efb14),_0x3a5dc0=_0x33f968[_0x57b508(0x129)]();if(!_0x3a5dc0)return createParseErrorResult(_0x393882,_0x481aeb,_0x4efb14,_0x57b508(0x12f));let _0x1a418d;if(isJourneyDef(_0x3a5dc0))_0x1a418d=_0x57b508(0x126);else{if(isCampaignDef(_0x3a5dc0))_0x1a418d=_0x57b508(0x131);else isTemplateDef(_0x3a5dc0)?_0x1a418d=_0x57b508(0x11b):_0x1a418d=_0x57b508(0x121);}if(_0x3823e9[_0x57b508(0x135)]&&_0x1a418d!==_0x3823e9[_0x57b508(0x135)])return{'filePath':_0x393882,'relativePath':_0x481aeb,'skipped':!![],'reason':_0x57b508(0x11c)+_0x3823e9[_0x57b508(0x135)]};const _0x3b0caf={'source':_0x4efb14,'document':_0x33f968};let _0xb4f2d2;if(_0x1a418d==='journey')_0xb4f2d2=validateJourneyDef(_0x3a5dc0,_0x3b0caf);else{if(_0x1a418d===_0x57b508(0x131))_0xb4f2d2=validateCampaignDef(_0x3a5dc0,_0x3b0caf);else _0x1a418d===_0x57b508(0x11b)?_0xb4f2d2=validateTemplateDef(_0x3a5dc0,_0x3b0caf):_0xb4f2d2=validateSegmentDef(_0x3a5dc0,_0x3b0caf);}return{'filePath':_0x393882,'relativePath':_0x481aeb,'source':_0x4efb14,'result':_0xb4f2d2,'fileType':_0x1a418d};}catch(_0x57ba53){const _0x59f049=_0x57ba53 instanceof Error?_0x57ba53[_0x57b508(0x12e)]:String(_0x57ba53);return createParseErrorResult(_0x393882,_0x481aeb,'',_0x57b508(0x116)+_0x59f049);}}export function validateYamlFiles(_0x502a56,_0x28c95c,_0x11839f={}){return _0x502a56['map'](_0x4ea306=>validateYamlFile(_0x4ea306,_0x28c95c,_0x11839f));}export function calculateSummary(_0x252284){const _0x4c6bc8=a153_0x449fd5;let _0x447246=0x0,_0x4f1abf=0x0,_0x2e537b=0x0,_0x23645e=0x0;for(const _0x1e1494 of _0x252284){if(!isValidationResult(_0x1e1494)){_0x23645e++;continue;}_0x1e1494[_0x4c6bc8(0x136)][_0x4c6bc8(0x124)]?_0x447246++:_0x4f1abf++,_0x2e537b+=_0x1e1494[_0x4c6bc8(0x136)][_0x4c6bc8(0x122)][_0x4c6bc8(0x119)];}return{'validCount':_0x447246,'invalidCount':_0x4f1abf,'warningCount':_0x2e537b,'skippedCount':_0x23645e,'hasErrors':_0x4f1abf>0x0};}
@@ -1 +1 @@
1
- (function(_0x447a8e,_0x1e7bb1){const _0x11f51e=a154_0x1c89,_0x539126=_0x447a8e();while(!![]){try{const _0x2ae8cd=parseInt(_0x11f51e(0x1ff))/0x1+-parseInt(_0x11f51e(0x1ee))/0x2+parseInt(_0x11f51e(0x212))/0x3*(parseInt(_0x11f51e(0x207))/0x4)+parseInt(_0x11f51e(0x1eb))/0x5*(parseInt(_0x11f51e(0x1f6))/0x6)+parseInt(_0x11f51e(0x219))/0x7*(parseInt(_0x11f51e(0x210))/0x8)+-parseInt(_0x11f51e(0x215))/0x9*(-parseInt(_0x11f51e(0x202))/0xa)+-parseInt(_0x11f51e(0x1fe))/0xb;if(_0x2ae8cd===_0x1e7bb1)break;else _0x539126['push'](_0x539126['shift']());}catch(_0x31cc7a){_0x539126['push'](_0x539126['shift']());}}}(a154_0x5c65,0x868fc));import*as a154_0x2f5af1 from'yaml';import a154_0x4076b8 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x248d16,_0x145f92,_0xcc0795){const _0x259154=a154_0x1c89;if(!_0x248d16||!_0x145f92)return undefined;try{let _0x453af8=_0x248d16[_0x259154(0x1ef)](_0xcc0795,!![]),_0x5856f5=[..._0xcc0795];while((!_0x453af8||typeof _0x453af8!==_0x259154(0x1ea)||!(_0x259154(0x205)in _0x453af8)||!_0x453af8[_0x259154(0x205)])&&_0x5856f5[_0x259154(0x1fb)]>0x0){_0x5856f5[_0x259154(0x1f0)](),_0x453af8=_0x5856f5[_0x259154(0x1fb)]>0x0?_0x248d16[_0x259154(0x1ef)](_0x5856f5,!![]):_0x248d16[_0x259154(0x1f4)];}if(!_0x453af8||typeof _0x453af8!==_0x259154(0x1ea)||!(_0x259154(0x205)in _0x453af8)||!_0x453af8['range'])return undefined;const [_0x1eb0ed]=_0x453af8[_0x259154(0x205)];return offsetToLocation(_0x145f92,_0x1eb0ed);}catch{return undefined;}}export function offsetToLocation(_0x41d0b7,_0x3258d4){let _0x200e82=0x1,_0x86ee35=0x1;for(let _0x4ed029=0x0;_0x4ed029<_0x3258d4&&_0x4ed029<_0x41d0b7['length'];_0x4ed029++){_0x41d0b7[_0x4ed029]==='\x0a'?(_0x200e82++,_0x86ee35=0x1):_0x86ee35++;}return{'line':_0x200e82,'column':_0x86ee35,'offset':_0x3258d4};}export function pathToArray(_0xcb613a){const _0x3b2a21=a154_0x1c89;if(!_0xcb613a)return[];return _0xcb613a[_0x3b2a21(0x21a)]('.')[_0x3b2a21(0x21b)](_0x36cb8e=>{const _0x450a13=_0x3b2a21,_0x22fd45=_0x36cb8e[_0x450a13(0x20d)](/^(\w+)\[(\d+)\]$/);if(_0x22fd45)return[_0x22fd45[0x1],parseInt(_0x22fd45[0x2],0xa)];return[_0x36cb8e];});}export function formatZodPath(_0xe5141f){let _0x4661e6='';for(const _0x55dd74 of _0xe5141f){if(typeof _0x55dd74==='number')_0x4661e6+='['+_0x55dd74+']';else{const _0x5bba51=String(_0x55dd74);_0x4661e6+=_0x4661e6?'.'+_0x5bba51:_0x5bba51;}}return _0x4661e6;}function a154_0x1c89(_0x4d1269,_0x59430a){_0x4d1269=_0x4d1269-0x1ea;const _0x5c655e=a154_0x5c65();let _0x1c8993=_0x5c655e[_0x4d1269];return _0x1c8993;}export function flattenZodIssues(_0xe65342){const _0x1877c8=a154_0x1c89,_0x53f2b2=[];for(const _0x39006a of _0xe65342){if(_0x39006a[_0x1877c8(0x206)]===_0x1877c8(0x218)&&_0x1877c8(0x203)in _0x39006a){const _0x2cc096=_0x39006a['errors'];let _0x157dc9=_0x2cc096[0x0]||[];for(const _0x320adc of _0x2cc096){_0x320adc[_0x1877c8(0x1fb)]<_0x157dc9[_0x1877c8(0x1fb)]&&(_0x157dc9=_0x320adc);}const _0x2ab711=_0x157dc9[_0x1877c8(0x1fd)](_0x2f1f4e=>({..._0x2f1f4e,'path':[..._0x39006a[_0x1877c8(0x1ed)],..._0x2f1f4e[_0x1877c8(0x1ed)]]}));_0x53f2b2[_0x1877c8(0x208)](...flattenZodIssues(_0x2ab711));}else _0x53f2b2[_0x1877c8(0x208)](_0x39006a);}return _0x53f2b2;}export function safeParseYaml(_0x1fe8b7,_0x4a110f){const _0x26a3e1=a154_0x1c89,_0x9793d5=a154_0x2f5af1[_0x26a3e1(0x217)](_0x1fe8b7);if(!_0x9793d5||typeof _0x9793d5!==_0x26a3e1(0x1ea))throw new Error(_0x26a3e1(0x20e));const _0xca510c=_0x4a110f[_0x26a3e1(0x1ec)](_0x9793d5);if(!_0xca510c[_0x26a3e1(0x211)]){const _0xa12776=_0xca510c['error'][_0x26a3e1(0x213)][0x0],_0x4448f1=formatZodPath(_0xa12776['path']);throw new Error(_0x4448f1?'YAML\x20validation\x20error\x20at\x20\x27'+_0x4448f1+_0x26a3e1(0x216)+_0xa12776[_0x26a3e1(0x204)]:_0x26a3e1(0x209)+_0xa12776[_0x26a3e1(0x204)]);}return _0xca510c[_0x26a3e1(0x20f)];}export function formatIssueWithContext(_0x1fd77f,_0x2a341e,_0x416eae){const _0x2587c5=a154_0x1c89,_0x6b6aec=[],_0x2f613f=_0x1fd77f[_0x2587c5(0x20c)]===_0x2587c5(0x1f5),_0x449060=_0x2f613f?a154_0x4076b8[_0x2587c5(0x214)]:a154_0x4076b8[_0x2587c5(0x1fc)],_0x58b8c6=_0x2f613f?a154_0x4076b8[_0x2587c5(0x214)]:a154_0x4076b8[_0x2587c5(0x1fc)],_0x25a264=_0x416eae?a154_0x4076b8[_0x2587c5(0x200)](_0x416eae+':'):'';if(_0x1fd77f[_0x2587c5(0x1f8)]){const _0x3d4d06=a154_0x4076b8[_0x2587c5(0x200)](_0x1fd77f[_0x2587c5(0x1f8)][_0x2587c5(0x20b)]+':'+_0x1fd77f['location'][_0x2587c5(0x1fa)]);_0x6b6aec['push'](''+_0x25a264+_0x3d4d06+':\x20'+_0x449060(_0x1fd77f[_0x2587c5(0x20c)])+'\x20'+_0x58b8c6('['+_0x1fd77f['code']+']'));}else _0x6b6aec[_0x2587c5(0x208)](''+_0x25a264+a154_0x4076b8[_0x2587c5(0x1f1)](_0x1fd77f[_0x2587c5(0x1ed)])+':\x20'+_0x449060(_0x1fd77f[_0x2587c5(0x20c)])+'\x20'+_0x58b8c6('['+_0x1fd77f[_0x2587c5(0x206)]+']'));_0x6b6aec[_0x2587c5(0x208)](_0x1fd77f[_0x2587c5(0x204)]);if(_0x1fd77f[_0x2587c5(0x1f8)]&&_0x2a341e){const _0x34748b=_0x2a341e[_0x2587c5(0x21a)]('\x0a'),{line:_0x2b1486,column:_0x337a32}=_0x1fd77f[_0x2587c5(0x1f8)],_0x34fcfb=Math[_0x2587c5(0x20a)](0x1,_0x2b1486-0x1),_0x2c1450=Math['min'](_0x34748b[_0x2587c5(0x1fb)],_0x2b1486+0x1);_0x6b6aec[_0x2587c5(0x208)]('');for(let _0x26b562=_0x34fcfb;_0x26b562<=_0x2c1450;_0x26b562++){const _0x4e4350=_0x34748b[_0x26b562-0x1]||'',_0x24d094=a154_0x4076b8['dim'](_0x26b562[_0x2587c5(0x1f7)]()[_0x2587c5(0x1f3)](0x4)),_0x3f58f5=a154_0x4076b8['dim'](_0x2587c5(0x201));if(_0x26b562===_0x2b1486){_0x6b6aec[_0x2587c5(0x208)]('\x20\x20'+_0x24d094+_0x3f58f5+_0x449060(_0x4e4350));const _0x2a0094='\x20'['repeat'](0x4+0x3+_0x337a32-0x1);_0x6b6aec[_0x2587c5(0x208)]('\x20\x20'+_0x2a0094+_0x449060('^'));}else _0x6b6aec[_0x2587c5(0x208)]('\x20\x20'+_0x24d094+_0x3f58f5+a154_0x4076b8[_0x2587c5(0x1f1)](_0x4e4350));}}return _0x6b6aec[_0x2587c5(0x1f9)]('\x0a');}function a154_0x5c65(){const _0x477424=['\x27:\x20','parse','invalid_union','6038935IoZNWt','split','flatMap','object','231970UkOdIq','safeParse','path','2047422GSNDcz','getIn','pop','dim','warnings','padStart','contents','error','138ZjEMPo','toString','location','join','column','length','yellow','map','27750778CViGhX','819676tQUabR','cyan','\x20|\x20','323310mbDxOK','errors','message','range','code','68UNTIVB','push','YAML\x20validation\x20error:\x20','max','line','level','match','Invalid\x20YAML:\x20expected\x20an\x20object','data','8OMQNoV','success','129519DVZmcj','issues','red','171QsfYni'];a154_0x5c65=function(){return _0x477424;};return a154_0x5c65();}export function formatValidationResult(_0x385887,_0x42c18d,_0x47b633){const _0x36b991=a154_0x1c89,_0x779941=[];for(const _0x3e94ce of _0x385887[_0x36b991(0x203)]){_0x779941[_0x36b991(0x208)](formatIssueWithContext(_0x3e94ce,_0x42c18d,_0x47b633)),_0x779941['push']('');}for(const _0x1edfc8 of _0x385887[_0x36b991(0x1f2)]){_0x779941[_0x36b991(0x208)](formatIssueWithContext(_0x1edfc8,_0x42c18d,_0x47b633)),_0x779941[_0x36b991(0x208)]('');}return _0x779941[_0x36b991(0x1f9)]('\x0a');}
1
+ (function(_0x2ce6a9,_0x5c94da){const _0x5516f1=a154_0x5ac7,_0x1d874f=_0x2ce6a9();while(!![]){try{const _0x5cbdd8=-parseInt(_0x5516f1(0x1ac))/0x1*(parseInt(_0x5516f1(0x1ad))/0x2)+parseInt(_0x5516f1(0x1b7))/0x3*(parseInt(_0x5516f1(0x1a9))/0x4)+parseInt(_0x5516f1(0x1c1))/0x5+-parseInt(_0x5516f1(0x1c5))/0x6*(-parseInt(_0x5516f1(0x1a8))/0x7)+-parseInt(_0x5516f1(0x1ce))/0x8*(parseInt(_0x5516f1(0x1c0))/0x9)+-parseInt(_0x5516f1(0x1ca))/0xa*(parseInt(_0x5516f1(0x1c8))/0xb)+parseInt(_0x5516f1(0x1bb))/0xc;if(_0x5cbdd8===_0x5c94da)break;else _0x1d874f['push'](_0x1d874f['shift']());}catch(_0x58ed9a){_0x1d874f['push'](_0x1d874f['shift']());}}}(a154_0xb010,0xc3a9f));import*as a154_0x2c547d from'yaml';function a154_0x5ac7(_0x2fc225,_0x2b76dd){_0x2fc225=_0x2fc225-0x1a4;const _0xb010fc=a154_0xb010();let _0x5ac7ad=_0xb010fc[_0x2fc225];return _0x5ac7ad;}function a154_0xb010(){const _0x1f343b=['flatMap','push','\x20|\x20','getIn','code','range','cyan','map','path','7NGNqda','238508rEjrTm','yellow','number','5nLmSaZ','42656CoqyIP','dim','safeParse','match','location','column','object','parse','toString','pop','15nTESWp','invalid_union','repeat','warnings','13712196HLdGtq','max','level','red','message','1216638vdOOIa','1694585XFGWqi','\x27:\x20','YAML\x20validation\x20error\x20at\x20\x27','split','7854774kXUqRE','join','length','662145Woedys','error','250wZbOyw','contents','data','errors','40LSMCXn'];a154_0xb010=function(){return _0x1f343b;};return a154_0xb010();}import a154_0x50d6ad from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x42d7cf,_0x3a8d03,_0x276574){const _0x5638e3=a154_0x5ac7;if(!_0x42d7cf||!_0x3a8d03)return undefined;try{let _0x49e4fa=_0x42d7cf[_0x5638e3(0x1d2)](_0x276574,!![]),_0x52b36c=[..._0x276574];while((!_0x49e4fa||typeof _0x49e4fa!=='object'||!('range'in _0x49e4fa)||!_0x49e4fa[_0x5638e3(0x1a4)])&&_0x52b36c[_0x5638e3(0x1c7)]>0x0){_0x52b36c[_0x5638e3(0x1b6)](),_0x49e4fa=_0x52b36c[_0x5638e3(0x1c7)]>0x0?_0x42d7cf[_0x5638e3(0x1d2)](_0x52b36c,!![]):_0x42d7cf[_0x5638e3(0x1cb)];}if(!_0x49e4fa||typeof _0x49e4fa!=='object'||!(_0x5638e3(0x1a4)in _0x49e4fa)||!_0x49e4fa[_0x5638e3(0x1a4)])return undefined;const [_0x5af52d]=_0x49e4fa['range'];return offsetToLocation(_0x3a8d03,_0x5af52d);}catch{return undefined;}}export function offsetToLocation(_0x4754b4,_0x1ca39e){const _0x47dabd=a154_0x5ac7;let _0x10f9e4=0x1,_0x33df50=0x1;for(let _0x5a10a2=0x0;_0x5a10a2<_0x1ca39e&&_0x5a10a2<_0x4754b4[_0x47dabd(0x1c7)];_0x5a10a2++){_0x4754b4[_0x5a10a2]==='\x0a'?(_0x10f9e4++,_0x33df50=0x1):_0x33df50++;}return{'line':_0x10f9e4,'column':_0x33df50,'offset':_0x1ca39e};}export function pathToArray(_0x164a44){const _0x4c12f0=a154_0x5ac7;if(!_0x164a44)return[];return _0x164a44[_0x4c12f0(0x1c4)]('.')[_0x4c12f0(0x1cf)](_0x315170=>{const _0x51563b=_0x4c12f0,_0x469faf=_0x315170[_0x51563b(0x1b0)](/^(\w+)\[(\d+)\]$/);if(_0x469faf)return[_0x469faf[0x1],parseInt(_0x469faf[0x2],0xa)];return[_0x315170];});}export function formatZodPath(_0x1611e4){const _0x4555d0=a154_0x5ac7;let _0x22b086='';for(const _0x851407 of _0x1611e4){if(typeof _0x851407===_0x4555d0(0x1ab))_0x22b086+='['+_0x851407+']';else{const _0x839b3a=String(_0x851407);_0x22b086+=_0x22b086?'.'+_0x839b3a:_0x839b3a;}}return _0x22b086;}export function flattenZodIssues(_0x59fdd5){const _0x4c21a0=a154_0x5ac7,_0x15b5c1=[];for(const _0x355bea of _0x59fdd5){if(_0x355bea[_0x4c21a0(0x1d3)]===_0x4c21a0(0x1b8)&&_0x4c21a0(0x1cd)in _0x355bea){const _0x28344e=_0x355bea[_0x4c21a0(0x1cd)];let _0x45a197=_0x28344e[0x0]||[];for(const _0xec009a of _0x28344e){_0xec009a[_0x4c21a0(0x1c7)]<_0x45a197['length']&&(_0x45a197=_0xec009a);}const _0x234f30=_0x45a197[_0x4c21a0(0x1a6)](_0x4ed484=>({..._0x4ed484,'path':[..._0x355bea[_0x4c21a0(0x1a7)],..._0x4ed484[_0x4c21a0(0x1a7)]]}));_0x15b5c1[_0x4c21a0(0x1d0)](...flattenZodIssues(_0x234f30));}else _0x15b5c1[_0x4c21a0(0x1d0)](_0x355bea);}return _0x15b5c1;}export function safeParseYaml(_0x2c10c7,_0xbf21b3){const _0x1523ec=a154_0x5ac7,_0x5d3674=a154_0x2c547d[_0x1523ec(0x1b4)](_0x2c10c7);if(!_0x5d3674||typeof _0x5d3674!==_0x1523ec(0x1b3))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x328a57=_0xbf21b3[_0x1523ec(0x1af)](_0x5d3674);if(!_0x328a57['success']){const _0xed56f2=_0x328a57[_0x1523ec(0x1c9)]['issues'][0x0],_0x390144=formatZodPath(_0xed56f2[_0x1523ec(0x1a7)]);throw new Error(_0x390144?_0x1523ec(0x1c3)+_0x390144+_0x1523ec(0x1c2)+_0xed56f2[_0x1523ec(0x1bf)]:'YAML\x20validation\x20error:\x20'+_0xed56f2[_0x1523ec(0x1bf)]);}return _0x328a57[_0x1523ec(0x1cc)];}export function formatIssueWithContext(_0x1438ce,_0x49d8bd,_0xaf8e3d){const _0x55064c=a154_0x5ac7,_0x5ed3be=[],_0x499aad=_0x1438ce[_0x55064c(0x1bd)]===_0x55064c(0x1c9),_0x3d0a2e=_0x499aad?a154_0x50d6ad[_0x55064c(0x1be)]:a154_0x50d6ad[_0x55064c(0x1aa)],_0xdf8034=_0x499aad?a154_0x50d6ad[_0x55064c(0x1be)]:a154_0x50d6ad['yellow'],_0x3f6caa=_0xaf8e3d?a154_0x50d6ad[_0x55064c(0x1a5)](_0xaf8e3d+':'):'';if(_0x1438ce[_0x55064c(0x1b1)]){const _0x465de2=a154_0x50d6ad[_0x55064c(0x1a5)](_0x1438ce[_0x55064c(0x1b1)]['line']+':'+_0x1438ce[_0x55064c(0x1b1)][_0x55064c(0x1b2)]);_0x5ed3be[_0x55064c(0x1d0)](''+_0x3f6caa+_0x465de2+':\x20'+_0x3d0a2e(_0x1438ce[_0x55064c(0x1bd)])+'\x20'+_0xdf8034('['+_0x1438ce[_0x55064c(0x1d3)]+']'));}else _0x5ed3be['push'](''+_0x3f6caa+a154_0x50d6ad['dim'](_0x1438ce[_0x55064c(0x1a7)])+':\x20'+_0x3d0a2e(_0x1438ce['level'])+'\x20'+_0xdf8034('['+_0x1438ce[_0x55064c(0x1d3)]+']'));_0x5ed3be[_0x55064c(0x1d0)](_0x1438ce[_0x55064c(0x1bf)]);if(_0x1438ce['location']&&_0x49d8bd){const _0x4ef643=_0x49d8bd[_0x55064c(0x1c4)]('\x0a'),{line:_0x603315,column:_0x1ce5cb}=_0x1438ce[_0x55064c(0x1b1)],_0x2f9546=Math[_0x55064c(0x1bc)](0x1,_0x603315-0x1),_0x521ff8=Math['min'](_0x4ef643[_0x55064c(0x1c7)],_0x603315+0x1);_0x5ed3be[_0x55064c(0x1d0)]('');for(let _0x5030c3=_0x2f9546;_0x5030c3<=_0x521ff8;_0x5030c3++){const _0x2a09a3=_0x4ef643[_0x5030c3-0x1]||'',_0x2441b1=a154_0x50d6ad['dim'](_0x5030c3[_0x55064c(0x1b5)]()['padStart'](0x4)),_0x309a09=a154_0x50d6ad[_0x55064c(0x1ae)](_0x55064c(0x1d1));if(_0x5030c3===_0x603315){_0x5ed3be[_0x55064c(0x1d0)]('\x20\x20'+_0x2441b1+_0x309a09+_0x3d0a2e(_0x2a09a3));const _0x5ba760='\x20'[_0x55064c(0x1b9)](0x4+0x3+_0x1ce5cb-0x1);_0x5ed3be[_0x55064c(0x1d0)]('\x20\x20'+_0x5ba760+_0x3d0a2e('^'));}else _0x5ed3be[_0x55064c(0x1d0)]('\x20\x20'+_0x2441b1+_0x309a09+a154_0x50d6ad['dim'](_0x2a09a3));}}return _0x5ed3be[_0x55064c(0x1c6)]('\x0a');}export function formatValidationResult(_0x549f12,_0x13d462,_0x25ace4){const _0x23353d=a154_0x5ac7,_0x132608=[];for(const _0x5a61ee of _0x549f12['errors']){_0x132608[_0x23353d(0x1d0)](formatIssueWithContext(_0x5a61ee,_0x13d462,_0x25ace4)),_0x132608[_0x23353d(0x1d0)]('');}for(const _0x15c261 of _0x549f12[_0x23353d(0x1ba)]){_0x132608[_0x23353d(0x1d0)](formatIssueWithContext(_0x15c261,_0x13d462,_0x25ace4)),_0x132608[_0x23353d(0x1d0)]('');}return _0x132608[_0x23353d(0x1c6)]('\x0a');}