@treasuredata/tdx 2026.6.2 → 2026.6.3

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 (225) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-command.js.map +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/table-deleted.js +1 -1
  52. package/dist/commands/tables.js +1 -1
  53. package/dist/commands/unset-command.js +1 -1
  54. package/dist/commands/upgrade-command.js +1 -1
  55. package/dist/commands/use-command.js +1 -1
  56. package/dist/commands/user-command.js +1 -1
  57. package/dist/commands/work-command.js +1 -1
  58. package/dist/commands/workflow-command.js +1 -1
  59. package/dist/core/auth.js +1 -1
  60. package/dist/core/command-output.js +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/connection-cache.js +1 -1
  63. package/dist/core/constants.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.js +1 -1
  66. package/dist/core/keychain.js +1 -1
  67. package/dist/core/oauth-keychain.js +1 -1
  68. package/dist/core/oauth.js +1 -1
  69. package/dist/core/profile.js +1 -1
  70. package/dist/core/project-config.js +1 -1
  71. package/dist/core/session.js +1 -1
  72. package/dist/core/user-cache.js +1 -1
  73. package/dist/core/version.js +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/mcp/server.js +1 -1
  76. package/dist/mcp/tools/index.js +1 -1
  77. package/dist/mcp/tools/tdx-run.js +1 -1
  78. package/dist/mcp/tools/tdx-search.js +1 -1
  79. package/dist/mcp/tools/work-create-item.js +1 -1
  80. package/dist/mcp/utils.js +1 -1
  81. package/dist/proxy/claude-usage-tracker.js +1 -1
  82. package/dist/proxy/passthrough-server.js +1 -1
  83. package/dist/proxy/sse-usage-parser.js +1 -1
  84. package/dist/sdk/agent/agent-config.js +1 -1
  85. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  86. package/dist/sdk/agent/agent-yaml.js +1 -1
  87. package/dist/sdk/agent/test/evaluator.js +1 -1
  88. package/dist/sdk/agent/test/executor.js +1 -1
  89. package/dist/sdk/agent/test/index.js +1 -1
  90. package/dist/sdk/agent/test/output.js +1 -1
  91. package/dist/sdk/agent/test/parser.js +1 -1
  92. package/dist/sdk/agent/tool-target-registry.js +1 -1
  93. package/dist/sdk/api.js +1 -1
  94. package/dist/sdk/cas/cas-api-client.js +1 -1
  95. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  96. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  97. package/dist/sdk/cas/index.js +1 -1
  98. package/dist/sdk/cas/pull-workflow.js +1 -1
  99. package/dist/sdk/cas/push-workflow.js +1 -1
  100. package/dist/sdk/client/cdp-api-client.js +1 -1
  101. package/dist/sdk/client/delivery-api-client.js +1 -1
  102. package/dist/sdk/client/endpoints.js +1 -1
  103. package/dist/sdk/client/engage-api-client.js +1 -1
  104. package/dist/sdk/client/http-client.js +1 -1
  105. package/dist/sdk/client/llm-api-client.js +1 -1
  106. package/dist/sdk/client/oauth-refresh.js +1 -1
  107. package/dist/sdk/client/rate-limiter.js +1 -1
  108. package/dist/sdk/client/td-api-client.js +1 -1
  109. package/dist/sdk/client/trino-api-client.js +1 -1
  110. package/dist/sdk/client/workflow-client.js +1 -1
  111. package/dist/sdk/connection-validator.js +1 -1
  112. package/dist/sdk/connection.js +1 -1
  113. package/dist/sdk/delivery.js +1 -1
  114. package/dist/sdk/engage/campaign-pull.js +1 -1
  115. package/dist/sdk/engage/campaign-push.js +1 -1
  116. package/dist/sdk/engage/campaign-validator.js +1 -1
  117. package/dist/sdk/engage/campaign-yaml.js +1 -1
  118. package/dist/sdk/engage/template-pull.js +1 -1
  119. package/dist/sdk/engage/template-push.js +1 -1
  120. package/dist/sdk/engage/template-validator.js +1 -1
  121. package/dist/sdk/engage/template-yaml.js +1 -1
  122. package/dist/sdk/engage/types/campaign-def.js +1 -1
  123. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  124. package/dist/sdk/engage/types/template-schema.js +1 -1
  125. package/dist/sdk/engage.js +1 -1
  126. package/dist/sdk/errors.js +1 -1
  127. package/dist/sdk/index.js +1 -1
  128. package/dist/sdk/io/index.js +1 -1
  129. package/dist/sdk/io/node-filesystem.js +1 -1
  130. package/dist/sdk/job.js +1 -1
  131. package/dist/sdk/journey.js +1 -1
  132. package/dist/sdk/llm/chat-cache.js +1 -1
  133. package/dist/sdk/llm/index.js +1 -1
  134. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  135. package/dist/sdk/llm/model-factors.js +1 -1
  136. package/dist/sdk/llm/user-settings.js +1 -1
  137. package/dist/sdk/personalization.js +1 -1
  138. package/dist/sdk/policy.js +1 -1
  139. package/dist/sdk/query/deleted-table-validation.js +1 -1
  140. package/dist/sdk/query/index.js +1 -1
  141. package/dist/sdk/query/sql-parser.js +1 -1
  142. package/dist/sdk/realtime.js +1 -1
  143. package/dist/sdk/schedule.js +1 -1
  144. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  145. package/dist/sdk/segment/fields-display.js +1 -1
  146. package/dist/sdk/segment/file-discovery.js +1 -1
  147. package/dist/sdk/segment/journey-utils.js +1 -1
  148. package/dist/sdk/segment/journey-validator.js +1 -1
  149. package/dist/sdk/segment/journey-yaml.js +1 -1
  150. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  151. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  152. package/dist/sdk/segment/pull-workflow.js +1 -1
  153. package/dist/sdk/segment/push-recovery.js +1 -1
  154. package/dist/sdk/segment/push-workflow.js +1 -1
  155. package/dist/sdk/segment/resolution-context.js +1 -1
  156. package/dist/sdk/segment/segment-path-parser.js +1 -1
  157. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  158. package/dist/sdk/segment/segment-validator.js +1 -1
  159. package/dist/sdk/segment/target-resolution.js +1 -1
  160. package/dist/sdk/segment/tdx-config.js +1 -1
  161. package/dist/sdk/segment/types/activation-schema.js +1 -1
  162. package/dist/sdk/segment/types/journey-def.js +1 -1
  163. package/dist/sdk/segment/types/journey-schema.js +1 -1
  164. package/dist/sdk/segment/types/segment-def.js +1 -1
  165. package/dist/sdk/segment/types/segment-schema.js +1 -1
  166. package/dist/sdk/segment/validate-files.js +1 -1
  167. package/dist/sdk/segment/yaml-validator.js +1 -1
  168. package/dist/sdk/segment.js +1 -1
  169. package/dist/sdk/types/index.js +1 -1
  170. package/dist/sdk/types/progress.js +1 -1
  171. package/dist/sdk/types/workspace.js +1 -1
  172. package/dist/sdk/user.js +1 -1
  173. package/dist/sdk/util/format-detector.js +1 -1
  174. package/dist/sdk/util/formatters.js +1 -1
  175. package/dist/sdk/util/index.js +1 -1
  176. package/dist/sdk/util/paginate.js +1 -1
  177. package/dist/sdk/util/tree-formatter.js +1 -1
  178. package/dist/sdk/workflow/archive-validation.js +1 -1
  179. package/dist/sdk/workflow/clone-workflow.js +1 -1
  180. package/dist/sdk/workflow/index.js +1 -1
  181. package/dist/sdk/workflow/pull-workflow.js +1 -1
  182. package/dist/sdk/workflow/push-workflow.js +1 -1
  183. package/dist/sdk/workflow/task-graph.js +1 -1
  184. package/dist/sdk/workflow/tdx-config.js +1 -1
  185. package/dist/sdk/workflow/workflow-utils.js +1 -1
  186. package/dist/sdk/workspace/access-tracker.js +1 -1
  187. package/dist/sdk/workspace/frontmatter.js +1 -1
  188. package/dist/sdk/workspace/git.js +1 -1
  189. package/dist/sdk/workspace/index.js +1 -1
  190. package/dist/sdk/workspace/templates.js +1 -1
  191. package/dist/sdk/workspace/weekly.js +1 -1
  192. package/dist/sdk/workspace/wikilinks.js +1 -1
  193. package/dist/test-utils/command-runner.js +1 -1
  194. package/dist/test-utils/factories.js +1 -1
  195. package/dist/test-utils/fixtures.js +1 -1
  196. package/dist/test-utils/http-mock.js +1 -1
  197. package/dist/test-utils/index.js +1 -1
  198. package/dist/utils/async.js +1 -1
  199. package/dist/utils/colors.js +1 -1
  200. package/dist/utils/diff.js +1 -1
  201. package/dist/utils/file-permissions.js +1 -1
  202. package/dist/utils/file-reader.js +1 -1
  203. package/dist/utils/github-releases.js +1 -1
  204. package/dist/utils/global-cache.js +1 -1
  205. package/dist/utils/json-loader.js +1 -1
  206. package/dist/utils/local-cache.js +1 -1
  207. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  208. package/dist/utils/logger/formatters/index.js +1 -1
  209. package/dist/utils/logger/handlers/console-handler.js +1 -1
  210. package/dist/utils/logger/handlers/file-handler.js +1 -1
  211. package/dist/utils/logger/handlers/index.js +1 -1
  212. package/dist/utils/logger/handlers/null-handler.js +1 -1
  213. package/dist/utils/logger/index.js +1 -1
  214. package/dist/utils/logger/logger.js +1 -1
  215. package/dist/utils/logger/types.js +1 -1
  216. package/dist/utils/option-validation.js +1 -1
  217. package/dist/utils/process.js +1 -1
  218. package/dist/utils/prompt.js +1 -1
  219. package/dist/utils/spinner.js +1 -1
  220. package/dist/utils/sse-parser.js +1 -1
  221. package/dist/utils/string-utils.js +1 -1
  222. package/dist/utils/table-ref-parser.js +1 -1
  223. package/dist/utils/tdx-logger.js +1 -1
  224. package/dist/utils/version-check.js +1 -1
  225. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0xabb88a,_0x5cc42c){const _0x2cfe9c=a156_0x414d,_0x3ebad6=_0xabb88a();while(!![]){try{const _0x5a52da=-parseInt(_0x2cfe9c(0x193))/0x1*(-parseInt(_0x2cfe9c(0x194))/0x2)+-parseInt(_0x2cfe9c(0x19c))/0x3+parseInt(_0x2cfe9c(0x19e))/0x4+-parseInt(_0x2cfe9c(0x192))/0x5+parseInt(_0x2cfe9c(0x195))/0x6*(-parseInt(_0x2cfe9c(0x19a))/0x7)+-parseInt(_0x2cfe9c(0x19b))/0x8+parseInt(_0x2cfe9c(0x19d))/0x9*(parseInt(_0x2cfe9c(0x198))/0xa);if(_0x5a52da===_0x5cc42c)break;else _0x3ebad6['push'](_0x3ebad6['shift']());}catch(_0x139afd){_0x3ebad6['push'](_0x3ebad6['shift']());}}}(a156_0x29c9,0xe05be));export function buildFolderIdToPathMap(_0x21f93e){const _0x45df86=a156_0x414d,_0x1710f6=new Map(),_0x461594=new Map();for(const _0x30d7bc of _0x21f93e){_0x461594[_0x45df86(0x197)](_0x30d7bc['id'],_0x30d7bc);}const _0x2ca36c=new Set();for(const _0x2fde9f of _0x21f93e){!_0x2fde9f[_0x45df86(0x19f)]&&_0x2ca36c['add'](_0x2fde9f['id']);}function _0x413e55(_0x1b9783){const _0x5addf1=_0x45df86;if(_0x1710f6[_0x5addf1(0x1a0)](_0x1b9783['id']))return _0x1710f6[_0x5addf1(0x1a1)](_0x1b9783['id']);if(_0x2ca36c['has'](_0x1b9783['id']))return _0x1710f6[_0x5addf1(0x197)](_0x1b9783['id'],''),'';if(_0x1b9783['parentFolderId']){const _0x6d6191=_0x461594['get'](_0x1b9783[_0x5addf1(0x19f)]);if(_0x6d6191){const _0x592f9d=_0x413e55(_0x6d6191),_0x49c94d=_0x592f9d?_0x592f9d+'/'+_0x1b9783[_0x5addf1(0x199)]:_0x1b9783[_0x5addf1(0x199)];return _0x1710f6['set'](_0x1b9783['id'],_0x49c94d),_0x49c94d;}}const _0x2d23d4=_0x1b9783[_0x5addf1(0x199)];return _0x1710f6[_0x5addf1(0x197)](_0x1b9783['id'],_0x2d23d4),_0x2d23d4;}for(const _0x4bfd1d of _0x21f93e){_0x413e55(_0x4bfd1d);}return _0x1710f6;}export function buildFolderPathToIdMap(_0x4bee1){const _0x3c3242=a156_0x414d,_0x17f2fb=new Map(),_0x4bcf86=new Map();for(const _0x2e0ddc of _0x4bee1){_0x4bcf86[_0x3c3242(0x197)](_0x2e0ddc['id'],_0x2e0ddc);}const _0x180fd0=new Set();for(const _0x4318a9 of _0x4bee1){!_0x4318a9[_0x3c3242(0x19f)]&&_0x180fd0[_0x3c3242(0x196)](_0x4318a9['id']);}function _0x5cfa4e(_0x45f75f){const _0x5bca55=_0x3c3242;if(_0x180fd0[_0x5bca55(0x1a0)](_0x45f75f['id']))return'';if(_0x45f75f[_0x5bca55(0x19f)]){const _0xad2ce8=_0x4bcf86[_0x5bca55(0x1a1)](_0x45f75f['parentFolderId']);if(_0xad2ce8){const _0x19af43=_0x5cfa4e(_0xad2ce8);return _0x19af43?_0x19af43+'/'+_0x45f75f[_0x5bca55(0x199)]:_0x45f75f[_0x5bca55(0x199)];}}return _0x45f75f[_0x5bca55(0x199)];}for(const _0x201fc1 of _0x4bee1){const _0x2940c0=_0x5cfa4e(_0x201fc1);_0x17f2fb[_0x3c3242(0x197)](_0x2940c0,_0x201fc1['id']);}return _0x17f2fb;}function a156_0x414d(_0xa9cbb0,_0x8eaae){_0xa9cbb0=_0xa9cbb0-0x192;const _0x29c936=a156_0x29c9();let _0x414deb=_0x29c936[_0xa9cbb0];return _0x414deb;}export function buildFolderMaps(_0x2d64e9){const _0xc455c=a156_0x414d,_0x468d3c=buildFolderIdToPathMap(_0x2d64e9),_0xc95bda=new Map();for(const [_0x208261,_0x3d9dea]of _0x468d3c){_0xc95bda[_0xc455c(0x197)](_0x3d9dea,_0x208261);}return{'idToPath':_0x468d3c,'pathToId':_0xc95bda};}export function getFolderPath(_0x24b0e6,_0x454a7d){const _0x4a4317=a156_0x414d;if(!_0x24b0e6)return'';return _0x454a7d[_0x4a4317(0x1a1)](_0x24b0e6)??'';}function a156_0x29c9(){const _0x37d0ca=['1030722cwJEhl','9SNACsj','6811604zrrmqM','parentFolderId','has','get','356690zVWchl','1oSnJBc','850856EZwgPs','12vItrtk','add','set','3413380LpkJGY','name','879116sRcsth','7076840YyQIbP'];a156_0x29c9=function(){return _0x37d0ca;};return a156_0x29c9();}
