@treasuredata/tdx 2026.3.45 → 2026.3.47

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 (242) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/TASK.md +62 -0
  182. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/execute-items/schedule.yaml +20 -0
  183. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/TASK.md +106 -0
  184. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/item-triage/schedule.yaml +18 -0
  185. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
  186. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
  187. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
  188. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
  189. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/TASK.md +21 -0
  190. package/dist/sdk/workspace/builtin-schedules/builtin-schedules/weekly-review/schedule.yaml +14 -0
  191. package/dist/sdk/workspace/builtin-schedules/execute-items/TASK.md +62 -0
  192. package/dist/sdk/workspace/builtin-schedules/execute-items/schedule.yaml +20 -0
  193. package/dist/sdk/workspace/builtin-schedules/item-triage/TASK.md +106 -0
  194. package/dist/sdk/workspace/builtin-schedules/item-triage/schedule.yaml +18 -0
  195. package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/TASK.md +26 -0
  196. package/dist/sdk/workspace/builtin-schedules/stale-item-cleanup/schedule.yaml +15 -0
  197. package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/TASK.md +26 -0
  198. package/dist/sdk/workspace/builtin-schedules/synthesize-knowledge/schedule.yaml +16 -0
  199. package/dist/sdk/workspace/builtin-schedules/weekly-review/TASK.md +21 -0
  200. package/dist/sdk/workspace/builtin-schedules/weekly-review/schedule.yaml +14 -0
  201. package/dist/sdk/workspace/frontmatter.js +1 -1
  202. package/dist/sdk/workspace/git.js +1 -1
  203. package/dist/sdk/workspace/index.d.ts +5 -1
  204. package/dist/sdk/workspace/index.d.ts.map +1 -1
  205. package/dist/sdk/workspace/index.js +1 -1
  206. package/dist/sdk/workspace/index.js.map +1 -1
  207. package/dist/sdk/workspace/templates.js +1 -1
  208. package/dist/sdk/workspace/weekly.js +1 -1
  209. package/dist/sdk/workspace/wikilinks.js +1 -1
  210. package/dist/test-utils/command-runner.js +1 -1
  211. package/dist/test-utils/factories.js +1 -1
  212. package/dist/test-utils/fixtures.js +1 -1
  213. package/dist/test-utils/http-mock.js +1 -1
  214. package/dist/test-utils/index.js +1 -1
  215. package/dist/utils/async.js +1 -1
  216. package/dist/utils/colors.js +1 -1
  217. package/dist/utils/diff.js +1 -1
  218. package/dist/utils/file-permissions.js +1 -1
  219. package/dist/utils/file-reader.js +1 -1
  220. package/dist/utils/github-releases.js +1 -1
  221. package/dist/utils/global-cache.js +1 -1
  222. package/dist/utils/json-loader.js +1 -1
  223. package/dist/utils/local-cache.js +1 -1
  224. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  225. package/dist/utils/logger/formatters/index.js +1 -1
  226. package/dist/utils/logger/handlers/console-handler.js +1 -1
  227. package/dist/utils/logger/handlers/file-handler.js +1 -1
  228. package/dist/utils/logger/handlers/index.js +1 -1
  229. package/dist/utils/logger/handlers/null-handler.js +1 -1
  230. package/dist/utils/logger/index.js +1 -1
  231. package/dist/utils/logger/logger.js +1 -1
  232. package/dist/utils/logger/types.js +1 -1
  233. package/dist/utils/option-validation.js +1 -1
  234. package/dist/utils/process.js +1 -1
  235. package/dist/utils/prompt.js +1 -1
  236. package/dist/utils/spinner.js +1 -1
  237. package/dist/utils/sse-parser.js +1 -1
  238. package/dist/utils/string-utils.js +1 -1
  239. package/dist/utils/table-ref-parser.js +1 -1
  240. package/dist/utils/tdx-logger.js +1 -1
  241. package/dist/utils/version-check.js +1 -1
  242. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x197582,_0x456541){const _0x31650c=a157_0x3311,_0x15a1e2=_0x197582();while(!![]){try{const _0x155d54=parseInt(_0x31650c(0x15b))/0x1*(-parseInt(_0x31650c(0x148))/0x2)+-parseInt(_0x31650c(0x163))/0x3+parseInt(_0x31650c(0x139))/0x4*(-parseInt(_0x31650c(0x144))/0x5)+parseInt(_0x31650c(0x13c))/0x6+-parseInt(_0x31650c(0x146))/0x7*(-parseInt(_0x31650c(0x167))/0x8)+parseInt(_0x31650c(0x14d))/0x9*(-parseInt(_0x31650c(0x149))/0xa)+-parseInt(_0x31650c(0x153))/0xb*(-parseInt(_0x31650c(0x164))/0xc);if(_0x155d54===_0x456541)break;else _0x15a1e2['push'](_0x15a1e2['shift']());}catch(_0x18d360){_0x15a1e2['push'](_0x15a1e2['shift']());}}}(a157_0x45ca,0xa3816));import a157_0x5ef955 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x43b036){const _0x1bc68c=a157_0x3311;return _0x43b036['type']!==_0x1bc68c(0x156);}export function isScopedResolution(_0x21c150){const _0x3b06b1=a157_0x3311;return _0x21c150[_0x3b06b1(0x152)]===_0x3b06b1(0x157)||_0x21c150[_0x3b06b1(0x152)]==='file'||_0x21c150[_0x3b06b1(0x152)]===_0x3b06b1(0x14b);}export function getScopedDetails(_0x559a4a){const _0x164a19=a157_0x3311;if(isScopedResolution(_0x559a4a))return{'isScoped':_0x559a4a[_0x164a19(0x154)],'scopedFolderPath':_0x559a4a[_0x164a19(0x140)]};return undefined;}async function findTdxConfigAsync(_0x28da4d,_0xb3bbaf){const _0x3eccff=a157_0x3311;let _0x3b19b3=a157_0x5ef955['resolve'](_0x28da4d);const _0xab7431=a157_0x5ef955[_0x3eccff(0x15d)](_0x3b19b3)[_0x3eccff(0x158)];while(_0x3b19b3!==_0xab7431){const _0x2a2dfc=a157_0x5ef955['join'](_0x3b19b3,_0x3eccff(0x15a));if(await _0xb3bbaf[_0x3eccff(0x155)](_0x2a2dfc))try{const _0x29c2a3=await _0xb3bbaf['readFile'](_0x2a2dfc),_0x45b86a=JSON[_0x3eccff(0x15d)](_0x29c2a3);if(_0x45b86a[_0x3eccff(0x15f)]&&typeof _0x45b86a[_0x3eccff(0x15f)]==='string')return{'configPath':_0x2a2dfc,'configDir':_0x3b19b3,'parentSegment':_0x45b86a[_0x3eccff(0x15f)]};}catch{}_0x3b19b3=a157_0x5ef955[_0x3eccff(0x142)](_0x3b19b3);}return null;}function calculateScopedPath(_0x3f2c75,_0x172395){const _0xa727e6=a157_0x3311,_0x196e1b=a157_0x5ef955[_0xa727e6(0x170)](_0x172395,_0x3f2c75),_0x2fec34=_0x196e1b!==''&&_0x196e1b!=='.'&&!_0x196e1b[_0xa727e6(0x169)]('..');return{'isScoped':_0x2fec34,'scopedFolderPath':_0x2fec34?_0x196e1b[_0xa727e6(0x14a)](/\\/g,'/'):''};}function a157_0x45ca(){const _0x137c6d=['4ssVmNf','no_config','File\x20not\x20found:\x20','6655944buhNky','No\x20tdx.json\x20found\x20for\x20file:\x20','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','File\x20not\x20found','scopedFolderPath','cwd','dirname','resolve','1733285eCrrFJ','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','7UhZLth','parentSegment','221582dZnFYH','3259170NOxoZL','replace','context','Parent\x20segment\x20not\x20specified','27PNsfiK','includes','file','configDir','segmentName','type','16309777MuDrIv','isScoped','exists','error','directory','root','isFile','tdx.json','1ftHxKP','parent_name','parse','stat','parent_segment','journey','basename','isDirectory','3327813stnTXJ','12yzGoWz','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','no_parent','4977256fEFyLV','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','startsWith','resourceType','folderPath','invalid_yaml','segment','match','file_not_found','relative','No\x20tdx.json\x20found','Not\x20a\x20YAML\x20file:\x20','message'];a157_0x45ca=function(){return _0x137c6d;};return a157_0x45ca();}function a157_0x3311(_0x3af779,_0x335c67){_0x3af779=_0x3af779-0x139;const _0x45caea=a157_0x45ca();let _0x33119d=_0x45caea[_0x3af779];return _0x33119d;}export async function resolveTarget(_0x22bf79){const _0x598fde=a157_0x3311,{arg:_0x175f6c,contextParent:_0x3392cb,cwd:cwd=process[_0x598fde(0x141)](),fs:fs=nodeFileSystem}=_0x22bf79;if(_0x175f6c&&isYamlFilePath(_0x175f6c))try{const _0x2e59f5=await resolveYamlFilePath(_0x175f6c,fs),_0x258d2d=a157_0x5ef955[_0x598fde(0x143)](_0x175f6c),_0x59fd79=a157_0x5ef955['dirname'](_0x258d2d),_0x5f01f2=await findTdxConfigAsync(_0x59fd79,fs);if(!_0x5f01f2){if(_0x3392cb){const _0x429728=a157_0x5ef955[_0x598fde(0x142)](_0x258d2d);return{'type':_0x598fde(0x14f),'parentName':_0x3392cb,'targetDir':_0x429728,'configRoot':_0x429728,'filePath':_0x258d2d,'resourceName':_0x2e59f5[_0x598fde(0x151)],'folderPath':_0x2e59f5[_0x598fde(0x16b)],'resourceType':_0x2e59f5[_0x598fde(0x16a)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x13a),'message':_0x598fde(0x13d)+_0x175f6c,'arg':_0x175f6c,'helpText':_0x598fde(0x168)};}const _0x17e1fc=calculateScopedPath(_0x59fd79,_0x5f01f2[_0x598fde(0x150)]);return{'type':_0x598fde(0x14f),'parentName':_0x5f01f2['parentSegment'],'targetDir':_0x5f01f2[_0x598fde(0x150)],'configRoot':_0x5f01f2['configDir'],'filePath':_0x258d2d,'resourceName':_0x2e59f5[_0x598fde(0x151)],'folderPath':_0x2e59f5[_0x598fde(0x16b)],'resourceType':_0x2e59f5[_0x598fde(0x16a)],'isScoped':_0x17e1fc[_0x598fde(0x154)],'scopedFolderPath':_0x17e1fc[_0x598fde(0x140)]};}catch(_0x5aa2e4){const _0x320563=_0x5aa2e4 instanceof Error?_0x5aa2e4[_0x598fde(0x173)]:String(_0x5aa2e4);if(_0x320563['includes'](_0x598fde(0x13f)))return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x16f),'message':_0x598fde(0x13b)+_0x175f6c,'arg':_0x175f6c};if(_0x320563[_0x598fde(0x14e)](_0x598fde(0x171))){if(_0x3392cb){const _0x5786aa=a157_0x5ef955[_0x598fde(0x143)](_0x175f6c);if(await fs[_0x598fde(0x155)](_0x5786aa)){const _0x2c15ce=a157_0x5ef955[_0x598fde(0x142)](_0x5786aa),_0x5852b8=await fs['readFile'](_0x5786aa),_0x1ce937=_0x5852b8[_0x598fde(0x16e)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1fd0b4=_0x5852b8[_0x598fde(0x16e)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x485be0=_0x1ce937?_0x1ce937[0x1]['trim']():a157_0x5ef955[_0x598fde(0x161)](_0x175f6c,a157_0x5ef955['extname'](_0x175f6c)),_0x313f5c=_0x1fd0b4&&_0x1fd0b4[0x1]['trim']()===_0x598fde(0x160)?'journey':_0x598fde(0x16d);return{'type':_0x598fde(0x14f),'parentName':_0x3392cb,'targetDir':_0x2c15ce,'configRoot':_0x2c15ce,'filePath':_0x5786aa,'resourceName':_0x485be0,'folderPath':'','resourceType':_0x313f5c,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x13a),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x175f6c,'arg':_0x175f6c,'helpText':_0x598fde(0x168)};}return{'type':'error','errorCode':'invalid_yaml','message':_0x320563,'arg':_0x175f6c};}if(_0x175f6c){const _0x3a2502=a157_0x5ef955[_0x598fde(0x143)](cwd,_0x175f6c);let _0x3c5395=null;try{_0x3c5395=await fs[_0x598fde(0x15e)](_0x3a2502);}catch{}if(_0x3c5395?.[_0x598fde(0x162)]()){const _0x15f898=await findTdxConfigAsync(_0x3a2502,fs);if(_0x15f898){const _0x46a605=calculateScopedPath(_0x3a2502,_0x15f898['configDir']);return{'type':'directory','parentName':_0x15f898[_0x598fde(0x147)],'targetDir':_0x3a2502,'configRoot':_0x15f898[_0x598fde(0x150)],'isScoped':_0x46a605[_0x598fde(0x154)],'scopedFolderPath':_0x46a605[_0x598fde(0x140)]};}if(_0x3392cb)return{'type':_0x598fde(0x157),'parentName':_0x3392cb,'targetDir':_0x3a2502,'configRoot':_0x3a2502,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x598fde(0x13a),'message':_0x598fde(0x13e)+_0x175f6c,'arg':_0x175f6c,'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(_0x3c5395?.[_0x598fde(0x159)]())return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x16c),'message':_0x598fde(0x172)+_0x175f6c,'arg':_0x175f6c,'helpText':_0x598fde(0x165)};const _0x5e6d99=sanitizeFileName(_0x175f6c),_0xd1feb3=getSegmentRootDir(_0x5e6d99,cwd);return{'type':_0x598fde(0x15c),'parentName':_0x175f6c,'targetDir':_0xd1feb3,'configRoot':_0xd1feb3};}const _0xfaabef=await findTdxConfigAsync(cwd,fs);if(_0xfaabef){const _0x1cb5ec=calculateScopedPath(cwd,_0xfaabef[_0x598fde(0x150)]);return{'type':_0x598fde(0x14b),'parentName':_0xfaabef['parentSegment'],'targetDir':cwd,'configRoot':_0xfaabef[_0x598fde(0x150)],'isScoped':_0x1cb5ec[_0x598fde(0x154)],'scopedFolderPath':_0x1cb5ec[_0x598fde(0x140)]};}if(_0x3392cb){const _0x4c4e9e=sanitizeFileName(_0x3392cb),_0x420a7d=getSegmentRootDir(_0x4c4e9e,cwd);return{'type':_0x598fde(0x14b),'parentName':_0x3392cb,'targetDir':_0x420a7d,'configRoot':_0x420a7d,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x598fde(0x156),'errorCode':_0x598fde(0x166),'message':_0x598fde(0x14c),'helpText':_0x598fde(0x145)};}
1
+ (function(_0x5dff5b,_0x10189c){const _0x4fb3e9=a157_0x237a,_0x2e656c=_0x5dff5b();while(!![]){try{const _0x401ddf=-parseInt(_0x4fb3e9(0x9f))/0x1+-parseInt(_0x4fb3e9(0x93))/0x2+-parseInt(_0x4fb3e9(0x9d))/0x3*(parseInt(_0x4fb3e9(0xb2))/0x4)+-parseInt(_0x4fb3e9(0xb0))/0x5+-parseInt(_0x4fb3e9(0x98))/0x6+-parseInt(_0x4fb3e9(0xbe))/0x7+parseInt(_0x4fb3e9(0x9e))/0x8;if(_0x401ddf===_0x10189c)break;else _0x2e656c['push'](_0x2e656c['shift']());}catch(_0x31264){_0x2e656c['push'](_0x2e656c['shift']());}}}(a157_0x23ba,0x29d2f));function a157_0x23ba(){const _0x5d090f=['no_config','Parent\x20segment\x20not\x20specified','error','2808gPMKJw','9135600gFibLQ','113070UlfTSg','no_parent','context','tdx.json','parentSegment','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','scopedFolderPath','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','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','basename','configDir','file_not_found','cwd','trim','stat','exists','startsWith','774880mbxxoM','string','116FhgQEX','isScoped','file','invalid_yaml','readFile','type','join','resolve','parent_segment','isDirectory','No\x20tdx.json\x20found','isFile','1731275AOzfiw','segmentName','parse','root','resourceType','File\x20not\x20found:\x20','dirname','directory','181252hMmPhK','folderPath','includes','No\x20tdx.json\x20found\x20for\x20file:\x20','replace','2024988UQytLw','File\x20not\x20found'];a157_0x23ba=function(){return _0x5d090f;};return a157_0x23ba();}import a157_0x4c588e from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x237a(_0x2426a5,_0x786579){_0x2426a5=_0x2426a5-0x93;const _0x23bab5=a157_0x23ba();let _0x237a90=_0x23bab5[_0x2426a5];return _0x237a90;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x5c89f8){const _0x2f14e6=a157_0x237a;return _0x5c89f8[_0x2f14e6(0xb7)]!==_0x2f14e6(0x9c);}export function isScopedResolution(_0x297140){const _0x10317e=a157_0x237a;return _0x297140[_0x10317e(0xb7)]===_0x10317e(0xc5)||_0x297140['type']===_0x10317e(0xb4)||_0x297140[_0x10317e(0xb7)]===_0x10317e(0xa1);}export function getScopedDetails(_0x2e1278){const _0x3133de=a157_0x237a;if(isScopedResolution(_0x2e1278))return{'isScoped':_0x2e1278[_0x3133de(0xb3)],'scopedFolderPath':_0x2e1278[_0x3133de(0xa5)]};return undefined;}async function findTdxConfigAsync(_0x5e32d4,_0x51aea3){const _0x77fae0=a157_0x237a;let _0x3e4a4b=a157_0x4c588e[_0x77fae0(0xb9)](_0x5e32d4);const _0x37ef17=a157_0x4c588e[_0x77fae0(0xc0)](_0x3e4a4b)[_0x77fae0(0xc1)];while(_0x3e4a4b!==_0x37ef17){const _0x615ec4=a157_0x4c588e[_0x77fae0(0xb8)](_0x3e4a4b,_0x77fae0(0xa2));if(await _0x51aea3[_0x77fae0(0xae)](_0x615ec4))try{const _0x5711fb=await _0x51aea3['readFile'](_0x615ec4),_0x304ce0=JSON[_0x77fae0(0xc0)](_0x5711fb);if(_0x304ce0[_0x77fae0(0xba)]&&typeof _0x304ce0[_0x77fae0(0xba)]===_0x77fae0(0xb1))return{'configPath':_0x615ec4,'configDir':_0x3e4a4b,'parentSegment':_0x304ce0['parent_segment']};}catch{}_0x3e4a4b=a157_0x4c588e[_0x77fae0(0xc4)](_0x3e4a4b);}return null;}function calculateScopedPath(_0x288089,_0x2905d5){const _0x4e64da=a157_0x237a,_0x427727=a157_0x4c588e['relative'](_0x2905d5,_0x288089),_0x2c4d60=_0x427727!==''&&_0x427727!=='.'&&!_0x427727[_0x4e64da(0xaf)]('..');return{'isScoped':_0x2c4d60,'scopedFolderPath':_0x2c4d60?_0x427727[_0x4e64da(0x97)](/\\/g,'/'):''};}export async function resolveTarget(_0x5c15ca){const _0x5e3f5b=a157_0x237a,{arg:_0x26c9f7,contextParent:_0x55fd40,cwd:cwd=process[_0x5e3f5b(0xab)](),fs:fs=nodeFileSystem}=_0x5c15ca;if(_0x26c9f7&&isYamlFilePath(_0x26c9f7))try{const _0x550032=await resolveYamlFilePath(_0x26c9f7,fs),_0x2d6c0=a157_0x4c588e[_0x5e3f5b(0xb9)](_0x26c9f7),_0x291eaf=a157_0x4c588e['dirname'](_0x2d6c0),_0x493f2e=await findTdxConfigAsync(_0x291eaf,fs);if(!_0x493f2e){if(_0x55fd40){const _0x281f94=a157_0x4c588e[_0x5e3f5b(0xc4)](_0x2d6c0);return{'type':_0x5e3f5b(0xb4),'parentName':_0x55fd40,'targetDir':_0x281f94,'configRoot':_0x281f94,'filePath':_0x2d6c0,'resourceName':_0x550032[_0x5e3f5b(0xbf)],'folderPath':_0x550032['folderPath'],'resourceType':_0x550032['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0x9a),'message':_0x5e3f5b(0x96)+_0x26c9f7,'arg':_0x26c9f7,'helpText':_0x5e3f5b(0xa4)};}const _0x2484cc=calculateScopedPath(_0x291eaf,_0x493f2e[_0x5e3f5b(0xa9)]);return{'type':_0x5e3f5b(0xb4),'parentName':_0x493f2e[_0x5e3f5b(0xa3)],'targetDir':_0x493f2e['configDir'],'configRoot':_0x493f2e['configDir'],'filePath':_0x2d6c0,'resourceName':_0x550032[_0x5e3f5b(0xbf)],'folderPath':_0x550032[_0x5e3f5b(0x94)],'resourceType':_0x550032[_0x5e3f5b(0xc2)],'isScoped':_0x2484cc[_0x5e3f5b(0xb3)],'scopedFolderPath':_0x2484cc['scopedFolderPath']};}catch(_0x567e31){const _0x6655c3=_0x567e31 instanceof Error?_0x567e31['message']:String(_0x567e31);if(_0x6655c3[_0x5e3f5b(0x95)](_0x5e3f5b(0x99)))return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0xaa),'message':_0x5e3f5b(0xc3)+_0x26c9f7,'arg':_0x26c9f7};if(_0x6655c3['includes'](_0x5e3f5b(0xbc))){if(_0x55fd40){const _0x4d6eea=a157_0x4c588e[_0x5e3f5b(0xb9)](_0x26c9f7);if(await fs[_0x5e3f5b(0xae)](_0x4d6eea)){const _0xb68c21=a157_0x4c588e[_0x5e3f5b(0xc4)](_0x4d6eea),_0x50cb09=await fs[_0x5e3f5b(0xb6)](_0x4d6eea),_0x2ce0b2=_0x50cb09['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1826d6=_0x50cb09['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x40ed81=_0x2ce0b2?_0x2ce0b2[0x1][_0x5e3f5b(0xac)]():a157_0x4c588e[_0x5e3f5b(0xa8)](_0x26c9f7,a157_0x4c588e['extname'](_0x26c9f7)),_0x5c567b=_0x1826d6&&_0x1826d6[0x1][_0x5e3f5b(0xac)]()==='journey'?'journey':'segment';return{'type':_0x5e3f5b(0xb4),'parentName':_0x55fd40,'targetDir':_0xb68c21,'configRoot':_0xb68c21,'filePath':_0x4d6eea,'resourceName':_0x40ed81,'folderPath':'','resourceType':_0x5c567b,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0x9a),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x26c9f7,'arg':_0x26c9f7,'helpText':_0x5e3f5b(0xa4)};}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0xb5),'message':_0x6655c3,'arg':_0x26c9f7};}if(_0x26c9f7){const _0x4c4899=a157_0x4c588e[_0x5e3f5b(0xb9)](cwd,_0x26c9f7);let _0x30ec4a=null;try{_0x30ec4a=await fs[_0x5e3f5b(0xad)](_0x4c4899);}catch{}if(_0x30ec4a?.[_0x5e3f5b(0xbb)]()){const _0x2a3953=await findTdxConfigAsync(_0x4c4899,fs);if(_0x2a3953){const _0x19122e=calculateScopedPath(_0x4c4899,_0x2a3953[_0x5e3f5b(0xa9)]);return{'type':_0x5e3f5b(0xc5),'parentName':_0x2a3953[_0x5e3f5b(0xa3)],'targetDir':_0x4c4899,'configRoot':_0x2a3953[_0x5e3f5b(0xa9)],'isScoped':_0x19122e[_0x5e3f5b(0xb3)],'scopedFolderPath':_0x19122e[_0x5e3f5b(0xa5)]};}if(_0x55fd40)return{'type':'directory','parentName':_0x55fd40,'targetDir':_0x4c4899,'configRoot':_0x4c4899,'isScoped':![],'scopedFolderPath':''};return{'type':'error','errorCode':_0x5e3f5b(0x9a),'message':_0x5e3f5b(0xa7)+_0x26c9f7,'arg':_0x26c9f7,'helpText':_0x5e3f5b(0xa4)};}if(_0x30ec4a?.[_0x5e3f5b(0xbd)]())return{'type':'error','errorCode':_0x5e3f5b(0xb5),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x26c9f7,'arg':_0x26c9f7,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x9737e6=sanitizeFileName(_0x26c9f7),_0x12fd44=getSegmentRootDir(_0x9737e6,cwd);return{'type':'parent_name','parentName':_0x26c9f7,'targetDir':_0x12fd44,'configRoot':_0x12fd44};}const _0x47208a=await findTdxConfigAsync(cwd,fs);if(_0x47208a){const _0xa1debf=calculateScopedPath(cwd,_0x47208a['configDir']);return{'type':'context','parentName':_0x47208a[_0x5e3f5b(0xa3)],'targetDir':cwd,'configRoot':_0x47208a[_0x5e3f5b(0xa9)],'isScoped':_0xa1debf['isScoped'],'scopedFolderPath':_0xa1debf[_0x5e3f5b(0xa5)]};}if(_0x55fd40){const _0x18d254=sanitizeFileName(_0x55fd40),_0x4b9ff9=getSegmentRootDir(_0x18d254,cwd);return{'type':_0x5e3f5b(0xa1),'parentName':_0x55fd40,'targetDir':_0x4b9ff9,'configRoot':_0x4b9ff9,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x5e3f5b(0x9c),'errorCode':_0x5e3f5b(0xa0),'message':_0x5e3f5b(0x9b),'helpText':_0x5e3f5b(0xa6)};}
@@ -1 +1 @@
1
- const a158_0x12ee0f=a158_0x2154;(function(_0x59630d,_0x23e914){const _0x1711b9=a158_0x2154,_0x31e391=_0x59630d();while(!![]){try{const _0x597889=-parseInt(_0x1711b9(0xfe))/0x1+parseInt(_0x1711b9(0xf5))/0x2*(-parseInt(_0x1711b9(0xf1))/0x3)+parseInt(_0x1711b9(0xfc))/0x4*(-parseInt(_0x1711b9(0xe4))/0x5)+parseInt(_0x1711b9(0xec))/0x6+parseInt(_0x1711b9(0xfb))/0x7*(-parseInt(_0x1711b9(0xe9))/0x8)+parseInt(_0x1711b9(0xee))/0x9+-parseInt(_0x1711b9(0xe5))/0xa*(-parseInt(_0x1711b9(0xe6))/0xb);if(_0x597889===_0x23e914)break;else _0x31e391['push'](_0x31e391['shift']());}catch(_0x1f58db){_0x31e391['push'](_0x31e391['shift']());}}}(a158_0x1361,0x8c3f0));import{existsSync,readFileSync}from'fs';import a158_0x13c10a from'path';function a158_0x1361(){const _0x1166d8=['Invalid\x20JSON\x20in\x20','startsWith','9459NKoQop','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','utf-8','root','614doOQeq','replace','stringify','engage_workspace','parent_segment','tdx.json','830221PoSwFJ','128kWAMVs','dirname','1796hpOqTb','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','142465dQmYqd','10VYxHQI','19249065qzmYwq','parse','segments','56jeqrmV','join','resolve','4165128QmlCJI','string','7578981JNmvPi'];a158_0x1361=function(){return _0x1166d8;};return a158_0x1361();}function a158_0x2154(_0x126b04,_0x43cc3e){_0x126b04=_0x126b04-0xe3;const _0x1361f7=a158_0x1361();let _0x215447=_0x1361f7[_0x126b04];return _0x215447;}const TDX_CONFIG_FILE=a158_0x12ee0f(0xfa),SEGMENTS_DIR=a158_0x12ee0f(0xe8);export function findTdxConfigPath(_0x2c0676=process['cwd']()){const _0x2f20c6=a158_0x12ee0f;let _0x35b637=a158_0x13c10a[_0x2f20c6(0xeb)](_0x2c0676);const _0x3318bb=a158_0x13c10a[_0x2f20c6(0xe7)](_0x35b637)[_0x2f20c6(0xf4)];while(_0x35b637!==_0x3318bb){const _0x13b2c5=a158_0x13c10a[_0x2f20c6(0xea)](_0x35b637,TDX_CONFIG_FILE);if(existsSync(_0x13b2c5))return _0x13b2c5;_0x35b637=a158_0x13c10a[_0x2f20c6(0xfd)](_0x35b637);}return null;}export function loadTdxConfig(_0xe13d9d){const _0x3171b4=a158_0x12ee0f,_0x19799b=readFileSync(_0xe13d9d,_0x3171b4(0xf3));let _0x49b0c5;try{_0x49b0c5=JSON[_0x3171b4(0xe7)](_0x19799b);}catch{throw new Error(_0x3171b4(0xef)+_0xe13d9d);}if(!_0x49b0c5||typeof _0x49b0c5!=='object')throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x18ad57=_0x49b0c5,_0x462542=_0x18ad57[_0x3171b4(0xf9)]&&typeof _0x18ad57[_0x3171b4(0xf9)]===_0x3171b4(0xed),_0x3f09c2=_0x18ad57[_0x3171b4(0xf8)]&&typeof _0x18ad57[_0x3171b4(0xf8)]===_0x3171b4(0xed);if(!_0x462542&&!_0x3f09c2)throw new Error(_0x3171b4(0xf2));const _0x49590f={};return _0x462542&&(_0x49590f['parent_segment']=_0x18ad57[_0x3171b4(0xf9)]),_0x3f09c2&&(_0x49590f['engage_workspace']=_0x18ad57['engage_workspace']),_0x49590f;}export function findTdxConfig(_0x130082=process['cwd']()){const _0xa10b5e=a158_0x12ee0f,_0x1ff2b3=findTdxConfigPath(_0x130082);if(!_0x1ff2b3)throw new Error(_0xa10b5e(0xe3));const _0x502623=loadTdxConfig(_0x1ff2b3),_0x5e34a2=a158_0x13c10a[_0xa10b5e(0xfd)](_0x1ff2b3);return{'config':_0x502623,'configPath':_0x1ff2b3,'configDir':_0x5e34a2};}export function tryFindTdxConfig(_0x4f954d){try{return findTdxConfig(_0x4f954d);}catch{return null;}}export function getSegmentRootDir(_0x3a93dd,_0x2f30a9=process['cwd']()){return a158_0x13c10a['join'](_0x2f30a9,SEGMENTS_DIR,_0x3a93dd);}export function getTdxConfigPath(_0x57422d,_0x546556=process['cwd']()){const _0x1e61bc=a158_0x12ee0f;return a158_0x13c10a[_0x1e61bc(0xea)](getSegmentRootDir(_0x57422d,_0x546556),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x14b70a,_0x327b50){const _0x58e9b6=a158_0x12ee0f,_0x1678b7=a158_0x13c10a[_0x58e9b6(0xeb)](_0x14b70a),_0x4c9fbb=a158_0x13c10a['relative'](_0x327b50,_0x1678b7);if(_0x4c9fbb[_0x58e9b6(0xf0)]('..'))return'';return _0x4c9fbb;}export function localPathToTdFolderPath(_0x45a620){const _0x21142b=a158_0x12ee0f,_0x315988=a158_0x13c10a[_0x21142b(0xfd)](_0x45a620);if(_0x315988==='.'||_0x315988==='')return'';return _0x315988[_0x21142b(0xf6)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x34eb6f,_0x270ccc){const _0x148a16=a158_0x12ee0f;if(!_0x34eb6f)return _0x270ccc;return a158_0x13c10a[_0x148a16(0xea)](_0x270ccc,_0x34eb6f);}export function createTdxConfigContent(_0x10d711){const _0x569a8e={'parent_segment':_0x10d711};return JSON['stringify'](_0x569a8e,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x49b887){const _0x456543=a158_0x12ee0f,_0x3cf4fc={'engage_workspace':_0x49b887};return JSON[_0x456543(0xf7)](_0x3cf4fc,null,0x2)+'\x0a';}
1
+ const a158_0x4eceb4=a158_0x5340;(function(_0x2cf0a9,_0xa7342){const _0x35e426=a158_0x5340,_0x27bd3e=_0x2cf0a9();while(!![]){try{const _0x1a0b50=-parseInt(_0x35e426(0xab))/0x1*(parseInt(_0x35e426(0xa8))/0x2)+-parseInt(_0x35e426(0x99))/0x3+parseInt(_0x35e426(0xaa))/0x4*(-parseInt(_0x35e426(0x9f))/0x5)+parseInt(_0x35e426(0xa5))/0x6+-parseInt(_0x35e426(0xa0))/0x7*(parseInt(_0x35e426(0xa1))/0x8)+parseInt(_0x35e426(0xa6))/0x9*(-parseInt(_0x35e426(0xa9))/0xa)+parseInt(_0x35e426(0x9e))/0xb;if(_0x1a0b50===_0xa7342)break;else _0x27bd3e['push'](_0x27bd3e['shift']());}catch(_0x4dffcc){_0x27bd3e['push'](_0x27bd3e['shift']());}}}(a158_0x119f,0xcb4ae));import{existsSync,readFileSync}from'fs';import a158_0xfc7152 from'path';const TDX_CONFIG_FILE=a158_0x4eceb4(0x9a),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x37e7c1=process[a158_0x4eceb4(0xb1)]()){const _0x369d64=a158_0x4eceb4;let _0x1981cc=a158_0xfc7152[_0x369d64(0x9b)](_0x37e7c1);const _0x786d7=a158_0xfc7152[_0x369d64(0x9d)](_0x1981cc)[_0x369d64(0xa4)];while(_0x1981cc!==_0x786d7){const _0x51be03=a158_0xfc7152[_0x369d64(0xae)](_0x1981cc,TDX_CONFIG_FILE);if(existsSync(_0x51be03))return _0x51be03;_0x1981cc=a158_0xfc7152[_0x369d64(0x98)](_0x1981cc);}return null;}function a158_0x119f(){const _0x36a397=['parent_segment','string','join','replace','relative','cwd','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','dirname','2790516PRuNls','tdx.json','resolve','Invalid\x20tdx.json:\x20expected\x20object','parse','39040342XfbEal','476465ZyqpXi','130879BgkdbM','400syvfOs','Invalid\x20JSON\x20in\x20','engage_workspace','root','8539338pTjJme','582003bmKyGO','stringify','145306TsiWmu','90CwkQlQ','68ZsLbgH','1fCgGTa'];a158_0x119f=function(){return _0x36a397;};return a158_0x119f();}export function loadTdxConfig(_0x50d8ca){const _0x50c79d=a158_0x4eceb4,_0x4a522d=readFileSync(_0x50d8ca,'utf-8');let _0x14d109;try{_0x14d109=JSON['parse'](_0x4a522d);}catch{throw new Error(_0x50c79d(0xa2)+_0x50d8ca);}if(!_0x14d109||typeof _0x14d109!=='object')throw new Error(_0x50c79d(0x9c));const _0x4b7aad=_0x14d109,_0x65bd44=_0x4b7aad[_0x50c79d(0xac)]&&typeof _0x4b7aad[_0x50c79d(0xac)]===_0x50c79d(0xad),_0x1042c5=_0x4b7aad[_0x50c79d(0xa3)]&&typeof _0x4b7aad['engage_workspace']==='string';if(!_0x65bd44&&!_0x1042c5)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x2fd6b7={};return _0x65bd44&&(_0x2fd6b7[_0x50c79d(0xac)]=_0x4b7aad[_0x50c79d(0xac)]),_0x1042c5&&(_0x2fd6b7[_0x50c79d(0xa3)]=_0x4b7aad[_0x50c79d(0xa3)]),_0x2fd6b7;}export function findTdxConfig(_0xbac21d=process[a158_0x4eceb4(0xb1)]()){const _0x24b85c=a158_0x4eceb4,_0xd392dd=findTdxConfigPath(_0xbac21d);if(!_0xd392dd)throw new Error(_0x24b85c(0x97));const _0x9a8b92=loadTdxConfig(_0xd392dd),_0x3354d7=a158_0xfc7152['dirname'](_0xd392dd);return{'config':_0x9a8b92,'configPath':_0xd392dd,'configDir':_0x3354d7};}export function tryFindTdxConfig(_0x383a91){try{return findTdxConfig(_0x383a91);}catch{return null;}}export function getSegmentRootDir(_0x57ba64,_0x2216ec=process[a158_0x4eceb4(0xb1)]()){return a158_0xfc7152['join'](_0x2216ec,SEGMENTS_DIR,_0x57ba64);}export function getTdxConfigPath(_0x2dbdcf,_0x4772a6=process[a158_0x4eceb4(0xb1)]()){const _0xebb020=a158_0x4eceb4;return a158_0xfc7152[_0xebb020(0xae)](getSegmentRootDir(_0x2dbdcf,_0x4772a6),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x5bdb5c,_0x42c0fd){const _0xe1044b=a158_0x4eceb4,_0x4973b8=a158_0xfc7152[_0xe1044b(0x9b)](_0x5bdb5c),_0x9ee03e=a158_0xfc7152[_0xe1044b(0xb0)](_0x42c0fd,_0x4973b8);if(_0x9ee03e['startsWith']('..'))return'';return _0x9ee03e;}export function localPathToTdFolderPath(_0x1859bc){const _0x3c4902=a158_0x4eceb4,_0x91102b=a158_0xfc7152[_0x3c4902(0x98)](_0x1859bc);if(_0x91102b==='.'||_0x91102b==='')return'';return _0x91102b[_0x3c4902(0xaf)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x32e110,_0x492749){const _0x3a9436=a158_0x4eceb4;if(!_0x32e110)return _0x492749;return a158_0xfc7152[_0x3a9436(0xae)](_0x492749,_0x32e110);}export function createTdxConfigContent(_0x290151){const _0xa17562=a158_0x4eceb4,_0x2892fe={'parent_segment':_0x290151};return JSON[_0xa17562(0xa7)](_0x2892fe,null,0x2)+'\x0a';}function a158_0x5340(_0x18b887,_0x52bdd7){_0x18b887=_0x18b887-0x97;const _0x119f90=a158_0x119f();let _0x53400f=_0x119f90[_0x18b887];return _0x53400f;}export function createEngageTdxConfigContent(_0x2afd41){const _0x31e560={'engage_workspace':_0x2afd41};return JSON['stringify'](_0x31e560,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x597e46=a159_0x49a8;(function(_0x57922b,_0x4cc246){const _0x53ed18=a159_0x49a8,_0x1b5b91=_0x57922b();while(!![]){try{const _0xacfacb=parseInt(_0x53ed18(0x171))/0x1+parseInt(_0x53ed18(0x177))/0x2+-parseInt(_0x53ed18(0x183))/0x3*(-parseInt(_0x53ed18(0x163))/0x4)+-parseInt(_0x53ed18(0x178))/0x5+parseInt(_0x53ed18(0x16c))/0x6*(-parseInt(_0x53ed18(0x168))/0x7)+-parseInt(_0x53ed18(0x176))/0x8+parseInt(_0x53ed18(0x184))/0x9;if(_0xacfacb===_0x4cc246)break;else _0x1b5b91['push'](_0x1b5b91['shift']());}catch(_0x4f1e29){_0x1b5b91['push'](_0x1b5b91['shift']());}}}(a159_0x50c8,0xa53ee));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x597e46(0x17e)]([a159_0x597e46(0x188),a159_0x597e46(0x161),a159_0x597e46(0x162),'weekly',a159_0x597e46(0x174),'cron','minutes_interval']);function a159_0x49a8(_0x362f54,_0x51729f){_0x362f54=_0x362f54-0x161;const _0x50c858=a159_0x50c8();let _0x49a881=_0x50c858[_0x362f54];return _0x49a881;}export const RepeatUnitSchema=z[a159_0x597e46(0x17e)]([a159_0x597e46(0x16a),a159_0x597e46(0x17c),a159_0x597e46(0x173),a159_0x597e46(0x187),a159_0x597e46(0x172),a159_0x597e46(0x16b),a159_0x597e46(0x188)]);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x597e46(0x181)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x597e46(0x164)]()[a159_0x597e46(0x181)](),'repeat_sub_frequency':z['array'](z['number']())['optional'](),'start_at':z['string']()[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'end_on':z['string']()[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'timezone':z['string']()[a159_0x597e46(0x181)]()});export const NotificationDefSchema=z[a159_0x597e46(0x17d)]({'notify_on':z[a159_0x597e46(0x167)](z[a159_0x597e46(0x17e)]([a159_0x597e46(0x169),a159_0x597e46(0x180)]))[a159_0x597e46(0x181)](),'email_recipients':z['array'](z['string']())[a159_0x597e46(0x181)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x597e46(0x165)](),z[a159_0x597e46(0x17d)]({'name':z[a159_0x597e46(0x165)](),'type':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x181)](),'visibility':z['enum'](['clear',a159_0x597e46(0x170)])[a159_0x597e46(0x181)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x597e46(0x17d)]({'columns':z[a159_0x597e46(0x167)](z['object']({'name':z[a159_0x597e46(0x165)](),'type':z['string']()['optional'](),'visibility':z[a159_0x597e46(0x17e)](['clear',a159_0x597e46(0x170)])[a159_0x597e46(0x181)]()}))[a159_0x597e46(0x181)](),'behavior_table':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x181)](),'join_row':z[a159_0x597e46(0x164)]()[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'join_strategy':z[a159_0x597e46(0x17e)](['All',a159_0x597e46(0x182),a159_0x597e46(0x186),a159_0x597e46(0x179)])[a159_0x597e46(0x181)](),'formatting':z[a159_0x597e46(0x17e)]([a159_0x597e46(0x17b),a159_0x597e46(0x185)])[a159_0x597e46(0x181)](),'order_by':z[a159_0x597e46(0x167)](z[a159_0x597e46(0x17d)]({'key':z[a159_0x597e46(0x165)](),'order':z[a159_0x597e46(0x17e)]([a159_0x597e46(0x17a),a159_0x597e46(0x166)])}))['optional']()});export const ActivationDefSchema=z[a159_0x597e46(0x17d)]({'name':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x16d)](0x1,a159_0x597e46(0x175)),'description':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x181)](),'connection':z[a159_0x597e46(0x165)]()[a159_0x597e46(0x16d)](0x1,a159_0x597e46(0x16e)),'all_columns':z['boolean']()['optional'](),'columns':z['array'](ActivationColumnDefSchema)[a159_0x597e46(0x181)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x597e46(0x181)](),'connector_config':z['record'](z[a159_0x597e46(0x165)](),z['unknown']())[a159_0x597e46(0x181)](),'activation_template_id':z[a159_0x597e46(0x165)]()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x597e46(0x17f)]()[a159_0x597e46(0x181)](),'run_after_journey_refresh':z[a159_0x597e46(0x16f)]()[a159_0x597e46(0x181)](),'nested_workflow_project_name':z['string']()[a159_0x597e46(0x181)](),'nested_workflow_name':z[a159_0x597e46(0x165)]()['optional'](),'lock_enabled':z['boolean']()[a159_0x597e46(0x181)]()});function a159_0x50c8(){const _0x920df4=['119819axAifa','onSuccess','minute','once','414aLvTbn','min','Connection\x20name\x20is\x20required','boolean','masked','54820JHssCO','month','day','monthly','Activation\x20name\x20is\x20required','9828552SBejbC','2378648xyXwFY','6393210lYLjIi','Top-N','asc','rows','hour','object','enum','nullable','onFailure','optional','First','1911haJYPI','18405837iFyGZp','cols','Last','week','none','hourly','daily','6756SBCqtE','number','string','desc','array'];a159_0x50c8=function(){return _0x920df4;};return a159_0x50c8();}
1
+ const a159_0x4e4327=a159_0x5e04;function a159_0x5e04(_0x40d58c,_0x5b006b){_0x40d58c=_0x40d58c-0x10d;const _0x4765ea=a159_0x4765();let _0x5e0453=_0x4765ea[_0x40d58c];return _0x5e0453;}(function(_0x9ccc2c,_0x16b215){const _0x36ba2b=a159_0x5e04,_0x66c47b=_0x9ccc2c();while(!![]){try{const _0x1fcf30=-parseInt(_0x36ba2b(0x10d))/0x1*(parseInt(_0x36ba2b(0x135))/0x2)+-parseInt(_0x36ba2b(0x111))/0x3+-parseInt(_0x36ba2b(0x11e))/0x4*(parseInt(_0x36ba2b(0x124))/0x5)+parseInt(_0x36ba2b(0x12e))/0x6+parseInt(_0x36ba2b(0x130))/0x7+parseInt(_0x36ba2b(0x11c))/0x8*(parseInt(_0x36ba2b(0x10f))/0x9)+parseInt(_0x36ba2b(0x121))/0xa*(parseInt(_0x36ba2b(0x133))/0xb);if(_0x1fcf30===_0x16b215)break;else _0x66c47b['push'](_0x66c47b['shift']());}catch(_0x58e76c){_0x66c47b['push'](_0x66c47b['shift']());}}}(a159_0x4765,0x19cdb));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x123),a159_0x4e4327(0x10e),a159_0x4e4327(0x12d),'weekly',a159_0x4e4327(0x118),a159_0x4e4327(0x117),a159_0x4e4327(0x11d)]);export const RepeatUnitSchema=z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x119),'hour',a159_0x4e4327(0x12c),a159_0x4e4327(0x12f),a159_0x4e4327(0x113),a159_0x4e4327(0x12a),a159_0x4e4327(0x123)]);export const ScheduleDefSchema=z[a159_0x4e4327(0x129)]({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z['number']()['optional'](),'repeat_sub_frequency':z[a159_0x4e4327(0x132)](z[a159_0x4e4327(0x11a)]())[a159_0x4e4327(0x127)](),'start_at':z[a159_0x4e4327(0x131)]()['nullable']()[a159_0x4e4327(0x127)](),'end_on':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'timezone':z[a159_0x4e4327(0x131)]()['optional']()});export const NotificationDefSchema=z[a159_0x4e4327(0x129)]({'notify_on':z[a159_0x4e4327(0x132)](z['enum']([a159_0x4e4327(0x11f),a159_0x4e4327(0x11b)]))[a159_0x4e4327(0x127)](),'email_recipients':z['array'](z[a159_0x4e4327(0x131)]())[a159_0x4e4327(0x127)]()});export const ActivationColumnDefSchema=z[a159_0x4e4327(0x114)]([z[a159_0x4e4327(0x131)](),z[a159_0x4e4327(0x129)]({'name':z[a159_0x4e4327(0x131)](),'type':z['string']()['optional'](),'visibility':z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x137),a159_0x4e4327(0x112)])[a159_0x4e4327(0x127)]()})]);function a159_0x4765(){const _0x394635=['613613pkNkNj','boolean','24Rmefuk','cols','clear','2246GYVIxV','hourly','9DOSoNR','desc','158619VKVuMd','masked','month','union','asc','enum','cron','monthly','minute','number','onFailure','234808KpbtlL','minutes_interval','392TbdlGR','onSuccess','Top-N','10GXnJQr','min','none','9770sGsSgi','First','Last','optional','Activation\x20name\x20is\x20required','object','once','nullable','day','daily','866118zbPnsz','week','1032647NLKDeP','string','array'];a159_0x4765=function(){return _0x394635;};return a159_0x4765();}export const ActivationBehaviorDefSchema=z[a159_0x4e4327(0x129)]({'columns':z['array'](z[a159_0x4e4327(0x129)]({'name':z[a159_0x4e4327(0x131)](),'type':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'visibility':z[a159_0x4e4327(0x116)]([a159_0x4e4327(0x137),a159_0x4e4327(0x112)])[a159_0x4e4327(0x127)]()}))[a159_0x4e4327(0x127)](),'behavior_table':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'join_row':z[a159_0x4e4327(0x11a)]()[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'join_strategy':z[a159_0x4e4327(0x116)](['All',a159_0x4e4327(0x125),a159_0x4e4327(0x126),a159_0x4e4327(0x120)])['optional'](),'formatting':z[a159_0x4e4327(0x116)](['rows',a159_0x4e4327(0x136)])['optional'](),'order_by':z[a159_0x4e4327(0x132)](z[a159_0x4e4327(0x129)]({'key':z['string'](),'order':z['enum']([a159_0x4e4327(0x115),a159_0x4e4327(0x110)])}))[a159_0x4e4327(0x127)]()});export const ActivationDefSchema=z[a159_0x4e4327(0x129)]({'name':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x122)](0x1,a159_0x4e4327(0x128)),'description':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'connection':z['string']()[a159_0x4e4327(0x122)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a159_0x4e4327(0x134)]()[a159_0x4e4327(0x127)](),'columns':z[a159_0x4e4327(0x132)](ActivationColumnDefSchema)[a159_0x4e4327(0x127)](),'schedule':ScheduleDefSchema[a159_0x4e4327(0x127)](),'notification':NotificationDefSchema[a159_0x4e4327(0x127)](),'connector_config':z['record'](z[a159_0x4e4327(0x131)](),z['unknown']())[a159_0x4e4327(0x127)](),'activation_template_id':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'behavior':ActivationBehaviorDefSchema[a159_0x4e4327(0x12b)]()[a159_0x4e4327(0x127)](),'run_after_journey_refresh':z[a159_0x4e4327(0x134)]()['optional'](),'nested_workflow_project_name':z[a159_0x4e4327(0x131)]()['optional'](),'nested_workflow_name':z[a159_0x4e4327(0x131)]()[a159_0x4e4327(0x127)](),'lock_enabled':z[a159_0x4e4327(0x134)]()[a159_0x4e4327(0x127)]()});
@@ -1 +1 @@
1
- function a160_0x54bc(_0x35c858,_0x416677){_0x35c858=_0x35c858-0x15b;var _0x1162d0=a160_0x1162();var _0x54bc69=_0x1162d0[_0x35c858];return _0x54bc69;}(function(_0x5803d5,_0x2831fc){var _0x410443=a160_0x54bc,_0x3904fd=_0x5803d5();while(!![]){try{var _0x221d9c=-parseInt(_0x410443(0x160))/0x1+-parseInt(_0x410443(0x163))/0x2+-parseInt(_0x410443(0x161))/0x3*(parseInt(_0x410443(0x15d))/0x4)+parseInt(_0x410443(0x15c))/0x5+parseInt(_0x410443(0x162))/0x6*(-parseInt(_0x410443(0x15f))/0x7)+-parseInt(_0x410443(0x164))/0x8*(-parseInt(_0x410443(0x15e))/0x9)+parseInt(_0x410443(0x15b))/0xa;if(_0x221d9c===_0x2831fc)break;else _0x3904fd['push'](_0x3904fd['shift']());}catch(_0x4a5bfc){_0x3904fd['push'](_0x3904fd['shift']());}}}(a160_0x1162,0x2bd74));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x1162(){var _0x2c83a3=['1112BHWYgG','45JDCZcF','14zoWMfL','41969wtYjcN','699uikjWn','118554HKcLoF','322868KkBmdr','143248GAqsXX','2502400xBaTVy','737485gylzDY'];a160_0x1162=function(){return _0x2c83a3;};return a160_0x1162();}
1
+ function a160_0x1450(){var _0x2264d8=['21YUYYwr','367475YwTqfG','207RQPqvX','11lAIUJB','1921494eHaTpC','1877814IMrgXr','8134xpOiFC','2672980jZQpBE','1506370ksVzfN','5818560UxhWom'];a160_0x1450=function(){return _0x2264d8;};return a160_0x1450();}function a160_0x345c(_0x29b1d2,_0x51c2a7){_0x29b1d2=_0x29b1d2-0x1aa;var _0x1450e4=a160_0x1450();var _0x345c85=_0x1450e4[_0x29b1d2];return _0x345c85;}(function(_0xbfee56,_0x17e682){var _0x38c7a7=a160_0x345c,_0x5b3f43=_0xbfee56();while(!![]){try{var _0x172c4a=parseInt(_0x38c7a7(0x1ad))/0x1*(-parseInt(_0x38c7a7(0x1b0))/0x2)+-parseInt(_0x38c7a7(0x1ae))/0x3+-parseInt(_0x38c7a7(0x1b1))/0x4+parseInt(_0x38c7a7(0x1ab))/0x5+-parseInt(_0x38c7a7(0x1af))/0x6*(parseInt(_0x38c7a7(0x1aa))/0x7)+-parseInt(_0x38c7a7(0x1b3))/0x8+parseInt(_0x38c7a7(0x1ac))/0x9*(parseInt(_0x38c7a7(0x1b2))/0xa);if(_0x172c4a===_0x17e682)break;else _0x5b3f43['push'](_0x5b3f43['shift']());}catch(_0x32d9c0){_0x5b3f43['push'](_0x5b3f43['shift']());}}}(a160_0x1450,0x7e927));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a161_0x40accb=a161_0x303e;(function(_0x4940d2,_0x20c7f7){const _0x219e91=a161_0x303e,_0x5d1e81=_0x4940d2();while(!![]){try{const _0x20c31b=-parseInt(_0x219e91(0x100))/0x1*(-parseInt(_0x219e91(0xff))/0x2)+parseInt(_0x219e91(0xf7))/0x3+parseInt(_0x219e91(0xfc))/0x4+-parseInt(_0x219e91(0xf2))/0x5*(parseInt(_0x219e91(0xda))/0x6)+parseInt(_0x219e91(0xde))/0x7*(parseInt(_0x219e91(0xf5))/0x8)+parseInt(_0x219e91(0xe4))/0x9*(-parseInt(_0x219e91(0xf9))/0xa)+-parseInt(_0x219e91(0xf1))/0xb;if(_0x20c31b===_0x20c7f7)break;else _0x5d1e81['push'](_0x5d1e81['shift']());}catch(_0x247d23){_0x5d1e81['push'](_0x5d1e81['shift']());}}}(a161_0x4596,0xcd469));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x303e(_0xc35b95,_0x53ab19){_0xc35b95=_0xc35b95-0xda;const _0x4596a3=a161_0x4596();let _0x303e28=_0x4596a3[_0xc35b95];return _0x303e28;}import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x40accb(0xf4)](['draft',a161_0x40accb(0xeb),a161_0x40accb(0xdf)]);export const ReentryModeTypeSchema=z[a161_0x40accb(0xf4)](['no_reentry',a161_0x40accb(0xfb),a161_0x40accb(0xf6)]);export const WaitUnitTypeSchema=z[a161_0x40accb(0xf4)]([a161_0x40accb(0x101),a161_0x40accb(0xfe)]);export const StepTypeValueSchema=z[a161_0x40accb(0xf4)]([a161_0x40accb(0xe1),a161_0x40accb(0xe6),a161_0x40accb(0xe8),a161_0x40accb(0xed),a161_0x40accb(0xec),a161_0x40accb(0xf8),a161_0x40accb(0xf0)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x40accb(0xf3)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z['string']()[a161_0x40accb(0xe2)]()});export const CriteriaDefSchema=z[a161_0x40accb(0xf3)]({'name':z['string'](),'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x40accb(0xe2)]()});const WaitConditionTimeoutDefSchema=z[a161_0x40accb(0xf3)]({'duration':z[a161_0x40accb(0xea)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)]()}),WaitConditionDefSchema=z['object']({'segment':z['string'](),'next':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x40accb(0xdc)]()['optional'](),'condition':WaitConditionDefSchema[a161_0x40accb(0xe2)](),'days_of_week':z[a161_0x40accb(0xe5)](z[a161_0x40accb(0xdc)]())[a161_0x40accb(0xe2)]()}),StepBaseFields={'name':z[a161_0x40accb(0xdc)](),'uuid':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'next':z[a161_0x40accb(0xdc)]()['optional']()},WaitStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z['literal'](a161_0x40accb(0xe1)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x40accb(0xdc)]()}),ActivationStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x40accb(0xf3)]({'name':z['string'](),'segment':z['string']()[a161_0x40accb(0xe2)](),'segment_id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'excluded':z[a161_0x40accb(0xe0)]()['optional'](),'next':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)]()}),DecisionPointStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'branches':z[a161_0x40accb(0xe5)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0xe8)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'name':z['string'](),'percentage':z[a161_0x40accb(0xea)](),'next':z['string']()[a161_0x40accb(0xe2)]()}),AbTestStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x40accb(0xe2)](),'customized_split':z[a161_0x40accb(0xe0)]()[a161_0x40accb(0xe2)]()}),AbTestStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0xed)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z['literal']('merge')}),JumpStepParamsDefSchema=z[a161_0x40accb(0xf3)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x40accb(0xf3)]({...StepBaseFields,'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0xf0))})[a161_0x40accb(0x103)]();export const StepDefSchema=z[a161_0x40accb(0xee)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);function a161_0x4596(){const _0x4db899=['record','Journey\x20name\x20is\x20required','6982230MBJomC','isArray','string','filter','269815PhDGOs','launched','boolean','wait','optional','literal','1693485gStRhX','array','activation','refine','decision_point','length','number','simulation','merge','ab_test','discriminatedUnion','lazy','end','4911951TKnVdT','5UETXTh','object','enum','104xvfxTn','reentry_always','4465347vnpZIH','jump','60XUWoJi','versions','reentry_unless_goal_achieved','697516CGVGkC','stages','week','8CfCULh','354033wZUpHD','day','journey','passthrough'];a161_0x4596=function(){return _0x4db899;};return a161_0x4596();}export const StageDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'entry_criteria':CriteriaDefSchema[a161_0x40accb(0xe2)](),'exit_criteria':z[a161_0x40accb(0xe5)](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x40accb(0xe2)](),'root_step':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'steps':z[a161_0x40accb(0xe5)](StepDefSchema)[a161_0x40accb(0xe2)]()});export const JourneyEntryDefSchema=z[a161_0x40accb(0xf3)]({'name':z['string']()[a161_0x40accb(0xe2)](),'version':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'state':JourneyStateTypeSchema[a161_0x40accb(0xe2)](),'latest':z[a161_0x40accb(0xe0)]()[a161_0x40accb(0xe2)](),'stages':z[a161_0x40accb(0xe5)](StageDefSchema),'id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'version_number':z[a161_0x40accb(0xea)]()[a161_0x40accb(0xe2)](),'goal':CriteriaDefSchema[a161_0x40accb(0xe2)](),'reentry':ReentryModeTypeSchema[a161_0x40accb(0xe2)]()});export const JourneyDefSchema=z[a161_0x40accb(0xef)](()=>z[a161_0x40accb(0xf3)]({'type':z[a161_0x40accb(0xe3)](a161_0x40accb(0x102)),'name':z['string']()['min'](0x1,a161_0x40accb(0x105)),'description':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'bundle_id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'bundle_name':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'folder_id':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x40accb(0xe0)]()['optional'](),'goal':CriteriaDefSchema[a161_0x40accb(0xe2)](),'id':z['string']()[a161_0x40accb(0xe2)](),'version':z[a161_0x40accb(0xdc)]()[a161_0x40accb(0xe2)](),'version_number':z[a161_0x40accb(0xea)]()[a161_0x40accb(0xe2)](),'stages':z[a161_0x40accb(0xe5)](StageDefSchema)[a161_0x40accb(0xe2)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x40accb(0xe2)](),'journeys':z[a161_0x40accb(0xe5)](JourneyEntryDefSchema)[a161_0x40accb(0xe2)](),'segments':z['record'](z[a161_0x40accb(0xdc)](),EmbeddedSegmentDefSchema)[a161_0x40accb(0xe2)](),'activations':z[a161_0x40accb(0x104)](z['string'](),ActivationDefSchema)[a161_0x40accb(0xe2)]()})[a161_0x40accb(0xe7)](_0x5aeb0a=>{const _0x49ebef=a161_0x40accb,_0x186470=[_0x5aeb0a['journeys'],_0x5aeb0a[_0x49ebef(0xfd)],_0x5aeb0a[_0x49ebef(0xfa)]][_0x49ebef(0xdd)](_0x541931=>Array[_0x49ebef(0xdb)](_0x541931)&&_0x541931[_0x49ebef(0xe9)]>0x0)[_0x49ebef(0xe9)];return _0x186470===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x52e1e0=a161_0x338b;(function(_0x36366a,_0x47c398){const _0x3b25f8=a161_0x338b,_0x195056=_0x36366a();while(!![]){try{const _0xb18952=-parseInt(_0x3b25f8(0x159))/0x1+parseInt(_0x3b25f8(0x142))/0x2+-parseInt(_0x3b25f8(0x15a))/0x3+-parseInt(_0x3b25f8(0x15d))/0x4+-parseInt(_0x3b25f8(0x137))/0x5*(-parseInt(_0x3b25f8(0x143))/0x6)+-parseInt(_0x3b25f8(0x14a))/0x7+parseInt(_0x3b25f8(0x155))/0x8;if(_0xb18952===_0x47c398)break;else _0x195056['push'](_0x195056['shift']());}catch(_0x5057e0){_0x195056['push'](_0x195056['shift']());}}}(a161_0x6300,0x19646));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x52e1e0(0x145)]([a161_0x52e1e0(0x13b),a161_0x52e1e0(0x14b),'launched']);export const ReentryModeTypeSchema=z[a161_0x52e1e0(0x145)]([a161_0x52e1e0(0x147),a161_0x52e1e0(0x14c),a161_0x52e1e0(0x14e)]);export const WaitUnitTypeSchema=z['enum']([a161_0x52e1e0(0x141),a161_0x52e1e0(0x14f)]);function a161_0x6300(){const _0x571ac1=['week','min','decision_point','record','jump','array','3091944GzYljL','journeys','ab_test','lazy','20803ZEveQl','468501pFIAgL','string','end','637704lZBmFd','415FMMDcU','stages','passthrough','activation','draft','literal','refine','discriminatedUnion','length','object','day','29906vMhjDa','7662LkXQSz','number','enum','optional','no_reentry','wait','boolean','469245ayOlvK','simulation','reentry_unless_goal_achieved','merge','reentry_always'];a161_0x6300=function(){return _0x571ac1;};return a161_0x6300();}export const StepTypeValueSchema=z[a161_0x52e1e0(0x145)]([a161_0x52e1e0(0x148),a161_0x52e1e0(0x13a),a161_0x52e1e0(0x151),a161_0x52e1e0(0x157),a161_0x52e1e0(0x14d),'jump',a161_0x52e1e0(0x15c)]);export const EmbeddedSegmentDefSchema=z['object']({'description':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'rule':RuleDefSchema});function a161_0x338b(_0x1a69af,_0x577a50){_0x1a69af=_0x1a69af-0x137;const _0x6300bd=a161_0x6300();let _0x338bfb=_0x6300bd[_0x1a69af];return _0x338bfb;}const JumpTargetDefSchema=z[a161_0x52e1e0(0x140)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z['string']()[a161_0x52e1e0(0x146)]()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x52e1e0(0x146)]()});const WaitConditionTimeoutDefSchema=z[a161_0x52e1e0(0x140)]({'duration':z[a161_0x52e1e0(0x144)](),'unit':WaitUnitTypeSchema,'next':z['string']()['optional']()}),WaitConditionDefSchema=z[a161_0x52e1e0(0x140)]({'segment':z[a161_0x52e1e0(0x15b)](),'next':z['string']()[a161_0x52e1e0(0x146)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x52e1e0(0x146)]()}),WaitStepParamsDefSchema=z[a161_0x52e1e0(0x140)]({'duration':z[a161_0x52e1e0(0x144)]()[a161_0x52e1e0(0x146)](),'unit':WaitUnitTypeSchema[a161_0x52e1e0(0x146)](),'wait_until':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'condition':WaitConditionDefSchema[a161_0x52e1e0(0x146)](),'days_of_week':z[a161_0x52e1e0(0x154)](z[a161_0x52e1e0(0x15b)]())[a161_0x52e1e0(0x146)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'next':z[a161_0x52e1e0(0x15b)]()['optional']()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x148)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x52e1e0(0x15b)]()}),ActivationStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x13a)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x52e1e0(0x140)]({'name':z['string'](),'segment':z['string']()['optional'](),'segment_id':z['string']()[a161_0x52e1e0(0x146)](),'excluded':z[a161_0x52e1e0(0x149)]()[a161_0x52e1e0(0x146)](),'next':z['string']()[a161_0x52e1e0(0x146)]()}),DecisionPointStepParamsDefSchema=z[a161_0x52e1e0(0x140)]({'branches':z[a161_0x52e1e0(0x154)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x52e1e0(0x151)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x52e1e0(0x140)]({'id':z[a161_0x52e1e0(0x15b)]()['optional'](),'name':z[a161_0x52e1e0(0x15b)](),'percentage':z[a161_0x52e1e0(0x144)](),'next':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x52e1e0(0x146)](),'customized_split':z['boolean']()[a161_0x52e1e0(0x146)]()}),AbTestStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x157)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x14d))}),JumpStepParamsDefSchema=z[a161_0x52e1e0(0x140)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x52e1e0(0x140)]({...StepBaseFields,'type':z['literal'](a161_0x52e1e0(0x153)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x52e1e0(0x13c)](a161_0x52e1e0(0x15c))})[a161_0x52e1e0(0x139)]();export const StepDefSchema=z[a161_0x52e1e0(0x13e)]('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x52e1e0(0x140)]({'name':z[a161_0x52e1e0(0x15b)](),'description':z['string']()[a161_0x52e1e0(0x146)](),'id':z[a161_0x52e1e0(0x15b)]()['optional'](),'entry_criteria':CriteriaDefSchema[a161_0x52e1e0(0x146)](),'exit_criteria':z[a161_0x52e1e0(0x154)](CriteriaDefSchema)[a161_0x52e1e0(0x146)](),'milestone':CriteriaDefSchema[a161_0x52e1e0(0x146)](),'root_step':z['string']()['optional'](),'steps':z[a161_0x52e1e0(0x154)](StepDefSchema)[a161_0x52e1e0(0x146)]()});export const JourneyEntryDefSchema=z[a161_0x52e1e0(0x140)]({'name':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'version':z[a161_0x52e1e0(0x15b)]()['optional'](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a161_0x52e1e0(0x149)]()[a161_0x52e1e0(0x146)](),'stages':z[a161_0x52e1e0(0x154)](StageDefSchema),'id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'version_number':z[a161_0x52e1e0(0x144)]()[a161_0x52e1e0(0x146)](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a161_0x52e1e0(0x146)]()});export const JourneyDefSchema=z[a161_0x52e1e0(0x158)](()=>z[a161_0x52e1e0(0x140)]({'type':z[a161_0x52e1e0(0x13c)]('journey'),'name':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x150)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'bundle_id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'bundle_name':z['string']()['optional'](),'folder_id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'reentry':ReentryModeTypeSchema[a161_0x52e1e0(0x146)](),'allow_reentry':z[a161_0x52e1e0(0x149)]()[a161_0x52e1e0(0x146)](),'goal':CriteriaDefSchema[a161_0x52e1e0(0x146)](),'id':z[a161_0x52e1e0(0x15b)]()[a161_0x52e1e0(0x146)](),'version':z[a161_0x52e1e0(0x15b)]()['optional'](),'version_number':z['number']()[a161_0x52e1e0(0x146)](),'stages':z['array'](StageDefSchema)[a161_0x52e1e0(0x146)](),'versions':z[a161_0x52e1e0(0x154)](JourneyEntryDefSchema)[a161_0x52e1e0(0x146)](),'journeys':z[a161_0x52e1e0(0x154)](JourneyEntryDefSchema)[a161_0x52e1e0(0x146)](),'segments':z[a161_0x52e1e0(0x152)](z['string'](),EmbeddedSegmentDefSchema)[a161_0x52e1e0(0x146)](),'activations':z['record'](z[a161_0x52e1e0(0x15b)](),ActivationDefSchema)[a161_0x52e1e0(0x146)]()})[a161_0x52e1e0(0x13d)](_0x49425b=>{const _0x1f83fd=a161_0x52e1e0,_0x263d57=[_0x49425b[_0x1f83fd(0x156)],_0x49425b[_0x1f83fd(0x138)],_0x49425b['versions']]['filter'](_0x6f57f6=>Array['isArray'](_0x6f57f6)&&_0x6f57f6['length']>0x0)[_0x1f83fd(0x13f)];return _0x263d57===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a163_0x167c(){var _0x3c3dd8=['11jiqufe','1828177OhSPcB','8wDfnBk','7120UTXSiK','22005pHoOJw','284605ObZFsU','459VpzLfe','1803nLKNdY','96LEpAiz','836586FUlseW','21FtFZmQ','348YNDgFK','3693470YkBehT'];a163_0x167c=function(){return _0x3c3dd8;};return a163_0x167c();}function a163_0x34d8(_0x14509d,_0x2b2ded){_0x14509d=_0x14509d-0x1f1;var _0x167c72=a163_0x167c();var _0x34d879=_0x167c72[_0x14509d];return _0x34d879;}(function(_0x309a57,_0x28da36){var _0x49cca5=a163_0x34d8,_0x54597e=_0x309a57();while(!![]){try{var _0x138f32=-parseInt(_0x49cca5(0x1fc))/0x1+parseInt(_0x49cca5(0x1f6))/0x2*(-parseInt(_0x49cca5(0x1f2))/0x3)+-parseInt(_0x49cca5(0x1fa))/0x4*(-parseInt(_0x49cca5(0x1fd))/0x5)+-parseInt(_0x49cca5(0x1f4))/0x6*(parseInt(_0x49cca5(0x1f5))/0x7)+-parseInt(_0x49cca5(0x1fb))/0x8*(parseInt(_0x49cca5(0x1f1))/0x9)+parseInt(_0x49cca5(0x1f7))/0xa*(-parseInt(_0x49cca5(0x1f8))/0xb)+parseInt(_0x49cca5(0x1f3))/0xc*(parseInt(_0x49cca5(0x1f9))/0xd);if(_0x138f32===_0x28da36)break;else _0x54597e['push'](_0x54597e['shift']());}catch(_0x277a66){_0x54597e['push'](_0x54597e['shift']());}}}(a163_0x167c,0x442e1));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x268a6b,_0x4a2727){var _0x33a594=a163_0x258c,_0x5b77c1=_0x268a6b();while(!![]){try{var _0x4d37e0=-parseInt(_0x33a594(0x192))/0x1*(-parseInt(_0x33a594(0x193))/0x2)+-parseInt(_0x33a594(0x18e))/0x3*(parseInt(_0x33a594(0x188))/0x4)+parseInt(_0x33a594(0x194))/0x5*(parseInt(_0x33a594(0x18d))/0x6)+-parseInt(_0x33a594(0x18a))/0x7*(-parseInt(_0x33a594(0x18f))/0x8)+-parseInt(_0x33a594(0x18b))/0x9*(parseInt(_0x33a594(0x18c))/0xa)+parseInt(_0x33a594(0x189))/0xb*(-parseInt(_0x33a594(0x190))/0xc)+parseInt(_0x33a594(0x191))/0xd;if(_0x4d37e0===_0x4a2727)break;else _0x5b77c1['push'](_0x5b77c1['shift']());}catch(_0x597be1){_0x5b77c1['push'](_0x5b77c1['shift']());}}}(a163_0x48af,0xd94de));function a163_0x258c(_0x4e3cbe,_0x82838e){_0x4e3cbe=_0x4e3cbe-0x188;var _0x48afc5=a163_0x48af();var _0x258cc2=_0x48afc5[_0x4e3cbe];return _0x258cc2;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0x48af(){var _0x519662=['1458017OnLqbb','35eVVKRb','9oBmnVP','135950CuAOMt','1014084jiOVNH','3oTpCXc','2044536kBiIMA','48iwcURn','7616388CCQhmP','1bqAWJJ','676108eInAEv','5ATZemL','3747672wApAot'];a163_0x48af=function(){return _0x519662;};return a163_0x48af();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a164_0x12d8ac=a164_0x16ed;(function(_0x1dd474,_0x5a64f7){const _0x2be308=a164_0x16ed,_0x47575f=_0x1dd474();while(!![]){try{const _0x345a5a=parseInt(_0x2be308(0x1d4))/0x1+-parseInt(_0x2be308(0x1dc))/0x2+parseInt(_0x2be308(0x1e0))/0x3*(-parseInt(_0x2be308(0x207))/0x4)+-parseInt(_0x2be308(0x209))/0x5+parseInt(_0x2be308(0x1e8))/0x6+-parseInt(_0x2be308(0x1fa))/0x7*(parseInt(_0x2be308(0x213))/0x8)+parseInt(_0x2be308(0x1e6))/0x9;if(_0x345a5a===_0x5a64f7)break;else _0x47575f['push'](_0x47575f['shift']());}catch(_0x419039){_0x47575f['push'](_0x47575f['shift']());}}}(a164_0x3ef0,0x7ee56));import{z}from'zod';function a164_0x16ed(_0x2493e0,_0x120bec){_0x2493e0=_0x2493e0-0x1d1;const _0x3ef014=a164_0x3ef0();let _0x16ed31=_0x3ef014[_0x2493e0];return _0x16ed31;}export const OperatorTypeSchema=z[a164_0x12d8ac(0x21c)](['Equal',a164_0x12d8ac(0x1df),a164_0x12d8ac(0x1f4),a164_0x12d8ac(0x1fc),a164_0x12d8ac(0x1e4),'In',a164_0x12d8ac(0x1ef),a164_0x12d8ac(0x1e9),'IsNull',a164_0x12d8ac(0x1da),'TimeWithinNext',a164_0x12d8ac(0x1f6),a164_0x12d8ac(0x204),'EndWith',a164_0x12d8ac(0x20d)]);export const TimeUnitSchema=z[a164_0x12d8ac(0x21c)](['second',a164_0x12d8ac(0x205),'hour','day',a164_0x12d8ac(0x1e5),a164_0x12d8ac(0x20f),a164_0x12d8ac(0x201)]);export const AggregationTypeSchema=z[a164_0x12d8ac(0x21c)](['Count',a164_0x12d8ac(0x202),'Average',a164_0x12d8ac(0x20b),a164_0x12d8ac(0x218),'CountDistinct','First',a164_0x12d8ac(0x1d8)]);const TemporalValueSchema=z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1fb)]({'timestamp':z[a164_0x12d8ac(0x1f8)]()}),z['object']({'last':z['union']([z['number'](),z[a164_0x12d8ac(0x1ec)](z['string'](),z['number']())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a164_0x12d8ac(0x1f8)](),z['number'](),z[a164_0x12d8ac(0x1d3)](),TemporalValueSchema,z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1e3)]([z['string'](),z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1d3)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x12d8ac(0x212),'Greater',a164_0x12d8ac(0x1fc),a164_0x12d8ac(0x1f4),a164_0x12d8ac(0x1e4),'In',a164_0x12d8ac(0x1f6),a164_0x12d8ac(0x204),a164_0x12d8ac(0x20a),'Regexp',a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5)]);export const OperatorDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':OperatorTypeSchema,'not':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'value':OperatorValueSchema[a164_0x12d8ac(0x1f2)](),'min':z['union']([z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1f8)](),TemporalValueSchema])[a164_0x12d8ac(0x1f2)](),'max':z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1db)](),z['string'](),TemporalValueSchema])[a164_0x12d8ac(0x1f2)](),'unit':TimeUnitSchema[a164_0x12d8ac(0x1f2)](),'duration':z[a164_0x12d8ac(0x1fb)]({'day':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'week':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'month':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'year':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'hour':z['number']()[a164_0x12d8ac(0x1f2)](),'minute':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)](),'second':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x1f2)](),'from':z[a164_0x12d8ac(0x1fb)]({'last':z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1db)](),z[a164_0x12d8ac(0x1f8)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x20e)]((_0x18a1d0,_0x500a2e)=>{const _0x266feb=a164_0x12d8ac;OPERATORS_REQUIRING_VALUE['has'](_0x18a1d0[_0x266feb(0x1f9)])&&(_0x18a1d0[_0x266feb(0x1e2)]===undefined||_0x18a1d0[_0x266feb(0x1e2)]===null)&&_0x500a2e['addIssue']({'code':_0x266feb(0x206),'message':'Operator\x20\x27'+_0x18a1d0[_0x266feb(0x1f9)]+'\x27\x20requires\x20a\x20value','path':[_0x266feb(0x1e2)]}),_0x18a1d0[_0x266feb(0x1f9)]==='Between'&&_0x18a1d0['min']===undefined&&_0x18a1d0[_0x266feb(0x1d5)]===undefined&&_0x500a2e[_0x266feb(0x20c)]({'code':'custom','message':_0x266feb(0x1dd),'params':{'validationCode':_0x266feb(0x1fe)}}),OPERATORS_REQUIRING_UNIT['has'](_0x18a1d0['type'])&&_0x18a1d0[_0x266feb(0x1e2)]!==undefined&&!_0x18a1d0['unit']&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':'Operator\x20\x27'+_0x18a1d0[_0x266feb(0x1f9)]+_0x266feb(0x21b),'path':[_0x266feb(0x1d2)],'params':{'validationCode':_0x266feb(0x21e)}}),_0x18a1d0['type']===_0x266feb(0x20d)&&(!_0x18a1d0[_0x266feb(0x1f1)]&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':_0x266feb(0x211),'path':[_0x266feb(0x1f1)]}),!_0x18a1d0[_0x266feb(0x1e7)]&&_0x500a2e[_0x266feb(0x20c)]({'code':_0x266feb(0x206),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x266feb(0x1e7)]}));});export const ArrayMatchingSchema=z[a164_0x12d8ac(0x1e3)]([z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1f3)),z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1eb)),z[a164_0x12d8ac(0x1fb)]({'atLeast':z[a164_0x12d8ac(0x1db)]()}),z['object']({'atMost':z['number']()}),z['object']({'exactly':z[a164_0x12d8ac(0x1db)]()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x12d8ac(0x1f9),[z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['Sum',a164_0x12d8ac(0x20b),a164_0x12d8ac(0x218),a164_0x12d8ac(0x1ff)]),'column':z[a164_0x12d8ac(0x1f8)](),'groupingColumns':z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1f8)]())[a164_0x12d8ac(0x1f2)]()}),z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x214)),'groupingColumns':z[a164_0x12d8ac(0x1fd)](z['string']())[a164_0x12d8ac(0x1f2)]()}),z['object']({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x210)),'columns':z[a164_0x12d8ac(0x1fd)](z[a164_0x12d8ac(0x1f8)]())}),z[a164_0x12d8ac(0x1fb)]({'type':z['enum']([a164_0x12d8ac(0x1ed),a164_0x12d8ac(0x1d8)]),'column':z[a164_0x12d8ac(0x1f8)](),'orderColumn':z['string'](),'groupingColumns':z['array'](z[a164_0x12d8ac(0x1f8)]())[a164_0x12d8ac(0x1f2)]()})]);export const TimeWindowDefSchema=z[a164_0x12d8ac(0x1fb)]({'duration':z[a164_0x12d8ac(0x1db)](),'unit':TimeUnitSchema});function a164_0x3ef0(){const _0x370989=['addIssue','TimeRange','superRefine','month','CountDistinct','TimeRange\x20operator\x20requires\x20\x27duration\x27','Equal','5015432pXVYpZ','Count','Value','batch','exclude','Max','Behavior','column','\x27\x20requires\x20a\x20time\x20unit','enum','Column','MISSING_TIME_UNIT','min','unit','boolean','77198aRHZjH','max','And','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Last','literal','TimeWithinPast','number','1658200utcBeh','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Greater','1173261BxRmlu','Segment\x20reference\x20must\x20not\x20be\x20empty','value','union','LessEqual','week','25901127lJTgaa','from','1448592cPeYWJ','Regexp','has','all','record','First','operator','Between','timestamp','duration','optional','any','Less','TimeWithinNext','Contain','realtime','string','type','7ihACbo','object','GreaterEqual','array','MISSING_BETWEEN_BOUNDS','Average','segment','year','Sum','Segment\x20name\x20is\x20required','StartWith','minute','custom','4yZgZLt','lazy','4148255MqBAgM','EndWith','Min'];a164_0x3ef0=function(){return _0x370989;};return a164_0x3ef0();}const TIMESTAMP_OPERATORS=new Set([a164_0x12d8ac(0x1da),a164_0x12d8ac(0x1f5),'TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x12d8ac(0x1d9)]('Column'),'column':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x12d8ac(0x1f2)]()})[a164_0x12d8ac(0x20e)]((_0x13eae1,_0x58d670)=>{const _0x8a011=a164_0x12d8ac,_0x170d74=_0x13eae1[_0x8a011(0x1ee)][_0x8a011(0x1f9)];_0x13eae1[_0x8a011(0x21a)]===_0x8a011(0x1f0)?!TIMESTAMP_OPERATORS[_0x8a011(0x1ea)](_0x170d74)&&_0x58d670[_0x8a011(0x20c)]({'code':'custom','message':_0x8a011(0x1d7)+_0x170d74+'\x27)','path':['operator',_0x8a011(0x1f9)]}):TIMESTAMP_OPERATORS['has'](_0x170d74)&&_0x58d670[_0x8a011(0x20c)]({'code':_0x8a011(0x206),'message':'Operator\x20\x27'+_0x170d74+_0x8a011(0x1de),'path':[_0x8a011(0x1ee),_0x8a011(0x1f9)]});});export const FilterRuleDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x1d6)),'conditions':z[a164_0x12d8ac(0x1fd)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z['object']({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x215)),'attribute':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'aggregation':AggregationDefSchema[a164_0x12d8ac(0x1f2)](),'source':z['string']()[a164_0x12d8ac(0x1f2)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()}));export const BehaviorConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x219)),'attribute':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'aggregation':AggregationDefSchema[a164_0x12d8ac(0x1f2)](),'source':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'filter':FilterRuleDefSchema[a164_0x12d8ac(0x1f2)](),'timeWindow':TimeWindowDefSchema[a164_0x12d8ac(0x1f2)](),'limit':z[a164_0x12d8ac(0x1db)]()[a164_0x12d8ac(0x1f2)]()}));export const ColumnConditionDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z['literal'](a164_0x12d8ac(0x21d)),'column':z[a164_0x12d8ac(0x1f8)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x12d8ac(0x1f2)]()}));export const SegmentRefConditionDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)](['include',a164_0x12d8ac(0x217)]),'segment':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1d1)](0x1,a164_0x12d8ac(0x1e1))});export const ConditionDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1e3)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x12d8ac(0x208)](()=>z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x21c)]([a164_0x12d8ac(0x1d6),'Or']),'conditions':z[a164_0x12d8ac(0x1fd)](ConditionDefSchema),'description':z['string']()[a164_0x12d8ac(0x1f2)]()}));export const SegmentDefSchema=z[a164_0x12d8ac(0x1fb)]({'type':z[a164_0x12d8ac(0x1d9)](a164_0x12d8ac(0x200))[a164_0x12d8ac(0x1f2)](),'name':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1d1)](0x1,a164_0x12d8ac(0x203)),'description':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'folder':z[a164_0x12d8ac(0x1f8)]()[a164_0x12d8ac(0x1f2)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x12d8ac(0x21c)]([a164_0x12d8ac(0x216),a164_0x12d8ac(0x1f7),'funnel_stage'])['optional'](),'visible':z[a164_0x12d8ac(0x1d3)]()[a164_0x12d8ac(0x1f2)](),'activations':z[a164_0x12d8ac(0x1fd)](z['any']())[a164_0x12d8ac(0x1f2)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x275ec1=a164_0x3820;(function(_0x31585b,_0x247b3e){const _0x20e138=a164_0x3820,_0x5e964c=_0x31585b();while(!![]){try{const _0x5b4483=parseInt(_0x20e138(0x14b))/0x1+parseInt(_0x20e138(0x17e))/0x2*(parseInt(_0x20e138(0x194))/0x3)+-parseInt(_0x20e138(0x18b))/0x4*(parseInt(_0x20e138(0x14f))/0x5)+-parseInt(_0x20e138(0x15e))/0x6+-parseInt(_0x20e138(0x154))/0x7*(-parseInt(_0x20e138(0x173))/0x8)+parseInt(_0x20e138(0x191))/0x9*(parseInt(_0x20e138(0x14a))/0xa)+parseInt(_0x20e138(0x16c))/0xb;if(_0x5b4483===_0x247b3e)break;else _0x5e964c['push'](_0x5e964c['shift']());}catch(_0x130d4f){_0x5e964c['push'](_0x5e964c['shift']());}}}(a164_0x50b1,0xca28e));function a164_0x3820(_0x5ad92f,_0x3afff1){_0x5ad92f=_0x5ad92f-0x146;const _0x50b105=a164_0x50b1();let _0x382072=_0x50b105[_0x5ad92f];return _0x382072;}import{z}from'zod';export const OperatorTypeSchema=z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x181),'Greater','Less',a164_0x275ec1(0x193),a164_0x275ec1(0x189),'In',a164_0x275ec1(0x186),a164_0x275ec1(0x16a),'IsNull',a164_0x275ec1(0x162),a164_0x275ec1(0x18c),a164_0x275ec1(0x170),a164_0x275ec1(0x171),a164_0x275ec1(0x172),a164_0x275ec1(0x17c)]);export const TimeUnitSchema=z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x190),a164_0x275ec1(0x147),a164_0x275ec1(0x15a),a164_0x275ec1(0x167),a164_0x275ec1(0x174),'month',a164_0x275ec1(0x16b)]);export const AggregationTypeSchema=z[a164_0x275ec1(0x168)](['Count',a164_0x275ec1(0x15b),a164_0x275ec1(0x15c),a164_0x275ec1(0x176),'Max',a164_0x275ec1(0x183),'First',a164_0x275ec1(0x14e)]);const TemporalValueSchema=z[a164_0x275ec1(0x18a)]([z['object']({'timestamp':z[a164_0x275ec1(0x14c)]()}),z[a164_0x275ec1(0x161)]({'last':z[a164_0x275ec1(0x18a)]([z['number'](),z[a164_0x275ec1(0x16e)](z['string'](),z['number']())]),'unit':z[a164_0x275ec1(0x14c)]()})]),OperatorValueSchema=z[a164_0x275ec1(0x18a)]([z['string'](),z['number'](),z[a164_0x275ec1(0x18d)](),TemporalValueSchema,z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x14c)](),z[a164_0x275ec1(0x18e)](),z[a164_0x275ec1(0x18d)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x275ec1(0x181),a164_0x275ec1(0x187),a164_0x275ec1(0x193),a164_0x275ec1(0x175),a164_0x275ec1(0x189),'In','Contain',a164_0x275ec1(0x171),'EndWith',a164_0x275ec1(0x16a),a164_0x275ec1(0x162),a164_0x275ec1(0x18c)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x275ec1(0x162),a164_0x275ec1(0x18c)]);export const OperatorDefSchema=z[a164_0x275ec1(0x161)]({'type':OperatorTypeSchema,'not':z[a164_0x275ec1(0x18d)]()[a164_0x275ec1(0x185)](),'value':OperatorValueSchema[a164_0x275ec1(0x185)](),'min':z[a164_0x275ec1(0x18a)]([z['number'](),z[a164_0x275ec1(0x14c)](),TemporalValueSchema])[a164_0x275ec1(0x185)](),'max':z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x18e)](),z[a164_0x275ec1(0x14c)](),TemporalValueSchema])[a164_0x275ec1(0x185)](),'unit':TimeUnitSchema[a164_0x275ec1(0x185)](),'duration':z[a164_0x275ec1(0x161)]({'day':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)](),'week':z[a164_0x275ec1(0x18e)]()['optional'](),'month':z[a164_0x275ec1(0x18e)]()['optional'](),'year':z['number']()[a164_0x275ec1(0x185)](),'hour':z[a164_0x275ec1(0x18e)]()['optional'](),'minute':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)](),'second':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)]()})[a164_0x275ec1(0x185)](),'from':z['object']({'last':z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x18e)](),z[a164_0x275ec1(0x14c)]()]),'unit':TimeUnitSchema})[a164_0x275ec1(0x185)](),'reverse':z[a164_0x275ec1(0x18d)]()[a164_0x275ec1(0x185)]()})[a164_0x275ec1(0x182)]((_0x15cf46,_0x1d1e46)=>{const _0x1466b4=a164_0x275ec1;OPERATORS_REQUIRING_VALUE[_0x1466b4(0x150)](_0x15cf46[_0x1466b4(0x18f)])&&(_0x15cf46['value']===undefined||_0x15cf46[_0x1466b4(0x149)]===null)&&_0x1d1e46[_0x1466b4(0x16f)]({'code':'custom','message':'Operator\x20\x27'+_0x15cf46['type']+_0x1466b4(0x15d),'path':['value']}),_0x15cf46[_0x1466b4(0x18f)]===_0x1466b4(0x186)&&_0x15cf46['min']===undefined&&_0x15cf46['max']===undefined&&_0x1d1e46[_0x1466b4(0x16f)]({'code':'custom','message':_0x1466b4(0x178),'params':{'validationCode':_0x1466b4(0x164)}}),OPERATORS_REQUIRING_UNIT['has'](_0x15cf46[_0x1466b4(0x18f)])&&_0x15cf46[_0x1466b4(0x149)]!==undefined&&!_0x15cf46[_0x1466b4(0x169)]&&_0x1d1e46[_0x1466b4(0x16f)]({'code':_0x1466b4(0x151),'message':_0x1466b4(0x192)+_0x15cf46['type']+_0x1466b4(0x15f),'path':['unit'],'params':{'validationCode':_0x1466b4(0x160)}}),_0x15cf46['type']===_0x1466b4(0x17c)&&(!_0x15cf46[_0x1466b4(0x188)]&&_0x1d1e46[_0x1466b4(0x16f)]({'code':_0x1466b4(0x151),'message':_0x1466b4(0x166),'path':['duration']}),!_0x15cf46[_0x1466b4(0x17d)]&&_0x1d1e46['addIssue']({'code':_0x1466b4(0x151),'message':_0x1466b4(0x16d),'path':['from']}));});export const ArrayMatchingSchema=z[a164_0x275ec1(0x18a)]([z[a164_0x275ec1(0x157)]('any'),z['literal'](a164_0x275ec1(0x17b)),z[a164_0x275ec1(0x161)]({'atLeast':z[a164_0x275ec1(0x18e)]()}),z[a164_0x275ec1(0x161)]({'atMost':z[a164_0x275ec1(0x18e)]()}),z['object']({'exactly':z[a164_0x275ec1(0x18e)]()})]);export const AggregationDefSchema=z['discriminatedUnion']('type',[z['object']({'type':z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x15b),a164_0x275ec1(0x176),a164_0x275ec1(0x163),a164_0x275ec1(0x15c)]),'column':z[a164_0x275ec1(0x14c)](),'groupingColumns':z['array'](z[a164_0x275ec1(0x14c)]())[a164_0x275ec1(0x185)]()}),z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x156)),'groupingColumns':z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x14c)]())[a164_0x275ec1(0x185)]()}),z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)]('CountDistinct'),'columns':z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x14c)]())}),z[a164_0x275ec1(0x161)]({'type':z['enum']([a164_0x275ec1(0x159),a164_0x275ec1(0x14e)]),'column':z['string'](),'orderColumn':z[a164_0x275ec1(0x14c)](),'groupingColumns':z[a164_0x275ec1(0x17f)](z[a164_0x275ec1(0x14c)]())[a164_0x275ec1(0x185)]()})]);export const TimeWindowDefSchema=z['object']({'duration':z[a164_0x275ec1(0x18e)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x275ec1(0x162),'TimeWithinNext',a164_0x275ec1(0x17c)]);export const FilterColumnConditionDefSchema=z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x177)),'column':z[a164_0x275ec1(0x14c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x275ec1(0x185)]()})[a164_0x275ec1(0x182)]((_0x1634e8,_0x1ca073)=>{const _0x2e9922=a164_0x275ec1,_0x3abe99=_0x1634e8['operator'][_0x2e9922(0x18f)];_0x1634e8[_0x2e9922(0x153)]===_0x2e9922(0x152)?!TIMESTAMP_OPERATORS[_0x2e9922(0x150)](_0x3abe99)&&_0x1ca073['addIssue']({'code':_0x2e9922(0x151),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x3abe99+'\x27)','path':[_0x2e9922(0x180),_0x2e9922(0x18f)]}):TIMESTAMP_OPERATORS[_0x2e9922(0x150)](_0x3abe99)&&_0x1ca073['addIssue']({'code':_0x2e9922(0x151),'message':'Operator\x20\x27'+_0x3abe99+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x2e9922(0x180),'type']});});export const FilterRuleDefSchema=z[a164_0x275ec1(0x161)]({'type':z['literal']('And'),'conditions':z[a164_0x275ec1(0x17f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x275ec1(0x148)](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x17a)),'attribute':z[a164_0x275ec1(0x14c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()[a164_0x275ec1(0x185)](),'aggregation':AggregationDefSchema['optional'](),'source':z['string']()[a164_0x275ec1(0x185)](),'filter':FilterRuleDefSchema[a164_0x275ec1(0x185)](),'limit':z[a164_0x275ec1(0x18e)]()[a164_0x275ec1(0x185)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x179)),'attribute':z[a164_0x275ec1(0x14c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x275ec1(0x185)](),'exclude':z['boolean']()[a164_0x275ec1(0x185)](),'aggregation':AggregationDefSchema[a164_0x275ec1(0x185)](),'source':z[a164_0x275ec1(0x14c)]()[a164_0x275ec1(0x185)](),'filter':FilterRuleDefSchema[a164_0x275ec1(0x185)](),'timeWindow':TimeWindowDefSchema['optional'](),'limit':z['number']()[a164_0x275ec1(0x185)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x177)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x275ec1(0x148)](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x168)](['And','Or']),'conditions':z[a164_0x275ec1(0x17f)](ConditionDefSchema),'description':z[a164_0x275ec1(0x14c)]()['optional']()}));export const SegmentRefConditionDefSchema=z[a164_0x275ec1(0x161)]({'type':z['enum']([a164_0x275ec1(0x184),'exclude']),'segment':z['string']()[a164_0x275ec1(0x14d)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x275ec1(0x18a)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x275ec1(0x148)](()=>z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x168)]([a164_0x275ec1(0x195),'Or']),'conditions':z[a164_0x275ec1(0x17f)](ConditionDefSchema),'description':z['string']()[a164_0x275ec1(0x185)]()}));export const SegmentDefSchema=z[a164_0x275ec1(0x161)]({'type':z[a164_0x275ec1(0x157)](a164_0x275ec1(0x146))[a164_0x275ec1(0x185)](),'name':z[a164_0x275ec1(0x14c)]()[a164_0x275ec1(0x14d)](0x1,a164_0x275ec1(0x155)),'description':z['string']()[a164_0x275ec1(0x185)](),'folder':z[a164_0x275ec1(0x14c)]()[a164_0x275ec1(0x185)](),'rule':RuleDefSchema[a164_0x275ec1(0x185)](),'kind':z['enum'](['batch','realtime',a164_0x275ec1(0x165)])[a164_0x275ec1(0x185)](),'visible':z['boolean']()['optional'](),'activations':z['array'](z[a164_0x275ec1(0x158)]())[a164_0x275ec1(0x185)]()});const _syncCheck1=!![],_syncCheck2=!![];function a164_0x50b1(){const _0xa3cd8a=['number','type','second','4113Bxekqf','Operator\x20\x27','GreaterEqual','72711YtUqzk','And','segment','minute','lazy','value','2200vQOnHi','201649WkzOsJ','string','min','Last','35yXOBYL','has','custom','timestamp','column','165431LQBpdb','Segment\x20name\x20is\x20required','Count','literal','any','First','hour','Sum','Average','\x27\x20requires\x20a\x20value','3418392UxkexZ','\x27\x20requires\x20a\x20time\x20unit','MISSING_TIME_UNIT','object','TimeWithinPast','Max','MISSING_BETWEEN_BOUNDS','funnel_stage','TimeRange\x20operator\x20requires\x20\x27duration\x27','day','enum','unit','Regexp','year','2984432tYoPCr','TimeRange\x20operator\x20requires\x20\x27from\x27','record','addIssue','Contain','StartWith','EndWith','8RsCpXb','week','Less','Min','Column','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Behavior','Value','all','TimeRange','from','106hKykjE','array','operator','Equal','superRefine','CountDistinct','include','optional','Between','Greater','duration','LessEqual','union','276524DaiAhg','TimeWithinNext','boolean'];a164_0x50b1=function(){return _0xa3cd8a;};return a164_0x50b1();}void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x3a465d=a165_0x2515;(function(_0x2b9654,_0xf0bb29){const _0x596649=a165_0x2515,_0x429520=_0x2b9654();while(!![]){try{const _0x4d5457=parseInt(_0x596649(0x171))/0x1*(parseInt(_0x596649(0x174))/0x2)+parseInt(_0x596649(0x177))/0x3*(-parseInt(_0x596649(0x17c))/0x4)+parseInt(_0x596649(0x16c))/0x5+parseInt(_0x596649(0x17b))/0x6*(-parseInt(_0x596649(0x172))/0x7)+-parseInt(_0x596649(0x16f))/0x8*(parseInt(_0x596649(0x185))/0x9)+parseInt(_0x596649(0x181))/0xa+parseInt(_0x596649(0x170))/0xb*(parseInt(_0x596649(0x183))/0xc);if(_0x4d5457===_0xf0bb29)break;else _0x429520['push'](_0x429520['shift']());}catch(_0x165be9){_0x429520['push'](_0x429520['shift']());}}}(a165_0x54b1,0x8f856));import{readFileSync}from'fs';import*as a165_0x1ead2f from'path';import*as a165_0x4d1874 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';function a165_0x54b1(){const _0x4eb515=['basename','campaign_type','type','4826440LXUltl','journey','skipped','9728dYYFGV','7229310oABROO','12611knmHoV','10367XlgFvY','has','94BxrtEL','map','push','12HqyZOV','utf-8','message','email','4404imSHmo','451236vhctwh','template','length','parseDocument','YAML\x20parse\x20error:\x20','9846650QZjSsu','not\x20a\x20','12wYczIx','segment','7947jetiWr','toJSON','campaign','result','object','error','relative','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','filterType'];a165_0x54b1=function(){return _0x4eb515;};return a165_0x54b1();}import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x3a465d(0x17a),a165_0x3a465d(0x176)]);export function isJourneyDef(_0x3dcbee){const _0xd5135=a165_0x3a465d;return typeof _0x3dcbee===_0xd5135(0x189)&&_0x3dcbee!==null&&'type'in _0x3dcbee&&_0x3dcbee[_0xd5135(0x190)]===_0xd5135(0x16d);}function a165_0x2515(_0x4ba380,_0x29e37f){_0x4ba380=_0x4ba380-0x16c;const _0x54b19a=a165_0x54b1();let _0x251572=_0x54b19a[_0x4ba380];return _0x251572;}export function isCampaignDef(_0x4886f4){const _0x5f7c96=a165_0x3a465d;if(typeof _0x4886f4!==_0x5f7c96(0x189)||_0x4886f4===null)return![];const _0x3f3a60=_0x4886f4,_0x3df6c8=VALID_CAMPAIGN_TYPES[_0x5f7c96(0x173)](_0x3f3a60[_0x5f7c96(0x18f)]);if(_0x3f3a60['type']===_0x5f7c96(0x187)&&_0x3df6c8)return!![];if(_0x3df6c8&&!_0x3f3a60[_0x5f7c96(0x190)])return!![];return![];}export function isTemplateDef(_0x47b2c0){const _0x1fb007=a165_0x3a465d;return typeof _0x47b2c0===_0x1fb007(0x189)&&_0x47b2c0!==null&&_0x1fb007(0x190)in _0x47b2c0&&_0x47b2c0[_0x1fb007(0x190)]==='template';}export function isValidationResult(_0x2bee8e){const _0x33e8f2=a165_0x3a465d;return!(_0x33e8f2(0x16e)in _0x2bee8e);}export function createParseErrorResult(_0x320183,_0xf3dce2,_0x31ceff,_0x1e2543,_0x5c7c0e=a165_0x3a465d(0x184)){const _0x44ab69=a165_0x3a465d;return{'filePath':_0x320183,'relativePath':_0xf3dce2,'source':_0x31ceff,'result':{'valid':![],'errors':[{'level':_0x44ab69(0x18a),'path':'','code':'YAML_PARSE_ERROR','message':_0x1e2543}],'warnings':[]},'fileType':_0x5c7c0e};}export function validateYamlFile(_0x46f7c9,_0x2fc251,_0x968ed2={}){const _0x201b6b=a165_0x3a465d,_0x107f7b=a165_0x1ead2f[_0x201b6b(0x18b)](_0x2fc251,_0x46f7c9)||a165_0x1ead2f[_0x201b6b(0x18e)](_0x46f7c9);try{const _0x2ac299=readFileSync(_0x46f7c9,_0x201b6b(0x178)),_0x57f38f=a165_0x4d1874[_0x201b6b(0x17f)](_0x2ac299),_0x4dbce5=_0x57f38f[_0x201b6b(0x186)]();if(!_0x4dbce5)return createParseErrorResult(_0x46f7c9,_0x107f7b,_0x2ac299,_0x201b6b(0x18c));let _0x2a985b;if(isJourneyDef(_0x4dbce5))_0x2a985b='journey';else{if(isCampaignDef(_0x4dbce5))_0x2a985b=_0x201b6b(0x187);else isTemplateDef(_0x4dbce5)?_0x2a985b=_0x201b6b(0x17d):_0x2a985b='segment';}if(_0x968ed2[_0x201b6b(0x18d)]&&_0x2a985b!==_0x968ed2['filterType'])return{'filePath':_0x46f7c9,'relativePath':_0x107f7b,'skipped':!![],'reason':_0x201b6b(0x182)+_0x968ed2[_0x201b6b(0x18d)]};const _0x4ede4f={'source':_0x2ac299,'document':_0x57f38f};let _0x10e585;if(_0x2a985b==='journey')_0x10e585=validateJourneyDef(_0x4dbce5,_0x4ede4f);else{if(_0x2a985b===_0x201b6b(0x187))_0x10e585=validateCampaignDef(_0x4dbce5,_0x4ede4f);else _0x2a985b==='template'?_0x10e585=validateTemplateDef(_0x4dbce5,_0x4ede4f):_0x10e585=validateSegmentDef(_0x4dbce5,_0x4ede4f);}return{'filePath':_0x46f7c9,'relativePath':_0x107f7b,'source':_0x2ac299,'result':_0x10e585,'fileType':_0x2a985b};}catch(_0x1bd0eb){const _0x498b2d=_0x1bd0eb instanceof Error?_0x1bd0eb[_0x201b6b(0x179)]:String(_0x1bd0eb);return createParseErrorResult(_0x46f7c9,_0x107f7b,'',_0x201b6b(0x180)+_0x498b2d);}}export function validateYamlFiles(_0x2fa3fd,_0x260cb8,_0x170bb2={}){const _0x204b59=a165_0x3a465d;return _0x2fa3fd[_0x204b59(0x175)](_0x507944=>validateYamlFile(_0x507944,_0x260cb8,_0x170bb2));}export function calculateSummary(_0x4113a6){const _0x404a20=a165_0x3a465d;let _0x501fb7=0x0,_0x59e831=0x0,_0x27600f=0x0,_0x20edba=0x0;for(const _0x1d3b66 of _0x4113a6){if(!isValidationResult(_0x1d3b66)){_0x20edba++;continue;}_0x1d3b66[_0x404a20(0x188)]['valid']?_0x501fb7++:_0x59e831++,_0x27600f+=_0x1d3b66[_0x404a20(0x188)]['warnings'][_0x404a20(0x17e)];}return{'validCount':_0x501fb7,'invalidCount':_0x59e831,'warningCount':_0x27600f,'skippedCount':_0x20edba,'hasErrors':_0x59e831>0x0};}
1
+ const a165_0x5b0efd=a165_0x924c;(function(_0x54396c,_0x3cdd02){const _0x4e2f06=a165_0x924c,_0xec2f2f=_0x54396c();while(!![]){try{const _0x569475=parseInt(_0x4e2f06(0x144))/0x1*(parseInt(_0x4e2f06(0x156))/0x2)+parseInt(_0x4e2f06(0x154))/0x3*(parseInt(_0x4e2f06(0x146))/0x4)+parseInt(_0x4e2f06(0x139))/0x5+-parseInt(_0x4e2f06(0x14d))/0x6+-parseInt(_0x4e2f06(0x141))/0x7+-parseInt(_0x4e2f06(0x14e))/0x8*(-parseInt(_0x4e2f06(0x155))/0x9)+parseInt(_0x4e2f06(0x151))/0xa*(parseInt(_0x4e2f06(0x13f))/0xb);if(_0x569475===_0x3cdd02)break;else _0xec2f2f['push'](_0xec2f2f['shift']());}catch(_0x3934d6){_0xec2f2f['push'](_0xec2f2f['shift']());}}}(a165_0x39cc,0xd1fb1));import{readFileSync}from'fs';import*as a165_0x3b4f46 from'path';import*as a165_0x302dab from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x5b0efd(0x153),a165_0x5b0efd(0x13e)]);export function isJourneyDef(_0x1445d1){const _0x5086d2=a165_0x5b0efd;return typeof _0x1445d1===_0x5086d2(0x143)&&_0x1445d1!==null&&_0x5086d2(0x138)in _0x1445d1&&_0x1445d1[_0x5086d2(0x138)]===_0x5086d2(0x13c);}function a165_0x39cc(){const _0x12d3ba=['segment','933610jaKDMa','basename','email','3DNsFgH','72ZSduZt','222790lnqzAd','length','map','warnings','type','420505phIRXj','campaign','YAML_PARSE_ERROR','journey','parseDocument','push','11yjKRFS','skipped','7499800YVdqaH','error','object','1arWLYw','result','4840904HcGNeB','campaign_type','filterType','toJSON','template','not\x20a\x20','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','7128876HjrNcD','1620544VQSarP','relative'];a165_0x39cc=function(){return _0x12d3ba;};return a165_0x39cc();}export function isCampaignDef(_0x276bee){const _0x4a79cf=a165_0x5b0efd;if(typeof _0x276bee!==_0x4a79cf(0x143)||_0x276bee===null)return![];const _0xa02a87=_0x276bee,_0x148d7d=VALID_CAMPAIGN_TYPES['has'](_0xa02a87[_0x4a79cf(0x147)]);if(_0xa02a87[_0x4a79cf(0x138)]===_0x4a79cf(0x13a)&&_0x148d7d)return!![];if(_0x148d7d&&!_0xa02a87[_0x4a79cf(0x138)])return!![];return![];}export function isTemplateDef(_0x32efdc){const _0x165a9c=a165_0x5b0efd;return typeof _0x32efdc===_0x165a9c(0x143)&&_0x32efdc!==null&&'type'in _0x32efdc&&_0x32efdc[_0x165a9c(0x138)]==='template';}export function isValidationResult(_0x4ffb83){const _0x5ecb95=a165_0x5b0efd;return!(_0x5ecb95(0x140)in _0x4ffb83);}function a165_0x924c(_0x5c54d4,_0x1efedd){_0x5c54d4=_0x5c54d4-0x135;const _0x39ccb7=a165_0x39cc();let _0x924c3b=_0x39ccb7[_0x5c54d4];return _0x924c3b;}export function createParseErrorResult(_0x18449e,_0x131bbf,_0x4d8d27,_0x46b5e4,_0x34bcef='segment'){const _0x3b283d=a165_0x5b0efd;return{'filePath':_0x18449e,'relativePath':_0x131bbf,'source':_0x4d8d27,'result':{'valid':![],'errors':[{'level':_0x3b283d(0x142),'path':'','code':_0x3b283d(0x13b),'message':_0x46b5e4}],'warnings':[]},'fileType':_0x34bcef};}export function validateYamlFile(_0x489297,_0x5c847a,_0x34af19={}){const _0x22532d=a165_0x5b0efd,_0x3847a7=a165_0x3b4f46[_0x22532d(0x14f)](_0x5c847a,_0x489297)||a165_0x3b4f46[_0x22532d(0x152)](_0x489297);try{const _0x447003=readFileSync(_0x489297,'utf-8'),_0x348c13=a165_0x302dab[_0x22532d(0x13d)](_0x447003),_0x2406af=_0x348c13[_0x22532d(0x149)]();if(!_0x2406af)return createParseErrorResult(_0x489297,_0x3847a7,_0x447003,_0x22532d(0x14c));let _0x3828b5;if(isJourneyDef(_0x2406af))_0x3828b5=_0x22532d(0x13c);else{if(isCampaignDef(_0x2406af))_0x3828b5=_0x22532d(0x13a);else isTemplateDef(_0x2406af)?_0x3828b5=_0x22532d(0x14a):_0x3828b5=_0x22532d(0x150);}if(_0x34af19[_0x22532d(0x148)]&&_0x3828b5!==_0x34af19[_0x22532d(0x148)])return{'filePath':_0x489297,'relativePath':_0x3847a7,'skipped':!![],'reason':_0x22532d(0x14b)+_0x34af19['filterType']};const _0x6cce0a={'source':_0x447003,'document':_0x348c13};let _0x67a963;if(_0x3828b5==='journey')_0x67a963=validateJourneyDef(_0x2406af,_0x6cce0a);else{if(_0x3828b5===_0x22532d(0x13a))_0x67a963=validateCampaignDef(_0x2406af,_0x6cce0a);else _0x3828b5==='template'?_0x67a963=validateTemplateDef(_0x2406af,_0x6cce0a):_0x67a963=validateSegmentDef(_0x2406af,_0x6cce0a);}return{'filePath':_0x489297,'relativePath':_0x3847a7,'source':_0x447003,'result':_0x67a963,'fileType':_0x3828b5};}catch(_0x5da776){const _0x5c3fbd=_0x5da776 instanceof Error?_0x5da776['message']:String(_0x5da776);return createParseErrorResult(_0x489297,_0x3847a7,'','YAML\x20parse\x20error:\x20'+_0x5c3fbd);}}export function validateYamlFiles(_0x3bef2f,_0x3000b5,_0x49e2c0={}){const _0x27c0cc=a165_0x5b0efd;return _0x3bef2f[_0x27c0cc(0x136)](_0x522427=>validateYamlFile(_0x522427,_0x3000b5,_0x49e2c0));}export function calculateSummary(_0x3707aa){const _0x19a3fd=a165_0x5b0efd;let _0x292cd4=0x0,_0x14772f=0x0,_0x4503ed=0x0,_0x138f88=0x0;for(const _0x13da27 of _0x3707aa){if(!isValidationResult(_0x13da27)){_0x138f88++;continue;}_0x13da27[_0x19a3fd(0x145)]['valid']?_0x292cd4++:_0x14772f++,_0x4503ed+=_0x13da27[_0x19a3fd(0x145)][_0x19a3fd(0x137)][_0x19a3fd(0x135)];}return{'validCount':_0x292cd4,'invalidCount':_0x14772f,'warningCount':_0x4503ed,'skippedCount':_0x138f88,'hasErrors':_0x14772f>0x0};}
@@ -1 +1 @@
1
- (function(_0x34cf10,_0x3ef0d8){const _0x32491a=a166_0x2875,_0xced3f7=_0x34cf10();while(!![]){try{const _0x213eb9=parseInt(_0x32491a(0x128))/0x1+parseInt(_0x32491a(0x125))/0x2+parseInt(_0x32491a(0x137))/0x3*(parseInt(_0x32491a(0x10b))/0x4)+parseInt(_0x32491a(0x136))/0x5*(parseInt(_0x32491a(0x133))/0x6)+parseInt(_0x32491a(0x11e))/0x7*(-parseInt(_0x32491a(0x121))/0x8)+-parseInt(_0x32491a(0x11b))/0x9+parseInt(_0x32491a(0x135))/0xa*(-parseInt(_0x32491a(0x113))/0xb);if(_0x213eb9===_0x3ef0d8)break;else _0xced3f7['push'](_0xced3f7['shift']());}catch(_0x4e156e){_0xced3f7['push'](_0xced3f7['shift']());}}}(a166_0x538d,0x5692d));import*as a166_0x192a06 from'yaml';import a166_0x529479 from'chalk';function a166_0x538d(){const _0x1d3d2c=['data','YAML\x20validation\x20error:\x20','cyan','YAML\x20validation\x20error\x20at\x20\x27','toString','red','match','6220836HqGzvM','message','join','14aYVKnz','max','level','1797128XDOhsP','line','error','object','1350252MXqipS','push','invalid_union','317602fompPI','dim','map','errors','length','min','path','padStart','flatMap','range','pop','186JCaqYR','parse','10XQJjPv','68610AReFgR','12HKLGsO','success','repeat','175544VZtPzg','issues','yellow','warnings','getIn','split','location','code','1084193ngQtXv'];a166_0x538d=function(){return _0x1d3d2c;};return a166_0x538d();}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3498a9,_0x5812e9,_0x8583b1){const _0x3faf8a=a166_0x2875;if(!_0x3498a9||!_0x5812e9)return undefined;try{let _0x21c303=_0x3498a9[_0x3faf8a(0x10f)](_0x8583b1,!![]),_0x10619e=[..._0x8583b1];while((!_0x21c303||typeof _0x21c303!==_0x3faf8a(0x124)||!(_0x3faf8a(0x131)in _0x21c303)||!_0x21c303[_0x3faf8a(0x131)])&&_0x10619e[_0x3faf8a(0x12c)]>0x0){_0x10619e[_0x3faf8a(0x132)](),_0x21c303=_0x10619e[_0x3faf8a(0x12c)]>0x0?_0x3498a9['getIn'](_0x10619e,!![]):_0x3498a9['contents'];}if(!_0x21c303||typeof _0x21c303!==_0x3faf8a(0x124)||!(_0x3faf8a(0x131)in _0x21c303)||!_0x21c303['range'])return undefined;const [_0x24b641]=_0x21c303[_0x3faf8a(0x131)];return offsetToLocation(_0x5812e9,_0x24b641);}catch{return undefined;}}export function offsetToLocation(_0xd632d3,_0x4f0af4){const _0xef65d4=a166_0x2875;let _0x9c7694=0x1,_0x460e0e=0x1;for(let _0x510535=0x0;_0x510535<_0x4f0af4&&_0x510535<_0xd632d3[_0xef65d4(0x12c)];_0x510535++){_0xd632d3[_0x510535]==='\x0a'?(_0x9c7694++,_0x460e0e=0x1):_0x460e0e++;}return{'line':_0x9c7694,'column':_0x460e0e,'offset':_0x4f0af4};}export function pathToArray(_0x6ee64a){const _0x4cd881=a166_0x2875;if(!_0x6ee64a)return[];return _0x6ee64a[_0x4cd881(0x110)]('.')[_0x4cd881(0x130)](_0x1623fa=>{const _0x49d13a=_0x4cd881,_0x182ee6=_0x1623fa[_0x49d13a(0x11a)](/^(\w+)\[(\d+)\]$/);if(_0x182ee6)return[_0x182ee6[0x1],parseInt(_0x182ee6[0x2],0xa)];return[_0x1623fa];});}export function formatZodPath(_0x2fa52d){let _0x461df2='';for(const _0xa2c221 of _0x2fa52d){if(typeof _0xa2c221==='number')_0x461df2+='['+_0xa2c221+']';else{const _0x4db399=String(_0xa2c221);_0x461df2+=_0x461df2?'.'+_0x4db399:_0x4db399;}}return _0x461df2;}export function flattenZodIssues(_0x3d715c){const _0x5d81e0=a166_0x2875,_0x38fa21=[];for(const _0x538659 of _0x3d715c){if(_0x538659[_0x5d81e0(0x112)]===_0x5d81e0(0x127)&&_0x5d81e0(0x12b)in _0x538659){const _0x38bf8c=_0x538659[_0x5d81e0(0x12b)];let _0x5c30db=_0x38bf8c[0x0]||[];for(const _0x49562a of _0x38bf8c){_0x49562a[_0x5d81e0(0x12c)]<_0x5c30db[_0x5d81e0(0x12c)]&&(_0x5c30db=_0x49562a);}const _0x77c423=_0x5c30db[_0x5d81e0(0x12a)](_0x5d85ae=>({..._0x5d85ae,'path':[..._0x538659[_0x5d81e0(0x12e)],..._0x5d85ae['path']]}));_0x38fa21[_0x5d81e0(0x126)](...flattenZodIssues(_0x77c423));}else _0x38fa21[_0x5d81e0(0x126)](_0x538659);}return _0x38fa21;}export function safeParseYaml(_0x5983a8,_0x4bf683){const _0x43f84b=a166_0x2875,_0x3cbe87=a166_0x192a06[_0x43f84b(0x134)](_0x5983a8);if(!_0x3cbe87||typeof _0x3cbe87!=='object')throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0x154ebb=_0x4bf683['safeParse'](_0x3cbe87);if(!_0x154ebb[_0x43f84b(0x109)]){const _0x2de5f5=_0x154ebb[_0x43f84b(0x123)][_0x43f84b(0x10c)][0x0],_0x3e8122=formatZodPath(_0x2de5f5[_0x43f84b(0x12e)]);throw new Error(_0x3e8122?_0x43f84b(0x117)+_0x3e8122+'\x27:\x20'+_0x2de5f5[_0x43f84b(0x11c)]:_0x43f84b(0x115)+_0x2de5f5['message']);}return _0x154ebb[_0x43f84b(0x114)];}function a166_0x2875(_0x19d181,_0xb553dc){_0x19d181=_0x19d181-0x109;const _0x538d28=a166_0x538d();let _0x2875b7=_0x538d28[_0x19d181];return _0x2875b7;}export function formatIssueWithContext(_0x4478ed,_0x47751d,_0x31252b){const _0x658f06=a166_0x2875,_0xe36e21=[],_0x305836=_0x4478ed[_0x658f06(0x120)]===_0x658f06(0x123),_0x48d466=_0x305836?a166_0x529479['red']:a166_0x529479['yellow'],_0x3cb180=_0x305836?a166_0x529479[_0x658f06(0x119)]:a166_0x529479[_0x658f06(0x10d)],_0x232104=_0x31252b?a166_0x529479[_0x658f06(0x116)](_0x31252b+':'):'';if(_0x4478ed[_0x658f06(0x111)]){const _0x5350e9=a166_0x529479[_0x658f06(0x116)](_0x4478ed[_0x658f06(0x111)][_0x658f06(0x122)]+':'+_0x4478ed[_0x658f06(0x111)]['column']);_0xe36e21[_0x658f06(0x126)](''+_0x232104+_0x5350e9+':\x20'+_0x48d466(_0x4478ed[_0x658f06(0x120)])+'\x20'+_0x3cb180('['+_0x4478ed['code']+']'));}else _0xe36e21[_0x658f06(0x126)](''+_0x232104+a166_0x529479[_0x658f06(0x129)](_0x4478ed[_0x658f06(0x12e)])+':\x20'+_0x48d466(_0x4478ed[_0x658f06(0x120)])+'\x20'+_0x3cb180('['+_0x4478ed[_0x658f06(0x112)]+']'));_0xe36e21[_0x658f06(0x126)](_0x4478ed[_0x658f06(0x11c)]);if(_0x4478ed['location']&&_0x47751d){const _0x10b788=_0x47751d[_0x658f06(0x110)]('\x0a'),{line:_0x167e41,column:_0x4545c1}=_0x4478ed['location'],_0x207b68=Math[_0x658f06(0x11f)](0x1,_0x167e41-0x1),_0x1f9c54=Math[_0x658f06(0x12d)](_0x10b788[_0x658f06(0x12c)],_0x167e41+0x1);_0xe36e21[_0x658f06(0x126)]('');for(let _0x45d299=_0x207b68;_0x45d299<=_0x1f9c54;_0x45d299++){const _0x5e0656=_0x10b788[_0x45d299-0x1]||'',_0x90bb3f=a166_0x529479[_0x658f06(0x129)](_0x45d299[_0x658f06(0x118)]()[_0x658f06(0x12f)](0x4)),_0x24c470=a166_0x529479[_0x658f06(0x129)]('\x20|\x20');if(_0x45d299===_0x167e41){_0xe36e21['push']('\x20\x20'+_0x90bb3f+_0x24c470+_0x48d466(_0x5e0656));const _0x1aabdd='\x20'[_0x658f06(0x10a)](0x4+0x3+_0x4545c1-0x1);_0xe36e21[_0x658f06(0x126)]('\x20\x20'+_0x1aabdd+_0x48d466('^'));}else _0xe36e21[_0x658f06(0x126)]('\x20\x20'+_0x90bb3f+_0x24c470+a166_0x529479[_0x658f06(0x129)](_0x5e0656));}}return _0xe36e21[_0x658f06(0x11d)]('\x0a');}export function formatValidationResult(_0x46d2a4,_0x42b359,_0x4849d7){const _0xa9c818=a166_0x2875,_0x1c812f=[];for(const _0x7c1f4 of _0x46d2a4['errors']){_0x1c812f[_0xa9c818(0x126)](formatIssueWithContext(_0x7c1f4,_0x42b359,_0x4849d7)),_0x1c812f[_0xa9c818(0x126)]('');}for(const _0x3f53f1 of _0x46d2a4[_0xa9c818(0x10e)]){_0x1c812f[_0xa9c818(0x126)](formatIssueWithContext(_0x3f53f1,_0x42b359,_0x4849d7)),_0x1c812f['push']('');}return _0x1c812f[_0xa9c818(0x11d)]('\x0a');}
1
+ (function(_0x3ab03f,_0x166355){const _0x485fd2=a166_0x243c,_0x41123c=_0x3ab03f();while(!![]){try{const _0x5c67ef=-parseInt(_0x485fd2(0xb2))/0x1*(-parseInt(_0x485fd2(0xa9))/0x2)+-parseInt(_0x485fd2(0xa5))/0x3*(-parseInt(_0x485fd2(0x8a))/0x4)+-parseInt(_0x485fd2(0x8b))/0x5+parseInt(_0x485fd2(0x9d))/0x6*(parseInt(_0x485fd2(0xb6))/0x7)+-parseInt(_0x485fd2(0x89))/0x8*(parseInt(_0x485fd2(0x9f))/0x9)+-parseInt(_0x485fd2(0xac))/0xa+-parseInt(_0x485fd2(0x92))/0xb*(-parseInt(_0x485fd2(0x9b))/0xc);if(_0x5c67ef===_0x166355)break;else _0x41123c['push'](_0x41123c['shift']());}catch(_0x2214d6){_0x41123c['push'](_0x41123c['shift']());}}}(a166_0x859c,0xe835b));import*as a166_0x4c5801 from'yaml';import a166_0x2d312d from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x45b304,_0x55b6d2,_0x1e14cf){const _0x58de39=a166_0x243c;if(!_0x45b304||!_0x55b6d2)return undefined;try{let _0xe51bfd=_0x45b304[_0x58de39(0xb5)](_0x1e14cf,!![]),_0x46b6b0=[..._0x1e14cf];while((!_0xe51bfd||typeof _0xe51bfd!=='object'||!('range'in _0xe51bfd)||!_0xe51bfd[_0x58de39(0xa0)])&&_0x46b6b0[_0x58de39(0xa2)]>0x0){_0x46b6b0['pop'](),_0xe51bfd=_0x46b6b0[_0x58de39(0xa2)]>0x0?_0x45b304[_0x58de39(0xb5)](_0x46b6b0,!![]):_0x45b304['contents'];}if(!_0xe51bfd||typeof _0xe51bfd!==_0x58de39(0xa4)||!(_0x58de39(0xa0)in _0xe51bfd)||!_0xe51bfd[_0x58de39(0xa0)])return undefined;const [_0x10ae54]=_0xe51bfd['range'];return offsetToLocation(_0x55b6d2,_0x10ae54);}catch{return undefined;}}export function offsetToLocation(_0x1a02d0,_0x3f8002){let _0x42910f=0x1,_0x220986=0x1;for(let _0x7bace5=0x0;_0x7bace5<_0x3f8002&&_0x7bace5<_0x1a02d0['length'];_0x7bace5++){_0x1a02d0[_0x7bace5]==='\x0a'?(_0x42910f++,_0x220986=0x1):_0x220986++;}return{'line':_0x42910f,'column':_0x220986,'offset':_0x3f8002};}export function pathToArray(_0x277fe0){const _0x43326e=a166_0x243c;if(!_0x277fe0)return[];return _0x277fe0['split']('.')[_0x43326e(0x95)](_0x43cc2e=>{const _0x33e15a=_0x43cc2e['match'](/^(\w+)\[(\d+)\]$/);if(_0x33e15a)return[_0x33e15a[0x1],parseInt(_0x33e15a[0x2],0xa)];return[_0x43cc2e];});}function a166_0x243c(_0x40d566,_0x79f8e1){_0x40d566=_0x40d566-0x88;const _0x859c4f=a166_0x859c();let _0x243c97=_0x859c4f[_0x40d566];return _0x243c97;}export function formatZodPath(_0x1477ff){const _0x269d42=a166_0x243c;let _0x4aab9e='';for(const _0x3d0939 of _0x1477ff){if(typeof _0x3d0939===_0x269d42(0x8e))_0x4aab9e+='['+_0x3d0939+']';else{const _0x61e3a4=String(_0x3d0939);_0x4aab9e+=_0x4aab9e?'.'+_0x61e3a4:_0x61e3a4;}}return _0x4aab9e;}function a166_0x859c(){const _0x5a22c6=['flatMap','YAML\x20validation\x20error\x20at\x20\x27','map','invalid_union','join','Invalid\x20YAML:\x20expected\x20an\x20object','12sTsTrE','\x20|\x20','283026MkFdDp','dim','118260QIoXSF','range','padStart','length','code','object','3mNrLaX','data','warnings','safeParse','2674ICYoMn','YAML\x20validation\x20error:\x20','issues','15052350JGGXsB','yellow','errors','level','red','push','901dzYtID','error','path','getIn','217tyiWJr','min','720qGTiLQ','3649148fTwzta','2469290pMAyCs','max','success','number','cyan','location','message','6089589xhulyW','split','\x27:\x20'];a166_0x859c=function(){return _0x5a22c6;};return a166_0x859c();}export function flattenZodIssues(_0x5e8084){const _0xad6843=a166_0x243c,_0x37718d=[];for(const _0x32d482 of _0x5e8084){if(_0x32d482[_0xad6843(0xa3)]===_0xad6843(0x98)&&'errors'in _0x32d482){const _0x47dee8=_0x32d482[_0xad6843(0xae)];let _0x534862=_0x47dee8[0x0]||[];for(const _0x36c319 of _0x47dee8){_0x36c319[_0xad6843(0xa2)]<_0x534862[_0xad6843(0xa2)]&&(_0x534862=_0x36c319);}const _0x48852c=_0x534862[_0xad6843(0x97)](_0x102bdc=>({..._0x102bdc,'path':[..._0x32d482[_0xad6843(0xb4)],..._0x102bdc[_0xad6843(0xb4)]]}));_0x37718d[_0xad6843(0xb1)](...flattenZodIssues(_0x48852c));}else _0x37718d['push'](_0x32d482);}return _0x37718d;}export function safeParseYaml(_0x57be16,_0x3a6774){const _0x4a38ac=a166_0x243c,_0xb0bbca=a166_0x4c5801['parse'](_0x57be16);if(!_0xb0bbca||typeof _0xb0bbca!==_0x4a38ac(0xa4))throw new Error(_0x4a38ac(0x9a));const _0x486df5=_0x3a6774[_0x4a38ac(0xa8)](_0xb0bbca);if(!_0x486df5[_0x4a38ac(0x8d)]){const _0x2cfa90=_0x486df5['error'][_0x4a38ac(0xab)][0x0],_0x2a3417=formatZodPath(_0x2cfa90[_0x4a38ac(0xb4)]);throw new Error(_0x2a3417?_0x4a38ac(0x96)+_0x2a3417+_0x4a38ac(0x94)+_0x2cfa90['message']:_0x4a38ac(0xaa)+_0x2cfa90[_0x4a38ac(0x91)]);}return _0x486df5[_0x4a38ac(0xa6)];}export function formatIssueWithContext(_0xc7acc5,_0x3efd33,_0x42ac23){const _0x4700be=a166_0x243c,_0x1db31c=[],_0x390af9=_0xc7acc5['level']===_0x4700be(0xb3),_0x4de3f7=_0x390af9?a166_0x2d312d[_0x4700be(0xb0)]:a166_0x2d312d[_0x4700be(0xad)],_0x1b452b=_0x390af9?a166_0x2d312d[_0x4700be(0xb0)]:a166_0x2d312d['yellow'],_0x3e11b9=_0x42ac23?a166_0x2d312d[_0x4700be(0x8f)](_0x42ac23+':'):'';if(_0xc7acc5[_0x4700be(0x90)]){const _0x2531e8=a166_0x2d312d[_0x4700be(0x8f)](_0xc7acc5['location']['line']+':'+_0xc7acc5[_0x4700be(0x90)]['column']);_0x1db31c[_0x4700be(0xb1)](''+_0x3e11b9+_0x2531e8+':\x20'+_0x4de3f7(_0xc7acc5[_0x4700be(0xaf)])+'\x20'+_0x1b452b('['+_0xc7acc5['code']+']'));}else _0x1db31c['push'](''+_0x3e11b9+a166_0x2d312d[_0x4700be(0x9e)](_0xc7acc5[_0x4700be(0xb4)])+':\x20'+_0x4de3f7(_0xc7acc5[_0x4700be(0xaf)])+'\x20'+_0x1b452b('['+_0xc7acc5['code']+']'));_0x1db31c[_0x4700be(0xb1)](_0xc7acc5[_0x4700be(0x91)]);if(_0xc7acc5[_0x4700be(0x90)]&&_0x3efd33){const _0x1838e9=_0x3efd33[_0x4700be(0x93)]('\x0a'),{line:_0x2abdee,column:_0x66adc6}=_0xc7acc5[_0x4700be(0x90)],_0x363349=Math[_0x4700be(0x8c)](0x1,_0x2abdee-0x1),_0xfaefd5=Math[_0x4700be(0x88)](_0x1838e9[_0x4700be(0xa2)],_0x2abdee+0x1);_0x1db31c[_0x4700be(0xb1)]('');for(let _0xf21698=_0x363349;_0xf21698<=_0xfaefd5;_0xf21698++){const _0xd42ae3=_0x1838e9[_0xf21698-0x1]||'',_0x550843=a166_0x2d312d[_0x4700be(0x9e)](_0xf21698['toString']()[_0x4700be(0xa1)](0x4)),_0x4f2f8f=a166_0x2d312d[_0x4700be(0x9e)](_0x4700be(0x9c));if(_0xf21698===_0x2abdee){_0x1db31c[_0x4700be(0xb1)]('\x20\x20'+_0x550843+_0x4f2f8f+_0x4de3f7(_0xd42ae3));const _0x14b68f='\x20'['repeat'](0x4+0x3+_0x66adc6-0x1);_0x1db31c['push']('\x20\x20'+_0x14b68f+_0x4de3f7('^'));}else _0x1db31c[_0x4700be(0xb1)]('\x20\x20'+_0x550843+_0x4f2f8f+a166_0x2d312d['dim'](_0xd42ae3));}}return _0x1db31c[_0x4700be(0x99)]('\x0a');}export function formatValidationResult(_0x464d2c,_0x21ee1b,_0x277fb8){const _0x4b84f7=a166_0x243c,_0x215871=[];for(const _0x37e246 of _0x464d2c[_0x4b84f7(0xae)]){_0x215871['push'](formatIssueWithContext(_0x37e246,_0x21ee1b,_0x277fb8)),_0x215871[_0x4b84f7(0xb1)]('');}for(const _0x20803e of _0x464d2c[_0x4b84f7(0xa7)]){_0x215871['push'](formatIssueWithContext(_0x20803e,_0x21ee1b,_0x277fb8)),_0x215871[_0x4b84f7(0xb1)]('');}return _0x215871['join']('\x0a');}