@treasuredata/tdx 2026.8.5 → 2026.8.7

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 (311) hide show
  1. package/README.md +1 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.d.ts +1 -1
  5. package/dist/cli-categories.js +1 -1
  6. package/dist/cli-categories.js.map +1 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/agent-command.js +1 -1
  12. package/dist/commands/agent-test-command.js +1 -1
  13. package/dist/commands/api-command.js +1 -1
  14. package/dist/commands/auth-command.js +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-segment-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-statusline-command.js +1 -1
  20. package/dist/commands/claude-usage-command.js +1 -1
  21. package/dist/commands/codex-command.d.ts +52 -0
  22. package/dist/commands/codex-command.d.ts.map +1 -0
  23. package/dist/commands/codex-command.js +1 -0
  24. package/dist/commands/codex-command.js.map +1 -0
  25. package/dist/commands/command.js +1 -1
  26. package/dist/commands/connection-command.js +1 -1
  27. package/dist/commands/databases.js +1 -1
  28. package/dist/commands/delivery-command.js +1 -1
  29. package/dist/commands/describe.js +1 -1
  30. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  31. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  32. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  33. package/dist/commands/engage-campaign-pull-command.js +1 -1
  34. package/dist/commands/engage-campaign-push-command.js +1 -1
  35. package/dist/commands/engage-campaign-validate-command.js +1 -1
  36. package/dist/commands/engage-command.d.ts.map +1 -1
  37. package/dist/commands/engage-command.js +1 -1
  38. package/dist/commands/engage-command.js.map +1 -1
  39. package/dist/commands/engage-template-pull-command.js +1 -1
  40. package/dist/commands/engage-template-push-command.js +1 -1
  41. package/dist/commands/engage-template-validate-command.js +1 -1
  42. package/dist/commands/job-command.js +1 -1
  43. package/dist/commands/journey-command.js +1 -1
  44. package/dist/commands/journey-validate-command.js +1 -1
  45. package/dist/commands/llm-command.js +1 -1
  46. package/dist/commands/mcp-command.js +1 -1
  47. package/dist/commands/p13n-command.d.ts +16 -1
  48. package/dist/commands/p13n-command.d.ts.map +1 -1
  49. package/dist/commands/p13n-command.js +1 -1
  50. package/dist/commands/p13n-command.js.map +1 -1
  51. package/dist/commands/parent-segment-command.js +1 -1
  52. package/dist/commands/policy-command.js +1 -1
  53. package/dist/commands/profile-command.js +1 -1
  54. package/dist/commands/profiles-command.js +1 -1
  55. package/dist/commands/query-command.js +1 -1
  56. package/dist/commands/schedule-command.js +1 -1
  57. package/dist/commands/segment-command.js +1 -1
  58. package/dist/commands/segment-create-command.js +1 -1
  59. package/dist/commands/segment-fields-command.js +1 -1
  60. package/dist/commands/segment-move-command.js +1 -1
  61. package/dist/commands/segment-pull-command.js +1 -1
  62. package/dist/commands/segment-push-command.js +1 -1
  63. package/dist/commands/segment-update-command.js +1 -1
  64. package/dist/commands/segment-use-command.js +1 -1
  65. package/dist/commands/segment-validate-command.js +1 -1
  66. package/dist/commands/segments.js +1 -1
  67. package/dist/commands/show.js +1 -1
  68. package/dist/commands/status-command.js +1 -1
  69. package/dist/commands/table-deleted.js +1 -1
  70. package/dist/commands/tables.js +1 -1
  71. package/dist/commands/unset-command.d.ts +1 -0
  72. package/dist/commands/unset-command.d.ts.map +1 -1
  73. package/dist/commands/unset-command.js +1 -1
  74. package/dist/commands/unset-command.js.map +1 -1
  75. package/dist/commands/upgrade-command.js +1 -1
  76. package/dist/commands/use-command.d.ts +1 -0
  77. package/dist/commands/use-command.d.ts.map +1 -1
  78. package/dist/commands/use-command.js +1 -1
  79. package/dist/commands/use-command.js.map +1 -1
  80. package/dist/commands/user-command.js +1 -1
  81. package/dist/commands/work-command.js +1 -1
  82. package/dist/commands/workflow-command.js +1 -1
  83. package/dist/core/auth.js +1 -1
  84. package/dist/core/command-output.js +1 -1
  85. package/dist/core/config.js +1 -1
  86. package/dist/core/connection-cache.js +1 -1
  87. package/dist/core/constants.js +1 -1
  88. package/dist/core/credential-cache.js +1 -1
  89. package/dist/core/global-context.d.ts +1 -0
  90. package/dist/core/global-context.d.ts.map +1 -1
  91. package/dist/core/global-context.js +1 -1
  92. package/dist/core/global-context.js.map +1 -1
  93. package/dist/core/keychain.js +1 -1
  94. package/dist/core/oauth-keychain.js +1 -1
  95. package/dist/core/oauth.js +1 -1
  96. package/dist/core/profile.js +1 -1
  97. package/dist/core/project-config.js +1 -1
  98. package/dist/core/session.d.ts +2 -1
  99. package/dist/core/session.d.ts.map +1 -1
  100. package/dist/core/session.js +1 -1
  101. package/dist/core/session.js.map +1 -1
  102. package/dist/core/site-mismatch.js +1 -1
  103. package/dist/core/user-cache.js +1 -1
  104. package/dist/core/version.d.ts +3 -3
  105. package/dist/core/version.d.ts.map +1 -1
  106. package/dist/core/version.js +1 -1
  107. package/dist/core/version.js.map +1 -1
  108. package/dist/index.js +1 -1
  109. package/dist/mcp/server.js +1 -1
  110. package/dist/mcp/tools/index.js +1 -1
  111. package/dist/mcp/tools/tdx-run.js +1 -1
  112. package/dist/mcp/tools/tdx-search.js +1 -1
  113. package/dist/mcp/tools/work-create-item.js +1 -1
  114. package/dist/mcp/utils.js +1 -1
  115. package/dist/proxy/claude-usage-tracker.js +1 -1
  116. package/dist/proxy/passthrough-server.js +1 -1
  117. package/dist/proxy/sse-usage-parser.js +1 -1
  118. package/dist/sdk/agent/agent-config.js +1 -1
  119. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  120. package/dist/sdk/agent/agent-yaml.js +1 -1
  121. package/dist/sdk/agent/test/evaluator.js +1 -1
  122. package/dist/sdk/agent/test/executor.js +1 -1
  123. package/dist/sdk/agent/test/index.js +1 -1
  124. package/dist/sdk/agent/test/output.js +1 -1
  125. package/dist/sdk/agent/test/parser.js +1 -1
  126. package/dist/sdk/agent/tool-target-registry.js +1 -1
  127. package/dist/sdk/api.js +1 -1
  128. package/dist/sdk/auth-token.js +1 -1
  129. package/dist/sdk/cas/cas-api-client.js +1 -1
  130. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  131. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  132. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  133. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  134. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  135. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  136. package/dist/sdk/cas/index.js +1 -1
  137. package/dist/sdk/cas/pull-workflow.js +1 -1
  138. package/dist/sdk/cas/push-workflow.js +1 -1
  139. package/dist/sdk/cas/validate-files.js +1 -1
  140. package/dist/sdk/client/cdp-api-client.js +1 -1
  141. package/dist/sdk/client/delivery-api-client.js +1 -1
  142. package/dist/sdk/client/endpoints.js +1 -1
  143. package/dist/sdk/client/engage-api-client.d.ts +10 -2
  144. package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
  145. package/dist/sdk/client/engage-api-client.js +1 -1
  146. package/dist/sdk/client/engage-api-client.js.map +1 -1
  147. package/dist/sdk/client/http-client.js +1 -1
  148. package/dist/sdk/client/llm-api-client.js +1 -1
  149. package/dist/sdk/client/oauth-refresh.js +1 -1
  150. package/dist/sdk/client/p13n-studio-api-client.d.ts +65 -1
  151. package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -1
  152. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  153. package/dist/sdk/client/p13n-studio-api-client.js.map +1 -1
  154. package/dist/sdk/client/rate-limiter.js +1 -1
  155. package/dist/sdk/client/td-api-client.js +1 -1
  156. package/dist/sdk/client/trino-api-client.js +1 -1
  157. package/dist/sdk/client/workflow-client.js +1 -1
  158. package/dist/sdk/connection-validator.js +1 -1
  159. package/dist/sdk/connection.js +1 -1
  160. package/dist/sdk/delivery.js +1 -1
  161. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  162. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  163. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  164. package/dist/sdk/engage/always-on-campaign-yaml.d.ts.map +1 -1
  165. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  166. package/dist/sdk/engage/always-on-campaign-yaml.js.map +1 -1
  167. package/dist/sdk/engage/campaign-pull.js +1 -1
  168. package/dist/sdk/engage/campaign-push.js +1 -1
  169. package/dist/sdk/engage/campaign-validator.js +1 -1
  170. package/dist/sdk/engage/campaign-yaml.d.ts.map +1 -1
  171. package/dist/sdk/engage/campaign-yaml.js +1 -1
  172. package/dist/sdk/engage/campaign-yaml.js.map +1 -1
  173. package/dist/sdk/engage/template-pull.js +1 -1
  174. package/dist/sdk/engage/template-push.js +1 -1
  175. package/dist/sdk/engage/template-validator.js +1 -1
  176. package/dist/sdk/engage/template-yaml.d.ts.map +1 -1
  177. package/dist/sdk/engage/template-yaml.js +1 -1
  178. package/dist/sdk/engage/template-yaml.js.map +1 -1
  179. package/dist/sdk/engage/types/always-on-campaign-schema.d.ts +1 -0
  180. package/dist/sdk/engage/types/always-on-campaign-schema.d.ts.map +1 -1
  181. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  182. package/dist/sdk/engage/types/campaign-def.js +1 -1
  183. package/dist/sdk/engage/types/campaign-schema.d.ts +2 -0
  184. package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
  185. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  186. package/dist/sdk/engage/types/campaign-schema.js.map +1 -1
  187. package/dist/sdk/engage/types/template-schema.d.ts +1 -0
  188. package/dist/sdk/engage/types/template-schema.d.ts.map +1 -1
  189. package/dist/sdk/engage/types/template-schema.js +1 -1
  190. package/dist/sdk/engage/types/template-schema.js.map +1 -1
  191. package/dist/sdk/engage.d.ts +7 -2
  192. package/dist/sdk/engage.d.ts.map +1 -1
  193. package/dist/sdk/engage.js +1 -1
  194. package/dist/sdk/engage.js.map +1 -1
  195. package/dist/sdk/errors.js +1 -1
  196. package/dist/sdk/index.d.ts +5 -1
  197. package/dist/sdk/index.d.ts.map +1 -1
  198. package/dist/sdk/index.js +1 -1
  199. package/dist/sdk/index.js.map +1 -1
  200. package/dist/sdk/io/index.js +1 -1
  201. package/dist/sdk/io/node-filesystem.js +1 -1
  202. package/dist/sdk/job.js +1 -1
  203. package/dist/sdk/journey.js +1 -1
  204. package/dist/sdk/llm/chat-cache.js +1 -1
  205. package/dist/sdk/llm/index.js +1 -1
  206. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  207. package/dist/sdk/llm/model-factors.js +1 -1
  208. package/dist/sdk/llm/user-settings.js +1 -1
  209. package/dist/sdk/p13n-studio.d.ts +148 -1
  210. package/dist/sdk/p13n-studio.d.ts.map +1 -1
  211. package/dist/sdk/p13n-studio.js +1 -1
  212. package/dist/sdk/p13n-studio.js.map +1 -1
  213. package/dist/sdk/personalization.js +1 -1
  214. package/dist/sdk/policy.js +1 -1
  215. package/dist/sdk/query/deleted-table-validation.js +1 -1
  216. package/dist/sdk/query/index.js +1 -1
  217. package/dist/sdk/query/sql-parser.js +1 -1
  218. package/dist/sdk/realtime.js +1 -1
  219. package/dist/sdk/schedule.js +1 -1
  220. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  221. package/dist/sdk/segment/fields-display.js +1 -1
  222. package/dist/sdk/segment/file-discovery.js +1 -1
  223. package/dist/sdk/segment/journey-utils.js +1 -1
  224. package/dist/sdk/segment/journey-validator.js +1 -1
  225. package/dist/sdk/segment/journey-yaml.js +1 -1
  226. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  227. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  228. package/dist/sdk/segment/pull-workflow.js +1 -1
  229. package/dist/sdk/segment/push-recovery.js +1 -1
  230. package/dist/sdk/segment/push-workflow.js +1 -1
  231. package/dist/sdk/segment/resolution-context.js +1 -1
  232. package/dist/sdk/segment/segment-path-parser.js +1 -1
  233. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  234. package/dist/sdk/segment/segment-validator.js +1 -1
  235. package/dist/sdk/segment/target-resolution.js +1 -1
  236. package/dist/sdk/segment/tdx-config.js +1 -1
  237. package/dist/sdk/segment/types/activation-schema.js +1 -1
  238. package/dist/sdk/segment/types/journey-def.js +1 -1
  239. package/dist/sdk/segment/types/journey-schema.js +1 -1
  240. package/dist/sdk/segment/types/segment-def.js +1 -1
  241. package/dist/sdk/segment/types/segment-schema.js +1 -1
  242. package/dist/sdk/segment/validate-files.js +1 -1
  243. package/dist/sdk/segment/yaml-validator.js +1 -1
  244. package/dist/sdk/segment.js +1 -1
  245. package/dist/sdk/types/engage.d.ts +49 -0
  246. package/dist/sdk/types/engage.d.ts.map +1 -1
  247. package/dist/sdk/types/index.d.ts +3 -2
  248. package/dist/sdk/types/index.d.ts.map +1 -1
  249. package/dist/sdk/types/index.js +1 -1
  250. package/dist/sdk/types/index.js.map +1 -1
  251. package/dist/sdk/types/p13n-studio.d.ts +73 -0
  252. package/dist/sdk/types/p13n-studio.d.ts.map +1 -1
  253. package/dist/sdk/types/progress.js +1 -1
  254. package/dist/sdk/types/workspace.js +1 -1
  255. package/dist/sdk/user.js +1 -1
  256. package/dist/sdk/util/format-detector.js +1 -1
  257. package/dist/sdk/util/formatters.js +1 -1
  258. package/dist/sdk/util/index.js +1 -1
  259. package/dist/sdk/util/paginate.js +1 -1
  260. package/dist/sdk/util/tree-formatter.js +1 -1
  261. package/dist/sdk/util/tree-search.js +1 -1
  262. package/dist/sdk/workflow/archive-validation.js +1 -1
  263. package/dist/sdk/workflow/clone-workflow.js +1 -1
  264. package/dist/sdk/workflow/index.js +1 -1
  265. package/dist/sdk/workflow/pull-workflow.js +1 -1
  266. package/dist/sdk/workflow/push-workflow.js +1 -1
  267. package/dist/sdk/workflow/task-graph.js +1 -1
  268. package/dist/sdk/workflow/tdx-config.js +1 -1
  269. package/dist/sdk/workflow/workflow-utils.js +1 -1
  270. package/dist/sdk/workspace/access-tracker.js +1 -1
  271. package/dist/sdk/workspace/frontmatter.js +1 -1
  272. package/dist/sdk/workspace/git.js +1 -1
  273. package/dist/sdk/workspace/index.js +1 -1
  274. package/dist/sdk/workspace/templates.js +1 -1
  275. package/dist/sdk/workspace/weekly.js +1 -1
  276. package/dist/sdk/workspace/wikilinks.js +1 -1
  277. package/dist/test-utils/command-runner.js +1 -1
  278. package/dist/test-utils/factories.js +1 -1
  279. package/dist/test-utils/fixtures.js +1 -1
  280. package/dist/test-utils/http-mock.js +1 -1
  281. package/dist/test-utils/index.js +1 -1
  282. package/dist/utils/async.js +1 -1
  283. package/dist/utils/claude-code-state.js +1 -1
  284. package/dist/utils/colors.js +1 -1
  285. package/dist/utils/diff.js +1 -1
  286. package/dist/utils/file-permissions.js +1 -1
  287. package/dist/utils/file-reader.js +1 -1
  288. package/dist/utils/github-releases.js +1 -1
  289. package/dist/utils/global-cache.js +1 -1
  290. package/dist/utils/json-loader.js +1 -1
  291. package/dist/utils/local-cache.js +1 -1
  292. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  293. package/dist/utils/logger/formatters/index.js +1 -1
  294. package/dist/utils/logger/handlers/console-handler.js +1 -1
  295. package/dist/utils/logger/handlers/file-handler.js +1 -1
  296. package/dist/utils/logger/handlers/index.js +1 -1
  297. package/dist/utils/logger/handlers/null-handler.js +1 -1
  298. package/dist/utils/logger/index.js +1 -1
  299. package/dist/utils/logger/logger.js +1 -1
  300. package/dist/utils/logger/types.js +1 -1
  301. package/dist/utils/option-validation.js +1 -1
  302. package/dist/utils/process.js +1 -1
  303. package/dist/utils/prompt.js +1 -1
  304. package/dist/utils/proxy-fetch.js +1 -1
  305. package/dist/utils/spinner.js +1 -1
  306. package/dist/utils/sse-parser.js +1 -1
  307. package/dist/utils/string-utils.js +1 -1
  308. package/dist/utils/table-ref-parser.js +1 -1
  309. package/dist/utils/tdx-logger.js +1 -1
  310. package/dist/utils/version-check.js +1 -1
  311. package/package.json +2 -47