1
+ (function(_0x53d2c9,_0x414495){const _0x25ca5e=a156_0x19b0,_0x2b6e68=_0x53d2c9();while(!![]){try{const _0x58d609=-parseInt(_0x25ca5e(0x157))/0x1*(-parseInt(_0x25ca5e(0x155))/0x2)+-parseInt(_0x25ca5e(0x153))/0x3+-parseInt(_0x25ca5e(0x15c))/0x4*(parseInt(_0x25ca5e(0x161))/0x5)+parseInt(_0x25ca5e(0x154))/0x6+-parseInt(_0x25ca5e(0x15a))/0x7+parseInt(_0x25ca5e(0x162))/0x8*(parseInt(_0x25ca5e(0x160))/0x9)+parseInt(_0x25ca5e(0x15b))/0xa*(-parseInt(_0x25ca5e(0x156))/0xb);if(_0x58d609===_0x414495)break;else _0x2b6e68['push'](_0x2b6e68['shift']());}catch(_0x4ab995){_0x2b6e68['push'](_0x2b6e68['shift']());}}}(a156_0x18aa,0x59185));function a156_0x19b0(_0x78a96b,_0x372213){_0x78a96b=_0x78a96b-0x153;const _0x18aae4=a156_0x18aa();let _0x19b082=_0x18aae4[_0x78a96b];return _0x19b082;}export function buildFolderIdToPathMap(_0x4a8399){const _0x3e9675=a156_0x19b0,_0x45890b=new Map(),_0x17d151=new Map();for(const _0x25f81b of _0x4a8399){_0x17d151['set'](_0x25f81b['id'],_0x25f81b);}const _0x4fa980=new Set();for(const _0x3d4c9d of _0x4a8399){!_0x3d4c9d[_0x3e9675(0x163)]&&_0x4fa980[_0x3e9675(0x15d)](_0x3d4c9d['id']);}function _0x3470fb(_0x3898f6){const _0x3c92c7=_0x3e9675;if(_0x45890b[_0x3c92c7(0x158)](_0x3898f6['id']))return _0x45890b['get'](_0x3898f6['id']);if(_0x4fa980[_0x3c92c7(0x158)](_0x3898f6['id']))return _0x45890b['set'](_0x3898f6['id'],''),'';if(_0x3898f6[_0x3c92c7(0x163)]){const _0x802b78=_0x17d151[_0x3c92c7(0x159)](_0x3898f6[_0x3c92c7(0x163)]);if(_0x802b78){const _0x8ab598=_0x3470fb(_0x802b78),_0x12165a=_0x8ab598?_0x8ab598+'/'+_0x3898f6[_0x3c92c7(0x15f)]:_0x3898f6[_0x3c92c7(0x15f)];return _0x45890b['set'](_0x3898f6['id'],_0x12165a),_0x12165a;}}const _0x32b245=_0x3898f6[_0x3c92c7(0x15f)];return _0x45890b[_0x3c92c7(0x15e)](_0x3898f6['id'],_0x32b245),_0x32b245;}for(const _0x1aa806 of _0x4a8399){_0x3470fb(_0x1aa806);}return _0x45890b;}export function buildFolderPathToIdMap(_0x5f4d52){const _0x281d16=new Map(),_0x15fbe5=new Map();for(const _0x5a331b of _0x5f4d52){_0x15fbe5['set'](_0x5a331b['id'],_0x5a331b);}const _0xa3d14c=new Set();for(const _0x29dd01 of _0x5f4d52){!_0x29dd01['parentFolderId']&&_0xa3d14c['add'](_0x29dd01['id']);}function _0x169731(_0x187c76){const _0x658b6c=a156_0x19b0;if(_0xa3d14c[_0x658b6c(0x158)](_0x187c76['id']))return'';if(_0x187c76['parentFolderId']){const _0x388f4=_0x15fbe5[_0x658b6c(0x159)](_0x187c76[_0x658b6c(0x163)]);if(_0x388f4){const _0x344ebd=_0x169731(_0x388f4);return _0x344ebd?_0x344ebd+'/'+_0x187c76[_0x658b6c(0x15f)]:_0x187c76['name'];}}return _0x187c76['name'];}for(const _0x594021 of _0x5f4d52){const _0x10c67e=_0x169731(_0x594021);_0x281d16['set'](_0x10c67e,_0x594021['id']);}return _0x281d16;}function a156_0x18aa(){const _0x4f032f=['11Kmgpxz','85197roTjaq','has','get','756196ampeiq','886910dbgYDG','76088nUnNxP','add','set','name','9Gfpkur','110AvZcun','30056tSVeMi','parentFolderId','406776lAIOhx','3604734WVtVqK','12RxvOqd'];a156_0x18aa=function(){return _0x4f032f;};return a156_0x18aa();}export function buildFolderMaps(_0x3d87e3){const _0x1c3d66=buildFolderIdToPathMap(_0x3d87e3),_0xddb8e6=new Map();for(const [_0x257f2b,_0x273000]of _0x1c3d66){_0xddb8e6['set'](_0x273000,_0x257f2b);}return{'idToPath':_0x1c3d66,'pathToId':_0xddb8e6};}export function getFolderPath(_0xd00f0a,_0x3404d9){const _0x3169cb=a156_0x19b0;if(!_0xd00f0a)return'';return _0x3404d9[_0x3169cb(0x159)](_0xd00f0a)??'';}
@@ -1 +1 @@
1
- (function(_0xcb3d19,_0x38e246){const _0x38dda5=a157_0x57cc,_0x28101a=_0xcb3d19();while(!![]){try{const _0x40e6b4=-parseInt(_0x38dda5(0x83))/0x1*(-parseInt(_0x38dda5(0x96))/0x2)+parseInt(_0x38dda5(0x7f))/0x3*(parseInt(_0x38dda5(0xa0))/0x4)+parseInt(_0x38dda5(0xb2))/0x5+parseInt(_0x38dda5(0x99))/0x6*(-parseInt(_0x38dda5(0x92))/0x7)+parseInt(_0x38dda5(0x84))/0x8+-parseInt(_0x38dda5(0xa6))/0x9+parseInt(_0x38dda5(0xa4))/0xa*(-parseInt(_0x38dda5(0x9a))/0xb);if(_0x40e6b4===_0x38e246)break;else _0x28101a['push'](_0x28101a['shift']());}catch(_0x293060){_0x28101a['push'](_0x28101a['shift']());}}}(a157_0x4b29,0xe2d40));import a157_0x112c91 from'path';import{parse as a157_0x539c96}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x166886){const _0x23e7ca=a157_0x57cc;if(!_0x166886||_0x166886[_0x23e7ca(0xad)]()==='')throw new Error(_0x23e7ca(0x9c));const _0x25610e=_0x166886['trim']();if(_0x25610e==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x166886};const _0x2d1970=_0x25610e[_0x23e7ca(0xab)]('/')?_0x25610e[_0x23e7ca(0xa1)](0x1):_0x25610e,_0x49cfbb=_0x2d1970['split']('/')[_0x23e7ca(0x8c)](_0x48c149=>_0x48c149!=='');if(_0x49cfbb['length']===0x0)throw new Error(_0x23e7ca(0xae));const _0x4bdf04=_0x25610e['startsWith']('/')||!isRelativePathSegment(_0x49cfbb[0x0]);for(const _0x1a8312 of _0x49cfbb){validatePathSegment(_0x1a8312);}return{'segments':_0x49cfbb,'isAbsolute':_0x4bdf04,'raw':_0x166886};}function isRelativePathSegment(_0x4625b5){return _0x4625b5==='.'||_0x4625b5==='..';}function validatePathSegment(_0x4d6f57){const _0x3fa96f=a157_0x57cc;if(_0x4d6f57==='')throw new Error(_0x3fa96f(0xa5));if(_0x4d6f57==='.'||_0x4d6f57==='..')return;if(/[\x00-\x1F\x7F]/[_0x3fa96f(0x81)](_0x4d6f57))throw new Error(_0x3fa96f(0x82)+_0x4d6f57);if(_0x4d6f57!==_0x4d6f57[_0x3fa96f(0xad)]()){}}export function validatePath(_0x1baf56){const _0x552419=a157_0x57cc;if(_0x1baf56[_0x552419(0xb0)]['length']===0x0&&!_0x1baf56[_0x552419(0xb1)])throw new Error(_0x552419(0x90));if(_0x1baf56[_0x552419(0xb1)]){if(_0x1baf56['segments'][0x0]==='..')throw new Error(_0x552419(0xa2));let _0xb85714=0x0;for(const _0x57f0f8 of _0x1baf56[_0x552419(0xb0)]){if(_0x57f0f8==='..'){if(_0xb85714===0x0)throw new Error(_0x552419(0xa7));_0xb85714--;}else _0x57f0f8!=='.'&&_0xb85714++;}}}export function joinPaths(_0x569ab2,_0x172f25){const _0x1de9e4=a157_0x57cc;if(!_0x569ab2||_0x569ab2==='/')return _0x172f25;if(!_0x172f25||_0x172f25==='.')return _0x569ab2;if(_0x172f25[_0x1de9e4(0xab)]('/'))return _0x172f25;const _0x446190=parsePath(_0x569ab2),_0x4f8841=parsePath(_0x172f25),_0x2504d6=[..._0x446190[_0x1de9e4(0xb0)]];for(const _0x59674f of _0x4f8841[_0x1de9e4(0xb0)]){if(_0x59674f==='.')continue;else{if(_0x59674f==='..'){if(_0x2504d6[_0x1de9e4(0x9d)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x2504d6['pop']();}else _0x2504d6[_0x1de9e4(0x8b)](_0x59674f);}}const _0x4aad16=_0x2504d6[_0x1de9e4(0x95)]('/');return _0x446190[_0x1de9e4(0x8a)][_0x1de9e4(0xab)]('/')?'/'+_0x4aad16:_0x4aad16;}function a157_0x4b29(){const _0x41b351=['Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.','Path\x20cannot\x20be\x20empty','length','parent_segment','tdx.json','19704BXkClq','substring','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','resolve','610vJbeVm','Path\x20segment\x20cannot\x20be\x20empty','2953809DtvnVi','Path\x20attempts\x20to\x20navigate\x20above\x20root','slice','exists','readFile','startsWith','dirname','trim','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','type','segments','isAbsolute','8594065pQshFY','897wZTMtH','parse','test','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','4niWmBX','5649032FeJSDP','root','journey','endsWith','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','File\x20not\x20found:\x20','raw','push','filter','No\x20tdx.json\x20found\x20for\x20file:\x20','name','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','Relative\x20path\x20cannot\x20be\x20empty','Cannot\x20navigate\x20above\x20root','161ttcmJG','.yml','replace','join','53854dtEhVA','Cannot\x20split\x20empty\x20path','pop','441492ujQOoe','190399GDiRCj'];a157_0x4b29=function(){return _0x41b351;};return a157_0x4b29();}function a157_0x57cc(_0x1c83e9,_0x4dcb03){_0x1c83e9=_0x1c83e9-0x7f;const _0x4b295c=a157_0x4b29();let _0x57cce6=_0x4b295c[_0x1c83e9];return _0x57cce6;}export function normalizePath(_0x811509){const _0x4764f7=a157_0x57cc,_0x1a1990=parsePath(_0x811509),_0x1bc216=[];for(const _0x27b4ce of _0x1a1990[_0x4764f7(0xb0)]){if(_0x27b4ce==='.')continue;else{if(_0x27b4ce==='..'){if(_0x1bc216['length']===0x0){if(_0x1a1990[_0x4764f7(0xb1)])throw new Error(_0x4764f7(0x91));_0x1bc216[_0x4764f7(0x8b)]('..');}else _0x1bc216[_0x1bc216['length']-0x1]==='..'?_0x1bc216[_0x4764f7(0x8b)]('..'):_0x1bc216[_0x4764f7(0x98)]();}else _0x1bc216['push'](_0x27b4ce);}}if(_0x1bc216[_0x4764f7(0x9d)]===0x0)return _0x1a1990[_0x4764f7(0xb1)]?'/':'.';const _0x118784=_0x1bc216[_0x4764f7(0x95)]('/');return _0x1a1990[_0x4764f7(0x8a)][_0x4764f7(0xab)]('/')?'/'+_0x118784:_0x118784;}export function getParentPath(_0x541c3f){const _0x1a8a33=a157_0x57cc,_0x4154c5=parsePath(_0x541c3f);if(_0x4154c5[_0x1a8a33(0xb0)][_0x1a8a33(0x9d)]<=0x1)return'/';const _0x29a85f=_0x4154c5[_0x1a8a33(0xb0)][_0x1a8a33(0xa8)](0x0,-0x1)['join']('/');return _0x4154c5['raw'][_0x1a8a33(0xab)]('/')?'/'+_0x29a85f:_0x29a85f;}export function getBaseName(_0x1e1ceb){const _0x16f6a9=a157_0x57cc,_0x55b4d=parsePath(_0x1e1ceb);return _0x55b4d[_0x16f6a9(0xb0)][_0x55b4d[_0x16f6a9(0xb0)][_0x16f6a9(0x9d)]-0x1]||'';}export function isChildPath(_0xee3dc5,_0x479188){const _0x2a13ad=a157_0x57cc,_0x71835e=parsePath(_0xee3dc5),_0x32febc=parsePath(_0x479188);if(_0x71835e[_0x2a13ad(0xb0)][_0x2a13ad(0x9d)]<=_0x32febc[_0x2a13ad(0xb0)][_0x2a13ad(0x9d)])return![];for(let _0x4e9232=0x0;_0x4e9232<_0x32febc[_0x2a13ad(0xb0)][_0x2a13ad(0x9d)];_0x4e9232++){if(_0x71835e[_0x2a13ad(0xb0)][_0x4e9232]!==_0x32febc[_0x2a13ad(0xb0)][_0x4e9232])return![];}return!![];}export function splitPath(_0x5b0d50){const _0x2a03f1=a157_0x57cc,_0x239311=parsePath(_0x5b0d50);if(_0x239311[_0x2a03f1(0xb0)][_0x2a03f1(0x9d)]===0x0)throw new Error(_0x2a03f1(0x97));if(_0x239311[_0x2a03f1(0xb0)][_0x2a03f1(0x9d)]===0x1)return{'parent':_0x239311[_0x2a03f1(0xb0)][0x0]};return{'parent':_0x239311[_0x2a03f1(0xb0)][0x0],'child':_0x239311[_0x2a03f1(0xb0)][_0x2a03f1(0xa8)](0x1)[_0x2a03f1(0x95)]('/')};}export function isYamlFilePath(_0x88ab0d){const _0x32364f=a157_0x57cc;return _0x88ab0d['endsWith'](_0x32364f(0x93))||_0x88ab0d[_0x32364f(0x87)]('.yaml');}export async function resolveYamlFilePath(_0xa9cfa3,_0xf925db=nodeFileSystem){const _0x26ed08=a157_0x57cc,_0x5e934e=a157_0x112c91[_0x26ed08(0xa3)](_0xa9cfa3);if(!await _0xf925db[_0x26ed08(0xa9)](_0x5e934e))throw new Error(_0x26ed08(0x89)+_0xa9cfa3);let _0x1105f5=a157_0x112c91['dirname'](_0x5e934e),_0x5d1d4a=null,_0x3acd29=null;const _0x1aff38=a157_0x112c91[_0x26ed08(0x80)](_0x1105f5)[_0x26ed08(0x85)];while(_0x1105f5!==_0x1aff38){const _0x2b49c7=a157_0x112c91[_0x26ed08(0x95)](_0x1105f5,_0x26ed08(0x9f));if(await _0xf925db[_0x26ed08(0xa9)](_0x2b49c7)){_0x5d1d4a=_0x2b49c7,_0x3acd29=_0x1105f5;break;}_0x1105f5=a157_0x112c91[_0x26ed08(0xac)](_0x1105f5);}if(!_0x5d1d4a||!_0x3acd29)throw new Error(_0x26ed08(0x8d)+_0xa9cfa3+'\x0a'+_0x26ed08(0x9b));const _0x53135f=await _0xf925db[_0x26ed08(0xaa)](_0x5d1d4a),_0x2eae5b=JSON[_0x26ed08(0x80)](_0x53135f),_0x1fe413=_0x2eae5b[_0x26ed08(0x9e)];if(!_0x1fe413)throw new Error(_0x26ed08(0x8f));const _0x5c8a28=await _0xf925db[_0x26ed08(0xaa)](_0x5e934e),_0x55461c=a157_0x539c96(_0x5c8a28),_0x2fa232=_0x55461c[_0x26ed08(0x8e)];if(!_0x2fa232)throw new Error(_0x26ed08(0x88)+_0xa9cfa3);const _0x1dff07=_0x55461c[_0x26ed08(0xaf)]===_0x26ed08(0x86)?_0x26ed08(0x86):'segment',_0xfeb68f=a157_0x112c91['relative'](_0x3acd29,_0x5e934e),_0x2e7ad4=a157_0x112c91[_0x26ed08(0xac)](_0xfeb68f),_0x1db879=_0x2e7ad4==='.'?'':_0x2e7ad4[_0x26ed08(0x94)](/\\/g,'/'),_0xdc667b=_0x1db879?_0x1fe413+'/'+_0x1db879+'/'+_0x2fa232:_0x1fe413+'/'+_0x2fa232;return{'parentSegment':_0x1fe413,'segmentName':_0x2fa232,'folderPath':_0x1db879,'fullPath':_0xdc667b,'resourceType':_0x1dff07,'content':_0x5c8a28};}
1
+ (function(_0x5e4bf3,_0x6fe988){const _0x5f2052=a157_0x406a,_0x519b39=_0x5e4bf3();while(!![]){try{const _0x1f6e37=-parseInt(_0x5f2052(0xc3))/0x1*(parseInt(_0x5f2052(0xc4))/0x2)+parseInt(_0x5f2052(0xd4))/0x3*(-parseInt(_0x5f2052(0xc6))/0x4)+-parseInt(_0x5f2052(0xbf))/0x5+-parseInt(_0x5f2052(0xe0))/0x6*(parseInt(_0x5f2052(0xd9))/0x7)+-parseInt(_0x5f2052(0xdb))/0x8*(-parseInt(_0x5f2052(0xb8))/0x9)+-parseInt(_0x5f2052(0xbc))/0xa+-parseInt(_0x5f2052(0xcd))/0xb*(-parseInt(_0x5f2052(0xe3))/0xc);if(_0x1f6e37===_0x6fe988)break;else _0x519b39['push'](_0x519b39['shift']());}catch(_0x347188){_0x519b39['push'](_0x519b39['shift']());}}}(a157_0x26ee,0x2313e));import a157_0x30ee73 from'path';import{parse as a157_0x3af7ad}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0xd7141){const _0x447669=a157_0x406a;if(!_0xd7141||_0xd7141['trim']()==='')throw new Error(_0x447669(0xe2));const _0x41455a=_0xd7141['trim']();if(_0x41455a==='/')return{'segments':[],'isAbsolute':!![],'raw':_0xd7141};const _0x308554=_0x41455a['startsWith']('/')?_0x41455a[_0x447669(0xb6)](0x1):_0x41455a,_0x444276=_0x308554[_0x447669(0xce)]('/')[_0x447669(0xd8)](_0x5d0968=>_0x5d0968!=='');if(_0x444276[_0x447669(0xb7)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x2ddea9=_0x41455a[_0x447669(0xc2)]('/')||!isRelativePathSegment(_0x444276[0x0]);for(const _0x7e277b of _0x444276){validatePathSegment(_0x7e277b);}return{'segments':_0x444276,'isAbsolute':_0x2ddea9,'raw':_0xd7141};}function isRelativePathSegment(_0x2ea7d0){return _0x2ea7d0==='.'||_0x2ea7d0==='..';}function a157_0x406a(_0x13f845,_0x3c0b42){_0x13f845=_0x13f845-0xb6;const _0x26ee30=a157_0x26ee();let _0x406af5=_0x26ee30[_0x13f845];return _0x406af5;}function validatePathSegment(_0xc743f4){const _0x92270b=a157_0x406a;if(_0xc743f4==='')throw new Error(_0x92270b(0xdc));if(_0xc743f4==='.'||_0xc743f4==='..')return;if(/[\x00-\x1F\x7F]/[_0x92270b(0xe4)](_0xc743f4))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0xc743f4);if(_0xc743f4!==_0xc743f4[_0x92270b(0xde)]()){}}function a157_0x26ee(){const _0x37e445=['push','Hint:\x20Run\x20`tdx\x20sg\x20pull\x20\x22Parent\x20Segment\x20Name\x22`\x20first\x20to\x20create\x20a\x20project\x20directory,\x20then\x20work\x20within\x20that\x20directory.','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','dirname','11NkKvxZ','split','Cannot\x20navigate\x20above\x20root','journey','No\x20tdx.json\x20found\x20for\x20file:\x20','exists','Relative\x20path\x20cannot\x20be\x20empty','95673UFolxZ','Path\x20attempts\x20to\x20navigate\x20above\x20root','endsWith','pop','filter','1593389VEVbTa','segments','3496ApufBo','Path\x20segment\x20cannot\x20be\x20empty','isAbsolute','trim','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','6mIywWa','Cannot\x20split\x20empty\x20path','Path\x20cannot\x20be\x20empty','12998700DyDnoO','test','substring','length','2799MMLxcB','slice','readFile','type','1858330lcYmOu','name','parse','951695pMBiKV','File\x20not\x20found:\x20','join','startsWith','74GnYVYk','6714uRiYZQ','segment','28xzMekP','raw','parent_segment'];a157_0x26ee=function(){return _0x37e445;};return a157_0x26ee();}export function validatePath(_0x35638e){const _0xf8fb44=a157_0x406a;if(_0x35638e[_0xf8fb44(0xda)]['length']===0x0&&!_0x35638e['isAbsolute'])throw new Error(_0xf8fb44(0xd3));if(_0x35638e[_0xf8fb44(0xdd)]){if(_0x35638e[_0xf8fb44(0xda)][0x0]==='..')throw new Error(_0xf8fb44(0xcb));let _0xf14de=0x0;for(const _0x36f4ac of _0x35638e[_0xf8fb44(0xda)]){if(_0x36f4ac==='..'){if(_0xf14de===0x0)throw new Error(_0xf8fb44(0xd5));_0xf14de--;}else _0x36f4ac!=='.'&&_0xf14de++;}}}export function joinPaths(_0x1938c9,_0x47c8ad){const _0x4dea84=a157_0x406a;if(!_0x1938c9||_0x1938c9==='/')return _0x47c8ad;if(!_0x47c8ad||_0x47c8ad==='.')return _0x1938c9;if(_0x47c8ad[_0x4dea84(0xc2)]('/'))return _0x47c8ad;const _0x6b74bb=parsePath(_0x1938c9),_0x56b896=parsePath(_0x47c8ad),_0x425e97=[..._0x6b74bb[_0x4dea84(0xda)]];for(const _0xad6650 of _0x56b896[_0x4dea84(0xda)]){if(_0xad6650==='.')continue;else{if(_0xad6650==='..'){if(_0x425e97[_0x4dea84(0xb7)]===0x0)throw new Error(_0x4dea84(0xcf));_0x425e97[_0x4dea84(0xd7)]();}else _0x425e97[_0x4dea84(0xc9)](_0xad6650);}}const _0x46c8c8=_0x425e97['join']('/');return _0x6b74bb['raw'][_0x4dea84(0xc2)]('/')?'/'+_0x46c8c8:_0x46c8c8;}export function normalizePath(_0x2f675b){const _0x2f4a7d=a157_0x406a,_0x5e59ad=parsePath(_0x2f675b),_0x5ebb8e=[];for(const _0x125975 of _0x5e59ad[_0x2f4a7d(0xda)]){if(_0x125975==='.')continue;else{if(_0x125975==='..'){if(_0x5ebb8e['length']===0x0){if(_0x5e59ad[_0x2f4a7d(0xdd)])throw new Error('Cannot\x20navigate\x20above\x20root');_0x5ebb8e[_0x2f4a7d(0xc9)]('..');}else _0x5ebb8e[_0x5ebb8e[_0x2f4a7d(0xb7)]-0x1]==='..'?_0x5ebb8e[_0x2f4a7d(0xc9)]('..'):_0x5ebb8e[_0x2f4a7d(0xd7)]();}else _0x5ebb8e[_0x2f4a7d(0xc9)](_0x125975);}}if(_0x5ebb8e[_0x2f4a7d(0xb7)]===0x0)return _0x5e59ad[_0x2f4a7d(0xdd)]?'/':'.';const _0x5f522a=_0x5ebb8e['join']('/');return _0x5e59ad[_0x2f4a7d(0xc7)][_0x2f4a7d(0xc2)]('/')?'/'+_0x5f522a:_0x5f522a;}export function getParentPath(_0x2a7d60){const _0x13c963=a157_0x406a,_0x56a6ad=parsePath(_0x2a7d60);if(_0x56a6ad['segments']['length']<=0x1)return'/';const _0x43a173=_0x56a6ad[_0x13c963(0xda)][_0x13c963(0xb9)](0x0,-0x1)[_0x13c963(0xc1)]('/');return _0x56a6ad[_0x13c963(0xc7)][_0x13c963(0xc2)]('/')?'/'+_0x43a173:_0x43a173;}export function getBaseName(_0x9d5261){const _0x53b35a=parsePath(_0x9d5261);return _0x53b35a['segments'][_0x53b35a['segments']['length']-0x1]||'';}export function isChildPath(_0x4fad7c,_0x1f82aa){const _0x5a6401=a157_0x406a,_0x2a26cf=parsePath(_0x4fad7c),_0x2a6560=parsePath(_0x1f82aa);if(_0x2a26cf[_0x5a6401(0xda)][_0x5a6401(0xb7)]<=_0x2a6560[_0x5a6401(0xda)][_0x5a6401(0xb7)])return![];for(let _0x4294e1=0x0;_0x4294e1<_0x2a6560['segments'][_0x5a6401(0xb7)];_0x4294e1++){if(_0x2a26cf[_0x5a6401(0xda)][_0x4294e1]!==_0x2a6560[_0x5a6401(0xda)][_0x4294e1])return![];}return!![];}export function splitPath(_0x5d4e15){const _0x4dc3da=a157_0x406a,_0xaee695=parsePath(_0x5d4e15);if(_0xaee695['segments'][_0x4dc3da(0xb7)]===0x0)throw new Error(_0x4dc3da(0xe1));if(_0xaee695[_0x4dc3da(0xda)]['length']===0x1)return{'parent':_0xaee695[_0x4dc3da(0xda)][0x0]};return{'parent':_0xaee695['segments'][0x0],'child':_0xaee695[_0x4dc3da(0xda)][_0x4dc3da(0xb9)](0x1)[_0x4dc3da(0xc1)]('/')};}export function isYamlFilePath(_0x1ac225){const _0x5189ad=a157_0x406a;return _0x1ac225[_0x5189ad(0xd6)]('.yml')||_0x1ac225[_0x5189ad(0xd6)]('.yaml');}export async function resolveYamlFilePath(_0x4d0a6b,_0x244de4=nodeFileSystem){const _0x5f9959=a157_0x406a,_0x1e08d0=a157_0x30ee73['resolve'](_0x4d0a6b);if(!await _0x244de4['exists'](_0x1e08d0))throw new Error(_0x5f9959(0xc0)+_0x4d0a6b);let _0xd7da41=a157_0x30ee73['dirname'](_0x1e08d0),_0x516878=null,_0xff3802=null;const _0x259ea2=a157_0x30ee73['parse'](_0xd7da41)['root'];while(_0xd7da41!==_0x259ea2){const _0x36b47f=a157_0x30ee73['join'](_0xd7da41,'tdx.json');if(await _0x244de4[_0x5f9959(0xd2)](_0x36b47f)){_0x516878=_0x36b47f,_0xff3802=_0xd7da41;break;}_0xd7da41=a157_0x30ee73[_0x5f9959(0xcc)](_0xd7da41);}if(!_0x516878||!_0xff3802)throw new Error(_0x5f9959(0xd1)+_0x4d0a6b+'\x0a'+_0x5f9959(0xca));const _0x3784e8=await _0x244de4['readFile'](_0x516878),_0x2b4d36=JSON[_0x5f9959(0xbe)](_0x3784e8),_0x2000f0=_0x2b4d36[_0x5f9959(0xc8)];if(!_0x2000f0)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x46b996=await _0x244de4[_0x5f9959(0xba)](_0x1e08d0),_0x3ea53c=a157_0x3af7ad(_0x46b996),_0x13e0f9=_0x3ea53c[_0x5f9959(0xbd)];if(!_0x13e0f9)throw new Error(_0x5f9959(0xdf)+_0x4d0a6b);const _0x2035c0=_0x3ea53c[_0x5f9959(0xbb)]==='journey'?_0x5f9959(0xd0):_0x5f9959(0xc5),_0xa86559=a157_0x30ee73['relative'](_0xff3802,_0x1e08d0),_0x20e525=a157_0x30ee73[_0x5f9959(0xcc)](_0xa86559),_0xaea2b7=_0x20e525==='.'?'':_0x20e525['replace'](/\\/g,'/'),_0x4ecebb=_0xaea2b7?_0x2000f0+'/'+_0xaea2b7+'/'+_0x13e0f9:_0x2000f0+'/'+_0x13e0f9;return{'parentSegment':_0x2000f0,'segmentName':_0x13e0f9,'folderPath':_0xaea2b7,'fullPath':_0x4ecebb,'resourceType':_0x2035c0,'content':_0x46b996};}
@@ -1 +1 @@
1
- function a158_0x2a64(){const _0xf17d46=['570699IfogkR','Invalid\x20segment\x20reference\x20format:\x20','6362163mIaLtu','.\x20Child\x20name\x20cannot\x20be\x20empty','substring','135yQNGnu','.\x20Parent\x20name\x20cannot\x20be\x20empty','7GvYclQ','2664192OmYWvs','68394BrRKUd','2842552PPwlEM','6lezrxo','3942323nzWXMv','indexOf','10aoeMiW','455205HhAkmh'];a158_0x2a64=function(){return _0xf17d46;};return a158_0x2a64();}(function(_0x20d7b1,_0x26383e){const _0x5694ab=a158_0x42e7,_0x36856d=_0x20d7b1();while(!![]){try{const _0x5e3622=-parseInt(_0x5694ab(0x178))/0x1+parseInt(_0x5694ab(0x174))/0x2*(parseInt(_0x5694ab(0x169))/0x3)+parseInt(_0x5694ab(0x171))/0x4+parseInt(_0x5694ab(0x16e))/0x5*(parseInt(_0x5694ab(0x172))/0x6)+parseInt(_0x5694ab(0x170))/0x7*(-parseInt(_0x5694ab(0x173))/0x8)+parseInt(_0x5694ab(0x16b))/0x9*(-parseInt(_0x5694ab(0x177))/0xa)+parseInt(_0x5694ab(0x175))/0xb;if(_0x5e3622===_0x26383e)break;else _0x36856d['push'](_0x36856d['shift']());}catch(_0x48e718){_0x36856d['push'](_0x36856d['shift']());}}}(a158_0x2a64,0x5e1ca));function a158_0x42e7(_0x37ae2d,_0x4af14e){_0x37ae2d=_0x37ae2d-0x169;const _0x2a647a=a158_0x2a64();let _0x42e75a=_0x2a647a[_0x37ae2d];return _0x42e75a;}export function parseSegmentRef(_0x2e79bb){const _0x1a4e1c=a158_0x42e7,_0x630e77=_0x2e79bb[_0x1a4e1c(0x176)]('/');if(_0x630e77===-0x1)return{'parentId':_0x2e79bb};if(_0x630e77===0x0)throw new Error(_0x1a4e1c(0x16a)+_0x2e79bb+_0x1a4e1c(0x16f));const _0x5a7eb6=_0x2e79bb['substring'](0x0,_0x630e77),_0x40a2a7=_0x2e79bb[_0x1a4e1c(0x16d)](_0x630e77+0x1);if(_0x40a2a7==='')throw new Error(_0x1a4e1c(0x16a)+_0x2e79bb+_0x1a4e1c(0x16c));return{'parentId':_0x5a7eb6,'childId':_0x40a2a7};}
1
+ function a158_0x2cd0(_0x552412,_0x5bbac9){_0x552412=_0x552412-0xb0;const _0x5bc820=a158_0x5bc8();let _0x2cd021=_0x5bc820[_0x552412];return _0x2cd021;}(function(_0x4505a3,_0x40fc99){const _0x23aa50=a158_0x2cd0,_0xc7856=_0x4505a3();while(!![]){try{const _0x51260b=parseInt(_0x23aa50(0xb3))/0x1*(-parseInt(_0x23aa50(0xb4))/0x2)+-parseInt(_0x23aa50(0xb8))/0x3*(parseInt(_0x23aa50(0xbd))/0x4)+parseInt(_0x23aa50(0xb2))/0x5+parseInt(_0x23aa50(0xbe))/0x6*(parseInt(_0x23aa50(0xb1))/0x7)+parseInt(_0x23aa50(0xb5))/0x8+-parseInt(_0x23aa50(0xb7))/0x9*(parseInt(_0x23aa50(0xb9))/0xa)+parseInt(_0x23aa50(0xb6))/0xb*(parseInt(_0x23aa50(0xba))/0xc);if(_0x51260b===_0x40fc99)break;else _0xc7856['push'](_0xc7856['shift']());}catch(_0x1abc9c){_0xc7856['push'](_0xc7856['shift']());}}}(a158_0x5bc8,0x4d161));function a158_0x5bc8(){const _0x20965e=['11nfAZlO','171tknAaR','387PXPkZK','293320TEBdOk','4616736uJhfAK','.\x20Child\x20name\x20cannot\x20be\x20empty','Invalid\x20segment\x20reference\x20format:\x20','9584nqLgNR','1225320VNOaLy','substring','7gEAisC','1995935KBiYjL','25076WquRAJ','28UMSESq','4360528PQrqxc'];a158_0x5bc8=function(){return _0x20965e;};return a158_0x5bc8();}export function parseSegmentRef(_0xe6ba00){const _0x409bf9=a158_0x2cd0,_0x251336=_0xe6ba00['indexOf']('/');if(_0x251336===-0x1)return{'parentId':_0xe6ba00};if(_0x251336===0x0)throw new Error(_0x409bf9(0xbc)+_0xe6ba00+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x501e02=_0xe6ba00[_0x409bf9(0xb0)](0x0,_0x251336),_0x340375=_0xe6ba00[_0x409bf9(0xb0)](_0x251336+0x1);if(_0x340375==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0xe6ba00+_0x409bf9(0xbb));return{'parentId':_0x501e02,'childId':_0x340375};}
@@ -1 +1 @@
1
- (function(_0x122c6c,_0x1633f1){const _0x1f1610=a159_0x1511,_0x246b62=_0x122c6c();while(!![]){try{const _0x1a4738=parseInt(_0x1f1610(0x230))/0x1*(parseInt(_0x1f1610(0x233))/0x2)+parseInt(_0x1f1610(0x22b))/0x3*(-parseInt(_0x1f1610(0x1e9))/0x4)+parseInt(_0x1f1610(0x21f))/0x5+-parseInt(_0x1f1610(0x1fe))/0x6*(parseInt(_0x1f1610(0x1ee))/0x7)+-parseInt(_0x1f1610(0x1ef))/0x8*(parseInt(_0x1f1610(0x222))/0x9)+-parseInt(_0x1f1610(0x1eb))/0xa+-parseInt(_0x1f1610(0x20f))/0xb*(-parseInt(_0x1f1610(0x217))/0xc);if(_0x1a4738===_0x1633f1)break;else _0x246b62['push'](_0x246b62['shift']());}catch(_0x199cca){_0x246b62['push'](_0x246b62['shift']());}}}(a159_0x20b4,0xdf444));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';function a159_0x20b4(){const _0x3aa687=['.operator.value','2524790BHaURn','Behavior','attribute','686623zKFCyD','3220432oISHne','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','TimeWithinNext','Attribute\x20name\x20cannot\x20be\x20empty','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','MISSING_NAME','type','path','description','endsWith','name','custom','match','map','issues','6YhxJao','level','params','Attribute\x20\x27','Behavior\x20source\x20\x27','rule.type','.operator.type','Value','MISSING_TIME_UNIT','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','.filter','aggregation','MISSING_OPERATOR_VALUE','source','includes','push','Remove\x20\x27not:\x20false\x27\x20—\x20temporal\x20operators\x20do\x20not\x20support\x20negation.','2268101pdlzqC','success','conditions','.attribute','filter','\x27\x20with\x20attribute\x20\x27','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','Remove\x20\x27not\x27\x20—\x20temporal\x20operators\x20do\x20not\x20support\x20negation.','36pOSlAT','INVALID_OPERATOR_TYPE','operator','.operator.not','EMPTY_CONDITIONS','skipSchema','BEHAVIOR_SOURCE_MISSING_FILTER','code','5205555hAPXgZ','error','MISSING_BETWEEN_BOUNDS','9FRRgTi','INVALID_ARRAY_MATCHING','TEMPORAL_NEGATION_UNSUPPORTED','NESTED_CONDITION_GROUP','data','validationCode','Operator\x20\x27','.conditions[','MISSING_CONDITIONS','1344711xqYinV','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','TimeWithinPast','warning','MISSING_SEGMENT_REFERENCE','91235XWjYUk','rule','document','10LUUwHs','message','invalid_value','length','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','safeParse','.conditions','symbol','not','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','Composite','4fnLFWw'];a159_0x20b4=function(){return _0x3aa687;};return a159_0x20b4();}export function validateSegmentDef(_0x4a616d,_0x8f3d21={},_0x20ecf4={}){const _0x3d52ba=a159_0x1511;if(_0x20ecf4[_0x3d52ba(0x21c)])return runSemanticChecks(_0x4a616d,_0x8f3d21);const _0x2e3bac=SegmentDefSchema[_0x3d52ba(0x1e3)](_0x4a616d);if(_0x2e3bac[_0x3d52ba(0x210)])return runSemanticChecks(_0x2e3bac[_0x3d52ba(0x226)],_0x8f3d21);return zodErrorsToValidationResult(_0x2e3bac[_0x3d52ba(0x220)],_0x8f3d21);}export function validateRuleDef(_0x4431c9,_0x8e5dbc,_0xf5c73a){const _0x953589=a159_0x1511;if(!_0x4431c9)return[];const _0x38f9ee=RuleDefSchema['safeParse'](_0x4431c9);if(_0x38f9ee['success'])return checkRule(_0x38f9ee[_0x953589(0x226)],_0x8e5dbc,_0xf5c73a);const _0x115126=flattenZodIssues(_0x38f9ee[_0x953589(0x220)][_0x953589(0x1fd)]);return _0x115126[_0x953589(0x1fc)](_0x39c0f6=>{const _0x3cd0b5=_0x953589,_0x30a5d0=formatZodPath(_0x39c0f6[_0x3cd0b5(0x1f6)]),_0x88770e=_0x30a5d0?_0x8e5dbc+'.'+_0x30a5d0:_0x8e5dbc,_0x32d33e=mapZodIssueToCode(_0x39c0f6,_0x30a5d0),_0x5f516c=getLocationFromPath(_0xf5c73a[_0x3cd0b5(0x232)],_0xf5c73a[_0x3cd0b5(0x20b)],pathToArray(_0x88770e));return{'level':'error','path':_0x88770e,'code':_0x32d33e,'message':_0x39c0f6[_0x3cd0b5(0x234)],..._0x5f516c&&{'location':_0x5f516c}};});}function zodErrorsToValidationResult(_0x310b73,_0x4de2c3){const _0xc17b76=a159_0x1511,_0x538456=flattenZodIssues(_0x310b73[_0xc17b76(0x1fd)]),_0xf73e7c=_0x538456[_0xc17b76(0x1fc)](_0x5f2f51=>{const _0x28706c=_0xc17b76,_0x1e3a82=formatZodPath(_0x5f2f51['path']),_0x2b5266=mapZodIssueToCode(_0x5f2f51,_0x1e3a82),_0x25bcaa=getLocationFromPath(_0x4de2c3[_0x28706c(0x232)],_0x4de2c3[_0x28706c(0x20b)],_0x5f2f51[_0x28706c(0x1f6)][_0x28706c(0x1fc)](_0x2f47dc=>typeof _0x2f47dc===_0x28706c(0x1e5)?String(_0x2f47dc):_0x2f47dc));return{'level':_0x28706c(0x220),'path':_0x1e3a82,'code':_0x2b5266,'message':_0x5f2f51['message'],..._0x25bcaa&&{'location':_0x25bcaa}};});return{'valid':![],'errors':_0xf73e7c,'warnings':[]};}function mapZodIssueToCode(_0x4492cb,_0xd0b6a){const _0x2b669e=a159_0x1511,_0x2397ce=_0x4492cb[_0x2b669e(0x21e)]===_0x2b669e(0x1fa)?_0x4492cb[_0x2b669e(0x200)]:undefined;if(_0xd0b6a===_0x2b669e(0x1f9))return _0x2b669e(0x1f4);if(_0xd0b6a===_0x2b669e(0x203)||_0xd0b6a['endsWith']('.type')){if(_0x4492cb[_0x2b669e(0x21e)]===_0x2b669e(0x235)){if(_0xd0b6a==='rule.type'||_0xd0b6a[_0x2b669e(0x1fb)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0xd0b6a[_0x2b669e(0x1f8)](_0x2b669e(0x204)))return _0x2b669e(0x218);if(_0xd0b6a[_0x2b669e(0x1f8)](_0x2b669e(0x1ea)))return _0x2b669e(0x20a);if(_0x2397ce?.[_0x2b669e(0x227)]===_0x2b669e(0x221))return _0x2b669e(0x221);if(_0x2397ce?.[_0x2b669e(0x227)]==='MISSING_TIME_UNIT')return _0x2b669e(0x206);if(_0xd0b6a[_0x2b669e(0x1f8)](_0x2b669e(0x1e4))||_0xd0b6a===_0x2b669e(0x211))return _0x2b669e(0x22a);if(_0xd0b6a[_0x2b669e(0x20c)]('arrayMatching'))return _0x2b669e(0x223);if(_0xd0b6a[_0x2b669e(0x1f8)]('.segment'))return _0x2b669e(0x22f);return'SEGMENT_SCHEMA_ERROR';}function runSemanticChecks(_0x373bb0,_0x4b426e){const _0x398717=a159_0x1511,_0x1ea58d=[];_0x373bb0[_0x398717(0x231)]&&_0x1ea58d[_0x398717(0x20d)](...checkRule(_0x373bb0[_0x398717(0x231)],_0x398717(0x231),_0x4b426e));const _0x383357=_0x1ea58d['filter'](_0x27c2ef=>_0x27c2ef[_0x398717(0x1ff)]==='error'),_0x173261=_0x1ea58d[_0x398717(0x213)](_0x57e6de=>_0x57e6de[_0x398717(0x1ff)]===_0x398717(0x22e));return{'valid':_0x383357['length']===0x0,'errors':_0x383357,'warnings':_0x173261};}function a159_0x1511(_0x3e25d0,_0x1d51ab){_0x3e25d0=_0x3e25d0-0x1e2;const _0x20b44c=a159_0x20b4();let _0x1511c8=_0x20b44c[_0x3e25d0];return _0x1511c8;}function checkRule(_0x49d888,_0x54a124,_0x1865cd){const _0x1762bf=a159_0x1511,_0x3f5c1b=[];if(_0x49d888['conditions']['length']===0x0)return _0x3f5c1b['push']({'level':_0x1762bf(0x220),'path':_0x54a124+_0x1762bf(0x1e4),'code':_0x1762bf(0x21b),'message':_0x1762bf(0x207),'location':getLocationFromPath(_0x1865cd[_0x1762bf(0x232)],_0x1865cd['source'],pathToArray(_0x54a124+_0x1762bf(0x1e4)))}),_0x3f5c1b;return _0x3f5c1b[_0x1762bf(0x20d)](...checkConditions(_0x49d888[_0x1762bf(0x211)],_0x54a124,_0x1865cd)),_0x3f5c1b;}function checkConditions(_0x60743d,_0x599675,_0x5c69f2){const _0x1fe69=a159_0x1511,_0x1d434=[];for(let _0x21d322=0x0;_0x21d322<_0x60743d[_0x1fe69(0x236)];_0x21d322++){const _0x2b8b05=_0x60743d[_0x21d322],_0x42f5f7=_0x599675+_0x1fe69(0x229)+_0x21d322+']';_0x1d434[_0x1fe69(0x20d)](...checkCondition(_0x2b8b05,_0x42f5f7,_0x5c69f2));}return _0x1d434;}function checkCondition(_0x2b24a6,_0x56aeff,_0x30b243){const _0xfbc84=a159_0x1511,_0x4b3080=[];if(_0x2b24a6['type']==='And'||_0x2b24a6[_0xfbc84(0x1f5)]==='Or'||_0x2b24a6[_0xfbc84(0x1f5)]===_0xfbc84(0x1e8)){if(_0x2b24a6[_0xfbc84(0x211)][_0xfbc84(0x236)]===0x0)_0x4b3080[_0xfbc84(0x20d)]({'level':'error','path':_0x56aeff+_0xfbc84(0x1e4),'code':_0xfbc84(0x21b),'message':_0x2b24a6['type']+_0xfbc84(0x215),'location':getLocationFromPath(_0x30b243[_0xfbc84(0x232)],_0x30b243['source'],pathToArray(_0x56aeff+_0xfbc84(0x1e4)))});else{const _0x370b46=_0x2b24a6[_0xfbc84(0x1f7)]!==undefined,_0x6bc3b0=_0x2b24a6[_0xfbc84(0x1f5)]===_0xfbc84(0x1e8);!_0x370b46&&!_0x6bc3b0&&_0x4b3080['push']({'level':_0xfbc84(0x22e),'path':_0x56aeff,'code':_0xfbc84(0x225),'message':_0x2b24a6[_0xfbc84(0x1f5)]+'\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20'+_0xfbc84(0x1f0)+_0xfbc84(0x1e7),'location':getLocationFromPath(_0x30b243[_0xfbc84(0x232)],_0x30b243[_0xfbc84(0x20b)],pathToArray(_0x56aeff))}),_0x4b3080['push'](...checkConditions(_0x2b24a6[_0xfbc84(0x211)],_0x56aeff,_0x30b243));}return _0x4b3080;}if(_0x2b24a6[_0xfbc84(0x1f5)]===_0xfbc84(0x205)||_0x2b24a6[_0xfbc84(0x1f5)]===_0xfbc84(0x1ec)){const _0x5221a5=_0x2b24a6,_0x247ac1=_0x5221a5['source'],_0x2a3d06=_0x5221a5[_0xfbc84(0x209)],_0x1057a4=_0x247ac1||_0x2a3d06,_0x5a7ef3=_0x5221a5[_0xfbc84(0x219)]?.[_0xfbc84(0x1f5)];if((_0x5a7ef3===_0xfbc84(0x22d)||_0x5a7ef3===_0xfbc84(0x1f1))&&_0x5221a5[_0xfbc84(0x219)]?.[_0xfbc84(0x1e6)]!==undefined){const _0x4f643a=_0x5221a5['operator'][_0xfbc84(0x1e6)]===!![];_0x4b3080[_0xfbc84(0x20d)]({'level':_0x4f643a?'error':_0xfbc84(0x22e),'path':_0x56aeff+_0xfbc84(0x21a),'code':_0xfbc84(0x224),'message':_0x4f643a?_0xfbc84(0x228)+_0x5a7ef3+'\x27\x20with\x20\x27not:\x20true\x27\x20is\x20not\x20supported\x20by\x20the\x20Console\x20segment\x20editor.\x20'+'The\x20editor\x20will\x20silently\x20drop\x20the\x20negation\x20and\x20corrupt\x20the\x20segment\x20on\x20re-save.\x20'+_0xfbc84(0x216):_0xfbc84(0x228)+_0x5a7ef3+'\x27\x20does\x20not\x20support\x20the\x20\x27not\x27\x20field.\x20'+_0xfbc84(0x20e),'location':getLocationFromPath(_0x30b243['document'],_0x30b243[_0xfbc84(0x20b)],pathToArray(_0x56aeff+_0xfbc84(0x21a)))});}(!_0x5221a5[_0xfbc84(0x1ed)]||_0x5221a5[_0xfbc84(0x1ed)]==='')&&(!_0x1057a4&&_0x4b3080[_0xfbc84(0x20d)]({'level':_0xfbc84(0x220),'path':_0x56aeff+_0xfbc84(0x212),'code':'EMPTY_ATTRIBUTE','message':_0xfbc84(0x1f2),'location':getLocationFromPath(_0x30b243['document'],_0x30b243['source'],pathToArray(_0x56aeff+_0xfbc84(0x212)))}));_0x5221a5['filter']&&_0x4b3080['push'](...checkRule(_0x5221a5[_0xfbc84(0x213)],_0x56aeff+_0xfbc84(0x208),_0x30b243));if(_0x5221a5[_0xfbc84(0x20b)]){const _0x27dc33=_0x5221a5[_0xfbc84(0x1ed)]&&_0x5221a5['attribute']!=='';_0x27dc33&&!_0x5221a5[_0xfbc84(0x213)]&&_0x4b3080[_0xfbc84(0x20d)]({'level':_0xfbc84(0x220),'path':_0x56aeff+'.source','code':_0xfbc84(0x21d),'message':_0xfbc84(0x202)+_0x5221a5[_0xfbc84(0x20b)]+_0xfbc84(0x214)+_0x5221a5[_0xfbc84(0x1ed)]+'\x27\x20'+_0xfbc84(0x1f3)+_0xfbc84(0x1e2)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x30b243['document'],_0x30b243[_0xfbc84(0x20b)],pathToArray(_0x56aeff+'.source'))}),_0x27dc33&&_0x5221a5['filter']&&_0x4b3080['push']({'level':_0xfbc84(0x22e),'path':_0x56aeff+_0xfbc84(0x212),'code':_0xfbc84(0x22c),'message':_0xfbc84(0x201)+_0x5221a5[_0xfbc84(0x1ed)]+'\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'+'For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','location':getLocationFromPath(_0x30b243['document'],_0x30b243[_0xfbc84(0x20b)],pathToArray(_0x56aeff+'.attribute'))});}}return _0x4b3080;}
1
+ (function(_0xb30290,_0x19cfe8){const _0x5bf392=a159_0x4336,_0x33cf4f=_0xb30290();while(!![]){try{const _0x59c9b5=-parseInt(_0x5bf392(0xbb))/0x1+parseInt(_0x5bf392(0x9a))/0x2+-parseInt(_0x5bf392(0x7f))/0x3*(-parseInt(_0x5bf392(0xa0))/0x4)+-parseInt(_0x5bf392(0xbe))/0x5*(-parseInt(_0x5bf392(0xaa))/0x6)+parseInt(_0x5bf392(0xb6))/0x7*(-parseInt(_0x5bf392(0xbd))/0x8)+parseInt(_0x5bf392(0xa2))/0x9*(parseInt(_0x5bf392(0x70))/0xa)+-parseInt(_0x5bf392(0x82))/0xb;if(_0x59c9b5===_0x19cfe8)break;else _0x33cf4f['push'](_0x33cf4f['shift']());}catch(_0x4e1179){_0x33cf4f['push'](_0x33cf4f['shift']());}}}(a159_0x180a,0x82470));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';function a159_0x4336(_0xf27a0c,_0x2fabaf){_0xf27a0c=_0xf27a0c-0x67;const _0x180ac5=a159_0x180a();let _0x43363c=_0x180ac5[_0xf27a0c];return _0x43363c;}import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x5e82bf,_0x15a5e7={},_0x415c41={}){const _0xca0156=a159_0x4336;if(_0x415c41[_0xca0156(0x8e)])return runSemanticChecks(_0x5e82bf,_0x15a5e7);const _0x421a72=SegmentDefSchema['safeParse'](_0x5e82bf);if(_0x421a72[_0xca0156(0x8c)])return runSemanticChecks(_0x421a72[_0xca0156(0x79)],_0x15a5e7);return zodErrorsToValidationResult(_0x421a72[_0xca0156(0x75)],_0x15a5e7);}export function validateRuleDef(_0x405b19,_0x5980af,_0x1f3f4c){const _0x1ffd75=a159_0x4336;if(!_0x405b19)return[];const _0x1883a5=RuleDefSchema['safeParse'](_0x405b19);if(_0x1883a5[_0x1ffd75(0x8c)])return checkRule(_0x1883a5[_0x1ffd75(0x79)],_0x5980af,_0x1f3f4c);const _0x4c6843=flattenZodIssues(_0x1883a5['error'][_0x1ffd75(0x74)]);return _0x4c6843[_0x1ffd75(0x78)](_0x5cf955=>{const _0x7a30a1=_0x1ffd75,_0x3b0a95=formatZodPath(_0x5cf955[_0x7a30a1(0x72)]),_0x2b5d9c=_0x3b0a95?_0x5980af+'.'+_0x3b0a95:_0x5980af,_0x1c0462=mapZodIssueToCode(_0x5cf955,_0x3b0a95),_0x75e320=getLocationFromPath(_0x1f3f4c[_0x7a30a1(0xad)],_0x1f3f4c[_0x7a30a1(0x7b)],pathToArray(_0x2b5d9c));return{'level':_0x7a30a1(0x75),'path':_0x2b5d9c,'code':_0x1c0462,'message':_0x5cf955[_0x7a30a1(0x68)],..._0x75e320&&{'location':_0x75e320}};});}function zodErrorsToValidationResult(_0x587440,_0x174007){const _0x398e62=a159_0x4336,_0x1baa98=flattenZodIssues(_0x587440[_0x398e62(0x74)]),_0x1cde19=_0x1baa98[_0x398e62(0x78)](_0x1dcd16=>{const _0xbce8b=_0x398e62,_0x54039c=formatZodPath(_0x1dcd16[_0xbce8b(0x72)]),_0x32dbaf=mapZodIssueToCode(_0x1dcd16,_0x54039c),_0x36ef72=getLocationFromPath(_0x174007[_0xbce8b(0xad)],_0x174007[_0xbce8b(0x7b)],_0x1dcd16[_0xbce8b(0x72)][_0xbce8b(0x78)](_0x4ee7e9=>typeof _0x4ee7e9===_0xbce8b(0xa4)?String(_0x4ee7e9):_0x4ee7e9));return{'level':_0xbce8b(0x75),'path':_0x54039c,'code':_0x32dbaf,'message':_0x1dcd16[_0xbce8b(0x68)],..._0x36ef72&&{'location':_0x36ef72}};});return{'valid':![],'errors':_0x1cde19,'warnings':[]};}function mapZodIssueToCode(_0x17789a,_0x35002b){const _0x50579d=a159_0x4336,_0x5e38a7=_0x17789a[_0x50579d(0x91)]===_0x50579d(0x95)?_0x17789a['params']:undefined;if(_0x35002b==='name')return _0x50579d(0xb2);if(_0x35002b===_0x50579d(0x8f)||_0x35002b[_0x50579d(0x69)]('.type')){if(_0x17789a[_0x50579d(0x91)]===_0x50579d(0x6c)){if(_0x35002b===_0x50579d(0x8f)||_0x35002b[_0x50579d(0xa6)](/\.conditions\[\d+\]\.type$/))return _0x50579d(0xb5);}}if(_0x35002b[_0x50579d(0x69)](_0x50579d(0xa3)))return _0x50579d(0xa9);if(_0x35002b[_0x50579d(0x69)](_0x50579d(0xb0)))return _0x50579d(0x83);if(_0x5e38a7?.[_0x50579d(0xbc)]===_0x50579d(0x6e))return _0x50579d(0x6e);if(_0x5e38a7?.[_0x50579d(0xbc)]===_0x50579d(0x85))return _0x50579d(0x85);if(_0x35002b[_0x50579d(0x69)](_0x50579d(0xb9))||_0x35002b===_0x50579d(0x89))return _0x50579d(0x81);if(_0x35002b[_0x50579d(0x6b)](_0x50579d(0x9c)))return _0x50579d(0xa8);if(_0x35002b[_0x50579d(0x69)]('.segment'))return _0x50579d(0x98);return _0x50579d(0x7a);}function runSemanticChecks(_0x59da1d,_0x1b1ebd){const _0x2a6ef5=a159_0x4336,_0x4faf24=[];_0x59da1d[_0x2a6ef5(0x7e)]&&_0x4faf24[_0x2a6ef5(0x7d)](...checkRule(_0x59da1d['rule'],_0x2a6ef5(0x7e),_0x1b1ebd));const _0x4a6515=_0x4faf24[_0x2a6ef5(0x6d)](_0x5e5e8b=>_0x5e5e8b[_0x2a6ef5(0xa1)]===_0x2a6ef5(0x75)),_0x9d1ed9=_0x4faf24[_0x2a6ef5(0x6d)](_0x405f3f=>_0x405f3f['level']===_0x2a6ef5(0xb7));return{'valid':_0x4a6515[_0x2a6ef5(0x8b)]===0x0,'errors':_0x4a6515,'warnings':_0x9d1ed9};}function checkRule(_0x5233e3,_0x3e79b7,_0x25b6e8){const _0x120f3c=a159_0x4336,_0xb1dea7=[];if(_0x5233e3[_0x120f3c(0x89)][_0x120f3c(0x8b)]===0x0)return _0xb1dea7['push']({'level':_0x120f3c(0x75),'path':_0x3e79b7+_0x120f3c(0xb9),'code':'EMPTY_CONDITIONS','message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x25b6e8[_0x120f3c(0xad)],_0x25b6e8[_0x120f3c(0x7b)],pathToArray(_0x3e79b7+_0x120f3c(0xb9)))}),_0xb1dea7;return _0xb1dea7[_0x120f3c(0x7d)](...checkConditions(_0x5233e3[_0x120f3c(0x89)],_0x3e79b7,_0x25b6e8)),_0xb1dea7;}function checkConditions(_0x126fe7,_0x47b25e,_0x46f27f){const _0x1db6aa=a159_0x4336,_0x1ad1dd=[];for(let _0x2341f0=0x0;_0x2341f0<_0x126fe7[_0x1db6aa(0x8b)];_0x2341f0++){const _0x1e6fbc=_0x126fe7[_0x2341f0],_0x182944=_0x47b25e+_0x1db6aa(0x80)+_0x2341f0+']';_0x1ad1dd[_0x1db6aa(0x7d)](...checkCondition(_0x1e6fbc,_0x182944,_0x46f27f));}return _0x1ad1dd;}function a159_0x180a(){const _0x2c13c9=['match','operator','INVALID_ARRAY_MATCHING','INVALID_OPERATOR_TYPE','17310crbbBC','NESTED_CONDITION_GROUP','Operator\x20\x27','document','Remove\x20\x27not\x27\x20—\x20temporal\x20operators\x20do\x20not\x20support\x20negation.','EMPTY_ATTRIBUTE','.operator.value','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','MISSING_NAME','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','Behavior\x20source\x20\x27','INVALID_RULE_TYPE','19579oQdriP','warning','attribute','.conditions','not','1058913cRmcHM','validationCode','312UolYMk','1735sKiATL','TEMPORAL_NEGATION_UNSUPPORTED','message','endsWith','TimeWithinPast','includes','invalid_value','filter','MISSING_BETWEEN_BOUNDS','TimeWithinNext','10pjpcqj','\x27\x20with\x20attribute\x20\x27','path','\x27\x20with\x20\x27not:\x20true\x27\x20is\x20not\x20supported\x20by\x20the\x20Console\x20segment\x20editor.\x20','issues','error','.source','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','map','data','SEGMENT_SCHEMA_ERROR','source','Value','push','rule','6TiWtQS','.conditions[','MISSING_CONDITIONS','14982715qWGWMt','MISSING_OPERATOR_VALUE','Remove\x20\x27not:\x20false\x27\x20—\x20temporal\x20operators\x20do\x20not\x20support\x20negation.','MISSING_TIME_UNIT','type','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','.attribute','conditions','Attribute\x20name\x20cannot\x20be\x20empty','length','success','.filter','skipSchema','rule.type','The\x20editor\x20will\x20silently\x20drop\x20the\x20negation\x20and\x20corrupt\x20the\x20segment\x20on\x20re-save.\x20','code','BEHAVIOR_SOURCE_MISSING_FILTER','Composite','Behavior','custom','EMPTY_CONDITIONS','.operator.not','MISSING_SEGMENT_REFERENCE','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','843076KKfTeF','description','arrayMatching','aggregation','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','\x27\x20does\x20not\x20support\x20the\x20\x27not\x27\x20field.\x20','1199096bRrVdO','level','9373464TLrbyI','.operator.type','symbol','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'];a159_0x180a=function(){return _0x2c13c9;};return a159_0x180a();}function checkCondition(_0x401584,_0x4acb88,_0x3dae44){const _0x5968dc=a159_0x4336,_0x38e0ee=[];if(_0x401584[_0x5968dc(0x86)]==='And'||_0x401584[_0x5968dc(0x86)]==='Or'||_0x401584[_0x5968dc(0x86)]===_0x5968dc(0x93)){if(_0x401584[_0x5968dc(0x89)][_0x5968dc(0x8b)]===0x0)_0x38e0ee['push']({'level':_0x5968dc(0x75),'path':_0x4acb88+_0x5968dc(0xb9),'code':_0x5968dc(0x96),'message':_0x401584[_0x5968dc(0x86)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x3dae44[_0x5968dc(0xad)],_0x3dae44[_0x5968dc(0x7b)],pathToArray(_0x4acb88+_0x5968dc(0xb9)))});else{const _0x396708=_0x401584[_0x5968dc(0x9b)]!==undefined,_0x443aa7=_0x401584[_0x5968dc(0x86)]===_0x5968dc(0x93);!_0x396708&&!_0x443aa7&&_0x38e0ee[_0x5968dc(0x7d)]({'level':'warning','path':_0x4acb88,'code':_0x5968dc(0xab),'message':_0x401584['type']+_0x5968dc(0x87)+_0x5968dc(0xb3)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x3dae44[_0x5968dc(0xad)],_0x3dae44[_0x5968dc(0x7b)],pathToArray(_0x4acb88))}),_0x38e0ee['push'](...checkConditions(_0x401584[_0x5968dc(0x89)],_0x4acb88,_0x3dae44));}return _0x38e0ee;}if(_0x401584['type']===_0x5968dc(0x7c)||_0x401584[_0x5968dc(0x86)]===_0x5968dc(0x94)){const _0x291d26=_0x401584,_0x55abd3=_0x291d26[_0x5968dc(0x7b)],_0x54edcb=_0x291d26[_0x5968dc(0x9d)],_0x51d528=_0x55abd3||_0x54edcb,_0x1bf5f2=_0x291d26[_0x5968dc(0xa7)]?.['type'];if((_0x1bf5f2===_0x5968dc(0x6a)||_0x1bf5f2===_0x5968dc(0x6f))&&_0x291d26[_0x5968dc(0xa7)]?.['not']!==undefined){const _0x1ceea6=_0x291d26[_0x5968dc(0xa7)][_0x5968dc(0xba)]===!![];_0x38e0ee[_0x5968dc(0x7d)]({'level':_0x1ceea6?_0x5968dc(0x75):_0x5968dc(0xb7),'path':_0x4acb88+_0x5968dc(0x97),'code':_0x5968dc(0x67),'message':_0x1ceea6?'Operator\x20\x27'+_0x1bf5f2+_0x5968dc(0x73)+_0x5968dc(0x90)+_0x5968dc(0xae):_0x5968dc(0xac)+_0x1bf5f2+_0x5968dc(0x9f)+_0x5968dc(0x84),'location':getLocationFromPath(_0x3dae44[_0x5968dc(0xad)],_0x3dae44['source'],pathToArray(_0x4acb88+'.operator.not'))});}(!_0x291d26[_0x5968dc(0xb8)]||_0x291d26[_0x5968dc(0xb8)]==='')&&(!_0x51d528&&_0x38e0ee[_0x5968dc(0x7d)]({'level':_0x5968dc(0x75),'path':_0x4acb88+_0x5968dc(0x88),'code':_0x5968dc(0xaf),'message':_0x5968dc(0x8a),'location':getLocationFromPath(_0x3dae44[_0x5968dc(0xad)],_0x3dae44[_0x5968dc(0x7b)],pathToArray(_0x4acb88+_0x5968dc(0x88)))}));_0x291d26['filter']&&_0x38e0ee[_0x5968dc(0x7d)](...checkRule(_0x291d26['filter'],_0x4acb88+_0x5968dc(0x8d),_0x3dae44));if(_0x291d26[_0x5968dc(0x7b)]){const _0x35b175=_0x291d26[_0x5968dc(0xb8)]&&_0x291d26[_0x5968dc(0xb8)]!=='';_0x35b175&&!_0x291d26[_0x5968dc(0x6d)]&&_0x38e0ee['push']({'level':_0x5968dc(0x75),'path':_0x4acb88+_0x5968dc(0x76),'code':_0x5968dc(0x92),'message':_0x5968dc(0xb4)+_0x291d26[_0x5968dc(0x7b)]+_0x5968dc(0x71)+_0x291d26['attribute']+'\x27\x20'+_0x5968dc(0xa5)+_0x5968dc(0x99)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x3dae44[_0x5968dc(0xad)],_0x3dae44[_0x5968dc(0x7b)],pathToArray(_0x4acb88+_0x5968dc(0x76)))}),_0x35b175&&_0x291d26[_0x5968dc(0x6d)]&&_0x38e0ee['push']({'level':_0x5968dc(0xb7),'path':_0x4acb88+_0x5968dc(0x88),'code':_0x5968dc(0xb1),'message':'Attribute\x20\x27'+_0x291d26[_0x5968dc(0xb8)]+_0x5968dc(0x77)+_0x5968dc(0x9e),'location':getLocationFromPath(_0x3dae44[_0x5968dc(0xad)],_0x3dae44[_0x5968dc(0x7b)],pathToArray(_0x4acb88+'.attribute'))});}}return _0x38e0ee;}
@@ -1 +1 @@
1
- function a160_0x51c3(){const _0x16cb4d=['stat','No\x20tdx.json\x20found','1836TrgdeI','directory','exists','parse','File\x20not\x20found:\x20','no_config','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','message','72GupMRq','resolve','type','parent_name','invalid_yaml','tdx.json','3274124oFBxlD','Parent\x20segment\x20not\x20specified','899248oKBhJC','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','2034EvYMzR','resourceType','segmentName','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','replace','startsWith','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','Not\x20a\x20YAML\x20file:\x20','segment','1049625kfzTdn','3131838yqnQFb','isDirectory','journey','trim','includes','116630RagZPh','96378lEHnDa','no_parent','No\x20tdx.json\x20found\x20for\x20file:\x20','configDir','error','file_not_found','match','basename','file','parent_segment','scopedFolderPath','readFile','isScoped','parentSegment','5TGSBXb','cwd','root','relative','File\x20not\x20found','context','dirname'];a160_0x51c3=function(){return _0x16cb4d;};return a160_0x51c3();}(function(_0x32e5ff,_0x5ef078){const _0x5cd0d5=a160_0xd3c7,_0x49cb6b=_0x32e5ff();while(!![]){try{const _0x216c6f=-parseInt(_0x5cd0d5(0x123))/0x1*(parseInt(_0x5cd0d5(0x115))/0x2)+-parseInt(_0x5cd0d5(0x105))/0x3*(-parseInt(_0x5cd0d5(0xf3))/0x4)+parseInt(_0x5cd0d5(0x10e))/0x5+parseInt(_0x5cd0d5(0x10f))/0x6+-parseInt(_0x5cd0d5(0x101))/0x7+-parseInt(_0x5cd0d5(0x103))/0x8+parseInt(_0x5cd0d5(0xfb))/0x9*(parseInt(_0x5cd0d5(0x114))/0xa);if(_0x216c6f===_0x5ef078)break;else _0x49cb6b['push'](_0x49cb6b['shift']());}catch(_0x468632){_0x49cb6b['push'](_0x49cb6b['shift']());}}}(a160_0x51c3,0x4cfb9));import a160_0x5c7016 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(_0xa3cec6){const _0x5200f7=a160_0xd3c7;return _0xa3cec6[_0x5200f7(0xfd)]!=='error';}export function isScopedResolution(_0x826997){const _0xc3548f=a160_0xd3c7;return _0x826997[_0xc3548f(0xfd)]==='directory'||_0x826997[_0xc3548f(0xfd)]===_0xc3548f(0x11d)||_0x826997[_0xc3548f(0xfd)]===_0xc3548f(0x128);}export function getScopedDetails(_0x3414d4){const _0x59f280=a160_0xd3c7;if(isScopedResolution(_0x3414d4))return{'isScoped':_0x3414d4[_0x59f280(0x121)],'scopedFolderPath':_0x3414d4[_0x59f280(0x11f)]};return undefined;}async function findTdxConfigAsync(_0xf425d3,_0x199064){const _0x2efa18=a160_0xd3c7;let _0x4af820=a160_0x5c7016[_0x2efa18(0xfc)](_0xf425d3);const _0x592846=a160_0x5c7016[_0x2efa18(0xf6)](_0x4af820)[_0x2efa18(0x125)];while(_0x4af820!==_0x592846){const _0x520491=a160_0x5c7016['join'](_0x4af820,_0x2efa18(0x100));if(await _0x199064['exists'](_0x520491))try{const _0x700882=await _0x199064[_0x2efa18(0x120)](_0x520491),_0x5dbfcf=JSON[_0x2efa18(0xf6)](_0x700882);if(_0x5dbfcf[_0x2efa18(0x11e)]&&typeof _0x5dbfcf[_0x2efa18(0x11e)]==='string')return{'configPath':_0x520491,'configDir':_0x4af820,'parentSegment':_0x5dbfcf[_0x2efa18(0x11e)]};}catch{}_0x4af820=a160_0x5c7016[_0x2efa18(0x129)](_0x4af820);}return null;}function a160_0xd3c7(_0x12b855,_0xc98357){_0x12b855=_0x12b855-0xf1;const _0x51c3ac=a160_0x51c3();let _0xd3c7b6=_0x51c3ac[_0x12b855];return _0xd3c7b6;}function calculateScopedPath(_0x154ce2,_0x27530c){const _0x45722b=a160_0xd3c7,_0x21fa90=a160_0x5c7016[_0x45722b(0x126)](_0x27530c,_0x154ce2),_0x12cc3b=_0x21fa90!==''&&_0x21fa90!=='.'&&!_0x21fa90[_0x45722b(0x10a)]('..');return{'isScoped':_0x12cc3b,'scopedFolderPath':_0x12cc3b?_0x21fa90[_0x45722b(0x109)](/\\/g,'/'):''};}export async function resolveTarget(_0x338839){const _0x9fb4c6=a160_0xd3c7,{arg:_0x539650,contextParent:_0x32565b,cwd:cwd=process[_0x9fb4c6(0x124)](),fs:fs=nodeFileSystem}=_0x338839;if(_0x539650&&isYamlFilePath(_0x539650))try{const _0x4dd5fc=await resolveYamlFilePath(_0x539650,fs),_0x15a4fc=a160_0x5c7016['resolve'](_0x539650),_0x21bf1b=a160_0x5c7016['dirname'](_0x15a4fc),_0x5e5468=await findTdxConfigAsync(_0x21bf1b,fs);if(!_0x5e5468){if(_0x32565b){const _0x5a86ab=a160_0x5c7016[_0x9fb4c6(0x129)](_0x15a4fc);return{'type':_0x9fb4c6(0x11d),'parentName':_0x32565b,'targetDir':_0x5a86ab,'configRoot':_0x5a86ab,'filePath':_0x15a4fc,'resourceName':_0x4dd5fc[_0x9fb4c6(0x107)],'folderPath':_0x4dd5fc['folderPath'],'resourceType':_0x4dd5fc[_0x9fb4c6(0x106)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xf8),'message':_0x9fb4c6(0x117)+_0x539650,'arg':_0x539650,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x1da87d=calculateScopedPath(_0x21bf1b,_0x5e5468['configDir']);return{'type':_0x9fb4c6(0x11d),'parentName':_0x5e5468[_0x9fb4c6(0x122)],'targetDir':_0x5e5468[_0x9fb4c6(0x118)],'configRoot':_0x5e5468[_0x9fb4c6(0x118)],'filePath':_0x15a4fc,'resourceName':_0x4dd5fc[_0x9fb4c6(0x107)],'folderPath':_0x4dd5fc['folderPath'],'resourceType':_0x4dd5fc[_0x9fb4c6(0x106)],'isScoped':_0x1da87d[_0x9fb4c6(0x121)],'scopedFolderPath':_0x1da87d[_0x9fb4c6(0x11f)]};}catch(_0x2a8e5a){const _0x1fba2d=_0x2a8e5a instanceof Error?_0x2a8e5a[_0x9fb4c6(0xfa)]:String(_0x2a8e5a);if(_0x1fba2d[_0x9fb4c6(0x113)](_0x9fb4c6(0x127)))return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0x11a),'message':_0x9fb4c6(0xf7)+_0x539650,'arg':_0x539650};if(_0x1fba2d[_0x9fb4c6(0x113)](_0x9fb4c6(0xf2))){if(_0x32565b){const _0x2a8748=a160_0x5c7016['resolve'](_0x539650);if(await fs[_0x9fb4c6(0xf5)](_0x2a8748)){const _0x1d0b8d=a160_0x5c7016['dirname'](_0x2a8748),_0x5c8f22=await fs['readFile'](_0x2a8748),_0x65ea79=_0x5c8f22[_0x9fb4c6(0x11b)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x3dd13d=_0x5c8f22[_0x9fb4c6(0x11b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x539266=_0x65ea79?_0x65ea79[0x1][_0x9fb4c6(0x112)]():a160_0x5c7016[_0x9fb4c6(0x11c)](_0x539650,a160_0x5c7016['extname'](_0x539650)),_0xa3ce74=_0x3dd13d&&_0x3dd13d[0x1][_0x9fb4c6(0x112)]()===_0x9fb4c6(0x111)?_0x9fb4c6(0x111):_0x9fb4c6(0x10d);return{'type':_0x9fb4c6(0x11d),'parentName':_0x32565b,'targetDir':_0x1d0b8d,'configRoot':_0x1d0b8d,'filePath':_0x2a8748,'resourceName':_0x539266,'folderPath':'','resourceType':_0xa3ce74,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xf8),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x539650,'arg':_0x539650,'helpText':_0x9fb4c6(0x104)};}return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xff),'message':_0x1fba2d,'arg':_0x539650};}if(_0x539650){const _0xe601c9=a160_0x5c7016[_0x9fb4c6(0xfc)](cwd,_0x539650);let _0x7730e4=null;try{_0x7730e4=await fs[_0x9fb4c6(0xf1)](_0xe601c9);}catch{}if(_0x7730e4?.[_0x9fb4c6(0x110)]()){const _0x259538=await findTdxConfigAsync(_0xe601c9,fs);if(_0x259538){const _0x55c621=calculateScopedPath(_0xe601c9,_0x259538[_0x9fb4c6(0x118)]);return{'type':_0x9fb4c6(0xf4),'parentName':_0x259538['parentSegment'],'targetDir':_0xe601c9,'configRoot':_0x259538['configDir'],'isScoped':_0x55c621[_0x9fb4c6(0x121)],'scopedFolderPath':_0x55c621[_0x9fb4c6(0x11f)]};}if(_0x32565b)return{'type':_0x9fb4c6(0xf4),'parentName':_0x32565b,'targetDir':_0xe601c9,'configRoot':_0xe601c9,'isScoped':![],'scopedFolderPath':''};return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xf8),'message':_0x9fb4c6(0x108)+_0x539650,'arg':_0x539650,'helpText':_0x9fb4c6(0x104)};}if(_0x7730e4?.['isFile']())return{'type':_0x9fb4c6(0x119),'errorCode':_0x9fb4c6(0xff),'message':_0x9fb4c6(0x10c)+_0x539650,'arg':_0x539650,'helpText':_0x9fb4c6(0x10b)};const _0x506146=sanitizeFileName(_0x539650),_0xeed5e3=getSegmentRootDir(_0x506146,cwd);return{'type':_0x9fb4c6(0xfe),'parentName':_0x539650,'targetDir':_0xeed5e3,'configRoot':_0xeed5e3};}const _0x1d9728=await findTdxConfigAsync(cwd,fs);if(_0x1d9728){const _0x486146=calculateScopedPath(cwd,_0x1d9728[_0x9fb4c6(0x118)]);return{'type':_0x9fb4c6(0x128),'parentName':_0x1d9728[_0x9fb4c6(0x122)],'targetDir':cwd,'configRoot':_0x1d9728[_0x9fb4c6(0x118)],'isScoped':_0x486146[_0x9fb4c6(0x121)],'scopedFolderPath':_0x486146[_0x9fb4c6(0x11f)]};}if(_0x32565b){const _0x4a089f=sanitizeFileName(_0x32565b),_0x4e96d1=getSegmentRootDir(_0x4a089f,cwd);return{'type':_0x9fb4c6(0x128),'parentName':_0x32565b,'targetDir':_0x4e96d1,'configRoot':_0x4e96d1,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x9fb4c6(0x116),'message':_0x9fb4c6(0x102),'helpText':_0x9fb4c6(0xf9)};}
1
+ (function(_0x1ceb02,_0x10c9aa){const _0x3bae1d=a160_0x481b,_0x3aa9f6=_0x1ceb02();while(!![]){try{const _0x166bb8=parseInt(_0x3bae1d(0x1ac))/0x1+-parseInt(_0x3bae1d(0x19c))/0x2+parseInt(_0x3bae1d(0x1b0))/0x3+parseInt(_0x3bae1d(0x1cc))/0x4*(parseInt(_0x3bae1d(0x19f))/0x5)+-parseInt(_0x3bae1d(0x199))/0x6+parseInt(_0x3bae1d(0x1c5))/0x7+-parseInt(_0x3bae1d(0x1a9))/0x8*(parseInt(_0x3bae1d(0x1bc))/0x9);if(_0x166bb8===_0x10c9aa)break;else _0x3aa9f6['push'](_0x3aa9f6['shift']());}catch(_0x421d6c){_0x3aa9f6['push'](_0x3aa9f6['shift']());}}}(a160_0x436a,0x7dfdb));import a160_0x285ebb from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a160_0x436a(){const _0x349ed9=['configDir','no_config','string','readFile','No\x20tdx.json\x20found','38424JSDpZB','parent_segment','relative','27535VWlyxG','cwd','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','parse','1121052upniEJ','isScoped','context','replace','parent_name','folderPath','includes','No\x20tdx.json\x20found\x20for\x20file:\x20','no_parent','tdx.json','scopedFolderPath','trim','1683iHgOFp','error','match','exists','isDirectory','parentSegment','journey','dirname','directory','7119735GojXRD','file','File\x20not\x20found','root','segmentName','resolve','extname','13824pVYUNs','1257864tDwaRx','message','segment','867640LKXQAd','invalid_yaml','basename','925JNAObo','join','resourceType','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','type'];a160_0x436a=function(){return _0x349ed9;};return a160_0x436a();}export function isSuccessfulResolution(_0x2c3068){const _0x3ffe26=a160_0x481b;return _0x2c3068[_0x3ffe26(0x1a3)]!==_0x3ffe26(0x1bd);}export function isScopedResolution(_0x42ec7d){const _0xe0c1de=a160_0x481b;return _0x42ec7d[_0xe0c1de(0x1a3)]===_0xe0c1de(0x1c4)||_0x42ec7d['type']===_0xe0c1de(0x1c6)||_0x42ec7d[_0xe0c1de(0x1a3)]===_0xe0c1de(0x1b2);}function a160_0x481b(_0x33e04b,_0x4f2152){_0x33e04b=_0x33e04b-0x199;const _0x436a12=a160_0x436a();let _0x481bce=_0x436a12[_0x33e04b];return _0x481bce;}export function getScopedDetails(_0x3ff98f){const _0x365118=a160_0x481b;if(isScopedResolution(_0x3ff98f))return{'isScoped':_0x3ff98f[_0x365118(0x1b1)],'scopedFolderPath':_0x3ff98f[_0x365118(0x1ba)]};return undefined;}async function findTdxConfigAsync(_0xa2a83e,_0xe5e989){const _0x4174e2=a160_0x481b;let _0x5d8831=a160_0x285ebb[_0x4174e2(0x1ca)](_0xa2a83e);const _0x12904e=a160_0x285ebb[_0x4174e2(0x1af)](_0x5d8831)[_0x4174e2(0x1c8)];while(_0x5d8831!==_0x12904e){const _0x3b6664=a160_0x285ebb[_0x4174e2(0x1a0)](_0x5d8831,_0x4174e2(0x1b9));if(await _0xe5e989[_0x4174e2(0x1bf)](_0x3b6664))try{const _0x228847=await _0xe5e989[_0x4174e2(0x1a7)](_0x3b6664),_0x3454be=JSON[_0x4174e2(0x1af)](_0x228847);if(_0x3454be[_0x4174e2(0x1aa)]&&typeof _0x3454be[_0x4174e2(0x1aa)]===_0x4174e2(0x1a6))return{'configPath':_0x3b6664,'configDir':_0x5d8831,'parentSegment':_0x3454be[_0x4174e2(0x1aa)]};}catch{}_0x5d8831=a160_0x285ebb[_0x4174e2(0x1c3)](_0x5d8831);}return null;}function calculateScopedPath(_0x4c87fc,_0x2691eb){const _0x4543de=a160_0x481b,_0x3c76ce=a160_0x285ebb[_0x4543de(0x1ab)](_0x2691eb,_0x4c87fc),_0x13834d=_0x3c76ce!==''&&_0x3c76ce!=='.'&&!_0x3c76ce['startsWith']('..');return{'isScoped':_0x13834d,'scopedFolderPath':_0x13834d?_0x3c76ce[_0x4543de(0x1b3)](/\\/g,'/'):''};}export async function resolveTarget(_0x5e39fe){const _0x502e4e=a160_0x481b,{arg:_0x133116,contextParent:_0x4eb914,cwd:cwd=process[_0x502e4e(0x1ad)](),fs:fs=nodeFileSystem}=_0x5e39fe;if(_0x133116&&isYamlFilePath(_0x133116))try{const _0x1643b6=await resolveYamlFilePath(_0x133116,fs),_0x16344d=a160_0x285ebb[_0x502e4e(0x1ca)](_0x133116),_0x87cf0b=a160_0x285ebb[_0x502e4e(0x1c3)](_0x16344d),_0x5f2d98=await findTdxConfigAsync(_0x87cf0b,fs);if(!_0x5f2d98){if(_0x4eb914){const _0x5ecde4=a160_0x285ebb[_0x502e4e(0x1c3)](_0x16344d);return{'type':_0x502e4e(0x1c6),'parentName':_0x4eb914,'targetDir':_0x5ecde4,'configRoot':_0x5ecde4,'filePath':_0x16344d,'resourceName':_0x1643b6[_0x502e4e(0x1c9)],'folderPath':_0x1643b6[_0x502e4e(0x1b5)],'resourceType':_0x1643b6['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x502e4e(0x1a5),'message':_0x502e4e(0x1b7)+_0x133116,'arg':_0x133116,'helpText':_0x502e4e(0x1ae)};}const _0x346219=calculateScopedPath(_0x87cf0b,_0x5f2d98[_0x502e4e(0x1a4)]);return{'type':_0x502e4e(0x1c6),'parentName':_0x5f2d98[_0x502e4e(0x1c1)],'targetDir':_0x5f2d98[_0x502e4e(0x1a4)],'configRoot':_0x5f2d98['configDir'],'filePath':_0x16344d,'resourceName':_0x1643b6[_0x502e4e(0x1c9)],'folderPath':_0x1643b6[_0x502e4e(0x1b5)],'resourceType':_0x1643b6[_0x502e4e(0x1a1)],'isScoped':_0x346219[_0x502e4e(0x1b1)],'scopedFolderPath':_0x346219['scopedFolderPath']};}catch(_0x2591f0){const _0x17e6b0=_0x2591f0 instanceof Error?_0x2591f0[_0x502e4e(0x19a)]:String(_0x2591f0);if(_0x17e6b0[_0x502e4e(0x1b6)](_0x502e4e(0x1c7)))return{'type':_0x502e4e(0x1bd),'errorCode':'file_not_found','message':'File\x20not\x20found:\x20'+_0x133116,'arg':_0x133116};if(_0x17e6b0[_0x502e4e(0x1b6)](_0x502e4e(0x1a8))){if(_0x4eb914){const _0x251ec8=a160_0x285ebb[_0x502e4e(0x1ca)](_0x133116);if(await fs[_0x502e4e(0x1bf)](_0x251ec8)){const _0x266770=a160_0x285ebb['dirname'](_0x251ec8),_0x275e87=await fs['readFile'](_0x251ec8),_0x5b7148=_0x275e87[_0x502e4e(0x1be)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5c7aca=_0x275e87[_0x502e4e(0x1be)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x231948=_0x5b7148?_0x5b7148[0x1][_0x502e4e(0x1bb)]():a160_0x285ebb[_0x502e4e(0x19e)](_0x133116,a160_0x285ebb[_0x502e4e(0x1cb)](_0x133116)),_0x225cb6=_0x5c7aca&&_0x5c7aca[0x1][_0x502e4e(0x1bb)]()===_0x502e4e(0x1c2)?_0x502e4e(0x1c2):_0x502e4e(0x19b);return{'type':'file','parentName':_0x4eb914,'targetDir':_0x266770,'configRoot':_0x266770,'filePath':_0x251ec8,'resourceName':_0x231948,'folderPath':'','resourceType':_0x225cb6,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x502e4e(0x1bd),'errorCode':'no_config','message':_0x502e4e(0x1b7)+_0x133116,'arg':_0x133116,'helpText':_0x502e4e(0x1ae)};}return{'type':_0x502e4e(0x1bd),'errorCode':_0x502e4e(0x19d),'message':_0x17e6b0,'arg':_0x133116};}if(_0x133116){const _0x515ffb=a160_0x285ebb[_0x502e4e(0x1ca)](cwd,_0x133116);let _0x140019=null;try{_0x140019=await fs['stat'](_0x515ffb);}catch{}if(_0x140019?.[_0x502e4e(0x1c0)]()){const _0x23594d=await findTdxConfigAsync(_0x515ffb,fs);if(_0x23594d){const _0x12a056=calculateScopedPath(_0x515ffb,_0x23594d['configDir']);return{'type':_0x502e4e(0x1c4),'parentName':_0x23594d[_0x502e4e(0x1c1)],'targetDir':_0x515ffb,'configRoot':_0x23594d['configDir'],'isScoped':_0x12a056[_0x502e4e(0x1b1)],'scopedFolderPath':_0x12a056[_0x502e4e(0x1ba)]};}if(_0x4eb914)return{'type':'directory','parentName':_0x4eb914,'targetDir':_0x515ffb,'configRoot':_0x515ffb,'isScoped':![],'scopedFolderPath':''};return{'type':_0x502e4e(0x1bd),'errorCode':_0x502e4e(0x1a5),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x133116,'arg':_0x133116,'helpText':_0x502e4e(0x1ae)};}if(_0x140019?.['isFile']())return{'type':_0x502e4e(0x1bd),'errorCode':_0x502e4e(0x19d),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x133116,'arg':_0x133116,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x3d0de2=sanitizeFileName(_0x133116),_0x530f15=getSegmentRootDir(_0x3d0de2,cwd);return{'type':_0x502e4e(0x1b4),'parentName':_0x133116,'targetDir':_0x530f15,'configRoot':_0x530f15};}const _0x36b9e0=await findTdxConfigAsync(cwd,fs);if(_0x36b9e0){const _0x4664b9=calculateScopedPath(cwd,_0x36b9e0[_0x502e4e(0x1a4)]);return{'type':'context','parentName':_0x36b9e0[_0x502e4e(0x1c1)],'targetDir':cwd,'configRoot':_0x36b9e0['configDir'],'isScoped':_0x4664b9[_0x502e4e(0x1b1)],'scopedFolderPath':_0x4664b9[_0x502e4e(0x1ba)]};}if(_0x4eb914){const _0x53f86b=sanitizeFileName(_0x4eb914),_0xef2c9=getSegmentRootDir(_0x53f86b,cwd);return{'type':'context','parentName':_0x4eb914,'targetDir':_0xef2c9,'configRoot':_0xef2c9,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x502e4e(0x1bd),'errorCode':_0x502e4e(0x1b8),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x502e4e(0x1a2)};}
@@ -1 +1 @@
1
- const a161_0x13f52f=a161_0x2461;(function(_0x5837a8,_0x19bbfd){const _0x254b26=a161_0x2461,_0xbe257d=_0x5837a8();while(!![]){try{const _0x576713=-parseInt(_0x254b26(0xd7))/0x1*(-parseInt(_0x254b26(0xca))/0x2)+-parseInt(_0x254b26(0xce))/0x3*(-parseInt(_0x254b26(0xdd))/0x4)+parseInt(_0x254b26(0xcb))/0x5*(-parseInt(_0x254b26(0xdc))/0x6)+-parseInt(_0x254b26(0xe2))/0x7*(-parseInt(_0x254b26(0xd6))/0x8)+parseInt(_0x254b26(0xc3))/0x9*(-parseInt(_0x254b26(0xc8))/0xa)+parseInt(_0x254b26(0xe0))/0xb+-parseInt(_0x254b26(0xd0))/0xc*(-parseInt(_0x254b26(0xc6))/0xd);if(_0x576713===_0x19bbfd)break;else _0xbe257d['push'](_0xbe257d['shift']());}catch(_0x57de99){_0xbe257d['push'](_0xbe257d['shift']());}}}(a161_0x4771,0x734c0));import{existsSync,readFileSync}from'fs';import a161_0x43002a from'path';const TDX_CONFIG_FILE=a161_0x13f52f(0xd4),SEGMENTS_DIR=a161_0x13f52f(0xd3);function a161_0x4771(){const _0x18aa03=['segments','tdx.json','replace','8zVQCtk','3ZDmmnl','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','resolve','engage_workspace','dirname','59352ngFPXN','124AWJWgu','join','parent_segment','4565165GmSTLu','cwd','1948261jABnvo','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','122544olIaHM','startsWith','parse','1050933MsWbJW','relative','640pDMvpK','Invalid\x20JSON\x20in\x20','416762jEVQie','190IPhgaF','object','root','23169BJekld','stringify','24HOxAFL','string','utf-8'];a161_0x4771=function(){return _0x18aa03;};return a161_0x4771();}export function findTdxConfigPath(_0x1c8935=process[a161_0x13f52f(0xe1)]()){const _0x2e05db=a161_0x13f52f;let _0x4d8e02=a161_0x43002a[_0x2e05db(0xd9)](_0x1c8935);const _0xfcfde3=a161_0x43002a[_0x2e05db(0xc5)](_0x4d8e02)[_0x2e05db(0xcd)];while(_0x4d8e02!==_0xfcfde3){const _0x211baf=a161_0x43002a[_0x2e05db(0xde)](_0x4d8e02,TDX_CONFIG_FILE);if(existsSync(_0x211baf))return _0x211baf;_0x4d8e02=a161_0x43002a['dirname'](_0x4d8e02);}return null;}export function loadTdxConfig(_0x355d55){const _0x3e1c56=a161_0x13f52f,_0x55ce88=readFileSync(_0x355d55,_0x3e1c56(0xd2));let _0x22cea0;try{_0x22cea0=JSON[_0x3e1c56(0xc5)](_0x55ce88);}catch{throw new Error(_0x3e1c56(0xc9)+_0x355d55);}if(!_0x22cea0||typeof _0x22cea0!==_0x3e1c56(0xcc))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x523b70=_0x22cea0,_0x3690ca=_0x523b70[_0x3e1c56(0xdf)]&&typeof _0x523b70[_0x3e1c56(0xdf)]==='string',_0xa9ce74=_0x523b70[_0x3e1c56(0xda)]&&typeof _0x523b70[_0x3e1c56(0xda)]===_0x3e1c56(0xd1);if(!_0x3690ca&&!_0xa9ce74)throw new Error(_0x3e1c56(0xd8));const _0x5b9138={};return _0x3690ca&&(_0x5b9138['parent_segment']=_0x523b70[_0x3e1c56(0xdf)]),_0xa9ce74&&(_0x5b9138[_0x3e1c56(0xda)]=_0x523b70[_0x3e1c56(0xda)]),_0x5b9138;}export function findTdxConfig(_0x542390=process['cwd']()){const _0x58240d=a161_0x13f52f,_0x314107=findTdxConfigPath(_0x542390);if(!_0x314107)throw new Error(_0x58240d(0xc2));const _0x2f1ffe=loadTdxConfig(_0x314107),_0x142068=a161_0x43002a[_0x58240d(0xdb)](_0x314107);return{'config':_0x2f1ffe,'configPath':_0x314107,'configDir':_0x142068};}function a161_0x2461(_0x20a074,_0x438dad){_0x20a074=_0x20a074-0xc2;const _0x47717c=a161_0x4771();let _0x246170=_0x47717c[_0x20a074];return _0x246170;}export function tryFindTdxConfig(_0x4349ad){try{return findTdxConfig(_0x4349ad);}catch{return null;}}export function getSegmentRootDir(_0x4a17d8,_0x431332=process[a161_0x13f52f(0xe1)]()){const _0x909bdb=a161_0x13f52f;return a161_0x43002a[_0x909bdb(0xde)](_0x431332,SEGMENTS_DIR,_0x4a17d8);}export function getTdxConfigPath(_0x188b0d,_0x1dc520=process[a161_0x13f52f(0xe1)]()){const _0x57693c=a161_0x13f52f;return a161_0x43002a[_0x57693c(0xde)](getSegmentRootDir(_0x188b0d,_0x1dc520),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x526f8e,_0x169ec2){const _0x20baa4=a161_0x13f52f,_0xc53ff1=a161_0x43002a[_0x20baa4(0xd9)](_0x526f8e),_0x1b822e=a161_0x43002a[_0x20baa4(0xc7)](_0x169ec2,_0xc53ff1);if(_0x1b822e[_0x20baa4(0xc4)]('..'))return'';return _0x1b822e;}export function localPathToTdFolderPath(_0xff9659){const _0x32a715=a161_0x13f52f,_0x252d5a=a161_0x43002a[_0x32a715(0xdb)](_0xff9659);if(_0x252d5a==='.'||_0x252d5a==='')return'';return _0x252d5a[_0x32a715(0xd5)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1cc35f,_0xe69e9){const _0x3e9eaa=a161_0x13f52f;if(!_0x1cc35f)return _0xe69e9;return a161_0x43002a[_0x3e9eaa(0xde)](_0xe69e9,_0x1cc35f);}export function createTdxConfigContent(_0x40becc){const _0x5530bd=a161_0x13f52f,_0x3f3d6b={'parent_segment':_0x40becc};return JSON[_0x5530bd(0xcf)](_0x3f3d6b,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x19a1f2){const _0x19c30c=a161_0x13f52f,_0x508008={'engage_workspace':_0x19a1f2};return JSON[_0x19c30c(0xcf)](_0x508008,null,0x2)+'\x0a';}
1
+ const a161_0x4a227b=a161_0x5894;(function(_0x155291,_0x153d90){const _0x2fbc1f=a161_0x5894,_0x3292c0=_0x155291();while(!![]){try{const _0x5bb40d=-parseInt(_0x2fbc1f(0x1cd))/0x1+-parseInt(_0x2fbc1f(0x1d5))/0x2+-parseInt(_0x2fbc1f(0x1cc))/0x3*(parseInt(_0x2fbc1f(0x1de))/0x4)+-parseInt(_0x2fbc1f(0x1d3))/0x5+-parseInt(_0x2fbc1f(0x1da))/0x6+parseInt(_0x2fbc1f(0x1cb))/0x7+parseInt(_0x2fbc1f(0x1d8))/0x8;if(_0x5bb40d===_0x153d90)break;else _0x3292c0['push'](_0x3292c0['shift']());}catch(_0x68e29){_0x3292c0['push'](_0x3292c0['shift']());}}}(a161_0x3ef2,0xba853));import{existsSync,readFileSync}from'fs';import a161_0x2821ab from'path';function a161_0x3ef2(){const _0x2a5fb0=['107517KSDbYL','343432yaPyoM','resolve','cwd','parent_segment','segments','stringify','6614225bEjyuM','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','513736uDTtvr','startsWith','string','23229024PbsleU','dirname','1983762YvwjRW','relative','parse','object','24RVkwDT','utf-8','join','root','engage_workspace','tdx.json','replace','2304155plLudz'];a161_0x3ef2=function(){return _0x2a5fb0;};return a161_0x3ef2();}const TDX_CONFIG_FILE=a161_0x4a227b(0x1c9),SEGMENTS_DIR=a161_0x4a227b(0x1d1);export function findTdxConfigPath(_0x2226fe=process[a161_0x4a227b(0x1cf)]()){const _0x4bcac7=a161_0x4a227b;let _0x228793=a161_0x2821ab[_0x4bcac7(0x1ce)](_0x2226fe);const _0x19296c=a161_0x2821ab[_0x4bcac7(0x1dc)](_0x228793)[_0x4bcac7(0x1c7)];while(_0x228793!==_0x19296c){const _0x4369d5=a161_0x2821ab[_0x4bcac7(0x1c6)](_0x228793,TDX_CONFIG_FILE);if(existsSync(_0x4369d5))return _0x4369d5;_0x228793=a161_0x2821ab[_0x4bcac7(0x1d9)](_0x228793);}return null;}export function loadTdxConfig(_0x35c5c0){const _0x2d3977=a161_0x4a227b,_0x243740=readFileSync(_0x35c5c0,_0x2d3977(0x1df));let _0x2fc884;try{_0x2fc884=JSON[_0x2d3977(0x1dc)](_0x243740);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x35c5c0);}if(!_0x2fc884||typeof _0x2fc884!==_0x2d3977(0x1dd))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x304550=_0x2fc884,_0x316bc2=_0x304550[_0x2d3977(0x1d0)]&&typeof _0x304550[_0x2d3977(0x1d0)]===_0x2d3977(0x1d7),_0xcb8298=_0x304550['engage_workspace']&&typeof _0x304550['engage_workspace']==='string';if(!_0x316bc2&&!_0xcb8298)throw new Error(_0x2d3977(0x1d4));const _0x10ac61={};return _0x316bc2&&(_0x10ac61['parent_segment']=_0x304550[_0x2d3977(0x1d0)]),_0xcb8298&&(_0x10ac61[_0x2d3977(0x1c8)]=_0x304550[_0x2d3977(0x1c8)]),_0x10ac61;}export function findTdxConfig(_0x4d4b64=process[a161_0x4a227b(0x1cf)]()){const _0x5680d0=a161_0x4a227b,_0x131091=findTdxConfigPath(_0x4d4b64);if(!_0x131091)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x3b7f30=loadTdxConfig(_0x131091),_0x47123a=a161_0x2821ab[_0x5680d0(0x1d9)](_0x131091);return{'config':_0x3b7f30,'configPath':_0x131091,'configDir':_0x47123a};}export function tryFindTdxConfig(_0x22109a){try{return findTdxConfig(_0x22109a);}catch{return null;}}export function getSegmentRootDir(_0x1cb78a,_0x109df0=process[a161_0x4a227b(0x1cf)]()){const _0x1ca729=a161_0x4a227b;return a161_0x2821ab[_0x1ca729(0x1c6)](_0x109df0,SEGMENTS_DIR,_0x1cb78a);}function a161_0x5894(_0x521888,_0x2587e8){_0x521888=_0x521888-0x1c6;const _0x3ef2c3=a161_0x3ef2();let _0x589469=_0x3ef2c3[_0x521888];return _0x589469;}export function getTdxConfigPath(_0x25125d,_0x508e81=process['cwd']()){const _0x3948af=a161_0x4a227b;return a161_0x2821ab[_0x3948af(0x1c6)](getSegmentRootDir(_0x25125d,_0x508e81),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x30940f,_0x2f87c8){const _0x444f2a=a161_0x4a227b,_0x574707=a161_0x2821ab[_0x444f2a(0x1ce)](_0x30940f),_0x4269b9=a161_0x2821ab[_0x444f2a(0x1db)](_0x2f87c8,_0x574707);if(_0x4269b9[_0x444f2a(0x1d6)]('..'))return'';return _0x4269b9;}export function localPathToTdFolderPath(_0x394e66){const _0x493434=a161_0x4a227b,_0x4eadd3=a161_0x2821ab[_0x493434(0x1d9)](_0x394e66);if(_0x4eadd3==='.'||_0x4eadd3==='')return'';return _0x4eadd3[_0x493434(0x1ca)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x579381,_0xe8c259){const _0x1e4940=a161_0x4a227b;if(!_0x579381)return _0xe8c259;return a161_0x2821ab[_0x1e4940(0x1c6)](_0xe8c259,_0x579381);}export function createTdxConfigContent(_0x4e1aca){const _0x3d06d4=a161_0x4a227b,_0x46b60c={'parent_segment':_0x4e1aca};return JSON[_0x3d06d4(0x1d2)](_0x46b60c,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x412b6a){const _0x40a5fe={'engage_workspace':_0x412b6a};return JSON['stringify'](_0x40a5fe,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a162_0x358d7f=a162_0xb7e2;(function(_0xb4c6c,_0x551158){const _0x30b486=a162_0xb7e2,_0x27faae=_0xb4c6c();while(!![]){try{const _0x399873=-parseInt(_0x30b486(0x1db))/0x1+parseInt(_0x30b486(0x1d4))/0x2+-parseInt(_0x30b486(0x1bc))/0x3+-parseInt(_0x30b486(0x1cb))/0x4*(-parseInt(_0x30b486(0x1b9))/0x5)+parseInt(_0x30b486(0x1b7))/0x6+parseInt(_0x30b486(0x1b3))/0x7+-parseInt(_0x30b486(0x1d9))/0x8;if(_0x399873===_0x551158)break;else _0x27faae['push'](_0x27faae['shift']());}catch(_0x2e2d29){_0x27faae['push'](_0x27faae['shift']());}}}(a162_0x4297,0xc332c));function a162_0x4297(){const _0x46caf5=['record','First','desc','min','rows','enum','minutes_interval','80pRTwKx','All','union','week','onFailure','month','minute','hourly','once','270084tMDSsB','hour','Activation\x20name\x20is\x20required','array','unknown','5716576GJQzMe','optional','1318427mcjeWw','object','Last','9684234bWZEWU','number','daily','Top-N','3811524NkBZiX','clear','323690ZvPixI','string','nullable','1847961Uvmqvo','asc','none','Connection\x20name\x20is\x20required','monthly','boolean','masked','cron'];a162_0x4297=function(){return _0x46caf5;};return a162_0x4297();}function a162_0xb7e2(_0x498062,_0xad935d){_0x498062=_0x498062-0x1b2;const _0x429727=a162_0x4297();let _0xb7e285=_0x429727[_0x498062];return _0xb7e285;}import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a162_0x358d7f(0x1be),a162_0x358d7f(0x1d2),a162_0x358d7f(0x1b5),'weekly',a162_0x358d7f(0x1c0),a162_0x358d7f(0x1c3),a162_0x358d7f(0x1ca)]);export const RepeatUnitSchema=z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1d1),a162_0x358d7f(0x1d5),'day',a162_0x358d7f(0x1ce),a162_0x358d7f(0x1d0),a162_0x358d7f(0x1d3),a162_0x358d7f(0x1be)]);export const ScheduleDefSchema=z[a162_0x358d7f(0x1dc)]({'type':ScheduleTypeSchema[a162_0x358d7f(0x1da)](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a162_0x358d7f(0x1b4)]()[a162_0x358d7f(0x1da)](),'repeat_sub_frequency':z[a162_0x358d7f(0x1d7)](z[a162_0x358d7f(0x1b4)]())[a162_0x358d7f(0x1da)](),'start_at':z['string']()[a162_0x358d7f(0x1bb)]()['optional'](),'end_on':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1bb)]()['optional'](),'timezone':z['string']()[a162_0x358d7f(0x1da)]()});export const NotificationDefSchema=z[a162_0x358d7f(0x1dc)]({'notify_on':z[a162_0x358d7f(0x1d7)](z['enum'](['onSuccess',a162_0x358d7f(0x1cf)]))[a162_0x358d7f(0x1da)](),'email_recipients':z['array'](z[a162_0x358d7f(0x1ba)]())[a162_0x358d7f(0x1da)]()});export const ActivationColumnDefSchema=z[a162_0x358d7f(0x1cd)]([z[a162_0x358d7f(0x1ba)](),z['object']({'name':z[a162_0x358d7f(0x1ba)](),'type':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1da)](),'visibility':z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1b8),a162_0x358d7f(0x1c2)])[a162_0x358d7f(0x1da)]()})]);export const ActivationBehaviorDefSchema=z[a162_0x358d7f(0x1dc)]({'columns':z[a162_0x358d7f(0x1d7)](z['object']({'name':z[a162_0x358d7f(0x1ba)](),'type':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1da)](),'visibility':z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1b8),a162_0x358d7f(0x1c2)])[a162_0x358d7f(0x1da)]()}))[a162_0x358d7f(0x1da)](),'behavior_table':z[a162_0x358d7f(0x1ba)]()['optional'](),'join_row':z[a162_0x358d7f(0x1b4)]()['nullable']()[a162_0x358d7f(0x1da)](),'join_strategy':z['enum']([a162_0x358d7f(0x1cc),a162_0x358d7f(0x1c5),a162_0x358d7f(0x1b2),a162_0x358d7f(0x1b6)])[a162_0x358d7f(0x1da)](),'formatting':z['enum']([a162_0x358d7f(0x1c8),'cols'])[a162_0x358d7f(0x1da)](),'order_by':z[a162_0x358d7f(0x1d7)](z[a162_0x358d7f(0x1dc)]({'key':z[a162_0x358d7f(0x1ba)](),'order':z[a162_0x358d7f(0x1c9)]([a162_0x358d7f(0x1bd),a162_0x358d7f(0x1c6)])}))['optional']()});export const ActivationDefSchema=z[a162_0x358d7f(0x1dc)]({'name':z[a162_0x358d7f(0x1ba)]()[a162_0x358d7f(0x1c7)](0x1,a162_0x358d7f(0x1d6)),'description':z['string']()[a162_0x358d7f(0x1da)](),'connection':z[a162_0x358d7f(0x1ba)]()['min'](0x1,a162_0x358d7f(0x1bf)),'all_columns':z[a162_0x358d7f(0x1c1)]()[a162_0x358d7f(0x1da)](),'columns':z[a162_0x358d7f(0x1d7)](ActivationColumnDefSchema)[a162_0x358d7f(0x1da)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a162_0x358d7f(0x1c4)](z[a162_0x358d7f(0x1ba)](),z[a162_0x358d7f(0x1d8)]())[a162_0x358d7f(0x1da)](),'activation_template_id':z['string']()[a162_0x358d7f(0x1bb)]()['optional'](),'behavior':ActivationBehaviorDefSchema[a162_0x358d7f(0x1bb)]()[a162_0x358d7f(0x1da)](),'run_after_journey_refresh':z['boolean']()[a162_0x358d7f(0x1da)](),'nested_workflow_project_name':z[a162_0x358d7f(0x1ba)]()['optional'](),'nested_workflow_name':z['string']()[a162_0x358d7f(0x1da)](),'lock_enabled':z[a162_0x358d7f(0x1c1)]()[a162_0x358d7f(0x1da)]()});
1
+ const a162_0x2dc9c4=a162_0x40ed;(function(_0x1d3fec,_0x5c4afb){const _0x28793a=a162_0x40ed,_0x2cfedd=_0x1d3fec();while(!![]){try{const _0x18dfca=parseInt(_0x28793a(0x7d))/0x1*(-parseInt(_0x28793a(0x9b))/0x2)+-parseInt(_0x28793a(0x9c))/0x3+parseInt(_0x28793a(0x91))/0x4*(parseInt(_0x28793a(0x78))/0x5)+parseInt(_0x28793a(0x89))/0x6*(-parseInt(_0x28793a(0x8b))/0x7)+parseInt(_0x28793a(0x92))/0x8*(parseInt(_0x28793a(0x74))/0x9)+parseInt(_0x28793a(0x7b))/0xa*(parseInt(_0x28793a(0x9a))/0xb)+parseInt(_0x28793a(0x81))/0xc*(parseInt(_0x28793a(0x75))/0xd);if(_0x18dfca===_0x5c4afb)break;else _0x2cfedd['push'](_0x2cfedd['shift']());}catch(_0x525c01){_0x2cfedd['push'](_0x2cfedd['shift']());}}}(a162_0x49c1,0x8ff89));import{z}from'zod';export const ScheduleTypeSchema=z[a162_0x2dc9c4(0x73)]([a162_0x2dc9c4(0x8a),a162_0x2dc9c4(0x8e),a162_0x2dc9c4(0x96),a162_0x2dc9c4(0x8c),a162_0x2dc9c4(0x88),'cron','minutes_interval']);export const RepeatUnitSchema=z[a162_0x2dc9c4(0x73)](['minute',a162_0x2dc9c4(0x90),a162_0x2dc9c4(0x8f),'week','month','once',a162_0x2dc9c4(0x8a)]);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a162_0x2dc9c4(0x85)](),'repeat_frequency':z[a162_0x2dc9c4(0x7e)]()['optional'](),'repeat_sub_frequency':z['array'](z[a162_0x2dc9c4(0x7e)]())[a162_0x2dc9c4(0x85)](),'start_at':z[a162_0x2dc9c4(0x87)]()['nullable']()[a162_0x2dc9c4(0x85)](),'end_on':z['string']()[a162_0x2dc9c4(0x82)]()[a162_0x2dc9c4(0x85)](),'timezone':z[a162_0x2dc9c4(0x87)]()[a162_0x2dc9c4(0x85)]()});export const NotificationDefSchema=z[a162_0x2dc9c4(0x94)]({'notify_on':z[a162_0x2dc9c4(0x8d)](z[a162_0x2dc9c4(0x73)]([a162_0x2dc9c4(0x97),a162_0x2dc9c4(0x7a)]))[a162_0x2dc9c4(0x85)](),'email_recipients':z[a162_0x2dc9c4(0x8d)](z[a162_0x2dc9c4(0x87)]())[a162_0x2dc9c4(0x85)]()});export const ActivationColumnDefSchema=z[a162_0x2dc9c4(0x72)]([z[a162_0x2dc9c4(0x87)](),z['object']({'name':z[a162_0x2dc9c4(0x87)](),'type':z['string']()[a162_0x2dc9c4(0x85)](),'visibility':z[a162_0x2dc9c4(0x73)](['clear',a162_0x2dc9c4(0x98)])[a162_0x2dc9c4(0x85)]()})]);function a162_0x49c1(){const _0x4f1c1a=['boolean','object','cols','daily','onSuccess','masked','Top-N','4103cSUrPG','4MXynsz','1510773lwkCrp','union','enum','526770JgYZLh','8359mNqtmM','unknown','min','60205aLKmKo','desc','onFailure','25700ciHGXw','All','378892fSkOsV','number','Activation\x20name\x20is\x20required','asc','23784XYRGvd','nullable','clear','First','optional','Last','string','monthly','6aHWPBF','none','7517650uWAwAb','weekly','array','hourly','day','hour','16FsXKoH','88wJPHGO'];a162_0x49c1=function(){return _0x4f1c1a;};return a162_0x49c1();}function a162_0x40ed(_0x85bb94,_0x583e19){_0x85bb94=_0x85bb94-0x72;const _0x49c144=a162_0x49c1();let _0x40ed1f=_0x49c144[_0x85bb94];return _0x40ed1f;}export const ActivationBehaviorDefSchema=z[a162_0x2dc9c4(0x94)]({'columns':z['array'](z[a162_0x2dc9c4(0x94)]({'name':z[a162_0x2dc9c4(0x87)](),'type':z[a162_0x2dc9c4(0x87)]()[a162_0x2dc9c4(0x85)](),'visibility':z['enum']([a162_0x2dc9c4(0x83),a162_0x2dc9c4(0x98)])[a162_0x2dc9c4(0x85)]()}))[a162_0x2dc9c4(0x85)](),'behavior_table':z[a162_0x2dc9c4(0x87)]()['optional'](),'join_row':z['number']()[a162_0x2dc9c4(0x82)]()['optional'](),'join_strategy':z['enum']([a162_0x2dc9c4(0x7c),a162_0x2dc9c4(0x84),a162_0x2dc9c4(0x86),a162_0x2dc9c4(0x99)])[a162_0x2dc9c4(0x85)](),'formatting':z[a162_0x2dc9c4(0x73)](['rows',a162_0x2dc9c4(0x95)])[a162_0x2dc9c4(0x85)](),'order_by':z[a162_0x2dc9c4(0x8d)](z[a162_0x2dc9c4(0x94)]({'key':z[a162_0x2dc9c4(0x87)](),'order':z[a162_0x2dc9c4(0x73)]([a162_0x2dc9c4(0x80),a162_0x2dc9c4(0x79)])}))['optional']()});export const ActivationDefSchema=z[a162_0x2dc9c4(0x94)]({'name':z[a162_0x2dc9c4(0x87)]()[a162_0x2dc9c4(0x77)](0x1,a162_0x2dc9c4(0x7f)),'description':z[a162_0x2dc9c4(0x87)]()['optional'](),'connection':z[a162_0x2dc9c4(0x87)]()['min'](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z['boolean']()[a162_0x2dc9c4(0x85)](),'columns':z['array'](ActivationColumnDefSchema)[a162_0x2dc9c4(0x85)](),'schedule':ScheduleDefSchema[a162_0x2dc9c4(0x85)](),'notification':NotificationDefSchema['optional'](),'connector_config':z['record'](z['string'](),z[a162_0x2dc9c4(0x76)]())['optional'](),'activation_template_id':z[a162_0x2dc9c4(0x87)]()['nullable']()[a162_0x2dc9c4(0x85)](),'behavior':ActivationBehaviorDefSchema['nullable']()['optional'](),'run_after_journey_refresh':z[a162_0x2dc9c4(0x93)]()['optional'](),'nested_workflow_project_name':z[a162_0x2dc9c4(0x87)]()[a162_0x2dc9c4(0x85)](),'nested_workflow_name':z['string']()['optional'](),'lock_enabled':z[a162_0x2dc9c4(0x93)]()[a162_0x2dc9c4(0x85)]()});
@@ -1 +1 @@
1
- function a163_0x5d46(_0x360fd2,_0x1236db){_0x360fd2=_0x360fd2-0xd5;var _0x47b0f2=a163_0x47b0();var _0x5d46ea=_0x47b0f2[_0x360fd2];return _0x5d46ea;}(function(_0x1c9237,_0x344ed7){var _0x440d5f=a163_0x5d46,_0x5c6e80=_0x1c9237();while(!![]){try{var _0xe5355d=-parseInt(_0x440d5f(0xd9))/0x1*(-parseInt(_0x440d5f(0xd7))/0x2)+parseInt(_0x440d5f(0xdc))/0x3+parseInt(_0x440d5f(0xd5))/0x4+parseInt(_0x440d5f(0xde))/0x5+-parseInt(_0x440d5f(0xdb))/0x6*(parseInt(_0x440d5f(0xd8))/0x7)+-parseInt(_0x440d5f(0xd6))/0x8*(-parseInt(_0x440d5f(0xda))/0x9)+-parseInt(_0x440d5f(0xdd))/0xa;if(_0xe5355d===_0x344ed7)break;else _0x5c6e80['push'](_0x5c6e80['shift']());}catch(_0x71070){_0x5c6e80['push'](_0x5c6e80['shift']());}}}(a163_0x47b0,0x5f0a4));function a163_0x47b0(){var _0x36aff2=['293659LDvMLH','4256685QMDRAq','36ZImHhE','892629zpkpjs','17638160XjHEHm','2684805sxKJfa','2216264ltUpqG','8UeFpdW','2DmjQso','2443fSwVBL'];a163_0x47b0=function(){return _0x36aff2;};return a163_0x47b0();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ function a163_0xb588(){var _0x1c0486=['5412440ffVlvk','11WIfVfR','5143500tfqzOu','386627zFvuCl','4067560NewHWv','16dxMmnl','1746CetzAh','807OLlfet','13538TdxGcl','48376uaDJnT','1978030xrlzDg'];a163_0xb588=function(){return _0x1c0486;};return a163_0xb588();}(function(_0x1ed14c,_0x3451f3){var _0x28ea90=a163_0x26ae,_0xc9c1fc=_0x1ed14c();while(!![]){try{var _0x3c2a53=parseInt(_0x28ea90(0x13e))/0x1+parseInt(_0x28ea90(0x138))/0x2*(parseInt(_0x28ea90(0x137))/0x3)+-parseInt(_0x28ea90(0x135))/0x4*(parseInt(_0x28ea90(0x13a))/0x5)+-parseInt(_0x28ea90(0x13d))/0x6+parseInt(_0x28ea90(0x134))/0x7+parseInt(_0x28ea90(0x139))/0x8*(parseInt(_0x28ea90(0x136))/0x9)+-parseInt(_0x28ea90(0x13b))/0xa*(parseInt(_0x28ea90(0x13c))/0xb);if(_0x3c2a53===_0x3451f3)break;else _0xc9c1fc['push'](_0xc9c1fc['shift']());}catch(_0x1efe79){_0xc9c1fc['push'](_0xc9c1fc['shift']());}}}(a163_0xb588,0xef720));function a163_0x26ae(_0x204805,_0x4ca91a){_0x204805=_0x204805-0x134;var _0xb588ba=a163_0xb588();var _0x26ae60=_0xb588ba[_0x204805];return _0x26ae60;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a164_0x124f05=a164_0x1db9;(function(_0x2ce634,_0x5cfb09){const _0x5ea00e=a164_0x1db9,_0x26bcbd=_0x2ce634();while(!![]){try{const _0xe90c8a=-parseInt(_0x5ea00e(0x125))/0x1*(parseInt(_0x5ea00e(0x11e))/0x2)+-parseInt(_0x5ea00e(0x111))/0x3+-parseInt(_0x5ea00e(0x127))/0x4*(-parseInt(_0x5ea00e(0x11f))/0x5)+parseInt(_0x5ea00e(0x114))/0x6*(-parseInt(_0x5ea00e(0x112))/0x7)+-parseInt(_0x5ea00e(0x120))/0x8*(parseInt(_0x5ea00e(0x124))/0x9)+-parseInt(_0x5ea00e(0x110))/0xa+parseInt(_0x5ea00e(0x10b))/0xb*(parseInt(_0x5ea00e(0x128))/0xc);if(_0xe90c8a===_0x5cfb09)break;else _0x26bcbd['push'](_0x26bcbd['shift']());}catch(_0x3e9b8b){_0x26bcbd['push'](_0x26bcbd['shift']());}}}(a164_0x171e,0xd34bc));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a164_0x124f05(0x116)](['draft',a164_0x124f05(0x106),a164_0x124f05(0x122)]);export const ReentryModeTypeSchema=z['enum']([a164_0x124f05(0x102),a164_0x124f05(0x11b),a164_0x124f05(0x10c)]);export const WaitUnitTypeSchema=z['enum']([a164_0x124f05(0x107),a164_0x124f05(0x10a)]);export const StepTypeValueSchema=z[a164_0x124f05(0x116)]([a164_0x124f05(0xfb),a164_0x124f05(0x115),a164_0x124f05(0x11d),a164_0x124f05(0x108),a164_0x124f05(0x104),a164_0x124f05(0x109),a164_0x124f05(0x126)]);function a164_0x171e(){const _0x8f2258=['275187wEdBxT','14brdYmW','record','1548138eXEFzv','activation','enum','lazy','min','literal','versions','reentry_unless_goal_achieved','journeys','decision_point','228JiJbTN','862525PzQaDK','16TxyYYj','boolean','launched','string','5304519caaxdb','10813IXcOVe','end','28hltTad','660WVnKMU','Journey\x20name\x20is\x20required','wait','discriminatedUnion','array','object','type','filter','length','no_reentry','number','merge','passthrough','simulation','day','ab_test','jump','week','686169TOwMht','reentry_always','stages','optional','journey','7536730dynwWY'];a164_0x171e=function(){return _0x8f2258;};return a164_0x171e();}export const EmbeddedSegmentDefSchema=z['object']({'description':z['string']()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a164_0x124f05(0xfe)]({'journey':z[a164_0x124f05(0x123)](),'stage':z[a164_0x124f05(0x123)](),'bundle_id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)]()});export const CriteriaDefSchema=z[a164_0x124f05(0xfe)]({'name':z[a164_0x124f05(0x123)](),'description':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'segment':z['string'](),'target':JumpTargetDefSchema[a164_0x124f05(0x10e)]()});const WaitConditionTimeoutDefSchema=z[a164_0x124f05(0xfe)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)]()}),WaitConditionDefSchema=z[a164_0x124f05(0xfe)]({'segment':z['string'](),'next':z['string']()[a164_0x124f05(0x10e)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z['object']({'duration':z[a164_0x124f05(0x103)]()['optional'](),'unit':WaitUnitTypeSchema[a164_0x124f05(0x10e)](),'wait_until':z['string']()[a164_0x124f05(0x10e)](),'condition':WaitConditionDefSchema[a164_0x124f05(0x10e)](),'days_of_week':z['array'](z['string']())[a164_0x124f05(0x10e)]()}),StepBaseFields={'name':z[a164_0x124f05(0x123)](),'uuid':z['string']()['optional'](),'next':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)]()},WaitStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z['string']()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a164_0x124f05(0x115)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a164_0x124f05(0xfe)]({'name':z['string'](),'segment':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'segment_id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'excluded':z[a164_0x124f05(0x121)]()[a164_0x124f05(0x10e)](),'next':z['string']()[a164_0x124f05(0x10e)]()}),DecisionPointStepParamsDefSchema=z[a164_0x124f05(0xfe)]({'branches':z[a164_0x124f05(0xfd)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x11d)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a164_0x124f05(0xfe)]({'id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'name':z[a164_0x124f05(0x123)](),'percentage':z[a164_0x124f05(0x103)](),'next':z['string']()[a164_0x124f05(0x10e)]()}),AbTestStepParamsDefSchema=z[a164_0x124f05(0xfe)]({'variants':z[a164_0x124f05(0xfd)](AbTestVariantDefSchema),'unique_id':z[a164_0x124f05(0x123)]()['optional'](),'customized_split':z['boolean']()[a164_0x124f05(0x10e)]()}),AbTestStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x108)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)]('merge')}),JumpStepParamsDefSchema=z[a164_0x124f05(0xfe)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a164_0x124f05(0xfe)]({...StepBaseFields,'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x126))})[a164_0x124f05(0x105)]();export const StepDefSchema=z[a164_0x124f05(0xfc)](a164_0x124f05(0xff),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a164_0x124f05(0xfe)]({'name':z[a164_0x124f05(0x123)](),'description':z[a164_0x124f05(0x123)]()['optional'](),'id':z['string']()[a164_0x124f05(0x10e)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a164_0x124f05(0xfd)](CriteriaDefSchema)[a164_0x124f05(0x10e)](),'milestone':CriteriaDefSchema['optional'](),'root_step':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'steps':z['array'](StepDefSchema)[a164_0x124f05(0x10e)]()});export const JourneyEntryDefSchema=z[a164_0x124f05(0xfe)]({'name':z['string']()['optional'](),'version':z[a164_0x124f05(0x123)]()['optional'](),'state':JourneyStateTypeSchema['optional'](),'latest':z[a164_0x124f05(0x121)]()[a164_0x124f05(0x10e)](),'stages':z[a164_0x124f05(0xfd)](StageDefSchema),'id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'version_number':z[a164_0x124f05(0x103)]()['optional'](),'goal':CriteriaDefSchema[a164_0x124f05(0x10e)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z[a164_0x124f05(0x117)](()=>z[a164_0x124f05(0xfe)]({'type':z[a164_0x124f05(0x119)](a164_0x124f05(0x10f)),'name':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x118)](0x1,a164_0x124f05(0x129)),'description':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'bundle_id':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'bundle_name':z[a164_0x124f05(0x123)]()[a164_0x124f05(0x10e)](),'folder_id':z['string']()[a164_0x124f05(0x10e)](),'reentry':ReentryModeTypeSchema[a164_0x124f05(0x10e)](),'allow_reentry':z[a164_0x124f05(0x121)]()['optional'](),'goal':CriteriaDefSchema[a164_0x124f05(0x10e)](),'id':z[a164_0x124f05(0x123)]()['optional'](),'version':z[a164_0x124f05(0x123)]()['optional'](),'version_number':z[a164_0x124f05(0x103)]()[a164_0x124f05(0x10e)](),'stages':z[a164_0x124f05(0xfd)](StageDefSchema)[a164_0x124f05(0x10e)](),'versions':z[a164_0x124f05(0xfd)](JourneyEntryDefSchema)['optional'](),'journeys':z[a164_0x124f05(0xfd)](JourneyEntryDefSchema)[a164_0x124f05(0x10e)](),'segments':z[a164_0x124f05(0x113)](z[a164_0x124f05(0x123)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a164_0x124f05(0x113)](z['string'](),ActivationDefSchema)[a164_0x124f05(0x10e)]()})['refine'](_0x140336=>{const _0x5d5c35=a164_0x124f05,_0x45168c=[_0x140336[_0x5d5c35(0x11c)],_0x140336[_0x5d5c35(0x10d)],_0x140336[_0x5d5c35(0x11a)]][_0x5d5c35(0x100)](_0x41d3f7=>Array['isArray'](_0x41d3f7)&&_0x41d3f7[_0x5d5c35(0x101)]>0x0)['length'];return _0x45168c===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];function a164_0x1db9(_0x4b4c13,_0x5225c6){_0x4b4c13=_0x4b4c13-0xfb;const _0x171ee2=a164_0x171e();let _0x1db990=_0x171ee2[_0x4b4c13];return _0x1db990;}void _syncCheck1,void _syncCheck2;
1
+ function a164_0x42a2(){const _0x1d80d5=['filter','journey','reentry_always','enum','min','object','number','week','optional','array','decision_point','wait','17275520AARgLo','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','6273544iHCkWz','106916sWDJTg','2897574eaWBxE','9bOzvNW','lazy','record','simulation','length','stages','string','day','discriminatedUnion','end','jump','no_reentry','185vYuLxD','Journey\x20name\x20is\x20required','ab_test','7FwanlR','6865242JpeNqZ','refine','boolean','type','literal','449700gLhsBP','reentry_unless_goal_achieved','draft','1684048Tftrcq','activation'];a164_0x42a2=function(){return _0x1d80d5;};return a164_0x42a2();}const a164_0x4b46ed=a164_0x404d;(function(_0x24c594,_0x32e5c7){const _0x56cb1f=a164_0x404d,_0x3fdced=_0x24c594();while(!![]){try{const _0x62150d=-parseInt(_0x56cb1f(0x7e))/0x1+parseInt(_0x56cb1f(0x81))/0x2+-parseInt(_0x56cb1f(0x93))/0x3+-parseInt(_0x56cb1f(0x92))/0x4*(-parseInt(_0x56cb1f(0x75))/0x5)+parseInt(_0x56cb1f(0x79))/0x6*(parseInt(_0x56cb1f(0x78))/0x7)+parseInt(_0x56cb1f(0x91))/0x8+-parseInt(_0x56cb1f(0x94))/0x9*(parseInt(_0x56cb1f(0x8f))/0xa);if(_0x62150d===_0x32e5c7)break;else _0x3fdced['push'](_0x3fdced['shift']());}catch(_0x173778){_0x3fdced['push'](_0x3fdced['shift']());}}}(a164_0x42a2,0x9675f));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a164_0x4b46ed(0x86)]([a164_0x4b46ed(0x80),a164_0x4b46ed(0x6c),'launched']);export const ReentryModeTypeSchema=z[a164_0x4b46ed(0x86)]([a164_0x4b46ed(0x74),a164_0x4b46ed(0x7f),a164_0x4b46ed(0x85)]);function a164_0x404d(_0x27cdcb,_0x782e3c){_0x27cdcb=_0x27cdcb-0x6c;const _0x42a2eb=a164_0x42a2();let _0x404d81=_0x42a2eb[_0x27cdcb];return _0x404d81;}export const WaitUnitTypeSchema=z[a164_0x4b46ed(0x86)]([a164_0x4b46ed(0x70),a164_0x4b46ed(0x8a)]);export const StepTypeValueSchema=z[a164_0x4b46ed(0x86)]([a164_0x4b46ed(0x8e),a164_0x4b46ed(0x82),a164_0x4b46ed(0x8d),a164_0x4b46ed(0x77),'merge','jump',a164_0x4b46ed(0x72)]);export const EmbeddedSegmentDefSchema=z[a164_0x4b46ed(0x88)]({'description':z['string']()[a164_0x4b46ed(0x8b)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a164_0x4b46ed(0x6f)](),'stage':z[a164_0x4b46ed(0x6f)](),'bundle_id':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)]()});export const CriteriaDefSchema=z[a164_0x4b46ed(0x88)]({'name':z[a164_0x4b46ed(0x6f)](),'description':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'segment':z[a164_0x4b46ed(0x6f)](),'target':JumpTargetDefSchema[a164_0x4b46ed(0x8b)]()});const WaitConditionTimeoutDefSchema=z[a164_0x4b46ed(0x88)]({'duration':z[a164_0x4b46ed(0x89)](),'unit':WaitUnitTypeSchema,'next':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)]()}),WaitConditionDefSchema=z[a164_0x4b46ed(0x88)]({'segment':z['string'](),'next':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'timeout':WaitConditionTimeoutDefSchema[a164_0x4b46ed(0x8b)]()}),WaitStepParamsDefSchema=z[a164_0x4b46ed(0x88)]({'duration':z['number']()[a164_0x4b46ed(0x8b)](),'unit':WaitUnitTypeSchema[a164_0x4b46ed(0x8b)](),'wait_until':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'condition':WaitConditionDefSchema[a164_0x4b46ed(0x8b)](),'days_of_week':z[a164_0x4b46ed(0x8c)](z[a164_0x4b46ed(0x6f)]())[a164_0x4b46ed(0x8b)]()}),StepBaseFields={'name':z['string'](),'uuid':z['string']()[a164_0x4b46ed(0x8b)](),'next':z['string']()[a164_0x4b46ed(0x8b)]()},WaitStepDefSchema=z[a164_0x4b46ed(0x88)]({...StepBaseFields,'type':z['literal']('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a164_0x4b46ed(0x88)]({'activation':z[a164_0x4b46ed(0x6f)]()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z[a164_0x4b46ed(0x7d)](a164_0x4b46ed(0x82)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a164_0x4b46ed(0x6f)](),'segment':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'segment_id':z[a164_0x4b46ed(0x6f)]()['optional'](),'excluded':z[a164_0x4b46ed(0x7b)]()[a164_0x4b46ed(0x8b)](),'next':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)]()}),DecisionPointStepParamsDefSchema=z[a164_0x4b46ed(0x88)]({'branches':z[a164_0x4b46ed(0x8c)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a164_0x4b46ed(0x88)]({...StepBaseFields,'type':z['literal'](a164_0x4b46ed(0x8d)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a164_0x4b46ed(0x88)]({'id':z[a164_0x4b46ed(0x6f)]()['optional'](),'name':z[a164_0x4b46ed(0x6f)](),'percentage':z[a164_0x4b46ed(0x89)](),'next':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)]()}),AbTestStepParamsDefSchema=z['object']({'variants':z[a164_0x4b46ed(0x8c)](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z[a164_0x4b46ed(0x7b)]()[a164_0x4b46ed(0x8b)]()}),AbTestStepDefSchema=z[a164_0x4b46ed(0x88)]({...StepBaseFields,'type':z[a164_0x4b46ed(0x7d)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a164_0x4b46ed(0x7d)]('merge')}),JumpStepParamsDefSchema=z[a164_0x4b46ed(0x88)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a164_0x4b46ed(0x88)]({...StepBaseFields,'type':z[a164_0x4b46ed(0x7d)](a164_0x4b46ed(0x73)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a164_0x4b46ed(0x88)]({...StepBaseFields,'type':z[a164_0x4b46ed(0x7d)](a164_0x4b46ed(0x72))})['passthrough']();export const StepDefSchema=z[a164_0x4b46ed(0x71)](a164_0x4b46ed(0x7c),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a164_0x4b46ed(0x88)]({'name':z['string'](),'description':z['string']()[a164_0x4b46ed(0x8b)](),'id':z['string']()[a164_0x4b46ed(0x8b)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a164_0x4b46ed(0x8c)](CriteriaDefSchema)[a164_0x4b46ed(0x8b)](),'milestone':CriteriaDefSchema[a164_0x4b46ed(0x8b)](),'root_step':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'steps':z[a164_0x4b46ed(0x8c)](StepDefSchema)[a164_0x4b46ed(0x8b)]()});export const JourneyEntryDefSchema=z[a164_0x4b46ed(0x88)]({'name':z[a164_0x4b46ed(0x6f)]()['optional'](),'version':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'state':JourneyStateTypeSchema[a164_0x4b46ed(0x8b)](),'latest':z[a164_0x4b46ed(0x7b)]()[a164_0x4b46ed(0x8b)](),'stages':z['array'](StageDefSchema),'id':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'version_number':z[a164_0x4b46ed(0x89)]()[a164_0x4b46ed(0x8b)](),'goal':CriteriaDefSchema[a164_0x4b46ed(0x8b)](),'reentry':ReentryModeTypeSchema[a164_0x4b46ed(0x8b)]()});export const JourneyDefSchema=z[a164_0x4b46ed(0x95)](()=>z['object']({'type':z[a164_0x4b46ed(0x7d)](a164_0x4b46ed(0x84)),'name':z['string']()[a164_0x4b46ed(0x87)](0x1,a164_0x4b46ed(0x76)),'description':z['string']()[a164_0x4b46ed(0x8b)](),'bundle_id':z['string']()[a164_0x4b46ed(0x8b)](),'bundle_name':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'folder_id':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'reentry':ReentryModeTypeSchema[a164_0x4b46ed(0x8b)](),'allow_reentry':z[a164_0x4b46ed(0x7b)]()[a164_0x4b46ed(0x8b)](),'goal':CriteriaDefSchema[a164_0x4b46ed(0x8b)](),'id':z[a164_0x4b46ed(0x6f)]()[a164_0x4b46ed(0x8b)](),'version':z['string']()['optional'](),'version_number':z['number']()[a164_0x4b46ed(0x8b)](),'stages':z[a164_0x4b46ed(0x8c)](StageDefSchema)['optional'](),'versions':z['array'](JourneyEntryDefSchema)['optional'](),'journeys':z[a164_0x4b46ed(0x8c)](JourneyEntryDefSchema)[a164_0x4b46ed(0x8b)](),'segments':z[a164_0x4b46ed(0x96)](z[a164_0x4b46ed(0x6f)](),EmbeddedSegmentDefSchema)['optional'](),'activations':z[a164_0x4b46ed(0x96)](z['string'](),ActivationDefSchema)['optional']()})[a164_0x4b46ed(0x7a)](_0x3ea15c=>{const _0x30c83c=a164_0x4b46ed,_0x509461=[_0x3ea15c['journeys'],_0x3ea15c[_0x30c83c(0x6e)],_0x3ea15c['versions']][_0x30c83c(0x83)](_0x2a55b1=>Array['isArray'](_0x2a55b1)&&_0x2a55b1[_0x30c83c(0x6d)]>0x0)[_0x30c83c(0x6d)];return _0x509461===0x1;},{'message':a164_0x4b46ed(0x90)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x510a5f,_0x37a3b3){var _0x3b4db3=a166_0x4366,_0x3d1f9c=_0x510a5f();while(!![]){try{var _0x458b10=parseInt(_0x3b4db3(0xb9))/0x1*(parseInt(_0x3b4db3(0xbc))/0x2)+parseInt(_0x3b4db3(0xbb))/0x3+-parseInt(_0x3b4db3(0xc0))/0x4+parseInt(_0x3b4db3(0xb8))/0x5*(parseInt(_0x3b4db3(0xc1))/0x6)+-parseInt(_0x3b4db3(0xbd))/0x7+parseInt(_0x3b4db3(0xba))/0x8*(-parseInt(_0x3b4db3(0xbe))/0x9)+parseInt(_0x3b4db3(0xbf))/0xa;if(_0x458b10===_0x37a3b3)break;else _0x3d1f9c['push'](_0x3d1f9c['shift']());}catch(_0x9ad14e){_0x3d1f9c['push'](_0x3d1f9c['shift']());}}}(a166_0x1a74,0xaac20));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a166_0x4366(_0x462e69,_0x7d8e5){_0x462e69=_0x462e69-0xb8;var _0x1a7483=a166_0x1a74();var _0x43661d=_0x1a7483[_0x462e69];return _0x43661d;}function a166_0x1a74(){var _0x5e5924=['9CqVqlX','11560420boTwEZ','1786416bgjvoU','271638EEueqe','140xoYazy','2QTNyVu','9619544NJdxaS','507633oGZcgX','360298xNTJdv','4233068eKGFPl'];a166_0x1a74=function(){return _0x5e5924;};return a166_0x1a74();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x5cbfe8,_0x2cd003){var _0x14f266=a166_0x3735,_0x420833=_0x5cbfe8();while(!![]){try{var _0xd8749e=-parseInt(_0x14f266(0x19e))/0x1+-parseInt(_0x14f266(0x1a4))/0x2+-parseInt(_0x14f266(0x1a0))/0x3+parseInt(_0x14f266(0x19d))/0x4*(-parseInt(_0x14f266(0x19f))/0x5)+-parseInt(_0x14f266(0x1a1))/0x6+-parseInt(_0x14f266(0x1a5))/0x7*(-parseInt(_0x14f266(0x1a2))/0x8)+parseInt(_0x14f266(0x1a3))/0x9;if(_0xd8749e===_0x2cd003)break;else _0x420833['push'](_0x420833['shift']());}catch(_0x42d611){_0x420833['push'](_0x420833['shift']());}}}(a166_0xbf27,0x2eff2));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a166_0x3735(_0x44dd09,_0x3d7248){_0x44dd09=_0x44dd09-0x19d;var _0xbf27f6=a166_0xbf27();var _0x3735a2=_0xbf27f6[_0x44dd09];return _0x3735a2;}function a166_0xbf27(){var _0xccb4bd=['1220552IHWpXP','7604577DSncKk','347922IFDtHt','7Jthjeo','28AsHwKB','362629grhWrL','98570xzktoP','213813bzeAom','354990gTkCQK'];a166_0xbf27=function(){return _0xccb4bd;};return a166_0xbf27();}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a167_0x5e449e=a167_0xfd33;(function(_0x407dd2,_0x99727e){const _0x59ea48=a167_0xfd33,_0x51f6d3=_0x407dd2();while(!![]){try{const _0x60acae=parseInt(_0x59ea48(0xf4))/0x1+-parseInt(_0x59ea48(0x119))/0x2*(parseInt(_0x59ea48(0xec))/0x3)+-parseInt(_0x59ea48(0xda))/0x4*(parseInt(_0x59ea48(0xd9))/0x5)+-parseInt(_0x59ea48(0xcf))/0x6*(-parseInt(_0x59ea48(0xd1))/0x7)+parseInt(_0x59ea48(0xdd))/0x8+parseInt(_0x59ea48(0xce))/0x9*(-parseInt(_0x59ea48(0x109))/0xa)+-parseInt(_0x59ea48(0xfb))/0xb*(-parseInt(_0x59ea48(0xdb))/0xc);if(_0x60acae===_0x99727e)break;else _0x51f6d3['push'](_0x51f6d3['shift']());}catch(_0x311bd7){_0x51f6d3['push'](_0x51f6d3['shift']());}}}(a167_0x1d72,0x9a6a2));import{z}from'zod';export const OperatorTypeSchema=z[a167_0x5e449e(0xe2)](['Equal',a167_0x5e449e(0xd4),a167_0x5e449e(0xfe),a167_0x5e449e(0xe8),'LessEqual','In',a167_0x5e449e(0xd2),a167_0x5e449e(0xf9),a167_0x5e449e(0xe1),a167_0x5e449e(0x11f),a167_0x5e449e(0xd6),a167_0x5e449e(0x11d),'StartWith',a167_0x5e449e(0xed),a167_0x5e449e(0x120)]);export const TimeUnitSchema=z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0xe0),a167_0x5e449e(0xe4),a167_0x5e449e(0xcc),a167_0x5e449e(0xff),a167_0x5e449e(0xf0),a167_0x5e449e(0xe5),a167_0x5e449e(0x10d)]);export const AggregationTypeSchema=z[a167_0x5e449e(0xe2)](['Count',a167_0x5e449e(0xe7),a167_0x5e449e(0xde),a167_0x5e449e(0x110),'Max',a167_0x5e449e(0x105),a167_0x5e449e(0x10a),a167_0x5e449e(0xd5)]);const TemporalValueSchema=z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0xf1)]({'timestamp':z['string']()}),z[a167_0x5e449e(0xf1)]({'last':z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xe9)](z[a167_0x5e449e(0xfc)](),z[a167_0x5e449e(0x122)]())]),'unit':z[a167_0x5e449e(0xfc)]()})]),OperatorValueSchema=z[a167_0x5e449e(0xd0)]([z['string'](),z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xeb)](),TemporalValueSchema,z[a167_0x5e449e(0xf2)](z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0xfc)](),z['number'](),z[a167_0x5e449e(0xeb)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a167_0x5e449e(0xf6),'Greater','GreaterEqual','Less',a167_0x5e449e(0x121),'In',a167_0x5e449e(0x11d),a167_0x5e449e(0x116),a167_0x5e449e(0xed),a167_0x5e449e(0xf9),a167_0x5e449e(0x11f),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a167_0x5e449e(0xd6)]);export const OperatorDefSchema=z[a167_0x5e449e(0xf1)]({'type':OperatorTypeSchema,'not':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)](),'value':OperatorValueSchema[a167_0x5e449e(0xd7)](),'min':z['union']([z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xfc)](),TemporalValueSchema])[a167_0x5e449e(0xd7)](),'max':z['union']([z[a167_0x5e449e(0x122)](),z[a167_0x5e449e(0xfc)](),TemporalValueSchema])[a167_0x5e449e(0xd7)](),'unit':TimeUnitSchema['optional'](),'duration':z[a167_0x5e449e(0xf1)]({'day':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'week':z[a167_0x5e449e(0x122)]()['optional'](),'month':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'year':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'hour':z[a167_0x5e449e(0x122)]()['optional'](),'minute':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)](),'second':z['number']()[a167_0x5e449e(0xd7)]()})['optional'](),'from':z[a167_0x5e449e(0xf1)]({'last':z[a167_0x5e449e(0xd0)]([z[a167_0x5e449e(0x122)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)]()})[a167_0x5e449e(0x111)]((_0x28b738,_0x4fbff1)=>{const _0x30ceb6=a167_0x5e449e;OPERATORS_REQUIRING_VALUE['has'](_0x28b738['type'])&&(_0x28b738[_0x30ceb6(0xdf)]===undefined||_0x28b738[_0x30ceb6(0xdf)]===null)&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':'Operator\x20\x27'+_0x28b738[_0x30ceb6(0xdc)]+_0x30ceb6(0xfa),'path':[_0x30ceb6(0xdf)]}),_0x28b738[_0x30ceb6(0xdc)]===_0x30ceb6(0xd2)&&_0x28b738[_0x30ceb6(0xea)]===undefined&&_0x28b738[_0x30ceb6(0xee)]===undefined&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0x102),'params':{'validationCode':_0x30ceb6(0x11c)}}),OPERATORS_REQUIRING_UNIT['has'](_0x28b738[_0x30ceb6(0xdc)])&&_0x28b738['value']!==undefined&&!_0x28b738[_0x30ceb6(0x104)]&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0x100)+_0x28b738['type']+_0x30ceb6(0x10e),'path':[_0x30ceb6(0x104)],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x28b738[_0x30ceb6(0xdc)]===_0x30ceb6(0x120)&&(!_0x28b738['duration']&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0xcb),'path':[_0x30ceb6(0x117)]}),!_0x28b738[_0x30ceb6(0x10b)]&&_0x4fbff1[_0x30ceb6(0xfd)]({'code':_0x30ceb6(0xe6),'message':_0x30ceb6(0xf7),'path':[_0x30ceb6(0x10b)]}));});export const ArrayMatchingSchema=z['union']([z['literal'](a167_0x5e449e(0x10f)),z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x108)),z['object']({'atLeast':z[a167_0x5e449e(0x122)]()}),z[a167_0x5e449e(0xf1)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a167_0x5e449e(0xf5)](a167_0x5e449e(0xdc),[z[a167_0x5e449e(0xf1)]({'type':z['enum']([a167_0x5e449e(0xe7),'Min',a167_0x5e449e(0xca),a167_0x5e449e(0xde)]),'column':z['string'](),'groupingColumns':z[a167_0x5e449e(0xf2)](z['string']())[a167_0x5e449e(0xd7)]()}),z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0xf8)),'groupingColumns':z[a167_0x5e449e(0xf2)](z['string']())[a167_0x5e449e(0xd7)]()}),z['object']({'type':z['literal']('CountDistinct'),'columns':z['array'](z[a167_0x5e449e(0xfc)]())}),z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xe2)](['First',a167_0x5e449e(0xd5)]),'column':z[a167_0x5e449e(0xfc)](),'orderColumn':z[a167_0x5e449e(0xfc)](),'groupingColumns':z[a167_0x5e449e(0xf2)](z[a167_0x5e449e(0xfc)]())[a167_0x5e449e(0xd7)]()})]);export const TimeWindowDefSchema=z[a167_0x5e449e(0xf1)]({'duration':z[a167_0x5e449e(0x122)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a167_0x5e449e(0x11f),'TimeWithinNext','TimeRange']);export const FilterColumnConditionDefSchema=z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x112)),'column':z[a167_0x5e449e(0xfc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x5e449e(0xd7)]()})['superRefine']((_0xd41000,_0x3cfb13)=>{const _0x4c9864=a167_0x5e449e,_0x5c287b=_0xd41000[_0x4c9864(0x11e)][_0x4c9864(0xdc)];_0xd41000[_0x4c9864(0x11a)]===_0x4c9864(0x118)?!TIMESTAMP_OPERATORS[_0x4c9864(0xef)](_0x5c287b)&&_0x3cfb13[_0x4c9864(0xfd)]({'code':_0x4c9864(0xe6),'message':_0x4c9864(0xe3)+_0x5c287b+'\x27)','path':['operator',_0x4c9864(0xdc)]}):TIMESTAMP_OPERATORS[_0x4c9864(0xef)](_0x5c287b)&&_0x3cfb13[_0x4c9864(0xfd)]({'code':_0x4c9864(0xe6),'message':'Operator\x20\x27'+_0x5c287b+_0x4c9864(0x106),'path':[_0x4c9864(0x11e),_0x4c9864(0xdc)]});});export const FilterRuleDefSchema=z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x101)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a167_0x5e449e(0x114)](()=>z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x10c)),'attribute':z[a167_0x5e449e(0xfc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x5e449e(0xd7)](),'exclude':z[a167_0x5e449e(0xeb)]()['optional'](),'aggregation':AggregationDefSchema[a167_0x5e449e(0xd7)](),'source':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xd7)](),'filter':FilterRuleDefSchema[a167_0x5e449e(0xd7)](),'limit':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xcd)]('Behavior'),'attribute':z[a167_0x5e449e(0xfc)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x5e449e(0xd7)](),'exclude':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)](),'aggregation':AggregationDefSchema[a167_0x5e449e(0xd7)](),'source':z['string']()[a167_0x5e449e(0xd7)](),'filter':FilterRuleDefSchema[a167_0x5e449e(0xd7)](),'timeWindow':TimeWindowDefSchema[a167_0x5e449e(0xd7)](),'limit':z[a167_0x5e449e(0x122)]()[a167_0x5e449e(0xd7)]()}));function a167_0x1d72(){const _0x38da27=['discriminatedUnion','Equal','TimeRange\x20operator\x20requires\x20\x27from\x27','Count','Regexp','\x27\x20requires\x20a\x20value','33BWCTmH','string','addIssue','Less','day','Operator\x20\x27','And','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','funnel_stage','unit','CountDistinct','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','segment','all','2176430fQfvSj','First','from','Value','year','\x27\x20requires\x20a\x20time\x20unit','any','Min','superRefine','Column','Segment\x20reference\x20must\x20not\x20be\x20empty','lazy','exclude','StartWith','duration','timestamp','269222qdZtSI','column','Composite','MISSING_BETWEEN_BOUNDS','Contain','operator','TimeWithinPast','TimeRange','LessEqual','number','Max','TimeRange\x20operator\x20requires\x20\x27duration\x27','hour','literal','18iLfMYq','228yFxwxR','union','81753Yeaytz','Between','batch','Greater','Last','TimeWithinNext','optional','include','2436910dIOrBy','4mXJKYD','1497252iSjjWo','type','9750376uIxCaH','Average','value','second','IsNull','enum','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','minute','month','custom','Sum','GreaterEqual','record','min','boolean','27HBnTEq','EndWith','max','has','week','object','array','realtime','729737OwLQTH'];a167_0x1d72=function(){return _0x38da27;};return a167_0x1d72();}export const ColumnConditionDefSchema=z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x112)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z['enum']([a167_0x5e449e(0x101),'Or',a167_0x5e449e(0x11b)]),'conditions':z[a167_0x5e449e(0xf2)](ConditionDefSchema),'description':z['string']()['optional'](),'expr':z['string']()['optional']()}));function a167_0xfd33(_0x55e042,_0x244d41){_0x55e042=_0x55e042-0xca;const _0x1d72db=a167_0x1d72();let _0xfd3343=_0x1d72db[_0x55e042];return _0xfd3343;}export const SegmentRefConditionDefSchema=z[a167_0x5e449e(0xf1)]({'type':z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0xd8),a167_0x5e449e(0x115)]),'segment':z['string']()[a167_0x5e449e(0xea)](0x1,a167_0x5e449e(0x113))});export const ConditionDefSchema=z[a167_0x5e449e(0x114)](()=>z[a167_0x5e449e(0xd0)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a167_0x5e449e(0x114)](()=>z['object']({'type':z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0x101),'Or',a167_0x5e449e(0x11b)]),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a167_0x5e449e(0xd7)](),'expr':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xd7)]()}));export const SegmentDefSchema=z['object']({'type':z[a167_0x5e449e(0xcd)](a167_0x5e449e(0x107))['optional'](),'name':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xea)](0x1,'Segment\x20name\x20is\x20required'),'description':z['string']()['optional'](),'folder':z[a167_0x5e449e(0xfc)]()[a167_0x5e449e(0xd7)](),'rule':RuleDefSchema[a167_0x5e449e(0xd7)](),'kind':z[a167_0x5e449e(0xe2)]([a167_0x5e449e(0xd3),a167_0x5e449e(0xf3),a167_0x5e449e(0x103)])[a167_0x5e449e(0xd7)](),'visible':z[a167_0x5e449e(0xeb)]()[a167_0x5e449e(0xd7)](),'activations':z[a167_0x5e449e(0xf2)](z[a167_0x5e449e(0x10f)]())[a167_0x5e449e(0xd7)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a167_0x32bf94=a167_0x412b;(function(_0x2643a2,_0x51d6a0){const _0xdacdbe=a167_0x412b,_0x341f97=_0x2643a2();while(!![]){try{const _0x111c47=parseInt(_0xdacdbe(0x153))/0x1*(-parseInt(_0xdacdbe(0x134))/0x2)+parseInt(_0xdacdbe(0x146))/0x3+-parseInt(_0xdacdbe(0x147))/0x4*(-parseInt(_0xdacdbe(0x15f))/0x5)+-parseInt(_0xdacdbe(0x159))/0x6*(-parseInt(_0xdacdbe(0x142))/0x7)+parseInt(_0xdacdbe(0x12f))/0x8+parseInt(_0xdacdbe(0x143))/0x9+-parseInt(_0xdacdbe(0x161))/0xa*(-parseInt(_0xdacdbe(0x148))/0xb);if(_0x111c47===_0x51d6a0)break;else _0x341f97['push'](_0x341f97['shift']());}catch(_0xb993ad){_0x341f97['push'](_0x341f97['shift']());}}}(a167_0x4f32,0xc69e2));import{z}from'zod';export const OperatorTypeSchema=z[a167_0x32bf94(0x16f)]([a167_0x32bf94(0x132),a167_0x32bf94(0x171),a167_0x32bf94(0x176),a167_0x32bf94(0x14b),a167_0x32bf94(0x13f),'In',a167_0x32bf94(0x167),a167_0x32bf94(0x126),'IsNull',a167_0x32bf94(0x162),'TimeWithinNext',a167_0x32bf94(0x15a),a167_0x32bf94(0x151),'EndWith',a167_0x32bf94(0x14c)]);function a167_0x412b(_0x2226f7,_0x2365e3){_0x2226f7=_0x2226f7-0x124;const _0x4f3281=a167_0x4f32();let _0x412bd9=_0x4f3281[_0x2226f7];return _0x412bd9;}export const TimeUnitSchema=z[a167_0x32bf94(0x16f)]([a167_0x32bf94(0x129),a167_0x32bf94(0x124),a167_0x32bf94(0x160),a167_0x32bf94(0x15d),a167_0x32bf94(0x13d),a167_0x32bf94(0x136),'year']);export const AggregationTypeSchema=z[a167_0x32bf94(0x16f)]([a167_0x32bf94(0x14f),a167_0x32bf94(0x16e),a167_0x32bf94(0x131),a167_0x32bf94(0x163),a167_0x32bf94(0x154),a167_0x32bf94(0x144),a167_0x32bf94(0x177),a167_0x32bf94(0x15e)]);function a167_0x4f32(){const _0x4c80bb=['Last','5dlAgzY','hour','1483010mdWnYE','TimeWithinPast','Min','boolean','TimeWithinNext','from','Between','Behavior','timestamp','MISSING_BETWEEN_BOUNDS','Segment\x20reference\x20must\x20not\x20be\x20empty','segment','min','Sum','enum','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','Greater','exclude','literal','funnel_stage','Segment\x20name\x20is\x20required','Less','First','minute','EndWith','Regexp','any','column','second','realtime','custom','all','Operator\x20\x27','\x27\x20requires\x20a\x20value','1616208sZjnIe','\x27\x20requires\x20a\x20time\x20unit','Average','Equal','addIssue','2658116ALwUGA','unit','month','has','duration','object','value','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','number','week','And','LessEqual','union','Composite','3010lDOliS','9862443owfSRb','CountDistinct','type','1449387neytFZ','328652FzVaWm','11RXoyfY','Column','TimeRange\x20operator\x20requires\x20\x27from\x27','GreaterEqual','TimeRange','superRefine','lazy','Count','batch','StartWith','optional','1MRBQTb','Max','TimeRange\x20operator\x20requires\x20\x27duration\x27','operator','array','Value','1830ugSwmc','Contain','string','record','day'];a167_0x4f32=function(){return _0x4c80bb;};return a167_0x4f32();}const TemporalValueSchema=z[a167_0x32bf94(0x140)]([z[a167_0x32bf94(0x139)]({'timestamp':z['string']()}),z[a167_0x32bf94(0x139)]({'last':z[a167_0x32bf94(0x140)]([z['number'](),z[a167_0x32bf94(0x15c)](z[a167_0x32bf94(0x15b)](),z[a167_0x32bf94(0x13c)]())]),'unit':z[a167_0x32bf94(0x15b)]()})]),OperatorValueSchema=z[a167_0x32bf94(0x140)]([z[a167_0x32bf94(0x15b)](),z[a167_0x32bf94(0x13c)](),z['boolean'](),TemporalValueSchema,z[a167_0x32bf94(0x157)](z['union']([z[a167_0x32bf94(0x15b)](),z[a167_0x32bf94(0x13c)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set([a167_0x32bf94(0x132),a167_0x32bf94(0x171),a167_0x32bf94(0x14b),a167_0x32bf94(0x176),a167_0x32bf94(0x13f),'In',a167_0x32bf94(0x15a),'StartWith',a167_0x32bf94(0x125),'Regexp','TimeWithinPast','TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a167_0x32bf94(0x165)]);export const OperatorDefSchema=z[a167_0x32bf94(0x139)]({'type':OperatorTypeSchema,'not':z[a167_0x32bf94(0x164)]()[a167_0x32bf94(0x152)](),'value':OperatorValueSchema['optional'](),'min':z['union']([z['number'](),z['string'](),TemporalValueSchema])[a167_0x32bf94(0x152)](),'max':z[a167_0x32bf94(0x140)]([z[a167_0x32bf94(0x13c)](),z[a167_0x32bf94(0x15b)](),TemporalValueSchema])[a167_0x32bf94(0x152)](),'unit':TimeUnitSchema[a167_0x32bf94(0x152)](),'duration':z[a167_0x32bf94(0x139)]({'day':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)](),'week':z[a167_0x32bf94(0x13c)]()['optional'](),'month':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)](),'year':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)](),'hour':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)](),'minute':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)](),'second':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)]()})['optional'](),'from':z['object']({'last':z['union']([z[a167_0x32bf94(0x13c)](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z['boolean']()[a167_0x32bf94(0x152)]()})['superRefine']((_0x18b983,_0x5245e4)=>{const _0x286989=a167_0x32bf94;OPERATORS_REQUIRING_VALUE[_0x286989(0x137)](_0x18b983[_0x286989(0x145)])&&(_0x18b983[_0x286989(0x13a)]===undefined||_0x18b983[_0x286989(0x13a)]===null)&&_0x5245e4[_0x286989(0x133)]({'code':_0x286989(0x12b),'message':_0x286989(0x12d)+_0x18b983['type']+_0x286989(0x12e),'path':[_0x286989(0x13a)]}),_0x18b983[_0x286989(0x145)]===_0x286989(0x167)&&_0x18b983[_0x286989(0x16d)]===undefined&&_0x18b983['max']===undefined&&_0x5245e4[_0x286989(0x133)]({'code':_0x286989(0x12b),'message':_0x286989(0x170),'params':{'validationCode':_0x286989(0x16a)}}),OPERATORS_REQUIRING_UNIT[_0x286989(0x137)](_0x18b983[_0x286989(0x145)])&&_0x18b983['value']!==undefined&&!_0x18b983[_0x286989(0x135)]&&_0x5245e4['addIssue']({'code':'custom','message':_0x286989(0x12d)+_0x18b983[_0x286989(0x145)]+_0x286989(0x130),'path':['unit'],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x18b983[_0x286989(0x145)]===_0x286989(0x14c)&&(!_0x18b983[_0x286989(0x138)]&&_0x5245e4['addIssue']({'code':_0x286989(0x12b),'message':_0x286989(0x155),'path':['duration']}),!_0x18b983[_0x286989(0x166)]&&_0x5245e4[_0x286989(0x133)]({'code':_0x286989(0x12b),'message':_0x286989(0x14a),'path':['from']}));});export const ArrayMatchingSchema=z[a167_0x32bf94(0x140)]([z[a167_0x32bf94(0x173)](a167_0x32bf94(0x127)),z[a167_0x32bf94(0x173)](a167_0x32bf94(0x12c)),z[a167_0x32bf94(0x139)]({'atLeast':z['number']()}),z[a167_0x32bf94(0x139)]({'atMost':z['number']()}),z[a167_0x32bf94(0x139)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a167_0x32bf94(0x145),[z[a167_0x32bf94(0x139)]({'type':z[a167_0x32bf94(0x16f)]([a167_0x32bf94(0x16e),a167_0x32bf94(0x163),a167_0x32bf94(0x154),'Average']),'column':z[a167_0x32bf94(0x15b)](),'groupingColumns':z[a167_0x32bf94(0x157)](z[a167_0x32bf94(0x15b)]())[a167_0x32bf94(0x152)]()}),z[a167_0x32bf94(0x139)]({'type':z[a167_0x32bf94(0x173)](a167_0x32bf94(0x14f)),'groupingColumns':z[a167_0x32bf94(0x157)](z[a167_0x32bf94(0x15b)]())[a167_0x32bf94(0x152)]()}),z[a167_0x32bf94(0x139)]({'type':z[a167_0x32bf94(0x173)](a167_0x32bf94(0x144)),'columns':z['array'](z[a167_0x32bf94(0x15b)]())}),z['object']({'type':z[a167_0x32bf94(0x16f)](['First',a167_0x32bf94(0x15e)]),'column':z[a167_0x32bf94(0x15b)](),'orderColumn':z['string'](),'groupingColumns':z[a167_0x32bf94(0x157)](z[a167_0x32bf94(0x15b)]())[a167_0x32bf94(0x152)]()})]);export const TimeWindowDefSchema=z[a167_0x32bf94(0x139)]({'duration':z[a167_0x32bf94(0x13c)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a167_0x32bf94(0x162),a167_0x32bf94(0x165),a167_0x32bf94(0x14c)]);export const FilterColumnConditionDefSchema=z[a167_0x32bf94(0x139)]({'type':z[a167_0x32bf94(0x173)]('Column'),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x32bf94(0x152)]()})[a167_0x32bf94(0x14d)]((_0x450213,_0x3b1025)=>{const _0x167c34=a167_0x32bf94,_0x33e23a=_0x450213[_0x167c34(0x156)][_0x167c34(0x145)];_0x450213[_0x167c34(0x128)]===_0x167c34(0x169)?!TIMESTAMP_OPERATORS[_0x167c34(0x137)](_0x33e23a)&&_0x3b1025[_0x167c34(0x133)]({'code':_0x167c34(0x12b),'message':_0x167c34(0x13b)+_0x33e23a+'\x27)','path':[_0x167c34(0x156),_0x167c34(0x145)]}):TIMESTAMP_OPERATORS[_0x167c34(0x137)](_0x33e23a)&&_0x3b1025[_0x167c34(0x133)]({'code':'custom','message':_0x167c34(0x12d)+_0x33e23a+'\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','path':[_0x167c34(0x156),_0x167c34(0x145)]});});export const FilterRuleDefSchema=z[a167_0x32bf94(0x139)]({'type':z[a167_0x32bf94(0x173)]('And'),'conditions':z[a167_0x32bf94(0x157)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a167_0x32bf94(0x139)]({'type':z['literal'](a167_0x32bf94(0x158)),'attribute':z[a167_0x32bf94(0x15b)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x32bf94(0x152)](),'exclude':z['boolean']()[a167_0x32bf94(0x152)](),'aggregation':AggregationDefSchema[a167_0x32bf94(0x152)](),'source':z['string']()[a167_0x32bf94(0x152)](),'filter':FilterRuleDefSchema[a167_0x32bf94(0x152)](),'limit':z[a167_0x32bf94(0x13c)]()[a167_0x32bf94(0x152)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a167_0x32bf94(0x173)](a167_0x32bf94(0x168)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a167_0x32bf94(0x152)](),'exclude':z[a167_0x32bf94(0x164)]()[a167_0x32bf94(0x152)](),'aggregation':AggregationDefSchema[a167_0x32bf94(0x152)](),'source':z[a167_0x32bf94(0x15b)]()[a167_0x32bf94(0x152)](),'filter':FilterRuleDefSchema[a167_0x32bf94(0x152)](),'timeWindow':TimeWindowDefSchema[a167_0x32bf94(0x152)](),'limit':z[a167_0x32bf94(0x13c)]()['optional']()}));export const ColumnConditionDefSchema=z[a167_0x32bf94(0x139)]({'type':z['literal'](a167_0x32bf94(0x149)),'column':z['string'](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a167_0x32bf94(0x16f)](['And','Or',a167_0x32bf94(0x141)]),'conditions':z[a167_0x32bf94(0x157)](ConditionDefSchema),'description':z[a167_0x32bf94(0x15b)]()['optional'](),'expr':z[a167_0x32bf94(0x15b)]()[a167_0x32bf94(0x152)]()}));export const SegmentRefConditionDefSchema=z[a167_0x32bf94(0x139)]({'type':z[a167_0x32bf94(0x16f)](['include',a167_0x32bf94(0x172)]),'segment':z['string']()[a167_0x32bf94(0x16d)](0x1,a167_0x32bf94(0x16b))});export const ConditionDefSchema=z[a167_0x32bf94(0x14e)](()=>z[a167_0x32bf94(0x140)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a167_0x32bf94(0x14e)](()=>z[a167_0x32bf94(0x139)]({'type':z['enum']([a167_0x32bf94(0x13e),'Or',a167_0x32bf94(0x141)]),'conditions':z[a167_0x32bf94(0x157)](ConditionDefSchema),'description':z[a167_0x32bf94(0x15b)]()[a167_0x32bf94(0x152)](),'expr':z[a167_0x32bf94(0x15b)]()[a167_0x32bf94(0x152)]()}));export const SegmentDefSchema=z[a167_0x32bf94(0x139)]({'type':z['literal'](a167_0x32bf94(0x16c))[a167_0x32bf94(0x152)](),'name':z[a167_0x32bf94(0x15b)]()[a167_0x32bf94(0x16d)](0x1,a167_0x32bf94(0x175)),'description':z[a167_0x32bf94(0x15b)]()[a167_0x32bf94(0x152)](),'folder':z[a167_0x32bf94(0x15b)]()['optional'](),'rule':RuleDefSchema[a167_0x32bf94(0x152)](),'kind':z['enum']([a167_0x32bf94(0x150),a167_0x32bf94(0x12a),a167_0x32bf94(0x174)])[a167_0x32bf94(0x152)](),'visible':z[a167_0x32bf94(0x164)]()['optional'](),'activations':z[a167_0x32bf94(0x157)](z[a167_0x32bf94(0x127)]())[a167_0x32bf94(0x152)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a168_0x4f5ac6=a168_0x3ac1;(function(_0x3e6ae3,_0x1f2004){const _0x399f8c=a168_0x3ac1,_0x28a523=_0x3e6ae3();while(!![]){try{const _0x262d5b=-parseInt(_0x399f8c(0x138))/0x1*(parseInt(_0x399f8c(0x14c))/0x2)+-parseInt(_0x399f8c(0x13d))/0x3+parseInt(_0x399f8c(0x134))/0x4+-parseInt(_0x399f8c(0x136))/0x5*(-parseInt(_0x399f8c(0x144))/0x6)+-parseInt(_0x399f8c(0x139))/0x7*(parseInt(_0x399f8c(0x14e))/0x8)+-parseInt(_0x399f8c(0x137))/0x9+-parseInt(_0x399f8c(0x147))/0xa*(parseInt(_0x399f8c(0x14f))/0xb);if(_0x262d5b===_0x1f2004)break;else _0x28a523['push'](_0x28a523['shift']());}catch(_0x764673){_0x28a523['push'](_0x28a523['shift']());}}}(a168_0x30c7,0x57aab));import{readFileSync}from'fs';import*as a168_0x2617d9 from'path';import*as a168_0x1bb857 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';function a168_0x30c7(){const _0x3f409d=['result','segment','10EBUjdz','push','basename','journey','campaign','2ELSjWU','error','498872kEDbtL','3704437uUwKfw','message','object','not\x20a\x20','warnings','filterType','relative','2067996cBEYgB','has','3464115SMccHh','464994lYJWSV','122777vdeYog','21xYmIiu','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','email','template','457356lAWYco','utf-8','type','skipped','toJSON','YAML_PARSE_ERROR','map','6hMBZGE'];a168_0x30c7=function(){return _0x3f409d;};return a168_0x30c7();}const VALID_CAMPAIGN_TYPES=new Set([a168_0x4f5ac6(0x13b),a168_0x4f5ac6(0x148)]);export function isJourneyDef(_0x1a478d){const _0x3f5ec5=a168_0x4f5ac6;return typeof _0x1a478d===_0x3f5ec5(0x151)&&_0x1a478d!==null&&_0x3f5ec5(0x13f)in _0x1a478d&&_0x1a478d['type']==='journey';}export function isCampaignDef(_0x30fd3a){const _0x1f1dc5=a168_0x4f5ac6;if(typeof _0x30fd3a!==_0x1f1dc5(0x151)||_0x30fd3a===null)return![];const _0x2fc623=_0x30fd3a,_0x11c010=VALID_CAMPAIGN_TYPES[_0x1f1dc5(0x135)](_0x2fc623['campaign_type']);if(_0x2fc623['type']===_0x1f1dc5(0x14b)&&_0x11c010)return!![];if(_0x11c010&&!_0x2fc623[_0x1f1dc5(0x13f)])return!![];return![];}function a168_0x3ac1(_0x4cbdc0,_0x7770b2){_0x4cbdc0=_0x4cbdc0-0x134;const _0x30c73f=a168_0x30c7();let _0x3ac1b2=_0x30c73f[_0x4cbdc0];return _0x3ac1b2;}export function isTemplateDef(_0x1f220d){const _0x3f297a=a168_0x4f5ac6;return typeof _0x1f220d==='object'&&_0x1f220d!==null&&_0x3f297a(0x13f)in _0x1f220d&&_0x1f220d[_0x3f297a(0x13f)]===_0x3f297a(0x13c);}export function isValidationResult(_0x4721a4){const _0x3d1b42=a168_0x4f5ac6;return!(_0x3d1b42(0x140)in _0x4721a4);}export function createParseErrorResult(_0x47d868,_0x2f3c3a,_0xbc86a1,_0xa615f5,_0xcd03dd=a168_0x4f5ac6(0x146)){const _0x10ac3e=a168_0x4f5ac6;return{'filePath':_0x47d868,'relativePath':_0x2f3c3a,'source':_0xbc86a1,'result':{'valid':![],'errors':[{'level':_0x10ac3e(0x14d),'path':'','code':_0x10ac3e(0x142),'message':_0xa615f5}],'warnings':[]},'fileType':_0xcd03dd};}export function validateYamlFile(_0x2b11b5,_0x443c20,_0x371334={}){const _0x384519=a168_0x4f5ac6,_0x39a073=a168_0x2617d9[_0x384519(0x155)](_0x443c20,_0x2b11b5)||a168_0x2617d9[_0x384519(0x149)](_0x2b11b5);try{const _0x126504=readFileSync(_0x2b11b5,_0x384519(0x13e)),_0x52400b=a168_0x1bb857['parseDocument'](_0x126504),_0x14f62a=_0x52400b[_0x384519(0x141)]();if(!_0x14f62a)return createParseErrorResult(_0x2b11b5,_0x39a073,_0x126504,_0x384519(0x13a));let _0x4ba1b4;if(isJourneyDef(_0x14f62a))_0x4ba1b4=_0x384519(0x14a);else{if(isCampaignDef(_0x14f62a))_0x4ba1b4='campaign';else isTemplateDef(_0x14f62a)?_0x4ba1b4='template':_0x4ba1b4=_0x384519(0x146);}if(_0x371334[_0x384519(0x154)]&&_0x4ba1b4!==_0x371334[_0x384519(0x154)])return{'filePath':_0x2b11b5,'relativePath':_0x39a073,'skipped':!![],'reason':_0x384519(0x152)+_0x371334[_0x384519(0x154)]};const _0x2b793b={'source':_0x126504,'document':_0x52400b};let _0xa5a9e4;if(_0x4ba1b4===_0x384519(0x14a))_0xa5a9e4=validateJourneyDef(_0x14f62a,_0x2b793b);else{if(_0x4ba1b4===_0x384519(0x14b))_0xa5a9e4=validateCampaignDef(_0x14f62a,_0x2b793b);else _0x4ba1b4===_0x384519(0x13c)?_0xa5a9e4=validateTemplateDef(_0x14f62a,_0x2b793b):_0xa5a9e4=validateSegmentDef(_0x14f62a,_0x2b793b);}return{'filePath':_0x2b11b5,'relativePath':_0x39a073,'source':_0x126504,'result':_0xa5a9e4,'fileType':_0x4ba1b4};}catch(_0x31e70d){const _0x4d607a=_0x31e70d instanceof Error?_0x31e70d[_0x384519(0x150)]:String(_0x31e70d);return createParseErrorResult(_0x2b11b5,_0x39a073,'','YAML\x20parse\x20error:\x20'+_0x4d607a);}}export function validateYamlFiles(_0x4d7858,_0x3d19f8,_0x159397={}){const _0x32fba9=a168_0x4f5ac6;return _0x4d7858[_0x32fba9(0x143)](_0x28c51b=>validateYamlFile(_0x28c51b,_0x3d19f8,_0x159397));}export function calculateSummary(_0x3952cb){const _0x315fc6=a168_0x4f5ac6;let _0x3fb830=0x0,_0x52a879=0x0,_0x4f2129=0x0,_0x4e4959=0x0;for(const _0x5d3524 of _0x3952cb){if(!isValidationResult(_0x5d3524)){_0x4e4959++;continue;}_0x5d3524[_0x315fc6(0x145)]['valid']?_0x3fb830++:_0x52a879++,_0x4f2129+=_0x5d3524[_0x315fc6(0x145)][_0x315fc6(0x153)]['length'];}return{'validCount':_0x3fb830,'invalidCount':_0x52a879,'warningCount':_0x4f2129,'skippedCount':_0x4e4959,'hasErrors':_0x52a879>0x0};}
1
+ const a168_0x3e7165=a168_0x504a;(function(_0xa0989,_0x35dc94){const _0x3f49cf=a168_0x504a,_0x5eaab3=_0xa0989();while(!![]){try{const _0x22bc5f=parseInt(_0x3f49cf(0x197))/0x1*(parseInt(_0x3f49cf(0x198))/0x2)+-parseInt(_0x3f49cf(0x193))/0x3+parseInt(_0x3f49cf(0x18d))/0x4+-parseInt(_0x3f49cf(0x1a7))/0x5+parseInt(_0x3f49cf(0x19a))/0x6*(parseInt(_0x3f49cf(0x19b))/0x7)+parseInt(_0x3f49cf(0x19e))/0x8*(-parseInt(_0x3f49cf(0x199))/0x9)+-parseInt(_0x3f49cf(0x19f))/0xa*(parseInt(_0x3f49cf(0x1a1))/0xb);if(_0x22bc5f===_0x35dc94)break;else _0x5eaab3['push'](_0x5eaab3['shift']());}catch(_0x188dba){_0x5eaab3['push'](_0x5eaab3['shift']());}}}(a168_0x3cd2,0xe3e58));import{readFileSync}from'fs';import*as a168_0xfa576c from'path';function a168_0x3cd2(){const _0x5e2c21=['journey','not\x20a\x20','template','2763505ewxQxA','message','error','filterType','valid','utf-8','YAML\x20parse\x20error:\x20','length','5795372zzbOtU','map','push','campaign','warnings','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','94554yqgrdM','object','has','campaign_type','43RcdNFa','7502sOnjby','441558YXWlFy','78eBKSOw','989310WhfaqU','parseDocument','skipped','120vxMKIB','11938130kOBhMv','result','11jCBtbn','toJSON','type'];a168_0x3cd2=function(){return _0x5e2c21;};return a168_0x3cd2();}import*as a168_0x4b49a8 from'yaml';function a168_0x504a(_0x4638cd,_0x471015){_0x4638cd=_0x4638cd-0x18b;const _0x3cd2ba=a168_0x3cd2();let _0x504a37=_0x3cd2ba[_0x4638cd];return _0x504a37;}import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a168_0x3e7165(0x18f)]);export function isJourneyDef(_0x335e63){const _0x3db138=a168_0x3e7165;return typeof _0x335e63===_0x3db138(0x194)&&_0x335e63!==null&&_0x3db138(0x1a3)in _0x335e63&&_0x335e63[_0x3db138(0x1a3)]==='journey';}export function isCampaignDef(_0x24b026){const _0x239e44=a168_0x3e7165;if(typeof _0x24b026!==_0x239e44(0x194)||_0x24b026===null)return![];const _0x5c57af=_0x24b026,_0x1ae96d=VALID_CAMPAIGN_TYPES[_0x239e44(0x195)](_0x5c57af[_0x239e44(0x196)]);if(_0x5c57af[_0x239e44(0x1a3)]===_0x239e44(0x190)&&_0x1ae96d)return!![];if(_0x1ae96d&&!_0x5c57af['type'])return!![];return![];}export function isTemplateDef(_0x59ac7a){const _0x15300c=a168_0x3e7165;return typeof _0x59ac7a===_0x15300c(0x194)&&_0x59ac7a!==null&&_0x15300c(0x1a3)in _0x59ac7a&&_0x59ac7a[_0x15300c(0x1a3)]==='template';}export function isValidationResult(_0x41f069){const _0x4413db=a168_0x3e7165;return!(_0x4413db(0x19d)in _0x41f069);}export function createParseErrorResult(_0x418772,_0x376d92,_0x55718f,_0xf253e3,_0x1e4391='segment'){const _0x30e975=a168_0x3e7165;return{'filePath':_0x418772,'relativePath':_0x376d92,'source':_0x55718f,'result':{'valid':![],'errors':[{'level':_0x30e975(0x1a9),'path':'','code':'YAML_PARSE_ERROR','message':_0xf253e3}],'warnings':[]},'fileType':_0x1e4391};}export function validateYamlFile(_0x16791c,_0xbe1c38,_0xd8b1b={}){const _0x2f6245=a168_0x3e7165,_0x3a10d5=a168_0xfa576c['relative'](_0xbe1c38,_0x16791c)||a168_0xfa576c['basename'](_0x16791c);try{const _0x56f09e=readFileSync(_0x16791c,_0x2f6245(0x1ac)),_0x2c0cc2=a168_0x4b49a8[_0x2f6245(0x19c)](_0x56f09e),_0x10411b=_0x2c0cc2[_0x2f6245(0x1a2)]();if(!_0x10411b)return createParseErrorResult(_0x16791c,_0x3a10d5,_0x56f09e,_0x2f6245(0x192));let _0x13de33;if(isJourneyDef(_0x10411b))_0x13de33=_0x2f6245(0x1a4);else{if(isCampaignDef(_0x10411b))_0x13de33=_0x2f6245(0x190);else isTemplateDef(_0x10411b)?_0x13de33='template':_0x13de33='segment';}if(_0xd8b1b[_0x2f6245(0x1aa)]&&_0x13de33!==_0xd8b1b[_0x2f6245(0x1aa)])return{'filePath':_0x16791c,'relativePath':_0x3a10d5,'skipped':!![],'reason':_0x2f6245(0x1a5)+_0xd8b1b[_0x2f6245(0x1aa)]};const _0x51aa13={'source':_0x56f09e,'document':_0x2c0cc2};let _0x4ebb26;if(_0x13de33===_0x2f6245(0x1a4))_0x4ebb26=validateJourneyDef(_0x10411b,_0x51aa13);else{if(_0x13de33==='campaign')_0x4ebb26=validateCampaignDef(_0x10411b,_0x51aa13);else _0x13de33===_0x2f6245(0x1a6)?_0x4ebb26=validateTemplateDef(_0x10411b,_0x51aa13):_0x4ebb26=validateSegmentDef(_0x10411b,_0x51aa13);}return{'filePath':_0x16791c,'relativePath':_0x3a10d5,'source':_0x56f09e,'result':_0x4ebb26,'fileType':_0x13de33};}catch(_0x12be7d){const _0x2dec0d=_0x12be7d instanceof Error?_0x12be7d[_0x2f6245(0x1a8)]:String(_0x12be7d);return createParseErrorResult(_0x16791c,_0x3a10d5,'',_0x2f6245(0x18b)+_0x2dec0d);}}export function validateYamlFiles(_0x59dd8e,_0x1c5316,_0x41436d={}){const _0x38f214=a168_0x3e7165;return _0x59dd8e[_0x38f214(0x18e)](_0x26e42b=>validateYamlFile(_0x26e42b,_0x1c5316,_0x41436d));}export function calculateSummary(_0x50933b){const _0x449dde=a168_0x3e7165;let _0x2cc049=0x0,_0x17b0a3=0x0,_0x4c16f1=0x0,_0x44e20e=0x0;for(const _0x2265f2 of _0x50933b){if(!isValidationResult(_0x2265f2)){_0x44e20e++;continue;}_0x2265f2['result'][_0x449dde(0x1ab)]?_0x2cc049++:_0x17b0a3++,_0x4c16f1+=_0x2265f2[_0x449dde(0x1a0)][_0x449dde(0x191)][_0x449dde(0x18c)];}return{'validCount':_0x2cc049,'invalidCount':_0x17b0a3,'warningCount':_0x4c16f1,'skippedCount':_0x44e20e,'hasErrors':_0x17b0a3>0x0};}