@treasuredata/tdx 2026.4.7 → 2026.4.9

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 (232) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-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/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.d.ts +2 -0
  182. package/dist/sdk/workspace/access-tracker.d.ts.map +1 -1
  183. package/dist/sdk/workspace/access-tracker.js +1 -1
  184. package/dist/sdk/workspace/access-tracker.js.map +1 -1
  185. package/dist/sdk/workspace/frontmatter.js +1 -1
  186. package/dist/sdk/workspace/git.js +1 -1
  187. package/dist/sdk/workspace/index.d.ts +2 -0
  188. package/dist/sdk/workspace/index.d.ts.map +1 -1
  189. package/dist/sdk/workspace/index.js +1 -1
  190. package/dist/sdk/workspace/index.js.map +1 -1
  191. package/dist/sdk/workspace/templates.js +1 -1
  192. package/dist/sdk/workspace/weekly.js +1 -1
  193. package/dist/sdk/workspace/wikilinks.js +1 -1
  194. package/dist/test-utils/command-runner.js +1 -1
  195. package/dist/test-utils/factories.js +1 -1
  196. package/dist/test-utils/fixtures.js +1 -1
  197. package/dist/test-utils/http-mock.js +1 -1
  198. package/dist/test-utils/index.js +1 -1
  199. package/dist/utils/async.js +1 -1
  200. package/dist/utils/colors.js +1 -1
  201. package/dist/utils/diff.js +1 -1
  202. package/dist/utils/file-permissions.js +1 -1
  203. package/dist/utils/file-reader.js +1 -1
  204. package/dist/utils/github-releases.js +1 -1
  205. package/dist/utils/global-cache.js +1 -1
  206. package/dist/utils/json-loader.js +1 -1
  207. package/dist/utils/local-cache.js +1 -1
  208. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  209. package/dist/utils/logger/formatters/index.js +1 -1
  210. package/dist/utils/logger/handlers/console-handler.js +1 -1
  211. package/dist/utils/logger/handlers/file-handler.js +1 -1
  212. package/dist/utils/logger/handlers/index.js +1 -1
  213. package/dist/utils/logger/handlers/null-handler.js +1 -1
  214. package/dist/utils/logger/index.js +1 -1
  215. package/dist/utils/logger/logger.js +1 -1
  216. package/dist/utils/logger/types.js +1 -1
  217. package/dist/utils/option-validation.js +1 -1
  218. package/dist/utils/process.d.ts +3 -0
  219. package/dist/utils/process.d.ts.map +1 -1
  220. package/dist/utils/process.js +1 -1
  221. package/dist/utils/process.js.map +1 -1
  222. package/dist/utils/prompt.js +1 -1
  223. package/dist/utils/spinner.js +1 -1
  224. package/dist/utils/sse-parser.js +1 -1
  225. package/dist/utils/string-utils.js +1 -1
  226. package/dist/utils/table-ref-parser.js +1 -1
  227. package/dist/utils/tdx-logger.js +1 -1
  228. package/dist/utils/version-check.d.ts +10 -2
  229. package/dist/utils/version-check.d.ts.map +1 -1
  230. package/dist/utils/version-check.js +1 -1
  231. package/dist/utils/version-check.js.map +1 -1
  232. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x261215,_0x4de934){const _0x4d153c=a156_0x2119,_0x5f5211=_0x261215();while(!![]){try{const _0x50bbb0=parseInt(_0x4d153c(0xb9))/0x1+-parseInt(_0x4d153c(0xc9))/0x2*(parseInt(_0x4d153c(0x9f))/0x3)+-parseInt(_0x4d153c(0x8a))/0x4*(parseInt(_0x4d153c(0xac))/0x5)+parseInt(_0x4d153c(0xcc))/0x6*(parseInt(_0x4d153c(0xa8))/0x7)+parseInt(_0x4d153c(0xbd))/0x8*(parseInt(_0x4d153c(0x90))/0x9)+parseInt(_0x4d153c(0x96))/0xa+parseInt(_0x4d153c(0xaa))/0xb;if(_0x50bbb0===_0x4de934)break;else _0x5f5211['push'](_0x5f5211['shift']());}catch(_0x4b6d87){_0x5f5211['push'](_0x5f5211['shift']());}}}(a156_0x463d,0x5c025));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x340aeb,_0x41cff9={},_0x5df6b4={}){const _0x595297=a156_0x2119;if(_0x5df6b4[_0x595297(0xc7)])return runSemanticChecks(_0x340aeb,_0x41cff9);const _0x377118=SegmentDefSchema[_0x595297(0x86)](_0x340aeb);if(_0x377118[_0x595297(0xc6)])return runSemanticChecks(_0x377118[_0x595297(0x94)],_0x41cff9);return zodErrorsToValidationResult(_0x377118['error'],_0x41cff9);}export function validateRuleDef(_0x2a332b,_0x1e1f53,_0x4433b1){const _0x3817fa=a156_0x2119;if(!_0x2a332b)return[];const _0x4a7a95=RuleDefSchema[_0x3817fa(0x86)](_0x2a332b);if(_0x4a7a95[_0x3817fa(0xc6)])return checkRule(_0x4a7a95[_0x3817fa(0x94)],_0x1e1f53,_0x4433b1);const _0x394cb3=flattenZodIssues(_0x4a7a95[_0x3817fa(0xb6)][_0x3817fa(0xaf)]);return _0x394cb3[_0x3817fa(0x9b)](_0xda47cf=>{const _0x54bc16=_0x3817fa,_0x1d0cbc=formatZodPath(_0xda47cf[_0x54bc16(0xb0)]),_0x22d615=_0x1d0cbc?_0x1e1f53+'.'+_0x1d0cbc:_0x1e1f53,_0xedc039=mapZodIssueToCode(_0xda47cf,_0x1d0cbc),_0x185255=getLocationFromPath(_0x4433b1[_0x54bc16(0xbf)],_0x4433b1[_0x54bc16(0x9a)],pathToArray(_0x22d615));return{'level':_0x54bc16(0xb6),'path':_0x22d615,'code':_0xedc039,'message':_0xda47cf[_0x54bc16(0xae)],..._0x185255&&{'location':_0x185255}};});}function zodErrorsToValidationResult(_0x434809,_0x48554b){const _0x2dba7f=a156_0x2119,_0x858d0a=flattenZodIssues(_0x434809['issues']),_0x4e8e64=_0x858d0a[_0x2dba7f(0x9b)](_0x4d5564=>{const _0x437e65=_0x2dba7f,_0x2b2df3=formatZodPath(_0x4d5564['path']),_0x2affad=mapZodIssueToCode(_0x4d5564,_0x2b2df3),_0x4fbbd1=getLocationFromPath(_0x48554b[_0x437e65(0xbf)],_0x48554b[_0x437e65(0x9a)],_0x4d5564[_0x437e65(0xb0)][_0x437e65(0x9b)](_0x1013b1=>typeof _0x1013b1===_0x437e65(0xa1)?String(_0x1013b1):_0x1013b1));return{'level':'error','path':_0x2b2df3,'code':_0x2affad,'message':_0x4d5564[_0x437e65(0xae)],..._0x4fbbd1&&{'location':_0x4fbbd1}};});return{'valid':![],'errors':_0x4e8e64,'warnings':[]};}function a156_0x463d(){const _0x1e6b51=['98181sHaHtP','level','INVALID_RULE_TYPE','validationCode','data','code','837200ZHQZef','warning','params','And','source','map','invalid_value','description','BEHAVIOR_SOURCE_MISSING_FILTER','1322814bwzpgk','EMPTY_CONDITIONS','symbol','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','.type','INVALID_ARRAY_MATCHING','MISSING_BETWEEN_BOUNDS','\x27\x20with\x20attribute\x20\x27','MISSING_OPERATOR_VALUE','14CdVYEa','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','2623973BuRtzQ','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','90880eYoHEt','rule.type','message','issues','path','name','MISSING_TIME_UNIT','INVALID_OPERATOR_TYPE','Behavior\x20source\x20\x27','filter','error','Attribute\x20\x27','.attribute','132258LZBPUL','aggregation','arrayMatching','custom','416MjOQLM','MISSING_NAME','document','.filter','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','conditions','endsWith','.conditions','.source','success','skipSchema','MISSING_CONDITIONS','2QXLyCX','.segment','attribute','1569174uMRcNi','length','safeParse','push','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','.conditions[','160gMDXGT','rule','Behavior','type','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','match'];a156_0x463d=function(){return _0x1e6b51;};return a156_0x463d();}function mapZodIssueToCode(_0x1bb543,_0x422a1c){const _0x176623=a156_0x2119,_0x1f2268=_0x1bb543[_0x176623(0x95)]===_0x176623(0xbc)?_0x1bb543[_0x176623(0x98)]:undefined;if(_0x422a1c===_0x176623(0xb1))return _0x176623(0xbe);if(_0x422a1c===_0x176623(0xad)||_0x422a1c[_0x176623(0xc3)](_0x176623(0xa3))){if(_0x1bb543[_0x176623(0x95)]===_0x176623(0x9c)){if(_0x422a1c===_0x176623(0xad)||_0x422a1c[_0x176623(0x8f)](/\.conditions\[\d+\]\.type$/))return _0x176623(0x92);}}if(_0x422a1c[_0x176623(0xc3)]('.operator.type'))return _0x176623(0xb3);if(_0x422a1c[_0x176623(0xc3)]('.operator.value'))return _0x176623(0xa7);if(_0x1f2268?.[_0x176623(0x93)]===_0x176623(0xa5))return'MISSING_BETWEEN_BOUNDS';if(_0x1f2268?.[_0x176623(0x93)]===_0x176623(0xb2))return _0x176623(0xb2);if(_0x422a1c[_0x176623(0xc3)]('.conditions')||_0x422a1c==='conditions')return _0x176623(0xc8);if(_0x422a1c['includes'](_0x176623(0xbb)))return _0x176623(0xa4);if(_0x422a1c[_0x176623(0xc3)](_0x176623(0xca)))return'MISSING_SEGMENT_REFERENCE';return'SEGMENT_SCHEMA_ERROR';}function runSemanticChecks(_0x3e3a4c,_0x3afb27){const _0x1c27a9=a156_0x2119,_0x57e2a7=[];_0x3e3a4c[_0x1c27a9(0x8b)]&&_0x57e2a7[_0x1c27a9(0x87)](...checkRule(_0x3e3a4c[_0x1c27a9(0x8b)],'rule',_0x3afb27));const _0x5318c1=_0x57e2a7[_0x1c27a9(0xb5)](_0x465d53=>_0x465d53[_0x1c27a9(0x91)]==='error'),_0x551afd=_0x57e2a7[_0x1c27a9(0xb5)](_0x52f8c0=>_0x52f8c0[_0x1c27a9(0x91)]===_0x1c27a9(0x97));return{'valid':_0x5318c1[_0x1c27a9(0x85)]===0x0,'errors':_0x5318c1,'warnings':_0x551afd};}function a156_0x2119(_0x16dddc,_0x379ced){_0x16dddc=_0x16dddc-0x85;const _0x463d18=a156_0x463d();let _0x2119cf=_0x463d18[_0x16dddc];return _0x2119cf;}function checkRule(_0x43e70c,_0x41a519,_0x11e297){const _0x76c564=a156_0x2119,_0x55b5b4=[];if(_0x43e70c['conditions']['length']===0x0)return _0x55b5b4['push']({'level':_0x76c564(0xb6),'path':_0x41a519+_0x76c564(0xc4),'code':_0x76c564(0xa0),'message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x11e297[_0x76c564(0xbf)],_0x11e297[_0x76c564(0x9a)],pathToArray(_0x41a519+_0x76c564(0xc4)))}),_0x55b5b4;return _0x55b5b4[_0x76c564(0x87)](...checkConditions(_0x43e70c['conditions'],_0x41a519,_0x11e297)),_0x55b5b4;}function checkConditions(_0x7ed70d,_0x3a513a,_0x168f07){const _0x46cd2c=a156_0x2119,_0x3ab8f6=[];for(let _0x4dd450=0x0;_0x4dd450<_0x7ed70d[_0x46cd2c(0x85)];_0x4dd450++){const _0xe9cb00=_0x7ed70d[_0x4dd450],_0x58b339=_0x3a513a+_0x46cd2c(0x89)+_0x4dd450+']';_0x3ab8f6[_0x46cd2c(0x87)](...checkCondition(_0xe9cb00,_0x58b339,_0x168f07));}return _0x3ab8f6;}function checkCondition(_0x212a0a,_0x44b3e3,_0x4ed3f3){const _0x229888=a156_0x2119,_0x3e822d=[];if(_0x212a0a[_0x229888(0x8d)]===_0x229888(0x99)||_0x212a0a[_0x229888(0x8d)]==='Or'){if(_0x212a0a['conditions']['length']===0x0)_0x3e822d['push']({'level':_0x229888(0xb6),'path':_0x44b3e3+_0x229888(0xc4),'code':_0x229888(0xa0),'message':_0x212a0a[_0x229888(0x8d)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x4ed3f3[_0x229888(0xbf)],_0x4ed3f3[_0x229888(0x9a)],pathToArray(_0x44b3e3+_0x229888(0xc4)))});else{const _0x2b6088=_0x212a0a[_0x229888(0x9d)]!==undefined;!_0x2b6088&&_0x3e822d[_0x229888(0x87)]({'level':_0x229888(0x97),'path':_0x44b3e3,'code':'NESTED_CONDITION_GROUP','message':_0x212a0a[_0x229888(0x8d)]+_0x229888(0xa9)+_0x229888(0x8e)+_0x229888(0xc1),'location':getLocationFromPath(_0x4ed3f3[_0x229888(0xbf)],_0x4ed3f3[_0x229888(0x9a)],pathToArray(_0x44b3e3))}),_0x3e822d[_0x229888(0x87)](...checkConditions(_0x212a0a[_0x229888(0xc2)],_0x44b3e3,_0x4ed3f3));}return _0x3e822d;}if(_0x212a0a[_0x229888(0x8d)]==='Value'||_0x212a0a[_0x229888(0x8d)]===_0x229888(0x8c)){const _0x3b04a5=_0x212a0a,_0x2bc965=_0x3b04a5['source'],_0x3a7d97=_0x3b04a5[_0x229888(0xba)],_0x3363d8=_0x2bc965||_0x3a7d97;(!_0x3b04a5[_0x229888(0xcb)]||_0x3b04a5[_0x229888(0xcb)]==='')&&(!_0x3363d8&&_0x3e822d['push']({'level':'error','path':_0x44b3e3+_0x229888(0xb8),'code':'EMPTY_ATTRIBUTE','message':'Attribute\x20name\x20cannot\x20be\x20empty','location':getLocationFromPath(_0x4ed3f3[_0x229888(0xbf)],_0x4ed3f3[_0x229888(0x9a)],pathToArray(_0x44b3e3+_0x229888(0xb8)))}));_0x3b04a5[_0x229888(0xb5)]&&_0x3e822d[_0x229888(0x87)](...checkRule(_0x3b04a5[_0x229888(0xb5)],_0x44b3e3+_0x229888(0xc0),_0x4ed3f3));if(_0x3b04a5['source']){const _0x311dc5=_0x3b04a5[_0x229888(0xcb)]&&_0x3b04a5[_0x229888(0xcb)]!=='';_0x311dc5&&!_0x3b04a5[_0x229888(0xb5)]&&_0x3e822d[_0x229888(0x87)]({'level':_0x229888(0xb6),'path':_0x44b3e3+_0x229888(0xc5),'code':_0x229888(0x9e),'message':_0x229888(0xb4)+_0x3b04a5[_0x229888(0x9a)]+_0x229888(0xa6)+_0x3b04a5[_0x229888(0xcb)]+'\x27\x20'+_0x229888(0x88)+_0x229888(0xa2)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x4ed3f3['document'],_0x4ed3f3['source'],pathToArray(_0x44b3e3+_0x229888(0xc5)))}),_0x311dc5&&_0x3b04a5['filter']&&_0x3e822d['push']({'level':_0x229888(0x97),'path':_0x44b3e3+_0x229888(0xb8),'code':'BEHAVIOR_SOURCE_WITH_ATTRIBUTE','message':_0x229888(0xb7)+_0x3b04a5[_0x229888(0xcb)]+_0x229888(0xab)+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x4ed3f3[_0x229888(0xbf)],_0x4ed3f3[_0x229888(0x9a)],pathToArray(_0x44b3e3+_0x229888(0xb8)))});}}return _0x3e822d;}
1
+ (function(_0xe23615,_0x57933f){const _0x4ea9f1=a156_0xe061,_0x2ca47b=_0xe23615();while(!![]){try{const _0x298ab3=parseInt(_0x4ea9f1(0x213))/0x1+parseInt(_0x4ea9f1(0x20e))/0x2*(-parseInt(_0x4ea9f1(0x1e4))/0x3)+-parseInt(_0x4ea9f1(0x225))/0x4+-parseInt(_0x4ea9f1(0x1ee))/0x5*(parseInt(_0x4ea9f1(0x1e8))/0x6)+-parseInt(_0x4ea9f1(0x206))/0x7*(parseInt(_0x4ea9f1(0x207))/0x8)+-parseInt(_0x4ea9f1(0x1e2))/0x9*(-parseInt(_0x4ea9f1(0x1e7))/0xa)+parseInt(_0x4ea9f1(0x224))/0xb;if(_0x298ab3===_0x57933f)break;else _0x2ca47b['push'](_0x2ca47b['shift']());}catch(_0x2c6cae){_0x2ca47b['push'](_0x2ca47b['shift']());}}}(a156_0x3d72,0xc829e));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x35b6c3,_0x27708e={},_0x3ffc3b={}){const _0x451337=a156_0xe061;if(_0x3ffc3b['skipSchema'])return runSemanticChecks(_0x35b6c3,_0x27708e);const _0x1de9e1=SegmentDefSchema[_0x451337(0x1fa)](_0x35b6c3);if(_0x1de9e1['success'])return runSemanticChecks(_0x1de9e1[_0x451337(0x1de)],_0x27708e);return zodErrorsToValidationResult(_0x1de9e1[_0x451337(0x1f2)],_0x27708e);}function a156_0x3d72(){const _0x2fe0b9=['message','And','endsWith','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','rule','description','success','.operator.type','39499152Uqkxjp','953572pDjSLT','.source','data','Attribute\x20name\x20cannot\x20be\x20empty','name','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','36OwKXMs','.conditions[','60hMSiED','source','.type','880DzCBOT','18cNVCpQ','MISSING_BETWEEN_BOUNDS','attribute','issues','filter','rule.type','1244460KEfsPg','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','arrayMatching','includes','error','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','type','document','match','.operator.value','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','path','safeParse','warning','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','MISSING_TIME_UNIT','custom','.attribute','validationCode','Behavior','EMPTY_CONDITIONS','aggregation','conditions','378QVlhkn','162952nULafv','SEGMENT_SCHEMA_ERROR','Value','BEHAVIOR_SOURCE_MISSING_FILTER','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','Attribute\x20\x27','MISSING_OPERATOR_VALUE','73366lrTfbZ','code','.segment','length','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','47341HysMrF','.filter','invalid_value','.conditions','symbol','push','INVALID_OPERATOR_TYPE','map','level'];a156_0x3d72=function(){return _0x2fe0b9;};return a156_0x3d72();}export function validateRuleDef(_0x23f79c,_0x47f1fe,_0xf03b77){const _0x4e9977=a156_0xe061;if(!_0x23f79c)return[];const _0x146c2a=RuleDefSchema['safeParse'](_0x23f79c);if(_0x146c2a[_0x4e9977(0x222)])return checkRule(_0x146c2a[_0x4e9977(0x1de)],_0x47f1fe,_0xf03b77);const _0x5d4c54=flattenZodIssues(_0x146c2a[_0x4e9977(0x1f2)]['issues']);return _0x5d4c54[_0x4e9977(0x21a)](_0xb2a22=>{const _0x1c9a1a=_0x4e9977,_0x717d9f=formatZodPath(_0xb2a22[_0x1c9a1a(0x1f9)]),_0x54b0bd=_0x717d9f?_0x47f1fe+'.'+_0x717d9f:_0x47f1fe,_0x3e48fa=mapZodIssueToCode(_0xb2a22,_0x717d9f),_0x27beb3=getLocationFromPath(_0xf03b77['document'],_0xf03b77[_0x1c9a1a(0x1e5)],pathToArray(_0x54b0bd));return{'level':_0x1c9a1a(0x1f2),'path':_0x54b0bd,'code':_0x3e48fa,'message':_0xb2a22[_0x1c9a1a(0x21c)],..._0x27beb3&&{'location':_0x27beb3}};});}function zodErrorsToValidationResult(_0x44f1a9,_0x1416b2){const _0x1d2040=a156_0xe061,_0x227f70=flattenZodIssues(_0x44f1a9[_0x1d2040(0x1eb)]),_0x347542=_0x227f70['map'](_0x278bb9=>{const _0x229976=_0x1d2040,_0x5903ce=formatZodPath(_0x278bb9[_0x229976(0x1f9)]),_0x3cc84a=mapZodIssueToCode(_0x278bb9,_0x5903ce),_0x2219e0=getLocationFromPath(_0x1416b2[_0x229976(0x1f5)],_0x1416b2[_0x229976(0x1e5)],_0x278bb9[_0x229976(0x1f9)][_0x229976(0x21a)](_0xe1f7d4=>typeof _0xe1f7d4===_0x229976(0x217)?String(_0xe1f7d4):_0xe1f7d4));return{'level':_0x229976(0x1f2),'path':_0x5903ce,'code':_0x3cc84a,'message':_0x278bb9[_0x229976(0x21c)],..._0x2219e0&&{'location':_0x2219e0}};});return{'valid':![],'errors':_0x347542,'warnings':[]};}function mapZodIssueToCode(_0x492b9b,_0x28314f){const _0x465529=a156_0xe061,_0x573926=_0x492b9b[_0x465529(0x20f)]===_0x465529(0x1ff)?_0x492b9b['params']:undefined;if(_0x28314f===_0x465529(0x1e0))return'MISSING_NAME';if(_0x28314f===_0x465529(0x1ed)||_0x28314f[_0x465529(0x21e)](_0x465529(0x1e6))){if(_0x492b9b[_0x465529(0x20f)]===_0x465529(0x215)){if(_0x28314f===_0x465529(0x1ed)||_0x28314f[_0x465529(0x1f6)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x28314f[_0x465529(0x21e)](_0x465529(0x223)))return _0x465529(0x219);if(_0x28314f[_0x465529(0x21e)](_0x465529(0x1f7)))return _0x465529(0x20d);if(_0x573926?.[_0x465529(0x201)]===_0x465529(0x1e9))return'MISSING_BETWEEN_BOUNDS';if(_0x573926?.[_0x465529(0x201)]===_0x465529(0x1fe))return _0x465529(0x1fe);if(_0x28314f[_0x465529(0x21e)](_0x465529(0x216))||_0x28314f===_0x465529(0x205))return'MISSING_CONDITIONS';if(_0x28314f[_0x465529(0x1f1)](_0x465529(0x1f0)))return'INVALID_ARRAY_MATCHING';if(_0x28314f[_0x465529(0x21e)](_0x465529(0x210)))return'MISSING_SEGMENT_REFERENCE';return _0x465529(0x208);}function runSemanticChecks(_0x3af32a,_0x206e43){const _0x266ebb=a156_0xe061,_0x33ca93=[];_0x3af32a[_0x266ebb(0x220)]&&_0x33ca93[_0x266ebb(0x218)](...checkRule(_0x3af32a[_0x266ebb(0x220)],_0x266ebb(0x220),_0x206e43));const _0x216aa3=_0x33ca93[_0x266ebb(0x1ec)](_0x5652df=>_0x5652df['level']===_0x266ebb(0x1f2)),_0x5537f1=_0x33ca93[_0x266ebb(0x1ec)](_0x5255b8=>_0x5255b8[_0x266ebb(0x21b)]===_0x266ebb(0x1fb));return{'valid':_0x216aa3['length']===0x0,'errors':_0x216aa3,'warnings':_0x5537f1};}function a156_0xe061(_0x4d663a,_0x3e357e){_0x4d663a=_0x4d663a-0x1de;const _0x3d720b=a156_0x3d72();let _0xe061de=_0x3d720b[_0x4d663a];return _0xe061de;}function checkRule(_0xbfb8e1,_0x38a5be,_0x158c3f){const _0x2c113a=a156_0xe061,_0x55c728=[];if(_0xbfb8e1[_0x2c113a(0x205)][_0x2c113a(0x211)]===0x0)return _0x55c728[_0x2c113a(0x218)]({'level':_0x2c113a(0x1f2),'path':_0x38a5be+_0x2c113a(0x216),'code':_0x2c113a(0x203),'message':_0x2c113a(0x1fc),'location':getLocationFromPath(_0x158c3f['document'],_0x158c3f[_0x2c113a(0x1e5)],pathToArray(_0x38a5be+'.conditions'))}),_0x55c728;return _0x55c728['push'](...checkConditions(_0xbfb8e1[_0x2c113a(0x205)],_0x38a5be,_0x158c3f)),_0x55c728;}function checkConditions(_0x35bc7d,_0x15865c,_0x566d40){const _0x4947e0=a156_0xe061,_0x4fd66a=[];for(let _0x48888a=0x0;_0x48888a<_0x35bc7d[_0x4947e0(0x211)];_0x48888a++){const _0x32b603=_0x35bc7d[_0x48888a],_0x4fc63a=_0x15865c+_0x4947e0(0x1e3)+_0x48888a+']';_0x4fd66a[_0x4947e0(0x218)](...checkCondition(_0x32b603,_0x4fc63a,_0x566d40));}return _0x4fd66a;}function checkCondition(_0x3a6714,_0x5436ae,_0x3b520c){const _0x53da8a=a156_0xe061,_0x52d106=[];if(_0x3a6714[_0x53da8a(0x1f4)]===_0x53da8a(0x21d)||_0x3a6714['type']==='Or'){if(_0x3a6714[_0x53da8a(0x205)][_0x53da8a(0x211)]===0x0)_0x52d106['push']({'level':_0x53da8a(0x1f2),'path':_0x5436ae+_0x53da8a(0x216),'code':_0x53da8a(0x203),'message':_0x3a6714[_0x53da8a(0x1f4)]+_0x53da8a(0x1ef),'location':getLocationFromPath(_0x3b520c['document'],_0x3b520c[_0x53da8a(0x1e5)],pathToArray(_0x5436ae+_0x53da8a(0x216)))});else{const _0x414b16=_0x3a6714[_0x53da8a(0x221)]!==undefined;!_0x414b16&&_0x52d106['push']({'level':_0x53da8a(0x1fb),'path':_0x5436ae,'code':'NESTED_CONDITION_GROUP','message':_0x3a6714[_0x53da8a(0x1f4)]+_0x53da8a(0x1fd)+'condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20'+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x3b520c[_0x53da8a(0x1f5)],_0x3b520c[_0x53da8a(0x1e5)],pathToArray(_0x5436ae))}),_0x52d106[_0x53da8a(0x218)](...checkConditions(_0x3a6714['conditions'],_0x5436ae,_0x3b520c));}return _0x52d106;}if(_0x3a6714['type']===_0x53da8a(0x209)||_0x3a6714[_0x53da8a(0x1f4)]===_0x53da8a(0x202)){const _0x26248e=_0x3a6714,_0x46173d=_0x26248e[_0x53da8a(0x1e5)],_0x15ff87=_0x26248e[_0x53da8a(0x204)],_0x11c507=_0x46173d||_0x15ff87;(!_0x26248e[_0x53da8a(0x1ea)]||_0x26248e[_0x53da8a(0x1ea)]==='')&&(!_0x11c507&&_0x52d106[_0x53da8a(0x218)]({'level':_0x53da8a(0x1f2),'path':_0x5436ae+_0x53da8a(0x200),'code':'EMPTY_ATTRIBUTE','message':_0x53da8a(0x1df),'location':getLocationFromPath(_0x3b520c[_0x53da8a(0x1f5)],_0x3b520c['source'],pathToArray(_0x5436ae+_0x53da8a(0x200)))}));_0x26248e[_0x53da8a(0x1ec)]&&_0x52d106[_0x53da8a(0x218)](...checkRule(_0x26248e[_0x53da8a(0x1ec)],_0x5436ae+_0x53da8a(0x214),_0x3b520c));if(_0x26248e['source']){const _0xb9a977=_0x26248e[_0x53da8a(0x1ea)]&&_0x26248e['attribute']!=='';_0xb9a977&&!_0x26248e['filter']&&_0x52d106[_0x53da8a(0x218)]({'level':_0x53da8a(0x1f2),'path':_0x5436ae+_0x53da8a(0x226),'code':_0x53da8a(0x20a),'message':'Behavior\x20source\x20\x27'+_0x26248e[_0x53da8a(0x1e5)]+'\x27\x20with\x20attribute\x20\x27'+_0x26248e[_0x53da8a(0x1ea)]+'\x27\x20'+_0x53da8a(0x1f3)+_0x53da8a(0x212)+_0x53da8a(0x1f8),'location':getLocationFromPath(_0x3b520c[_0x53da8a(0x1f5)],_0x3b520c[_0x53da8a(0x1e5)],pathToArray(_0x5436ae+_0x53da8a(0x226)))}),_0xb9a977&&_0x26248e['filter']&&_0x52d106[_0x53da8a(0x218)]({'level':_0x53da8a(0x1fb),'path':_0x5436ae+_0x53da8a(0x200),'code':_0x53da8a(0x20b),'message':_0x53da8a(0x20c)+_0x26248e[_0x53da8a(0x1ea)]+_0x53da8a(0x1e1)+_0x53da8a(0x21f),'location':getLocationFromPath(_0x3b520c[_0x53da8a(0x1f5)],_0x3b520c[_0x53da8a(0x1e5)],pathToArray(_0x5436ae+_0x53da8a(0x200)))});}}return _0x52d106;}
@@ -1 +1 @@
1
- (function(_0x5159ea,_0x39d8d9){const _0xeb3562=a157_0x20fa,_0x124261=_0x5159ea();while(!![]){try{const _0xb2272e=-parseInt(_0xeb3562(0x206))/0x1+-parseInt(_0xeb3562(0x1df))/0x2+-parseInt(_0xeb3562(0x20c))/0x3*(-parseInt(_0xeb3562(0x1f9))/0x4)+parseInt(_0xeb3562(0x1de))/0x5+-parseInt(_0xeb3562(0x1f8))/0x6+parseInt(_0xeb3562(0x20b))/0x7+-parseInt(_0xeb3562(0x1e4))/0x8;if(_0xb2272e===_0x39d8d9)break;else _0x124261['push'](_0x124261['shift']());}catch(_0x3e2d62){_0x124261['push'](_0x124261['shift']());}}}(a157_0x18f2,0xca636));import a157_0x507e28 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a157_0x20fa(_0x5b3b99,_0x2e9803){_0x5b3b99=_0x5b3b99-0x1dc;const _0x18f264=a157_0x18f2();let _0x20faac=_0x18f264[_0x5b3b99];return _0x20faac;}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x1cc556){const _0x5d5446=a157_0x20fa;return _0x1cc556[_0x5d5446(0x1f0)]!==_0x5d5446(0x210);}export function isScopedResolution(_0xb34855){const _0x311565=a157_0x20fa;return _0xb34855[_0x311565(0x1f0)]===_0x311565(0x1e3)||_0xb34855[_0x311565(0x1f0)]===_0x311565(0x1dd)||_0xb34855[_0x311565(0x1f0)]==='context';}function a157_0x18f2(){const _0x1a09e9=['parse','startsWith','182250wtSOuo','segmentName','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','file_not_found','scopedFolderPath','3115000TVbQGm','894HeBbxl','extname','invalid_yaml','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','error','exists','file','6843475LVRUdp','343302uVbIyp','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','journey','folderPath','directory','6608000jzkUYO','replace','Not\x20a\x20YAML\x20file:\x20','segment','parent_segment','resolve','message','readFile','root','match','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','cwd','type','No\x20tdx.json\x20found\x20for\x20file:\x20','includes','relative','File\x20not\x20found','resourceType','configDir','no_config','8621748NSpLIW','21908gDqhYg','isScoped','stat','dirname','Parent\x20segment\x20not\x20specified','join','No\x20tdx.json\x20found','string','basename','isDirectory','parentSegment'];a157_0x18f2=function(){return _0x1a09e9;};return a157_0x18f2();}export function getScopedDetails(_0x320ed6){const _0x50e177=a157_0x20fa;if(isScopedResolution(_0x320ed6))return{'isScoped':_0x320ed6[_0x50e177(0x1fa)],'scopedFolderPath':_0x320ed6[_0x50e177(0x20a)]};return undefined;}async function findTdxConfigAsync(_0x211500,_0x25ed68){const _0x31bd19=a157_0x20fa;let _0x2009a7=a157_0x507e28[_0x31bd19(0x1e9)](_0x211500);const _0x58284a=a157_0x507e28[_0x31bd19(0x204)](_0x2009a7)[_0x31bd19(0x1ec)];while(_0x2009a7!==_0x58284a){const _0x432e25=a157_0x507e28[_0x31bd19(0x1fe)](_0x2009a7,'tdx.json');if(await _0x25ed68[_0x31bd19(0x1dc)](_0x432e25))try{const _0x2f34c1=await _0x25ed68[_0x31bd19(0x1eb)](_0x432e25),_0x33706d=JSON[_0x31bd19(0x204)](_0x2f34c1);if(_0x33706d[_0x31bd19(0x1e8)]&&typeof _0x33706d[_0x31bd19(0x1e8)]===_0x31bd19(0x200))return{'configPath':_0x432e25,'configDir':_0x2009a7,'parentSegment':_0x33706d[_0x31bd19(0x1e8)]};}catch{}_0x2009a7=a157_0x507e28[_0x31bd19(0x1fc)](_0x2009a7);}return null;}function calculateScopedPath(_0x33f696,_0x2babba){const _0x5136e8=a157_0x20fa,_0x212923=a157_0x507e28[_0x5136e8(0x1f3)](_0x2babba,_0x33f696),_0x96fd25=_0x212923!==''&&_0x212923!=='.'&&!_0x212923[_0x5136e8(0x205)]('..');return{'isScoped':_0x96fd25,'scopedFolderPath':_0x96fd25?_0x212923[_0x5136e8(0x1e5)](/\\/g,'/'):''};}export async function resolveTarget(_0x23e59c){const _0x1c1931=a157_0x20fa,{arg:_0x2abbe6,contextParent:_0x45b667,cwd:cwd=process[_0x1c1931(0x1ef)](),fs:fs=nodeFileSystem}=_0x23e59c;if(_0x2abbe6&&isYamlFilePath(_0x2abbe6))try{const _0x359ef7=await resolveYamlFilePath(_0x2abbe6,fs),_0x5760f8=a157_0x507e28[_0x1c1931(0x1e9)](_0x2abbe6),_0x4902a4=a157_0x507e28['dirname'](_0x5760f8),_0x53a64b=await findTdxConfigAsync(_0x4902a4,fs);if(!_0x53a64b){if(_0x45b667){const _0x4ad7b8=a157_0x507e28[_0x1c1931(0x1fc)](_0x5760f8);return{'type':_0x1c1931(0x1dd),'parentName':_0x45b667,'targetDir':_0x4ad7b8,'configRoot':_0x4ad7b8,'filePath':_0x5760f8,'resourceName':_0x359ef7[_0x1c1931(0x207)],'folderPath':_0x359ef7['folderPath'],'resourceType':_0x359ef7[_0x1c1931(0x1f5)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x1c1931(0x1f1)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x1e0)};}const _0x102356=calculateScopedPath(_0x4902a4,_0x53a64b['configDir']);return{'type':_0x1c1931(0x1dd),'parentName':_0x53a64b[_0x1c1931(0x203)],'targetDir':_0x53a64b[_0x1c1931(0x1f6)],'configRoot':_0x53a64b[_0x1c1931(0x1f6)],'filePath':_0x5760f8,'resourceName':_0x359ef7[_0x1c1931(0x207)],'folderPath':_0x359ef7[_0x1c1931(0x1e2)],'resourceType':_0x359ef7[_0x1c1931(0x1f5)],'isScoped':_0x102356[_0x1c1931(0x1fa)],'scopedFolderPath':_0x102356[_0x1c1931(0x20a)]};}catch(_0xc2004e){const _0xab97f7=_0xc2004e instanceof Error?_0xc2004e[_0x1c1931(0x1ea)]:String(_0xc2004e);if(_0xab97f7[_0x1c1931(0x1f2)](_0x1c1931(0x1f4)))return{'type':_0x1c1931(0x210),'errorCode':_0x1c1931(0x209),'message':'File\x20not\x20found:\x20'+_0x2abbe6,'arg':_0x2abbe6};if(_0xab97f7[_0x1c1931(0x1f2)](_0x1c1931(0x1ff))){if(_0x45b667){const _0x5cf2f3=a157_0x507e28[_0x1c1931(0x1e9)](_0x2abbe6);if(await fs[_0x1c1931(0x1dc)](_0x5cf2f3)){const _0x31974b=a157_0x507e28['dirname'](_0x5cf2f3),_0x1b4e52=await fs['readFile'](_0x5cf2f3),_0x3b1af4=_0x1b4e52[_0x1c1931(0x1ed)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5639fc=_0x1b4e52[_0x1c1931(0x1ed)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x9a615f=_0x3b1af4?_0x3b1af4[0x1]['trim']():a157_0x507e28[_0x1c1931(0x201)](_0x2abbe6,a157_0x507e28[_0x1c1931(0x20d)](_0x2abbe6)),_0xdcccbd=_0x5639fc&&_0x5639fc[0x1]['trim']()===_0x1c1931(0x1e1)?_0x1c1931(0x1e1):_0x1c1931(0x1e7);return{'type':_0x1c1931(0x1dd),'parentName':_0x45b667,'targetDir':_0x31974b,'configRoot':_0x31974b,'filePath':_0x5cf2f3,'resourceName':_0x9a615f,'folderPath':'','resourceType':_0xdcccbd,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x1c1931(0x1f7),'message':_0x1c1931(0x1f1)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x1e0)};}return{'type':'error','errorCode':_0x1c1931(0x20e),'message':_0xab97f7,'arg':_0x2abbe6};}if(_0x2abbe6){const _0x1fb721=a157_0x507e28[_0x1c1931(0x1e9)](cwd,_0x2abbe6);let _0x16415c=null;try{_0x16415c=await fs[_0x1c1931(0x1fb)](_0x1fb721);}catch{}if(_0x16415c?.[_0x1c1931(0x202)]()){const _0x15a467=await findTdxConfigAsync(_0x1fb721,fs);if(_0x15a467){const _0x3e8df1=calculateScopedPath(_0x1fb721,_0x15a467[_0x1c1931(0x1f6)]);return{'type':_0x1c1931(0x1e3),'parentName':_0x15a467[_0x1c1931(0x203)],'targetDir':_0x1fb721,'configRoot':_0x15a467[_0x1c1931(0x1f6)],'isScoped':_0x3e8df1[_0x1c1931(0x1fa)],'scopedFolderPath':_0x3e8df1['scopedFolderPath']};}if(_0x45b667)return{'type':'directory','parentName':_0x45b667,'targetDir':_0x1fb721,'configRoot':_0x1fb721,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':'no_config','message':_0x1c1931(0x208)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x1e0)};}if(_0x16415c?.['isFile']())return{'type':'error','errorCode':_0x1c1931(0x20e),'message':_0x1c1931(0x1e6)+_0x2abbe6,'arg':_0x2abbe6,'helpText':_0x1c1931(0x20f)};const _0x1e717b=sanitizeFileName(_0x2abbe6),_0x2c3b41=getSegmentRootDir(_0x1e717b,cwd);return{'type':'parent_name','parentName':_0x2abbe6,'targetDir':_0x2c3b41,'configRoot':_0x2c3b41};}const _0x5ccc76=await findTdxConfigAsync(cwd,fs);if(_0x5ccc76){const _0x27e3a6=calculateScopedPath(cwd,_0x5ccc76[_0x1c1931(0x1f6)]);return{'type':'context','parentName':_0x5ccc76[_0x1c1931(0x203)],'targetDir':cwd,'configRoot':_0x5ccc76[_0x1c1931(0x1f6)],'isScoped':_0x27e3a6['isScoped'],'scopedFolderPath':_0x27e3a6[_0x1c1931(0x20a)]};}if(_0x45b667){const _0x39dcb6=sanitizeFileName(_0x45b667),_0x49bb27=getSegmentRootDir(_0x39dcb6,cwd);return{'type':'context','parentName':_0x45b667,'targetDir':_0x49bb27,'configRoot':_0x49bb27,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1c1931(0x210),'errorCode':'no_parent','message':_0x1c1931(0x1fd),'helpText':_0x1c1931(0x1ee)};}
1
+ (function(_0x596955,_0x4d69f6){const _0x193c03=a157_0x35d8,_0x4c3362=_0x596955();while(!![]){try{const _0x5dfe60=-parseInt(_0x193c03(0x1f2))/0x1*(-parseInt(_0x193c03(0x1ce))/0x2)+parseInt(_0x193c03(0x1ef))/0x3*(parseInt(_0x193c03(0x1ea))/0x4)+-parseInt(_0x193c03(0x1c7))/0x5+-parseInt(_0x193c03(0x1de))/0x6*(parseInt(_0x193c03(0x1cb))/0x7)+-parseInt(_0x193c03(0x1e7))/0x8*(-parseInt(_0x193c03(0x1e1))/0x9)+parseInt(_0x193c03(0x1e5))/0xa+parseInt(_0x193c03(0x1ed))/0xb;if(_0x5dfe60===_0x4d69f6)break;else _0x4c3362['push'](_0x4c3362['shift']());}catch(_0xed8b63){_0x4c3362['push'](_0x4c3362['shift']());}}}(a157_0x1a30,0x78625));import a157_0x44a74e from'path';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(_0x73eb3b){return _0x73eb3b['type']!=='error';}export function isScopedResolution(_0x272b34){const _0x6a58d4=a157_0x35d8;return _0x272b34[_0x6a58d4(0x1c8)]===_0x6a58d4(0x1dd)||_0x272b34[_0x6a58d4(0x1c8)]===_0x6a58d4(0x1e6)||_0x272b34[_0x6a58d4(0x1c8)]===_0x6a58d4(0x1d5);}export function getScopedDetails(_0x39bebe){const _0x521cc5=a157_0x35d8;if(isScopedResolution(_0x39bebe))return{'isScoped':_0x39bebe[_0x521cc5(0x1c9)],'scopedFolderPath':_0x39bebe['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x4f7896,_0x5dab11){const _0x476ef6=a157_0x35d8;let _0x32d4ce=a157_0x44a74e['resolve'](_0x4f7896);const _0x5abb80=a157_0x44a74e[_0x476ef6(0x1e4)](_0x32d4ce)['root'];while(_0x32d4ce!==_0x5abb80){const _0x3efbd3=a157_0x44a74e[_0x476ef6(0x1cc)](_0x32d4ce,'tdx.json');if(await _0x5dab11['exists'](_0x3efbd3))try{const _0xca82d6=await _0x5dab11[_0x476ef6(0x1c6)](_0x3efbd3),_0x2288b7=JSON[_0x476ef6(0x1e4)](_0xca82d6);if(_0x2288b7[_0x476ef6(0x1d4)]&&typeof _0x2288b7[_0x476ef6(0x1d4)]===_0x476ef6(0x1cf))return{'configPath':_0x3efbd3,'configDir':_0x32d4ce,'parentSegment':_0x2288b7['parent_segment']};}catch{}_0x32d4ce=a157_0x44a74e[_0x476ef6(0x1e3)](_0x32d4ce);}return null;}function a157_0x35d8(_0x2f13bd,_0x3d119e){_0x2f13bd=_0x2f13bd-0x1be;const _0x1a3085=a157_0x1a30();let _0x35d810=_0x1a3085[_0x2f13bd];return _0x35d810;}function calculateScopedPath(_0x2bab64,_0x22cecc){const _0x521e17=a157_0x35d8,_0x5754b6=a157_0x44a74e[_0x521e17(0x1d3)](_0x22cecc,_0x2bab64),_0x224709=_0x5754b6!==''&&_0x5754b6!=='.'&&!_0x5754b6[_0x521e17(0x1bf)]('..');return{'isScoped':_0x224709,'scopedFolderPath':_0x224709?_0x5754b6[_0x521e17(0x1e0)](/\\/g,'/'):''};}function a157_0x1a30(){const _0x2a8464=['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','basename','relative','parent_segment','context','isDirectory','parent_name','parentSegment','exists','cwd','message','configDir','directory','112806cjVKZD','segmentName','replace','9xGnTGO','file_not_found','dirname','parse','2368240Hzighz','file','1453688WrSkUF','No\x20tdx.json\x20found\x20for\x20file:\x20','error','8wGSqSv','No\x20tdx.json\x20found','File\x20not\x20found','2173864QiBozV','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','68127BaUbRK','trim','journey','796483UmGKfI','no_config','invalid_yaml','startsWith','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','resourceType','includes','match','File\x20not\x20found:\x20','resolve','readFile','1910680EIpXCL','type','isScoped','scopedFolderPath','217YceYvd','join','folderPath','2EkYfUb','string','segment'];a157_0x1a30=function(){return _0x2a8464;};return a157_0x1a30();}export async function resolveTarget(_0x11b486){const _0x3e9434=a157_0x35d8,{arg:_0x2d20ab,contextParent:_0x333396,cwd:cwd=process[_0x3e9434(0x1da)](),fs:fs=nodeFileSystem}=_0x11b486;if(_0x2d20ab&&isYamlFilePath(_0x2d20ab))try{const _0x17422e=await resolveYamlFilePath(_0x2d20ab,fs),_0x3a0ae9=a157_0x44a74e[_0x3e9434(0x1c5)](_0x2d20ab),_0x49ae27=a157_0x44a74e['dirname'](_0x3a0ae9),_0x4f7e1b=await findTdxConfigAsync(_0x49ae27,fs);if(!_0x4f7e1b){if(_0x333396){const _0x52af67=a157_0x44a74e['dirname'](_0x3a0ae9);return{'type':_0x3e9434(0x1e6),'parentName':_0x333396,'targetDir':_0x52af67,'configRoot':_0x52af67,'filePath':_0x3a0ae9,'resourceName':_0x17422e['segmentName'],'folderPath':_0x17422e[_0x3e9434(0x1cd)],'resourceType':_0x17422e[_0x3e9434(0x1c1)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x3e9434(0x1f3),'message':_0x3e9434(0x1e8)+_0x2d20ab,'arg':_0x2d20ab,'helpText':_0x3e9434(0x1ee)};}const _0xd642fa=calculateScopedPath(_0x49ae27,_0x4f7e1b[_0x3e9434(0x1dc)]);return{'type':_0x3e9434(0x1e6),'parentName':_0x4f7e1b[_0x3e9434(0x1d8)],'targetDir':_0x4f7e1b['configDir'],'configRoot':_0x4f7e1b['configDir'],'filePath':_0x3a0ae9,'resourceName':_0x17422e[_0x3e9434(0x1df)],'folderPath':_0x17422e[_0x3e9434(0x1cd)],'resourceType':_0x17422e['resourceType'],'isScoped':_0xd642fa[_0x3e9434(0x1c9)],'scopedFolderPath':_0xd642fa[_0x3e9434(0x1ca)]};}catch(_0x2ec2ac){const _0x36b3f9=_0x2ec2ac instanceof Error?_0x2ec2ac[_0x3e9434(0x1db)]:String(_0x2ec2ac);if(_0x36b3f9['includes'](_0x3e9434(0x1ec)))return{'type':_0x3e9434(0x1e9),'errorCode':_0x3e9434(0x1e2),'message':_0x3e9434(0x1c4)+_0x2d20ab,'arg':_0x2d20ab};if(_0x36b3f9[_0x3e9434(0x1c2)](_0x3e9434(0x1eb))){if(_0x333396){const _0xec7b9d=a157_0x44a74e['resolve'](_0x2d20ab);if(await fs[_0x3e9434(0x1d9)](_0xec7b9d)){const _0x1b8f55=a157_0x44a74e['dirname'](_0xec7b9d),_0x763f0d=await fs[_0x3e9434(0x1c6)](_0xec7b9d),_0x27fe55=_0x763f0d[_0x3e9434(0x1c3)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x14533e=_0x763f0d[_0x3e9434(0x1c3)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x2f436b=_0x27fe55?_0x27fe55[0x1][_0x3e9434(0x1f0)]():a157_0x44a74e[_0x3e9434(0x1d2)](_0x2d20ab,a157_0x44a74e['extname'](_0x2d20ab)),_0x4a62b6=_0x14533e&&_0x14533e[0x1][_0x3e9434(0x1f0)]()===_0x3e9434(0x1f1)?_0x3e9434(0x1f1):_0x3e9434(0x1d0);return{'type':_0x3e9434(0x1e6),'parentName':_0x333396,'targetDir':_0x1b8f55,'configRoot':_0x1b8f55,'filePath':_0xec7b9d,'resourceName':_0x2f436b,'folderPath':'','resourceType':_0x4a62b6,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x3e9434(0x1e9),'errorCode':'no_config','message':_0x3e9434(0x1e8)+_0x2d20ab,'arg':_0x2d20ab,'helpText':_0x3e9434(0x1ee)};}return{'type':_0x3e9434(0x1e9),'errorCode':_0x3e9434(0x1be),'message':_0x36b3f9,'arg':_0x2d20ab};}if(_0x2d20ab){const _0x255f4b=a157_0x44a74e[_0x3e9434(0x1c5)](cwd,_0x2d20ab);let _0x33be2e=null;try{_0x33be2e=await fs['stat'](_0x255f4b);}catch{}if(_0x33be2e?.[_0x3e9434(0x1d6)]()){const _0x4b495e=await findTdxConfigAsync(_0x255f4b,fs);if(_0x4b495e){const _0x2d9944=calculateScopedPath(_0x255f4b,_0x4b495e[_0x3e9434(0x1dc)]);return{'type':_0x3e9434(0x1dd),'parentName':_0x4b495e[_0x3e9434(0x1d8)],'targetDir':_0x255f4b,'configRoot':_0x4b495e['configDir'],'isScoped':_0x2d9944[_0x3e9434(0x1c9)],'scopedFolderPath':_0x2d9944[_0x3e9434(0x1ca)]};}if(_0x333396)return{'type':_0x3e9434(0x1dd),'parentName':_0x333396,'targetDir':_0x255f4b,'configRoot':_0x255f4b,'isScoped':![],'scopedFolderPath':''};return{'type':_0x3e9434(0x1e9),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x2d20ab,'arg':_0x2d20ab,'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'};}if(_0x33be2e?.['isFile']())return{'type':'error','errorCode':_0x3e9434(0x1be),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x2d20ab,'arg':_0x2d20ab,'helpText':_0x3e9434(0x1c0)};const _0x2e727e=sanitizeFileName(_0x2d20ab),_0x2dfc00=getSegmentRootDir(_0x2e727e,cwd);return{'type':_0x3e9434(0x1d7),'parentName':_0x2d20ab,'targetDir':_0x2dfc00,'configRoot':_0x2dfc00};}const _0x22a483=await findTdxConfigAsync(cwd,fs);if(_0x22a483){const _0x399ceb=calculateScopedPath(cwd,_0x22a483[_0x3e9434(0x1dc)]);return{'type':'context','parentName':_0x22a483[_0x3e9434(0x1d8)],'targetDir':cwd,'configRoot':_0x22a483['configDir'],'isScoped':_0x399ceb[_0x3e9434(0x1c9)],'scopedFolderPath':_0x399ceb['scopedFolderPath']};}if(_0x333396){const _0x57c5a6=sanitizeFileName(_0x333396),_0x55469a=getSegmentRootDir(_0x57c5a6,cwd);return{'type':_0x3e9434(0x1d5),'parentName':_0x333396,'targetDir':_0x55469a,'configRoot':_0x55469a,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_parent','message':'Parent\x20segment\x20not\x20specified','helpText':_0x3e9434(0x1d1)};}
@@ -1 +1 @@
1
- const a158_0x2ace9c=a158_0x3b11;(function(_0x29c3bf,_0x48a723){const _0x4593f8=a158_0x3b11,_0x1678c9=_0x29c3bf();while(!![]){try{const _0x53b931=parseInt(_0x4593f8(0x193))/0x1*(-parseInt(_0x4593f8(0x1a8))/0x2)+-parseInt(_0x4593f8(0x190))/0x3*(parseInt(_0x4593f8(0x1a1))/0x4)+parseInt(_0x4593f8(0x191))/0x5+-parseInt(_0x4593f8(0x199))/0x6+-parseInt(_0x4593f8(0x1a0))/0x7*(parseInt(_0x4593f8(0x19f))/0x8)+parseInt(_0x4593f8(0x19d))/0x9+parseInt(_0x4593f8(0x194))/0xa;if(_0x53b931===_0x48a723)break;else _0x1678c9['push'](_0x1678c9['shift']());}catch(_0x383bff){_0x1678c9['push'](_0x1678c9['shift']());}}}(a158_0xddee,0x6426c));import{existsSync,readFileSync}from'fs';import a158_0x1536fe from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR='segments';function a158_0xddee(){const _0x546ee0=['root','engage_workspace','stringify','relative','cwd','Invalid\x20JSON\x20in\x20','44VDCXdS','110757wSgaAs','3169820jjhLAx','replace','13996lEqvBZ','9352500ebfXys','join','startsWith','dirname','parent_segment','4110096MNUojs','string','object','utf-8','7225173CncVCw','resolve','8XWOdbq','3939278QHtNkX','44GXMyYq'];a158_0xddee=function(){return _0x546ee0;};return a158_0xddee();}export function findTdxConfigPath(_0x145377=process[a158_0x2ace9c(0x1a6)]()){const _0x1f2cfb=a158_0x2ace9c;let _0x254922=a158_0x1536fe[_0x1f2cfb(0x19e)](_0x145377);const _0x5ed294=a158_0x1536fe['parse'](_0x254922)[_0x1f2cfb(0x1a2)];while(_0x254922!==_0x5ed294){const _0x40ca03=a158_0x1536fe['join'](_0x254922,TDX_CONFIG_FILE);if(existsSync(_0x40ca03))return _0x40ca03;_0x254922=a158_0x1536fe[_0x1f2cfb(0x197)](_0x254922);}return null;}export function loadTdxConfig(_0x390e98){const _0xbde92d=a158_0x2ace9c,_0x227a6=readFileSync(_0x390e98,_0xbde92d(0x19c));let _0x5586c;try{_0x5586c=JSON['parse'](_0x227a6);}catch{throw new Error(_0xbde92d(0x1a7)+_0x390e98);}if(!_0x5586c||typeof _0x5586c!==_0xbde92d(0x19b))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x2936ac=_0x5586c,_0x3d6235=_0x2936ac['parent_segment']&&typeof _0x2936ac['parent_segment']===_0xbde92d(0x19a),_0x5e869f=_0x2936ac['engage_workspace']&&typeof _0x2936ac[_0xbde92d(0x1a3)]===_0xbde92d(0x19a);if(!_0x3d6235&&!_0x5e869f)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x340404={};return _0x3d6235&&(_0x340404['parent_segment']=_0x2936ac[_0xbde92d(0x198)]),_0x5e869f&&(_0x340404[_0xbde92d(0x1a3)]=_0x2936ac[_0xbde92d(0x1a3)]),_0x340404;}export function findTdxConfig(_0x428215=process[a158_0x2ace9c(0x1a6)]()){const _0x4efb50=a158_0x2ace9c,_0x7db071=findTdxConfigPath(_0x428215);if(!_0x7db071)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x7f0c76=loadTdxConfig(_0x7db071),_0x1db81b=a158_0x1536fe[_0x4efb50(0x197)](_0x7db071);return{'config':_0x7f0c76,'configPath':_0x7db071,'configDir':_0x1db81b};}export function tryFindTdxConfig(_0x12adb7){try{return findTdxConfig(_0x12adb7);}catch{return null;}}export function getSegmentRootDir(_0x380f50,_0x4cf464=process['cwd']()){const _0x498849=a158_0x2ace9c;return a158_0x1536fe[_0x498849(0x195)](_0x4cf464,SEGMENTS_DIR,_0x380f50);}export function getTdxConfigPath(_0x4980eb,_0x58ac27=process[a158_0x2ace9c(0x1a6)]()){return a158_0x1536fe['join'](getSegmentRootDir(_0x4980eb,_0x58ac27),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x496a59,_0x1014bf){const _0x11d9ce=a158_0x2ace9c,_0x3e3ec5=a158_0x1536fe[_0x11d9ce(0x19e)](_0x496a59),_0x4cb50d=a158_0x1536fe[_0x11d9ce(0x1a5)](_0x1014bf,_0x3e3ec5);if(_0x4cb50d[_0x11d9ce(0x196)]('..'))return'';return _0x4cb50d;}export function localPathToTdFolderPath(_0x352639){const _0x3c63b2=a158_0x2ace9c,_0x3609bb=a158_0x1536fe[_0x3c63b2(0x197)](_0x352639);if(_0x3609bb==='.'||_0x3609bb==='')return'';return _0x3609bb[_0x3c63b2(0x192)](/\\/g,'/');}function a158_0x3b11(_0x28f25f,_0x325e0a){_0x28f25f=_0x28f25f-0x190;const _0xddee82=a158_0xddee();let _0x3b11d2=_0xddee82[_0x28f25f];return _0x3b11d2;}export function tdFolderPathToLocalPath(_0xd2d6b6,_0x1887f8){const _0x217108=a158_0x2ace9c;if(!_0xd2d6b6)return _0x1887f8;return a158_0x1536fe[_0x217108(0x195)](_0x1887f8,_0xd2d6b6);}export function createTdxConfigContent(_0x131edb){const _0x68ef8f={'parent_segment':_0x131edb};return JSON['stringify'](_0x68ef8f,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x499c1b){const _0x2dee0e=a158_0x2ace9c,_0xdcaf84={'engage_workspace':_0x499c1b};return JSON[_0x2dee0e(0x1a4)](_0xdcaf84,null,0x2)+'\x0a';}
1
+ const a158_0x416c8f=a158_0x22f7;(function(_0x3ae3cb,_0x2de828){const _0xfddb61=a158_0x22f7,_0x3647c4=_0x3ae3cb();while(!![]){try{const _0x488390=-parseInt(_0xfddb61(0x180))/0x1*(parseInt(_0xfddb61(0x16b))/0x2)+parseInt(_0xfddb61(0x16f))/0x3+parseInt(_0xfddb61(0x174))/0x4*(parseInt(_0xfddb61(0x17d))/0x5)+parseInt(_0xfddb61(0x17e))/0x6+-parseInt(_0xfddb61(0x176))/0x7*(-parseInt(_0xfddb61(0x16d))/0x8)+parseInt(_0xfddb61(0x169))/0x9+-parseInt(_0xfddb61(0x16e))/0xa;if(_0x488390===_0x2de828)break;else _0x3647c4['push'](_0x3647c4['shift']());}catch(_0x1e59b9){_0x3647c4['push'](_0x3647c4['shift']());}}}(a158_0x11f9,0x2a12c));import{existsSync,readFileSync}from'fs';import a158_0x1f0261 from'path';const TDX_CONFIG_FILE=a158_0x416c8f(0x16a),SEGMENTS_DIR=a158_0x416c8f(0x17f);export function findTdxConfigPath(_0x2c5e85=process[a158_0x416c8f(0x173)]()){const _0x2fda6c=a158_0x416c8f;let _0x16a63c=a158_0x1f0261[_0x2fda6c(0x171)](_0x2c5e85);const _0x394fdc=a158_0x1f0261[_0x2fda6c(0x17c)](_0x16a63c)[_0x2fda6c(0x182)];while(_0x16a63c!==_0x394fdc){const _0x410687=a158_0x1f0261[_0x2fda6c(0x16c)](_0x16a63c,TDX_CONFIG_FILE);if(existsSync(_0x410687))return _0x410687;_0x16a63c=a158_0x1f0261['dirname'](_0x16a63c);}return null;}export function loadTdxConfig(_0x61001a){const _0x18c683=a158_0x416c8f,_0x53b210=readFileSync(_0x61001a,'utf-8');let _0x553cef;try{_0x553cef=JSON[_0x18c683(0x17c)](_0x53b210);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x61001a);}if(!_0x553cef||typeof _0x553cef!==_0x18c683(0x170))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x3d7fd6=_0x553cef,_0x2b598f=_0x3d7fd6[_0x18c683(0x168)]&&typeof _0x3d7fd6['parent_segment']===_0x18c683(0x183),_0x246fac=_0x3d7fd6[_0x18c683(0x177)]&&typeof _0x3d7fd6[_0x18c683(0x177)]==='string';if(!_0x2b598f&&!_0x246fac)throw new Error(_0x18c683(0x178));const _0x2b7b79={};return _0x2b598f&&(_0x2b7b79[_0x18c683(0x168)]=_0x3d7fd6[_0x18c683(0x168)]),_0x246fac&&(_0x2b7b79[_0x18c683(0x177)]=_0x3d7fd6['engage_workspace']),_0x2b7b79;}export function findTdxConfig(_0x20ffc8=process[a158_0x416c8f(0x173)]()){const _0x1f3118=a158_0x416c8f,_0x457d8a=findTdxConfigPath(_0x20ffc8);if(!_0x457d8a)throw new Error(_0x1f3118(0x172));const _0x14026a=loadTdxConfig(_0x457d8a),_0x740849=a158_0x1f0261[_0x1f3118(0x181)](_0x457d8a);return{'config':_0x14026a,'configPath':_0x457d8a,'configDir':_0x740849};}export function tryFindTdxConfig(_0x5a4af5){try{return findTdxConfig(_0x5a4af5);}catch{return null;}}export function getSegmentRootDir(_0x4fb087,_0x5a2e9e=process[a158_0x416c8f(0x173)]()){const _0x5cff8f=a158_0x416c8f;return a158_0x1f0261[_0x5cff8f(0x16c)](_0x5a2e9e,SEGMENTS_DIR,_0x4fb087);}export function getTdxConfigPath(_0x1648a5,_0x3f9ee4=process['cwd']()){return a158_0x1f0261['join'](getSegmentRootDir(_0x1648a5,_0x3f9ee4),TDX_CONFIG_FILE);}function a158_0x22f7(_0x563cf3,_0x107da0){_0x563cf3=_0x563cf3-0x168;const _0x11f9c7=a158_0x11f9();let _0x22f7fe=_0x11f9c7[_0x563cf3];return _0x22f7fe;}export function getRelativePathFromConfig(_0x380c60,_0x550fcd){const _0x415da7=a158_0x416c8f,_0x55783b=a158_0x1f0261[_0x415da7(0x171)](_0x380c60),_0x4f446a=a158_0x1f0261[_0x415da7(0x175)](_0x550fcd,_0x55783b);if(_0x4f446a[_0x415da7(0x17a)]('..'))return'';return _0x4f446a;}export function localPathToTdFolderPath(_0x218d1e){const _0x2732b9=a158_0x416c8f,_0x4baa70=a158_0x1f0261[_0x2732b9(0x181)](_0x218d1e);if(_0x4baa70==='.'||_0x4baa70==='')return'';return _0x4baa70[_0x2732b9(0x17b)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x351cdd,_0x47bb9e){const _0x142383=a158_0x416c8f;if(!_0x351cdd)return _0x47bb9e;return a158_0x1f0261[_0x142383(0x16c)](_0x47bb9e,_0x351cdd);}export function createTdxConfigContent(_0xeabc2f){const _0x383198=a158_0x416c8f,_0x290de0={'parent_segment':_0xeabc2f};return JSON[_0x383198(0x179)](_0x290de0,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3475d2){const _0x2c7630={'engage_workspace':_0x3475d2};return JSON['stringify'](_0x2c7630,null,0x2)+'\x0a';}function a158_0x11f9(){const _0x1f9045=['resolve','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','cwd','50904QOrCIU','relative','28EIrDmn','engage_workspace','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','stringify','startsWith','replace','parse','100AZcHHm','433038bVsgvv','segments','282563xXHFBg','dirname','root','string','parent_segment','2667564zXEDBf','tdx.json','2MhwwyL','join','31208FkIVZq','3823470fikRxh','595647jhvzHR','object'];a158_0x11f9=function(){return _0x1f9045;};return a158_0x11f9();}
@@ -1 +1 @@
1
- const a159_0x5a8672=a159_0xf26f;(function(_0x29eb78,_0x9b317a){const _0x1c729f=a159_0xf26f,_0x1095c2=_0x29eb78();while(!![]){try{const _0x1ca862=-parseInt(_0x1c729f(0xc9))/0x1+parseInt(_0x1c729f(0xe1))/0x2+parseInt(_0x1c729f(0xde))/0x3+-parseInt(_0x1c729f(0xc3))/0x4+-parseInt(_0x1c729f(0xd8))/0x5+-parseInt(_0x1c729f(0xe6))/0x6+parseInt(_0x1c729f(0xcc))/0x7*(parseInt(_0x1c729f(0xe3))/0x8);if(_0x1ca862===_0x9b317a)break;else _0x1095c2['push'](_0x1095c2['shift']());}catch(_0x1e26d5){_0x1095c2['push'](_0x1095c2['shift']());}}}(a159_0x2511,0x39923));import{z}from'zod';function a159_0x2511(){const _0x934658=['enum','asc','314881AJJSNC','minutes_interval','Last','object','Connection\x20name\x20is\x20required','month','clear','desc','boolean','record','All','min','1521355rEWTjm','weekly','string','number','hourly','onFailure','786732wkdCeJ','week','Activation\x20name\x20is\x20required','509526rFZMsE','rows','128gbxTMF','daily','none','2268576BQwMfs','hour','optional','cron','cols','unknown','minute','749344xaiJeP','monthly','onSuccess','masked','array','nullable','131221BDyOjW'];a159_0x2511=function(){return _0x934658;};return a159_0x2511();}export const ScheduleTypeSchema=z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xe5),a159_0x5a8672(0xdc),a159_0x5a8672(0xe4),a159_0x5a8672(0xd9),a159_0x5a8672(0xc4),a159_0x5a8672(0xbf),a159_0x5a8672(0xcd)]);export const RepeatUnitSchema=z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xc2),a159_0x5a8672(0xe7),'day',a159_0x5a8672(0xdf),a159_0x5a8672(0xd1),'once','none']);function a159_0xf26f(_0x1ddc8d,_0x13ea0c){_0x1ddc8d=_0x1ddc8d-0xbf;const _0x2511d2=a159_0x2511();let _0xf26f8a=_0x2511d2[_0x1ddc8d];return _0xf26f8a;}export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x5a8672(0xe8)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x5a8672(0xdb)]()['optional'](),'repeat_sub_frequency':z[a159_0x5a8672(0xc7)](z['number']())[a159_0x5a8672(0xe8)](),'start_at':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xc8)]()['optional'](),'end_on':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xc8)]()[a159_0x5a8672(0xe8)](),'timezone':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xe8)]()});export const NotificationDefSchema=z[a159_0x5a8672(0xcf)]({'notify_on':z['array'](z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xc5),a159_0x5a8672(0xdd)]))[a159_0x5a8672(0xe8)](),'email_recipients':z[a159_0x5a8672(0xc7)](z[a159_0x5a8672(0xda)]())[a159_0x5a8672(0xe8)]()});export const ActivationColumnDefSchema=z['union']([z['string'](),z[a159_0x5a8672(0xcf)]({'name':z[a159_0x5a8672(0xda)](),'type':z[a159_0x5a8672(0xda)]()['optional'](),'visibility':z['enum'](['clear','masked'])[a159_0x5a8672(0xe8)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x5a8672(0xcf)]({'columns':z[a159_0x5a8672(0xc7)](z['object']({'name':z[a159_0x5a8672(0xda)](),'type':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xe8)](),'visibility':z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xd2),a159_0x5a8672(0xc6)])[a159_0x5a8672(0xe8)]()}))[a159_0x5a8672(0xe8)](),'behavior_table':z['string']()[a159_0x5a8672(0xe8)](),'join_row':z[a159_0x5a8672(0xdb)]()['nullable']()[a159_0x5a8672(0xe8)](),'join_strategy':z['enum']([a159_0x5a8672(0xd6),'First',a159_0x5a8672(0xce),'Top-N'])[a159_0x5a8672(0xe8)](),'formatting':z[a159_0x5a8672(0xca)]([a159_0x5a8672(0xe2),a159_0x5a8672(0xc0)])[a159_0x5a8672(0xe8)](),'order_by':z[a159_0x5a8672(0xc7)](z[a159_0x5a8672(0xcf)]({'key':z[a159_0x5a8672(0xda)](),'order':z['enum']([a159_0x5a8672(0xcb),a159_0x5a8672(0xd3)])}))[a159_0x5a8672(0xe8)]()});export const ActivationDefSchema=z['object']({'name':z[a159_0x5a8672(0xda)]()['min'](0x1,a159_0x5a8672(0xe0)),'description':z['string']()['optional'](),'connection':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xd7)](0x1,a159_0x5a8672(0xd0)),'all_columns':z['boolean']()[a159_0x5a8672(0xe8)](),'columns':z[a159_0x5a8672(0xc7)](ActivationColumnDefSchema)[a159_0x5a8672(0xe8)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a159_0x5a8672(0xd5)](z['string'](),z[a159_0x5a8672(0xc1)]())[a159_0x5a8672(0xe8)](),'activation_template_id':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xc8)]()[a159_0x5a8672(0xe8)](),'behavior':ActivationBehaviorDefSchema[a159_0x5a8672(0xc8)]()[a159_0x5a8672(0xe8)](),'run_after_journey_refresh':z[a159_0x5a8672(0xd4)]()['optional'](),'nested_workflow_project_name':z[a159_0x5a8672(0xda)]()[a159_0x5a8672(0xe8)](),'nested_workflow_name':z['string']()['optional'](),'lock_enabled':z[a159_0x5a8672(0xd4)]()[a159_0x5a8672(0xe8)]()});
1
+ const a159_0x5729ec=a159_0x2773;(function(_0x43948f,_0x44409c){const _0xd7373f=a159_0x2773,_0xc14a04=_0x43948f();while(!![]){try{const _0x732714=parseInt(_0xd7373f(0x148))/0x1*(parseInt(_0xd7373f(0x153))/0x2)+parseInt(_0xd7373f(0x155))/0x3+-parseInt(_0xd7373f(0x163))/0x4+-parseInt(_0xd7373f(0x15c))/0x5+parseInt(_0xd7373f(0x143))/0x6+-parseInt(_0xd7373f(0x166))/0x7*(-parseInt(_0xd7373f(0x159))/0x8)+-parseInt(_0xd7373f(0x14f))/0x9;if(_0x732714===_0x44409c)break;else _0xc14a04['push'](_0xc14a04['shift']());}catch(_0x4ec7a1){_0xc14a04['push'](_0xc14a04['shift']());}}}(a159_0x4c79,0x9518e));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x5729ec(0x147)]([a159_0x5729ec(0x14e),a159_0x5729ec(0x15d),a159_0x5729ec(0x14a),a159_0x5729ec(0x167),a159_0x5729ec(0x144),a159_0x5729ec(0x15b),a159_0x5729ec(0x14c)]);export const RepeatUnitSchema=z[a159_0x5729ec(0x147)]([a159_0x5729ec(0x157),a159_0x5729ec(0x15f),a159_0x5729ec(0x169),a159_0x5729ec(0x16d),a159_0x5729ec(0x151),a159_0x5729ec(0x161),a159_0x5729ec(0x14e)]);function a159_0x2773(_0x338edd,_0xfce6c0){_0x338edd=_0x338edd-0x143;const _0x4c7903=a159_0x4c79();let _0x277309=_0x4c7903[_0x338edd];return _0x277309;}export const ScheduleDefSchema=z[a159_0x5729ec(0x14d)]({'type':ScheduleTypeSchema[a159_0x5729ec(0x16b)](),'repeat_unit':RepeatUnitSchema[a159_0x5729ec(0x16b)](),'repeat_frequency':z[a159_0x5729ec(0x15a)]()[a159_0x5729ec(0x16b)](),'repeat_sub_frequency':z['array'](z[a159_0x5729ec(0x15a)]())[a159_0x5729ec(0x16b)](),'start_at':z['string']()[a159_0x5729ec(0x158)]()['optional'](),'end_on':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x158)]()['optional'](),'timezone':z['string']()[a159_0x5729ec(0x16b)]()});function a159_0x4c79(){const _0x5f528f=['3085008Uvwkwd','rows','masked','7sceeNq','weekly','min','day','cols','optional','Last','week','2770236uVZtEV','monthly','asc','union','enum','9556PDwhGh','onSuccess','daily','First','minutes_interval','object','none','17941968wiPaFb','string','month','boolean','242qgaKXo','array','2888571CfAXUv','unknown','minute','nullable','8809520iBZaJU','number','cron','1532615ZlnbAF','hourly','clear','hour','record','once','desc'];a159_0x4c79=function(){return _0x5f528f;};return a159_0x4c79();}export const NotificationDefSchema=z[a159_0x5729ec(0x14d)]({'notify_on':z[a159_0x5729ec(0x154)](z[a159_0x5729ec(0x147)]([a159_0x5729ec(0x149),'onFailure']))[a159_0x5729ec(0x16b)](),'email_recipients':z[a159_0x5729ec(0x154)](z[a159_0x5729ec(0x150)]())['optional']()});export const ActivationColumnDefSchema=z[a159_0x5729ec(0x146)]([z['string'](),z[a159_0x5729ec(0x14d)]({'name':z['string'](),'type':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x16b)](),'visibility':z['enum']([a159_0x5729ec(0x15e),a159_0x5729ec(0x165)])['optional']()})]);export const ActivationBehaviorDefSchema=z[a159_0x5729ec(0x14d)]({'columns':z[a159_0x5729ec(0x154)](z['object']({'name':z[a159_0x5729ec(0x150)](),'type':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x16b)](),'visibility':z[a159_0x5729ec(0x147)](['clear',a159_0x5729ec(0x165)])[a159_0x5729ec(0x16b)]()}))[a159_0x5729ec(0x16b)](),'behavior_table':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x16b)](),'join_row':z[a159_0x5729ec(0x15a)]()[a159_0x5729ec(0x158)]()[a159_0x5729ec(0x16b)](),'join_strategy':z[a159_0x5729ec(0x147)](['All',a159_0x5729ec(0x14b),a159_0x5729ec(0x16c),'Top-N'])[a159_0x5729ec(0x16b)](),'formatting':z['enum']([a159_0x5729ec(0x164),a159_0x5729ec(0x16a)])[a159_0x5729ec(0x16b)](),'order_by':z[a159_0x5729ec(0x154)](z['object']({'key':z['string'](),'order':z[a159_0x5729ec(0x147)]([a159_0x5729ec(0x145),a159_0x5729ec(0x162)])}))[a159_0x5729ec(0x16b)]()});export const ActivationDefSchema=z[a159_0x5729ec(0x14d)]({'name':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x168)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x16b)](),'connection':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x168)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a159_0x5729ec(0x16b)](),'columns':z[a159_0x5729ec(0x154)](ActivationColumnDefSchema)[a159_0x5729ec(0x16b)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x5729ec(0x16b)](),'connector_config':z[a159_0x5729ec(0x160)](z['string'](),z[a159_0x5729ec(0x156)]())[a159_0x5729ec(0x16b)](),'activation_template_id':z['string']()['nullable']()[a159_0x5729ec(0x16b)](),'behavior':ActivationBehaviorDefSchema[a159_0x5729ec(0x158)]()[a159_0x5729ec(0x16b)](),'run_after_journey_refresh':z[a159_0x5729ec(0x152)]()[a159_0x5729ec(0x16b)](),'nested_workflow_project_name':z[a159_0x5729ec(0x150)]()['optional'](),'nested_workflow_name':z[a159_0x5729ec(0x150)]()[a159_0x5729ec(0x16b)](),'lock_enabled':z['boolean']()['optional']()});
@@ -1 +1 @@
1
- function a160_0x1956(_0x34bbdc,_0x2ab6bb){_0x34bbdc=_0x34bbdc-0x1dd;var _0x4aba3b=a160_0x4aba();var _0x1956b4=_0x4aba3b[_0x34bbdc];return _0x1956b4;}(function(_0x3638c8,_0x5dd072){var _0xfa862=a160_0x1956,_0x4e1fd6=_0x3638c8();while(!![]){try{var _0x16988e=parseInt(_0xfa862(0x1de))/0x1+parseInt(_0xfa862(0x1e2))/0x2*(-parseInt(_0xfa862(0x1e4))/0x3)+-parseInt(_0xfa862(0x1e1))/0x4+parseInt(_0xfa862(0x1df))/0x5+parseInt(_0xfa862(0x1e0))/0x6+-parseInt(_0xfa862(0x1e3))/0x7+parseInt(_0xfa862(0x1dd))/0x8*(parseInt(_0xfa862(0x1e5))/0x9);if(_0x16988e===_0x5dd072)break;else _0x4e1fd6['push'](_0x4e1fd6['shift']());}catch(_0x10b881){_0x4e1fd6['push'](_0x4e1fd6['shift']());}}}(a160_0x4aba,0xc9586));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x4aba(){var _0x14d76c=['9754017qypmsF','4019673oPrknH','9TjGBWm','20460304TssCys','947209YaIWmA','1427855UsQYat','1876770UIQXHj','2180324dtrsxb','2qwTBuR'];a160_0x4aba=function(){return _0x14d76c;};return a160_0x4aba();}
1
+ function a160_0x384a(){var _0x58a8ca=['21256EFZqGO','638358XkTQeo','526BYjZTA','30IVVZYq','4030IPIsdN','168WescuD','40FaOLYR','948jSbSFQ','75249aFiVtY','272019omWVPF','337379gTZHty','5526VnlGLE'];a160_0x384a=function(){return _0x58a8ca;};return a160_0x384a();}function a160_0xdaa6(_0xf416d8,_0x4d7e86){_0xf416d8=_0xf416d8-0xbb;var _0x384a95=a160_0x384a();var _0xdaa657=_0x384a95[_0xf416d8];return _0xdaa657;}(function(_0x2f0046,_0x2ca476){var _0x36ac72=a160_0xdaa6,_0x464382=_0x2f0046();while(!![]){try{var _0x5ea6f8=-parseInt(_0x36ac72(0xc4))/0x1*(parseInt(_0x36ac72(0xbd))/0x2)+-parseInt(_0x36ac72(0xbe))/0x3+-parseInt(_0x36ac72(0xc2))/0x4*(parseInt(_0x36ac72(0xc5))/0x5)+parseInt(_0x36ac72(0xc3))/0x6+parseInt(_0x36ac72(0xc0))/0x7*(-parseInt(_0x36ac72(0xbc))/0x8)+-parseInt(_0x36ac72(0xc1))/0x9*(-parseInt(_0x36ac72(0xc6))/0xa)+-parseInt(_0x36ac72(0xbf))/0xb*(-parseInt(_0x36ac72(0xbb))/0xc);if(_0x5ea6f8===_0x2ca476)break;else _0x464382['push'](_0x464382['shift']());}catch(_0x355363){_0x464382['push'](_0x464382['shift']());}}}(a160_0x384a,0x254bd));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a161_0x764a85=a161_0x2113;(function(_0x49f798,_0x331634){const _0x5d053c=a161_0x2113,_0x3286d9=_0x49f798();while(!![]){try{const _0x53f07d=-parseInt(_0x5d053c(0x1c2))/0x1*(-parseInt(_0x5d053c(0x1bd))/0x2)+-parseInt(_0x5d053c(0x1b9))/0x3+-parseInt(_0x5d053c(0x1c1))/0x4+parseInt(_0x5d053c(0x1c5))/0x5+-parseInt(_0x5d053c(0x1c6))/0x6*(-parseInt(_0x5d053c(0x1c8))/0x7)+parseInt(_0x5d053c(0x1b8))/0x8+-parseInt(_0x5d053c(0x1cd))/0x9;if(_0x53f07d===_0x331634)break;else _0x3286d9['push'](_0x3286d9['shift']());}catch(_0x25e8f8){_0x3286d9['push'](_0x3286d9['shift']());}}}(a161_0x486f,0x9c473));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x2113(_0x2d9a58,_0xb7c4ed){_0x2d9a58=_0x2d9a58-0x1b4;const _0x486fae=a161_0x486f();let _0x2113dd=_0x486fae[_0x2d9a58];return _0x2113dd;}import{ActivationDefSchema}from'./activation-schema.js';function a161_0x486f(){const _0x567211=['ab_test','launched','literal','refine','string','simulation','Journey\x20name\x20is\x20required','min','wait','journeys','decision_point','end','lazy','3724616YDhKFz','2302473KeCaAu','record','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','merge','778932YoNian','optional','array','type','4795836PvoQob','1lbDMpa','jump','length','5776675qLZspl','4162914uVafad','journey','7qUpXUR','no_reentry','number','boolean','object','878688yJclpC','draft','week','activation','enum','filter'];a161_0x486f=function(){return _0x567211;};return a161_0x486f();}export const JourneyStateTypeSchema=z[a161_0x764a85(0x1d1)]([a161_0x764a85(0x1ce),a161_0x764a85(0x1d8),a161_0x764a85(0x1d4)]);export const ReentryModeTypeSchema=z['enum']([a161_0x764a85(0x1c9),'reentry_unless_goal_achieved','reentry_always']);export const WaitUnitTypeSchema=z[a161_0x764a85(0x1d1)](['day',a161_0x764a85(0x1cf)]);export const StepTypeValueSchema=z['enum']([a161_0x764a85(0x1db),a161_0x764a85(0x1d0),a161_0x764a85(0x1b5),a161_0x764a85(0x1d3),a161_0x764a85(0x1bc),a161_0x764a85(0x1c3),a161_0x764a85(0x1b6)]);export const EmbeddedSegmentDefSchema=z[a161_0x764a85(0x1cc)]({'description':z['string']()[a161_0x764a85(0x1be)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x764a85(0x1cc)]({'journey':z['string'](),'stage':z[a161_0x764a85(0x1d7)](),'bundle_id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)]()});export const CriteriaDefSchema=z[a161_0x764a85(0x1cc)]({'name':z[a161_0x764a85(0x1d7)](),'description':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'segment':z[a161_0x764a85(0x1d7)](),'target':JumpTargetDefSchema[a161_0x764a85(0x1be)]()});const WaitConditionTimeoutDefSchema=z[a161_0x764a85(0x1cc)]({'duration':z[a161_0x764a85(0x1ca)](),'unit':WaitUnitTypeSchema,'next':z['string']()[a161_0x764a85(0x1be)]()}),WaitConditionDefSchema=z['object']({'segment':z[a161_0x764a85(0x1d7)](),'next':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x764a85(0x1be)]()}),WaitStepParamsDefSchema=z['object']({'duration':z[a161_0x764a85(0x1ca)]()[a161_0x764a85(0x1be)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x764a85(0x1d7)]()['optional'](),'condition':WaitConditionDefSchema[a161_0x764a85(0x1be)](),'days_of_week':z['array'](z[a161_0x764a85(0x1d7)]())[a161_0x764a85(0x1be)]()}),StepBaseFields={'name':z[a161_0x764a85(0x1d7)](),'uuid':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'next':z['string']()['optional']()},WaitStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1db)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x764a85(0x1cc)]({'activation':z[a161_0x764a85(0x1d7)]()}),ActivationStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1d0)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x764a85(0x1cc)]({'name':z[a161_0x764a85(0x1d7)](),'segment':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'segment_id':z[a161_0x764a85(0x1d7)]()['optional'](),'excluded':z[a161_0x764a85(0x1cb)]()[a161_0x764a85(0x1be)](),'next':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0x764a85(0x1bf)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1b5)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'name':z[a161_0x764a85(0x1d7)](),'percentage':z[a161_0x764a85(0x1ca)](),'next':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)]()}),AbTestStepParamsDefSchema=z[a161_0x764a85(0x1cc)]({'variants':z[a161_0x764a85(0x1bf)](AbTestVariantDefSchema),'unique_id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'customized_split':z[a161_0x764a85(0x1cb)]()[a161_0x764a85(0x1be)]()}),AbTestStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z['literal']('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1bc))}),JumpStepParamsDefSchema=z[a161_0x764a85(0x1cc)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x764a85(0x1d5)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x764a85(0x1cc)]({...StepBaseFields,'type':z['literal'](a161_0x764a85(0x1b6))})['passthrough']();export const StepDefSchema=z['discriminatedUnion'](a161_0x764a85(0x1c0),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x764a85(0x1cc)]({'name':z['string'](),'description':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'entry_criteria':CriteriaDefSchema[a161_0x764a85(0x1be)](),'exit_criteria':z['array'](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'steps':z[a161_0x764a85(0x1bf)](StepDefSchema)[a161_0x764a85(0x1be)]()});export const JourneyEntryDefSchema=z[a161_0x764a85(0x1cc)]({'name':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'version':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'state':JourneyStateTypeSchema[a161_0x764a85(0x1be)](),'latest':z[a161_0x764a85(0x1cb)]()[a161_0x764a85(0x1be)](),'stages':z[a161_0x764a85(0x1bf)](StageDefSchema),'id':z['string']()[a161_0x764a85(0x1be)](),'version_number':z[a161_0x764a85(0x1ca)]()[a161_0x764a85(0x1be)](),'goal':CriteriaDefSchema[a161_0x764a85(0x1be)](),'reentry':ReentryModeTypeSchema[a161_0x764a85(0x1be)]()});export const JourneyDefSchema=z[a161_0x764a85(0x1b7)](()=>z[a161_0x764a85(0x1cc)]({'type':z[a161_0x764a85(0x1d5)](a161_0x764a85(0x1c7)),'name':z['string']()[a161_0x764a85(0x1da)](0x1,a161_0x764a85(0x1d9)),'description':z['string']()[a161_0x764a85(0x1be)](),'bundle_id':z['string']()[a161_0x764a85(0x1be)](),'bundle_name':z[a161_0x764a85(0x1d7)]()['optional'](),'folder_id':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'reentry':ReentryModeTypeSchema[a161_0x764a85(0x1be)](),'allow_reentry':z[a161_0x764a85(0x1cb)]()['optional'](),'goal':CriteriaDefSchema[a161_0x764a85(0x1be)](),'id':z['string']()[a161_0x764a85(0x1be)](),'version':z[a161_0x764a85(0x1d7)]()[a161_0x764a85(0x1be)](),'version_number':z['number']()[a161_0x764a85(0x1be)](),'stages':z[a161_0x764a85(0x1bf)](StageDefSchema)[a161_0x764a85(0x1be)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x764a85(0x1be)](),'journeys':z[a161_0x764a85(0x1bf)](JourneyEntryDefSchema)[a161_0x764a85(0x1be)](),'segments':z[a161_0x764a85(0x1ba)](z[a161_0x764a85(0x1d7)](),EmbeddedSegmentDefSchema)[a161_0x764a85(0x1be)](),'activations':z[a161_0x764a85(0x1ba)](z['string'](),ActivationDefSchema)['optional']()})[a161_0x764a85(0x1d6)](_0x38a0d8=>{const _0x35f5fb=a161_0x764a85,_0x88cf8d=[_0x38a0d8[_0x35f5fb(0x1b4)],_0x38a0d8['stages'],_0x38a0d8['versions']][_0x35f5fb(0x1d2)](_0x49c7c8=>Array['isArray'](_0x49c7c8)&&_0x49c7c8['length']>0x0)[_0x35f5fb(0x1c4)];return _0x88cf8d===0x1;},{'message':a161_0x764a85(0x1bb)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x384bb0=a161_0x1f86;function a161_0x460f(){const _0x7decc6=['object','jump','simulation','type','week','min','Journey\x20name\x20is\x20required','wait','34881IOkuuA','filter','decision_point','boolean','2114bMUICS','number','390NKSxDa','refine','stages','2mFDgQd','640heCCgE','string','48753wUHNEP','374389DJWsuz','passthrough','reentry_unless_goal_achieved','launched','length','352396eeIoCS','lazy','merge','end','optional','day','reentry_always','literal','enum','activation','34068tlJDhD','6114925ZRdsTS','15IKLrOz','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','isArray','ab_test','discriminatedUnion','record','versions','array','39531336Wnjkwb'];a161_0x460f=function(){return _0x7decc6;};return a161_0x460f();}(function(_0x98bb7c,_0x4db6ea){const _0x24ac48=a161_0x1f86,_0x110026=_0x98bb7c();while(!![]){try{const _0x47ab20=parseInt(_0x24ac48(0x1a9))/0x1*(-parseInt(_0x24ac48(0x1a5))/0x2)+parseInt(_0x24ac48(0x18b))/0x3*(parseInt(_0x24ac48(0x1ae))/0x4)+-parseInt(_0x24ac48(0x18a))/0x5+parseInt(_0x24ac48(0x189))/0x6*(-parseInt(_0x24ac48(0x1a0))/0x7)+-parseInt(_0x24ac48(0x1a6))/0x8*(-parseInt(_0x24ac48(0x1a8))/0x9)+-parseInt(_0x24ac48(0x1a2))/0xa*(-parseInt(_0x24ac48(0x19c))/0xb)+parseInt(_0x24ac48(0x193))/0xc;if(_0x47ab20===_0x4db6ea)break;else _0x110026['push'](_0x110026['shift']());}catch(_0x278801){_0x110026['push'](_0x110026['shift']());}}}(a161_0x460f,0xef2d8));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x1f86(_0x777d08,_0x366144){_0x777d08=_0x777d08-0x189;const _0x460f07=a161_0x460f();let _0x1f8622=_0x460f07[_0x777d08];return _0x1f8622;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x384bb0(0x1b6)](['draft',a161_0x384bb0(0x196),a161_0x384bb0(0x1ac)]);export const ReentryModeTypeSchema=z[a161_0x384bb0(0x1b6)](['no_reentry',a161_0x384bb0(0x1ab),a161_0x384bb0(0x1b4)]);export const WaitUnitTypeSchema=z[a161_0x384bb0(0x1b6)]([a161_0x384bb0(0x1b3),a161_0x384bb0(0x198)]);export const StepTypeValueSchema=z[a161_0x384bb0(0x1b6)]([a161_0x384bb0(0x19b),a161_0x384bb0(0x1b7),a161_0x384bb0(0x19e),a161_0x384bb0(0x18e),a161_0x384bb0(0x1b0),a161_0x384bb0(0x195),a161_0x384bb0(0x1b1)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x384bb0(0x194)]({'journey':z[a161_0x384bb0(0x1a7)](),'stage':z[a161_0x384bb0(0x1a7)](),'bundle_id':z[a161_0x384bb0(0x1a7)]()['optional']()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z['string']()['optional'](),'segment':z[a161_0x384bb0(0x1a7)](),'target':JumpTargetDefSchema[a161_0x384bb0(0x1b2)]()});const WaitConditionTimeoutDefSchema=z[a161_0x384bb0(0x194)]({'duration':z[a161_0x384bb0(0x1a1)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)]()}),WaitConditionDefSchema=z[a161_0x384bb0(0x194)]({'segment':z[a161_0x384bb0(0x1a7)](),'next':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x384bb0(0x194)]({'duration':z[a161_0x384bb0(0x1a1)]()[a161_0x384bb0(0x1b2)](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z['string']()[a161_0x384bb0(0x1b2)](),'condition':WaitConditionDefSchema[a161_0x384bb0(0x1b2)](),'days_of_week':z[a161_0x384bb0(0x192)](z[a161_0x384bb0(0x1a7)]())['optional']()}),StepBaseFields={'name':z[a161_0x384bb0(0x1a7)](),'uuid':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'next':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)]()},WaitStepDefSchema=z[a161_0x384bb0(0x194)]({...StepBaseFields,'type':z['literal'](a161_0x384bb0(0x19b)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x384bb0(0x194)]({'activation':z[a161_0x384bb0(0x1a7)]()}),ActivationStepDefSchema=z[a161_0x384bb0(0x194)]({...StepBaseFields,'type':z['literal'](a161_0x384bb0(0x1b7)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x384bb0(0x194)]({'name':z[a161_0x384bb0(0x1a7)](),'segment':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'segment_id':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'excluded':z[a161_0x384bb0(0x19f)]()[a161_0x384bb0(0x1b2)](),'next':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)]()}),DecisionPointStepParamsDefSchema=z[a161_0x384bb0(0x194)]({'branches':z[a161_0x384bb0(0x192)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x384bb0(0x194)]({...StepBaseFields,'type':z[a161_0x384bb0(0x1b5)](a161_0x384bb0(0x19e)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x384bb0(0x194)]({'id':z['string']()['optional'](),'name':z['string'](),'percentage':z[a161_0x384bb0(0x1a1)](),'next':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)]()}),AbTestStepParamsDefSchema=z[a161_0x384bb0(0x194)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x384bb0(0x1b2)](),'customized_split':z[a161_0x384bb0(0x19f)]()[a161_0x384bb0(0x1b2)]()}),AbTestStepDefSchema=z[a161_0x384bb0(0x194)]({...StepBaseFields,'type':z['literal'](a161_0x384bb0(0x18e)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x384bb0(0x1b5)](a161_0x384bb0(0x1b0))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x384bb0(0x194)]({...StepBaseFields,'type':z['literal'](a161_0x384bb0(0x195)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x384bb0(0x1b5)](a161_0x384bb0(0x1b1))})[a161_0x384bb0(0x1aa)]();export const StepDefSchema=z[a161_0x384bb0(0x18f)](a161_0x384bb0(0x197),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x384bb0(0x194)]({'name':z[a161_0x384bb0(0x1a7)](),'description':z['string']()[a161_0x384bb0(0x1b2)](),'id':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'entry_criteria':CriteriaDefSchema[a161_0x384bb0(0x1b2)](),'exit_criteria':z['array'](CriteriaDefSchema)[a161_0x384bb0(0x1b2)](),'milestone':CriteriaDefSchema[a161_0x384bb0(0x1b2)](),'root_step':z[a161_0x384bb0(0x1a7)]()['optional'](),'steps':z[a161_0x384bb0(0x192)](StepDefSchema)[a161_0x384bb0(0x1b2)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'version':z[a161_0x384bb0(0x1a7)]()['optional'](),'state':JourneyStateTypeSchema[a161_0x384bb0(0x1b2)](),'latest':z[a161_0x384bb0(0x19f)]()['optional'](),'stages':z['array'](StageDefSchema),'id':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'version_number':z[a161_0x384bb0(0x1a1)]()[a161_0x384bb0(0x1b2)](),'goal':CriteriaDefSchema[a161_0x384bb0(0x1b2)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a161_0x384bb0(0x1af)](()=>z[a161_0x384bb0(0x194)]({'type':z['literal']('journey'),'name':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x199)](0x1,a161_0x384bb0(0x19a)),'description':z['string']()['optional'](),'bundle_id':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'bundle_name':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'folder_id':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'reentry':ReentryModeTypeSchema[a161_0x384bb0(0x1b2)](),'allow_reentry':z[a161_0x384bb0(0x19f)]()['optional'](),'goal':CriteriaDefSchema['optional'](),'id':z[a161_0x384bb0(0x1a7)]()[a161_0x384bb0(0x1b2)](),'version':z['string']()[a161_0x384bb0(0x1b2)](),'version_number':z['number']()['optional'](),'stages':z[a161_0x384bb0(0x192)](StageDefSchema)[a161_0x384bb0(0x1b2)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x384bb0(0x1b2)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x384bb0(0x1b2)](),'segments':z['record'](z[a161_0x384bb0(0x1a7)](),EmbeddedSegmentDefSchema)[a161_0x384bb0(0x1b2)](),'activations':z[a161_0x384bb0(0x190)](z[a161_0x384bb0(0x1a7)](),ActivationDefSchema)[a161_0x384bb0(0x1b2)]()})[a161_0x384bb0(0x1a3)](_0x278cb6=>{const _0x39fa08=a161_0x384bb0,_0xe7e618=[_0x278cb6['journeys'],_0x278cb6[_0x39fa08(0x1a4)],_0x278cb6[_0x39fa08(0x191)]][_0x39fa08(0x19d)](_0x40fa79=>Array[_0x39fa08(0x18d)](_0x40fa79)&&_0x40fa79['length']>0x0)[_0x39fa08(0x1ad)];return _0xe7e618===0x1;},{'message':a161_0x384bb0(0x18c)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x3d287f,_0x195250){var _0x3b63d4=a163_0x43d4,_0x463992=_0x3d287f();while(!![]){try{var _0xb236e=-parseInt(_0x3b63d4(0x6a))/0x1+parseInt(_0x3b63d4(0x70))/0x2*(parseInt(_0x3b63d4(0x72))/0x3)+parseInt(_0x3b63d4(0x6d))/0x4*(parseInt(_0x3b63d4(0x6e))/0x5)+parseInt(_0x3b63d4(0x6b))/0x6+parseInt(_0x3b63d4(0x6c))/0x7*(parseInt(_0x3b63d4(0x6f))/0x8)+parseInt(_0x3b63d4(0x71))/0x9+-parseInt(_0x3b63d4(0x69))/0xa;if(_0xb236e===_0x195250)break;else _0x463992['push'](_0x463992['shift']());}catch(_0x37e3e5){_0x463992['push'](_0x463992['shift']());}}}(a163_0x79c1,0xead91));function a163_0x43d4(_0x31ae9f,_0x27ae34){_0x31ae9f=_0x31ae9f-0x69;var _0x79c191=a163_0x79c1();var _0x43d4fc=_0x79c191[_0x31ae9f];return _0x43d4fc;}function a163_0x79c1(){var _0x46dd22=['424622IuLEQu','7307388gmLwNy','15vMubqv','30866830dqbnwO','288085EAaULI','1692492SQcmKJ','21qZDjgv','1589908AIdxJR','5xlnYFM','4756424gAHgZD'];a163_0x79c1=function(){return _0x46dd22;};return a163_0x79c1();}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
+ function a163_0x3bb9(_0x24d94b,_0x72c87a){_0x24d94b=_0x24d94b-0x1de;var _0x41aa97=a163_0x41aa();var _0x3bb9b9=_0x41aa97[_0x24d94b];return _0x3bb9b9;}(function(_0x1b5742,_0x384cf2){var _0x484bcc=a163_0x3bb9,_0x3953b4=_0x1b5742();while(!![]){try{var _0xfe3329=-parseInt(_0x484bcc(0x1e4))/0x1+parseInt(_0x484bcc(0x1df))/0x2*(-parseInt(_0x484bcc(0x1e0))/0x3)+-parseInt(_0x484bcc(0x1e7))/0x4+parseInt(_0x484bcc(0x1e1))/0x5+-parseInt(_0x484bcc(0x1e5))/0x6*(-parseInt(_0x484bcc(0x1e6))/0x7)+parseInt(_0x484bcc(0x1e3))/0x8+parseInt(_0x484bcc(0x1de))/0x9*(parseInt(_0x484bcc(0x1e2))/0xa);if(_0xfe3329===_0x384cf2)break;else _0x3953b4['push'](_0x3953b4['shift']());}catch(_0x479ad2){_0x3953b4['push'](_0x3953b4['shift']());}}}(a163_0x41aa,0x29f3c));function a163_0x41aa(){var _0x254381=['133703eRxFtL','24228kZgRZv','238GXehzH','794924ySahXi','28647teyGem','254UzYqVO','2019QGnkjH','1244825VcUUfi','490rBVCJi','380136kcustP'];a163_0x41aa=function(){return _0x254381;};return a163_0x41aa();}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 a164_0x3334ff=a164_0x82b9;(function(_0x3a6691,_0x54d9b6){const _0x597ec8=a164_0x82b9,_0x155281=_0x3a6691();while(!![]){try{const _0x2074e2=-parseInt(_0x597ec8(0x1e5))/0x1+-parseInt(_0x597ec8(0x218))/0x2+parseInt(_0x597ec8(0x210))/0x3+parseInt(_0x597ec8(0x1e0))/0x4*(-parseInt(_0x597ec8(0x1e2))/0x5)+-parseInt(_0x597ec8(0x1df))/0x6*(parseInt(_0x597ec8(0x1fc))/0x7)+parseInt(_0x597ec8(0x211))/0x8*(-parseInt(_0x597ec8(0x1f4))/0x9)+parseInt(_0x597ec8(0x20e))/0xa*(parseInt(_0x597ec8(0x1f5))/0xb);if(_0x2074e2===_0x54d9b6)break;else _0x155281['push'](_0x155281['shift']());}catch(_0x47c3d3){_0x155281['push'](_0x155281['shift']());}}}(a164_0xfa31,0x9fa95));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x1db),a164_0x3334ff(0x209),a164_0x3334ff(0x1e8),a164_0x3334ff(0x1e1),'LessEqual','In','Between',a164_0x3334ff(0x20b),'IsNull',a164_0x3334ff(0x1ec),a164_0x3334ff(0x20d),a164_0x3334ff(0x1f9),a164_0x3334ff(0x200),'EndWith',a164_0x3334ff(0x1ed)]);function a164_0xfa31(){const _0x567e1c=['Between','number','addIssue','Min','string','2197124oPyZcG','include','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','And','column','Segment\x20name\x20is\x20required','Sum','second','lazy','union','array','month','unit','from','realtime','has','Equal','record','superRefine','Value','264ivfkQw','1494196lsjAYa','GreaterEqual','5CFQqJU','value','TimeRange\x20operator\x20requires\x20\x27from\x27','751594gbPPMk','Operator\x20\x27','MISSING_TIME_UNIT','Less','TimeRange\x20operator\x20requires\x20\x27duration\x27','any','discriminatedUnion','TimeWithinPast','TimeRange','LessEqual','custom','duration','Count','boolean','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','27FkFyTu','11vNkaDL','Max','MISSING_BETWEEN_BOUNDS','day','Contain','literal','enum','175847kdcbAG','optional','First','type','StartWith','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Average','year','object','minute','min','operator','exclude','Greater','\x27\x20requires\x20a\x20time\x20unit','Regexp','CountDistinct','TimeWithinNext','36351440huqqil','EndWith','1217652iwcKzb','154736JPmwGa','batch'];a164_0xfa31=function(){return _0x567e1c;};return a164_0xfa31();}export const TimeUnitSchema=z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x1d2),a164_0x3334ff(0x205),'hour',a164_0x3334ff(0x1f8),'week',a164_0x3334ff(0x1d6),a164_0x3334ff(0x203)]);export const AggregationTypeSchema=z['enum']([a164_0x3334ff(0x1f1),'Sum',a164_0x3334ff(0x202),a164_0x3334ff(0x216),'Max','CountDistinct',a164_0x3334ff(0x1fe),'Last']);const TemporalValueSchema=z[a164_0x3334ff(0x1d4)]([z['object']({'timestamp':z[a164_0x3334ff(0x217)]()}),z['object']({'last':z[a164_0x3334ff(0x1d4)]([z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x1dc)](z['string'](),z[a164_0x3334ff(0x214)]())]),'unit':z[a164_0x3334ff(0x217)]()})]),OperatorValueSchema=z[a164_0x3334ff(0x1d4)]([z['string'](),z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x1f2)](),TemporalValueSchema,z[a164_0x3334ff(0x1d5)](z['union']([z[a164_0x3334ff(0x217)](),z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x1f2)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x3334ff(0x1db),a164_0x3334ff(0x209),a164_0x3334ff(0x1e1),a164_0x3334ff(0x1e8),a164_0x3334ff(0x1ee),'In',a164_0x3334ff(0x1f9),a164_0x3334ff(0x200),a164_0x3334ff(0x20f),'Regexp','TimeWithinPast','TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set([a164_0x3334ff(0x1ec),a164_0x3334ff(0x20d)]);export const OperatorDefSchema=z[a164_0x3334ff(0x204)]({'type':OperatorTypeSchema,'not':z[a164_0x3334ff(0x1f2)]()[a164_0x3334ff(0x1fd)](),'value':OperatorValueSchema[a164_0x3334ff(0x1fd)](),'min':z['union']([z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x217)](),TemporalValueSchema])[a164_0x3334ff(0x1fd)](),'max':z[a164_0x3334ff(0x1d4)]([z[a164_0x3334ff(0x214)](),z[a164_0x3334ff(0x217)](),TemporalValueSchema])[a164_0x3334ff(0x1fd)](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a164_0x3334ff(0x214)]()['optional'](),'week':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'month':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'year':z[a164_0x3334ff(0x214)]()['optional'](),'hour':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'minute':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)](),'second':z[a164_0x3334ff(0x214)]()[a164_0x3334ff(0x1fd)]()})[a164_0x3334ff(0x1fd)](),'from':z[a164_0x3334ff(0x204)]({'last':z[a164_0x3334ff(0x1d4)]([z['number'](),z['string']()]),'unit':TimeUnitSchema})[a164_0x3334ff(0x1fd)](),'reverse':z['boolean']()['optional']()})[a164_0x3334ff(0x1dd)]((_0x3fc337,_0x174f06)=>{const _0x57ced8=a164_0x3334ff;OPERATORS_REQUIRING_VALUE[_0x57ced8(0x1da)](_0x3fc337['type'])&&(_0x3fc337[_0x57ced8(0x1e3)]===undefined||_0x3fc337[_0x57ced8(0x1e3)]===null)&&_0x174f06[_0x57ced8(0x215)]({'code':'custom','message':_0x57ced8(0x1e6)+_0x3fc337['type']+'\x27\x20requires\x20a\x20value','path':[_0x57ced8(0x1e3)]}),_0x3fc337[_0x57ced8(0x1ff)]===_0x57ced8(0x213)&&_0x3fc337[_0x57ced8(0x206)]===undefined&&_0x3fc337['max']===undefined&&_0x174f06[_0x57ced8(0x215)]({'code':_0x57ced8(0x1ef),'message':_0x57ced8(0x201),'params':{'validationCode':_0x57ced8(0x1f7)}}),OPERATORS_REQUIRING_UNIT[_0x57ced8(0x1da)](_0x3fc337[_0x57ced8(0x1ff)])&&_0x3fc337[_0x57ced8(0x1e3)]!==undefined&&!_0x3fc337[_0x57ced8(0x1d7)]&&_0x174f06['addIssue']({'code':_0x57ced8(0x1ef),'message':_0x57ced8(0x1e6)+_0x3fc337[_0x57ced8(0x1ff)]+_0x57ced8(0x20a),'path':[_0x57ced8(0x1d7)],'params':{'validationCode':_0x57ced8(0x1e7)}}),_0x3fc337[_0x57ced8(0x1ff)]===_0x57ced8(0x1ed)&&(!_0x3fc337['duration']&&_0x174f06[_0x57ced8(0x215)]({'code':_0x57ced8(0x1ef),'message':_0x57ced8(0x1e9),'path':[_0x57ced8(0x1f0)]}),!_0x3fc337[_0x57ced8(0x1d8)]&&_0x174f06[_0x57ced8(0x215)]({'code':'custom','message':_0x57ced8(0x1e4),'path':[_0x57ced8(0x1d8)]}));});function a164_0x82b9(_0x5ec3b7,_0x3add01){_0x5ec3b7=_0x5ec3b7-0x1d0;const _0xfa31ae=a164_0xfa31();let _0x82b9c8=_0xfa31ae[_0x5ec3b7];return _0x82b9c8;}export const ArrayMatchingSchema=z[a164_0x3334ff(0x1d4)]([z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x1ea)),z[a164_0x3334ff(0x1fa)]('all'),z['object']({'atLeast':z[a164_0x3334ff(0x214)]()}),z[a164_0x3334ff(0x204)]({'atMost':z[a164_0x3334ff(0x214)]()}),z[a164_0x3334ff(0x204)]({'exactly':z[a164_0x3334ff(0x214)]()})]);export const AggregationDefSchema=z[a164_0x3334ff(0x1eb)](a164_0x3334ff(0x1ff),[z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x1d1),'Min',a164_0x3334ff(0x1f6),a164_0x3334ff(0x202)]),'column':z[a164_0x3334ff(0x217)](),'groupingColumns':z[a164_0x3334ff(0x1d5)](z['string']())[a164_0x3334ff(0x1fd)]()}),z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Count'),'groupingColumns':z[a164_0x3334ff(0x1d5)](z[a164_0x3334ff(0x217)]())[a164_0x3334ff(0x1fd)]()}),z['object']({'type':z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x20c)),'columns':z['array'](z[a164_0x3334ff(0x217)]())}),z[a164_0x3334ff(0x204)]({'type':z['enum']([a164_0x3334ff(0x1fe),'Last']),'column':z['string'](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x3334ff(0x1d5)](z[a164_0x3334ff(0x217)]())[a164_0x3334ff(0x1fd)]()})]);export const TimeWindowDefSchema=z[a164_0x3334ff(0x204)]({'duration':z[a164_0x3334ff(0x214)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x3334ff(0x1ec),a164_0x3334ff(0x20d),a164_0x3334ff(0x1ed)]);export const FilterColumnConditionDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Column'),'column':z[a164_0x3334ff(0x217)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3334ff(0x1fd)]()})[a164_0x3334ff(0x1dd)]((_0x4a3431,_0x24ea5f)=>{const _0x23124a=a164_0x3334ff,_0x24dd1e=_0x4a3431[_0x23124a(0x207)][_0x23124a(0x1ff)];_0x4a3431[_0x23124a(0x21c)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x23124a(0x1da)](_0x24dd1e)&&_0x24ea5f[_0x23124a(0x215)]({'code':_0x23124a(0x1ef),'message':_0x23124a(0x21a)+_0x24dd1e+'\x27)','path':[_0x23124a(0x207),_0x23124a(0x1ff)]}):TIMESTAMP_OPERATORS[_0x23124a(0x1da)](_0x24dd1e)&&_0x24ea5f['addIssue']({'code':_0x23124a(0x1ef),'message':_0x23124a(0x1e6)+_0x24dd1e+_0x23124a(0x1f3),'path':[_0x23124a(0x207),'type']});});export const FilterRuleDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x21b)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x3334ff(0x1d3)](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)](a164_0x3334ff(0x1de)),'attribute':z[a164_0x3334ff(0x217)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3334ff(0x1fd)](),'exclude':z[a164_0x3334ff(0x1f2)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x3334ff(0x1fd)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a164_0x3334ff(0x1fd)](),'limit':z[a164_0x3334ff(0x214)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x3334ff(0x1d3)](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Behavior'),'attribute':z[a164_0x3334ff(0x217)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3334ff(0x1fd)](),'exclude':z[a164_0x3334ff(0x1f2)]()[a164_0x3334ff(0x1fd)](),'aggregation':AggregationDefSchema[a164_0x3334ff(0x1fd)](),'source':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x1fd)](),'filter':FilterRuleDefSchema[a164_0x3334ff(0x1fd)](),'timeWindow':TimeWindowDefSchema[a164_0x3334ff(0x1fd)](),'limit':z[a164_0x3334ff(0x214)]()['optional']()}));export const ColumnConditionDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fa)]('Column'),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x21b),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x1fd)]()}));export const SegmentRefConditionDefSchema=z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x219),a164_0x3334ff(0x208)]),'segment':z[a164_0x3334ff(0x217)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x3334ff(0x1d3)](()=>z[a164_0x3334ff(0x204)]({'type':z[a164_0x3334ff(0x1fb)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x3334ff(0x217)]()['optional']()}));export const SegmentDefSchema=z['object']({'type':z['literal']('segment')[a164_0x3334ff(0x1fd)](),'name':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x206)](0x1,a164_0x3334ff(0x1d0)),'description':z['string']()[a164_0x3334ff(0x1fd)](),'folder':z[a164_0x3334ff(0x217)]()[a164_0x3334ff(0x1fd)](),'rule':RuleDefSchema[a164_0x3334ff(0x1fd)](),'kind':z[a164_0x3334ff(0x1fb)]([a164_0x3334ff(0x212),a164_0x3334ff(0x1d9),'funnel_stage'])[a164_0x3334ff(0x1fd)](),'visible':z[a164_0x3334ff(0x1f2)]()['optional'](),'activations':z[a164_0x3334ff(0x1d5)](z[a164_0x3334ff(0x1ea)]())[a164_0x3334ff(0x1fd)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x57edfc=a164_0x14c4;(function(_0x549f8b,_0x5aaec6){const _0x2a8ceb=a164_0x14c4,_0x31a300=_0x549f8b();while(!![]){try{const _0x58aece=-parseInt(_0x2a8ceb(0xcb))/0x1+-parseInt(_0x2a8ceb(0x10e))/0x2*(-parseInt(_0x2a8ceb(0xcd))/0x3)+-parseInt(_0x2a8ceb(0x115))/0x4*(-parseInt(_0x2a8ceb(0xfe))/0x5)+-parseInt(_0x2a8ceb(0xe7))/0x6+parseInt(_0x2a8ceb(0xf7))/0x7+-parseInt(_0x2a8ceb(0xf8))/0x8*(-parseInt(_0x2a8ceb(0xef))/0x9)+-parseInt(_0x2a8ceb(0xdc))/0xa*(parseInt(_0x2a8ceb(0xd1))/0xb);if(_0x58aece===_0x5aaec6)break;else _0x31a300['push'](_0x31a300['shift']());}catch(_0x215eb6){_0x31a300['push'](_0x31a300['shift']());}}}(a164_0x5c75,0x2ba77));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a164_0x57edfc(0xda),'Greater','Less',a164_0x57edfc(0xee),a164_0x57edfc(0x108),'In',a164_0x57edfc(0x111),a164_0x57edfc(0xcf),a164_0x57edfc(0xde),a164_0x57edfc(0xfd),a164_0x57edfc(0x10c),a164_0x57edfc(0xd6),a164_0x57edfc(0xfa),'EndWith',a164_0x57edfc(0xf3)]);export const TimeUnitSchema=z[a164_0x57edfc(0x106)]([a164_0x57edfc(0x105),'minute','hour',a164_0x57edfc(0xe6),a164_0x57edfc(0xf2),a164_0x57edfc(0xf4),a164_0x57edfc(0x112)]);export const AggregationTypeSchema=z[a164_0x57edfc(0x106)]([a164_0x57edfc(0x103),a164_0x57edfc(0xdb),a164_0x57edfc(0xff),'Min','Max',a164_0x57edfc(0x102),a164_0x57edfc(0x101),a164_0x57edfc(0x116)]);const TemporalValueSchema=z['union']([z[a164_0x57edfc(0xd2)]({'timestamp':z[a164_0x57edfc(0xdf)]()}),z['object']({'last':z[a164_0x57edfc(0xea)]([z[a164_0x57edfc(0xf9)](),z['record'](z[a164_0x57edfc(0xdf)](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x57edfc(0xea)]([z[a164_0x57edfc(0xdf)](),z['number'](),z[a164_0x57edfc(0x104)](),TemporalValueSchema,z[a164_0x57edfc(0xed)](z['union']([z[a164_0x57edfc(0xdf)](),z[a164_0x57edfc(0xf9)](),z[a164_0x57edfc(0x104)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x57edfc(0xda),a164_0x57edfc(0xf0),a164_0x57edfc(0xee),'Less',a164_0x57edfc(0x108),'In',a164_0x57edfc(0xd6),'StartWith',a164_0x57edfc(0x10f),a164_0x57edfc(0xcf),a164_0x57edfc(0xfd),a164_0x57edfc(0x10c)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x57edfc(0xfd),a164_0x57edfc(0x10c)]);export const OperatorDefSchema=z[a164_0x57edfc(0xd2)]({'type':OperatorTypeSchema,'not':z[a164_0x57edfc(0x104)]()['optional'](),'value':OperatorValueSchema['optional'](),'min':z['union']([z['number'](),z[a164_0x57edfc(0xdf)](),TemporalValueSchema])[a164_0x57edfc(0xf5)](),'max':z[a164_0x57edfc(0xea)]([z[a164_0x57edfc(0xf9)](),z[a164_0x57edfc(0xdf)](),TemporalValueSchema])[a164_0x57edfc(0xf5)](),'unit':TimeUnitSchema[a164_0x57edfc(0xf5)](),'duration':z['object']({'day':z[a164_0x57edfc(0xf9)]()['optional'](),'week':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)](),'month':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)](),'year':z['number']()[a164_0x57edfc(0xf5)](),'hour':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)](),'minute':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)](),'second':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)]()})[a164_0x57edfc(0xf5)](),'from':z[a164_0x57edfc(0xd2)]({'last':z[a164_0x57edfc(0xea)]([z[a164_0x57edfc(0xf9)](),z[a164_0x57edfc(0xdf)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z['boolean']()[a164_0x57edfc(0xf5)]()})['superRefine']((_0x39941a,_0x3d5c16)=>{const _0x27d48e=a164_0x57edfc;OPERATORS_REQUIRING_VALUE[_0x27d48e(0xe0)](_0x39941a[_0x27d48e(0xfc)])&&(_0x39941a[_0x27d48e(0xeb)]===undefined||_0x39941a[_0x27d48e(0xeb)]===null)&&_0x3d5c16[_0x27d48e(0xdd)]({'code':_0x27d48e(0xd0),'message':_0x27d48e(0x100)+_0x39941a[_0x27d48e(0xfc)]+'\x27\x20requires\x20a\x20value','path':['value']}),_0x39941a[_0x27d48e(0xfc)]===_0x27d48e(0x111)&&_0x39941a[_0x27d48e(0x110)]===undefined&&_0x39941a[_0x27d48e(0x10b)]===undefined&&_0x3d5c16[_0x27d48e(0xdd)]({'code':_0x27d48e(0xd0),'message':_0x27d48e(0x107),'params':{'validationCode':_0x27d48e(0xe9)}}),OPERATORS_REQUIRING_UNIT['has'](_0x39941a[_0x27d48e(0xfc)])&&_0x39941a[_0x27d48e(0xeb)]!==undefined&&!_0x39941a['unit']&&_0x3d5c16[_0x27d48e(0xdd)]({'code':_0x27d48e(0xd0),'message':_0x27d48e(0x100)+_0x39941a['type']+_0x27d48e(0xe4),'path':['unit'],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x39941a[_0x27d48e(0xfc)]==='TimeRange'&&(!_0x39941a[_0x27d48e(0xce)]&&_0x3d5c16[_0x27d48e(0xdd)]({'code':_0x27d48e(0xd0),'message':_0x27d48e(0xe8),'path':['duration']}),!_0x39941a[_0x27d48e(0xec)]&&_0x3d5c16[_0x27d48e(0xdd)]({'code':_0x27d48e(0xd0),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x27d48e(0xec)]}));});export const ArrayMatchingSchema=z[a164_0x57edfc(0xea)]([z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xd8)),z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xfb)),z[a164_0x57edfc(0xd2)]({'atLeast':z[a164_0x57edfc(0xf9)]()}),z[a164_0x57edfc(0xd2)]({'atMost':z[a164_0x57edfc(0xf9)]()}),z['object']({'exactly':z[a164_0x57edfc(0xf9)]()})]);export const AggregationDefSchema=z[a164_0x57edfc(0xd9)](a164_0x57edfc(0xfc),[z[a164_0x57edfc(0xd2)]({'type':z['enum'](['Sum',a164_0x57edfc(0xcc),a164_0x57edfc(0xd7),a164_0x57edfc(0xff)]),'column':z['string'](),'groupingColumns':z['array'](z[a164_0x57edfc(0xdf)]())[a164_0x57edfc(0xf5)]()}),z['object']({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0x103)),'groupingColumns':z['array'](z['string']())[a164_0x57edfc(0xf5)]()}),z['object']({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0x102)),'columns':z[a164_0x57edfc(0xed)](z['string']())}),z[a164_0x57edfc(0xd2)]({'type':z['enum']([a164_0x57edfc(0x101),a164_0x57edfc(0x116)]),'column':z[a164_0x57edfc(0xdf)](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x57edfc(0xed)](z[a164_0x57edfc(0xdf)]())[a164_0x57edfc(0xf5)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a164_0x57edfc(0xf9)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a164_0x57edfc(0x10c),a164_0x57edfc(0xf3)]);function a164_0x5c75(){const _0x45aa55=['15lGgFge','duration','Regexp','custom','3226707kbKxau','object','segment','literal','Value','Contain','Max','any','discriminatedUnion','Equal','Sum','20HcriJS','addIssue','IsNull','string','has','exclude','And','operator','\x27\x20requires\x20a\x20time\x20unit','realtime','day','159768uarTqK','TimeRange\x20operator\x20requires\x20\x27duration\x27','MISSING_BETWEEN_BOUNDS','union','value','from','array','GreaterEqual','228924kTvsks','Greater','Column','week','TimeRange','month','optional','lazy','1209467FjXrzD','88fHpgIN','number','StartWith','all','type','TimeWithinPast','1610845ArHsbO','Average','Operator\x20\x27','First','CountDistinct','Count','boolean','second','enum','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','LessEqual','include','funnel_stage','max','TimeWithinNext','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','7886jbmlUg','EndWith','min','Between','year','Behavior','column','4sjdjyG','Last','2352Sgovjy','Min'];a164_0x5c75=function(){return _0x45aa55;};return a164_0x5c75();}export const FilterColumnConditionDefSchema=z[a164_0x57edfc(0xd2)]({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xf1)),'column':z[a164_0x57edfc(0xdf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x57edfc(0xf5)]()})['superRefine']((_0x431d73,_0xa21426)=>{const _0x4e9118=a164_0x57edfc,_0x5b18ec=_0x431d73[_0x4e9118(0xe3)]['type'];_0x431d73[_0x4e9118(0x114)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x4e9118(0xe0)](_0x5b18ec)&&_0xa21426[_0x4e9118(0xdd)]({'code':_0x4e9118(0xd0),'message':_0x4e9118(0x10d)+_0x5b18ec+'\x27)','path':[_0x4e9118(0xe3),_0x4e9118(0xfc)]}):TIMESTAMP_OPERATORS[_0x4e9118(0xe0)](_0x5b18ec)&&_0xa21426[_0x4e9118(0xdd)]({'code':_0x4e9118(0xd0),'message':_0x4e9118(0x100)+_0x5b18ec+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':['operator',_0x4e9118(0xfc)]});});export const FilterRuleDefSchema=z[a164_0x57edfc(0xd2)]({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xe2)),'conditions':z[a164_0x57edfc(0xed)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xd5)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x57edfc(0xf5)](),'exclude':z[a164_0x57edfc(0x104)]()[a164_0x57edfc(0xf5)](),'aggregation':AggregationDefSchema[a164_0x57edfc(0xf5)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a164_0x57edfc(0xf5)](),'limit':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x57edfc(0xd2)]({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0x113)),'attribute':z[a164_0x57edfc(0xdf)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x57edfc(0xf5)](),'exclude':z[a164_0x57edfc(0x104)]()[a164_0x57edfc(0xf5)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()[a164_0x57edfc(0xf5)](),'filter':FilterRuleDefSchema[a164_0x57edfc(0xf5)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z[a164_0x57edfc(0xf9)]()[a164_0x57edfc(0xf5)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xf1)),'column':z[a164_0x57edfc(0xdf)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x57edfc(0xf6)](()=>z[a164_0x57edfc(0xd2)]({'type':z['enum']([a164_0x57edfc(0xe2),'Or']),'conditions':z[a164_0x57edfc(0xed)](ConditionDefSchema),'description':z[a164_0x57edfc(0xdf)]()[a164_0x57edfc(0xf5)]()}));export const SegmentRefConditionDefSchema=z[a164_0x57edfc(0xd2)]({'type':z[a164_0x57edfc(0x106)]([a164_0x57edfc(0x109),a164_0x57edfc(0xe1)]),'segment':z[a164_0x57edfc(0xdf)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x57edfc(0xf6)](()=>z[a164_0x57edfc(0xea)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));function a164_0x14c4(_0x49ae55,_0x18145c){_0x49ae55=_0x49ae55-0xcb;const _0x5c7572=a164_0x5c75();let _0x14c416=_0x5c7572[_0x49ae55];return _0x14c416;}export const RuleDefSchema=z['lazy'](()=>z[a164_0x57edfc(0xd2)]({'type':z[a164_0x57edfc(0x106)]([a164_0x57edfc(0xe2),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x57edfc(0xf5)]()}));export const SegmentDefSchema=z[a164_0x57edfc(0xd2)]({'type':z[a164_0x57edfc(0xd4)](a164_0x57edfc(0xd3))[a164_0x57edfc(0xf5)](),'name':z[a164_0x57edfc(0xdf)]()['min'](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x57edfc(0xdf)]()[a164_0x57edfc(0xf5)](),'folder':z[a164_0x57edfc(0xdf)]()[a164_0x57edfc(0xf5)](),'rule':RuleDefSchema['optional'](),'kind':z['enum'](['batch',a164_0x57edfc(0xe5),a164_0x57edfc(0x10a)])[a164_0x57edfc(0xf5)](),'visible':z[a164_0x57edfc(0x104)]()[a164_0x57edfc(0xf5)](),'activations':z[a164_0x57edfc(0xed)](z['any']())[a164_0x57edfc(0xf5)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x4870a3=a165_0x5097;(function(_0x5ecea7,_0x49a2d3){const _0xbd1675=a165_0x5097,_0x3ccf12=_0x5ecea7();while(!![]){try{const _0x4867aa=parseInt(_0xbd1675(0x201))/0x1+parseInt(_0xbd1675(0x204))/0x2*(parseInt(_0xbd1675(0x20c))/0x3)+parseInt(_0xbd1675(0x20f))/0x4*(-parseInt(_0xbd1675(0x20e))/0x5)+parseInt(_0xbd1675(0x210))/0x6+-parseInt(_0xbd1675(0x1f9))/0x7*(-parseInt(_0xbd1675(0x209))/0x8)+-parseInt(_0xbd1675(0x207))/0x9*(-parseInt(_0xbd1675(0x208))/0xa)+-parseInt(_0xbd1675(0x1f7))/0xb;if(_0x4867aa===_0x49a2d3)break;else _0x3ccf12['push'](_0x3ccf12['shift']());}catch(_0x4bde5f){_0x3ccf12['push'](_0x3ccf12['shift']());}}}(a165_0x5401,0x45ee9));import{readFileSync}from'fs';import*as a165_0x323c24 from'path';import*as a165_0x13fb2f from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';function a165_0x5401(){const _0x1225de=['810400CzsnTg','1656lfoOOf','message','valid','3DzZvqv','push','14730GDrkZp','56QKaovT','2289564lmugwd','parseDocument','campaign','object','type','error','not\x20a\x20','YAML_PARSE_ERROR','campaign_type','toJSON','filterType','15571710iYuEfa','email','10493jurdFa','segment','has','template','basename','length','warnings','map','364979oEHQYw','journey','YAML\x20parse\x20error:\x20','562458dqzssv','relative','result','45KclBHV'];a165_0x5401=function(){return _0x1225de;};return a165_0x5401();}import{validateCampaignDef}from'../engage/campaign-validator.js';function a165_0x5097(_0x246e2a,_0x5cc5ee){_0x246e2a=_0x246e2a-0x1f3;const _0x540142=a165_0x5401();let _0x50972c=_0x540142[_0x246e2a];return _0x50972c;}import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x4870a3(0x1f8),a165_0x4870a3(0x20d)]);export function isJourneyDef(_0xb34502){const _0x1ed1bf=a165_0x4870a3;return typeof _0xb34502===_0x1ed1bf(0x213)&&_0xb34502!==null&&_0x1ed1bf(0x214)in _0xb34502&&_0xb34502[_0x1ed1bf(0x214)]===_0x1ed1bf(0x202);}export function isCampaignDef(_0x3d97d5){const _0x4836d3=a165_0x4870a3;if(typeof _0x3d97d5!==_0x4836d3(0x213)||_0x3d97d5===null)return![];const _0x55413e=_0x3d97d5,_0x5000de=VALID_CAMPAIGN_TYPES[_0x4836d3(0x1fb)](_0x55413e[_0x4836d3(0x1f4)]);if(_0x55413e['type']==='campaign'&&_0x5000de)return!![];if(_0x5000de&&!_0x55413e['type'])return!![];return![];}export function isTemplateDef(_0x3a31f2){const _0x3dab41=a165_0x4870a3;return typeof _0x3a31f2==='object'&&_0x3a31f2!==null&&_0x3dab41(0x214)in _0x3a31f2&&_0x3a31f2['type']===_0x3dab41(0x1fc);}export function isValidationResult(_0x30833a){return!('skipped'in _0x30833a);}export function createParseErrorResult(_0x5f4377,_0x15bb0d,_0x1967f4,_0xc557ce,_0x48a8e5='segment'){const _0x4e34c4=a165_0x4870a3;return{'filePath':_0x5f4377,'relativePath':_0x15bb0d,'source':_0x1967f4,'result':{'valid':![],'errors':[{'level':_0x4e34c4(0x215),'path':'','code':_0x4e34c4(0x1f3),'message':_0xc557ce}],'warnings':[]},'fileType':_0x48a8e5};}export function validateYamlFile(_0x13bc71,_0x137176,_0x57a7b7={}){const _0x406343=a165_0x4870a3,_0x178685=a165_0x323c24[_0x406343(0x205)](_0x137176,_0x13bc71)||a165_0x323c24[_0x406343(0x1fd)](_0x13bc71);try{const _0x2b390a=readFileSync(_0x13bc71,'utf-8'),_0x37d1ba=a165_0x13fb2f[_0x406343(0x211)](_0x2b390a),_0x2acc87=_0x37d1ba[_0x406343(0x1f5)]();if(!_0x2acc87)return createParseErrorResult(_0x13bc71,_0x178685,_0x2b390a,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x4d1589;if(isJourneyDef(_0x2acc87))_0x4d1589=_0x406343(0x202);else{if(isCampaignDef(_0x2acc87))_0x4d1589=_0x406343(0x212);else isTemplateDef(_0x2acc87)?_0x4d1589=_0x406343(0x1fc):_0x4d1589=_0x406343(0x1fa);}if(_0x57a7b7[_0x406343(0x1f6)]&&_0x4d1589!==_0x57a7b7[_0x406343(0x1f6)])return{'filePath':_0x13bc71,'relativePath':_0x178685,'skipped':!![],'reason':_0x406343(0x216)+_0x57a7b7[_0x406343(0x1f6)]};const _0x208dab={'source':_0x2b390a,'document':_0x37d1ba};let _0x580ab0;if(_0x4d1589==='journey')_0x580ab0=validateJourneyDef(_0x2acc87,_0x208dab);else{if(_0x4d1589===_0x406343(0x212))_0x580ab0=validateCampaignDef(_0x2acc87,_0x208dab);else _0x4d1589===_0x406343(0x1fc)?_0x580ab0=validateTemplateDef(_0x2acc87,_0x208dab):_0x580ab0=validateSegmentDef(_0x2acc87,_0x208dab);}return{'filePath':_0x13bc71,'relativePath':_0x178685,'source':_0x2b390a,'result':_0x580ab0,'fileType':_0x4d1589};}catch(_0x29000d){const _0x1572d8=_0x29000d instanceof Error?_0x29000d[_0x406343(0x20a)]:String(_0x29000d);return createParseErrorResult(_0x13bc71,_0x178685,'',_0x406343(0x203)+_0x1572d8);}}export function validateYamlFiles(_0xf87bcc,_0x47ceb1,_0x3cdbb0={}){const _0x1742b7=a165_0x4870a3;return _0xf87bcc[_0x1742b7(0x200)](_0x4e5ba6=>validateYamlFile(_0x4e5ba6,_0x47ceb1,_0x3cdbb0));}export function calculateSummary(_0x1e41bc){const _0x293bf2=a165_0x4870a3;let _0x59a865=0x0,_0x389ec5=0x0,_0x8fdeaa=0x0,_0x39ddb3=0x0;for(const _0x31f9b8 of _0x1e41bc){if(!isValidationResult(_0x31f9b8)){_0x39ddb3++;continue;}_0x31f9b8[_0x293bf2(0x206)][_0x293bf2(0x20b)]?_0x59a865++:_0x389ec5++,_0x8fdeaa+=_0x31f9b8['result'][_0x293bf2(0x1ff)][_0x293bf2(0x1fe)];}return{'validCount':_0x59a865,'invalidCount':_0x389ec5,'warningCount':_0x8fdeaa,'skippedCount':_0x39ddb3,'hasErrors':_0x389ec5>0x0};}
1
+ function a165_0x4b0d(_0x18d9e0,_0x31df1a){_0x18d9e0=_0x18d9e0-0x69;const _0x119436=a165_0x1194();let _0x4b0d11=_0x119436[_0x18d9e0];return _0x4b0d11;}const a165_0x278406=a165_0x4b0d;(function(_0x66ad6a,_0x297179){const _0x105058=a165_0x4b0d,_0x9c7a74=_0x66ad6a();while(!![]){try{const _0x2998ab=-parseInt(_0x105058(0x7c))/0x1+parseInt(_0x105058(0x6e))/0x2*(-parseInt(_0x105058(0x7f))/0x3)+parseInt(_0x105058(0x70))/0x4+parseInt(_0x105058(0x72))/0x5+parseInt(_0x105058(0x88))/0x6*(parseInt(_0x105058(0x86))/0x7)+parseInt(_0x105058(0x7d))/0x8+parseInt(_0x105058(0x74))/0x9*(parseInt(_0x105058(0x80))/0xa);if(_0x2998ab===_0x297179)break;else _0x9c7a74['push'](_0x9c7a74['shift']());}catch(_0x325c06){_0x9c7a74['push'](_0x9c7a74['shift']());}}}(a165_0x1194,0x9689d));import{readFileSync}from'fs';import*as a165_0x5c440d from'path';import*as a165_0x2ed6e1 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',a165_0x278406(0x79)]);export function isJourneyDef(_0x5038a9){const _0x3cf109=a165_0x278406;return typeof _0x5038a9===_0x3cf109(0x8c)&&_0x5038a9!==null&&_0x3cf109(0x6c)in _0x5038a9&&_0x5038a9[_0x3cf109(0x6c)]===_0x3cf109(0x85);}export function isCampaignDef(_0x57ebda){const _0x50a18d=a165_0x278406;if(typeof _0x57ebda!=='object'||_0x57ebda===null)return![];const _0x441c83=_0x57ebda,_0x12ebba=VALID_CAMPAIGN_TYPES[_0x50a18d(0x6f)](_0x441c83[_0x50a18d(0x83)]);if(_0x441c83[_0x50a18d(0x6c)]==='campaign'&&_0x12ebba)return!![];if(_0x12ebba&&!_0x441c83[_0x50a18d(0x6c)])return!![];return![];}export function isTemplateDef(_0xffaa9f){const _0x39fc15=a165_0x278406;return typeof _0xffaa9f==='object'&&_0xffaa9f!==null&&_0x39fc15(0x6c)in _0xffaa9f&&_0xffaa9f[_0x39fc15(0x6c)]===_0x39fc15(0x82);}export function isValidationResult(_0x13a758){const _0x5a33e4=a165_0x278406;return!(_0x5a33e4(0x81)in _0x13a758);}export function createParseErrorResult(_0x11a3e5,_0x4a6155,_0x483c03,_0xdbdbbd,_0x110b76=a165_0x278406(0x7e)){const _0x387e20=a165_0x278406;return{'filePath':_0x11a3e5,'relativePath':_0x4a6155,'source':_0x483c03,'result':{'valid':![],'errors':[{'level':_0x387e20(0x7b),'path':'','code':_0x387e20(0x87),'message':_0xdbdbbd}],'warnings':[]},'fileType':_0x110b76};}function a165_0x1194(){const _0x57e511=['template','campaign_type','relative','journey','259DuVQGO','YAML_PARSE_ERROR','188094NOsbXE','message','result','length','object','filterType','utf-8','map','type','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','14522kqblLU','has','622672cmcXon','parseDocument','788725nmzjcL','campaign','31149YzReMh','toJSON','warnings','YAML\x20parse\x20error:\x20','not\x20a\x20','push','valid','error','1222534fTIMNN','5431600jtMnAh','segment','474PjqXER','2410GSOIoI','skipped'];a165_0x1194=function(){return _0x57e511;};return a165_0x1194();}export function validateYamlFile(_0x42596b,_0x5b1ccc,_0x3ca98d={}){const _0x4e6fe6=a165_0x278406,_0x1adb20=a165_0x5c440d[_0x4e6fe6(0x84)](_0x5b1ccc,_0x42596b)||a165_0x5c440d['basename'](_0x42596b);try{const _0x4da658=readFileSync(_0x42596b,_0x4e6fe6(0x6a)),_0x3ee162=a165_0x2ed6e1[_0x4e6fe6(0x71)](_0x4da658),_0x505f40=_0x3ee162[_0x4e6fe6(0x75)]();if(!_0x505f40)return createParseErrorResult(_0x42596b,_0x1adb20,_0x4da658,_0x4e6fe6(0x6d));let _0x477f46;if(isJourneyDef(_0x505f40))_0x477f46=_0x4e6fe6(0x85);else{if(isCampaignDef(_0x505f40))_0x477f46=_0x4e6fe6(0x73);else isTemplateDef(_0x505f40)?_0x477f46='template':_0x477f46=_0x4e6fe6(0x7e);}if(_0x3ca98d[_0x4e6fe6(0x69)]&&_0x477f46!==_0x3ca98d[_0x4e6fe6(0x69)])return{'filePath':_0x42596b,'relativePath':_0x1adb20,'skipped':!![],'reason':_0x4e6fe6(0x78)+_0x3ca98d[_0x4e6fe6(0x69)]};const _0x30b327={'source':_0x4da658,'document':_0x3ee162};let _0x3d15e5;if(_0x477f46===_0x4e6fe6(0x85))_0x3d15e5=validateJourneyDef(_0x505f40,_0x30b327);else{if(_0x477f46==='campaign')_0x3d15e5=validateCampaignDef(_0x505f40,_0x30b327);else _0x477f46===_0x4e6fe6(0x82)?_0x3d15e5=validateTemplateDef(_0x505f40,_0x30b327):_0x3d15e5=validateSegmentDef(_0x505f40,_0x30b327);}return{'filePath':_0x42596b,'relativePath':_0x1adb20,'source':_0x4da658,'result':_0x3d15e5,'fileType':_0x477f46};}catch(_0x3cbe80){const _0x1a2c56=_0x3cbe80 instanceof Error?_0x3cbe80[_0x4e6fe6(0x89)]:String(_0x3cbe80);return createParseErrorResult(_0x42596b,_0x1adb20,'',_0x4e6fe6(0x77)+_0x1a2c56);}}export function validateYamlFiles(_0x5d6799,_0x574cc0,_0x2c4c0f={}){const _0x275942=a165_0x278406;return _0x5d6799[_0x275942(0x6b)](_0x25171a=>validateYamlFile(_0x25171a,_0x574cc0,_0x2c4c0f));}export function calculateSummary(_0x5dbea3){const _0x22bccc=a165_0x278406;let _0x4d77cc=0x0,_0x3a7e6a=0x0,_0x876db1=0x0,_0xff2b28=0x0;for(const _0xbe6c13 of _0x5dbea3){if(!isValidationResult(_0xbe6c13)){_0xff2b28++;continue;}_0xbe6c13[_0x22bccc(0x8a)][_0x22bccc(0x7a)]?_0x4d77cc++:_0x3a7e6a++,_0x876db1+=_0xbe6c13[_0x22bccc(0x8a)][_0x22bccc(0x76)][_0x22bccc(0x8b)];}return{'validCount':_0x4d77cc,'invalidCount':_0x3a7e6a,'warningCount':_0x876db1,'skippedCount':_0xff2b28,'hasErrors':_0x3a7e6a>0x0};}
@@ -1 +1 @@
1
- (function(_0x6e8397,_0x190316){const _0x11bb49=a166_0x4667,_0x4fceb5=_0x6e8397();while(!![]){try{const _0x1e50b4=parseInt(_0x11bb49(0x1ac))/0x1+-parseInt(_0x11bb49(0x1a4))/0x2*(-parseInt(_0x11bb49(0x19f))/0x3)+-parseInt(_0x11bb49(0x199))/0x4*(-parseInt(_0x11bb49(0x18c))/0x5)+-parseInt(_0x11bb49(0x18e))/0x6*(parseInt(_0x11bb49(0x192))/0x7)+-parseInt(_0x11bb49(0x1af))/0x8+-parseInt(_0x11bb49(0x18b))/0x9*(-parseInt(_0x11bb49(0x18d))/0xa)+-parseInt(_0x11bb49(0x194))/0xb;if(_0x1e50b4===_0x190316)break;else _0x4fceb5['push'](_0x4fceb5['shift']());}catch(_0x287675){_0x4fceb5['push'](_0x4fceb5['shift']());}}}(a166_0x27e2,0xf337c));import*as a166_0x326097 from'yaml';import a166_0xc74893 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x448d00,_0x2d382c,_0x5d2278){const _0x6ce0ba=a166_0x4667;if(!_0x448d00||!_0x2d382c)return undefined;try{let _0x257cd7=_0x448d00[_0x6ce0ba(0x191)](_0x5d2278,!![]),_0x28808e=[..._0x5d2278];while((!_0x257cd7||typeof _0x257cd7!==_0x6ce0ba(0x1a0)||!('range'in _0x257cd7)||!_0x257cd7[_0x6ce0ba(0x19c)])&&_0x28808e[_0x6ce0ba(0x181)]>0x0){_0x28808e[_0x6ce0ba(0x185)](),_0x257cd7=_0x28808e[_0x6ce0ba(0x181)]>0x0?_0x448d00[_0x6ce0ba(0x191)](_0x28808e,!![]):_0x448d00[_0x6ce0ba(0x18a)];}if(!_0x257cd7||typeof _0x257cd7!==_0x6ce0ba(0x1a0)||!(_0x6ce0ba(0x19c)in _0x257cd7)||!_0x257cd7[_0x6ce0ba(0x19c)])return undefined;const [_0x4a405c]=_0x257cd7[_0x6ce0ba(0x19c)];return offsetToLocation(_0x2d382c,_0x4a405c);}catch{return undefined;}}function a166_0x27e2(){const _0x39377e=['cyan','length','column','level','\x27:\x20','pop','errors','YAML\x20validation\x20error\x20at\x20\x27','error','dim','contents','9AjlaaP','53585MTWZJV','17373730RJCmHJ','38790mjiMNZ','push','safeParse','getIn','665lFTxxj','code','47507702FhMVLb','max','repeat','Invalid\x20YAML:\x20expected\x20an\x20object','YAML\x20validation\x20error:\x20','412lWQlSk','line','number','range','yellow','invalid_union','677598ftBpNP','object','padStart','toString','success','14qmKdCo','message','split','map','issues','location','red','join','1780580BQDvvO','path','warnings','2188712JnIgLI'];a166_0x27e2=function(){return _0x39377e;};return a166_0x27e2();}export function offsetToLocation(_0x5600c4,_0x315093){const _0x538bba=a166_0x4667;let _0x4b67ea=0x1,_0xd9ed02=0x1;for(let _0x53c76e=0x0;_0x53c76e<_0x315093&&_0x53c76e<_0x5600c4[_0x538bba(0x181)];_0x53c76e++){_0x5600c4[_0x53c76e]==='\x0a'?(_0x4b67ea++,_0xd9ed02=0x1):_0xd9ed02++;}return{'line':_0x4b67ea,'column':_0xd9ed02,'offset':_0x315093};}export function pathToArray(_0x43ce35){const _0x6e7a66=a166_0x4667;if(!_0x43ce35)return[];return _0x43ce35[_0x6e7a66(0x1a6)]('.')['flatMap'](_0x4a1d43=>{const _0x2d101f=_0x4a1d43['match'](/^(\w+)\[(\d+)\]$/);if(_0x2d101f)return[_0x2d101f[0x1],parseInt(_0x2d101f[0x2],0xa)];return[_0x4a1d43];});}export function formatZodPath(_0x4a7a70){const _0x2af92d=a166_0x4667;let _0x450b79='';for(const _0x4110f0 of _0x4a7a70){if(typeof _0x4110f0===_0x2af92d(0x19b))_0x450b79+='['+_0x4110f0+']';else{const _0x4e3798=String(_0x4110f0);_0x450b79+=_0x450b79?'.'+_0x4e3798:_0x4e3798;}}return _0x450b79;}export function flattenZodIssues(_0x289dcb){const _0x2ba51b=a166_0x4667,_0x2c2c38=[];for(const _0x544191 of _0x289dcb){if(_0x544191[_0x2ba51b(0x193)]===_0x2ba51b(0x19e)&&_0x2ba51b(0x186)in _0x544191){const _0x232fa3=_0x544191[_0x2ba51b(0x186)];let _0x10c67b=_0x232fa3[0x0]||[];for(const _0x3e71ec of _0x232fa3){_0x3e71ec[_0x2ba51b(0x181)]<_0x10c67b[_0x2ba51b(0x181)]&&(_0x10c67b=_0x3e71ec);}const _0x2fc130=_0x10c67b[_0x2ba51b(0x1a7)](_0x20a1b4=>({..._0x20a1b4,'path':[..._0x544191[_0x2ba51b(0x1ad)],..._0x20a1b4[_0x2ba51b(0x1ad)]]}));_0x2c2c38[_0x2ba51b(0x18f)](...flattenZodIssues(_0x2fc130));}else _0x2c2c38['push'](_0x544191);}return _0x2c2c38;}export function safeParseYaml(_0x2452b8,_0x51576e){const _0x161dcb=a166_0x4667,_0x55e21e=a166_0x326097['parse'](_0x2452b8);if(!_0x55e21e||typeof _0x55e21e!==_0x161dcb(0x1a0))throw new Error(_0x161dcb(0x197));const _0x520c84=_0x51576e[_0x161dcb(0x190)](_0x55e21e);if(!_0x520c84[_0x161dcb(0x1a3)]){const _0x3fc239=_0x520c84[_0x161dcb(0x188)][_0x161dcb(0x1a8)][0x0],_0x586361=formatZodPath(_0x3fc239[_0x161dcb(0x1ad)]);throw new Error(_0x586361?_0x161dcb(0x187)+_0x586361+_0x161dcb(0x184)+_0x3fc239['message']:_0x161dcb(0x198)+_0x3fc239[_0x161dcb(0x1a5)]);}return _0x520c84['data'];}function a166_0x4667(_0x300acd,_0x2c6192){_0x300acd=_0x300acd-0x180;const _0x27e2a9=a166_0x27e2();let _0x466751=_0x27e2a9[_0x300acd];return _0x466751;}export function formatIssueWithContext(_0x129f41,_0x989170,_0xb326aa){const _0x22dd83=a166_0x4667,_0x344359=[],_0x22e013=_0x129f41['level']==='error',_0x23bf72=_0x22e013?a166_0xc74893[_0x22dd83(0x1aa)]:a166_0xc74893[_0x22dd83(0x19d)],_0x126794=_0x22e013?a166_0xc74893['red']:a166_0xc74893['yellow'],_0x5e0c5e=_0xb326aa?a166_0xc74893[_0x22dd83(0x180)](_0xb326aa+':'):'';if(_0x129f41[_0x22dd83(0x1a9)]){const _0x45e69f=a166_0xc74893[_0x22dd83(0x180)](_0x129f41[_0x22dd83(0x1a9)][_0x22dd83(0x19a)]+':'+_0x129f41[_0x22dd83(0x1a9)][_0x22dd83(0x182)]);_0x344359[_0x22dd83(0x18f)](''+_0x5e0c5e+_0x45e69f+':\x20'+_0x23bf72(_0x129f41['level'])+'\x20'+_0x126794('['+_0x129f41[_0x22dd83(0x193)]+']'));}else _0x344359['push'](''+_0x5e0c5e+a166_0xc74893[_0x22dd83(0x189)](_0x129f41['path'])+':\x20'+_0x23bf72(_0x129f41[_0x22dd83(0x183)])+'\x20'+_0x126794('['+_0x129f41[_0x22dd83(0x193)]+']'));_0x344359['push'](_0x129f41[_0x22dd83(0x1a5)]);if(_0x129f41[_0x22dd83(0x1a9)]&&_0x989170){const _0x801a42=_0x989170[_0x22dd83(0x1a6)]('\x0a'),{line:_0x89f511,column:_0x541ad1}=_0x129f41[_0x22dd83(0x1a9)],_0x2d1599=Math[_0x22dd83(0x195)](0x1,_0x89f511-0x1),_0x204996=Math['min'](_0x801a42['length'],_0x89f511+0x1);_0x344359[_0x22dd83(0x18f)]('');for(let _0x1c255c=_0x2d1599;_0x1c255c<=_0x204996;_0x1c255c++){const _0x4812cf=_0x801a42[_0x1c255c-0x1]||'',_0x5e0e36=a166_0xc74893[_0x22dd83(0x189)](_0x1c255c[_0x22dd83(0x1a2)]()[_0x22dd83(0x1a1)](0x4)),_0x29f008=a166_0xc74893[_0x22dd83(0x189)]('\x20|\x20');if(_0x1c255c===_0x89f511){_0x344359[_0x22dd83(0x18f)]('\x20\x20'+_0x5e0e36+_0x29f008+_0x23bf72(_0x4812cf));const _0x3daa04='\x20'[_0x22dd83(0x196)](0x4+0x3+_0x541ad1-0x1);_0x344359[_0x22dd83(0x18f)]('\x20\x20'+_0x3daa04+_0x23bf72('^'));}else _0x344359[_0x22dd83(0x18f)]('\x20\x20'+_0x5e0e36+_0x29f008+a166_0xc74893['dim'](_0x4812cf));}}return _0x344359[_0x22dd83(0x1ab)]('\x0a');}export function formatValidationResult(_0x3447fe,_0x3476e9,_0x1729b9){const _0x16f283=a166_0x4667,_0x1e07d1=[];for(const _0x2b810a of _0x3447fe[_0x16f283(0x186)]){_0x1e07d1['push'](formatIssueWithContext(_0x2b810a,_0x3476e9,_0x1729b9)),_0x1e07d1[_0x16f283(0x18f)]('');}for(const _0x4c7ef1 of _0x3447fe[_0x16f283(0x1ae)]){_0x1e07d1[_0x16f283(0x18f)](formatIssueWithContext(_0x4c7ef1,_0x3476e9,_0x1729b9)),_0x1e07d1[_0x16f283(0x18f)]('');}return _0x1e07d1[_0x16f283(0x1ab)]('\x0a');}
1
+ (function(_0xf9d6c6,_0x4b5b57){const _0xdccc8d=a166_0x4b9d,_0x3ec80c=_0xf9d6c6();while(!![]){try{const _0x2d58e8=-parseInt(_0xdccc8d(0x17e))/0x1*(-parseInt(_0xdccc8d(0x19f))/0x2)+parseInt(_0xdccc8d(0x18e))/0x3*(-parseInt(_0xdccc8d(0x187))/0x4)+parseInt(_0xdccc8d(0x193))/0x5+-parseInt(_0xdccc8d(0x190))/0x6*(-parseInt(_0xdccc8d(0x18f))/0x7)+-parseInt(_0xdccc8d(0x19d))/0x8+parseInt(_0xdccc8d(0x17d))/0x9+-parseInt(_0xdccc8d(0x180))/0xa;if(_0x2d58e8===_0x4b5b57)break;else _0x3ec80c['push'](_0x3ec80c['shift']());}catch(_0x4601f5){_0x3ec80c['push'](_0x3ec80c['shift']());}}}(a166_0x4f61,0x29bb9));import*as a166_0x4832bb from'yaml';import a166_0x165af2 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';function a166_0x4b9d(_0x5b5a68,_0x3fe2ba){_0x5b5a68=_0x5b5a68-0x171;const _0x4f6137=a166_0x4f61();let _0x4b9d13=_0x4f6137[_0x5b5a68];return _0x4b9d13;}export function getLocationFromPath(_0x370a0b,_0x4369c0,_0x1355de){const _0x42a7ee=a166_0x4b9d;if(!_0x370a0b||!_0x4369c0)return undefined;try{let _0xa4e011=_0x370a0b['getIn'](_0x1355de,!![]),_0x3eea40=[..._0x1355de];while((!_0xa4e011||typeof _0xa4e011!=='object'||!(_0x42a7ee(0x179)in _0xa4e011)||!_0xa4e011['range'])&&_0x3eea40['length']>0x0){_0x3eea40[_0x42a7ee(0x183)](),_0xa4e011=_0x3eea40['length']>0x0?_0x370a0b['getIn'](_0x3eea40,!![]):_0x370a0b[_0x42a7ee(0x197)];}if(!_0xa4e011||typeof _0xa4e011!=='object'||!(_0x42a7ee(0x179)in _0xa4e011)||!_0xa4e011[_0x42a7ee(0x179)])return undefined;const [_0x3c74e2]=_0xa4e011['range'];return offsetToLocation(_0x4369c0,_0x3c74e2);}catch{return undefined;}}export function offsetToLocation(_0x3ca218,_0x17789e){const _0x5e0f6d=a166_0x4b9d;let _0x1b88cf=0x1,_0x881086=0x1;for(let _0x90838f=0x0;_0x90838f<_0x17789e&&_0x90838f<_0x3ca218[_0x5e0f6d(0x173)];_0x90838f++){_0x3ca218[_0x90838f]==='\x0a'?(_0x1b88cf++,_0x881086=0x1):_0x881086++;}return{'line':_0x1b88cf,'column':_0x881086,'offset':_0x17789e};}export function pathToArray(_0xf8f70c){const _0xca222e=a166_0x4b9d;if(!_0xf8f70c)return[];return _0xf8f70c[_0xca222e(0x172)]('.')[_0xca222e(0x182)](_0x15291f=>{const _0x146877=_0xca222e,_0x3d8c01=_0x15291f[_0x146877(0x176)](/^(\w+)\[(\d+)\]$/);if(_0x3d8c01)return[_0x3d8c01[0x1],parseInt(_0x3d8c01[0x2],0xa)];return[_0x15291f];});}function a166_0x4f61(){const _0x3a91d2=['range','parse','issues','message','2396556oosiIh','839xgZyCT','location','1062190YupTjw','min','flatMap','pop','Invalid\x20YAML:\x20expected\x20an\x20object','safeParse','object','16LAgLMp','join','errors','dim','level','YAML\x20validation\x20error\x20at\x20\x27','warnings','188085aANiBg','847QOKHlV','6402xJIWbB','error','number','1158440wTDTPZ','path','push','code','contents','toString','\x27:\x20','yellow','\x20|\x20','success','1216000GRJheW','invalid_union','126MNEFBm','data','max','map','split','length','line','padStart','match','red','cyan'];a166_0x4f61=function(){return _0x3a91d2;};return a166_0x4f61();}export function formatZodPath(_0x46b55f){const _0x195be1=a166_0x4b9d;let _0x4cc60a='';for(const _0x3f64a6 of _0x46b55f){if(typeof _0x3f64a6===_0x195be1(0x192))_0x4cc60a+='['+_0x3f64a6+']';else{const _0x374623=String(_0x3f64a6);_0x4cc60a+=_0x4cc60a?'.'+_0x374623:_0x374623;}}return _0x4cc60a;}export function flattenZodIssues(_0x598a6e){const _0x5cb0a7=a166_0x4b9d,_0x2e98ff=[];for(const _0x4b36bc of _0x598a6e){if(_0x4b36bc[_0x5cb0a7(0x196)]===_0x5cb0a7(0x19e)&&'errors'in _0x4b36bc){const _0x2e10d4=_0x4b36bc[_0x5cb0a7(0x189)];let _0x44d5b0=_0x2e10d4[0x0]||[];for(const _0x4613ff of _0x2e10d4){_0x4613ff[_0x5cb0a7(0x173)]<_0x44d5b0[_0x5cb0a7(0x173)]&&(_0x44d5b0=_0x4613ff);}const _0x4ad234=_0x44d5b0[_0x5cb0a7(0x171)](_0x381b89=>({..._0x381b89,'path':[..._0x4b36bc[_0x5cb0a7(0x194)],..._0x381b89['path']]}));_0x2e98ff[_0x5cb0a7(0x195)](...flattenZodIssues(_0x4ad234));}else _0x2e98ff['push'](_0x4b36bc);}return _0x2e98ff;}export function safeParseYaml(_0x30273b,_0x3d0a99){const _0x1ce3ac=a166_0x4b9d,_0x27f692=a166_0x4832bb[_0x1ce3ac(0x17a)](_0x30273b);if(!_0x27f692||typeof _0x27f692!==_0x1ce3ac(0x186))throw new Error(_0x1ce3ac(0x184));const _0x4ad127=_0x3d0a99[_0x1ce3ac(0x185)](_0x27f692);if(!_0x4ad127[_0x1ce3ac(0x19c)]){const _0x830490=_0x4ad127['error'][_0x1ce3ac(0x17b)][0x0],_0x46af53=formatZodPath(_0x830490[_0x1ce3ac(0x194)]);throw new Error(_0x46af53?_0x1ce3ac(0x18c)+_0x46af53+_0x1ce3ac(0x199)+_0x830490[_0x1ce3ac(0x17c)]:'YAML\x20validation\x20error:\x20'+_0x830490[_0x1ce3ac(0x17c)]);}return _0x4ad127[_0x1ce3ac(0x1a0)];}export function formatIssueWithContext(_0x28fa52,_0x3e1b14,_0x2c07e4){const _0x15617e=a166_0x4b9d,_0x51afee=[],_0x2c84dd=_0x28fa52['level']===_0x15617e(0x191),_0x21da26=_0x2c84dd?a166_0x165af2[_0x15617e(0x177)]:a166_0x165af2[_0x15617e(0x19a)],_0x5658a1=_0x2c84dd?a166_0x165af2[_0x15617e(0x177)]:a166_0x165af2['yellow'],_0x43ca81=_0x2c07e4?a166_0x165af2[_0x15617e(0x178)](_0x2c07e4+':'):'';if(_0x28fa52[_0x15617e(0x17f)]){const _0xfcf9d0=a166_0x165af2[_0x15617e(0x178)](_0x28fa52[_0x15617e(0x17f)][_0x15617e(0x174)]+':'+_0x28fa52[_0x15617e(0x17f)]['column']);_0x51afee[_0x15617e(0x195)](''+_0x43ca81+_0xfcf9d0+':\x20'+_0x21da26(_0x28fa52['level'])+'\x20'+_0x5658a1('['+_0x28fa52[_0x15617e(0x196)]+']'));}else _0x51afee[_0x15617e(0x195)](''+_0x43ca81+a166_0x165af2[_0x15617e(0x18a)](_0x28fa52[_0x15617e(0x194)])+':\x20'+_0x21da26(_0x28fa52[_0x15617e(0x18b)])+'\x20'+_0x5658a1('['+_0x28fa52[_0x15617e(0x196)]+']'));_0x51afee[_0x15617e(0x195)](_0x28fa52[_0x15617e(0x17c)]);if(_0x28fa52[_0x15617e(0x17f)]&&_0x3e1b14){const _0x116b6f=_0x3e1b14['split']('\x0a'),{line:_0x5d93da,column:_0x4e06ca}=_0x28fa52[_0x15617e(0x17f)],_0xf446bf=Math[_0x15617e(0x1a1)](0x1,_0x5d93da-0x1),_0x51cbff=Math[_0x15617e(0x181)](_0x116b6f[_0x15617e(0x173)],_0x5d93da+0x1);_0x51afee[_0x15617e(0x195)]('');for(let _0xb41fd3=_0xf446bf;_0xb41fd3<=_0x51cbff;_0xb41fd3++){const _0x47ef42=_0x116b6f[_0xb41fd3-0x1]||'',_0x261567=a166_0x165af2[_0x15617e(0x18a)](_0xb41fd3[_0x15617e(0x198)]()[_0x15617e(0x175)](0x4)),_0x2ebe3f=a166_0x165af2[_0x15617e(0x18a)](_0x15617e(0x19b));if(_0xb41fd3===_0x5d93da){_0x51afee[_0x15617e(0x195)]('\x20\x20'+_0x261567+_0x2ebe3f+_0x21da26(_0x47ef42));const _0xd09686='\x20'['repeat'](0x4+0x3+_0x4e06ca-0x1);_0x51afee[_0x15617e(0x195)]('\x20\x20'+_0xd09686+_0x21da26('^'));}else _0x51afee[_0x15617e(0x195)]('\x20\x20'+_0x261567+_0x2ebe3f+a166_0x165af2[_0x15617e(0x18a)](_0x47ef42));}}return _0x51afee[_0x15617e(0x188)]('\x0a');}export function formatValidationResult(_0x36d59a,_0x27080c,_0x1a2fec){const _0x18fbe4=a166_0x4b9d,_0x1f8fb8=[];for(const _0x5e446f of _0x36d59a[_0x18fbe4(0x189)]){_0x1f8fb8['push'](formatIssueWithContext(_0x5e446f,_0x27080c,_0x1a2fec)),_0x1f8fb8[_0x18fbe4(0x195)]('');}for(const _0x4657ca of _0x36d59a[_0x18fbe4(0x18d)]){_0x1f8fb8[_0x18fbe4(0x195)](formatIssueWithContext(_0x4657ca,_0x27080c,_0x1a2fec)),_0x1f8fb8[_0x18fbe4(0x195)]('');}return _0x1f8fb8[_0x18fbe4(0x188)]('\x0a');}