@@ -1 +1 @@
1
- (function(_0x2e12d0,_0x3e4e04){const _0x46b858=a179_0x647b,_0x390ec3=_0x2e12d0();while(!![]){try{const _0x210323=parseInt(_0x46b858(0xc3))/0x1+-parseInt(_0x46b858(0x9a))/0x2*(-parseInt(_0x46b858(0xba))/0x3)+parseInt(_0x46b858(0xa5))/0x4+parseInt(_0x46b858(0xce))/0x5*(-parseInt(_0x46b858(0xa1))/0x6)+parseInt(_0x46b858(0xbb))/0x7*(-parseInt(_0x46b858(0xa9))/0x8)+-parseInt(_0x46b858(0xc6))/0x9*(-parseInt(_0x46b858(0xc2))/0xa)+-parseInt(_0x46b858(0xa0))/0xb;if(_0x210323===_0x3e4e04)break;else _0x390ec3['push'](_0x390ec3['shift']());}catch(_0x5060c3){_0x390ec3['push'](_0x390ec3['shift']());}}}(a179_0x2cbc,0x6eb0a));function a179_0x2cbc(){const _0x2652ba=['129920abazEs','isScoped','configDir','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','scopedFolderPath','join','extname','177850hVpToZ','176765tGDqEV','parent_segment','tdx.json','423MdADbJ','match','type','resolve','segment','file','exists','replace','5siTbqK','isDirectory','invalid_yaml','Parent\x20segment\x20not\x20specified','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','161874YvqIaa','isFile','parent_name','no_parent','includes','No\x20tdx.json\x20found\x20for\x20file:\x20','18990059emMjEc','418164pOvaGx','resourceType','readFile','folderPath','3538888uqZYaD','segmentName','cwd','No\x20tdx.json\x20found','232wOYsUE','root','message','context','Not\x20a\x20YAML\x20file:\x20','journey','parse','dirname','stat','directory','File\x20not\x20found','error','no_config','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','parentSegment','trim','basename','33DbfRKD'];a179_0x2cbc=function(){return _0x2652ba;};return a179_0x2cbc();}import a179_0x5d49e2 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';function a179_0x647b(_0x3f4ace,_0x55d962){_0x3f4ace=_0x3f4ace-0x98;const _0x2cbcbb=a179_0x2cbc();let _0x647b8e=_0x2cbcbb[_0x3f4ace];return _0x647b8e;}export function isSuccessfulResolution(_0x423996){const _0x16c41c=a179_0x647b;return _0x423996[_0x16c41c(0xc8)]!==_0x16c41c(0xb4);}export function isScopedResolution(_0x3b81d6){const _0x323045=a179_0x647b;return _0x3b81d6[_0x323045(0xc8)]===_0x323045(0xb2)||_0x3b81d6[_0x323045(0xc8)]===_0x323045(0xcb)||_0x3b81d6['type']===_0x323045(0xac);}export function getScopedDetails(_0x1ce546){const _0xcfe4eb=a179_0x647b;if(isScopedResolution(_0x1ce546))return{'isScoped':_0x1ce546[_0xcfe4eb(0xbc)],'scopedFolderPath':_0x1ce546[_0xcfe4eb(0xbf)]};return undefined;}async function findTdxConfigAsync(_0x4158f0,_0x805995){const _0x4e1d93=a179_0x647b;let _0x44377d=a179_0x5d49e2['resolve'](_0x4158f0);const _0x37b790=a179_0x5d49e2['parse'](_0x44377d)[_0x4e1d93(0xaa)];while(_0x44377d!==_0x37b790){const _0x40cf7c=a179_0x5d49e2[_0x4e1d93(0xc0)](_0x44377d,_0x4e1d93(0xc5));if(await _0x805995[_0x4e1d93(0xcc)](_0x40cf7c))try{const _0xe69266=await _0x805995[_0x4e1d93(0xa3)](_0x40cf7c),_0x40b70e=JSON[_0x4e1d93(0xaf)](_0xe69266);if(_0x40b70e['parent_segment']&&typeof _0x40b70e['parent_segment']==='string')return{'configPath':_0x40cf7c,'configDir':_0x44377d,'parentSegment':_0x40b70e[_0x4e1d93(0xc4)]};}catch{}_0x44377d=a179_0x5d49e2[_0x4e1d93(0xb0)](_0x44377d);}return null;}function calculateScopedPath(_0x49507e,_0x44ece3){const _0x24df98=a179_0x647b,_0x4b396c=a179_0x5d49e2['relative'](_0x44ece3,_0x49507e),_0x3e8795=_0x4b396c!==''&&_0x4b396c!=='.'&&!_0x4b396c['startsWith']('..');return{'isScoped':_0x3e8795,'scopedFolderPath':_0x3e8795?_0x4b396c[_0x24df98(0xcd)](/\\/g,'/'):''};}export async function resolveTarget(_0x2847ad){const _0x3e7469=a179_0x647b,{arg:_0x32cd98,contextParent:_0x3ad7be,cwd:cwd=process[_0x3e7469(0xa7)](),fs:fs=nodeFileSystem}=_0x2847ad;if(_0x32cd98&&isYamlFilePath(_0x32cd98))try{const _0x1a5e5f=await resolveYamlFilePath(_0x32cd98,fs),_0x463691=a179_0x5d49e2['resolve'](_0x32cd98),_0xd20a66=a179_0x5d49e2['dirname'](_0x463691),_0x1e28f6=await findTdxConfigAsync(_0xd20a66,fs);if(!_0x1e28f6){if(_0x3ad7be){const _0x12b3d9=a179_0x5d49e2['dirname'](_0x463691);return{'type':_0x3e7469(0xcb),'parentName':_0x3ad7be,'targetDir':_0x12b3d9,'configRoot':_0x12b3d9,'filePath':_0x463691,'resourceName':_0x1a5e5f[_0x3e7469(0xa6)],'folderPath':_0x1a5e5f[_0x3e7469(0xa4)],'resourceType':_0x1a5e5f[_0x3e7469(0xa2)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3e7469(0xb4),'errorCode':_0x3e7469(0xb5),'message':_0x3e7469(0x9f)+_0x32cd98,'arg':_0x32cd98,'helpText':_0x3e7469(0x99)};}const _0x5b28da=calculateScopedPath(_0xd20a66,_0x1e28f6[_0x3e7469(0xbd)]);return{'type':'file','parentName':_0x1e28f6[_0x3e7469(0xb7)],'targetDir':_0x1e28f6[_0x3e7469(0xbd)],'configRoot':_0x1e28f6[_0x3e7469(0xbd)],'filePath':_0x463691,'resourceName':_0x1a5e5f['segmentName'],'folderPath':_0x1a5e5f[_0x3e7469(0xa4)],'resourceType':_0x1a5e5f[_0x3e7469(0xa2)],'isScoped':_0x5b28da[_0x3e7469(0xbc)],'scopedFolderPath':_0x5b28da['scopedFolderPath']};}catch(_0x3f537b){const _0x30674d=_0x3f537b instanceof Error?_0x3f537b[_0x3e7469(0xab)]:String(_0x3f537b);if(_0x30674d['includes'](_0x3e7469(0xb3)))return{'type':_0x3e7469(0xb4),'errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x32cd98,'arg':_0x32cd98};if(_0x30674d[_0x3e7469(0x9e)](_0x3e7469(0xa8))){if(_0x3ad7be){const _0x587eba=a179_0x5d49e2[_0x3e7469(0xc9)](_0x32cd98);if(await fs['exists'](_0x587eba)){const _0x41b5e7=a179_0x5d49e2[_0x3e7469(0xb0)](_0x587eba),_0x3fc26c=await fs['readFile'](_0x587eba),_0x462c04=_0x3fc26c[_0x3e7469(0xc7)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x2112bc=_0x3fc26c['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x7557c1=_0x462c04?_0x462c04[0x1]['trim']():a179_0x5d49e2[_0x3e7469(0xb9)](_0x32cd98,a179_0x5d49e2[_0x3e7469(0xc1)](_0x32cd98)),_0x311c25=_0x2112bc&&_0x2112bc[0x1][_0x3e7469(0xb8)]()===_0x3e7469(0xae)?_0x3e7469(0xae):_0x3e7469(0xca);return{'type':_0x3e7469(0xcb),'parentName':_0x3ad7be,'targetDir':_0x41b5e7,'configRoot':_0x41b5e7,'filePath':_0x587eba,'resourceName':_0x7557c1,'folderPath':'','resourceType':_0x311c25,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x3e7469(0xb4),'errorCode':_0x3e7469(0xb5),'message':_0x3e7469(0x9f)+_0x32cd98,'arg':_0x32cd98,'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'};}return{'type':'error','errorCode':_0x3e7469(0xd0),'message':_0x30674d,'arg':_0x32cd98};}if(_0x32cd98){const _0x4654cc=a179_0x5d49e2[_0x3e7469(0xc9)](cwd,_0x32cd98);let _0xa9a2bc=null;try{_0xa9a2bc=await fs[_0x3e7469(0xb1)](_0x4654cc);}catch{}if(_0xa9a2bc?.[_0x3e7469(0xcf)]()){const _0x407326=await findTdxConfigAsync(_0x4654cc,fs);if(_0x407326){const _0x254bc7=calculateScopedPath(_0x4654cc,_0x407326[_0x3e7469(0xbd)]);return{'type':_0x3e7469(0xb2),'parentName':_0x407326[_0x3e7469(0xb7)],'targetDir':_0x4654cc,'configRoot':_0x407326[_0x3e7469(0xbd)],'isScoped':_0x254bc7[_0x3e7469(0xbc)],'scopedFolderPath':_0x254bc7['scopedFolderPath']};}if(_0x3ad7be)return{'type':'directory','parentName':_0x3ad7be,'targetDir':_0x4654cc,'configRoot':_0x4654cc,'isScoped':![],'scopedFolderPath':''};return{'type':_0x3e7469(0xb4),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x32cd98,'arg':_0x32cd98,'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(_0xa9a2bc?.[_0x3e7469(0x9b)]())return{'type':_0x3e7469(0xb4),'errorCode':_0x3e7469(0xd0),'message':_0x3e7469(0xad)+_0x32cd98,'arg':_0x32cd98,'helpText':_0x3e7469(0xbe)};const _0x2db0f6=sanitizeFileName(_0x32cd98),_0xc4654=getSegmentRootDir(_0x2db0f6,cwd);return{'type':_0x3e7469(0x9c),'parentName':_0x32cd98,'targetDir':_0xc4654,'configRoot':_0xc4654};}const _0xa4c567=await findTdxConfigAsync(cwd,fs);if(_0xa4c567){const _0x5bde56=calculateScopedPath(cwd,_0xa4c567[_0x3e7469(0xbd)]);return{'type':_0x3e7469(0xac),'parentName':_0xa4c567[_0x3e7469(0xb7)],'targetDir':cwd,'configRoot':_0xa4c567[_0x3e7469(0xbd)],'isScoped':_0x5bde56['isScoped'],'scopedFolderPath':_0x5bde56[_0x3e7469(0xbf)]};}if(_0x3ad7be){const _0x369202=sanitizeFileName(_0x3ad7be),_0x262e44=getSegmentRootDir(_0x369202,cwd);return{'type':'context','parentName':_0x3ad7be,'targetDir':_0x262e44,'configRoot':_0x262e44,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3e7469(0xb4),'errorCode':_0x3e7469(0x9d),'message':_0x3e7469(0x98),'helpText':_0x3e7469(0xb6)};}
1
+ function a180_0x11e6(){const _0x4f1251=['relative','dirname','7WvPxaF','194124HcqnJR','scopedFolderPath','includes','parent_name','segmentName','type','string','trim','File\x20not\x20found:\x20','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','readFile','match','cwd','journey','folderPath','709432VAfrgl','parent_segment','3891006pfuODJ','parentSegment','no_parent','resourceType','error','2033872AwSzgH','606vyVXwe','invalid_yaml','8905OJTCCJ','isScoped','stat','configDir','parse','isFile','file','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','join','resolve','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','file_not_found','13844TZDAMm','isDirectory','no_config','directory','startsWith','replace','basename','exists','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','segment','424875yWRZwD','root','context','File\x20not\x20found'];a180_0x11e6=function(){return _0x4f1251;};return a180_0x11e6();}(function(_0x121908,_0x53b214){const _0x34270=a180_0x5c2d,_0x515e4d=_0x121908();while(!![]){try{const _0x4a681b=parseInt(_0x34270(0x18a))/0x1+parseInt(_0x34270(0x19b))/0x2+-parseInt(_0x34270(0x194))/0x3+parseInt(_0x34270(0x174))/0x4+-parseInt(_0x34270(0x17e))/0x5*(parseInt(_0x34270(0x17c))/0x6)+-parseInt(_0x34270(0x19a))/0x7*(parseInt(_0x34270(0x17b))/0x8)+parseInt(_0x34270(0x176))/0x9;if(_0x4a681b===_0x53b214)break;else _0x515e4d['push'](_0x515e4d['shift']());}catch(_0x1a2e60){_0x515e4d['push'](_0x515e4d['shift']());}}}(a180_0x11e6,0x235da));import a180_0x367348 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';function a180_0x5c2d(_0x3ff579,_0x5ccdd8){_0x3ff579=_0x3ff579-0x169;const _0x11e6c8=a180_0x11e6();let _0x5c2df3=_0x11e6c8[_0x3ff579];return _0x5c2df3;}export function isSuccessfulResolution(_0x397239){const _0x431310=a180_0x5c2d;return _0x397239['type']!==_0x431310(0x17a);}export function isScopedResolution(_0x59c2fb){const _0x56e087=a180_0x5c2d;return _0x59c2fb[_0x56e087(0x16a)]==='directory'||_0x59c2fb['type']===_0x56e087(0x184)||_0x59c2fb['type']===_0x56e087(0x196);}export function getScopedDetails(_0x5e173b){const _0x5a2d33=a180_0x5c2d;if(isScopedResolution(_0x5e173b))return{'isScoped':_0x5e173b[_0x5a2d33(0x17f)],'scopedFolderPath':_0x5e173b[_0x5a2d33(0x19c)]};return undefined;}async function findTdxConfigAsync(_0x1f98e1,_0x5e08fd){const _0x1f7e8d=a180_0x5c2d;let _0x18a29c=a180_0x367348[_0x1f7e8d(0x187)](_0x1f98e1);const _0x464572=a180_0x367348[_0x1f7e8d(0x182)](_0x18a29c)[_0x1f7e8d(0x195)];while(_0x18a29c!==_0x464572){const _0x15451b=a180_0x367348[_0x1f7e8d(0x186)](_0x18a29c,'tdx.json');if(await _0x5e08fd[_0x1f7e8d(0x191)](_0x15451b))try{const _0x52e69c=await _0x5e08fd[_0x1f7e8d(0x16f)](_0x15451b),_0x45a10d=JSON[_0x1f7e8d(0x182)](_0x52e69c);if(_0x45a10d[_0x1f7e8d(0x175)]&&typeof _0x45a10d[_0x1f7e8d(0x175)]===_0x1f7e8d(0x16b))return{'configPath':_0x15451b,'configDir':_0x18a29c,'parentSegment':_0x45a10d[_0x1f7e8d(0x175)]};}catch{}_0x18a29c=a180_0x367348[_0x1f7e8d(0x199)](_0x18a29c);}return null;}function calculateScopedPath(_0xd82c03,_0x51057e){const _0x293983=a180_0x5c2d,_0x40379e=a180_0x367348[_0x293983(0x198)](_0x51057e,_0xd82c03),_0x5aa467=_0x40379e!==''&&_0x40379e!=='.'&&!_0x40379e[_0x293983(0x18e)]('..');return{'isScoped':_0x5aa467,'scopedFolderPath':_0x5aa467?_0x40379e[_0x293983(0x18f)](/\\/g,'/'):''};}export async function resolveTarget(_0x237ffd){const _0x3e2815=a180_0x5c2d,{arg:_0x248d2a,contextParent:_0x4eb611,cwd:cwd=process[_0x3e2815(0x171)](),fs:fs=nodeFileSystem}=_0x237ffd;if(_0x248d2a&&isYamlFilePath(_0x248d2a))try{const _0x257fd6=await resolveYamlFilePath(_0x248d2a,fs),_0x42ca29=a180_0x367348[_0x3e2815(0x187)](_0x248d2a),_0x3b311e=a180_0x367348[_0x3e2815(0x199)](_0x42ca29),_0xa7765=await findTdxConfigAsync(_0x3b311e,fs);if(!_0xa7765){if(_0x4eb611){const _0x73327f=a180_0x367348[_0x3e2815(0x199)](_0x42ca29);return{'type':_0x3e2815(0x184),'parentName':_0x4eb611,'targetDir':_0x73327f,'configRoot':_0x73327f,'filePath':_0x42ca29,'resourceName':_0x257fd6['segmentName'],'folderPath':_0x257fd6[_0x3e2815(0x173)],'resourceType':_0x257fd6[_0x3e2815(0x179)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3e2815(0x17a),'errorCode':_0x3e2815(0x18c),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x248d2a,'arg':_0x248d2a,'helpText':_0x3e2815(0x192)};}const _0x238eeb=calculateScopedPath(_0x3b311e,_0xa7765[_0x3e2815(0x181)]);return{'type':_0x3e2815(0x184),'parentName':_0xa7765[_0x3e2815(0x177)],'targetDir':_0xa7765[_0x3e2815(0x181)],'configRoot':_0xa7765[_0x3e2815(0x181)],'filePath':_0x42ca29,'resourceName':_0x257fd6[_0x3e2815(0x169)],'folderPath':_0x257fd6['folderPath'],'resourceType':_0x257fd6[_0x3e2815(0x179)],'isScoped':_0x238eeb['isScoped'],'scopedFolderPath':_0x238eeb[_0x3e2815(0x19c)]};}catch(_0x46cc72){const _0x125377=_0x46cc72 instanceof Error?_0x46cc72['message']:String(_0x46cc72);if(_0x125377[_0x3e2815(0x19d)](_0x3e2815(0x197)))return{'type':_0x3e2815(0x17a),'errorCode':_0x3e2815(0x189),'message':_0x3e2815(0x16d)+_0x248d2a,'arg':_0x248d2a};if(_0x125377[_0x3e2815(0x19d)]('No\x20tdx.json\x20found')){if(_0x4eb611){const _0x3c3655=a180_0x367348[_0x3e2815(0x187)](_0x248d2a);if(await fs[_0x3e2815(0x191)](_0x3c3655)){const _0x5edd7c=a180_0x367348[_0x3e2815(0x199)](_0x3c3655),_0x237215=await fs[_0x3e2815(0x16f)](_0x3c3655),_0x3a453d=_0x237215[_0x3e2815(0x170)](/^name:\s*["']?([^"'\n]+)["']?/m),_0xa65ce2=_0x237215['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x513909=_0x3a453d?_0x3a453d[0x1][_0x3e2815(0x16c)]():a180_0x367348[_0x3e2815(0x190)](_0x248d2a,a180_0x367348['extname'](_0x248d2a)),_0x373af3=_0xa65ce2&&_0xa65ce2[0x1][_0x3e2815(0x16c)]()===_0x3e2815(0x172)?_0x3e2815(0x172):_0x3e2815(0x193);return{'type':'file','parentName':_0x4eb611,'targetDir':_0x5edd7c,'configRoot':_0x5edd7c,'filePath':_0x3c3655,'resourceName':_0x513909,'folderPath':'','resourceType':_0x373af3,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':'no_config','message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x248d2a,'arg':_0x248d2a,'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'};}return{'type':'error','errorCode':_0x3e2815(0x17d),'message':_0x125377,'arg':_0x248d2a};}if(_0x248d2a){const _0x2f1dd8=a180_0x367348[_0x3e2815(0x187)](cwd,_0x248d2a);let _0x3897f1=null;try{_0x3897f1=await fs[_0x3e2815(0x180)](_0x2f1dd8);}catch{}if(_0x3897f1?.[_0x3e2815(0x18b)]()){const _0x267c71=await findTdxConfigAsync(_0x2f1dd8,fs);if(_0x267c71){const _0x1329e7=calculateScopedPath(_0x2f1dd8,_0x267c71[_0x3e2815(0x181)]);return{'type':_0x3e2815(0x18d),'parentName':_0x267c71[_0x3e2815(0x177)],'targetDir':_0x2f1dd8,'configRoot':_0x267c71[_0x3e2815(0x181)],'isScoped':_0x1329e7[_0x3e2815(0x17f)],'scopedFolderPath':_0x1329e7['scopedFolderPath']};}if(_0x4eb611)return{'type':'directory','parentName':_0x4eb611,'targetDir':_0x2f1dd8,'configRoot':_0x2f1dd8,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x3e2815(0x18c),'message':_0x3e2815(0x185)+_0x248d2a,'arg':_0x248d2a,'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(_0x3897f1?.[_0x3e2815(0x183)]())return{'type':_0x3e2815(0x17a),'errorCode':_0x3e2815(0x17d),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x248d2a,'arg':_0x248d2a,'helpText':_0x3e2815(0x188)};const _0x53202f=sanitizeFileName(_0x248d2a),_0x246d6a=getSegmentRootDir(_0x53202f,cwd);return{'type':_0x3e2815(0x19e),'parentName':_0x248d2a,'targetDir':_0x246d6a,'configRoot':_0x246d6a};}const _0x3740c8=await findTdxConfigAsync(cwd,fs);if(_0x3740c8){const _0x122ebc=calculateScopedPath(cwd,_0x3740c8[_0x3e2815(0x181)]);return{'type':_0x3e2815(0x196),'parentName':_0x3740c8['parentSegment'],'targetDir':cwd,'configRoot':_0x3740c8[_0x3e2815(0x181)],'isScoped':_0x122ebc[_0x3e2815(0x17f)],'scopedFolderPath':_0x122ebc[_0x3e2815(0x19c)]};}if(_0x4eb611){const _0x128167=sanitizeFileName(_0x4eb611),_0x328e96=getSegmentRootDir(_0x128167,cwd);return{'type':_0x3e2815(0x196),'parentName':_0x4eb611,'targetDir':_0x328e96,'configRoot':_0x328e96,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x3e2815(0x17a),'errorCode':_0x3e2815(0x178),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x3e2815(0x16e)};}
@@ -1 +1 @@
1
- const a180_0x45d823=a180_0x3384;(function(_0x27f7fe,_0x37ea99){const _0x191bd0=a180_0x3384,_0x51126c=_0x27f7fe();while(!![]){try{const _0x500e14=-parseInt(_0x191bd0(0x98))/0x1*(-parseInt(_0x191bd0(0x93))/0x2)+parseInt(_0x191bd0(0x96))/0x3+parseInt(_0x191bd0(0x95))/0x4+-parseInt(_0x191bd0(0x9e))/0x5*(parseInt(_0x191bd0(0x9b))/0x6)+-parseInt(_0x191bd0(0xa7))/0x7+parseInt(_0x191bd0(0x90))/0x8*(-parseInt(_0x191bd0(0x9a))/0x9)+-parseInt(_0x191bd0(0xab))/0xa*(-parseInt(_0x191bd0(0xa2))/0xb);if(_0x500e14===_0x37ea99)break;else _0x51126c['push'](_0x51126c['shift']());}catch(_0x193bdf){_0x51126c['push'](_0x51126c['shift']());}}}(a180_0x3297,0x3bef0));import{existsSync,readFileSync}from'fs';import a180_0x1af4c9 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a180_0x45d823(0xa6);function a180_0x3297(){const _0x5f4570=['string','join','8jKNivI','parse','object','13682GTcmzb','startsWith','1214580gOKXOo','1045680tNtUgk','stringify','31kxnAtf','utf-8','2200851zQSMsj','24eHXsOw','cwd','root','282365vGQtCD','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20JSON\x20in\x20','515009XMmbPJ','dirname','engage_workspace','Invalid\x20tdx.json:\x20expected\x20object','segments','1366232nOHBmX','parent_segment','relative','resolve','10CZPrSb'];a180_0x3297=function(){return _0x5f4570;};return a180_0x3297();}export function findTdxConfigPath(_0x3fc0ff=process[a180_0x45d823(0x9c)]()){const _0x4d8f48=a180_0x45d823;let _0x222a3d=a180_0x1af4c9[_0x4d8f48(0xaa)](_0x3fc0ff);const _0x420daf=a180_0x1af4c9[_0x4d8f48(0x91)](_0x222a3d)[_0x4d8f48(0x9d)];while(_0x222a3d!==_0x420daf){const _0x2f8ebd=a180_0x1af4c9[_0x4d8f48(0x8f)](_0x222a3d,TDX_CONFIG_FILE);if(existsSync(_0x2f8ebd))return _0x2f8ebd;_0x222a3d=a180_0x1af4c9[_0x4d8f48(0xa3)](_0x222a3d);}return null;}export function loadTdxConfig(_0x200817){const _0x3cafe9=a180_0x45d823,_0x2e3e4b=readFileSync(_0x200817,_0x3cafe9(0x99));let _0x1c4621;try{_0x1c4621=JSON[_0x3cafe9(0x91)](_0x2e3e4b);}catch{throw new Error(_0x3cafe9(0xa1)+_0x200817);}if(!_0x1c4621||typeof _0x1c4621!==_0x3cafe9(0x92))throw new Error(_0x3cafe9(0xa5));const _0x18a1c4=_0x1c4621,_0x19c48f=_0x18a1c4['parent_segment']&&typeof _0x18a1c4['parent_segment']===_0x3cafe9(0xac),_0x2f7879=_0x18a1c4['engage_workspace']&&typeof _0x18a1c4[_0x3cafe9(0xa4)]===_0x3cafe9(0xac);if(!_0x19c48f&&!_0x2f7879)throw new Error(_0x3cafe9(0x9f));const _0x106672={};return _0x19c48f&&(_0x106672[_0x3cafe9(0xa8)]=_0x18a1c4['parent_segment']),_0x2f7879&&(_0x106672['engage_workspace']=_0x18a1c4[_0x3cafe9(0xa4)]),_0x106672;}export function findTdxConfig(_0x2cf999=process[a180_0x45d823(0x9c)]()){const _0x5cab18=a180_0x45d823,_0x37c17a=findTdxConfigPath(_0x2cf999);if(!_0x37c17a)throw new Error(_0x5cab18(0xa0));const _0x1c036f=loadTdxConfig(_0x37c17a),_0x1cbe9a=a180_0x1af4c9[_0x5cab18(0xa3)](_0x37c17a);return{'config':_0x1c036f,'configPath':_0x37c17a,'configDir':_0x1cbe9a};}export function tryFindTdxConfig(_0x31090f){try{return findTdxConfig(_0x31090f);}catch{return null;}}export function getSegmentRootDir(_0x3b005e,_0x3dd560=process[a180_0x45d823(0x9c)]()){const _0x208f63=a180_0x45d823;return a180_0x1af4c9[_0x208f63(0x8f)](_0x3dd560,SEGMENTS_DIR,_0x3b005e);}function a180_0x3384(_0x48e818,_0x313548){_0x48e818=_0x48e818-0x8f;const _0x3297b2=a180_0x3297();let _0x338426=_0x3297b2[_0x48e818];return _0x338426;}export function getTdxConfigPath(_0x5d0b07,_0x38991c=process[a180_0x45d823(0x9c)]()){return a180_0x1af4c9['join'](getSegmentRootDir(_0x5d0b07,_0x38991c),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x172689,_0x9563ce){const _0x5a492d=a180_0x45d823,_0x3a66f5=a180_0x1af4c9[_0x5a492d(0xaa)](_0x172689),_0xf39eab=a180_0x1af4c9[_0x5a492d(0xa9)](_0x9563ce,_0x3a66f5);if(_0xf39eab[_0x5a492d(0x94)]('..'))return'';return _0xf39eab;}export function localPathToTdFolderPath(_0x7ebb6b){const _0x3e8992=a180_0x45d823,_0x45a1d2=a180_0x1af4c9[_0x3e8992(0xa3)](_0x7ebb6b);if(_0x45a1d2==='.'||_0x45a1d2==='')return'';return _0x45a1d2['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x5b9622,_0x569b0c){const _0x2925e5=a180_0x45d823;if(!_0x5b9622)return _0x569b0c;return a180_0x1af4c9[_0x2925e5(0x8f)](_0x569b0c,_0x5b9622);}export function createTdxConfigContent(_0x4f4bb2){const _0x520a57=a180_0x45d823,_0xc0616={'parent_segment':_0x4f4bb2};return JSON[_0x520a57(0x97)](_0xc0616,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x3e685f){const _0x5186df=a180_0x45d823,_0x3dcc6a={'engage_workspace':_0x3e685f};return JSON[_0x5186df(0x97)](_0x3dcc6a,null,0x2)+'\x0a';}
1
+ const a181_0x3c8239=a181_0x3a9a;(function(_0x535d1f,_0x28dcf3){const _0x1c1a13=a181_0x3a9a,_0xf0e9bd=_0x535d1f();while(!![]){try{const _0x33d9f3=-parseInt(_0x1c1a13(0x17f))/0x1*(parseInt(_0x1c1a13(0x18d))/0x2)+parseInt(_0x1c1a13(0x194))/0x3+-parseInt(_0x1c1a13(0x197))/0x4+parseInt(_0x1c1a13(0x18e))/0x5*(parseInt(_0x1c1a13(0x191))/0x6)+parseInt(_0x1c1a13(0x183))/0x7*(parseInt(_0x1c1a13(0x18c))/0x8)+-parseInt(_0x1c1a13(0x192))/0x9+parseInt(_0x1c1a13(0x185))/0xa*(-parseInt(_0x1c1a13(0x17e))/0xb);if(_0x33d9f3===_0x28dcf3)break;else _0xf0e9bd['push'](_0xf0e9bd['shift']());}catch(_0x103eaf){_0xf0e9bd['push'](_0xf0e9bd['shift']());}}}(a181_0x54f4,0xebb0f));import{existsSync,readFileSync}from'fs';import a181_0x429cd3 from'path';function a181_0x54f4(){const _0x268544=['string','stringify','33EUDNFv','6GuNZMB','parent_segment','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','object','3269DNsdyi','Invalid\x20JSON\x20in\x20','3257340MQDjgh','cwd','root','resolve','segments','Invalid\x20tdx.json:\x20expected\x20object','replace','30456TuOhew','129562adhnsS','15FKABhj','engage_workspace','parse','1686666zUqTHc','5978286WZFZzB','tdx.json','4282473UYtlSk','dirname','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','4212640qVhQAX','join','relative'];a181_0x54f4=function(){return _0x268544;};return a181_0x54f4();}const TDX_CONFIG_FILE=a181_0x3c8239(0x193),SEGMENTS_DIR=a181_0x3c8239(0x189);function a181_0x3a9a(_0x11bf7e,_0x30753c){_0x11bf7e=_0x11bf7e-0x17d;const _0x54f4d2=a181_0x54f4();let _0x3a9a12=_0x54f4d2[_0x11bf7e];return _0x3a9a12;}export function findTdxConfigPath(_0x3e1c2=process['cwd']()){const _0x58d3ea=a181_0x3c8239;let _0x19c3b5=a181_0x429cd3[_0x58d3ea(0x188)](_0x3e1c2);const _0x2c8477=a181_0x429cd3[_0x58d3ea(0x190)](_0x19c3b5)[_0x58d3ea(0x187)];while(_0x19c3b5!==_0x2c8477){const _0x4eea53=a181_0x429cd3[_0x58d3ea(0x198)](_0x19c3b5,TDX_CONFIG_FILE);if(existsSync(_0x4eea53))return _0x4eea53;_0x19c3b5=a181_0x429cd3['dirname'](_0x19c3b5);}return null;}export function loadTdxConfig(_0x34d5f7){const _0x3644b3=a181_0x3c8239,_0x56afc8=readFileSync(_0x34d5f7,'utf-8');let _0x309965;try{_0x309965=JSON[_0x3644b3(0x190)](_0x56afc8);}catch{throw new Error(_0x3644b3(0x184)+_0x34d5f7);}if(!_0x309965||typeof _0x309965!==_0x3644b3(0x182))throw new Error(_0x3644b3(0x18a));const _0x2b1278=_0x309965,_0x4178f3=_0x2b1278[_0x3644b3(0x180)]&&typeof _0x2b1278[_0x3644b3(0x180)]===_0x3644b3(0x19a),_0x5311bb=_0x2b1278[_0x3644b3(0x18f)]&&typeof _0x2b1278[_0x3644b3(0x18f)]==='string';if(!_0x4178f3&&!_0x5311bb)throw new Error(_0x3644b3(0x196));const _0x3616b2={};return _0x4178f3&&(_0x3616b2[_0x3644b3(0x180)]=_0x2b1278['parent_segment']),_0x5311bb&&(_0x3616b2[_0x3644b3(0x18f)]=_0x2b1278[_0x3644b3(0x18f)]),_0x3616b2;}export function findTdxConfig(_0x404c79=process['cwd']()){const _0x365c1d=a181_0x3c8239,_0x39409d=findTdxConfigPath(_0x404c79);if(!_0x39409d)throw new Error(_0x365c1d(0x181));const _0x4cb297=loadTdxConfig(_0x39409d),_0x177549=a181_0x429cd3[_0x365c1d(0x195)](_0x39409d);return{'config':_0x4cb297,'configPath':_0x39409d,'configDir':_0x177549};}export function tryFindTdxConfig(_0x380f01){try{return findTdxConfig(_0x380f01);}catch{return null;}}export function getSegmentRootDir(_0x1b5c2d,_0x1c4827=process[a181_0x3c8239(0x186)]()){const _0xa6aa7b=a181_0x3c8239;return a181_0x429cd3[_0xa6aa7b(0x198)](_0x1c4827,SEGMENTS_DIR,_0x1b5c2d);}export function getTdxConfigPath(_0x51e3d5,_0x2cad75=process[a181_0x3c8239(0x186)]()){return a181_0x429cd3['join'](getSegmentRootDir(_0x51e3d5,_0x2cad75),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x13cc25,_0x259c20){const _0x9075c2=a181_0x3c8239,_0x2b7967=a181_0x429cd3[_0x9075c2(0x188)](_0x13cc25),_0xaaf7a7=a181_0x429cd3[_0x9075c2(0x199)](_0x259c20,_0x2b7967);if(_0xaaf7a7['startsWith']('..'))return'';return _0xaaf7a7;}export function localPathToTdFolderPath(_0xd99272){const _0x25cea4=a181_0x3c8239,_0x3f176f=a181_0x429cd3[_0x25cea4(0x195)](_0xd99272);if(_0x3f176f==='.'||_0x3f176f==='')return'';return _0x3f176f[_0x25cea4(0x18b)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x2eb2aa,_0x47417d){const _0x13b906=a181_0x3c8239;if(!_0x2eb2aa)return _0x47417d;return a181_0x429cd3[_0x13b906(0x198)](_0x47417d,_0x2eb2aa);}export function createTdxConfigContent(_0x2dcd33){const _0xe1d4f3=a181_0x3c8239,_0x5dc4c7={'parent_segment':_0x2dcd33};return JSON[_0xe1d4f3(0x17d)](_0x5dc4c7,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x272464){const _0x14eeff=a181_0x3c8239,_0x18cffa={'engage_workspace':_0x272464};return JSON[_0x14eeff(0x17d)](_0x18cffa,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a181_0x2856db=a181_0x34ab;(function(_0x40e8c7,_0xf23b65){const _0x3bc839=a181_0x34ab,_0x3914b9=_0x40e8c7();while(!![]){try{const _0x1ed9bb=parseInt(_0x3bc839(0x1e8))/0x1+parseInt(_0x3bc839(0x1ee))/0x2+-parseInt(_0x3bc839(0x1c2))/0x3*(parseInt(_0x3bc839(0x1d2))/0x4)+parseInt(_0x3bc839(0x1dd))/0x5*(parseInt(_0x3bc839(0x1df))/0x6)+parseInt(_0x3bc839(0x1de))/0x7*(parseInt(_0x3bc839(0x1c6))/0x8)+-parseInt(_0x3bc839(0x1e9))/0x9*(-parseInt(_0x3bc839(0x1dc))/0xa)+parseInt(_0x3bc839(0x1e4))/0xb;if(_0x1ed9bb===_0xf23b65)break;else _0x3914b9['push'](_0x3914b9['shift']());}catch(_0xff3872){_0x3914b9['push'](_0x3914b9['shift']());}}}(a181_0x575c,0xf2686));import{z}from'zod';export const ScheduleTypeSchema=z[a181_0x2856db(0x1eb)]([a181_0x2856db(0x1e7),a181_0x2856db(0x1e2),'daily',a181_0x2856db(0x1d1),a181_0x2856db(0x1c1),a181_0x2856db(0x1d5),a181_0x2856db(0x1c4)]);export const RepeatUnitSchema=z[a181_0x2856db(0x1eb)]([a181_0x2856db(0x1e3),a181_0x2856db(0x1cb),a181_0x2856db(0x1d8),'week',a181_0x2856db(0x1cf),'once','none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a181_0x2856db(0x1cd)](),'repeat_frequency':z[a181_0x2856db(0x1c9)]()['optional'](),'repeat_sub_frequency':z['array'](z['number']())['optional'](),'start_at':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1ed)]()['optional'](),'end_on':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1ed)]()[a181_0x2856db(0x1cd)](),'timezone':z[a181_0x2856db(0x1d4)]()['optional']()});export const NotificationDefSchema=z[a181_0x2856db(0x1e5)]({'notify_on':z[a181_0x2856db(0x1d3)](z['enum']([a181_0x2856db(0x1d6),'onFailure']))[a181_0x2856db(0x1cd)](),'email_recipients':z[a181_0x2856db(0x1d3)](z[a181_0x2856db(0x1d4)]())[a181_0x2856db(0x1cd)]()});function a181_0x34ab(_0x5337a2,_0x3238d0){_0x5337a2=_0x5337a2-0x1c0;const _0x575c65=a181_0x575c();let _0x34ab91=_0x575c65[_0x5337a2];return _0x34ab91;}export const ActivationColumnDefSchema=z[a181_0x2856db(0x1cc)]([z['string'](),z[a181_0x2856db(0x1e5)]({'name':z['string'](),'type':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1cd)](),'visibility':z[a181_0x2856db(0x1eb)]([a181_0x2856db(0x1ce),a181_0x2856db(0x1db)])[a181_0x2856db(0x1cd)]()})]);export const ActivationBehaviorDefSchema=z[a181_0x2856db(0x1e5)]({'columns':z[a181_0x2856db(0x1d3)](ActivationColumnDefSchema)[a181_0x2856db(0x1cd)](),'behavior_table':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1cd)](),'join_row':z[a181_0x2856db(0x1c9)]()[a181_0x2856db(0x1ed)]()[a181_0x2856db(0x1cd)](),'join_strategy':z[a181_0x2856db(0x1eb)]([a181_0x2856db(0x1c5),a181_0x2856db(0x1e0),a181_0x2856db(0x1c8),a181_0x2856db(0x1da)])[a181_0x2856db(0x1cd)](),'formatting':z[a181_0x2856db(0x1eb)](['rows',a181_0x2856db(0x1c0)])['optional'](),'order_by':z[a181_0x2856db(0x1d3)](z['object']({'key':z[a181_0x2856db(0x1d4)](),'order':z[a181_0x2856db(0x1eb)]([a181_0x2856db(0x1c7),'descending'])}))['optional']()});export const ActivationBehaviorsDefSchema=z['array'](ActivationBehaviorDefSchema)['max'](0x4);export const ActivationDefSchema=z[a181_0x2856db(0x1e5)]({'name':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1d9)](0x1,a181_0x2856db(0x1e1)),'description':z['string']()[a181_0x2856db(0x1cd)](),'connection':z['string']()[a181_0x2856db(0x1d9)](0x1,a181_0x2856db(0x1c3)),'all_columns':z[a181_0x2856db(0x1ca)]()[a181_0x2856db(0x1cd)](),'columns':z['array'](ActivationColumnDefSchema)[a181_0x2856db(0x1cd)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a181_0x2856db(0x1cd)](),'connector_config':z['record'](z[a181_0x2856db(0x1d4)](),z[a181_0x2856db(0x1ec)]())[a181_0x2856db(0x1cd)](),'activation_template_id':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1ed)]()[a181_0x2856db(0x1cd)](),'behavior':ActivationBehaviorDefSchema[a181_0x2856db(0x1ed)]()[a181_0x2856db(0x1cd)](),'behaviors':ActivationBehaviorsDefSchema[a181_0x2856db(0x1cd)](),'run_after_journey_refresh':z[a181_0x2856db(0x1ca)]()[a181_0x2856db(0x1cd)](),'nested_workflow_project_name':z[a181_0x2856db(0x1d4)]()[a181_0x2856db(0x1cd)](),'nested_workflow_name':z[a181_0x2856db(0x1d4)]()['optional'](),'lock_enabled':z[a181_0x2856db(0x1ca)]()[a181_0x2856db(0x1cd)]()})['superRefine']((_0x31744c,_0x41c9e5)=>{const _0x1f0f60=a181_0x2856db;_0x31744c[_0x1f0f60(0x1e6)]!=null&&_0x31744c['behaviors']!=null&&_0x41c9e5[_0x1f0f60(0x1d0)]({'code':_0x1f0f60(0x1d7),'message':_0x1f0f60(0x1ea),'path':[_0x1f0f60(0x1e6)]});});function a181_0x575c(){const _0x54fabe=['Top-N','masked','1740llUJcA','30gyHsQW','7jjzWOU','36012shEmxM','First','Activation\x20name\x20is\x20required','hourly','minute','7973174ZuMboO','object','behavior','none','105484zofxTp','16101NwZmyM','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','enum','unknown','nullable','186370vBCtQZ','cols','monthly','309TkFRJx','Connection\x20name\x20is\x20required','minutes_interval','All','8593456tKDRbM','ascending','Last','number','boolean','hour','union','optional','clear','month','addIssue','weekly','52508uVtHoe','array','string','cron','onSuccess','custom','day','min'];a181_0x575c=function(){return _0x54fabe;};return a181_0x575c();}
1
+ const a182_0x5d16ea=a182_0x3146;(function(_0x1043d8,_0xdeeeb){const _0x112dde=a182_0x3146,_0xe8f630=_0x1043d8();while(!![]){try{const _0x553fde=-parseInt(_0x112dde(0x84))/0x1*(parseInt(_0x112dde(0x8f))/0x2)+-parseInt(_0x112dde(0x97))/0x3*(-parseInt(_0x112dde(0x8c))/0x4)+-parseInt(_0x112dde(0x7b))/0x5*(parseInt(_0x112dde(0x7e))/0x6)+parseInt(_0x112dde(0x71))/0x7+-parseInt(_0x112dde(0x78))/0x8*(parseInt(_0x112dde(0x7f))/0x9)+parseInt(_0x112dde(0x72))/0xa+-parseInt(_0x112dde(0x7c))/0xb*(parseInt(_0x112dde(0x6b))/0xc);if(_0x553fde===_0xdeeeb)break;else _0xe8f630['push'](_0xe8f630['shift']());}catch(_0x3b93b5){_0xe8f630['push'](_0xe8f630['shift']());}}}(a182_0x3590,0xde971));import{z}from'zod';export const ScheduleTypeSchema=z[a182_0x5d16ea(0x69)]([a182_0x5d16ea(0x66),a182_0x5d16ea(0x70),a182_0x5d16ea(0x67),a182_0x5d16ea(0x91),a182_0x5d16ea(0x6c),a182_0x5d16ea(0x76),a182_0x5d16ea(0x8d)]);function a182_0x3590(){const _0x3c456c=['number','max','10Jsbzjs','11EwaStd','unknown','1405686wdJVBT','351UVVZYr','record','addIssue','union','min','320zKyihU','onFailure','hour','Top-N','behaviors','day','behavior','Last','12wgfruW','minutes_interval','descending','9992kvQRQX','Use\x20either\x20`behavior`\x20or\x20`behaviors`,\x20not\x20both\x20(prefer\x20`behaviors`).','weekly','All','Activation\x20name\x20is\x20required','boolean','superRefine','object','1296714JBrzSs','Connection\x20name\x20is\x20required','ascending','rows','none','daily','clear','enum','month','3253872ylKclM','monthly','First','optional','cols','hourly','6617373phYyzl','14894130wgiHEP','array','week','string','cron','nullable','98728kkCreZ'];a182_0x3590=function(){return _0x3c456c;};return a182_0x3590();}export const RepeatUnitSchema=z[a182_0x5d16ea(0x69)](['minute',a182_0x5d16ea(0x86),a182_0x5d16ea(0x89),a182_0x5d16ea(0x74),a182_0x5d16ea(0x6a),'once',a182_0x5d16ea(0x66)]);export const ScheduleDefSchema=z[a182_0x5d16ea(0x96)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a182_0x5d16ea(0x79)]()[a182_0x5d16ea(0x6e)](),'repeat_sub_frequency':z[a182_0x5d16ea(0x73)](z[a182_0x5d16ea(0x79)]())[a182_0x5d16ea(0x6e)](),'start_at':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x77)]()['optional'](),'end_on':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x77)]()['optional'](),'timezone':z[a182_0x5d16ea(0x75)]()['optional']()});export const NotificationDefSchema=z[a182_0x5d16ea(0x96)]({'notify_on':z[a182_0x5d16ea(0x73)](z['enum'](['onSuccess',a182_0x5d16ea(0x85)]))[a182_0x5d16ea(0x6e)](),'email_recipients':z[a182_0x5d16ea(0x73)](z[a182_0x5d16ea(0x75)]())[a182_0x5d16ea(0x6e)]()});export const ActivationColumnDefSchema=z[a182_0x5d16ea(0x82)]([z[a182_0x5d16ea(0x75)](),z[a182_0x5d16ea(0x96)]({'name':z['string'](),'type':z['string']()['optional'](),'visibility':z[a182_0x5d16ea(0x69)]([a182_0x5d16ea(0x68),'masked'])[a182_0x5d16ea(0x6e)]()})]);export const ActivationBehaviorDefSchema=z[a182_0x5d16ea(0x96)]({'columns':z[a182_0x5d16ea(0x73)](ActivationColumnDefSchema)['optional'](),'behavior_table':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x6e)](),'join_row':z['number']()[a182_0x5d16ea(0x77)]()['optional'](),'join_strategy':z[a182_0x5d16ea(0x69)]([a182_0x5d16ea(0x92),a182_0x5d16ea(0x6d),a182_0x5d16ea(0x8b),a182_0x5d16ea(0x87)])[a182_0x5d16ea(0x6e)](),'formatting':z[a182_0x5d16ea(0x69)]([a182_0x5d16ea(0x9a),a182_0x5d16ea(0x6f)])['optional'](),'order_by':z[a182_0x5d16ea(0x73)](z[a182_0x5d16ea(0x96)]({'key':z[a182_0x5d16ea(0x75)](),'order':z['enum']([a182_0x5d16ea(0x99),a182_0x5d16ea(0x8e)])}))['optional']()});export const ActivationBehaviorsDefSchema=z[a182_0x5d16ea(0x73)](ActivationBehaviorDefSchema)[a182_0x5d16ea(0x7a)](0x4);function a182_0x3146(_0x36d9fa,_0x51420f){_0x36d9fa=_0x36d9fa-0x66;const _0x3590a0=a182_0x3590();let _0x314616=_0x3590a0[_0x36d9fa];return _0x314616;}export const ActivationDefSchema=z[a182_0x5d16ea(0x96)]({'name':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x83)](0x1,a182_0x5d16ea(0x93)),'description':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x6e)](),'connection':z['string']()[a182_0x5d16ea(0x83)](0x1,a182_0x5d16ea(0x98)),'all_columns':z['boolean']()[a182_0x5d16ea(0x6e)](),'columns':z[a182_0x5d16ea(0x73)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a182_0x5d16ea(0x6e)](),'notification':NotificationDefSchema[a182_0x5d16ea(0x6e)](),'connector_config':z[a182_0x5d16ea(0x80)](z['string'](),z[a182_0x5d16ea(0x7d)]())[a182_0x5d16ea(0x6e)](),'activation_template_id':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x77)]()[a182_0x5d16ea(0x6e)](),'behavior':ActivationBehaviorDefSchema[a182_0x5d16ea(0x77)]()[a182_0x5d16ea(0x6e)](),'behaviors':ActivationBehaviorsDefSchema[a182_0x5d16ea(0x6e)](),'run_after_journey_refresh':z[a182_0x5d16ea(0x94)]()[a182_0x5d16ea(0x6e)](),'nested_workflow_project_name':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x6e)](),'nested_workflow_name':z[a182_0x5d16ea(0x75)]()[a182_0x5d16ea(0x6e)](),'lock_enabled':z[a182_0x5d16ea(0x94)]()['optional']()})[a182_0x5d16ea(0x95)]((_0x2b0027,_0x2d8c50)=>{const _0x47f2f3=a182_0x5d16ea;_0x2b0027[_0x47f2f3(0x8a)]!=null&&_0x2b0027[_0x47f2f3(0x88)]!=null&&_0x2d8c50[_0x47f2f3(0x81)]({'code':'custom','message':_0x47f2f3(0x90),'path':['behavior']});});
@@ -1 +1 @@
1
- function a182_0x5b9d(_0x5041e3,_0x11cfca){_0x5041e3=_0x5041e3-0x1a4;var _0x225e3c=a182_0x225e();var _0x5b9dec=_0x225e3c[_0x5041e3];return _0x5b9dec;}(function(_0x266458,_0x16b1e3){var _0x3a59db=a182_0x5b9d,_0x3f6018=_0x266458();while(!![]){try{var _0x136384=parseInt(_0x3a59db(0x1a7))/0x1+parseInt(_0x3a59db(0x1ab))/0x2+parseInt(_0x3a59db(0x1a9))/0x3*(parseInt(_0x3a59db(0x1ac))/0x4)+-parseInt(_0x3a59db(0x1aa))/0x5+parseInt(_0x3a59db(0x1a6))/0x6*(parseInt(_0x3a59db(0x1a5))/0x7)+-parseInt(_0x3a59db(0x1a4))/0x8+-parseInt(_0x3a59db(0x1a8))/0x9;if(_0x136384===_0x16b1e3)break;else _0x3f6018['push'](_0x3f6018['shift']());}catch(_0x1a01bc){_0x3f6018['push'](_0x3f6018['shift']());}}}(a182_0x225e,0xcf69b));function a182_0x225e(){var _0xfce174=['263695OISqkc','4929480KcxYNz','265602EzhcvF','8374715cmoiAJ','394400wmpfFp','52QyMMsj','1365984Vfogat','11417959LpviJj','6CMkvHc'];a182_0x225e=function(){return _0xfce174;};return a182_0x225e();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a183_0x246e(_0x29b16a,_0x28222b){_0x29b16a=_0x29b16a-0x178;var _0x48671c=a183_0x4867();var _0x246e5c=_0x48671c[_0x29b16a];return _0x246e5c;}(function(_0xbb7788,_0x5cbb2e){var _0x184b9a=a183_0x246e,_0x2b0216=_0xbb7788();while(!![]){try{var _0xb06237=-parseInt(_0x184b9a(0x17d))/0x1+parseInt(_0x184b9a(0x179))/0x2+parseInt(_0x184b9a(0x180))/0x3+-parseInt(_0x184b9a(0x17e))/0x4+-parseInt(_0x184b9a(0x17c))/0x5*(-parseInt(_0x184b9a(0x17f))/0x6)+parseInt(_0x184b9a(0x178))/0x7*(-parseInt(_0x184b9a(0x17a))/0x8)+-parseInt(_0x184b9a(0x17b))/0x9;if(_0xb06237===_0x5cbb2e)break;else _0x2b0216['push'](_0x2b0216['shift']());}catch(_0xed55dc){_0x2b0216['push'](_0x2b0216['shift']());}}}(a183_0x4867,0x1e8e5));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a183_0x4867(){var _0x239b84=['10DTgkwr','105097VuDfJQ','66808jNhhJN','194772qhbxdg','720468noWrHy','378EmOQkz','164046cuOvxP','11784LKMfJB','545445qXSQWQ'];a183_0x4867=function(){return _0x239b84;};return a183_0x4867();}
@@ -1 +1 @@
1
- const a183_0x3b43c7=a183_0x4ef7;(function(_0x4a487b,_0x4c9d54){const _0x285fb2=a183_0x4ef7,_0x5c0b33=_0x4a487b();while(!![]){try{const _0x22765c=-parseInt(_0x285fb2(0xa3))/0x1+-parseInt(_0x285fb2(0x81))/0x2+parseInt(_0x285fb2(0x85))/0x3*(parseInt(_0x285fb2(0x97))/0x4)+parseInt(_0x285fb2(0x9d))/0x5*(parseInt(_0x285fb2(0xa2))/0x6)+parseInt(_0x285fb2(0x9a))/0x7*(parseInt(_0x285fb2(0x84))/0x8)+parseInt(_0x285fb2(0x7b))/0x9*(parseInt(_0x285fb2(0x9b))/0xa)+-parseInt(_0x285fb2(0x98))/0xb*(parseInt(_0x285fb2(0x83))/0xc);if(_0x22765c===_0x4c9d54)break;else _0x5c0b33['push'](_0x5c0b33['shift']());}catch(_0x57d476){_0x5c0b33['push'](_0x5c0b33['shift']());}}}(a183_0x5e94,0xe3ddf));function a183_0x5e94(){const _0x18f151=['draft','stages','type','number','min','object','length','reentry_always','optional','filter','ab_test','Journey\x20name\x20is\x20required','no_reentry','reentry_unless_goal_achieved','91844mGqXUQ','546381EjNysk','boolean','425299uFDwaU','483260MjpZPh','string','20215CkPxXv','passthrough','merge','refine','simulation','1248igyuXA','693524KrTGrI','decision_point','array','versions','journeys','activation','end','297wDtrUw','wait','enum','week','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','discriminatedUnion','2600264yOveFQ','jump','276fjkKHA','200zausmn','15gDXniv','record','isArray','literal'];a183_0x5e94=function(){return _0x18f151;};return a183_0x5e94();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a183_0x3b43c7(0x7d)]([a183_0x3b43c7(0x89),a183_0x3b43c7(0xa1),'launched']);export const ReentryModeTypeSchema=z[a183_0x3b43c7(0x7d)]([a183_0x3b43c7(0x95),a183_0x3b43c7(0x96),a183_0x3b43c7(0x90)]);export const WaitUnitTypeSchema=z[a183_0x3b43c7(0x7d)](['day',a183_0x3b43c7(0x7e)]);export const StepTypeValueSchema=z[a183_0x3b43c7(0x7d)]([a183_0x3b43c7(0x7c),a183_0x3b43c7(0x79),a183_0x3b43c7(0xa4),a183_0x3b43c7(0x93),a183_0x3b43c7(0x9f),a183_0x3b43c7(0x82),a183_0x3b43c7(0x7a)]);export const EmbeddedSegmentDefSchema=z[a183_0x3b43c7(0x8e)]({'description':z[a183_0x3b43c7(0x9c)]()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a183_0x3b43c7(0x8e)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)]()});export const CriteriaDefSchema=z[a183_0x3b43c7(0x8e)]({'name':z[a183_0x3b43c7(0x9c)](),'description':z['string']()[a183_0x3b43c7(0x91)](),'segment':z[a183_0x3b43c7(0x9c)](),'target':JumpTargetDefSchema['optional']()});function a183_0x4ef7(_0x1198ba,_0xf24ea6){_0x1198ba=_0x1198ba-0x76;const _0x5e946d=a183_0x5e94();let _0x4ef757=_0x5e946d[_0x1198ba];return _0x4ef757;}const WaitConditionTimeoutDefSchema=z[a183_0x3b43c7(0x8e)]({'duration':z[a183_0x3b43c7(0x8c)](),'unit':WaitUnitTypeSchema,'next':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)]()}),WaitConditionDefSchema=z[a183_0x3b43c7(0x8e)]({'segment':z[a183_0x3b43c7(0x9c)](),'next':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'timeout':WaitConditionTimeoutDefSchema[a183_0x3b43c7(0x91)]()}),WaitStepParamsDefSchema=z['object']({'duration':z['number']()[a183_0x3b43c7(0x91)](),'unit':WaitUnitTypeSchema[a183_0x3b43c7(0x91)](),'wait_until':z['string']()[a183_0x3b43c7(0x91)](),'condition':WaitConditionDefSchema[a183_0x3b43c7(0x91)](),'days_of_week':z[a183_0x3b43c7(0x76)](z[a183_0x3b43c7(0x9c)]())[a183_0x3b43c7(0x91)]()}),StepBaseFields={'name':z[a183_0x3b43c7(0x9c)](),'uuid':z[a183_0x3b43c7(0x9c)]()['optional'](),'next':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)]()},WaitStepDefSchema=z[a183_0x3b43c7(0x8e)]({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)](a183_0x3b43c7(0x7c)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a183_0x3b43c7(0x9c)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)](a183_0x3b43c7(0x79)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a183_0x3b43c7(0x8e)]({'name':z[a183_0x3b43c7(0x9c)](),'segment':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'segment_id':z['string']()['optional'](),'excluded':z[a183_0x3b43c7(0x99)]()['optional'](),'next':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)]()}),DecisionPointStepParamsDefSchema=z[a183_0x3b43c7(0x8e)]({'branches':z[a183_0x3b43c7(0x76)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a183_0x3b43c7(0x8e)]({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z['string']()[a183_0x3b43c7(0x91)](),'name':z['string'](),'percentage':z[a183_0x3b43c7(0x8c)](),'next':z['string']()[a183_0x3b43c7(0x91)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a183_0x3b43c7(0x76)](AbTestVariantDefSchema),'unique_id':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'customized_split':z[a183_0x3b43c7(0x99)]()[a183_0x3b43c7(0x91)]()}),AbTestStepDefSchema=z[a183_0x3b43c7(0x8e)]({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a183_0x3b43c7(0x8e)]({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)](a183_0x3b43c7(0x9f))}),JumpStepParamsDefSchema=z[a183_0x3b43c7(0x8e)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a183_0x3b43c7(0x8e)]({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a183_0x3b43c7(0x88)]('end')})[a183_0x3b43c7(0x9e)]();export const StepDefSchema=z[a183_0x3b43c7(0x80)](a183_0x3b43c7(0x8b),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z['string'](),'description':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'id':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'entry_criteria':CriteriaDefSchema[a183_0x3b43c7(0x91)](),'exit_criteria':z[a183_0x3b43c7(0x76)](CriteriaDefSchema)[a183_0x3b43c7(0x91)](),'milestone':CriteriaDefSchema[a183_0x3b43c7(0x91)](),'root_step':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'steps':z[a183_0x3b43c7(0x76)](StepDefSchema)[a183_0x3b43c7(0x91)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'version':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a183_0x3b43c7(0x99)]()[a183_0x3b43c7(0x91)](),'stages':z[a183_0x3b43c7(0x76)](StageDefSchema),'id':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'version_number':z[a183_0x3b43c7(0x8c)]()[a183_0x3b43c7(0x91)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a183_0x3b43c7(0x91)]()});export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z['literal']('journey'),'name':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x8d)](0x1,a183_0x3b43c7(0x94)),'description':z['string']()['optional'](),'bundle_id':z[a183_0x3b43c7(0x9c)]()['optional'](),'bundle_name':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'folder_id':z['string']()[a183_0x3b43c7(0x91)](),'reentry':ReentryModeTypeSchema[a183_0x3b43c7(0x91)](),'allow_reentry':z[a183_0x3b43c7(0x99)]()[a183_0x3b43c7(0x91)](),'goal':CriteriaDefSchema[a183_0x3b43c7(0x91)](),'id':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'version':z[a183_0x3b43c7(0x9c)]()[a183_0x3b43c7(0x91)](),'version_number':z[a183_0x3b43c7(0x8c)]()[a183_0x3b43c7(0x91)](),'stages':z[a183_0x3b43c7(0x76)](StageDefSchema)[a183_0x3b43c7(0x91)](),'versions':z[a183_0x3b43c7(0x76)](JourneyEntryDefSchema)[a183_0x3b43c7(0x91)](),'journeys':z['array'](JourneyEntryDefSchema)[a183_0x3b43c7(0x91)](),'segments':z['record'](z[a183_0x3b43c7(0x9c)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a183_0x3b43c7(0x86)](z[a183_0x3b43c7(0x9c)](),ActivationDefSchema)[a183_0x3b43c7(0x91)]()})[a183_0x3b43c7(0xa0)](_0x10df20=>{const _0x48956d=a183_0x3b43c7,_0x3acad6=[_0x10df20[_0x48956d(0x78)],_0x10df20[_0x48956d(0x8a)],_0x10df20[_0x48956d(0x77)]][_0x48956d(0x92)](_0x1d560b=>Array[_0x48956d(0x87)](_0x1d560b)&&_0x1d560b[_0x48956d(0x8f)]>0x0)[_0x48956d(0x8f)];return _0x3acad6===0x1;},{'message':a183_0x3b43c7(0x7f)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ function a184_0x37df(){const _0x8520e6=['enum','end','boolean','filter','ab_test','no_reentry','simulation','9207940BumlMY','draft','116976YPHDEe','journey','literal','551697SkjOqN','decision_point','string','lazy','versions','merge','1754280BIAJjC','min','activation','array','discriminatedUnion','wait','length','reentry_always','335YXxMhl','object','journeys','1436766jdRXHT','30982576fqqkyO','jump','refine','reentry_unless_goal_achieved','5051444JNHPeY','optional','number'];a184_0x37df=function(){return _0x8520e6;};return a184_0x37df();}const a184_0x12f358=a184_0x1ba7;(function(_0x210e6f,_0x5ab98e){const _0x2c1a8f=a184_0x1ba7,_0x414823=_0x210e6f();while(!![]){try{const _0x4f69c3=parseInt(_0x2c1a8f(0x1f2))/0x1+parseInt(_0x2c1a8f(0x1de))/0x2+-parseInt(_0x2c1a8f(0x1d3))/0x3+parseInt(_0x2c1a8f(0x1e3))/0x4+parseInt(_0x2c1a8f(0x1db))/0x5*(parseInt(_0x2c1a8f(0x1ef))/0x6)+parseInt(_0x2c1a8f(0x1ed))/0x7+-parseInt(_0x2c1a8f(0x1df))/0x8;if(_0x4f69c3===_0x5ab98e)break;else _0x414823['push'](_0x414823['shift']());}catch(_0x2c69fb){_0x414823['push'](_0x414823['shift']());}}}(a184_0x37df,0xaa2b3));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a184_0x12f358(0x1e6)]([a184_0x12f358(0x1ee),a184_0x12f358(0x1ec),'launched']);export const ReentryModeTypeSchema=z[a184_0x12f358(0x1e6)]([a184_0x12f358(0x1eb),a184_0x12f358(0x1e2),a184_0x12f358(0x1da)]);export const WaitUnitTypeSchema=z[a184_0x12f358(0x1e6)](['day','week']);export const StepTypeValueSchema=z[a184_0x12f358(0x1e6)]([a184_0x12f358(0x1d8),a184_0x12f358(0x1d5),'decision_point',a184_0x12f358(0x1ea),a184_0x12f358(0x1d2),a184_0x12f358(0x1e0),'end']);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a184_0x12f358(0x1dc)]({'journey':z['string'](),'stage':z[a184_0x12f358(0x1f4)](),'bundle_id':z['string']()[a184_0x12f358(0x1e4)]()});export const CriteriaDefSchema=z[a184_0x12f358(0x1dc)]({'name':z[a184_0x12f358(0x1f4)](),'description':z['string']()['optional'](),'segment':z[a184_0x12f358(0x1f4)](),'target':JumpTargetDefSchema[a184_0x12f358(0x1e4)]()});function a184_0x1ba7(_0x149920,_0x56909c){_0x149920=_0x149920-0x1d0;const _0x37df39=a184_0x37df();let _0x1ba73f=_0x37df39[_0x149920];return _0x1ba73f;}const WaitConditionTimeoutDefSchema=z[a184_0x12f358(0x1dc)]({'duration':z[a184_0x12f358(0x1e5)](),'unit':WaitUnitTypeSchema,'next':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)]()}),WaitConditionDefSchema=z[a184_0x12f358(0x1dc)]({'segment':z['string'](),'next':z['string']()[a184_0x12f358(0x1e4)](),'timeout':WaitConditionTimeoutDefSchema[a184_0x12f358(0x1e4)]()}),WaitStepParamsDefSchema=z[a184_0x12f358(0x1dc)]({'duration':z[a184_0x12f358(0x1e5)]()[a184_0x12f358(0x1e4)](),'unit':WaitUnitTypeSchema[a184_0x12f358(0x1e4)](),'wait_until':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'condition':WaitConditionDefSchema[a184_0x12f358(0x1e4)](),'days_of_week':z[a184_0x12f358(0x1d6)](z[a184_0x12f358(0x1f4)]())[a184_0x12f358(0x1e4)]()}),StepBaseFields={'name':z[a184_0x12f358(0x1f4)](),'uuid':z[a184_0x12f358(0x1f4)]()['optional'](),'next':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a184_0x12f358(0x1f1)](a184_0x12f358(0x1d8)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a184_0x12f358(0x1dc)]({'activation':z['string']()}),ActivationStepDefSchema=z[a184_0x12f358(0x1dc)]({...StepBaseFields,'type':z['literal'](a184_0x12f358(0x1d5)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a184_0x12f358(0x1dc)]({'name':z['string'](),'segment':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'segment_id':z['string']()['optional'](),'excluded':z[a184_0x12f358(0x1e8)]()[a184_0x12f358(0x1e4)](),'next':z[a184_0x12f358(0x1f4)]()['optional']()}),DecisionPointStepParamsDefSchema=z[a184_0x12f358(0x1dc)]({'branches':z[a184_0x12f358(0x1d6)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a184_0x12f358(0x1dc)]({...StepBaseFields,'type':z[a184_0x12f358(0x1f1)](a184_0x12f358(0x1f3)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a184_0x12f358(0x1dc)]({'id':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'name':z[a184_0x12f358(0x1f4)](),'percentage':z['number'](),'next':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a184_0x12f358(0x1d6)](AbTestVariantDefSchema),'unique_id':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'customized_split':z[a184_0x12f358(0x1e8)]()['optional']()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a184_0x12f358(0x1ea)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a184_0x12f358(0x1f1)](a184_0x12f358(0x1d2))}),JumpStepParamsDefSchema=z[a184_0x12f358(0x1dc)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a184_0x12f358(0x1dc)]({...StepBaseFields,'type':z[a184_0x12f358(0x1f1)](a184_0x12f358(0x1e0)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a184_0x12f358(0x1dc)]({...StepBaseFields,'type':z[a184_0x12f358(0x1f1)](a184_0x12f358(0x1e7))})['passthrough']();export const StepDefSchema=z[a184_0x12f358(0x1d7)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a184_0x12f358(0x1dc)]({'name':z['string'](),'description':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'id':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'entry_criteria':CriteriaDefSchema[a184_0x12f358(0x1e4)](),'exit_criteria':z[a184_0x12f358(0x1d6)](CriteriaDefSchema)[a184_0x12f358(0x1e4)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'steps':z[a184_0x12f358(0x1d6)](StepDefSchema)['optional']()});export const JourneyEntryDefSchema=z['object']({'name':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'version':z['string']()[a184_0x12f358(0x1e4)](),'state':JourneyStateTypeSchema[a184_0x12f358(0x1e4)](),'latest':z[a184_0x12f358(0x1e8)]()[a184_0x12f358(0x1e4)](),'stages':z[a184_0x12f358(0x1d6)](StageDefSchema),'id':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'version_number':z['number']()[a184_0x12f358(0x1e4)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a184_0x12f358(0x1e4)]()});export const JourneyDefSchema=z[a184_0x12f358(0x1d0)](()=>z[a184_0x12f358(0x1dc)]({'type':z[a184_0x12f358(0x1f1)](a184_0x12f358(0x1f0)),'name':z['string']()[a184_0x12f358(0x1d4)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a184_0x12f358(0x1f4)]()['optional'](),'bundle_id':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'bundle_name':z[a184_0x12f358(0x1f4)]()['optional'](),'folder_id':z['string']()[a184_0x12f358(0x1e4)](),'reentry':ReentryModeTypeSchema[a184_0x12f358(0x1e4)](),'allow_reentry':z[a184_0x12f358(0x1e8)]()[a184_0x12f358(0x1e4)](),'goal':CriteriaDefSchema[a184_0x12f358(0x1e4)](),'id':z[a184_0x12f358(0x1f4)]()['optional'](),'version':z[a184_0x12f358(0x1f4)]()[a184_0x12f358(0x1e4)](),'version_number':z[a184_0x12f358(0x1e5)]()['optional'](),'stages':z['array'](StageDefSchema)[a184_0x12f358(0x1e4)](),'versions':z[a184_0x12f358(0x1d6)](JourneyEntryDefSchema)[a184_0x12f358(0x1e4)](),'journeys':z[a184_0x12f358(0x1d6)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z[a184_0x12f358(0x1f4)](),EmbeddedSegmentDefSchema)[a184_0x12f358(0x1e4)](),'activations':z['record'](z[a184_0x12f358(0x1f4)](),ActivationDefSchema)[a184_0x12f358(0x1e4)]()})[a184_0x12f358(0x1e1)](_0x105bdb=>{const _0x5b8cde=a184_0x12f358,_0xe31b90=[_0x105bdb[_0x5b8cde(0x1dd)],_0x105bdb['stages'],_0x105bdb[_0x5b8cde(0x1d1)]][_0x5b8cde(0x1e9)](_0x9cd1a4=>Array['isArray'](_0x9cd1a4)&&_0x9cd1a4[_0x5b8cde(0x1d9)]>0x0)[_0x5b8cde(0x1d9)];return _0xe31b90===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x550b93,_0x2205bc){var _0x58c9b9=a185_0x3824,_0x2cbc8e=_0x550b93();while(!![]){try{var _0x49424d=-parseInt(_0x58c9b9(0x9b))/0x1+parseInt(_0x58c9b9(0x95))/0x2*(-parseInt(_0x58c9b9(0x96))/0x3)+parseInt(_0x58c9b9(0x99))/0x4*(-parseInt(_0x58c9b9(0x9d))/0x5)+parseInt(_0x58c9b9(0x9a))/0x6+parseInt(_0x58c9b9(0x97))/0x7+-parseInt(_0x58c9b9(0x9c))/0x8+parseInt(_0x58c9b9(0x98))/0x9;if(_0x49424d===_0x2205bc)break;else _0x2cbc8e['push'](_0x2cbc8e['shift']());}catch(_0x5da343){_0x2cbc8e['push'](_0x2cbc8e['shift']());}}}(a185_0xc864,0x923a1));function a185_0x3824(_0x41b7c9,_0x19e886){_0x41b7c9=_0x41b7c9-0x95;var _0xc86467=a185_0xc864();var _0x382470=_0xc86467[_0x41b7c9];return _0x382470;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a185_0xc864(){var _0x4afa7a=['7288496DbhPiO','1785LwdRLE','96962RagKyu','36AvbjMq','264964ygzeWm','30566124JyEIzJ','12856KWZYSP','158706wCYSCW','221362XhipgV'];a185_0xc864=function(){return _0x4afa7a;};return a185_0xc864();}
1
+ function a186_0x2b39(){var _0x4fce62=['10aWNCxs','572300nViEVd','4sQMHtJ','1205364TOOLuw','302064LjJqxn','5652966JLUbKj','2860GXQlde','14544jniyDi','280UmemVr','1364076CCaIwh','40607rIPWWp'];a186_0x2b39=function(){return _0x4fce62;};return a186_0x2b39();}(function(_0x3cbfb1,_0x4c64c3){var _0x2bfbf0=a186_0x10bd,_0x1acfbc=_0x3cbfb1();while(!![]){try{var _0x1607fe=parseInt(_0x2bfbf0(0xe0))/0x1+parseInt(_0x2bfbf0(0xdd))/0x2+-parseInt(_0x2bfbf0(0xdf))/0x3*(-parseInt(_0x2bfbf0(0xde))/0x4)+parseInt(_0x2bfbf0(0xdc))/0x5*(parseInt(_0x2bfbf0(0xda))/0x6)+parseInt(_0x2bfbf0(0xdb))/0x7*(-parseInt(_0x2bfbf0(0xd9))/0x8)+-parseInt(_0x2bfbf0(0xd8))/0x9*(parseInt(_0x2bfbf0(0xd7))/0xa)+-parseInt(_0x2bfbf0(0xd6))/0xb;if(_0x1607fe===_0x4c64c3)break;else _0x1acfbc['push'](_0x1acfbc['shift']());}catch(_0x440796){_0x1acfbc['push'](_0x1acfbc['shift']());}}}(a186_0x2b39,0x40d69));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a186_0x10bd(_0x198ce7,_0x42cee0){_0x198ce7=_0x198ce7-0xd6;var _0x2b39e7=a186_0x2b39();var _0x10bd6c=_0x2b39e7[_0x198ce7];return _0x10bd6c;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a186_0x3ca296=a186_0x1a64;(function(_0x56fc46,_0x12daf9){const _0x1ec5df=a186_0x1a64,_0x35b095=_0x56fc46();while(!![]){try{const _0x1c213f=parseInt(_0x1ec5df(0x1ea))/0x1+parseInt(_0x1ec5df(0x1ba))/0x2+parseInt(_0x1ec5df(0x1e5))/0x3+-parseInt(_0x1ec5df(0x1c5))/0x4*(-parseInt(_0x1ec5df(0x1a1))/0x5)+parseInt(_0x1ec5df(0x1e0))/0x6*(-parseInt(_0x1ec5df(0x1ce))/0x7)+-parseInt(_0x1ec5df(0x1d9))/0x8*(parseInt(_0x1ec5df(0x1a9))/0x9)+-parseInt(_0x1ec5df(0x19f))/0xa;if(_0x1c213f===_0x12daf9)break;else _0x35b095['push'](_0x35b095['shift']());}catch(_0x4f2d47){_0x35b095['push'](_0x35b095['shift']());}}}(a186_0x59f2,0x1d164));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';function a186_0x59f2(){const _0x81619f=['Regexp','TimeRange','Average','timestamp','addIssue','exclude','Count','1576680UGSAEK','Contain','164155HHEAlr','Composite','unit','string','Less','And','union','Greater','9kwhytX','discriminatedUnion','segment','\x27\x20requires\x20a\x20value','Behavior','TimeWithinNext','array','Segment\x20reference\x20must\x20not\x20be\x20empty','join','minute','superRefine','TimeWithinPast','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','EndWith','week','year','Last','246692CSgctp','duration','record','optional','\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','TimeRange\x20operator\x20requires\x20\x27from\x27','literal','Sum','Equal','boolean','from','24LyGrRX','Segment\x20name\x20is\x20required','number','GreaterEqual','max','Max','LessEqual','CountDistinct','Operator\x20\x27','35SzqPRw','last','IsNull','MISSING_TIME_UNIT','custom','column','Timestamp\x20column\x27s\x20\x27','object','has','min','Column','411440jOdvmq','Value','value','enum','Timestamp\x20column\x20only\x20supports\x20','day','\x20operators\x20(got\x20\x27','172446zlvGSE','lazy','second','First','Between','141798lbMzik','Min','operator','all','type','104345acXNVZ','MISSING_BETWEEN_BOUNDS'];a186_0x59f2=function(){return _0x81619f;};return a186_0x59f2();}export const OperatorTypeSchema=z[a186_0x3ca296(0x1dc)]([a186_0x3ca296(0x1c2),'Greater',a186_0x3ca296(0x1a5),a186_0x3ca296(0x1c8),a186_0x3ca296(0x1cb),'In',a186_0x3ca296(0x1e4),a186_0x3ca296(0x198),a186_0x3ca296(0x1d0),a186_0x3ca296(0x1b4),a186_0x3ca296(0x1ae),a186_0x3ca296(0x1a0),'StartWith',a186_0x3ca296(0x1b6),a186_0x3ca296(0x199)]);export const TimeUnitSchema=z[a186_0x3ca296(0x1dc)]([a186_0x3ca296(0x1e2),a186_0x3ca296(0x1b2),'hour',a186_0x3ca296(0x1de),a186_0x3ca296(0x1b7),'month',a186_0x3ca296(0x1b8)]);export const AggregationTypeSchema=z[a186_0x3ca296(0x1dc)]([a186_0x3ca296(0x19e),a186_0x3ca296(0x1c1),a186_0x3ca296(0x19a),'Min',a186_0x3ca296(0x1ca),a186_0x3ca296(0x1cc),a186_0x3ca296(0x1e3),'Last']);const TemporalValueSchema=z['union']([z[a186_0x3ca296(0x1d5)]({'timestamp':z[a186_0x3ca296(0x1a4)]()}),z['object']({'last':z[a186_0x3ca296(0x1a7)]([z[a186_0x3ca296(0x1c7)](),z[a186_0x3ca296(0x1bc)](z[a186_0x3ca296(0x1a4)](),z[a186_0x3ca296(0x1c7)]())]),'unit':z[a186_0x3ca296(0x1a4)]()})]),OperatorValueSchema=z[a186_0x3ca296(0x1a7)]([z[a186_0x3ca296(0x1a4)](),z[a186_0x3ca296(0x1c7)](),z[a186_0x3ca296(0x1c3)](),TemporalValueSchema,z[a186_0x3ca296(0x1af)](z['union']([z[a186_0x3ca296(0x1a4)](),z['number'](),z[a186_0x3ca296(0x1c3)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a186_0x3ca296(0x1c2),a186_0x3ca296(0x1a8),'GreaterEqual',a186_0x3ca296(0x1a5),a186_0x3ca296(0x1cb),'In',a186_0x3ca296(0x1a0),'StartWith',a186_0x3ca296(0x1b6),'Regexp',a186_0x3ca296(0x1b4),a186_0x3ca296(0x1ae)]),OPERATORS_REQUIRING_UNIT=new Set([a186_0x3ca296(0x1b4),'TimeWithinNext']);export const OperatorDefSchema=z[a186_0x3ca296(0x1d5)]({'type':OperatorTypeSchema,'not':z[a186_0x3ca296(0x1c3)]()[a186_0x3ca296(0x1bd)](),'value':OperatorValueSchema[a186_0x3ca296(0x1bd)](),'min':z[a186_0x3ca296(0x1a7)]([z['number'](),z['string'](),TemporalValueSchema])[a186_0x3ca296(0x1bd)](),'max':z['union']([z[a186_0x3ca296(0x1c7)](),z[a186_0x3ca296(0x1a4)](),TemporalValueSchema])[a186_0x3ca296(0x1bd)](),'unit':TimeUnitSchema[a186_0x3ca296(0x1bd)](),'duration':z[a186_0x3ca296(0x1d5)]({'day':z[a186_0x3ca296(0x1c7)]()['optional'](),'week':z['number']()[a186_0x3ca296(0x1bd)](),'month':z[a186_0x3ca296(0x1c7)]()['optional'](),'year':z[a186_0x3ca296(0x1c7)]()[a186_0x3ca296(0x1bd)](),'hour':z[a186_0x3ca296(0x1c7)]()[a186_0x3ca296(0x1bd)](),'minute':z[a186_0x3ca296(0x1c7)]()['optional'](),'second':z['number']()['optional']()})[a186_0x3ca296(0x1bd)](),'from':z[a186_0x3ca296(0x1d5)]({'last':z[a186_0x3ca296(0x1a7)]([z[a186_0x3ca296(0x1c7)](),z[a186_0x3ca296(0x1a4)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a186_0x3ca296(0x1c3)]()[a186_0x3ca296(0x1bd)]()})[a186_0x3ca296(0x1b3)]((_0x599416,_0x4d812a)=>{const _0x4e6123=a186_0x3ca296;OPERATORS_REQUIRING_VALUE['has'](_0x599416[_0x4e6123(0x1e9)])&&(_0x599416['value']===undefined||_0x599416[_0x4e6123(0x1db)]===null)&&_0x4d812a[_0x4e6123(0x19c)]({'code':_0x4e6123(0x1d2),'message':'Operator\x20\x27'+_0x599416[_0x4e6123(0x1e9)]+_0x4e6123(0x1ac),'path':[_0x4e6123(0x1db)]}),_0x599416['type']==='Between'&&_0x599416[_0x4e6123(0x1d7)]===undefined&&_0x599416['max']===undefined&&_0x4d812a['addIssue']({'code':_0x4e6123(0x1d2),'message':_0x4e6123(0x1b5),'params':{'validationCode':_0x4e6123(0x197)}}),OPERATORS_REQUIRING_UNIT[_0x4e6123(0x1d6)](_0x599416[_0x4e6123(0x1e9)])&&_0x599416[_0x4e6123(0x1db)]!==undefined&&!_0x599416[_0x4e6123(0x1a3)]&&_0x4d812a[_0x4e6123(0x19c)]({'code':_0x4e6123(0x1d2),'message':_0x4e6123(0x1cd)+_0x599416[_0x4e6123(0x1e9)]+'\x27\x20requires\x20a\x20time\x20unit','path':['unit'],'params':{'validationCode':_0x4e6123(0x1d1)}}),_0x599416[_0x4e6123(0x1e9)]===_0x4e6123(0x199)&&(!_0x599416[_0x4e6123(0x1bb)]&&_0x4d812a[_0x4e6123(0x19c)]({'code':_0x4e6123(0x1d2),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x4e6123(0x1bb)]}),!_0x599416['from']&&_0x4d812a['addIssue']({'code':_0x4e6123(0x1d2),'message':_0x4e6123(0x1bf),'path':[_0x4e6123(0x1c4)]}));});export const ArrayMatchingSchema=z[a186_0x3ca296(0x1a7)]([z[a186_0x3ca296(0x1c0)]('any'),z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x1e8)),z[a186_0x3ca296(0x1d5)]({'atLeast':z[a186_0x3ca296(0x1c7)]()}),z['object']({'atMost':z[a186_0x3ca296(0x1c7)]()}),z[a186_0x3ca296(0x1d5)]({'exactly':z[a186_0x3ca296(0x1c7)]()})]);function a186_0x1a64(_0x237386,_0x39049a){_0x237386=_0x237386-0x197;const _0x59f2eb=a186_0x59f2();let _0x1a648f=_0x59f2eb[_0x237386];return _0x1a648f;}export const AggregationDefSchema=z[a186_0x3ca296(0x1aa)](a186_0x3ca296(0x1e9),[z['object']({'type':z['enum']([a186_0x3ca296(0x1c1),a186_0x3ca296(0x1e6),'Max',a186_0x3ca296(0x19a)]),'column':z['string'](),'groupingColumns':z[a186_0x3ca296(0x1af)](z['string']())[a186_0x3ca296(0x1bd)]()}),z['object']({'type':z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x19e)),'groupingColumns':z[a186_0x3ca296(0x1af)](z[a186_0x3ca296(0x1a4)]())[a186_0x3ca296(0x1bd)]()}),z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1c0)]('CountDistinct'),'columns':z[a186_0x3ca296(0x1af)](z['string']())}),z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1dc)]([a186_0x3ca296(0x1e3),a186_0x3ca296(0x1b9)]),'column':z['string'](),'orderColumn':z[a186_0x3ca296(0x1a4)](),'groupingColumns':z[a186_0x3ca296(0x1af)](z[a186_0x3ca296(0x1a4)]())[a186_0x3ca296(0x1bd)]()})]);export const TimeWindowDefSchema=z[a186_0x3ca296(0x1d5)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set([a186_0x3ca296(0x1b4),'TimeWithinNext','TimeRange']),TIMESTAMP_COMPARISON_OPERATORS=new Set([a186_0x3ca296(0x1c2),'Greater',a186_0x3ca296(0x1c8),a186_0x3ca296(0x1a5),a186_0x3ca296(0x1cb),'Between']),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0x1f2c53){const _0x4a9dc3=a186_0x3ca296;return typeof _0x1f2c53===_0x4a9dc3(0x1d5)&&_0x1f2c53!==null&&!Array['isArray'](_0x1f2c53)&&('timestamp'in _0x1f2c53||_0x4a9dc3(0x1cf)in _0x1f2c53);}export const FilterColumnConditionDefSchema=z['object']({'type':z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x1d8)),'column':z[a186_0x3ca296(0x1a4)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a186_0x3ca296(0x1bd)]()})[a186_0x3ca296(0x1b3)]((_0xb19ab,_0xa27eb7)=>{const _0x910198=a186_0x3ca296,_0x5d9155=_0xb19ab[_0x910198(0x1e7)][_0x910198(0x1e9)];if(_0xb19ab[_0x910198(0x1d3)]===_0x910198(0x19b)){if(!TIMESTAMP_OPERATORS[_0x910198(0x1d6)](_0x5d9155)){_0xa27eb7[_0x910198(0x19c)]({'code':_0x910198(0x1d2),'message':_0x910198(0x1dd)+[...TIMESTAMP_OPERATORS][_0x910198(0x1b1)](',\x20')+_0x910198(0x1df)+_0x5d9155+'\x27)','path':['operator',_0x910198(0x1e9)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS['has'](_0x5d9155)){const _0x430467=_0x5d9155===_0x910198(0x1e4)?[_0xb19ab['operator']['min'],_0xb19ab['operator'][_0x910198(0x1c9)]]['every'](_0x3d633a=>_0x3d633a===undefined||isTemporalValueShape(_0x3d633a)):_0xb19ab['operator'][_0x910198(0x1db)]===undefined||isTemporalValueShape(_0xb19ab[_0x910198(0x1e7)][_0x910198(0x1db)]);!_0x430467&&_0xa27eb7[_0x910198(0x19c)]({'code':_0x910198(0x1d2),'message':_0x910198(0x1d4)+_0x5d9155+_0x910198(0x1be),'path':['operator']});}}});export const FilterRuleDefSchema=z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x1a6)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x1da)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a186_0x3ca296(0x1bd)](),'exclude':z['boolean']()[a186_0x3ca296(0x1bd)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1bd)](),'filter':FilterRuleDefSchema[a186_0x3ca296(0x1bd)](),'limit':z[a186_0x3ca296(0x1c7)]()[a186_0x3ca296(0x1bd)]()}));export const BehaviorConditionDefSchema=z[a186_0x3ca296(0x1e1)](()=>z['object']({'type':z['literal'](a186_0x3ca296(0x1ad)),'attribute':z[a186_0x3ca296(0x1a4)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a186_0x3ca296(0x1c3)]()[a186_0x3ca296(0x1bd)](),'aggregation':AggregationDefSchema[a186_0x3ca296(0x1bd)](),'source':z[a186_0x3ca296(0x1a4)]()['optional'](),'filter':FilterRuleDefSchema[a186_0x3ca296(0x1bd)](),'timeWindow':TimeWindowDefSchema[a186_0x3ca296(0x1bd)](),'limit':z[a186_0x3ca296(0x1c7)]()[a186_0x3ca296(0x1bd)]()}));export const ColumnConditionDefSchema=z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x1d8)),'column':z[a186_0x3ca296(0x1a4)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a186_0x3ca296(0x1e1)](()=>z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1dc)]([a186_0x3ca296(0x1a6),'Or','Composite']),'conditions':z[a186_0x3ca296(0x1af)](ConditionDefSchema),'description':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1bd)](),'expr':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1bd)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z['enum'](['include',a186_0x3ca296(0x19d)]),'segment':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1d7)](0x1,a186_0x3ca296(0x1b0))});export const ConditionDefSchema=z[a186_0x3ca296(0x1e1)](()=>z[a186_0x3ca296(0x1a7)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a186_0x3ca296(0x1e1)](()=>z[a186_0x3ca296(0x1d5)]({'type':z[a186_0x3ca296(0x1dc)]([a186_0x3ca296(0x1a6),'Or',a186_0x3ca296(0x1a2)]),'conditions':z[a186_0x3ca296(0x1af)](ConditionDefSchema),'description':z['string']()[a186_0x3ca296(0x1bd)](),'expr':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1bd)]()}));export const SegmentDefSchema=z['object']({'type':z[a186_0x3ca296(0x1c0)](a186_0x3ca296(0x1ab))[a186_0x3ca296(0x1bd)](),'name':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1d7)](0x1,a186_0x3ca296(0x1c6)),'description':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1bd)](),'folder':z[a186_0x3ca296(0x1a4)]()[a186_0x3ca296(0x1bd)](),'rule':RuleDefSchema['optional'](),'kind':z[a186_0x3ca296(0x1dc)](['batch','realtime','funnel_stage'])['optional'](),'visible':z[a186_0x3ca296(0x1c3)]()['optional'](),'activations':z['array'](ActivationDefSchema)['optional']()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a187_0x2b0929=a187_0x2555;(function(_0x3dabea,_0x18865d){const _0x3b3ff4=a187_0x2555,_0x5d260f=_0x3dabea();while(!![]){try{const _0x27cb6a=-parseInt(_0x3b3ff4(0x1b4))/0x1*(-parseInt(_0x3b3ff4(0x1b7))/0x2)+-parseInt(_0x3b3ff4(0x174))/0x3+-parseInt(_0x3b3ff4(0x184))/0x4+-parseInt(_0x3b3ff4(0x1a9))/0x5*(-parseInt(_0x3b3ff4(0x1ba))/0x6)+-parseInt(_0x3b3ff4(0x1b6))/0x7+parseInt(_0x3b3ff4(0x1a8))/0x8+parseInt(_0x3b3ff4(0x1b2))/0x9;if(_0x27cb6a===_0x18865d)break;else _0x5d260f['push'](_0x5d260f['shift']());}catch(_0x26f103){_0x5d260f['push'](_0x5d260f['shift']());}}}(a187_0x21db,0x3ca48));import{z}from'zod';import{ActivationDefSchema}from'./activation-schema.js';function a187_0x2555(_0x3a5aca,_0x396fc3){_0x3a5aca=_0x3a5aca-0x173;const _0x21dbf9=a187_0x21db();let _0x25555b=_0x21dbf9[_0x3a5aca];return _0x25555b;}export const OperatorTypeSchema=z['enum']([a187_0x2b0929(0x195),a187_0x2b0929(0x181),a187_0x2b0929(0x173),a187_0x2b0929(0x182),a187_0x2b0929(0x19e),'In',a187_0x2b0929(0x193),'Regexp',a187_0x2b0929(0x175),'TimeWithinPast','TimeWithinNext',a187_0x2b0929(0x17a),a187_0x2b0929(0x17e),a187_0x2b0929(0x187),a187_0x2b0929(0x1bb)]);export const TimeUnitSchema=z['enum']([a187_0x2b0929(0x1c1),'minute',a187_0x2b0929(0x185),a187_0x2b0929(0x1ab),a187_0x2b0929(0x1c2),a187_0x2b0929(0x1a6),a187_0x2b0929(0x1b8)]);export const AggregationTypeSchema=z[a187_0x2b0929(0x18e)](['Count',a187_0x2b0929(0x18d),a187_0x2b0929(0x1a0),a187_0x2b0929(0x180),a187_0x2b0929(0x191),a187_0x2b0929(0x1ae),a187_0x2b0929(0x1a5),a187_0x2b0929(0x18c)]);const TemporalValueSchema=z['union']([z[a187_0x2b0929(0x1c3)]({'timestamp':z[a187_0x2b0929(0x1bc)]()}),z[a187_0x2b0929(0x1c3)]({'last':z[a187_0x2b0929(0x186)]([z['number'](),z[a187_0x2b0929(0x196)](z[a187_0x2b0929(0x1bc)](),z[a187_0x2b0929(0x190)]())]),'unit':z[a187_0x2b0929(0x1bc)]()})]),OperatorValueSchema=z['union']([z[a187_0x2b0929(0x1bc)](),z['number'](),z['boolean'](),TemporalValueSchema,z[a187_0x2b0929(0x179)](z[a187_0x2b0929(0x186)]([z['string'](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal','Greater','GreaterEqual',a187_0x2b0929(0x173),'LessEqual','In',a187_0x2b0929(0x17a),'StartWith',a187_0x2b0929(0x187),a187_0x2b0929(0x17f),a187_0x2b0929(0x1b0),a187_0x2b0929(0x19b)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a187_0x2b0929(0x19b)]);export const OperatorDefSchema=z[a187_0x2b0929(0x1c3)]({'type':OperatorTypeSchema,'not':z[a187_0x2b0929(0x19c)]()['optional'](),'value':OperatorValueSchema[a187_0x2b0929(0x188)](),'min':z[a187_0x2b0929(0x186)]([z[a187_0x2b0929(0x190)](),z[a187_0x2b0929(0x1bc)](),TemporalValueSchema])[a187_0x2b0929(0x188)](),'max':z[a187_0x2b0929(0x186)]([z[a187_0x2b0929(0x190)](),z[a187_0x2b0929(0x1bc)](),TemporalValueSchema])[a187_0x2b0929(0x188)](),'unit':TimeUnitSchema[a187_0x2b0929(0x188)](),'duration':z['object']({'day':z['number']()[a187_0x2b0929(0x188)](),'week':z['number']()[a187_0x2b0929(0x188)](),'month':z[a187_0x2b0929(0x190)]()[a187_0x2b0929(0x188)](),'year':z[a187_0x2b0929(0x190)]()[a187_0x2b0929(0x188)](),'hour':z['number']()['optional'](),'minute':z['number']()[a187_0x2b0929(0x188)](),'second':z['number']()[a187_0x2b0929(0x188)]()})[a187_0x2b0929(0x188)](),'from':z[a187_0x2b0929(0x1c3)]({'last':z['union']([z['number'](),z[a187_0x2b0929(0x1bc)]()]),'unit':TimeUnitSchema})[a187_0x2b0929(0x188)](),'reverse':z[a187_0x2b0929(0x19c)]()['optional']()})[a187_0x2b0929(0x1a4)]((_0x4b57d2,_0x507484)=>{const _0x4ce212=a187_0x2b0929;OPERATORS_REQUIRING_VALUE[_0x4ce212(0x18b)](_0x4b57d2[_0x4ce212(0x17c)])&&(_0x4b57d2['value']===undefined||_0x4b57d2[_0x4ce212(0x177)]===null)&&_0x507484[_0x4ce212(0x1c6)]({'code':_0x4ce212(0x178),'message':'Operator\x20\x27'+_0x4b57d2[_0x4ce212(0x17c)]+'\x27\x20requires\x20a\x20value','path':[_0x4ce212(0x177)]}),_0x4b57d2['type']===_0x4ce212(0x193)&&_0x4b57d2[_0x4ce212(0x176)]===undefined&&_0x4b57d2['max']===undefined&&_0x507484[_0x4ce212(0x1c6)]({'code':'custom','message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x4ce212(0x1c7)}}),OPERATORS_REQUIRING_UNIT[_0x4ce212(0x18b)](_0x4b57d2[_0x4ce212(0x17c)])&&_0x4b57d2['value']!==undefined&&!_0x4b57d2[_0x4ce212(0x1bd)]&&_0x507484[_0x4ce212(0x1c6)]({'code':_0x4ce212(0x178),'message':_0x4ce212(0x1a3)+_0x4b57d2[_0x4ce212(0x17c)]+_0x4ce212(0x1b1),'path':['unit'],'params':{'validationCode':_0x4ce212(0x192)}}),_0x4b57d2[_0x4ce212(0x17c)]===_0x4ce212(0x1bb)&&(!_0x4b57d2['duration']&&_0x507484[_0x4ce212(0x1c6)]({'code':_0x4ce212(0x178),'message':_0x4ce212(0x199),'path':[_0x4ce212(0x1ad)]}),!_0x4b57d2[_0x4ce212(0x1b9)]&&_0x507484['addIssue']({'code':_0x4ce212(0x178),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x4ce212(0x1b9)]}));});export const ArrayMatchingSchema=z[a187_0x2b0929(0x186)]([z[a187_0x2b0929(0x1a2)](a187_0x2b0929(0x183)),z[a187_0x2b0929(0x1a2)](a187_0x2b0929(0x1b5)),z['object']({'atLeast':z[a187_0x2b0929(0x190)]()}),z[a187_0x2b0929(0x1c3)]({'atMost':z[a187_0x2b0929(0x190)]()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a187_0x2b0929(0x1aa)](a187_0x2b0929(0x17c),[z['object']({'type':z[a187_0x2b0929(0x18e)](['Sum',a187_0x2b0929(0x180),a187_0x2b0929(0x191),a187_0x2b0929(0x1a0)]),'column':z[a187_0x2b0929(0x1bc)](),'groupingColumns':z[a187_0x2b0929(0x179)](z['string']())[a187_0x2b0929(0x188)]()}),z[a187_0x2b0929(0x1c3)]({'type':z[a187_0x2b0929(0x1a2)](a187_0x2b0929(0x1a1)),'groupingColumns':z['array'](z['string']())[a187_0x2b0929(0x188)]()}),z[a187_0x2b0929(0x1c3)]({'type':z[a187_0x2b0929(0x1a2)](a187_0x2b0929(0x1ae)),'columns':z[a187_0x2b0929(0x179)](z[a187_0x2b0929(0x1bc)]())}),z['object']({'type':z[a187_0x2b0929(0x18e)](['First',a187_0x2b0929(0x18c)]),'column':z[a187_0x2b0929(0x1bc)](),'orderColumn':z[a187_0x2b0929(0x1bc)](),'groupingColumns':z[a187_0x2b0929(0x179)](z['string']())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a187_0x2b0929(0x190)](),'unit':TimeUnitSchema});const TIMEFRAME_OPERATORS=new Set([a187_0x2b0929(0x1b0),a187_0x2b0929(0x19b),a187_0x2b0929(0x1bb)]),TIMESTAMP_COMPARISON_OPERATORS=new Set([a187_0x2b0929(0x195),a187_0x2b0929(0x181),a187_0x2b0929(0x182),a187_0x2b0929(0x173),a187_0x2b0929(0x19e),a187_0x2b0929(0x193)]),TIMESTAMP_OPERATORS=new Set([...TIMEFRAME_OPERATORS,...TIMESTAMP_COMPARISON_OPERATORS]);function isTemporalValueShape(_0xe252a3){const _0x3c53ef=a187_0x2b0929;return typeof _0xe252a3===_0x3c53ef(0x1c3)&&_0xe252a3!==null&&!Array['isArray'](_0xe252a3)&&(_0x3c53ef(0x197)in _0xe252a3||_0x3c53ef(0x1b3)in _0xe252a3);}export const FilterColumnConditionDefSchema=z[a187_0x2b0929(0x1c3)]({'type':z['literal']('Column'),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a187_0x2b0929(0x188)]()})['superRefine']((_0x378e6d,_0x2f6d87)=>{const _0x81b735=a187_0x2b0929,_0x479db3=_0x378e6d[_0x81b735(0x18f)][_0x81b735(0x17c)];if(_0x378e6d[_0x81b735(0x194)]==='timestamp'){if(!TIMESTAMP_OPERATORS['has'](_0x479db3)){_0x2f6d87[_0x81b735(0x1c6)]({'code':_0x81b735(0x178),'message':_0x81b735(0x17b)+[...TIMESTAMP_OPERATORS][_0x81b735(0x1a7)](',\x20')+_0x81b735(0x19f)+_0x479db3+'\x27)','path':[_0x81b735(0x18f),_0x81b735(0x17c)]});return;}if(TIMESTAMP_COMPARISON_OPERATORS[_0x81b735(0x18b)](_0x479db3)){const _0x578cc0=_0x479db3===_0x81b735(0x193)?[_0x378e6d[_0x81b735(0x18f)][_0x81b735(0x176)],_0x378e6d[_0x81b735(0x18f)][_0x81b735(0x189)]][_0x81b735(0x1af)](_0x84e273=>_0x84e273===undefined||isTemporalValueShape(_0x84e273)):_0x378e6d[_0x81b735(0x18f)][_0x81b735(0x177)]===undefined||isTemporalValueShape(_0x378e6d['operator'][_0x81b735(0x177)]);!_0x578cc0&&_0x2f6d87[_0x81b735(0x1c6)]({'code':_0x81b735(0x178),'message':_0x81b735(0x1c0)+_0x479db3+_0x81b735(0x18a),'path':['operator']});}}});export const FilterRuleDefSchema=z[a187_0x2b0929(0x1c3)]({'type':z['literal'](a187_0x2b0929(0x1bf)),'conditions':z[a187_0x2b0929(0x179)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a187_0x2b0929(0x1ac)](()=>z[a187_0x2b0929(0x1c3)]({'type':z[a187_0x2b0929(0x1a2)](a187_0x2b0929(0x1c4)),'attribute':z[a187_0x2b0929(0x1bc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a187_0x2b0929(0x188)](),'exclude':z['boolean']()[a187_0x2b0929(0x188)](),'aggregation':AggregationDefSchema[a187_0x2b0929(0x188)](),'source':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x188)](),'filter':FilterRuleDefSchema[a187_0x2b0929(0x188)](),'limit':z[a187_0x2b0929(0x190)]()['optional']()}));export const BehaviorConditionDefSchema=z[a187_0x2b0929(0x1ac)](()=>z['object']({'type':z[a187_0x2b0929(0x1a2)](a187_0x2b0929(0x1be)),'attribute':z[a187_0x2b0929(0x1bc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a187_0x2b0929(0x188)](),'exclude':z['boolean']()[a187_0x2b0929(0x188)](),'aggregation':AggregationDefSchema[a187_0x2b0929(0x188)](),'source':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x188)](),'filter':FilterRuleDefSchema[a187_0x2b0929(0x188)](),'timeWindow':TimeWindowDefSchema[a187_0x2b0929(0x188)](),'limit':z[a187_0x2b0929(0x190)]()[a187_0x2b0929(0x188)]()}));export const ColumnConditionDefSchema=z[a187_0x2b0929(0x1c3)]({'type':z['literal'](a187_0x2b0929(0x1c5)),'column':z[a187_0x2b0929(0x1bc)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a187_0x2b0929(0x1ac)](()=>z[a187_0x2b0929(0x1c3)]({'type':z[a187_0x2b0929(0x18e)](['And','Or',a187_0x2b0929(0x198)]),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a187_0x2b0929(0x188)](),'expr':z['string']()['optional']()}));export const SegmentRefConditionDefSchema=z[a187_0x2b0929(0x1c3)]({'type':z[a187_0x2b0929(0x18e)](['include','exclude']),'segment':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x176)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a187_0x2b0929(0x1ac)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a187_0x2b0929(0x1c3)]({'type':z[a187_0x2b0929(0x18e)]([a187_0x2b0929(0x1bf),'Or','Composite']),'conditions':z[a187_0x2b0929(0x179)](ConditionDefSchema),'description':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x188)](),'expr':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x188)]()}));export const SegmentDefSchema=z['object']({'type':z['literal']('segment')['optional'](),'name':z[a187_0x2b0929(0x1bc)]()['min'](0x1,a187_0x2b0929(0x17d)),'description':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x188)](),'folder':z[a187_0x2b0929(0x1bc)]()[a187_0x2b0929(0x188)](),'rule':RuleDefSchema['optional'](),'kind':z[a187_0x2b0929(0x18e)]([a187_0x2b0929(0x19d),'realtime',a187_0x2b0929(0x19a)])[a187_0x2b0929(0x188)](),'visible':z[a187_0x2b0929(0x19c)]()[a187_0x2b0929(0x188)](),'activations':z['array'](ActivationDefSchema)[a187_0x2b0929(0x188)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;function a187_0x21db(){const _0x54cd1c=['43662stkckh','IsNull','min','value','custom','array','Contain','Timestamp\x20column\x20only\x20supports\x20','type','Segment\x20name\x20is\x20required','StartWith','Regexp','Min','Greater','GreaterEqual','any','468060WmRsff','hour','union','EndWith','optional','max','\x27\x20operator\x20requires\x20a\x20relative-time\x20or\x20timestamp\x20value\x20({last,\x20unit}\x20or\x20{timestamp}),\x20not\x20a\x20plain\x20value','has','Last','Sum','enum','operator','number','Max','MISSING_TIME_UNIT','Between','column','Equal','record','timestamp','Composite','TimeRange\x20operator\x20requires\x20\x27duration\x27','funnel_stage','TimeWithinNext','boolean','batch','LessEqual','\x20operators\x20(got\x20\x27','Average','Count','literal','Operator\x20\x27','superRefine','First','month','join','1029408vLlAxI','781285yYpbEZ','discriminatedUnion','day','lazy','duration','CountDistinct','every','TimeWithinPast','\x27\x20requires\x20a\x20time\x20unit','1996992GoiEhb','last','6839lsoCfG','all','2029692XpTMyu','2afgEqA','year','from','12HoMqgh','TimeRange','string','unit','Behavior','And','Timestamp\x20column\x27s\x20\x27','second','week','object','Value','Column','addIssue','MISSING_BETWEEN_BOUNDS','Less'];a187_0x21db=function(){return _0x54cd1c;};return a187_0x21db();}
@@ -1 +1 @@
1
- const a187_0xca68b3=a187_0x129d;(function(_0x17207a,_0x231f3d){const _0x5d2088=a187_0x129d,_0x549fb6=_0x17207a();while(!![]){try{const _0x47fdd7=parseInt(_0x5d2088(0x1da))/0x1*(parseInt(_0x5d2088(0x1d3))/0x2)+-parseInt(_0x5d2088(0x1e2))/0x3+parseInt(_0x5d2088(0x1d6))/0x4+parseInt(_0x5d2088(0x1de))/0x5*(parseInt(_0x5d2088(0x1ec))/0x6)+-parseInt(_0x5d2088(0x1f3))/0x7*(parseInt(_0x5d2088(0x1f1))/0x8)+parseInt(_0x5d2088(0x1e0))/0x9*(-parseInt(_0x5d2088(0x1ea))/0xa)+parseInt(_0x5d2088(0x1dc))/0xb;if(_0x47fdd7===_0x231f3d)break;else _0x549fb6['push'](_0x549fb6['shift']());}catch(_0x49b523){_0x549fb6['push'](_0x549fb6['shift']());}}}(a187_0x5918,0x3e1a2));import{readFileSync}from'fs';import*as a187_0x84a934 from'path';import*as a187_0x1853cc 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';function a187_0x129d(_0x3c3ccf,_0x1b9901){_0x3c3ccf=_0x3c3ccf-0x1d3;const _0x591859=a187_0x5918();let _0x129dbb=_0x591859[_0x3c3ccf];return _0x129dbb;}import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a187_0xca68b3(0x1e3)]);export{isJourneyDef};export function isCampaignDef(_0xf414f9){const _0x1a7efa=a187_0xca68b3;if(typeof _0xf414f9!=='object'||_0xf414f9===null)return![];const _0x3a7b7b=_0xf414f9,_0x1e57fb=VALID_CAMPAIGN_TYPES[_0x1a7efa(0x1eb)](_0x3a7b7b[_0x1a7efa(0x1d8)]);if(_0x3a7b7b[_0x1a7efa(0x1df)]==='campaign'&&_0x1e57fb)return!![];if(_0x1e57fb&&!_0x3a7b7b[_0x1a7efa(0x1df)])return!![];return![];}export function isTemplateDef(_0x4aef62){const _0x16d135=a187_0xca68b3;return typeof _0x4aef62===_0x16d135(0x1ee)&&_0x4aef62!==null&&_0x16d135(0x1df)in _0x4aef62&&_0x4aef62[_0x16d135(0x1df)]===_0x16d135(0x1e4);}export function isAlwaysOnCampaignDef(_0x97bc90){const _0x3c111d=a187_0xca68b3;return typeof _0x97bc90==='object'&&_0x97bc90!==null&&'type'in _0x97bc90&&_0x97bc90[_0x3c111d(0x1df)]===_0x3c111d(0x1e7);}export function isValidationResult(_0x2c5b8c){const _0x505630=a187_0xca68b3;return!(_0x505630(0x1f2)in _0x2c5b8c);}export function createParseErrorResult(_0x5e4714,_0xab4236,_0x3542a4,_0x1db303,_0xe251bd=a187_0xca68b3(0x1ef)){const _0x18a462=a187_0xca68b3;return{'filePath':_0x5e4714,'relativePath':_0xab4236,'source':_0x3542a4,'result':{'valid':![],'errors':[{'level':_0x18a462(0x1d7),'path':'','code':'YAML_PARSE_ERROR','message':_0x1db303}],'warnings':[]},'fileType':_0xe251bd};}export function validateYamlFile(_0x40206a,_0x331433,_0x27f24f={}){const _0x2bc914=a187_0xca68b3,_0x1acebb=a187_0x84a934['relative'](_0x331433,_0x40206a)||a187_0x84a934[_0x2bc914(0x1f0)](_0x40206a);try{const _0x28008c=readFileSync(_0x40206a,_0x2bc914(0x1e9)),_0x583e24=a187_0x1853cc['parseDocument'](_0x28008c),_0x425ce=_0x583e24[_0x2bc914(0x1d9)]();if(!_0x425ce)return createParseErrorResult(_0x40206a,_0x1acebb,_0x28008c,_0x2bc914(0x1d4));let _0x308640;if(isJourneyDef(_0x425ce,_0x40206a))_0x308640=_0x2bc914(0x1e1);else{if(isCampaignDef(_0x425ce))_0x308640=_0x2bc914(0x1ed);else{if(isAlwaysOnCampaignDef(_0x425ce))_0x308640=_0x2bc914(0x1e7);else isTemplateDef(_0x425ce)?_0x308640='template':_0x308640=_0x2bc914(0x1ef);}}if(_0x27f24f[_0x2bc914(0x1db)]&&_0x308640!==_0x27f24f[_0x2bc914(0x1db)])return{'filePath':_0x40206a,'relativePath':_0x1acebb,'skipped':!![],'reason':_0x2bc914(0x1f4)+_0x27f24f[_0x2bc914(0x1db)]};const _0x2e5b57={'source':_0x28008c,'document':_0x583e24};let _0x64dccd;if(_0x308640===_0x2bc914(0x1e1))_0x64dccd=validateJourneyDef(_0x425ce,_0x2e5b57);else{if(_0x308640==='campaign')_0x64dccd=validateCampaignDef(_0x425ce,_0x2e5b57);else{if(_0x308640===_0x2bc914(0x1e7))_0x64dccd=validateAlwaysOnCampaignDef(_0x425ce,_0x2e5b57);else _0x308640==='template'?_0x64dccd=validateTemplateDef(_0x425ce,_0x2e5b57):_0x64dccd=validateSegmentDef(_0x425ce,_0x2e5b57);}}return{'filePath':_0x40206a,'relativePath':_0x1acebb,'source':_0x28008c,'result':_0x64dccd,'fileType':_0x308640};}catch(_0x4f5b2b){const _0x2088d1=_0x4f5b2b instanceof Error?_0x4f5b2b['message']:String(_0x4f5b2b);return createParseErrorResult(_0x40206a,_0x1acebb,'',_0x2bc914(0x1e6)+_0x2088d1);}}export function validateYamlFiles(_0x4bfc6d,_0x5811b0,_0x492c0a={}){const _0x33869a=a187_0xca68b3;return _0x4bfc6d[_0x33869a(0x1dd)](_0x575b8f=>validateYamlFile(_0x575b8f,_0x5811b0,_0x492c0a));}function a187_0x5918(){const _0x4f2c35=['1373586TsgFMZ','push','template','length','YAML\x20parse\x20error:\x20','always_on_campaign','valid','utf-8','540770gRRCcV','has','14160SoPjwp','campaign','object','segment','basename','8pRkCbB','skipped','2963751hjRExm','not\x20a\x20','8lvGykA','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','result','695336rBEktB','error','campaign_type','toJSON','50123OZwVSq','filterType','9193844yYMcoq','map','415sIwpmN','type','45zdMQxi','journey'];a187_0x5918=function(){return _0x4f2c35;};return a187_0x5918();}export function calculateSummary(_0x18a597){const _0x35a1dc=a187_0xca68b3;let _0x5d544f=0x0,_0x533c4c=0x0,_0x56f56a=0x0,_0x1e67eb=0x0;for(const _0x163145 of _0x18a597){if(!isValidationResult(_0x163145)){_0x1e67eb++;continue;}_0x163145['result'][_0x35a1dc(0x1e8)]?_0x5d544f++:_0x533c4c++,_0x56f56a+=_0x163145[_0x35a1dc(0x1d5)]['warnings'][_0x35a1dc(0x1e5)];}return{'validCount':_0x5d544f,'invalidCount':_0x533c4c,'warningCount':_0x56f56a,'skippedCount':_0x1e67eb,'hasErrors':_0x533c4c>0x0};}
1
+ function a188_0x5471(_0x118682,_0x22c50d){_0x118682=_0x118682-0xe9;const _0x5cd60c=a188_0x5cd6();let _0x547102=_0x5cd60c[_0x118682];return _0x547102;}const a188_0x19b77c=a188_0x5471;(function(_0x34aff6,_0xde62f9){const _0x53f97f=a188_0x5471,_0x31c63a=_0x34aff6();while(!![]){try{const _0x1a3aec=parseInt(_0x53f97f(0xf3))/0x1+parseInt(_0x53f97f(0xec))/0x2*(parseInt(_0x53f97f(0xf1))/0x3)+parseInt(_0x53f97f(0xf0))/0x4*(-parseInt(_0x53f97f(0x104))/0x5)+-parseInt(_0x53f97f(0x106))/0x6*(parseInt(_0x53f97f(0xed))/0x7)+parseInt(_0x53f97f(0xf9))/0x8+-parseInt(_0x53f97f(0xee))/0x9*(parseInt(_0x53f97f(0xfa))/0xa)+parseInt(_0x53f97f(0x103))/0xb*(parseInt(_0x53f97f(0xfb))/0xc);if(_0x1a3aec===_0xde62f9)break;else _0x31c63a['push'](_0x31c63a['shift']());}catch(_0x2ce0aa){_0x31c63a['push'](_0x31c63a['shift']());}}}(a188_0x5cd6,0xcb15d));import{readFileSync}from'fs';import*as a188_0x26a1fe from'path';import*as a188_0x57e139 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';import{validateAlwaysOnCampaignDef}from'../engage/always-on-campaign-validator.js';import{isJourneyDef}from'./journey-yaml.js';const VALID_CAMPAIGN_TYPES=new Set([a188_0x19b77c(0x10b),a188_0x19b77c(0x108)]);export{isJourneyDef};function a188_0x5cd6(){const _0x386b9a=['86436jdrjvh','parseDocument','2355284VloYME','17253ejPvEy','relative','84829QAatsk','result','has','campaign_type','utf-8','toJSON','9928656gfVPXL','1010BpfJVS','117492CzGvzn','journey','segment','type','always_on_campaign','warnings','map','length','781RlyxTW','10cszRyp','filterType','1884crlOkM','error','push','template','object','email','skipped','valid','not\x20a\x20','message','campaign','414nLMGjO','5173NCMdiR'];a188_0x5cd6=function(){return _0x386b9a;};return a188_0x5cd6();}export function isCampaignDef(_0x2164de){const _0x27bd80=a188_0x19b77c;if(typeof _0x2164de!=='object'||_0x2164de===null)return![];const _0x9390c0=_0x2164de,_0x3815c5=VALID_CAMPAIGN_TYPES[_0x27bd80(0xf5)](_0x9390c0[_0x27bd80(0xf6)]);if(_0x9390c0[_0x27bd80(0xfe)]===_0x27bd80(0xeb)&&_0x3815c5)return!![];if(_0x3815c5&&!_0x9390c0[_0x27bd80(0xfe)])return!![];return![];}export function isTemplateDef(_0x561175){const _0x52611d=a188_0x19b77c;return typeof _0x561175===_0x52611d(0x10a)&&_0x561175!==null&&_0x52611d(0xfe)in _0x561175&&_0x561175[_0x52611d(0xfe)]===_0x52611d(0x109);}export function isAlwaysOnCampaignDef(_0x533197){const _0x34f379=a188_0x19b77c;return typeof _0x533197===_0x34f379(0x10a)&&_0x533197!==null&&_0x34f379(0xfe)in _0x533197&&_0x533197['type']===_0x34f379(0xff);}export function isValidationResult(_0x1c0c8f){const _0x11f556=a188_0x19b77c;return!(_0x11f556(0x10c)in _0x1c0c8f);}export function createParseErrorResult(_0x786c17,_0x406809,_0x30503d,_0x46c1d0,_0x56f2ae='segment'){const _0x3bd6da=a188_0x19b77c;return{'filePath':_0x786c17,'relativePath':_0x406809,'source':_0x30503d,'result':{'valid':![],'errors':[{'level':_0x3bd6da(0x107),'path':'','code':'YAML_PARSE_ERROR','message':_0x46c1d0}],'warnings':[]},'fileType':_0x56f2ae};}export function validateYamlFile(_0x2b2fc5,_0x3585f4,_0x487033={}){const _0x443eaf=a188_0x19b77c,_0x1bbbc9=a188_0x26a1fe[_0x443eaf(0xf2)](_0x3585f4,_0x2b2fc5)||a188_0x26a1fe['basename'](_0x2b2fc5);try{const _0x52a271=readFileSync(_0x2b2fc5,_0x443eaf(0xf7)),_0x425e61=a188_0x57e139[_0x443eaf(0xef)](_0x52a271),_0x5013b4=_0x425e61[_0x443eaf(0xf8)]();if(!_0x5013b4)return createParseErrorResult(_0x2b2fc5,_0x1bbbc9,_0x52a271,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0x58b54c;if(isJourneyDef(_0x5013b4,_0x2b2fc5))_0x58b54c=_0x443eaf(0xfc);else{if(isCampaignDef(_0x5013b4))_0x58b54c='campaign';else{if(isAlwaysOnCampaignDef(_0x5013b4))_0x58b54c=_0x443eaf(0xff);else isTemplateDef(_0x5013b4)?_0x58b54c=_0x443eaf(0x109):_0x58b54c=_0x443eaf(0xfd);}}if(_0x487033[_0x443eaf(0x105)]&&_0x58b54c!==_0x487033['filterType'])return{'filePath':_0x2b2fc5,'relativePath':_0x1bbbc9,'skipped':!![],'reason':_0x443eaf(0xe9)+_0x487033[_0x443eaf(0x105)]};const _0x1c98f2={'source':_0x52a271,'document':_0x425e61};let _0x43a6a3;if(_0x58b54c===_0x443eaf(0xfc))_0x43a6a3=validateJourneyDef(_0x5013b4,_0x1c98f2);else{if(_0x58b54c==='campaign')_0x43a6a3=validateCampaignDef(_0x5013b4,_0x1c98f2);else{if(_0x58b54c===_0x443eaf(0xff))_0x43a6a3=validateAlwaysOnCampaignDef(_0x5013b4,_0x1c98f2);else _0x58b54c===_0x443eaf(0x109)?_0x43a6a3=validateTemplateDef(_0x5013b4,_0x1c98f2):_0x43a6a3=validateSegmentDef(_0x5013b4,_0x1c98f2);}}return{'filePath':_0x2b2fc5,'relativePath':_0x1bbbc9,'source':_0x52a271,'result':_0x43a6a3,'fileType':_0x58b54c};}catch(_0x4759de){const _0x4a1436=_0x4759de instanceof Error?_0x4759de[_0x443eaf(0xea)]:String(_0x4759de);return createParseErrorResult(_0x2b2fc5,_0x1bbbc9,'','YAML\x20parse\x20error:\x20'+_0x4a1436);}}export function validateYamlFiles(_0x457944,_0x5f5aae,_0x255965={}){const _0xcc80b1=a188_0x19b77c;return _0x457944[_0xcc80b1(0x101)](_0x4eb656=>validateYamlFile(_0x4eb656,_0x5f5aae,_0x255965));}export function calculateSummary(_0x32d00c){const _0x2d6eb2=a188_0x19b77c;let _0x48a3c3=0x0,_0x57b562=0x0,_0x287af9=0x0,_0x254111=0x0;for(const _0x1cb034 of _0x32d00c){if(!isValidationResult(_0x1cb034)){_0x254111++;continue;}_0x1cb034['result'][_0x2d6eb2(0x10d)]?_0x48a3c3++:_0x57b562++,_0x287af9+=_0x1cb034[_0x2d6eb2(0xf4)][_0x2d6eb2(0x100)][_0x2d6eb2(0x102)];}return{'validCount':_0x48a3c3,'invalidCount':_0x57b562,'warningCount':_0x287af9,'skippedCount':_0x254111,'hasErrors':_0x57b562>0x0};}
@@ -1 +1 @@
1
- (function(_0x5f2631,_0x365330){const _0x3c70bf=a188_0x26ef,_0x5d0083=_0x5f2631();while(!![]){try{const _0x56cbd4=parseInt(_0x3c70bf(0x148))/0x1*(-parseInt(_0x3c70bf(0x130))/0x2)+-parseInt(_0x3c70bf(0x14a))/0x3*(-parseInt(_0x3c70bf(0x13d))/0x4)+parseInt(_0x3c70bf(0x12c))/0x5+parseInt(_0x3c70bf(0x12b))/0x6*(parseInt(_0x3c70bf(0x13a))/0x7)+parseInt(_0x3c70bf(0x143))/0x8+parseInt(_0x3c70bf(0x146))/0x9+-parseInt(_0x3c70bf(0x14e))/0xa*(parseInt(_0x3c70bf(0x155))/0xb);if(_0x56cbd4===_0x365330)break;else _0x5d0083['push'](_0x5d0083['shift']());}catch(_0x1a5912){_0x5d0083['push'](_0x5d0083['shift']());}}}(a188_0x4ba7,0x809d9));function a188_0x4ba7(){const _0xb46099=['message','12DvIDeo','13475ipRKsc','errors','parse','getIn','1981946GzYUYJ','map','push','\x27:\x20','cyan','column','data','object','\x20|\x20','level','540428XOHjqk','error','path','44888Fvbndi','split','pop','range','join','match','351944ZLgmhT','max','YAML\x20validation\x20error\x20at\x20\x27','6532038lBannQ','code','1tHKaHd','red','264oidKQM','Invalid\x20YAML:\x20expected\x20an\x20object','min','safeParse','3440laIHOS','location','success','contents','toString','length','dim','12683soMNto'];a188_0x4ba7=function(){return _0xb46099;};return a188_0x4ba7();}import*as a188_0x56225c from'yaml';import a188_0x3b5cc1 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x9eedcd,_0x167995,_0x4c9d90){const _0x4c1ddd=a188_0x26ef;if(!_0x9eedcd||!_0x167995)return undefined;try{let _0x247978=_0x9eedcd[_0x4c1ddd(0x12f)](_0x4c9d90,!![]),_0x5d7c46=[..._0x4c9d90];while((!_0x247978||typeof _0x247978!=='object'||!(_0x4c1ddd(0x140)in _0x247978)||!_0x247978[_0x4c1ddd(0x140)])&&_0x5d7c46[_0x4c1ddd(0x153)]>0x0){_0x5d7c46[_0x4c1ddd(0x13f)](),_0x247978=_0x5d7c46[_0x4c1ddd(0x153)]>0x0?_0x9eedcd['getIn'](_0x5d7c46,!![]):_0x9eedcd[_0x4c1ddd(0x151)];}if(!_0x247978||typeof _0x247978!==_0x4c1ddd(0x137)||!(_0x4c1ddd(0x140)in _0x247978)||!_0x247978[_0x4c1ddd(0x140)])return undefined;const [_0x5bdb39]=_0x247978[_0x4c1ddd(0x140)];return offsetToLocation(_0x167995,_0x5bdb39);}catch{return undefined;}}export function offsetToLocation(_0x52934b,_0x4a0002){const _0x41c916=a188_0x26ef;let _0x2002d2=0x1,_0x387555=0x1;for(let _0x4b2ba1=0x0;_0x4b2ba1<_0x4a0002&&_0x4b2ba1<_0x52934b[_0x41c916(0x153)];_0x4b2ba1++){_0x52934b[_0x4b2ba1]==='\x0a'?(_0x2002d2++,_0x387555=0x1):_0x387555++;}return{'line':_0x2002d2,'column':_0x387555,'offset':_0x4a0002};}export function pathToArray(_0x5e53ee){const _0x25fa68=a188_0x26ef;if(!_0x5e53ee)return[];return _0x5e53ee[_0x25fa68(0x13e)]('.')['flatMap'](_0x17beeb=>{const _0x2e7e39=_0x25fa68,_0x35d4d2=_0x17beeb[_0x2e7e39(0x142)](/^(\w+)\[(\d+)\]$/);if(_0x35d4d2)return[_0x35d4d2[0x1],parseInt(_0x35d4d2[0x2],0xa)];return[_0x17beeb];});}export function formatZodPath(_0x2df146){let _0x1d037f='';for(const _0x2fc25a of _0x2df146){if(typeof _0x2fc25a==='number')_0x1d037f+='['+_0x2fc25a+']';else{const _0x227540=String(_0x2fc25a);_0x1d037f+=_0x1d037f?'.'+_0x227540:_0x227540;}}return _0x1d037f;}function a188_0x26ef(_0x3e253d,_0x5b5161){_0x3e253d=_0x3e253d-0x12a;const _0x4ba7a6=a188_0x4ba7();let _0x26efbf=_0x4ba7a6[_0x3e253d];return _0x26efbf;}export function flattenZodIssues(_0x30c288){const _0x2f8218=a188_0x26ef,_0x524d8f=[];for(const _0x2d7195 of _0x30c288){if(_0x2d7195[_0x2f8218(0x147)]==='invalid_union'&&'errors'in _0x2d7195){const _0x22a99f=_0x2d7195[_0x2f8218(0x12d)];let _0x3fced0=_0x22a99f[0x0]||[];for(const _0x2e823d of _0x22a99f){_0x2e823d[_0x2f8218(0x153)]<_0x3fced0[_0x2f8218(0x153)]&&(_0x3fced0=_0x2e823d);}const _0x52a9af=_0x3fced0[_0x2f8218(0x131)](_0x5e67ab=>({..._0x5e67ab,'path':[..._0x2d7195[_0x2f8218(0x13c)],..._0x5e67ab[_0x2f8218(0x13c)]]}));_0x524d8f[_0x2f8218(0x132)](...flattenZodIssues(_0x52a9af));}else _0x524d8f['push'](_0x2d7195);}return _0x524d8f;}export function safeParseYaml(_0x4c94d2,_0x501f2d){const _0x235570=a188_0x26ef,_0x4b7da=a188_0x56225c[_0x235570(0x12e)](_0x4c94d2);if(!_0x4b7da||typeof _0x4b7da!==_0x235570(0x137))throw new Error(_0x235570(0x14b));const _0x4be168=_0x501f2d[_0x235570(0x14d)](_0x4b7da);if(!_0x4be168[_0x235570(0x150)]){const _0x4d7c86=_0x4be168[_0x235570(0x13b)]['issues'][0x0],_0xfb5205=formatZodPath(_0x4d7c86[_0x235570(0x13c)]);throw new Error(_0xfb5205?_0x235570(0x145)+_0xfb5205+_0x235570(0x133)+_0x4d7c86[_0x235570(0x12a)]:'YAML\x20validation\x20error:\x20'+_0x4d7c86[_0x235570(0x12a)]);}return _0x4be168[_0x235570(0x136)];}export function formatIssueWithContext(_0x54c533,_0x550732,_0x10225f){const _0x49fda7=a188_0x26ef,_0x46e6eb=[],_0x4308d6=_0x54c533[_0x49fda7(0x139)]===_0x49fda7(0x13b),_0x2e619f=_0x4308d6?a188_0x3b5cc1[_0x49fda7(0x149)]:a188_0x3b5cc1['yellow'],_0x2fb208=_0x4308d6?a188_0x3b5cc1[_0x49fda7(0x149)]:a188_0x3b5cc1['yellow'],_0x45a43f=_0x10225f?a188_0x3b5cc1[_0x49fda7(0x134)](_0x10225f+':'):'';if(_0x54c533['location']){const _0x5a8fa5=a188_0x3b5cc1[_0x49fda7(0x134)](_0x54c533[_0x49fda7(0x14f)]['line']+':'+_0x54c533[_0x49fda7(0x14f)][_0x49fda7(0x135)]);_0x46e6eb[_0x49fda7(0x132)](''+_0x45a43f+_0x5a8fa5+':\x20'+_0x2e619f(_0x54c533[_0x49fda7(0x139)])+'\x20'+_0x2fb208('['+_0x54c533['code']+']'));}else _0x46e6eb[_0x49fda7(0x132)](''+_0x45a43f+a188_0x3b5cc1[_0x49fda7(0x154)](_0x54c533['path'])+':\x20'+_0x2e619f(_0x54c533[_0x49fda7(0x139)])+'\x20'+_0x2fb208('['+_0x54c533[_0x49fda7(0x147)]+']'));_0x46e6eb['push'](_0x54c533[_0x49fda7(0x12a)]);if(_0x54c533[_0x49fda7(0x14f)]&&_0x550732){const _0x53470d=_0x550732[_0x49fda7(0x13e)]('\x0a'),{line:_0x3e1b80,column:_0x4deb50}=_0x54c533[_0x49fda7(0x14f)],_0x3fe32f=Math[_0x49fda7(0x144)](0x1,_0x3e1b80-0x1),_0x92e9f=Math[_0x49fda7(0x14c)](_0x53470d[_0x49fda7(0x153)],_0x3e1b80+0x1);_0x46e6eb['push']('');for(let _0x411806=_0x3fe32f;_0x411806<=_0x92e9f;_0x411806++){const _0x342541=_0x53470d[_0x411806-0x1]||'',_0x36fa52=a188_0x3b5cc1[_0x49fda7(0x154)](_0x411806[_0x49fda7(0x152)]()['padStart'](0x4)),_0x4ad4a8=a188_0x3b5cc1[_0x49fda7(0x154)](_0x49fda7(0x138));if(_0x411806===_0x3e1b80){_0x46e6eb[_0x49fda7(0x132)]('\x20\x20'+_0x36fa52+_0x4ad4a8+_0x2e619f(_0x342541));const _0x4806f2='\x20'['repeat'](0x4+0x3+_0x4deb50-0x1);_0x46e6eb[_0x49fda7(0x132)]('\x20\x20'+_0x4806f2+_0x2e619f('^'));}else _0x46e6eb[_0x49fda7(0x132)]('\x20\x20'+_0x36fa52+_0x4ad4a8+a188_0x3b5cc1[_0x49fda7(0x154)](_0x342541));}}return _0x46e6eb['join']('\x0a');}export function formatValidationResult(_0x2a6074,_0x47c957,_0x2baf61){const _0x380aa7=a188_0x26ef,_0x16106c=[];for(const _0x337b33 of _0x2a6074[_0x380aa7(0x12d)]){_0x16106c[_0x380aa7(0x132)](formatIssueWithContext(_0x337b33,_0x47c957,_0x2baf61)),_0x16106c['push']('');}for(const _0x4569e2 of _0x2a6074['warnings']){_0x16106c[_0x380aa7(0x132)](formatIssueWithContext(_0x4569e2,_0x47c957,_0x2baf61)),_0x16106c[_0x380aa7(0x132)]('');}return _0x16106c[_0x380aa7(0x141)]('\x0a');}
1
+ (function(_0x227530,_0x432ca5){const _0x3b62ab=a189_0x2e7a,_0x15d2cb=_0x227530();while(!![]){try{const _0x4d6255=-parseInt(_0x3b62ab(0x10b))/0x1*(-parseInt(_0x3b62ab(0xf2))/0x2)+-parseInt(_0x3b62ab(0xed))/0x3*(-parseInt(_0x3b62ab(0x108))/0x4)+parseInt(_0x3b62ab(0xe4))/0x5*(-parseInt(_0x3b62ab(0x10e))/0x6)+parseInt(_0x3b62ab(0xe7))/0x7+parseInt(_0x3b62ab(0x102))/0x8*(parseInt(_0x3b62ab(0x104))/0x9)+-parseInt(_0x3b62ab(0xec))/0xa*(parseInt(_0x3b62ab(0xe3))/0xb)+-parseInt(_0x3b62ab(0x101))/0xc;if(_0x4d6255===_0x432ca5)break;else _0x15d2cb['push'](_0x15d2cb['shift']());}catch(_0x14a3ba){_0x15d2cb['push'](_0x15d2cb['shift']());}}}(a189_0x4f50,0x2a4a3));import*as a189_0x5385e5 from'yaml';import a189_0x3c208b from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x5a201b,_0x1bf5f1,_0x8e4a8f){const _0x30f6ae=a189_0x2e7a;if(!_0x5a201b||!_0x1bf5f1)return undefined;try{let _0x5263d9=_0x5a201b[_0x30f6ae(0xea)](_0x8e4a8f,!![]),_0x2a8441=[..._0x8e4a8f];while((!_0x5263d9||typeof _0x5263d9!==_0x30f6ae(0xe5)||!(_0x30f6ae(0x109)in _0x5263d9)||!_0x5263d9[_0x30f6ae(0x109)])&&_0x2a8441[_0x30f6ae(0xff)]>0x0){_0x2a8441[_0x30f6ae(0xef)](),_0x5263d9=_0x2a8441[_0x30f6ae(0xff)]>0x0?_0x5a201b[_0x30f6ae(0xea)](_0x2a8441,!![]):_0x5a201b[_0x30f6ae(0xf7)];}if(!_0x5263d9||typeof _0x5263d9!==_0x30f6ae(0xe5)||!(_0x30f6ae(0x109)in _0x5263d9)||!_0x5263d9[_0x30f6ae(0x109)])return undefined;const [_0x315220]=_0x5263d9[_0x30f6ae(0x109)];return offsetToLocation(_0x1bf5f1,_0x315220);}catch{return undefined;}}export function offsetToLocation(_0x388ec9,_0x3b193a){const _0x51986d=a189_0x2e7a;let _0x19aa47=0x1,_0x17e752=0x1;for(let _0x23dfb2=0x0;_0x23dfb2<_0x3b193a&&_0x23dfb2<_0x388ec9[_0x51986d(0xff)];_0x23dfb2++){_0x388ec9[_0x23dfb2]==='\x0a'?(_0x19aa47++,_0x17e752=0x1):_0x17e752++;}return{'line':_0x19aa47,'column':_0x17e752,'offset':_0x3b193a};}export function pathToArray(_0x11916f){const _0x3c9e92=a189_0x2e7a;if(!_0x11916f)return[];return _0x11916f[_0x3c9e92(0xf0)]('.')['flatMap'](_0x26ff13=>{const _0x1efc12=_0x26ff13['match'](/^(\w+)\[(\d+)\]$/);if(_0x1efc12)return[_0x1efc12[0x1],parseInt(_0x1efc12[0x2],0xa)];return[_0x26ff13];});}export function formatZodPath(_0x1c3628){let _0x44eca8='';for(const _0x2a8e07 of _0x1c3628){if(typeof _0x2a8e07==='number')_0x44eca8+='['+_0x2a8e07+']';else{const _0x50d330=String(_0x2a8e07);_0x44eca8+=_0x44eca8?'.'+_0x50d330:_0x50d330;}}return _0x44eca8;}export function flattenZodIssues(_0x418a43){const _0x3dc1c6=a189_0x2e7a,_0x177e90=[];for(const _0x462993 of _0x418a43){if(_0x462993[_0x3dc1c6(0x10c)]==='invalid_union'&&_0x3dc1c6(0x10d)in _0x462993){const _0x46036e=_0x462993[_0x3dc1c6(0x10d)];let _0x503d9a=_0x46036e[0x0]||[];for(const _0x48531c of _0x46036e){_0x48531c[_0x3dc1c6(0xff)]<_0x503d9a[_0x3dc1c6(0xff)]&&(_0x503d9a=_0x48531c);}const _0x4fbdce=_0x503d9a[_0x3dc1c6(0xfd)](_0x2d7604=>({..._0x2d7604,'path':[..._0x462993[_0x3dc1c6(0xf8)],..._0x2d7604[_0x3dc1c6(0xf8)]]}));_0x177e90[_0x3dc1c6(0xf5)](...flattenZodIssues(_0x4fbdce));}else _0x177e90['push'](_0x462993);}return _0x177e90;}function a189_0x4f50(){const _0x47857b=['push','repeat','contents','path','Invalid\x20YAML:\x20expected\x20an\x20object','line','cyan','dim','map','error','length','max','1259976mRNXYj','608foNxOI','yellow','30816VwoTGT','YAML\x20validation\x20error\x20at\x20\x27','YAML\x20validation\x20error:\x20','join','68vriDwi','range','red','368AnBfvs','code','errors','6NjTeCB','message','11KXNkGt','1251125FICinG','object','min','249984BAvemc','\x20|\x20','parse','getIn','\x27:\x20','2379960ForCzh','41922NujVec','safeParse','pop','split','level','1266BvfEnb','success','location'];a189_0x4f50=function(){return _0x47857b;};return a189_0x4f50();}function a189_0x2e7a(_0x14825a,_0x4a612b){_0x14825a=_0x14825a-0xe3;const _0x4f505a=a189_0x4f50();let _0x2e7a22=_0x4f505a[_0x14825a];return _0x2e7a22;}export function safeParseYaml(_0x3850b8,_0x312514){const _0x191b4f=a189_0x2e7a,_0x1a15a1=a189_0x5385e5[_0x191b4f(0xe9)](_0x3850b8);if(!_0x1a15a1||typeof _0x1a15a1!=='object')throw new Error(_0x191b4f(0xf9));const _0x14e918=_0x312514[_0x191b4f(0xee)](_0x1a15a1);if(!_0x14e918[_0x191b4f(0xf3)]){const _0xf82fa2=_0x14e918[_0x191b4f(0xfe)]['issues'][0x0],_0x4e32c1=formatZodPath(_0xf82fa2[_0x191b4f(0xf8)]);throw new Error(_0x4e32c1?_0x191b4f(0x105)+_0x4e32c1+_0x191b4f(0xeb)+_0xf82fa2[_0x191b4f(0x10f)]:_0x191b4f(0x106)+_0xf82fa2[_0x191b4f(0x10f)]);}return _0x14e918['data'];}export function formatIssueWithContext(_0x3d379b,_0x34013e,_0x383ffe){const _0x58057c=a189_0x2e7a,_0x1a1b5e=[],_0x42f0c7=_0x3d379b[_0x58057c(0xf1)]===_0x58057c(0xfe),_0x4e8164=_0x42f0c7?a189_0x3c208b[_0x58057c(0x10a)]:a189_0x3c208b[_0x58057c(0x103)],_0x2c27a9=_0x42f0c7?a189_0x3c208b[_0x58057c(0x10a)]:a189_0x3c208b[_0x58057c(0x103)],_0x3b381c=_0x383ffe?a189_0x3c208b[_0x58057c(0xfb)](_0x383ffe+':'):'';if(_0x3d379b[_0x58057c(0xf4)]){const _0x4236de=a189_0x3c208b['cyan'](_0x3d379b['location'][_0x58057c(0xfa)]+':'+_0x3d379b[_0x58057c(0xf4)]['column']);_0x1a1b5e[_0x58057c(0xf5)](''+_0x3b381c+_0x4236de+':\x20'+_0x4e8164(_0x3d379b[_0x58057c(0xf1)])+'\x20'+_0x2c27a9('['+_0x3d379b[_0x58057c(0x10c)]+']'));}else _0x1a1b5e['push'](''+_0x3b381c+a189_0x3c208b[_0x58057c(0xfc)](_0x3d379b[_0x58057c(0xf8)])+':\x20'+_0x4e8164(_0x3d379b[_0x58057c(0xf1)])+'\x20'+_0x2c27a9('['+_0x3d379b[_0x58057c(0x10c)]+']'));_0x1a1b5e[_0x58057c(0xf5)](_0x3d379b[_0x58057c(0x10f)]);if(_0x3d379b[_0x58057c(0xf4)]&&_0x34013e){const _0x2aedb8=_0x34013e[_0x58057c(0xf0)]('\x0a'),{line:_0x22ab11,column:_0x12e8d4}=_0x3d379b[_0x58057c(0xf4)],_0x4d07c7=Math[_0x58057c(0x100)](0x1,_0x22ab11-0x1),_0x5619f5=Math[_0x58057c(0xe6)](_0x2aedb8['length'],_0x22ab11+0x1);_0x1a1b5e[_0x58057c(0xf5)]('');for(let _0x6071af=_0x4d07c7;_0x6071af<=_0x5619f5;_0x6071af++){const _0x409141=_0x2aedb8[_0x6071af-0x1]||'',_0x520b27=a189_0x3c208b[_0x58057c(0xfc)](_0x6071af['toString']()['padStart'](0x4)),_0x4006d1=a189_0x3c208b[_0x58057c(0xfc)](_0x58057c(0xe8));if(_0x6071af===_0x22ab11){_0x1a1b5e[_0x58057c(0xf5)]('\x20\x20'+_0x520b27+_0x4006d1+_0x4e8164(_0x409141));const _0x2a4e2f='\x20'[_0x58057c(0xf6)](0x4+0x3+_0x12e8d4-0x1);_0x1a1b5e[_0x58057c(0xf5)]('\x20\x20'+_0x2a4e2f+_0x4e8164('^'));}else _0x1a1b5e['push']('\x20\x20'+_0x520b27+_0x4006d1+a189_0x3c208b['dim'](_0x409141));}}return _0x1a1b5e[_0x58057c(0x107)]('\x0a');}export function formatValidationResult(_0x42e7c3,_0x51e648,_0x1f364b){const _0x2242ee=a189_0x2e7a,_0x8b0231=[];for(const _0x26f22d of _0x42e7c3[_0x2242ee(0x10d)]){_0x8b0231[_0x2242ee(0xf5)](formatIssueWithContext(_0x26f22d,_0x51e648,_0x1f364b)),_0x8b0231[_0x2242ee(0xf5)]('');}for(const _0x10e0c6 of _0x42e7c3['warnings']){_0x8b0231[_0x2242ee(0xf5)](formatIssueWithContext(_0x10e0c6,_0x51e648,_0x1f364b)),_0x8b0231[_0x2242ee(0xf5)]('');}return _0x8b0231['join']('\x0a');}