@treasuredata/tdx 2026.4.14 → 2026.4.16

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 (221) hide show
  1. package/README.md +1 -1
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/commands/activations.js +1 -1
  7. package/dist/commands/agent-command.js +1 -1
  8. package/dist/commands/agent-test-command.js +1 -1
  9. package/dist/commands/api-command.js +1 -1
  10. package/dist/commands/auth-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/tools/work-create-item.js +1 -1
  79. package/dist/mcp/utils.js +1 -1
  80. package/dist/proxy/claude-usage-tracker.js +1 -1
  81. package/dist/proxy/passthrough-server.js +1 -1
  82. package/dist/proxy/sse-usage-parser.js +1 -1
  83. package/dist/sdk/agent/agent-config.js +1 -1
  84. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  85. package/dist/sdk/agent/agent-yaml.js +1 -1
  86. package/dist/sdk/agent/test/evaluator.js +1 -1
  87. package/dist/sdk/agent/test/executor.js +1 -1
  88. package/dist/sdk/agent/test/index.js +1 -1
  89. package/dist/sdk/agent/test/output.js +1 -1
  90. package/dist/sdk/agent/test/parser.js +1 -1
  91. package/dist/sdk/agent/tool-target-registry.js +1 -1
  92. package/dist/sdk/api.js +1 -1
  93. package/dist/sdk/cas/cas-api-client.js +1 -1
  94. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  95. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  96. package/dist/sdk/cas/index.js +1 -1
  97. package/dist/sdk/cas/pull-workflow.js +1 -1
  98. package/dist/sdk/cas/push-workflow.js +1 -1
  99. package/dist/sdk/client/cdp-api-client.js +1 -1
  100. package/dist/sdk/client/delivery-api-client.js +1 -1
  101. package/dist/sdk/client/endpoints.js +1 -1
  102. package/dist/sdk/client/engage-api-client.js +1 -1
  103. package/dist/sdk/client/http-client.js +1 -1
  104. package/dist/sdk/client/llm-api-client.js +1 -1
  105. package/dist/sdk/client/oauth-refresh.js +1 -1
  106. package/dist/sdk/client/rate-limiter.js +1 -1
  107. package/dist/sdk/client/td-api-client.js +1 -1
  108. package/dist/sdk/client/trino-api-client.js +1 -1
  109. package/dist/sdk/client/workflow-client.js +1 -1
  110. package/dist/sdk/connection-validator.js +1 -1
  111. package/dist/sdk/connection.js +1 -1
  112. package/dist/sdk/delivery.js +1 -1
  113. package/dist/sdk/engage/campaign-pull.js +1 -1
  114. package/dist/sdk/engage/campaign-push.js +1 -1
  115. package/dist/sdk/engage/campaign-validator.js +1 -1
  116. package/dist/sdk/engage/campaign-yaml.js +1 -1
  117. package/dist/sdk/engage/template-pull.js +1 -1
  118. package/dist/sdk/engage/template-push.js +1 -1
  119. package/dist/sdk/engage/template-validator.js +1 -1
  120. package/dist/sdk/engage/template-yaml.js +1 -1
  121. package/dist/sdk/engage/types/campaign-def.js +1 -1
  122. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  123. package/dist/sdk/engage/types/template-schema.js +1 -1
  124. package/dist/sdk/engage.js +1 -1
  125. package/dist/sdk/errors.js +1 -1
  126. package/dist/sdk/index.js +1 -1
  127. package/dist/sdk/io/index.js +1 -1
  128. package/dist/sdk/io/node-filesystem.js +1 -1
  129. package/dist/sdk/job.js +1 -1
  130. package/dist/sdk/journey.js +1 -1
  131. package/dist/sdk/llm/chat-cache.js +1 -1
  132. package/dist/sdk/llm/index.js +1 -1
  133. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  134. package/dist/sdk/llm/model-factors.js +1 -1
  135. package/dist/sdk/personalization.js +1 -1
  136. package/dist/sdk/policy.js +1 -1
  137. package/dist/sdk/query/index.js +1 -1
  138. package/dist/sdk/query/sql-parser.js +1 -1
  139. package/dist/sdk/realtime.js +1 -1
  140. package/dist/sdk/schedule.js +1 -1
  141. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  142. package/dist/sdk/segment/fields-display.js +1 -1
  143. package/dist/sdk/segment/file-discovery.js +1 -1
  144. package/dist/sdk/segment/journey-utils.js +1 -1
  145. package/dist/sdk/segment/journey-validator.js +1 -1
  146. package/dist/sdk/segment/journey-yaml.js +1 -1
  147. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  148. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  149. package/dist/sdk/segment/pull-workflow.js +1 -1
  150. package/dist/sdk/segment/push-recovery.js +1 -1
  151. package/dist/sdk/segment/push-workflow.js +1 -1
  152. package/dist/sdk/segment/resolution-context.js +1 -1
  153. package/dist/sdk/segment/segment-path-parser.js +1 -1
  154. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  155. package/dist/sdk/segment/segment-validator.js +1 -1
  156. package/dist/sdk/segment/target-resolution.js +1 -1
  157. package/dist/sdk/segment/tdx-config.js +1 -1
  158. package/dist/sdk/segment/types/activation-schema.js +1 -1
  159. package/dist/sdk/segment/types/journey-def.js +1 -1
  160. package/dist/sdk/segment/types/journey-schema.js +1 -1
  161. package/dist/sdk/segment/types/segment-def.js +1 -1
  162. package/dist/sdk/segment/types/segment-schema.js +1 -1
  163. package/dist/sdk/segment/validate-files.js +1 -1
  164. package/dist/sdk/segment/yaml-validator.js +1 -1
  165. package/dist/sdk/segment.js +1 -1
  166. package/dist/sdk/types/index.js +1 -1
  167. package/dist/sdk/types/progress.js +1 -1
  168. package/dist/sdk/types/workspace.js +1 -1
  169. package/dist/sdk/user.js +1 -1
  170. package/dist/sdk/util/format-detector.js +1 -1
  171. package/dist/sdk/util/formatters.js +1 -1
  172. package/dist/sdk/util/index.js +1 -1
  173. package/dist/sdk/util/paginate.js +1 -1
  174. package/dist/sdk/util/tree-formatter.js +1 -1
  175. package/dist/sdk/workflow/archive-validation.js +1 -1
  176. package/dist/sdk/workflow/clone-workflow.js +1 -1
  177. package/dist/sdk/workflow/index.js +1 -1
  178. package/dist/sdk/workflow/pull-workflow.js +1 -1
  179. package/dist/sdk/workflow/push-workflow.js +1 -1
  180. package/dist/sdk/workflow/tdx-config.js +1 -1
  181. package/dist/sdk/workflow/workflow-utils.js +1 -1
  182. package/dist/sdk/workspace/access-tracker.js +1 -1
  183. package/dist/sdk/workspace/frontmatter.js +1 -1
  184. package/dist/sdk/workspace/git.js +1 -1
  185. package/dist/sdk/workspace/index.js +1 -1
  186. package/dist/sdk/workspace/templates.js +1 -1
  187. package/dist/sdk/workspace/weekly.js +1 -1
  188. package/dist/sdk/workspace/wikilinks.js +1 -1
  189. package/dist/test-utils/command-runner.js +1 -1
  190. package/dist/test-utils/factories.js +1 -1
  191. package/dist/test-utils/fixtures.js +1 -1
  192. package/dist/test-utils/http-mock.js +1 -1
  193. package/dist/test-utils/index.js +1 -1
  194. package/dist/utils/async.js +1 -1
  195. package/dist/utils/colors.js +1 -1
  196. package/dist/utils/diff.js +1 -1
  197. package/dist/utils/file-permissions.js +1 -1
  198. package/dist/utils/file-reader.js +1 -1
  199. package/dist/utils/github-releases.js +1 -1
  200. package/dist/utils/global-cache.js +1 -1
  201. package/dist/utils/json-loader.js +1 -1
  202. package/dist/utils/local-cache.js +1 -1
  203. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  204. package/dist/utils/logger/formatters/index.js +1 -1
  205. package/dist/utils/logger/handlers/console-handler.js +1 -1
  206. package/dist/utils/logger/handlers/file-handler.js +1 -1
  207. package/dist/utils/logger/handlers/index.js +1 -1
  208. package/dist/utils/logger/handlers/null-handler.js +1 -1
  209. package/dist/utils/logger/index.js +1 -1
  210. package/dist/utils/logger/logger.js +1 -1
  211. package/dist/utils/logger/types.js +1 -1
  212. package/dist/utils/option-validation.js +1 -1
  213. package/dist/utils/process.js +1 -1
  214. package/dist/utils/prompt.js +1 -1
  215. package/dist/utils/spinner.js +1 -1
  216. package/dist/utils/sse-parser.js +1 -1
  217. package/dist/utils/string-utils.js +1 -1
  218. package/dist/utils/table-ref-parser.js +1 -1
  219. package/dist/utils/tdx-logger.js +1 -1
  220. package/dist/utils/version-check.js +1 -1
  221. package/package.json +30 -12
@@ -1 +1 @@
1
- (function(_0x4a1a0c,_0x3d20f3){const _0x5d3c88=a156_0x3f0a,_0x21e417=_0x4a1a0c();while(!![]){try{const _0x1cea26=-parseInt(_0x5d3c88(0xd4))/0x1+-parseInt(_0x5d3c88(0x114))/0x2+-parseInt(_0x5d3c88(0xff))/0x3+-parseInt(_0x5d3c88(0xdc))/0x4*(parseInt(_0x5d3c88(0x111))/0x5)+parseInt(_0x5d3c88(0xe1))/0x6+-parseInt(_0x5d3c88(0xe4))/0x7+parseInt(_0x5d3c88(0x110))/0x8;if(_0x1cea26===_0x3d20f3)break;else _0x21e417['push'](_0x21e417['shift']());}catch(_0x583262){_0x21e417['push'](_0x21e417['shift']());}}}(a156_0x10ae,0x6bfe9));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0xec8daf,_0x46c0a6={},_0x5baf1c={}){const _0x3965cd=a156_0x3f0a;if(_0x5baf1c[_0x3965cd(0xf6)])return runSemanticChecks(_0xec8daf,_0x46c0a6);const _0x4afa8b=SegmentDefSchema[_0x3965cd(0x101)](_0xec8daf);if(_0x4afa8b[_0x3965cd(0xec)])return runSemanticChecks(_0x4afa8b[_0x3965cd(0xf0)],_0x46c0a6);return zodErrorsToValidationResult(_0x4afa8b[_0x3965cd(0xe3)],_0x46c0a6);}export function validateRuleDef(_0x8d35c1,_0x33ff87,_0x2c3287){const _0x3b83dd=a156_0x3f0a;if(!_0x8d35c1)return[];const _0x1ab77e=RuleDefSchema[_0x3b83dd(0x101)](_0x8d35c1);if(_0x1ab77e[_0x3b83dd(0xec)])return checkRule(_0x1ab77e[_0x3b83dd(0xf0)],_0x33ff87,_0x2c3287);const _0x3839bf=flattenZodIssues(_0x1ab77e[_0x3b83dd(0xe3)][_0x3b83dd(0xe8)]);return _0x3839bf[_0x3b83dd(0xdf)](_0x5822d6=>{const _0x5b9b81=_0x3b83dd,_0xa1cd63=formatZodPath(_0x5822d6[_0x5b9b81(0xee)]),_0x327578=_0xa1cd63?_0x33ff87+'.'+_0xa1cd63:_0x33ff87,_0x305c33=mapZodIssueToCode(_0x5822d6,_0xa1cd63),_0x3c50e1=getLocationFromPath(_0x2c3287[_0x5b9b81(0xe7)],_0x2c3287[_0x5b9b81(0xe9)],pathToArray(_0x327578));return{'level':_0x5b9b81(0xe3),'path':_0x327578,'code':_0x305c33,'message':_0x5822d6['message'],..._0x3c50e1&&{'location':_0x3c50e1}};});}function zodErrorsToValidationResult(_0x4e4bb4,_0x10dad4){const _0x2b7b64=a156_0x3f0a,_0x41c36f=flattenZodIssues(_0x4e4bb4['issues']),_0x4e137c=_0x41c36f[_0x2b7b64(0xdf)](_0x2bde64=>{const _0x4e7a90=_0x2b7b64,_0x2f2ef5=formatZodPath(_0x2bde64[_0x4e7a90(0xee)]),_0x5773c4=mapZodIssueToCode(_0x2bde64,_0x2f2ef5),_0xb3e5b8=getLocationFromPath(_0x10dad4[_0x4e7a90(0xe7)],_0x10dad4[_0x4e7a90(0xe9)],_0x2bde64[_0x4e7a90(0xee)][_0x4e7a90(0xdf)](_0x2d5533=>typeof _0x2d5533===_0x4e7a90(0x102)?String(_0x2d5533):_0x2d5533));return{'level':_0x4e7a90(0xe3),'path':_0x2f2ef5,'code':_0x5773c4,'message':_0x2bde64['message'],..._0xb3e5b8&&{'location':_0xb3e5b8}};});return{'valid':![],'errors':_0x4e137c,'warnings':[]};}function mapZodIssueToCode(_0x3d08ab,_0x5045e4){const _0x431225=a156_0x3f0a,_0x57aa4a=_0x3d08ab[_0x431225(0xe0)]===_0x431225(0xd7)?_0x3d08ab[_0x431225(0xfe)]:undefined;if(_0x5045e4==='name')return'MISSING_NAME';if(_0x5045e4===_0x431225(0xe5)||_0x5045e4['endsWith'](_0x431225(0xf1))){if(_0x3d08ab[_0x431225(0xe0)]===_0x431225(0x10e)){if(_0x5045e4===_0x431225(0xe5)||_0x5045e4['match'](/\.conditions\[\d+\]\.type$/))return _0x431225(0x10b);}}if(_0x5045e4[_0x431225(0x113)](_0x431225(0x10c)))return'INVALID_OPERATOR_TYPE';if(_0x5045e4[_0x431225(0x113)]('.operator.value'))return _0x431225(0xd8);if(_0x57aa4a?.[_0x431225(0xde)]===_0x431225(0x100))return _0x431225(0x100);if(_0x57aa4a?.[_0x431225(0xde)]===_0x431225(0xf5))return _0x431225(0xf5);if(_0x5045e4[_0x431225(0x113)](_0x431225(0xd9))||_0x5045e4===_0x431225(0xef))return _0x431225(0xd6);if(_0x5045e4['includes'](_0x431225(0x112)))return'INVALID_ARRAY_MATCHING';if(_0x5045e4['endsWith']('.segment'))return _0x431225(0xda);return _0x431225(0x115);}function runSemanticChecks(_0x35bce9,_0x11e620){const _0x501b95=a156_0x3f0a,_0x4d4f3e=[];_0x35bce9[_0x501b95(0x103)]&&_0x4d4f3e[_0x501b95(0xed)](...checkRule(_0x35bce9[_0x501b95(0x103)],_0x501b95(0x103),_0x11e620));const _0x2e6f5d=_0x4d4f3e[_0x501b95(0xe6)](_0x569d93=>_0x569d93['level']==='error'),_0x4528bb=_0x4d4f3e[_0x501b95(0xe6)](_0x20a338=>_0x20a338[_0x501b95(0xf4)]===_0x501b95(0xeb));return{'valid':_0x2e6f5d[_0x501b95(0xf8)]===0x0,'errors':_0x2e6f5d,'warnings':_0x4528bb};}function checkRule(_0x3b2c20,_0x4a99c5,_0x53386d){const _0x3dc375=a156_0x3f0a,_0x40ecd4=[];if(_0x3b2c20[_0x3dc375(0xef)][_0x3dc375(0xf8)]===0x0)return _0x40ecd4[_0x3dc375(0xed)]({'level':_0x3dc375(0xe3),'path':_0x4a99c5+_0x3dc375(0xd9),'code':_0x3dc375(0x10a),'message':_0x3dc375(0xf9),'location':getLocationFromPath(_0x53386d[_0x3dc375(0xe7)],_0x53386d[_0x3dc375(0xe9)],pathToArray(_0x4a99c5+_0x3dc375(0xd9)))}),_0x40ecd4;return _0x40ecd4['push'](...checkConditions(_0x3b2c20[_0x3dc375(0xef)],_0x4a99c5,_0x53386d)),_0x40ecd4;}function checkConditions(_0x53e271,_0x1c8d49,_0xd11575){const _0x4d19cd=a156_0x3f0a,_0x14b32a=[];for(let _0xef3644=0x0;_0xef3644<_0x53e271[_0x4d19cd(0xf8)];_0xef3644++){const _0x505765=_0x53e271[_0xef3644],_0x3000d5=_0x1c8d49+_0x4d19cd(0x105)+_0xef3644+']';_0x14b32a['push'](...checkCondition(_0x505765,_0x3000d5,_0xd11575));}return _0x14b32a;}function checkCondition(_0xb2a687,_0x2c64d4,_0x27bb7b){const _0x5924b8=a156_0x3f0a,_0x34f4c5=[];if(_0xb2a687[_0x5924b8(0x104)]==='And'||_0xb2a687[_0x5924b8(0x104)]==='Or'){if(_0xb2a687['conditions'][_0x5924b8(0xf8)]===0x0)_0x34f4c5[_0x5924b8(0xed)]({'level':'error','path':_0x2c64d4+'.conditions','code':_0x5924b8(0x10a),'message':_0xb2a687[_0x5924b8(0x104)]+_0x5924b8(0x116),'location':getLocationFromPath(_0x27bb7b['document'],_0x27bb7b[_0x5924b8(0xe9)],pathToArray(_0x2c64d4+_0x5924b8(0xd9)))});else{const _0x1a0cca=_0xb2a687['description']!==undefined;!_0x1a0cca&&_0x34f4c5['push']({'level':_0x5924b8(0xeb),'path':_0x2c64d4,'code':_0x5924b8(0x106),'message':_0xb2a687[_0x5924b8(0x104)]+_0x5924b8(0xd5)+_0x5924b8(0xdb)+'conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','location':getLocationFromPath(_0x27bb7b[_0x5924b8(0xe7)],_0x27bb7b['source'],pathToArray(_0x2c64d4))}),_0x34f4c5[_0x5924b8(0xed)](...checkConditions(_0xb2a687['conditions'],_0x2c64d4,_0x27bb7b));}return _0x34f4c5;}if(_0xb2a687[_0x5924b8(0x104)]===_0x5924b8(0xf2)||_0xb2a687[_0x5924b8(0x104)]==='Behavior'){const _0x34c02c=_0xb2a687,_0x49f910=_0x34c02c[_0x5924b8(0xe9)],_0x118a23=_0x34c02c['aggregation'],_0xcb1dc2=_0x49f910||_0x118a23;(!_0x34c02c['attribute']||_0x34c02c[_0x5924b8(0xf7)]==='')&&(!_0xcb1dc2&&_0x34f4c5[_0x5924b8(0xed)]({'level':_0x5924b8(0xe3),'path':_0x2c64d4+'.attribute','code':_0x5924b8(0xea),'message':_0x5924b8(0x10f),'location':getLocationFromPath(_0x27bb7b[_0x5924b8(0xe7)],_0x27bb7b[_0x5924b8(0xe9)],pathToArray(_0x2c64d4+'.attribute'))}));_0x34c02c[_0x5924b8(0xe6)]&&_0x34f4c5[_0x5924b8(0xed)](...checkRule(_0x34c02c[_0x5924b8(0xe6)],_0x2c64d4+_0x5924b8(0xdd),_0x27bb7b));if(_0x34c02c[_0x5924b8(0xe9)]){const _0x2abd0e=_0x34c02c['attribute']&&_0x34c02c[_0x5924b8(0xf7)]!=='';_0x2abd0e&&!_0x34c02c[_0x5924b8(0xe6)]&&_0x34f4c5[_0x5924b8(0xed)]({'level':'error','path':_0x2c64d4+_0x5924b8(0x108),'code':_0x5924b8(0xfc),'message':_0x5924b8(0xfd)+_0x34c02c[_0x5924b8(0xe9)]+_0x5924b8(0xf3)+_0x34c02c[_0x5924b8(0xf7)]+'\x27\x20'+_0x5924b8(0xe2)+'the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20'+_0x5924b8(0xfa),'location':getLocationFromPath(_0x27bb7b[_0x5924b8(0xe7)],_0x27bb7b[_0x5924b8(0xe9)],pathToArray(_0x2c64d4+_0x5924b8(0x108)))}),_0x2abd0e&&_0x34c02c[_0x5924b8(0xe6)]&&_0x34f4c5['push']({'level':_0x5924b8(0xeb),'path':_0x2c64d4+'.attribute','code':_0x5924b8(0x107),'message':_0x5924b8(0xfb)+_0x34c02c['attribute']+'\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20'+_0x5924b8(0x10d),'location':getLocationFromPath(_0x27bb7b[_0x5924b8(0xe7)],_0x27bb7b[_0x5924b8(0xe9)],pathToArray(_0x2c64d4+_0x5924b8(0x109)))});}}return _0x34f4c5;}function a156_0x3f0a(_0x5d8bda,_0x4ff1fa){_0x5d8bda=_0x5d8bda-0xd4;const _0x10ae0f=a156_0x10ae();let _0x3f0a82=_0x10ae0f[_0x5d8bda];return _0x3f0a82;}function a156_0x10ae(){const _0x104a81=['data','.type','Value','\x27\x20with\x20attribute\x20\x27','level','MISSING_TIME_UNIT','skipSchema','attribute','length','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','Attribute\x20\x27','BEHAVIOR_SOURCE_MISSING_FILTER','Behavior\x20source\x20\x27','params','2170416bAZfPf','MISSING_BETWEEN_BOUNDS','safeParse','symbol','rule','type','.conditions[','NESTED_CONDITION_GROUP','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','.source','.attribute','EMPTY_CONDITIONS','INVALID_RULE_TYPE','.operator.type','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','invalid_value','Attribute\x20name\x20cannot\x20be\x20empty','21827480ilzPRK','115wepnVD','arrayMatching','endsWith','1560364Gxjgzn','SEGMENT_SCHEMA_ERROR','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','214830CnJhfY','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','MISSING_CONDITIONS','custom','MISSING_OPERATOR_VALUE','.conditions','MISSING_SEGMENT_REFERENCE','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','141396TWUKhN','.filter','validationCode','map','code','1674504djqtKT','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','error','235641huYqIm','rule.type','filter','document','issues','source','EMPTY_ATTRIBUTE','warning','success','push','path','conditions'];a156_0x10ae=function(){return _0x104a81;};return a156_0x10ae();}
1
+ (function(_0x213de1,_0x2f7a52){const _0x307c01=a156_0x210f,_0x4240de=_0x213de1();while(!![]){try{const _0x5c038f=parseInt(_0x307c01(0x139))/0x1*(parseInt(_0x307c01(0x112))/0x2)+-parseInt(_0x307c01(0x11e))/0x3*(parseInt(_0x307c01(0x10d))/0x4)+parseInt(_0x307c01(0x12b))/0x5*(parseInt(_0x307c01(0x11f))/0x6)+parseInt(_0x307c01(0x10f))/0x7*(parseInt(_0x307c01(0x12f))/0x8)+-parseInt(_0x307c01(0x130))/0x9*(parseInt(_0x307c01(0x11b))/0xa)+parseInt(_0x307c01(0x148))/0xb*(parseInt(_0x307c01(0x10c))/0xc)+parseInt(_0x307c01(0x106))/0xd;if(_0x5c038f===_0x2f7a52)break;else _0x4240de['push'](_0x4240de['shift']());}catch(_0x33f75f){_0x4240de['push'](_0x4240de['shift']());}}}(a156_0x2eba,0x36c84));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x50bae8,_0x53f1e7={},_0x48eac7={}){const _0x800f9f=a156_0x210f;if(_0x48eac7['skipSchema'])return runSemanticChecks(_0x50bae8,_0x53f1e7);const _0x5b70cb=SegmentDefSchema['safeParse'](_0x50bae8);if(_0x5b70cb[_0x800f9f(0x135)])return runSemanticChecks(_0x5b70cb[_0x800f9f(0x138)],_0x53f1e7);return zodErrorsToValidationResult(_0x5b70cb[_0x800f9f(0x11c)],_0x53f1e7);}export function validateRuleDef(_0x2542e1,_0x16d72f,_0x20c125){const _0x351841=a156_0x210f;if(!_0x2542e1)return[];const _0x193009=RuleDefSchema['safeParse'](_0x2542e1);if(_0x193009[_0x351841(0x135)])return checkRule(_0x193009['data'],_0x16d72f,_0x20c125);const _0x40709d=flattenZodIssues(_0x193009[_0x351841(0x11c)]['issues']);return _0x40709d[_0x351841(0x136)](_0x2dfdd4=>{const _0x503974=_0x351841,_0x165267=formatZodPath(_0x2dfdd4[_0x503974(0x108)]),_0x284359=_0x165267?_0x16d72f+'.'+_0x165267:_0x16d72f,_0x1e09e9=mapZodIssueToCode(_0x2dfdd4,_0x165267),_0x444d40=getLocationFromPath(_0x20c125['document'],_0x20c125[_0x503974(0x140)],pathToArray(_0x284359));return{'level':'error','path':_0x284359,'code':_0x1e09e9,'message':_0x2dfdd4[_0x503974(0x11d)],..._0x444d40&&{'location':_0x444d40}};});}function a156_0x2eba(){const _0x4aff13=['BEHAVIOR_SOURCE_WITH_ATTRIBUTE','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','attribute','1220990wFPHBQ','error','message','4104noTTBO','2334pBHEIg','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','level','Behavior\x20source\x20\x27','MISSING_BETWEEN_BOUNDS','.conditions','.conditions[','And','EMPTY_CONDITIONS','filter','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','835OoYGEM','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','push','INVALID_OPERATOR_TYPE','104QsMYSK','27KnYPno','INVALID_ARRAY_MATCHING','.segment','document','\x27\x20with\x20attribute\x20\x27','success','map','rule.type','data','113395zKPjVR','.attribute','type','validationCode','params','.source','conditions','source','code','MISSING_TIME_UNIT','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','MISSING_SEGMENT_REFERENCE','arrayMatching','.operator.type','68497aXSqEE','name','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','.type','length','Attribute\x20name\x20cannot\x20be\x20empty','415454uJtOcg','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','path','Behavior','BEHAVIOR_SOURCE_MISSING_FILTER','MISSING_OPERATOR_VALUE','216epaxNV','32CSkOfD','description','150353jTTkwH','warning','match','2XDuDxY','custom','MISSING_NAME','rule','aggregation','endsWith'];a156_0x2eba=function(){return _0x4aff13;};return a156_0x2eba();}function zodErrorsToValidationResult(_0x3775fe,_0x835612){const _0x1b3fe2=a156_0x210f,_0x5be653=flattenZodIssues(_0x3775fe['issues']),_0x1d51e9=_0x5be653[_0x1b3fe2(0x136)](_0x35563a=>{const _0x31c28f=_0x1b3fe2,_0x36fb75=formatZodPath(_0x35563a[_0x31c28f(0x108)]),_0x4fa5a2=mapZodIssueToCode(_0x35563a,_0x36fb75),_0x15f77c=getLocationFromPath(_0x835612[_0x31c28f(0x133)],_0x835612[_0x31c28f(0x140)],_0x35563a[_0x31c28f(0x108)][_0x31c28f(0x136)](_0x4a7069=>typeof _0x4a7069==='symbol'?String(_0x4a7069):_0x4a7069));return{'level':_0x31c28f(0x11c),'path':_0x36fb75,'code':_0x4fa5a2,'message':_0x35563a[_0x31c28f(0x11d)],..._0x15f77c&&{'location':_0x15f77c}};});return{'valid':![],'errors':_0x1d51e9,'warnings':[]};}function mapZodIssueToCode(_0x2f97ce,_0x2af28f){const _0x32e9eb=a156_0x210f,_0x45f522=_0x2f97ce[_0x32e9eb(0x141)]===_0x32e9eb(0x113)?_0x2f97ce[_0x32e9eb(0x13d)]:undefined;if(_0x2af28f===_0x32e9eb(0x149))return _0x32e9eb(0x114);if(_0x2af28f===_0x32e9eb(0x137)||_0x2af28f[_0x32e9eb(0x117)](_0x32e9eb(0x103))){if(_0x2f97ce['code']==='invalid_value'){if(_0x2af28f===_0x32e9eb(0x137)||_0x2af28f[_0x32e9eb(0x111)](/\.conditions\[\d+\]\.type$/))return'INVALID_RULE_TYPE';}}if(_0x2af28f[_0x32e9eb(0x117)](_0x32e9eb(0x147)))return _0x32e9eb(0x12e);if(_0x2af28f['endsWith']('.operator.value'))return _0x32e9eb(0x10b);if(_0x45f522?.[_0x32e9eb(0x13c)]==='MISSING_BETWEEN_BOUNDS')return _0x32e9eb(0x123);if(_0x45f522?.[_0x32e9eb(0x13c)]===_0x32e9eb(0x142))return _0x32e9eb(0x142);if(_0x2af28f[_0x32e9eb(0x117)](_0x32e9eb(0x124))||_0x2af28f===_0x32e9eb(0x13f))return'MISSING_CONDITIONS';if(_0x2af28f['includes'](_0x32e9eb(0x146)))return _0x32e9eb(0x131);if(_0x2af28f[_0x32e9eb(0x117)](_0x32e9eb(0x132)))return _0x32e9eb(0x145);return'SEGMENT_SCHEMA_ERROR';}function a156_0x210f(_0x3451cf,_0x3d594a){_0x3451cf=_0x3451cf-0x102;const _0x2eba14=a156_0x2eba();let _0x210fa5=_0x2eba14[_0x3451cf];return _0x210fa5;}function runSemanticChecks(_0x2c7d9f,_0x4c734b){const _0x2e2cde=a156_0x210f,_0x1ab90e=[];_0x2c7d9f[_0x2e2cde(0x115)]&&_0x1ab90e[_0x2e2cde(0x12d)](...checkRule(_0x2c7d9f[_0x2e2cde(0x115)],_0x2e2cde(0x115),_0x4c734b));const _0x4fe0ed=_0x1ab90e[_0x2e2cde(0x128)](_0x506cc7=>_0x506cc7[_0x2e2cde(0x121)]===_0x2e2cde(0x11c)),_0xbb35b=_0x1ab90e['filter'](_0x158921=>_0x158921[_0x2e2cde(0x121)]==='warning');return{'valid':_0x4fe0ed['length']===0x0,'errors':_0x4fe0ed,'warnings':_0xbb35b};}function checkRule(_0x4bb9e9,_0x35eafc,_0x769c16){const _0x57b95e=a156_0x210f,_0x6f4342=[];if(_0x4bb9e9['conditions'][_0x57b95e(0x104)]===0x0)return _0x6f4342['push']({'level':_0x57b95e(0x11c),'path':_0x35eafc+_0x57b95e(0x124),'code':_0x57b95e(0x127),'message':_0x57b95e(0x120),'location':getLocationFromPath(_0x769c16['document'],_0x769c16[_0x57b95e(0x140)],pathToArray(_0x35eafc+_0x57b95e(0x124)))}),_0x6f4342;return _0x6f4342['push'](...checkConditions(_0x4bb9e9[_0x57b95e(0x13f)],_0x35eafc,_0x769c16)),_0x6f4342;}function checkConditions(_0x2bf6b8,_0x3bcca4,_0x2cbf35){const _0x522d71=a156_0x210f,_0xdaa1f6=[];for(let _0x58c43b=0x0;_0x58c43b<_0x2bf6b8['length'];_0x58c43b++){const _0x3c2ebd=_0x2bf6b8[_0x58c43b],_0x2a7b8d=_0x3bcca4+_0x522d71(0x125)+_0x58c43b+']';_0xdaa1f6[_0x522d71(0x12d)](...checkCondition(_0x3c2ebd,_0x2a7b8d,_0x2cbf35));}return _0xdaa1f6;}function checkCondition(_0x12ef33,_0x4e17dd,_0x16be01){const _0x4375d1=a156_0x210f,_0x3ae25d=[];if(_0x12ef33['type']===_0x4375d1(0x126)||_0x12ef33[_0x4375d1(0x13b)]==='Or'){if(_0x12ef33[_0x4375d1(0x13f)]['length']===0x0)_0x3ae25d[_0x4375d1(0x12d)]({'level':_0x4375d1(0x11c),'path':_0x4e17dd+_0x4375d1(0x124),'code':'EMPTY_CONDITIONS','message':_0x12ef33[_0x4375d1(0x13b)]+_0x4375d1(0x129),'location':getLocationFromPath(_0x16be01['document'],_0x16be01[_0x4375d1(0x140)],pathToArray(_0x4e17dd+_0x4375d1(0x124)))});else{const _0xe46cf8=_0x12ef33[_0x4375d1(0x10e)]!==undefined;!_0xe46cf8&&_0x3ae25d[_0x4375d1(0x12d)]({'level':'warning','path':_0x4e17dd,'code':'NESTED_CONDITION_GROUP','message':_0x12ef33[_0x4375d1(0x13b)]+_0x4375d1(0x102)+_0x4375d1(0x143)+_0x4375d1(0x119),'location':getLocationFromPath(_0x16be01[_0x4375d1(0x133)],_0x16be01[_0x4375d1(0x140)],pathToArray(_0x4e17dd))}),_0x3ae25d[_0x4375d1(0x12d)](...checkConditions(_0x12ef33[_0x4375d1(0x13f)],_0x4e17dd,_0x16be01));}return _0x3ae25d;}if(_0x12ef33[_0x4375d1(0x13b)]==='Value'||_0x12ef33['type']===_0x4375d1(0x109)){const _0x27d1f3=_0x12ef33,_0x55b1f8=_0x27d1f3[_0x4375d1(0x140)],_0x52e081=_0x27d1f3[_0x4375d1(0x116)],_0x407de8=_0x55b1f8||_0x52e081;(!_0x27d1f3[_0x4375d1(0x11a)]||_0x27d1f3[_0x4375d1(0x11a)]==='')&&(!_0x407de8&&_0x3ae25d[_0x4375d1(0x12d)]({'level':_0x4375d1(0x11c),'path':_0x4e17dd+'.attribute','code':'EMPTY_ATTRIBUTE','message':_0x4375d1(0x105),'location':getLocationFromPath(_0x16be01[_0x4375d1(0x133)],_0x16be01[_0x4375d1(0x140)],pathToArray(_0x4e17dd+_0x4375d1(0x13a)))}));_0x27d1f3[_0x4375d1(0x128)]&&_0x3ae25d['push'](...checkRule(_0x27d1f3['filter'],_0x4e17dd+'.filter',_0x16be01));if(_0x27d1f3[_0x4375d1(0x140)]){const _0x429c2f=_0x27d1f3[_0x4375d1(0x11a)]&&_0x27d1f3[_0x4375d1(0x11a)]!=='';_0x429c2f&&!_0x27d1f3[_0x4375d1(0x128)]&&_0x3ae25d[_0x4375d1(0x12d)]({'level':_0x4375d1(0x11c),'path':_0x4e17dd+_0x4375d1(0x13e),'code':_0x4375d1(0x10a),'message':_0x4375d1(0x122)+_0x27d1f3[_0x4375d1(0x140)]+_0x4375d1(0x134)+_0x27d1f3[_0x4375d1(0x11a)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0x4375d1(0x12a)+_0x4375d1(0x144),'location':getLocationFromPath(_0x16be01[_0x4375d1(0x133)],_0x16be01[_0x4375d1(0x140)],pathToArray(_0x4e17dd+_0x4375d1(0x13e)))}),_0x429c2f&&_0x27d1f3['filter']&&_0x3ae25d[_0x4375d1(0x12d)]({'level':_0x4375d1(0x110),'path':_0x4e17dd+'.attribute','code':_0x4375d1(0x118),'message':'Attribute\x20\x27'+_0x27d1f3[_0x4375d1(0x11a)]+_0x4375d1(0x12c)+_0x4375d1(0x107),'location':getLocationFromPath(_0x16be01[_0x4375d1(0x133)],_0x16be01[_0x4375d1(0x140)],pathToArray(_0x4e17dd+_0x4375d1(0x13a)))});}}return _0x3ae25d;}
@@ -1 +1 @@
1
- (function(_0x2e1737,_0x135880){const _0x506a7e=a157_0x36a3,_0x28dce3=_0x2e1737();while(!![]){try{const _0x25894b=-parseInt(_0x506a7e(0x123))/0x1+parseInt(_0x506a7e(0x150))/0x2*(-parseInt(_0x506a7e(0x13b))/0x3)+parseInt(_0x506a7e(0x11b))/0x4*(-parseInt(_0x506a7e(0x144))/0x5)+-parseInt(_0x506a7e(0x12c))/0x6*(-parseInt(_0x506a7e(0x117))/0x7)+-parseInt(_0x506a7e(0x11c))/0x8*(-parseInt(_0x506a7e(0x143))/0x9)+-parseInt(_0x506a7e(0x13f))/0xa+parseInt(_0x506a7e(0x11d))/0xb*(parseInt(_0x506a7e(0x128))/0xc);if(_0x25894b===_0x135880)break;else _0x28dce3['push'](_0x28dce3['shift']());}catch(_0x2663be){_0x28dce3['push'](_0x28dce3['shift']());}}}(a157_0x834b,0x54fba));import a157_0x2e60de from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x834b(){const _0xe67fc2=['parent_name','Parent\x20segment\x20not\x20specified','no_config','join','exists','175572EiFzhg','string','root','context','4530540DIrdNK','readFile','parse','tdx.json','1593HzRGEf','1021305IRUVoG','No\x20tdx.json\x20found\x20for\x20file:\x20','parent_segment','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','cwd','parentSegment','startsWith','type','Not\x20a\x20YAML\x20file:\x20','File\x20not\x20found','isScoped','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','8iyxJXe','folderPath','File\x20not\x20found:\x20','1138004TftlvK','resourceType','stat','extname','4ZozVMw','26056YfdFVU','3091zDSrtt','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','trim','file','error','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','403410ljdJLq','dirname','isFile','journey','includes','31656HbFDAs','segmentName','configDir','scopedFolderPath','12agXNgn','directory','file_not_found','isDirectory','no_parent','resolve','message','No\x20tdx.json\x20found','match','invalid_yaml'];a157_0x834b=function(){return _0xe67fc2;};return a157_0x834b();}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';function a157_0x36a3(_0x19adf5,_0x37a3b2){_0x19adf5=_0x19adf5-0x116;const _0x834b64=a157_0x834b();let _0x36a3bf=_0x834b64[_0x19adf5];return _0x36a3bf;}export function isSuccessfulResolution(_0x48b364){const _0xfec018=a157_0x36a3;return _0x48b364[_0xfec018(0x14b)]!==_0xfec018(0x121);}export function isScopedResolution(_0x39246b){const _0x54d72a=a157_0x36a3;return _0x39246b[_0x54d72a(0x14b)]==='directory'||_0x39246b['type']==='file'||_0x39246b[_0x54d72a(0x14b)]===_0x54d72a(0x13e);}export function getScopedDetails(_0x4af474){const _0x2bc0a7=a157_0x36a3;if(isScopedResolution(_0x4af474))return{'isScoped':_0x4af474['isScoped'],'scopedFolderPath':_0x4af474[_0x2bc0a7(0x12b)]};return undefined;}async function findTdxConfigAsync(_0x122961,_0x414c42){const _0x171a9e=a157_0x36a3;let _0x4c4033=a157_0x2e60de[_0x171a9e(0x131)](_0x122961);const _0x4fe96b=a157_0x2e60de[_0x171a9e(0x141)](_0x4c4033)[_0x171a9e(0x13d)];while(_0x4c4033!==_0x4fe96b){const _0x40efa1=a157_0x2e60de[_0x171a9e(0x139)](_0x4c4033,_0x171a9e(0x142));if(await _0x414c42[_0x171a9e(0x13a)](_0x40efa1))try{const _0x839d36=await _0x414c42[_0x171a9e(0x140)](_0x40efa1),_0x3b1e61=JSON['parse'](_0x839d36);if(_0x3b1e61[_0x171a9e(0x146)]&&typeof _0x3b1e61[_0x171a9e(0x146)]===_0x171a9e(0x13c))return{'configPath':_0x40efa1,'configDir':_0x4c4033,'parentSegment':_0x3b1e61[_0x171a9e(0x146)]};}catch{}_0x4c4033=a157_0x2e60de[_0x171a9e(0x124)](_0x4c4033);}return null;}function calculateScopedPath(_0xf248dc,_0x1f1926){const _0x2a2a95=a157_0x36a3,_0x567492=a157_0x2e60de['relative'](_0x1f1926,_0xf248dc),_0x403572=_0x567492!==''&&_0x567492!=='.'&&!_0x567492[_0x2a2a95(0x14a)]('..');return{'isScoped':_0x403572,'scopedFolderPath':_0x403572?_0x567492['replace'](/\\/g,'/'):''};}export async function resolveTarget(_0x11ea42){const _0x1d0f7a=a157_0x36a3,{arg:_0x1c394b,contextParent:_0x2e7ff5,cwd:cwd=process[_0x1d0f7a(0x148)](),fs:fs=nodeFileSystem}=_0x11ea42;if(_0x1c394b&&isYamlFilePath(_0x1c394b))try{const _0x54571d=await resolveYamlFilePath(_0x1c394b,fs),_0x5ddd69=a157_0x2e60de[_0x1d0f7a(0x131)](_0x1c394b),_0x1a2363=a157_0x2e60de[_0x1d0f7a(0x124)](_0x5ddd69),_0xe0afa=await findTdxConfigAsync(_0x1a2363,fs);if(!_0xe0afa){if(_0x2e7ff5){const _0x56edd2=a157_0x2e60de[_0x1d0f7a(0x124)](_0x5ddd69);return{'type':_0x1d0f7a(0x120),'parentName':_0x2e7ff5,'targetDir':_0x56edd2,'configRoot':_0x56edd2,'filePath':_0x5ddd69,'resourceName':_0x54571d[_0x1d0f7a(0x129)],'folderPath':_0x54571d[_0x1d0f7a(0x151)],'resourceType':_0x54571d['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x1d0f7a(0x138),'message':_0x1d0f7a(0x145)+_0x1c394b,'arg':_0x1c394b,'helpText':_0x1d0f7a(0x122)};}const _0x4d44db=calculateScopedPath(_0x1a2363,_0xe0afa[_0x1d0f7a(0x12a)]);return{'type':_0x1d0f7a(0x120),'parentName':_0xe0afa[_0x1d0f7a(0x149)],'targetDir':_0xe0afa[_0x1d0f7a(0x12a)],'configRoot':_0xe0afa[_0x1d0f7a(0x12a)],'filePath':_0x5ddd69,'resourceName':_0x54571d[_0x1d0f7a(0x129)],'folderPath':_0x54571d[_0x1d0f7a(0x151)],'resourceType':_0x54571d[_0x1d0f7a(0x118)],'isScoped':_0x4d44db[_0x1d0f7a(0x14e)],'scopedFolderPath':_0x4d44db[_0x1d0f7a(0x12b)]};}catch(_0x2c0651){const _0x31d984=_0x2c0651 instanceof Error?_0x2c0651[_0x1d0f7a(0x132)]:String(_0x2c0651);if(_0x31d984[_0x1d0f7a(0x127)](_0x1d0f7a(0x14d)))return{'type':_0x1d0f7a(0x121),'errorCode':_0x1d0f7a(0x12e),'message':_0x1d0f7a(0x116)+_0x1c394b,'arg':_0x1c394b};if(_0x31d984[_0x1d0f7a(0x127)](_0x1d0f7a(0x133))){if(_0x2e7ff5){const _0x297d17=a157_0x2e60de[_0x1d0f7a(0x131)](_0x1c394b);if(await fs['exists'](_0x297d17)){const _0x3db0dd=a157_0x2e60de['dirname'](_0x297d17),_0xc7ca6a=await fs[_0x1d0f7a(0x140)](_0x297d17),_0x35f715=_0xc7ca6a[_0x1d0f7a(0x134)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1a3c50=_0xc7ca6a[_0x1d0f7a(0x134)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5e4f82=_0x35f715?_0x35f715[0x1][_0x1d0f7a(0x11f)]():a157_0x2e60de['basename'](_0x1c394b,a157_0x2e60de[_0x1d0f7a(0x11a)](_0x1c394b)),_0xd10fe8=_0x1a3c50&&_0x1a3c50[0x1][_0x1d0f7a(0x11f)]()==='journey'?_0x1d0f7a(0x126):'segment';return{'type':_0x1d0f7a(0x120),'parentName':_0x2e7ff5,'targetDir':_0x3db0dd,'configRoot':_0x3db0dd,'filePath':_0x297d17,'resourceName':_0x5e4f82,'folderPath':'','resourceType':_0xd10fe8,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':_0x1d0f7a(0x138),'message':_0x1d0f7a(0x145)+_0x1c394b,'arg':_0x1c394b,'helpText':_0x1d0f7a(0x122)};}return{'type':_0x1d0f7a(0x121),'errorCode':_0x1d0f7a(0x135),'message':_0x31d984,'arg':_0x1c394b};}if(_0x1c394b){const _0x1d0f71=a157_0x2e60de['resolve'](cwd,_0x1c394b);let _0x510972=null;try{_0x510972=await fs[_0x1d0f7a(0x119)](_0x1d0f71);}catch{}if(_0x510972?.[_0x1d0f7a(0x12f)]()){const _0x11c4a9=await findTdxConfigAsync(_0x1d0f71,fs);if(_0x11c4a9){const _0x21b1f1=calculateScopedPath(_0x1d0f71,_0x11c4a9[_0x1d0f7a(0x12a)]);return{'type':_0x1d0f7a(0x12d),'parentName':_0x11c4a9['parentSegment'],'targetDir':_0x1d0f71,'configRoot':_0x11c4a9[_0x1d0f7a(0x12a)],'isScoped':_0x21b1f1[_0x1d0f7a(0x14e)],'scopedFolderPath':_0x21b1f1[_0x1d0f7a(0x12b)]};}if(_0x2e7ff5)return{'type':'directory','parentName':_0x2e7ff5,'targetDir':_0x1d0f71,'configRoot':_0x1d0f71,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1d0f7a(0x121),'errorCode':_0x1d0f7a(0x138),'message':_0x1d0f7a(0x11e)+_0x1c394b,'arg':_0x1c394b,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0x510972?.[_0x1d0f7a(0x125)]())return{'type':_0x1d0f7a(0x121),'errorCode':_0x1d0f7a(0x135),'message':_0x1d0f7a(0x14c)+_0x1c394b,'arg':_0x1c394b,'helpText':_0x1d0f7a(0x147)};const _0x24453a=sanitizeFileName(_0x1c394b),_0x37ed82=getSegmentRootDir(_0x24453a,cwd);return{'type':_0x1d0f7a(0x136),'parentName':_0x1c394b,'targetDir':_0x37ed82,'configRoot':_0x37ed82};}const _0x5c8b65=await findTdxConfigAsync(cwd,fs);if(_0x5c8b65){const _0x4d0d63=calculateScopedPath(cwd,_0x5c8b65[_0x1d0f7a(0x12a)]);return{'type':'context','parentName':_0x5c8b65[_0x1d0f7a(0x149)],'targetDir':cwd,'configRoot':_0x5c8b65['configDir'],'isScoped':_0x4d0d63['isScoped'],'scopedFolderPath':_0x4d0d63[_0x1d0f7a(0x12b)]};}if(_0x2e7ff5){const _0x478578=sanitizeFileName(_0x2e7ff5),_0x4468d4=getSegmentRootDir(_0x478578,cwd);return{'type':'context','parentName':_0x2e7ff5,'targetDir':_0x4468d4,'configRoot':_0x4468d4,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x1d0f7a(0x130),'message':_0x1d0f7a(0x137),'helpText':_0x1d0f7a(0x14f)};}
1
+ function a157_0x5c7c(_0x824dfb,_0x24afef){_0x824dfb=_0x824dfb-0xaf;const _0x470c3e=a157_0x470c();let _0x5c7cef=_0x470c3e[_0x824dfb];return _0x5c7cef;}(function(_0x22c9aa,_0x241920){const _0x32eca0=a157_0x5c7c,_0x5922cc=_0x22c9aa();while(!![]){try{const _0x419c5e=-parseInt(_0x32eca0(0xcb))/0x1+parseInt(_0x32eca0(0xb1))/0x2*(parseInt(_0x32eca0(0xd4))/0x3)+-parseInt(_0x32eca0(0xce))/0x4*(-parseInt(_0x32eca0(0xc4))/0x5)+parseInt(_0x32eca0(0xda))/0x6*(-parseInt(_0x32eca0(0xd2))/0x7)+-parseInt(_0x32eca0(0xd0))/0x8+parseInt(_0x32eca0(0xb2))/0x9+parseInt(_0x32eca0(0xd7))/0xa;if(_0x419c5e===_0x241920)break;else _0x5922cc['push'](_0x5922cc['shift']());}catch(_0x326d21){_0x5922cc['push'](_0x5922cc['shift']());}}}(a157_0x470c,0xa0811));import a157_0x410905 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(_0x1e0783){const _0x26fc2b=a157_0x5c7c;return _0x1e0783[_0x26fc2b(0xc9)]!==_0x26fc2b(0xb8);}export function isScopedResolution(_0xf85bdf){const _0x551709=a157_0x5c7c;return _0xf85bdf[_0x551709(0xc9)]===_0x551709(0xe2)||_0xf85bdf[_0x551709(0xc9)]===_0x551709(0xc1)||_0xf85bdf[_0x551709(0xc9)]===_0x551709(0xc5);}function a157_0x470c(){const _0x1f10ff=['file','resourceType','Not\x20a\x20YAML\x20file:\x20','6304425dkYlCL','context','invalid_yaml','journey','resolve','type','scopedFolderPath','647066mBvzjy','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','message','4ZMLLqV','No\x20tdx.json\x20found','5061120RDlBgl','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','7385343fqCwnN','exists','249hnkCFw','readFile','isScoped','5509320nyavnl','dirname','File\x20not\x20found','6UKUoYl','join','basename','parent_name','parentSegment','isDirectory','startsWith','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','directory','File\x20not\x20found:\x20','isFile','trim','folderPath','configDir','3686IlPzNc','9246546FLYTeb','replace','root','relative','no_config','Parent\x20segment\x20not\x20specified','error','match','segmentName','parent_segment','No\x20tdx.json\x20found\x20for\x20file:\x20','includes','cwd','segment','parse'];a157_0x470c=function(){return _0x1f10ff;};return a157_0x470c();}export function getScopedDetails(_0x4f7697){const _0x496ce8=a157_0x5c7c;if(isScopedResolution(_0x4f7697))return{'isScoped':_0x4f7697[_0x496ce8(0xd6)],'scopedFolderPath':_0x4f7697[_0x496ce8(0xca)]};return undefined;}async function findTdxConfigAsync(_0x56a3b7,_0x2a27b5){const _0x866136=a157_0x5c7c;let _0x2595ea=a157_0x410905[_0x866136(0xc8)](_0x56a3b7);const _0x27bc0a=a157_0x410905[_0x866136(0xc0)](_0x2595ea)[_0x866136(0xb4)];while(_0x2595ea!==_0x27bc0a){const _0x442481=a157_0x410905[_0x866136(0xdb)](_0x2595ea,'tdx.json');if(await _0x2a27b5[_0x866136(0xd3)](_0x442481))try{const _0x4fb120=await _0x2a27b5[_0x866136(0xd5)](_0x442481),_0x5d52c3=JSON['parse'](_0x4fb120);if(_0x5d52c3[_0x866136(0xbb)]&&typeof _0x5d52c3[_0x866136(0xbb)]==='string')return{'configPath':_0x442481,'configDir':_0x2595ea,'parentSegment':_0x5d52c3[_0x866136(0xbb)]};}catch{}_0x2595ea=a157_0x410905[_0x866136(0xd8)](_0x2595ea);}return null;}function calculateScopedPath(_0x1ca0bc,_0x22e88e){const _0x8ddb56=a157_0x5c7c,_0x7be746=a157_0x410905[_0x8ddb56(0xb5)](_0x22e88e,_0x1ca0bc),_0x5bd076=_0x7be746!==''&&_0x7be746!=='.'&&!_0x7be746[_0x8ddb56(0xe0)]('..');return{'isScoped':_0x5bd076,'scopedFolderPath':_0x5bd076?_0x7be746[_0x8ddb56(0xb3)](/\\/g,'/'):''};}export async function resolveTarget(_0x3931dd){const _0x1f747c=a157_0x5c7c,{arg:_0x468681,contextParent:_0x155ed6,cwd:cwd=process[_0x1f747c(0xbe)](),fs:fs=nodeFileSystem}=_0x3931dd;if(_0x468681&&isYamlFilePath(_0x468681))try{const _0x135d41=await resolveYamlFilePath(_0x468681,fs),_0x26753f=a157_0x410905[_0x1f747c(0xc8)](_0x468681),_0x4b17a9=a157_0x410905[_0x1f747c(0xd8)](_0x26753f),_0x487475=await findTdxConfigAsync(_0x4b17a9,fs);if(!_0x487475){if(_0x155ed6){const _0x393926=a157_0x410905[_0x1f747c(0xd8)](_0x26753f);return{'type':_0x1f747c(0xc1),'parentName':_0x155ed6,'targetDir':_0x393926,'configRoot':_0x393926,'filePath':_0x26753f,'resourceName':_0x135d41[_0x1f747c(0xba)],'folderPath':_0x135d41['folderPath'],'resourceType':_0x135d41['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1f747c(0xb8),'errorCode':_0x1f747c(0xb6),'message':_0x1f747c(0xbc)+_0x468681,'arg':_0x468681,'helpText':_0x1f747c(0xcc)};}const _0x439fa3=calculateScopedPath(_0x4b17a9,_0x487475[_0x1f747c(0xb0)]);return{'type':_0x1f747c(0xc1),'parentName':_0x487475[_0x1f747c(0xde)],'targetDir':_0x487475['configDir'],'configRoot':_0x487475[_0x1f747c(0xb0)],'filePath':_0x26753f,'resourceName':_0x135d41['segmentName'],'folderPath':_0x135d41[_0x1f747c(0xaf)],'resourceType':_0x135d41[_0x1f747c(0xc2)],'isScoped':_0x439fa3[_0x1f747c(0xd6)],'scopedFolderPath':_0x439fa3[_0x1f747c(0xca)]};}catch(_0x1d1e4e){const _0x2cdb57=_0x1d1e4e instanceof Error?_0x1d1e4e[_0x1f747c(0xcd)]:String(_0x1d1e4e);if(_0x2cdb57['includes'](_0x1f747c(0xd9)))return{'type':_0x1f747c(0xb8),'errorCode':'file_not_found','message':_0x1f747c(0xe3)+_0x468681,'arg':_0x468681};if(_0x2cdb57[_0x1f747c(0xbd)](_0x1f747c(0xcf))){if(_0x155ed6){const _0x47c626=a157_0x410905['resolve'](_0x468681);if(await fs[_0x1f747c(0xd3)](_0x47c626)){const _0x431664=a157_0x410905[_0x1f747c(0xd8)](_0x47c626),_0xa5895e=await fs['readFile'](_0x47c626),_0x220725=_0xa5895e[_0x1f747c(0xb9)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x466998=_0xa5895e[_0x1f747c(0xb9)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x201291=_0x220725?_0x220725[0x1][_0x1f747c(0xe5)]():a157_0x410905[_0x1f747c(0xdc)](_0x468681,a157_0x410905['extname'](_0x468681)),_0xc4856e=_0x466998&&_0x466998[0x1][_0x1f747c(0xe5)]()==='journey'?_0x1f747c(0xc7):_0x1f747c(0xbf);return{'type':_0x1f747c(0xc1),'parentName':_0x155ed6,'targetDir':_0x431664,'configRoot':_0x431664,'filePath':_0x47c626,'resourceName':_0x201291,'folderPath':'','resourceType':_0xc4856e,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1f747c(0xb8),'errorCode':'no_config','message':_0x1f747c(0xbc)+_0x468681,'arg':_0x468681,'helpText':_0x1f747c(0xcc)};}return{'type':_0x1f747c(0xb8),'errorCode':'invalid_yaml','message':_0x2cdb57,'arg':_0x468681};}if(_0x468681){const _0x17a98f=a157_0x410905[_0x1f747c(0xc8)](cwd,_0x468681);let _0x2593ba=null;try{_0x2593ba=await fs['stat'](_0x17a98f);}catch{}if(_0x2593ba?.[_0x1f747c(0xdf)]()){const _0x5efaef=await findTdxConfigAsync(_0x17a98f,fs);if(_0x5efaef){const _0x5892bc=calculateScopedPath(_0x17a98f,_0x5efaef['configDir']);return{'type':_0x1f747c(0xe2),'parentName':_0x5efaef[_0x1f747c(0xde)],'targetDir':_0x17a98f,'configRoot':_0x5efaef[_0x1f747c(0xb0)],'isScoped':_0x5892bc['isScoped'],'scopedFolderPath':_0x5892bc['scopedFolderPath']};}if(_0x155ed6)return{'type':_0x1f747c(0xe2),'parentName':_0x155ed6,'targetDir':_0x17a98f,'configRoot':_0x17a98f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1f747c(0xb8),'errorCode':'no_config','message':_0x1f747c(0xd1)+_0x468681,'arg':_0x468681,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0x2593ba?.[_0x1f747c(0xe4)]())return{'type':_0x1f747c(0xb8),'errorCode':_0x1f747c(0xc6),'message':_0x1f747c(0xc3)+_0x468681,'arg':_0x468681,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x27dfa6=sanitizeFileName(_0x468681),_0x4304d4=getSegmentRootDir(_0x27dfa6,cwd);return{'type':_0x1f747c(0xdd),'parentName':_0x468681,'targetDir':_0x4304d4,'configRoot':_0x4304d4};}const _0x4bdb07=await findTdxConfigAsync(cwd,fs);if(_0x4bdb07){const _0x4141c4=calculateScopedPath(cwd,_0x4bdb07[_0x1f747c(0xb0)]);return{'type':_0x1f747c(0xc5),'parentName':_0x4bdb07[_0x1f747c(0xde)],'targetDir':cwd,'configRoot':_0x4bdb07[_0x1f747c(0xb0)],'isScoped':_0x4141c4[_0x1f747c(0xd6)],'scopedFolderPath':_0x4141c4['scopedFolderPath']};}if(_0x155ed6){const _0x6a7609=sanitizeFileName(_0x155ed6),_0x21197f=getSegmentRootDir(_0x6a7609,cwd);return{'type':_0x1f747c(0xc5),'parentName':_0x155ed6,'targetDir':_0x21197f,'configRoot':_0x21197f,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1f747c(0xb8),'errorCode':'no_parent','message':_0x1f747c(0xb7),'helpText':_0x1f747c(0xe1)};}
@@ -1 +1 @@
1
- const a158_0x4afb8b=a158_0x2cd5;(function(_0x4a5838,_0x32a339){const _0x140b6a=a158_0x2cd5,_0x20727d=_0x4a5838();while(!![]){try{const _0x300e5b=parseInt(_0x140b6a(0xb7))/0x1*(parseInt(_0x140b6a(0xb9))/0x2)+parseInt(_0x140b6a(0xcb))/0x3+-parseInt(_0x140b6a(0xc3))/0x4*(parseInt(_0x140b6a(0xc4))/0x5)+parseInt(_0x140b6a(0xba))/0x6+-parseInt(_0x140b6a(0xc0))/0x7*(-parseInt(_0x140b6a(0xc5))/0x8)+parseInt(_0x140b6a(0xbe))/0x9+-parseInt(_0x140b6a(0xce))/0xa*(parseInt(_0x140b6a(0xbd))/0xb);if(_0x300e5b===_0x32a339)break;else _0x20727d['push'](_0x20727d['shift']());}catch(_0x426aed){_0x20727d['push'](_0x20727d['shift']());}}}(a158_0x53c0,0x4fa16));import{existsSync,readFileSync}from'fs';import a158_0x5653b7 from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a158_0x4afb8b(0xd0);export function findTdxConfigPath(_0x59c8ed=process[a158_0x4afb8b(0xb8)]()){const _0x4196ec=a158_0x4afb8b;let _0x2f322d=a158_0x5653b7[_0x4196ec(0xbc)](_0x59c8ed);const _0x490de5=a158_0x5653b7[_0x4196ec(0xc6)](_0x2f322d)[_0x4196ec(0xca)];while(_0x2f322d!==_0x490de5){const _0x34f054=a158_0x5653b7['join'](_0x2f322d,TDX_CONFIG_FILE);if(existsSync(_0x34f054))return _0x34f054;_0x2f322d=a158_0x5653b7['dirname'](_0x2f322d);}return null;}export function loadTdxConfig(_0x4e41e2){const _0x2ca3b7=a158_0x4afb8b,_0x4867c7=readFileSync(_0x4e41e2,_0x2ca3b7(0xb6));let _0x3a9494;try{_0x3a9494=JSON['parse'](_0x4867c7);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x4e41e2);}if(!_0x3a9494||typeof _0x3a9494!=='object')throw new Error(_0x2ca3b7(0xcd));const _0x5e584f=_0x3a9494,_0x36978c=_0x5e584f[_0x2ca3b7(0xbf)]&&typeof _0x5e584f[_0x2ca3b7(0xbf)]===_0x2ca3b7(0xc2),_0x4f9be0=_0x5e584f[_0x2ca3b7(0xc7)]&&typeof _0x5e584f['engage_workspace']===_0x2ca3b7(0xc2);if(!_0x36978c&&!_0x4f9be0)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0xf502ee={};return _0x36978c&&(_0xf502ee[_0x2ca3b7(0xbf)]=_0x5e584f['parent_segment']),_0x4f9be0&&(_0xf502ee[_0x2ca3b7(0xc7)]=_0x5e584f[_0x2ca3b7(0xc7)]),_0xf502ee;}function a158_0x2cd5(_0x53b12a,_0x1e5835){_0x53b12a=_0x53b12a-0xb6;const _0x53c092=a158_0x53c0();let _0x2cd5c6=_0x53c092[_0x53b12a];return _0x2cd5c6;}function a158_0x53c0(){const _0x47a8cc=['10BAtsdT','4134368BhtRmV','parse','engage_workspace','dirname','replace','root','78531syMHLA','stringify','Invalid\x20tdx.json:\x20expected\x20object','8960auIKOS','startsWith','segments','utf-8','4imJwEO','cwd','35674FVdyik','1098264CwYzzM','join','resolve','1309EFWFIT','978543CJlAxh','parent_segment','7jXuBpH','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','string','946604dhTfsW'];a158_0x53c0=function(){return _0x47a8cc;};return a158_0x53c0();}export function findTdxConfig(_0x320672=process['cwd']()){const _0x3d34d4=a158_0x4afb8b,_0x30546e=findTdxConfigPath(_0x320672);if(!_0x30546e)throw new Error(_0x3d34d4(0xc1));const _0x47957b=loadTdxConfig(_0x30546e),_0x5a7e70=a158_0x5653b7[_0x3d34d4(0xc8)](_0x30546e);return{'config':_0x47957b,'configPath':_0x30546e,'configDir':_0x5a7e70};}export function tryFindTdxConfig(_0x14de6b){try{return findTdxConfig(_0x14de6b);}catch{return null;}}export function getSegmentRootDir(_0x59f224,_0x3bd349=process['cwd']()){const _0x3e6bc1=a158_0x4afb8b;return a158_0x5653b7[_0x3e6bc1(0xbb)](_0x3bd349,SEGMENTS_DIR,_0x59f224);}export function getTdxConfigPath(_0x5f4122,_0x3828c5=process['cwd']()){const _0x58062f=a158_0x4afb8b;return a158_0x5653b7[_0x58062f(0xbb)](getSegmentRootDir(_0x5f4122,_0x3828c5),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0xe60024,_0x7fee99){const _0x2859d0=a158_0x4afb8b,_0x133ff6=a158_0x5653b7[_0x2859d0(0xbc)](_0xe60024),_0xfd3147=a158_0x5653b7['relative'](_0x7fee99,_0x133ff6);if(_0xfd3147[_0x2859d0(0xcf)]('..'))return'';return _0xfd3147;}export function localPathToTdFolderPath(_0x3a1f0b){const _0x2e3ae9=a158_0x4afb8b,_0x563ad5=a158_0x5653b7['dirname'](_0x3a1f0b);if(_0x563ad5==='.'||_0x563ad5==='')return'';return _0x563ad5[_0x2e3ae9(0xc9)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1d50f5,_0x4d4bb2){const _0x9e98f8=a158_0x4afb8b;if(!_0x1d50f5)return _0x4d4bb2;return a158_0x5653b7[_0x9e98f8(0xbb)](_0x4d4bb2,_0x1d50f5);}export function createTdxConfigContent(_0x152f04){const _0x4b8edb=a158_0x4afb8b,_0x27db66={'parent_segment':_0x152f04};return JSON[_0x4b8edb(0xcc)](_0x27db66,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x7cb347){const _0x3bf6f6=a158_0x4afb8b,_0x399ffc={'engage_workspace':_0x7cb347};return JSON[_0x3bf6f6(0xcc)](_0x399ffc,null,0x2)+'\x0a';}
1
+ function a158_0x4534(_0x27c595,_0x24ea1b){_0x27c595=_0x27c595-0x113;const _0x30b545=a158_0x30b5();let _0x453403=_0x30b545[_0x27c595];return _0x453403;}const a158_0x182320=a158_0x4534;(function(_0x3090aa,_0x5433ca){const _0x6920e5=a158_0x4534,_0x2b9366=_0x3090aa();while(!![]){try{const _0x5379aa=-parseInt(_0x6920e5(0x12a))/0x1+parseInt(_0x6920e5(0x126))/0x2*(-parseInt(_0x6920e5(0x113))/0x3)+-parseInt(_0x6920e5(0x11f))/0x4*(parseInt(_0x6920e5(0x116))/0x5)+parseInt(_0x6920e5(0x12d))/0x6*(parseInt(_0x6920e5(0x124))/0x7)+-parseInt(_0x6920e5(0x11b))/0x8+-parseInt(_0x6920e5(0x118))/0x9*(parseInt(_0x6920e5(0x120))/0xa)+parseInt(_0x6920e5(0x119))/0xb;if(_0x5379aa===_0x5433ca)break;else _0x2b9366['push'](_0x2b9366['shift']());}catch(_0x4784a0){_0x2b9366['push'](_0x2b9366['shift']());}}}(a158_0x30b5,0x70442));import{existsSync,readFileSync}from'fs';import a158_0x3850be from'path';const TDX_CONFIG_FILE=a158_0x182320(0x12e),SEGMENTS_DIR=a158_0x182320(0x12c);export function findTdxConfigPath(_0x34c6ff=process[a158_0x182320(0x11d)]()){const _0x535a21=a158_0x182320;let _0x2f0814=a158_0x3850be[_0x535a21(0x123)](_0x34c6ff);const _0x562e05=a158_0x3850be[_0x535a21(0x11a)](_0x2f0814)[_0x535a21(0x125)];while(_0x2f0814!==_0x562e05){const _0x90399e=a158_0x3850be[_0x535a21(0x115)](_0x2f0814,TDX_CONFIG_FILE);if(existsSync(_0x90399e))return _0x90399e;_0x2f0814=a158_0x3850be['dirname'](_0x2f0814);}return null;}export function loadTdxConfig(_0x2d0eb1){const _0x3d6696=a158_0x182320,_0x5556a5=readFileSync(_0x2d0eb1,_0x3d6696(0x11c));let _0x156a4f;try{_0x156a4f=JSON[_0x3d6696(0x11a)](_0x5556a5);}catch{throw new Error(_0x3d6696(0x11e)+_0x2d0eb1);}if(!_0x156a4f||typeof _0x156a4f!==_0x3d6696(0x12b))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x1aee7a=_0x156a4f,_0x3713a4=_0x1aee7a[_0x3d6696(0x127)]&&typeof _0x1aee7a[_0x3d6696(0x127)]==='string',_0xd787e1=_0x1aee7a['engage_workspace']&&typeof _0x1aee7a['engage_workspace']===_0x3d6696(0x121);if(!_0x3713a4&&!_0xd787e1)throw new Error(_0x3d6696(0x128));const _0x501ac4={};return _0x3713a4&&(_0x501ac4['parent_segment']=_0x1aee7a[_0x3d6696(0x127)]),_0xd787e1&&(_0x501ac4[_0x3d6696(0x129)]=_0x1aee7a[_0x3d6696(0x129)]),_0x501ac4;}export function findTdxConfig(_0x4cfaa5=process[a158_0x182320(0x11d)]()){const _0x5d8bbe=a158_0x182320,_0x219daf=findTdxConfigPath(_0x4cfaa5);if(!_0x219daf)throw new Error(_0x5d8bbe(0x114));const _0x913031=loadTdxConfig(_0x219daf),_0x35c253=a158_0x3850be[_0x5d8bbe(0x117)](_0x219daf);return{'config':_0x913031,'configPath':_0x219daf,'configDir':_0x35c253};}export function tryFindTdxConfig(_0x1d7953){try{return findTdxConfig(_0x1d7953);}catch{return null;}}export function getSegmentRootDir(_0x47f9ad,_0x5e96be=process[a158_0x182320(0x11d)]()){return a158_0x3850be['join'](_0x5e96be,SEGMENTS_DIR,_0x47f9ad);}export function getTdxConfigPath(_0xfed032,_0x9f2ccb=process['cwd']()){const _0x27f43d=a158_0x182320;return a158_0x3850be[_0x27f43d(0x115)](getSegmentRootDir(_0xfed032,_0x9f2ccb),TDX_CONFIG_FILE);}function a158_0x30b5(){const _0x495c81=['join','502395EAjiXJ','dirname','36CkIADA','32659957vCbMDx','parse','2108168ajECiO','utf-8','cwd','Invalid\x20JSON\x20in\x20','36GiMxpj','1582460tHkAyN','string','stringify','resolve','4444349TtdwDH','root','30zyBzfF','parent_segment','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','engage_workspace','615686wnGGuD','object','segments','6DkXegf','tdx.json','145530OvlgHp','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.'];a158_0x30b5=function(){return _0x495c81;};return a158_0x30b5();}export function getRelativePathFromConfig(_0x2e853b,_0x2e5b33){const _0x99a27a=a158_0x182320,_0x55ae3b=a158_0x3850be[_0x99a27a(0x123)](_0x2e853b),_0x1c873b=a158_0x3850be['relative'](_0x2e5b33,_0x55ae3b);if(_0x1c873b['startsWith']('..'))return'';return _0x1c873b;}export function localPathToTdFolderPath(_0x1ce6a8){const _0x2a700b=a158_0x182320,_0x2c9aa7=a158_0x3850be[_0x2a700b(0x117)](_0x1ce6a8);if(_0x2c9aa7==='.'||_0x2c9aa7==='')return'';return _0x2c9aa7['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x465e44,_0x564fcf){if(!_0x465e44)return _0x564fcf;return a158_0x3850be['join'](_0x564fcf,_0x465e44);}export function createTdxConfigContent(_0x313e76){const _0x4dba73=a158_0x182320,_0x380eea={'parent_segment':_0x313e76};return JSON[_0x4dba73(0x122)](_0x380eea,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4e4f6d){const _0x14a782=a158_0x182320,_0x3ecef0={'engage_workspace':_0x4e4f6d};return JSON[_0x14a782(0x122)](_0x3ecef0,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- function a159_0x5b0a(_0x40aa8c,_0x591f26){_0x40aa8c=_0x40aa8c-0xc6;const _0x231285=a159_0x2312();let _0x5b0ac5=_0x231285[_0x40aa8c];return _0x5b0ac5;}const a159_0x444269=a159_0x5b0a;(function(_0x1bf19a,_0x20a358){const _0x206231=a159_0x5b0a,_0x5d42dd=_0x1bf19a();while(!![]){try{const _0xb1d385=parseInt(_0x206231(0xe2))/0x1+-parseInt(_0x206231(0xdd))/0x2+parseInt(_0x206231(0xe8))/0x3*(parseInt(_0x206231(0xd3))/0x4)+parseInt(_0x206231(0xd8))/0x5*(-parseInt(_0x206231(0xd0))/0x6)+-parseInt(_0x206231(0xd5))/0x7*(-parseInt(_0x206231(0xea))/0x8)+parseInt(_0x206231(0xee))/0x9+-parseInt(_0x206231(0xe4))/0xa;if(_0xb1d385===_0x20a358)break;else _0x5d42dd['push'](_0x5d42dd['shift']());}catch(_0x120330){_0x5d42dd['push'](_0x5d42dd['shift']());}}}(a159_0x2312,0x5676c));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x444269(0xcd)]([a159_0x444269(0xca),a159_0x444269(0xdc),a159_0x444269(0xce),a159_0x444269(0xc7),'monthly',a159_0x444269(0xc9),a159_0x444269(0xd9)]);export const RepeatUnitSchema=z[a159_0x444269(0xcd)](['minute','hour',a159_0x444269(0xde),'week',a159_0x444269(0xe0),a159_0x444269(0xcf),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x444269(0xda)](),'repeat_unit':RepeatUnitSchema[a159_0x444269(0xda)](),'repeat_frequency':z[a159_0x444269(0xd2)]()['optional'](),'repeat_sub_frequency':z[a159_0x444269(0xec)](z[a159_0x444269(0xd2)]())[a159_0x444269(0xda)](),'start_at':z['string']()[a159_0x444269(0xe6)]()[a159_0x444269(0xda)](),'end_on':z[a159_0x444269(0xe5)]()['nullable']()[a159_0x444269(0xda)](),'timezone':z[a159_0x444269(0xe5)]()[a159_0x444269(0xda)]()});export const NotificationDefSchema=z[a159_0x444269(0xd6)]({'notify_on':z[a159_0x444269(0xec)](z[a159_0x444269(0xcd)](['onSuccess',a159_0x444269(0xed)]))['optional'](),'email_recipients':z[a159_0x444269(0xec)](z['string']())[a159_0x444269(0xda)]()});export const ActivationColumnDefSchema=z[a159_0x444269(0xd1)]([z['string'](),z[a159_0x444269(0xd6)]({'name':z[a159_0x444269(0xe5)](),'type':z[a159_0x444269(0xe5)]()['optional'](),'visibility':z[a159_0x444269(0xcd)]([a159_0x444269(0xc8),a159_0x444269(0xe7)])[a159_0x444269(0xda)]()})]);function a159_0x2312(){const _0x310d45=['number','8EUbmXh','Connection\x20name\x20is\x20required','21FgrAbO','object','record','3335YbhBXL','minutes_interval','optional','Top-N','hourly','1096548rNwNsK','day','cols','month','Activation\x20name\x20is\x20required','89884vragBi','asc','8177540MmUVxJ','string','nullable','masked','511167TRSjSu','First','1747576KlBGgg','unknown','array','onFailure','6229890FaBfaF','min','boolean','weekly','clear','cron','none','desc','rows','enum','daily','once','522sZdJCY','union'];a159_0x2312=function(){return _0x310d45;};return a159_0x2312();}export const ActivationBehaviorDefSchema=z[a159_0x444269(0xd6)]({'columns':z['array'](z['object']({'name':z[a159_0x444269(0xe5)](),'type':z[a159_0x444269(0xe5)]()[a159_0x444269(0xda)](),'visibility':z[a159_0x444269(0xcd)](['clear','masked'])[a159_0x444269(0xda)]()}))[a159_0x444269(0xda)](),'behavior_table':z[a159_0x444269(0xe5)]()[a159_0x444269(0xda)](),'join_row':z[a159_0x444269(0xd2)]()[a159_0x444269(0xe6)]()['optional'](),'join_strategy':z[a159_0x444269(0xcd)](['All',a159_0x444269(0xe9),'Last',a159_0x444269(0xdb)])[a159_0x444269(0xda)](),'formatting':z[a159_0x444269(0xcd)]([a159_0x444269(0xcc),a159_0x444269(0xdf)])[a159_0x444269(0xda)](),'order_by':z[a159_0x444269(0xec)](z[a159_0x444269(0xd6)]({'key':z['string'](),'order':z[a159_0x444269(0xcd)]([a159_0x444269(0xe3),a159_0x444269(0xcb)])}))['optional']()});export const ActivationDefSchema=z[a159_0x444269(0xd6)]({'name':z[a159_0x444269(0xe5)]()[a159_0x444269(0xef)](0x1,a159_0x444269(0xe1)),'description':z[a159_0x444269(0xe5)]()[a159_0x444269(0xda)](),'connection':z[a159_0x444269(0xe5)]()[a159_0x444269(0xef)](0x1,a159_0x444269(0xd4)),'all_columns':z[a159_0x444269(0xc6)]()[a159_0x444269(0xda)](),'columns':z[a159_0x444269(0xec)](ActivationColumnDefSchema)[a159_0x444269(0xda)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a159_0x444269(0xd7)](z[a159_0x444269(0xe5)](),z[a159_0x444269(0xeb)]())['optional'](),'activation_template_id':z[a159_0x444269(0xe5)]()[a159_0x444269(0xe6)]()[a159_0x444269(0xda)](),'behavior':ActivationBehaviorDefSchema[a159_0x444269(0xe6)]()[a159_0x444269(0xda)](),'run_after_journey_refresh':z[a159_0x444269(0xc6)]()[a159_0x444269(0xda)](),'nested_workflow_project_name':z[a159_0x444269(0xe5)]()[a159_0x444269(0xda)](),'nested_workflow_name':z[a159_0x444269(0xe5)]()[a159_0x444269(0xda)](),'lock_enabled':z[a159_0x444269(0xc6)]()[a159_0x444269(0xda)]()});
1
+ const a159_0x104da5=a159_0x125d;(function(_0x545357,_0x1eaeab){const _0x4ccf14=a159_0x125d,_0x381b68=_0x545357();while(!![]){try{const _0x34d552=-parseInt(_0x4ccf14(0x158))/0x1+parseInt(_0x4ccf14(0x156))/0x2*(-parseInt(_0x4ccf14(0x176))/0x3)+parseInt(_0x4ccf14(0x17b))/0x4+parseInt(_0x4ccf14(0x173))/0x5+parseInt(_0x4ccf14(0x160))/0x6*(parseInt(_0x4ccf14(0x174))/0x7)+parseInt(_0x4ccf14(0x153))/0x8*(parseInt(_0x4ccf14(0x155))/0x9)+-parseInt(_0x4ccf14(0x16a))/0xa;if(_0x34d552===_0x1eaeab)break;else _0x381b68['push'](_0x381b68['shift']());}catch(_0x513411){_0x381b68['push'](_0x381b68['shift']());}}}(a159_0xa89b,0xaf4d9));import{z}from'zod';function a159_0xa89b(){const _0x126d71=['week','6178660aimSKv','array','clear','daily','minute','enum','Last','none','First','6174285tdTuEW','2933iikvag','once','192sICSub','unknown','min','month','string','4327324wveUYc','onFailure','rows','All','nullable','optional','2033968LGweUw','object','27LSxLYt','41530RZOJlJ','day','920292qQfQxm','cols','monthly','record','onSuccess','Activation\x20name\x20is\x20required','weekly','hourly','7242joAyPa','union','Top-N','desc','number','asc','Connection\x20name\x20is\x20required','masked','boolean'];a159_0xa89b=function(){return _0x126d71;};return a159_0xa89b();}export const ScheduleTypeSchema=z['enum']([a159_0x104da5(0x171),a159_0x104da5(0x15f),a159_0x104da5(0x16d),a159_0x104da5(0x15e),a159_0x104da5(0x15a),'cron','minutes_interval']);export const RepeatUnitSchema=z[a159_0x104da5(0x16f)]([a159_0x104da5(0x16e),'hour',a159_0x104da5(0x157),a159_0x104da5(0x169),a159_0x104da5(0x179),a159_0x104da5(0x175),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x104da5(0x164)]()['optional'](),'repeat_sub_frequency':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x164)]())[a159_0x104da5(0x152)](),'start_at':z[a159_0x104da5(0x17a)]()['nullable']()[a159_0x104da5(0x152)](),'end_on':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'timezone':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)]()});export const NotificationDefSchema=z[a159_0x104da5(0x154)]({'notify_on':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x16f)]([a159_0x104da5(0x15c),a159_0x104da5(0x17c)]))[a159_0x104da5(0x152)](),'email_recipients':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x17a)]())[a159_0x104da5(0x152)]()});function a159_0x125d(_0x30bcfa,_0x434f0d){_0x30bcfa=_0x30bcfa-0x14f;const _0xa89bf1=a159_0xa89b();let _0x125dd1=_0xa89bf1[_0x30bcfa];return _0x125dd1;}export const ActivationColumnDefSchema=z[a159_0x104da5(0x161)]([z[a159_0x104da5(0x17a)](),z[a159_0x104da5(0x154)]({'name':z[a159_0x104da5(0x17a)](),'type':z['string']()[a159_0x104da5(0x152)](),'visibility':z['enum']([a159_0x104da5(0x16c),a159_0x104da5(0x167)])[a159_0x104da5(0x152)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x104da5(0x154)]({'columns':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x154)]({'name':z[a159_0x104da5(0x17a)](),'type':z[a159_0x104da5(0x17a)]()['optional'](),'visibility':z[a159_0x104da5(0x16f)]([a159_0x104da5(0x16c),'masked'])[a159_0x104da5(0x152)]()}))[a159_0x104da5(0x152)](),'behavior_table':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)](),'join_row':z[a159_0x104da5(0x164)]()[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'join_strategy':z[a159_0x104da5(0x16f)]([a159_0x104da5(0x150),a159_0x104da5(0x172),a159_0x104da5(0x170),a159_0x104da5(0x162)])['optional'](),'formatting':z['enum']([a159_0x104da5(0x14f),a159_0x104da5(0x159)])['optional'](),'order_by':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x154)]({'key':z[a159_0x104da5(0x17a)](),'order':z[a159_0x104da5(0x16f)]([a159_0x104da5(0x165),a159_0x104da5(0x163)])}))['optional']()});export const ActivationDefSchema=z['object']({'name':z['string']()[a159_0x104da5(0x178)](0x1,a159_0x104da5(0x15d)),'description':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)](),'connection':z['string']()[a159_0x104da5(0x178)](0x1,a159_0x104da5(0x166)),'all_columns':z[a159_0x104da5(0x168)]()[a159_0x104da5(0x152)](),'columns':z[a159_0x104da5(0x16b)](ActivationColumnDefSchema)[a159_0x104da5(0x152)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x104da5(0x152)](),'connector_config':z[a159_0x104da5(0x15b)](z[a159_0x104da5(0x17a)](),z[a159_0x104da5(0x177)]())['optional'](),'activation_template_id':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'behavior':ActivationBehaviorDefSchema[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'run_after_journey_refresh':z['boolean']()[a159_0x104da5(0x152)](),'nested_workflow_project_name':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)](),'nested_workflow_name':z[a159_0x104da5(0x17a)]()['optional'](),'lock_enabled':z['boolean']()[a159_0x104da5(0x152)]()});
@@ -1 +1 @@
1
- (function(_0x3dbfc7,_0x1fd2fc){var _0x14928a=a160_0x3432,_0x5eea66=_0x3dbfc7();while(!![]){try{var _0x11b415=-parseInt(_0x14928a(0xbf))/0x1*(-parseInt(_0x14928a(0xbe))/0x2)+-parseInt(_0x14928a(0xb8))/0x3+parseInt(_0x14928a(0xb9))/0x4*(-parseInt(_0x14928a(0xbc))/0x5)+parseInt(_0x14928a(0xba))/0x6+-parseInt(_0x14928a(0xbd))/0x7+parseInt(_0x14928a(0xb7))/0x8+-parseInt(_0x14928a(0xbb))/0x9;if(_0x11b415===_0x1fd2fc)break;else _0x5eea66['push'](_0x5eea66['shift']());}catch(_0x3d7326){_0x5eea66['push'](_0x5eea66['shift']());}}}(a160_0x5a76,0xc3694));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x3432(_0x102064,_0x245cab){_0x102064=_0x102064-0xb7;var _0x5a7605=a160_0x5a76();var _0x34321f=_0x5a7605[_0x102064];return _0x34321f;}function a160_0x5a76(){var _0x133b5b=['3577lxaLMg','12692328jTZhjv','1822164ElPTUT','814412GFRcrU','6266184njSlqr','5886333eBoqfh','5UamGFG','3284442sEuysR','58diGEDB'];a160_0x5a76=function(){return _0x133b5b;};return a160_0x5a76();}
1
+ function a160_0x9902(_0x5af9c6,_0x532f14){_0x5af9c6=_0x5af9c6-0x160;var _0x5c4db0=a160_0x5c4d();var _0x9902aa=_0x5c4db0[_0x5af9c6];return _0x9902aa;}(function(_0x5da681,_0x18765e){var _0x218260=a160_0x9902,_0x572ac0=_0x5da681();while(!![]){try{var _0x133f8c=-parseInt(_0x218260(0x165))/0x1*(parseInt(_0x218260(0x164))/0x2)+-parseInt(_0x218260(0x169))/0x3*(-parseInt(_0x218260(0x161))/0x4)+-parseInt(_0x218260(0x163))/0x5*(-parseInt(_0x218260(0x167))/0x6)+-parseInt(_0x218260(0x168))/0x7+parseInt(_0x218260(0x160))/0x8+-parseInt(_0x218260(0x162))/0x9+parseInt(_0x218260(0x166))/0xa;if(_0x133f8c===_0x18765e)break;else _0x572ac0['push'](_0x572ac0['shift']());}catch(_0x14499d){_0x572ac0['push'](_0x572ac0['shift']());}}}(a160_0x5c4d,0x592c1));function a160_0x5c4d(){var _0x4d7b8f=['3630272ElRMiS','184376btOCib','695385xkUxZY','4315xddDbx','1270762THBcwa','1rHLRYk','6416710XeHFPX','678qvXUVo','2096185ruaFoG','12cNzlPu'];a160_0x5c4d=function(){return _0x4d7b8f;};return a160_0x5c4d();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a161_0x5bef68=a161_0x41ca;(function(_0x3ca613,_0x25426c){const _0x4b209b=a161_0x41ca,_0x5cd19a=_0x3ca613();while(!![]){try{const _0x1b2969=parseInt(_0x4b209b(0x194))/0x1+parseInt(_0x4b209b(0x18a))/0x2*(-parseInt(_0x4b209b(0x189))/0x3)+parseInt(_0x4b209b(0x193))/0x4+-parseInt(_0x4b209b(0x1a1))/0x5+-parseInt(_0x4b209b(0x1af))/0x6*(-parseInt(_0x4b209b(0x18e))/0x7)+parseInt(_0x4b209b(0x19d))/0x8+-parseInt(_0x4b209b(0x195))/0x9;if(_0x1b2969===_0x25426c)break;else _0x5cd19a['push'](_0x5cd19a['shift']());}catch(_0x6f677){_0x5cd19a['push'](_0x5cd19a['shift']());}}}(a161_0x21ab,0x63bb2));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x5bef68(0x187)]([a161_0x5bef68(0x1a2),a161_0x5bef68(0x196),a161_0x5bef68(0x185)]);export const ReentryModeTypeSchema=z[a161_0x5bef68(0x187)]([a161_0x5bef68(0x1ae),'reentry_unless_goal_achieved',a161_0x5bef68(0x1aa)]);export const WaitUnitTypeSchema=z[a161_0x5bef68(0x187)]([a161_0x5bef68(0x19e),a161_0x5bef68(0x19a)]);function a161_0x41ca(_0x3b3869,_0x86f105){_0x3b3869=_0x3b3869-0x183;const _0x21ab26=a161_0x21ab();let _0x41caf5=_0x21ab26[_0x3b3869];return _0x41caf5;}export const StepTypeValueSchema=z[a161_0x5bef68(0x187)]([a161_0x5bef68(0x19f),a161_0x5bef68(0x199),a161_0x5bef68(0x18c),a161_0x5bef68(0x1ab),a161_0x5bef68(0x190),a161_0x5bef68(0x18d),a161_0x5bef68(0x1a7)]);export const EmbeddedSegmentDefSchema=z[a161_0x5bef68(0x1a0)]({'description':z['string']()[a161_0x5bef68(0x198)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x5bef68(0x1a0)]({'journey':z[a161_0x5bef68(0x1a3)](),'stage':z[a161_0x5bef68(0x1a3)](),'bundle_id':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)]()});export const CriteriaDefSchema=z[a161_0x5bef68(0x1a0)]({'name':z[a161_0x5bef68(0x1a3)](),'description':z[a161_0x5bef68(0x1a3)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema[a161_0x5bef68(0x198)]()});const WaitConditionTimeoutDefSchema=z[a161_0x5bef68(0x1a0)]({'duration':z[a161_0x5bef68(0x191)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)]()}),WaitConditionDefSchema=z['object']({'segment':z['string'](),'next':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x5bef68(0x1a0)]({'duration':z[a161_0x5bef68(0x191)]()[a161_0x5bef68(0x198)](),'unit':WaitUnitTypeSchema[a161_0x5bef68(0x198)](),'wait_until':z['string']()[a161_0x5bef68(0x198)](),'condition':WaitConditionDefSchema[a161_0x5bef68(0x198)](),'days_of_week':z[a161_0x5bef68(0x184)](z[a161_0x5bef68(0x1a3)]())[a161_0x5bef68(0x198)]()}),StepBaseFields={'name':z[a161_0x5bef68(0x1a3)](),'uuid':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'next':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x5bef68(0x183)](a161_0x5bef68(0x19f)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x5bef68(0x1a0)]({'activation':z[a161_0x5bef68(0x1a3)]()}),ActivationStepDefSchema=z[a161_0x5bef68(0x1a0)]({...StepBaseFields,'type':z[a161_0x5bef68(0x183)](a161_0x5bef68(0x199)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a161_0x5bef68(0x1a3)](),'segment':z[a161_0x5bef68(0x1a3)]()['optional'](),'segment_id':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'excluded':z[a161_0x5bef68(0x18b)]()['optional'](),'next':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0x5bef68(0x184)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x5bef68(0x1a0)]({...StepBaseFields,'type':z[a161_0x5bef68(0x183)](a161_0x5bef68(0x18c)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x5bef68(0x1a0)]({'id':z['string']()['optional'](),'name':z[a161_0x5bef68(0x1a3)](),'percentage':z[a161_0x5bef68(0x191)](),'next':z[a161_0x5bef68(0x1a3)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x5bef68(0x1a0)]({'variants':z[a161_0x5bef68(0x184)](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x5bef68(0x198)](),'customized_split':z[a161_0x5bef68(0x18b)]()[a161_0x5bef68(0x198)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x5bef68(0x183)](a161_0x5bef68(0x1ab)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x5bef68(0x183)](a161_0x5bef68(0x190))}),JumpStepParamsDefSchema=z[a161_0x5bef68(0x1a0)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x5bef68(0x1a0)]({...StepBaseFields,'type':z[a161_0x5bef68(0x183)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x5bef68(0x1a0)]({...StepBaseFields,'type':z[a161_0x5bef68(0x183)]('end')})[a161_0x5bef68(0x1ac)]();function a161_0x21ab(){const _0x39a4d5=['48167tszSlz','versions','merge','number','discriminatedUnion','1535380pQMmww','42244vgIqYn','1691352XKynlj','simulation','Journey\x20name\x20is\x20required','optional','activation','week','isArray','stages','1806400AekJKV','day','wait','object','3098510MsXMIN','draft','string','record','refine','filter','end','journeys','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','reentry_always','ab_test','passthrough','min','no_reentry','666McdCGN','journey','literal','array','launched','length','enum','type','598656RUYlni','2CuqTTh','boolean','decision_point','jump'];a161_0x21ab=function(){return _0x39a4d5;};return a161_0x21ab();}export const StepDefSchema=z[a161_0x5bef68(0x192)](a161_0x5bef68(0x188),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x5bef68(0x1a0)]({'name':z['string'](),'description':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'id':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a161_0x5bef68(0x184)](CriteriaDefSchema)[a161_0x5bef68(0x198)](),'milestone':CriteriaDefSchema[a161_0x5bef68(0x198)](),'root_step':z[a161_0x5bef68(0x1a3)]()['optional'](),'steps':z['array'](StepDefSchema)[a161_0x5bef68(0x198)]()});export const JourneyEntryDefSchema=z[a161_0x5bef68(0x1a0)]({'name':z['string']()[a161_0x5bef68(0x198)](),'version':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'state':JourneyStateTypeSchema[a161_0x5bef68(0x198)](),'latest':z['boolean']()[a161_0x5bef68(0x198)](),'stages':z[a161_0x5bef68(0x184)](StageDefSchema),'id':z['string']()[a161_0x5bef68(0x198)](),'version_number':z[a161_0x5bef68(0x191)]()[a161_0x5bef68(0x198)](),'goal':CriteriaDefSchema[a161_0x5bef68(0x198)](),'reentry':ReentryModeTypeSchema['optional']()});export const JourneyDefSchema=z['lazy'](()=>z[a161_0x5bef68(0x1a0)]({'type':z['literal'](a161_0x5bef68(0x1b0)),'name':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x1ad)](0x1,a161_0x5bef68(0x197)),'description':z[a161_0x5bef68(0x1a3)]()['optional'](),'bundle_id':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'bundle_name':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'folder_id':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'reentry':ReentryModeTypeSchema['optional'](),'allow_reentry':z[a161_0x5bef68(0x18b)]()[a161_0x5bef68(0x198)](),'goal':CriteriaDefSchema[a161_0x5bef68(0x198)](),'id':z[a161_0x5bef68(0x1a3)]()[a161_0x5bef68(0x198)](),'version':z['string']()[a161_0x5bef68(0x198)](),'version_number':z[a161_0x5bef68(0x191)]()[a161_0x5bef68(0x198)](),'stages':z[a161_0x5bef68(0x184)](StageDefSchema)[a161_0x5bef68(0x198)](),'versions':z['array'](JourneyEntryDefSchema)['optional'](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x5bef68(0x198)](),'segments':z[a161_0x5bef68(0x1a4)](z[a161_0x5bef68(0x1a3)](),EmbeddedSegmentDefSchema)[a161_0x5bef68(0x198)](),'activations':z[a161_0x5bef68(0x1a4)](z[a161_0x5bef68(0x1a3)](),ActivationDefSchema)[a161_0x5bef68(0x198)]()})[a161_0x5bef68(0x1a5)](_0x149a79=>{const _0x584922=a161_0x5bef68,_0x4e9f3d=[_0x149a79[_0x584922(0x1a8)],_0x149a79[_0x584922(0x19c)],_0x149a79[_0x584922(0x18f)]][_0x584922(0x1a6)](_0x133d17=>Array[_0x584922(0x19b)](_0x133d17)&&_0x133d17[_0x584922(0x186)]>0x0)['length'];return _0x4e9f3d===0x1;},{'message':a161_0x5bef68(0x1a9)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x409b77=a161_0x6e59;(function(_0x2156ad,_0x4c35b9){const _0x5c02ab=a161_0x6e59,_0x5928a1=_0x2156ad();while(!![]){try{const _0x326a03=parseInt(_0x5c02ab(0x1a1))/0x1*(-parseInt(_0x5c02ab(0x19b))/0x2)+-parseInt(_0x5c02ab(0x196))/0x3+parseInt(_0x5c02ab(0x1b3))/0x4*(-parseInt(_0x5c02ab(0x19c))/0x5)+-parseInt(_0x5c02ab(0x1a0))/0x6+-parseInt(_0x5c02ab(0x19f))/0x7*(-parseInt(_0x5c02ab(0x194))/0x8)+parseInt(_0x5c02ab(0x1b0))/0x9+parseInt(_0x5c02ab(0x19a))/0xa;if(_0x326a03===_0x4c35b9)break;else _0x5928a1['push'](_0x5928a1['shift']());}catch(_0x3f3281){_0x5928a1['push'](_0x5928a1['shift']());}}}(a161_0x1c56,0x5ac38));import{z}from'zod';function a161_0x1c56(){const _0x2dc10d=['16381830jNETQQ','426812NGveeV','1439105cjNGwr','array','optional','104307DaeiaC','2130186ShGOTY','1iENQKq','merge','no_reentry','journeys','activation','number','day','draft','ab_test','min','jump','boolean','filter','stages','journey','1914930hpYMHr','launched','week','8nmewfm','record','enum','literal','decision_point','wait','object','reentry_unless_goal_achieved','isArray','48qoFVsc','length','1273536QWHwLr','string','passthrough','simulation'];a161_0x1c56=function(){return _0x2dc10d;};return a161_0x1c56();}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x409b77(0x1b5)]([a161_0x409b77(0x1a8),a161_0x409b77(0x199),a161_0x409b77(0x1b1)]);export const ReentryModeTypeSchema=z[a161_0x409b77(0x1b5)]([a161_0x409b77(0x1a3),a161_0x409b77(0x192),'reentry_always']);export const WaitUnitTypeSchema=z['enum']([a161_0x409b77(0x1a7),a161_0x409b77(0x1b2)]);export const StepTypeValueSchema=z[a161_0x409b77(0x1b5)]([a161_0x409b77(0x190),a161_0x409b77(0x1a5),'decision_point',a161_0x409b77(0x1a9),a161_0x409b77(0x1a2),a161_0x409b77(0x1ab),'end']);export const EmbeddedSegmentDefSchema=z['object']({'description':z['string']()[a161_0x409b77(0x19e)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a161_0x409b77(0x197)](),'stage':z['string'](),'bundle_id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)]()});export const CriteriaDefSchema=z[a161_0x409b77(0x191)]({'name':z['string'](),'description':z[a161_0x409b77(0x197)]()['optional'](),'segment':z[a161_0x409b77(0x197)](),'target':JumpTargetDefSchema[a161_0x409b77(0x19e)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x409b77(0x1a6)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)]()}),WaitConditionDefSchema=z[a161_0x409b77(0x191)]({'segment':z['string'](),'next':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x409b77(0x19e)]()}),WaitStepParamsDefSchema=z[a161_0x409b77(0x191)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'condition':WaitConditionDefSchema[a161_0x409b77(0x19e)](),'days_of_week':z[a161_0x409b77(0x19d)](z[a161_0x409b77(0x197)]())[a161_0x409b77(0x19e)]()}),StepBaseFields={'name':z[a161_0x409b77(0x197)](),'uuid':z[a161_0x409b77(0x197)]()['optional'](),'next':z[a161_0x409b77(0x197)]()['optional']()},WaitStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x190)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x409b77(0x191)]({'activation':z[a161_0x409b77(0x197)]()}),ActivationStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x409b77(0x191)]({'name':z['string'](),'segment':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'segment_id':z['string']()[a161_0x409b77(0x19e)](),'excluded':z[a161_0x409b77(0x1ac)]()['optional'](),'next':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)]()}),DecisionPointStepParamsDefSchema=z[a161_0x409b77(0x191)]({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z['literal'](a161_0x409b77(0x1b7)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x409b77(0x191)]({'id':z['string']()[a161_0x409b77(0x19e)](),'name':z[a161_0x409b77(0x197)](),'percentage':z[a161_0x409b77(0x1a6)](),'next':z['string']()[a161_0x409b77(0x19e)]()}),AbTestStepParamsDefSchema=z[a161_0x409b77(0x191)]({'variants':z[a161_0x409b77(0x19d)](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x409b77(0x19e)](),'customized_split':z['boolean']()[a161_0x409b77(0x19e)]()}),AbTestStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x1a9)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)]('merge')}),JumpStepParamsDefSchema=z[a161_0x409b77(0x191)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x1ab)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)]('end')})[a161_0x409b77(0x198)]();export const StepDefSchema=z['discriminatedUnion']('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x409b77(0x191)]({'name':z[a161_0x409b77(0x197)](),'description':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a161_0x409b77(0x19d)](CriteriaDefSchema)[a161_0x409b77(0x19e)](),'milestone':CriteriaDefSchema[a161_0x409b77(0x19e)](),'root_step':z['string']()[a161_0x409b77(0x19e)](),'steps':z['array'](StepDefSchema)[a161_0x409b77(0x19e)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'version':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'state':JourneyStateTypeSchema[a161_0x409b77(0x19e)](),'latest':z[a161_0x409b77(0x1ac)]()['optional'](),'stages':z['array'](StageDefSchema),'id':z['string']()[a161_0x409b77(0x19e)](),'version_number':z[a161_0x409b77(0x1a6)]()[a161_0x409b77(0x19e)](),'goal':CriteriaDefSchema[a161_0x409b77(0x19e)](),'reentry':ReentryModeTypeSchema[a161_0x409b77(0x19e)]()});function a161_0x6e59(_0x17022b,_0x4ac188){_0x17022b=_0x17022b-0x190;const _0x1c5604=a161_0x1c56();let _0x6e599d=_0x1c5604[_0x17022b];return _0x6e599d;}export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x1af)),'name':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x1aa)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x409b77(0x197)]()['optional'](),'bundle_id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'bundle_name':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'folder_id':z[a161_0x409b77(0x197)]()['optional'](),'reentry':ReentryModeTypeSchema[a161_0x409b77(0x19e)](),'allow_reentry':z[a161_0x409b77(0x1ac)]()[a161_0x409b77(0x19e)](),'goal':CriteriaDefSchema['optional'](),'id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'version':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'version_number':z[a161_0x409b77(0x1a6)]()['optional'](),'stages':z[a161_0x409b77(0x19d)](StageDefSchema)[a161_0x409b77(0x19e)](),'versions':z[a161_0x409b77(0x19d)](JourneyEntryDefSchema)[a161_0x409b77(0x19e)](),'journeys':z[a161_0x409b77(0x19d)](JourneyEntryDefSchema)[a161_0x409b77(0x19e)](),'segments':z[a161_0x409b77(0x1b4)](z[a161_0x409b77(0x197)](),EmbeddedSegmentDefSchema)[a161_0x409b77(0x19e)](),'activations':z[a161_0x409b77(0x1b4)](z[a161_0x409b77(0x197)](),ActivationDefSchema)[a161_0x409b77(0x19e)]()})['refine'](_0x250466=>{const _0x2f3a90=a161_0x409b77,_0x530258=[_0x250466[_0x2f3a90(0x1a4)],_0x250466[_0x2f3a90(0x1ae)],_0x250466['versions']][_0x2f3a90(0x1ad)](_0x33cdb3=>Array[_0x2f3a90(0x193)](_0x33cdb3)&&_0x33cdb3[_0x2f3a90(0x195)]>0x0)[_0x2f3a90(0x195)];return _0x530258===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x31045f,_0x2db320){var _0x23df23=a163_0x3da0,_0x2d3eb2=_0x31045f();while(!![]){try{var _0x454dc2=parseInt(_0x23df23(0x1c7))/0x1+-parseInt(_0x23df23(0x1c4))/0x2+parseInt(_0x23df23(0x1c5))/0x3+parseInt(_0x23df23(0x1c1))/0x4+-parseInt(_0x23df23(0x1c6))/0x5+-parseInt(_0x23df23(0x1c2))/0x6+-parseInt(_0x23df23(0x1c3))/0x7;if(_0x454dc2===_0x2db320)break;else _0x2d3eb2['push'](_0x2d3eb2['shift']());}catch(_0x2e6e82){_0x2d3eb2['push'](_0x2d3eb2['shift']());}}}(a163_0x478a,0xc7e08));function a163_0x3da0(_0x3bb8cb,_0x1b9253){_0x3bb8cb=_0x3bb8cb-0x1c1;var _0x478a9d=a163_0x478a();var _0x3da073=_0x478a9d[_0x3bb8cb];return _0x3da073;}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';function a163_0x478a(){var _0x48fe3f=['6795108NaGtMR','2804109ErYZbs','886000osInRt','4257165pihOOH','3680230iwWNTV','582400pyMrXn','6117568UZBaBY'];a163_0x478a=function(){return _0x48fe3f;};return a163_0x478a();}
1
+ function a163_0x446f(_0x310534,_0x26e11c){_0x310534=_0x310534-0x66;var _0x2f71c1=a163_0x2f71();var _0x446f57=_0x2f71c1[_0x310534];return _0x446f57;}function a163_0x2f71(){var _0x3a8160=['7KSpTii','3hSLxuR','114myPHTp','33VvedDY','1555292HoXsui','3547410VSKKdJ','873254hqeSGD','10079991eVBrpp','213295MhZCHY','11605688vkgaNC','1762020tBAjAK'];a163_0x2f71=function(){return _0x3a8160;};return a163_0x2f71();}(function(_0x3af1fb,_0x2b2156){var _0x316c04=a163_0x446f,_0x59fe9a=_0x3af1fb();while(!![]){try{var _0x47336e=-parseInt(_0x316c04(0x70))/0x1+-parseInt(_0x316c04(0x69))/0x2+parseInt(_0x316c04(0x6b))/0x3*(parseInt(_0x316c04(0x6e))/0x4)+parseInt(_0x316c04(0x67))/0x5*(parseInt(_0x316c04(0x6c))/0x6)+-parseInt(_0x316c04(0x6a))/0x7*(-parseInt(_0x316c04(0x68))/0x8)+parseInt(_0x316c04(0x66))/0x9+parseInt(_0x316c04(0x6f))/0xa*(-parseInt(_0x316c04(0x6d))/0xb);if(_0x47336e===_0x2b2156)break;else _0x59fe9a['push'](_0x59fe9a['shift']());}catch(_0x458ce3){_0x59fe9a['push'](_0x59fe9a['shift']());}}}(a163_0x2f71,0xe850f));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a164_0x3f97a6=a164_0x3fd1;(function(_0x54e86c,_0x103ccb){const _0x552144=a164_0x3fd1,_0x18ed72=_0x54e86c();while(!![]){try{const _0x2632f0=-parseInt(_0x552144(0x187))/0x1+-parseInt(_0x552144(0x176))/0x2*(-parseInt(_0x552144(0x1a1))/0x3)+parseInt(_0x552144(0x178))/0x4*(-parseInt(_0x552144(0x16f))/0x5)+-parseInt(_0x552144(0x19e))/0x6*(parseInt(_0x552144(0x15e))/0x7)+-parseInt(_0x552144(0x19d))/0x8*(-parseInt(_0x552144(0x166))/0x9)+-parseInt(_0x552144(0x162))/0xa*(-parseInt(_0x552144(0x18f))/0xb)+parseInt(_0x552144(0x170))/0xc*(-parseInt(_0x552144(0x16a))/0xd);if(_0x2632f0===_0x103ccb)break;else _0x18ed72['push'](_0x18ed72['shift']());}catch(_0x94ed38){_0x18ed72['push'](_0x18ed72['shift']());}}}(a164_0x48d7,0x5fa42));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x3f97a6(0x194)]([a164_0x3f97a6(0x1a9),a164_0x3f97a6(0x17c),a164_0x3f97a6(0x17f),a164_0x3f97a6(0x18c),a164_0x3f97a6(0x1a8),'In',a164_0x3f97a6(0x193),a164_0x3f97a6(0x196),a164_0x3f97a6(0x18d),a164_0x3f97a6(0x186),a164_0x3f97a6(0x16e),a164_0x3f97a6(0x1aa),a164_0x3f97a6(0x164),a164_0x3f97a6(0x16b),a164_0x3f97a6(0x197)]);export const TimeUnitSchema=z[a164_0x3f97a6(0x194)]([a164_0x3f97a6(0x1ab),a164_0x3f97a6(0x198),'hour',a164_0x3f97a6(0x174),a164_0x3f97a6(0x171),a164_0x3f97a6(0x15d),'year']);export const AggregationTypeSchema=z['enum'](['Count',a164_0x3f97a6(0x167),a164_0x3f97a6(0x1a6),a164_0x3f97a6(0x15f),a164_0x3f97a6(0x1a0),'CountDistinct',a164_0x3f97a6(0x182),a164_0x3f97a6(0x161)]);const TemporalValueSchema=z['union']([z[a164_0x3f97a6(0x199)]({'timestamp':z[a164_0x3f97a6(0x192)]()}),z[a164_0x3f97a6(0x199)]({'last':z[a164_0x3f97a6(0x17b)]([z[a164_0x3f97a6(0x175)](),z['record'](z[a164_0x3f97a6(0x192)](),z[a164_0x3f97a6(0x175)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x3f97a6(0x17b)]([z[a164_0x3f97a6(0x192)](),z[a164_0x3f97a6(0x175)](),z['boolean'](),TemporalValueSchema,z[a164_0x3f97a6(0x16c)](z[a164_0x3f97a6(0x17b)]([z['string'](),z['number'](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x3f97a6(0x17c),'GreaterEqual',a164_0x3f97a6(0x17f),a164_0x3f97a6(0x1a8),'In',a164_0x3f97a6(0x1aa),a164_0x3f97a6(0x164),'EndWith',a164_0x3f97a6(0x196),a164_0x3f97a6(0x186),a164_0x3f97a6(0x16e)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x3f97a6(0x186),a164_0x3f97a6(0x16e)]);export const OperatorDefSchema=z[a164_0x3f97a6(0x199)]({'type':OperatorTypeSchema,'not':z[a164_0x3f97a6(0x181)]()[a164_0x3f97a6(0x18a)](),'value':OperatorValueSchema['optional'](),'min':z[a164_0x3f97a6(0x17b)]([z[a164_0x3f97a6(0x175)](),z[a164_0x3f97a6(0x192)](),TemporalValueSchema])[a164_0x3f97a6(0x18a)](),'max':z['union']([z[a164_0x3f97a6(0x175)](),z['string'](),TemporalValueSchema])[a164_0x3f97a6(0x18a)](),'unit':TimeUnitSchema[a164_0x3f97a6(0x18a)](),'duration':z[a164_0x3f97a6(0x199)]({'day':z[a164_0x3f97a6(0x175)]()[a164_0x3f97a6(0x18a)](),'week':z[a164_0x3f97a6(0x175)]()[a164_0x3f97a6(0x18a)](),'month':z[a164_0x3f97a6(0x175)]()['optional'](),'year':z[a164_0x3f97a6(0x175)]()[a164_0x3f97a6(0x18a)](),'hour':z[a164_0x3f97a6(0x175)]()['optional'](),'minute':z['number']()[a164_0x3f97a6(0x18a)](),'second':z[a164_0x3f97a6(0x175)]()[a164_0x3f97a6(0x18a)]()})[a164_0x3f97a6(0x18a)](),'from':z['object']({'last':z[a164_0x3f97a6(0x17b)]([z[a164_0x3f97a6(0x175)](),z[a164_0x3f97a6(0x192)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x3f97a6(0x181)]()[a164_0x3f97a6(0x18a)]()})[a164_0x3f97a6(0x19b)]((_0x557925,_0x5efabc)=>{const _0x5e95fe=a164_0x3f97a6;OPERATORS_REQUIRING_VALUE[_0x5e95fe(0x177)](_0x557925[_0x5e95fe(0x184)])&&(_0x557925[_0x5e95fe(0x185)]===undefined||_0x557925[_0x5e95fe(0x185)]===null)&&_0x5efabc['addIssue']({'code':_0x5e95fe(0x160),'message':_0x5e95fe(0x169)+_0x557925[_0x5e95fe(0x184)]+_0x5e95fe(0x190),'path':[_0x5e95fe(0x185)]}),_0x557925[_0x5e95fe(0x184)]===_0x5e95fe(0x193)&&_0x557925['min']===undefined&&_0x557925[_0x5e95fe(0x183)]===undefined&&_0x5efabc[_0x5e95fe(0x18b)]({'code':_0x5e95fe(0x160),'message':_0x5e95fe(0x19c),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x5e95fe(0x177)](_0x557925[_0x5e95fe(0x184)])&&_0x557925['value']!==undefined&&!_0x557925[_0x5e95fe(0x188)]&&_0x5efabc['addIssue']({'code':_0x5e95fe(0x160),'message':'Operator\x20\x27'+_0x557925[_0x5e95fe(0x184)]+_0x5e95fe(0x180),'path':['unit'],'params':{'validationCode':'MISSING_TIME_UNIT'}}),_0x557925[_0x5e95fe(0x184)]===_0x5e95fe(0x197)&&(!_0x557925[_0x5e95fe(0x16d)]&&_0x5efabc[_0x5e95fe(0x18b)]({'code':_0x5e95fe(0x160),'message':_0x5e95fe(0x1a5),'path':[_0x5e95fe(0x16d)]}),!_0x557925[_0x5e95fe(0x179)]&&_0x5efabc[_0x5e95fe(0x18b)]({'code':_0x5e95fe(0x160),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x5e95fe(0x179)]}));});export const ArrayMatchingSchema=z[a164_0x3f97a6(0x17b)]([z[a164_0x3f97a6(0x163)]('any'),z[a164_0x3f97a6(0x163)](a164_0x3f97a6(0x1a7)),z[a164_0x3f97a6(0x199)]({'atLeast':z[a164_0x3f97a6(0x175)]()}),z[a164_0x3f97a6(0x199)]({'atMost':z['number']()}),z['object']({'exactly':z[a164_0x3f97a6(0x175)]()})]);export const AggregationDefSchema=z[a164_0x3f97a6(0x168)](a164_0x3f97a6(0x184),[z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x194)]([a164_0x3f97a6(0x167),a164_0x3f97a6(0x15f),a164_0x3f97a6(0x1a0),a164_0x3f97a6(0x1a6)]),'column':z[a164_0x3f97a6(0x192)](),'groupingColumns':z['array'](z[a164_0x3f97a6(0x192)]())[a164_0x3f97a6(0x18a)]()}),z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x163)](a164_0x3f97a6(0x189)),'groupingColumns':z[a164_0x3f97a6(0x16c)](z[a164_0x3f97a6(0x192)]())[a164_0x3f97a6(0x18a)]()}),z['object']({'type':z[a164_0x3f97a6(0x163)]('CountDistinct'),'columns':z['array'](z[a164_0x3f97a6(0x192)]())}),z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x194)](['First',a164_0x3f97a6(0x161)]),'column':z[a164_0x3f97a6(0x192)](),'orderColumn':z['string'](),'groupingColumns':z[a164_0x3f97a6(0x16c)](z['string']())[a164_0x3f97a6(0x18a)]()})]);export const TimeWindowDefSchema=z[a164_0x3f97a6(0x199)]({'duration':z[a164_0x3f97a6(0x175)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x3f97a6(0x186),a164_0x3f97a6(0x16e),a164_0x3f97a6(0x197)]);export const FilterColumnConditionDefSchema=z['object']({'type':z[a164_0x3f97a6(0x163)](a164_0x3f97a6(0x18e)),'column':z[a164_0x3f97a6(0x192)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3f97a6(0x18a)]()})[a164_0x3f97a6(0x19b)]((_0x53fde7,_0x58e836)=>{const _0x2514c9=a164_0x3f97a6,_0x41145f=_0x53fde7[_0x2514c9(0x1a2)]['type'];_0x53fde7[_0x2514c9(0x19a)]===_0x2514c9(0x19f)?!TIMESTAMP_OPERATORS[_0x2514c9(0x177)](_0x41145f)&&_0x58e836[_0x2514c9(0x18b)]({'code':_0x2514c9(0x160),'message':'Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27'+_0x41145f+'\x27)','path':['operator','type']}):TIMESTAMP_OPERATORS[_0x2514c9(0x177)](_0x41145f)&&_0x58e836[_0x2514c9(0x18b)]({'code':_0x2514c9(0x160),'message':_0x2514c9(0x169)+_0x41145f+_0x2514c9(0x17d),'path':[_0x2514c9(0x1a2),'type']});});export const FilterRuleDefSchema=z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x163)](a164_0x3f97a6(0x165)),'conditions':z[a164_0x3f97a6(0x16c)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x3f97a6(0x195)](()=>z['object']({'type':z['literal'](a164_0x3f97a6(0x191)),'attribute':z[a164_0x3f97a6(0x192)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3f97a6(0x18a)](),'exclude':z[a164_0x3f97a6(0x181)]()['optional'](),'aggregation':AggregationDefSchema[a164_0x3f97a6(0x18a)](),'source':z['string']()[a164_0x3f97a6(0x18a)](),'filter':FilterRuleDefSchema['optional'](),'limit':z['number']()[a164_0x3f97a6(0x18a)]()}));export const BehaviorConditionDefSchema=z[a164_0x3f97a6(0x195)](()=>z['object']({'type':z[a164_0x3f97a6(0x163)](a164_0x3f97a6(0x1a3)),'attribute':z[a164_0x3f97a6(0x192)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3f97a6(0x18a)](),'exclude':z[a164_0x3f97a6(0x181)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x3f97a6(0x192)]()[a164_0x3f97a6(0x18a)](),'filter':FilterRuleDefSchema[a164_0x3f97a6(0x18a)](),'timeWindow':TimeWindowDefSchema[a164_0x3f97a6(0x18a)](),'limit':z[a164_0x3f97a6(0x175)]()[a164_0x3f97a6(0x18a)]()}));export const ColumnConditionDefSchema=z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x163)]('Column'),'column':z[a164_0x3f97a6(0x192)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x3f97a6(0x195)](()=>z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x194)](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x3f97a6(0x192)]()[a164_0x3f97a6(0x18a)]()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x3f97a6(0x194)](['include',a164_0x3f97a6(0x1ac)]),'segment':z[a164_0x3f97a6(0x192)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});function a164_0x48d7(){const _0x5e7715=['Value','string','Between','enum','lazy','Regexp','TimeRange','minute','object','column','superRefine','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','8WXNvnY','186doGfXm','timestamp','Max','1293dpInKH','operator','Behavior','Segment\x20name\x20is\x20required','TimeRange\x20operator\x20requires\x20\x27duration\x27','Average','all','LessEqual','Equal','Contain','second','exclude','month','84112lzXDZi','Min','custom','Last','314870qLveJH','literal','StartWith','And','3365982Ycvdjv','Sum','discriminatedUnion','Operator\x20\x27','107432fHYTfr','EndWith','array','duration','TimeWithinNext','19655pQRGDZ','120XvUMiT','week','batch','segment','day','number','2422OOIAuW','has','284eVwWgc','from','min','union','Greater','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','funnel_stage','Less','\x27\x20requires\x20a\x20time\x20unit','boolean','First','max','type','value','TimeWithinPast','431183KbcZcZ','unit','Count','optional','addIssue','GreaterEqual','IsNull','Column','231OlfzFN','\x27\x20requires\x20a\x20value'];a164_0x48d7=function(){return _0x5e7715;};return a164_0x48d7();}export const ConditionDefSchema=z[a164_0x3f97a6(0x195)](()=>z[a164_0x3f97a6(0x17b)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x3f97a6(0x195)](()=>z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x194)]([a164_0x3f97a6(0x165),'Or']),'conditions':z[a164_0x3f97a6(0x16c)](ConditionDefSchema),'description':z[a164_0x3f97a6(0x192)]()['optional']()}));export const SegmentDefSchema=z[a164_0x3f97a6(0x199)]({'type':z[a164_0x3f97a6(0x163)](a164_0x3f97a6(0x173))[a164_0x3f97a6(0x18a)](),'name':z['string']()[a164_0x3f97a6(0x17a)](0x1,a164_0x3f97a6(0x1a4)),'description':z[a164_0x3f97a6(0x192)]()['optional'](),'folder':z[a164_0x3f97a6(0x192)]()['optional'](),'rule':RuleDefSchema[a164_0x3f97a6(0x18a)](),'kind':z[a164_0x3f97a6(0x194)]([a164_0x3f97a6(0x172),'realtime',a164_0x3f97a6(0x17e)])[a164_0x3f97a6(0x18a)](),'visible':z[a164_0x3f97a6(0x181)]()[a164_0x3f97a6(0x18a)](),'activations':z[a164_0x3f97a6(0x16c)](z['any']())[a164_0x3f97a6(0x18a)]()});function a164_0x3fd1(_0x4c3daa,_0x576b77){_0x4c3daa=_0x4c3daa-0x15d;const _0x48d785=a164_0x48d7();let _0x3fd1e9=_0x48d785[_0x4c3daa];return _0x3fd1e9;}const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x455e43=a164_0x4a86;(function(_0x2e7917,_0x302de5){const _0x16df92=a164_0x4a86,_0x171d5f=_0x2e7917();while(!![]){try{const _0x16084e=parseInt(_0x16df92(0x174))/0x1+-parseInt(_0x16df92(0x162))/0x2*(parseInt(_0x16df92(0x155))/0x3)+-parseInt(_0x16df92(0x16d))/0x4*(-parseInt(_0x16df92(0x15c))/0x5)+parseInt(_0x16df92(0x18f))/0x6+-parseInt(_0x16df92(0x194))/0x7+parseInt(_0x16df92(0x171))/0x8+parseInt(_0x16df92(0x15b))/0x9;if(_0x16084e===_0x302de5)break;else _0x171d5f['push'](_0x171d5f['shift']());}catch(_0x227d06){_0x171d5f['push'](_0x171d5f['shift']());}}}(a164_0x2af0,0x2ca09));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x455e43(0x16b)](['Equal',a164_0x455e43(0x167),a164_0x455e43(0x16c),a164_0x455e43(0x18d),'LessEqual','In',a164_0x455e43(0x15f),a164_0x455e43(0x170),a164_0x455e43(0x156),a164_0x455e43(0x16a),a164_0x455e43(0x17b),a164_0x455e43(0x196),'StartWith',a164_0x455e43(0x178),'TimeRange']);export const TimeUnitSchema=z[a164_0x455e43(0x16b)](['second',a164_0x455e43(0x176),a164_0x455e43(0x189),'day',a164_0x455e43(0x15e),a164_0x455e43(0x188),a164_0x455e43(0x163)]);export const AggregationTypeSchema=z[a164_0x455e43(0x16b)]([a164_0x455e43(0x169),a164_0x455e43(0x172),'Average','Min',a164_0x455e43(0x151),a164_0x455e43(0x14e),a164_0x455e43(0x186),'Last']);const TemporalValueSchema=z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x182)]({'timestamp':z[a164_0x455e43(0x181)]()}),z[a164_0x455e43(0x182)]({'last':z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x165)](z[a164_0x455e43(0x181)](),z[a164_0x455e43(0x184)]())]),'unit':z[a164_0x455e43(0x181)]()})]),OperatorValueSchema=z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x181)](),z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x17d)](),TemporalValueSchema,z['array'](z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x181)](),z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x17d)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x455e43(0x167),'GreaterEqual',a164_0x455e43(0x16c),'LessEqual','In',a164_0x455e43(0x196),a164_0x455e43(0x17f),a164_0x455e43(0x178),'Regexp',a164_0x455e43(0x16a),a164_0x455e43(0x17b)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x455e43(0x16a),'TimeWithinNext']);export const OperatorDefSchema=z[a164_0x455e43(0x182)]({'type':OperatorTypeSchema,'not':z[a164_0x455e43(0x17d)]()['optional'](),'value':OperatorValueSchema[a164_0x455e43(0x154)](),'min':z[a164_0x455e43(0x180)]([z['number'](),z[a164_0x455e43(0x181)](),TemporalValueSchema])[a164_0x455e43(0x154)](),'max':z['union']([z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x181)](),TemporalValueSchema])[a164_0x455e43(0x154)](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0x455e43(0x182)]({'day':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)](),'week':z[a164_0x455e43(0x184)]()['optional'](),'month':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)](),'year':z['number']()['optional'](),'hour':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)](),'minute':z[a164_0x455e43(0x184)]()['optional'](),'second':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)]()})['optional'](),'from':z[a164_0x455e43(0x182)]({'last':z['union']([z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x181)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x455e43(0x17d)]()[a164_0x455e43(0x154)]()})['superRefine']((_0x545487,_0x1b8642)=>{const _0x510b72=a164_0x455e43;OPERATORS_REQUIRING_VALUE[_0x510b72(0x158)](_0x545487[_0x510b72(0x183)])&&(_0x545487[_0x510b72(0x177)]===undefined||_0x545487['value']===null)&&_0x1b8642[_0x510b72(0x15a)]({'code':_0x510b72(0x192),'message':_0x510b72(0x175)+_0x545487['type']+'\x27\x20requires\x20a\x20value','path':[_0x510b72(0x177)]}),_0x545487[_0x510b72(0x183)]==='Between'&&_0x545487[_0x510b72(0x18b)]===undefined&&_0x545487[_0x510b72(0x17e)]===undefined&&_0x1b8642[_0x510b72(0x15a)]({'code':_0x510b72(0x192),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x510b72(0x160)}}),OPERATORS_REQUIRING_UNIT[_0x510b72(0x158)](_0x545487[_0x510b72(0x183)])&&_0x545487[_0x510b72(0x177)]!==undefined&&!_0x545487[_0x510b72(0x161)]&&_0x1b8642[_0x510b72(0x15a)]({'code':_0x510b72(0x192),'message':_0x510b72(0x175)+_0x545487[_0x510b72(0x183)]+_0x510b72(0x153),'path':[_0x510b72(0x161)],'params':{'validationCode':_0x510b72(0x190)}}),_0x545487[_0x510b72(0x183)]===_0x510b72(0x191)&&(!_0x545487[_0x510b72(0x159)]&&_0x1b8642['addIssue']({'code':_0x510b72(0x192),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x510b72(0x159)]}),!_0x545487[_0x510b72(0x197)]&&_0x1b8642['addIssue']({'code':'custom','message':_0x510b72(0x168),'path':[_0x510b72(0x197)]}));});function a164_0x2af0(){const _0x29e043=['GreaterEqual','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','1689774ZNQFJL','MISSING_TIME_UNIT','TimeRange','custom','all','2316342oNPpUE','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Contain','from','include','Last','CountDistinct','segment','literal','Max','column','\x27\x20requires\x20a\x20time\x20unit','optional','3DwVwZr','IsNull','timestamp','has','duration','addIssue','1379196MMMSdH','10obQRWt','realtime','week','Between','MISSING_BETWEEN_BOUNDS','unit','593930NtyZVQ','year','lazy','record','Column','Greater','TimeRange\x20operator\x20requires\x20\x27from\x27','Count','TimeWithinPast','enum','Less','21992pfkRbq','array','superRefine','Regexp','2783944rWBvRw','Sum','Min','16802AfpltN','Operator\x20\x27','minute','value','EndWith','any','operator','TimeWithinNext','funnel_stage','boolean','max','StartWith','union','string','object','type','number','And','First','exclude','month','hour','batch','min','Segment\x20reference\x20must\x20not\x20be\x20empty'];a164_0x2af0=function(){return _0x29e043;};return a164_0x2af0();}export const ArrayMatchingSchema=z['union']([z[a164_0x455e43(0x150)](a164_0x455e43(0x179)),z[a164_0x455e43(0x150)](a164_0x455e43(0x193)),z[a164_0x455e43(0x182)]({'atLeast':z[a164_0x455e43(0x184)]()}),z[a164_0x455e43(0x182)]({'atMost':z[a164_0x455e43(0x184)]()}),z[a164_0x455e43(0x182)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x455e43(0x183),[z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x16b)]([a164_0x455e43(0x172),a164_0x455e43(0x173),'Max','Average']),'column':z['string'](),'groupingColumns':z[a164_0x455e43(0x16e)](z['string']())[a164_0x455e43(0x154)]()}),z[a164_0x455e43(0x182)]({'type':z['literal'](a164_0x455e43(0x169)),'groupingColumns':z[a164_0x455e43(0x16e)](z[a164_0x455e43(0x181)]())[a164_0x455e43(0x154)]()}),z['object']({'type':z[a164_0x455e43(0x150)](a164_0x455e43(0x14e)),'columns':z[a164_0x455e43(0x16e)](z[a164_0x455e43(0x181)]())}),z[a164_0x455e43(0x182)]({'type':z['enum']([a164_0x455e43(0x186),a164_0x455e43(0x199)]),'column':z[a164_0x455e43(0x181)](),'orderColumn':z[a164_0x455e43(0x181)](),'groupingColumns':z[a164_0x455e43(0x16e)](z[a164_0x455e43(0x181)]())[a164_0x455e43(0x154)]()})]);export const TimeWindowDefSchema=z[a164_0x455e43(0x182)]({'duration':z[a164_0x455e43(0x184)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x455e43(0x16a),a164_0x455e43(0x17b),a164_0x455e43(0x191)]);export const FilterColumnConditionDefSchema=z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x150)](a164_0x455e43(0x166)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x455e43(0x154)]()})[a164_0x455e43(0x16f)]((_0x26fd0f,_0xabf9c7)=>{const _0xcd2fcb=a164_0x455e43,_0x2c74dd=_0x26fd0f[_0xcd2fcb(0x17a)][_0xcd2fcb(0x183)];_0x26fd0f[_0xcd2fcb(0x152)]===_0xcd2fcb(0x157)?!TIMESTAMP_OPERATORS[_0xcd2fcb(0x158)](_0x2c74dd)&&_0xabf9c7['addIssue']({'code':_0xcd2fcb(0x192),'message':_0xcd2fcb(0x18e)+_0x2c74dd+'\x27)','path':[_0xcd2fcb(0x17a),_0xcd2fcb(0x183)]}):TIMESTAMP_OPERATORS[_0xcd2fcb(0x158)](_0x2c74dd)&&_0xabf9c7[_0xcd2fcb(0x15a)]({'code':_0xcd2fcb(0x192),'message':_0xcd2fcb(0x175)+_0x2c74dd+_0xcd2fcb(0x195),'path':[_0xcd2fcb(0x17a),_0xcd2fcb(0x183)]});});export const FilterRuleDefSchema=z[a164_0x455e43(0x182)]({'type':z['literal']('And'),'conditions':z[a164_0x455e43(0x16e)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x455e43(0x164)](()=>z[a164_0x455e43(0x182)]({'type':z['literal']('Value'),'attribute':z[a164_0x455e43(0x181)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x455e43(0x154)](),'exclude':z[a164_0x455e43(0x17d)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'filter':FilterRuleDefSchema[a164_0x455e43(0x154)](),'limit':z['number']()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x455e43(0x164)](()=>z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x150)]('Behavior'),'attribute':z[a164_0x455e43(0x181)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x455e43(0x154)](),'exclude':z[a164_0x455e43(0x17d)]()[a164_0x455e43(0x154)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x455e43(0x154)](),'limit':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)]()}));function a164_0x4a86(_0x370703,_0x2717fe){_0x370703=_0x370703-0x14e;const _0x2af08f=a164_0x2af0();let _0x4a8615=_0x2af08f[_0x370703];return _0x4a8615;}export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x455e43(0x150)](a164_0x455e43(0x166)),'column':z[a164_0x455e43(0x181)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x455e43(0x164)](()=>z[a164_0x455e43(0x182)]({'type':z['enum']([a164_0x455e43(0x185),'Or']),'conditions':z[a164_0x455e43(0x16e)](ConditionDefSchema),'description':z[a164_0x455e43(0x181)]()['optional']()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x455e43(0x16b)]([a164_0x455e43(0x198),a164_0x455e43(0x187)]),'segment':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x18b)](0x1,a164_0x455e43(0x18c))});export const ConditionDefSchema=z[a164_0x455e43(0x164)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x16b)]([a164_0x455e43(0x185),'Or']),'conditions':z[a164_0x455e43(0x16e)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentDefSchema=z[a164_0x455e43(0x182)]({'type':z['literal'](a164_0x455e43(0x14f))[a164_0x455e43(0x154)](),'name':z['string']()[a164_0x455e43(0x18b)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'folder':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'rule':RuleDefSchema[a164_0x455e43(0x154)](),'kind':z['enum']([a164_0x455e43(0x18a),a164_0x455e43(0x15d),a164_0x455e43(0x17c)])[a164_0x455e43(0x154)](),'visible':z[a164_0x455e43(0x17d)]()[a164_0x455e43(0x154)](),'activations':z['array'](z[a164_0x455e43(0x179)]())[a164_0x455e43(0x154)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x540367=a165_0x4e9c;(function(_0x531d4c,_0x5dde7b){const _0x301b1b=a165_0x4e9c,_0x56bfc9=_0x531d4c();while(!![]){try{const _0x222198=-parseInt(_0x301b1b(0x1ef))/0x1*(-parseInt(_0x301b1b(0x1ea))/0x2)+parseInt(_0x301b1b(0x1de))/0x3+-parseInt(_0x301b1b(0x1da))/0x4+parseInt(_0x301b1b(0x1ed))/0x5+parseInt(_0x301b1b(0x1f2))/0x6+parseInt(_0x301b1b(0x1ee))/0x7+-parseInt(_0x301b1b(0x1f0))/0x8;if(_0x222198===_0x5dde7b)break;else _0x56bfc9['push'](_0x56bfc9['shift']());}catch(_0x34cae4){_0x56bfc9['push'](_0x56bfc9['shift']());}}}(a165_0x3ae1,0xe8af7));import{readFileSync}from'fs';function a165_0x3ae1(){const _0xf32155=['journey','566UKjVbU','email','utf-8','2659040gjKjXm','10269028rVuhDm','2051ZphsaI','37329760OEGwpa','object','9256692OsBUIi','segment','skipped','type','result','1244024OhOPsM','warnings','campaign','template','5424834gnPFpY','not\x20a\x20','basename','message','length','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','filterType','YAML\x20parse\x20error:\x20','parseDocument','campaign_type','valid'];a165_0x3ae1=function(){return _0xf32155;};return a165_0x3ae1();}import*as a165_0x57d788 from'path';import*as a165_0x5c3537 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x540367(0x1eb),'push']);function a165_0x4e9c(_0x3d1cd3,_0x197589){_0x3d1cd3=_0x3d1cd3-0x1d6;const _0x3ae151=a165_0x3ae1();let _0x4e9c92=_0x3ae151[_0x3d1cd3];return _0x4e9c92;}export function isJourneyDef(_0x53524a){const _0xc3c75=a165_0x540367;return typeof _0x53524a===_0xc3c75(0x1f1)&&_0x53524a!==null&&'type'in _0x53524a&&_0x53524a[_0xc3c75(0x1d8)]===_0xc3c75(0x1e9);}export function isCampaignDef(_0xc48e4d){const _0x47db99=a165_0x540367;if(typeof _0xc48e4d!==_0x47db99(0x1f1)||_0xc48e4d===null)return![];const _0x9730fb=_0xc48e4d,_0x27df7f=VALID_CAMPAIGN_TYPES['has'](_0x9730fb[_0x47db99(0x1e7)]);if(_0x9730fb[_0x47db99(0x1d8)]===_0x47db99(0x1dc)&&_0x27df7f)return!![];if(_0x27df7f&&!_0x9730fb[_0x47db99(0x1d8)])return!![];return![];}export function isTemplateDef(_0x46f010){const _0x3ead73=a165_0x540367;return typeof _0x46f010==='object'&&_0x46f010!==null&&_0x3ead73(0x1d8)in _0x46f010&&_0x46f010[_0x3ead73(0x1d8)]===_0x3ead73(0x1dd);}export function isValidationResult(_0x580a0e){const _0xabab06=a165_0x540367;return!(_0xabab06(0x1d7)in _0x580a0e);}export function createParseErrorResult(_0x409798,_0x2aed20,_0x34aac2,_0x200b12,_0x732f08=a165_0x540367(0x1d6)){return{'filePath':_0x409798,'relativePath':_0x2aed20,'source':_0x34aac2,'result':{'valid':![],'errors':[{'level':'error','path':'','code':'YAML_PARSE_ERROR','message':_0x200b12}],'warnings':[]},'fileType':_0x732f08};}export function validateYamlFile(_0x295ed3,_0x340cac,_0xba89ba={}){const _0x415f7f=a165_0x540367,_0x24ce6d=a165_0x57d788['relative'](_0x340cac,_0x295ed3)||a165_0x57d788[_0x415f7f(0x1e0)](_0x295ed3);try{const _0x3a7ae5=readFileSync(_0x295ed3,_0x415f7f(0x1ec)),_0x55277d=a165_0x5c3537[_0x415f7f(0x1e6)](_0x3a7ae5),_0x515023=_0x55277d['toJSON']();if(!_0x515023)return createParseErrorResult(_0x295ed3,_0x24ce6d,_0x3a7ae5,_0x415f7f(0x1e3));let _0x5d780c;if(isJourneyDef(_0x515023))_0x5d780c=_0x415f7f(0x1e9);else{if(isCampaignDef(_0x515023))_0x5d780c=_0x415f7f(0x1dc);else isTemplateDef(_0x515023)?_0x5d780c=_0x415f7f(0x1dd):_0x5d780c=_0x415f7f(0x1d6);}if(_0xba89ba[_0x415f7f(0x1e4)]&&_0x5d780c!==_0xba89ba[_0x415f7f(0x1e4)])return{'filePath':_0x295ed3,'relativePath':_0x24ce6d,'skipped':!![],'reason':_0x415f7f(0x1df)+_0xba89ba[_0x415f7f(0x1e4)]};const _0x50e5cc={'source':_0x3a7ae5,'document':_0x55277d};let _0x1045c3;if(_0x5d780c===_0x415f7f(0x1e9))_0x1045c3=validateJourneyDef(_0x515023,_0x50e5cc);else{if(_0x5d780c===_0x415f7f(0x1dc))_0x1045c3=validateCampaignDef(_0x515023,_0x50e5cc);else _0x5d780c===_0x415f7f(0x1dd)?_0x1045c3=validateTemplateDef(_0x515023,_0x50e5cc):_0x1045c3=validateSegmentDef(_0x515023,_0x50e5cc);}return{'filePath':_0x295ed3,'relativePath':_0x24ce6d,'source':_0x3a7ae5,'result':_0x1045c3,'fileType':_0x5d780c};}catch(_0x2c7321){const _0x7b38ba=_0x2c7321 instanceof Error?_0x2c7321[_0x415f7f(0x1e1)]:String(_0x2c7321);return createParseErrorResult(_0x295ed3,_0x24ce6d,'',_0x415f7f(0x1e5)+_0x7b38ba);}}export function validateYamlFiles(_0x34381c,_0x30cc41,_0x55ad35={}){return _0x34381c['map'](_0x5ca606=>validateYamlFile(_0x5ca606,_0x30cc41,_0x55ad35));}export function calculateSummary(_0x491ceb){const _0x17d567=a165_0x540367;let _0x44fbdc=0x0,_0x2b19b3=0x0,_0x599a3f=0x0,_0x2413d0=0x0;for(const _0x30f463 of _0x491ceb){if(!isValidationResult(_0x30f463)){_0x2413d0++;continue;}_0x30f463[_0x17d567(0x1d9)][_0x17d567(0x1e8)]?_0x44fbdc++:_0x2b19b3++,_0x599a3f+=_0x30f463[_0x17d567(0x1d9)][_0x17d567(0x1db)][_0x17d567(0x1e2)];}return{'validCount':_0x44fbdc,'invalidCount':_0x2b19b3,'warningCount':_0x599a3f,'skippedCount':_0x2413d0,'hasErrors':_0x2b19b3>0x0};}
1
+ function a165_0x5484(_0x267f17,_0x25cc49){_0x267f17=_0x267f17-0xcf;const _0x1cef5f=a165_0x1cef();let _0x548402=_0x1cef5f[_0x267f17];return _0x548402;}const a165_0x339dfa=a165_0x5484;(function(_0x2bab13,_0x6a6e82){const _0x3a78e4=a165_0x5484,_0x2dc824=_0x2bab13();while(!![]){try{const _0x45276a=parseInt(_0x3a78e4(0xd2))/0x1*(parseInt(_0x3a78e4(0xef))/0x2)+-parseInt(_0x3a78e4(0xe1))/0x3*(-parseInt(_0x3a78e4(0xde))/0x4)+-parseInt(_0x3a78e4(0xd4))/0x5*(-parseInt(_0x3a78e4(0xe2))/0x6)+parseInt(_0x3a78e4(0xe6))/0x7*(parseInt(_0x3a78e4(0xe9))/0x8)+parseInt(_0x3a78e4(0xea))/0x9*(-parseInt(_0x3a78e4(0xe0))/0xa)+parseInt(_0x3a78e4(0xec))/0xb*(parseInt(_0x3a78e4(0xcf))/0xc)+-parseInt(_0x3a78e4(0xe5))/0xd;if(_0x45276a===_0x6a6e82)break;else _0x2dc824['push'](_0x2dc824['shift']());}catch(_0x55dff8){_0x2dc824['push'](_0x2dc824['shift']());}}}(a165_0x1cef,0x60712));import{readFileSync}from'fs';import*as a165_0x21bd3e from'path';import*as a165_0x3a5d4a from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x339dfa(0xd5),'push']);export function isJourneyDef(_0x44498f){const _0x52f285=a165_0x339dfa;return typeof _0x44498f===_0x52f285(0xe4)&&_0x44498f!==null&&'type'in _0x44498f&&_0x44498f[_0x52f285(0xda)]===_0x52f285(0xd7);}export function isCampaignDef(_0x3306ce){const _0x323dd3=a165_0x339dfa;if(typeof _0x3306ce!=='object'||_0x3306ce===null)return![];const _0x289289=_0x3306ce,_0x2dc540=VALID_CAMPAIGN_TYPES['has'](_0x289289['campaign_type']);if(_0x289289[_0x323dd3(0xda)]==='campaign'&&_0x2dc540)return!![];if(_0x2dc540&&!_0x289289[_0x323dd3(0xda)])return!![];return![];}export function isTemplateDef(_0x40ae45){const _0x378f6d=a165_0x339dfa;return typeof _0x40ae45===_0x378f6d(0xe4)&&_0x40ae45!==null&&_0x378f6d(0xda)in _0x40ae45&&_0x40ae45[_0x378f6d(0xda)]===_0x378f6d(0xed);}export function isValidationResult(_0x1b98a3){return!('skipped'in _0x1b98a3);}export function createParseErrorResult(_0x482c40,_0x4ecb17,_0x2dc530,_0x231bbb,_0x4fe9d1=a165_0x339dfa(0xee)){const _0x464f82=a165_0x339dfa;return{'filePath':_0x482c40,'relativePath':_0x4ecb17,'source':_0x2dc530,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x464f82(0xe7),'message':_0x231bbb}],'warnings':[]},'fileType':_0x4fe9d1};}export function validateYamlFile(_0x5d478b,_0x546a0f,_0x23b3fa={}){const _0x1f806d=a165_0x339dfa,_0x2ffab1=a165_0x21bd3e[_0x1f806d(0xe3)](_0x546a0f,_0x5d478b)||a165_0x21bd3e[_0x1f806d(0xdf)](_0x5d478b);try{const _0x318ea7=readFileSync(_0x5d478b,_0x1f806d(0xd6)),_0x544080=a165_0x3a5d4a[_0x1f806d(0xf0)](_0x318ea7),_0x1f29dd=_0x544080[_0x1f806d(0xe8)]();if(!_0x1f29dd)return createParseErrorResult(_0x5d478b,_0x2ffab1,_0x318ea7,_0x1f806d(0xdc));let _0x1d5be9;if(isJourneyDef(_0x1f29dd))_0x1d5be9=_0x1f806d(0xd7);else{if(isCampaignDef(_0x1f29dd))_0x1d5be9='campaign';else isTemplateDef(_0x1f29dd)?_0x1d5be9=_0x1f806d(0xed):_0x1d5be9='segment';}if(_0x23b3fa[_0x1f806d(0xd3)]&&_0x1d5be9!==_0x23b3fa['filterType'])return{'filePath':_0x5d478b,'relativePath':_0x2ffab1,'skipped':!![],'reason':'not\x20a\x20'+_0x23b3fa[_0x1f806d(0xd3)]};const _0x261f46={'source':_0x318ea7,'document':_0x544080};let _0xadf665;if(_0x1d5be9===_0x1f806d(0xd7))_0xadf665=validateJourneyDef(_0x1f29dd,_0x261f46);else{if(_0x1d5be9===_0x1f806d(0xeb))_0xadf665=validateCampaignDef(_0x1f29dd,_0x261f46);else _0x1d5be9===_0x1f806d(0xed)?_0xadf665=validateTemplateDef(_0x1f29dd,_0x261f46):_0xadf665=validateSegmentDef(_0x1f29dd,_0x261f46);}return{'filePath':_0x5d478b,'relativePath':_0x2ffab1,'source':_0x318ea7,'result':_0xadf665,'fileType':_0x1d5be9};}catch(_0x3b7b83){const _0x2874f6=_0x3b7b83 instanceof Error?_0x3b7b83[_0x1f806d(0xd9)]:String(_0x3b7b83);return createParseErrorResult(_0x5d478b,_0x2ffab1,'',_0x1f806d(0xd8)+_0x2874f6);}}function a165_0x1cef(){const _0x44645f=['journey','YAML\x20parse\x20error:\x20','message','type','map','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','valid','4ZjedFm','basename','69670yJCiRc','299499KzgBXt','78QiuYzW','relative','object','8999445EynCzs','1197DJUNXK','YAML_PARSE_ERROR','toJSON','20264VfzqEP','189zhXBUt','campaign','189563pBWyAr','template','segment','25982MkjAqP','parseDocument','156oKiByI','result','warnings','26lLrKpp','filterType','53395WVBEwJ','email','utf-8'];a165_0x1cef=function(){return _0x44645f;};return a165_0x1cef();}export function validateYamlFiles(_0x44314d,_0x1db386,_0x46ca5f={}){const _0x2ab463=a165_0x339dfa;return _0x44314d[_0x2ab463(0xdb)](_0x43b55d=>validateYamlFile(_0x43b55d,_0x1db386,_0x46ca5f));}export function calculateSummary(_0x3934f6){const _0x4e86c2=a165_0x339dfa;let _0x35cc1f=0x0,_0x3a1dc1=0x0,_0x192d97=0x0,_0x878786=0x0;for(const _0xb0f9c5 of _0x3934f6){if(!isValidationResult(_0xb0f9c5)){_0x878786++;continue;}_0xb0f9c5[_0x4e86c2(0xd0)][_0x4e86c2(0xdd)]?_0x35cc1f++:_0x3a1dc1++,_0x192d97+=_0xb0f9c5['result'][_0x4e86c2(0xd1)]['length'];}return{'validCount':_0x35cc1f,'invalidCount':_0x3a1dc1,'warningCount':_0x192d97,'skippedCount':_0x878786,'hasErrors':_0x3a1dc1>0x0};}
@@ -1 +1 @@
1
- (function(_0x11d482,_0x4a684a){const _0x97b0b4=a166_0x42b4,_0x122905=_0x11d482();while(!![]){try{const _0x331e70=-parseInt(_0x97b0b4(0x21e))/0x1+-parseInt(_0x97b0b4(0x210))/0x2*(parseInt(_0x97b0b4(0x204))/0x3)+-parseInt(_0x97b0b4(0x207))/0x4+parseInt(_0x97b0b4(0x218))/0x5+parseInt(_0x97b0b4(0x1f3))/0x6*(parseInt(_0x97b0b4(0x21a))/0x7)+parseInt(_0x97b0b4(0x211))/0x8*(parseInt(_0x97b0b4(0x214))/0x9)+-parseInt(_0x97b0b4(0x1ff))/0xa;if(_0x331e70===_0x4a684a)break;else _0x122905['push'](_0x122905['shift']());}catch(_0x4f5013){_0x122905['push'](_0x122905['shift']());}}}(a166_0x4e1d,0xa9a47));import*as a166_0x408654 from'yaml';import a166_0x2de7ad from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x8339a1,_0x1e6602,_0x3addeb){const _0x36c795=a166_0x42b4;if(!_0x8339a1||!_0x1e6602)return undefined;try{let _0x19626f=_0x8339a1[_0x36c795(0x1fb)](_0x3addeb,!![]),_0x52fb9e=[..._0x3addeb];while((!_0x19626f||typeof _0x19626f!=='object'||!(_0x36c795(0x1f9)in _0x19626f)||!_0x19626f[_0x36c795(0x1f9)])&&_0x52fb9e['length']>0x0){_0x52fb9e['pop'](),_0x19626f=_0x52fb9e[_0x36c795(0x1fc)]>0x0?_0x8339a1[_0x36c795(0x1fb)](_0x52fb9e,!![]):_0x8339a1[_0x36c795(0x21b)];}if(!_0x19626f||typeof _0x19626f!=='object'||!(_0x36c795(0x1f9)in _0x19626f)||!_0x19626f[_0x36c795(0x1f9)])return undefined;const [_0x254f82]=_0x19626f[_0x36c795(0x1f9)];return offsetToLocation(_0x1e6602,_0x254f82);}catch{return undefined;}}export function offsetToLocation(_0x14ce85,_0x561456){const _0x72fe8d=a166_0x42b4;let _0x422aa5=0x1,_0x116466=0x1;for(let _0x18ccd6=0x0;_0x18ccd6<_0x561456&&_0x18ccd6<_0x14ce85[_0x72fe8d(0x1fc)];_0x18ccd6++){_0x14ce85[_0x18ccd6]==='\x0a'?(_0x422aa5++,_0x116466=0x1):_0x116466++;}return{'line':_0x422aa5,'column':_0x116466,'offset':_0x561456};}export function pathToArray(_0x4f9279){const _0x3f9cd9=a166_0x42b4;if(!_0x4f9279)return[];return _0x4f9279[_0x3f9cd9(0x1f2)]('.')['flatMap'](_0x442e60=>{const _0x15c7bf=_0x442e60['match'](/^(\w+)\[(\d+)\]$/);if(_0x15c7bf)return[_0x15c7bf[0x1],parseInt(_0x15c7bf[0x2],0xa)];return[_0x442e60];});}export function formatZodPath(_0x56f804){const _0x892636=a166_0x42b4;let _0xa8b63='';for(const _0x28f2af of _0x56f804){if(typeof _0x28f2af===_0x892636(0x1fa))_0xa8b63+='['+_0x28f2af+']';else{const _0x122b15=String(_0x28f2af);_0xa8b63+=_0xa8b63?'.'+_0x122b15:_0x122b15;}}return _0xa8b63;}export function flattenZodIssues(_0x442783){const _0x2eae69=a166_0x42b4,_0x14a8c2=[];for(const _0x150978 of _0x442783){if(_0x150978['code']===_0x2eae69(0x1f5)&&_0x2eae69(0x205)in _0x150978){const _0x3cc01a=_0x150978[_0x2eae69(0x205)];let _0xb85f1e=_0x3cc01a[0x0]||[];for(const _0x79bb72 of _0x3cc01a){_0x79bb72[_0x2eae69(0x1fc)]<_0xb85f1e['length']&&(_0xb85f1e=_0x79bb72);}const _0x3bee0c=_0xb85f1e['map'](_0xd57635=>({..._0xd57635,'path':[..._0x150978[_0x2eae69(0x215)],..._0xd57635[_0x2eae69(0x215)]]}));_0x14a8c2[_0x2eae69(0x20e)](...flattenZodIssues(_0x3bee0c));}else _0x14a8c2[_0x2eae69(0x20e)](_0x150978);}return _0x14a8c2;}function a166_0x4e1d(){const _0xbdee62=['red','dim','min','success','issues','safeParse','push','code','128UDhKeX','619456lliNse','level','object','36hzGlVe','path','location','YAML\x20validation\x20error\x20at\x20\x27','6785475ZSIxcK','error','2821oxLMTX','contents','line','Invalid\x20YAML:\x20expected\x20an\x20object','320265HyAOaW','split','5466nvyjAC','yellow','invalid_union','message','join','cyan','range','number','getIn','length','YAML\x20validation\x20error:\x20','toString','2609640yrTFjK','parse','column','data','max','20538XEhFfn','errors','padStart','1278912mdONnH'];a166_0x4e1d=function(){return _0xbdee62;};return a166_0x4e1d();}function a166_0x42b4(_0x1671eb,_0x14886d){_0x1671eb=_0x1671eb-0x1f2;const _0x4e1d84=a166_0x4e1d();let _0x42b4ef=_0x4e1d84[_0x1671eb];return _0x42b4ef;}export function safeParseYaml(_0xe71172,_0x4de338){const _0x33386b=a166_0x42b4,_0x16c70b=a166_0x408654[_0x33386b(0x200)](_0xe71172);if(!_0x16c70b||typeof _0x16c70b!==_0x33386b(0x213))throw new Error(_0x33386b(0x21d));const _0x4c910a=_0x4de338[_0x33386b(0x20d)](_0x16c70b);if(!_0x4c910a[_0x33386b(0x20b)]){const _0x45745a=_0x4c910a['error'][_0x33386b(0x20c)][0x0],_0x2e01c2=formatZodPath(_0x45745a['path']);throw new Error(_0x2e01c2?_0x33386b(0x217)+_0x2e01c2+'\x27:\x20'+_0x45745a['message']:_0x33386b(0x1fd)+_0x45745a['message']);}return _0x4c910a[_0x33386b(0x202)];}export function formatIssueWithContext(_0x4de780,_0x516c65,_0x3f5e3d){const _0x46b7a7=a166_0x42b4,_0x109690=[],_0x49d61f=_0x4de780['level']===_0x46b7a7(0x219),_0x3dbfd1=_0x49d61f?a166_0x2de7ad['red']:a166_0x2de7ad['yellow'],_0x31620b=_0x49d61f?a166_0x2de7ad[_0x46b7a7(0x208)]:a166_0x2de7ad[_0x46b7a7(0x1f4)],_0x14dab8=_0x3f5e3d?a166_0x2de7ad[_0x46b7a7(0x1f8)](_0x3f5e3d+':'):'';if(_0x4de780[_0x46b7a7(0x216)]){const _0x5cbe4b=a166_0x2de7ad['cyan'](_0x4de780[_0x46b7a7(0x216)][_0x46b7a7(0x21c)]+':'+_0x4de780['location'][_0x46b7a7(0x201)]);_0x109690[_0x46b7a7(0x20e)](''+_0x14dab8+_0x5cbe4b+':\x20'+_0x3dbfd1(_0x4de780[_0x46b7a7(0x212)])+'\x20'+_0x31620b('['+_0x4de780[_0x46b7a7(0x20f)]+']'));}else _0x109690[_0x46b7a7(0x20e)](''+_0x14dab8+a166_0x2de7ad['dim'](_0x4de780[_0x46b7a7(0x215)])+':\x20'+_0x3dbfd1(_0x4de780[_0x46b7a7(0x212)])+'\x20'+_0x31620b('['+_0x4de780['code']+']'));_0x109690['push'](_0x4de780[_0x46b7a7(0x1f6)]);if(_0x4de780[_0x46b7a7(0x216)]&&_0x516c65){const _0x493372=_0x516c65[_0x46b7a7(0x1f2)]('\x0a'),{line:_0x454864,column:_0x53e00a}=_0x4de780[_0x46b7a7(0x216)],_0x32ea6b=Math[_0x46b7a7(0x203)](0x1,_0x454864-0x1),_0x4b2d0b=Math[_0x46b7a7(0x20a)](_0x493372[_0x46b7a7(0x1fc)],_0x454864+0x1);_0x109690[_0x46b7a7(0x20e)]('');for(let _0x18ecd0=_0x32ea6b;_0x18ecd0<=_0x4b2d0b;_0x18ecd0++){const _0x5cad90=_0x493372[_0x18ecd0-0x1]||'',_0x5131f8=a166_0x2de7ad[_0x46b7a7(0x209)](_0x18ecd0[_0x46b7a7(0x1fe)]()[_0x46b7a7(0x206)](0x4)),_0x2c59df=a166_0x2de7ad[_0x46b7a7(0x209)]('\x20|\x20');if(_0x18ecd0===_0x454864){_0x109690[_0x46b7a7(0x20e)]('\x20\x20'+_0x5131f8+_0x2c59df+_0x3dbfd1(_0x5cad90));const _0x42b61c='\x20'['repeat'](0x4+0x3+_0x53e00a-0x1);_0x109690['push']('\x20\x20'+_0x42b61c+_0x3dbfd1('^'));}else _0x109690['push']('\x20\x20'+_0x5131f8+_0x2c59df+a166_0x2de7ad['dim'](_0x5cad90));}}return _0x109690[_0x46b7a7(0x1f7)]('\x0a');}export function formatValidationResult(_0x13f973,_0x112508,_0x5b99a8){const _0x429451=a166_0x42b4,_0x560994=[];for(const _0x5e156d of _0x13f973[_0x429451(0x205)]){_0x560994[_0x429451(0x20e)](formatIssueWithContext(_0x5e156d,_0x112508,_0x5b99a8)),_0x560994[_0x429451(0x20e)]('');}for(const _0x56f261 of _0x13f973['warnings']){_0x560994[_0x429451(0x20e)](formatIssueWithContext(_0x56f261,_0x112508,_0x5b99a8)),_0x560994[_0x429451(0x20e)]('');}return _0x560994[_0x429451(0x1f7)]('\x0a');}
1
+ (function(_0x13c621,_0x221058){const _0x5704cf=a166_0xa513,_0x30f999=_0x13c621();while(!![]){try{const _0x317598=-parseInt(_0x5704cf(0x1ac))/0x1*(parseInt(_0x5704cf(0x19a))/0x2)+-parseInt(_0x5704cf(0x1b0))/0x3+-parseInt(_0x5704cf(0x183))/0x4+-parseInt(_0x5704cf(0x190))/0x5*(parseInt(_0x5704cf(0x1a6))/0x6)+-parseInt(_0x5704cf(0x1a1))/0x7+parseInt(_0x5704cf(0x1a5))/0x8*(parseInt(_0x5704cf(0x1ab))/0x9)+parseInt(_0x5704cf(0x196))/0xa*(parseInt(_0x5704cf(0x193))/0xb);if(_0x317598===_0x221058)break;else _0x30f999['push'](_0x30f999['shift']());}catch(_0x188a1e){_0x30f999['push'](_0x30f999['shift']());}}}(a166_0x25a0,0x66769));import*as a166_0x2e03c7 from'yaml';import a166_0x3152f6 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x5199f7,_0x4284e4,_0x36f79e){const _0x12e7c3=a166_0xa513;if(!_0x5199f7||!_0x4284e4)return undefined;try{let _0x314350=_0x5199f7[_0x12e7c3(0x1ad)](_0x36f79e,!![]),_0x4ea1dc=[..._0x36f79e];while((!_0x314350||typeof _0x314350!==_0x12e7c3(0x19f)||!('range'in _0x314350)||!_0x314350['range'])&&_0x4ea1dc[_0x12e7c3(0x18a)]>0x0){_0x4ea1dc['pop'](),_0x314350=_0x4ea1dc[_0x12e7c3(0x18a)]>0x0?_0x5199f7['getIn'](_0x4ea1dc,!![]):_0x5199f7['contents'];}if(!_0x314350||typeof _0x314350!==_0x12e7c3(0x19f)||!(_0x12e7c3(0x18f)in _0x314350)||!_0x314350['range'])return undefined;const [_0x5b4ba6]=_0x314350[_0x12e7c3(0x18f)];return offsetToLocation(_0x4284e4,_0x5b4ba6);}catch{return undefined;}}export function offsetToLocation(_0x92f43b,_0x461b54){const _0x471541=a166_0xa513;let _0x433fcf=0x1,_0x5debcc=0x1;for(let _0x3dbded=0x0;_0x3dbded<_0x461b54&&_0x3dbded<_0x92f43b[_0x471541(0x18a)];_0x3dbded++){_0x92f43b[_0x3dbded]==='\x0a'?(_0x433fcf++,_0x5debcc=0x1):_0x5debcc++;}return{'line':_0x433fcf,'column':_0x5debcc,'offset':_0x461b54};}export function pathToArray(_0xfd0293){const _0x227adf=a166_0xa513;if(!_0xfd0293)return[];return _0xfd0293['split']('.')[_0x227adf(0x18b)](_0x98c14=>{const _0x469d21=_0x227adf,_0x2a9dd1=_0x98c14[_0x469d21(0x199)](/^(\w+)\[(\d+)\]$/);if(_0x2a9dd1)return[_0x2a9dd1[0x1],parseInt(_0x2a9dd1[0x2],0xa)];return[_0x98c14];});}function a166_0xa513(_0x30f092,_0x1a784a){_0x30f092=_0x30f092-0x183;const _0x25a0f5=a166_0x25a0();let _0xa51302=_0x25a0f5[_0x30f092];return _0xa51302;}export function formatZodPath(_0x2be54f){let _0x64d604='';for(const _0x216fe7 of _0x2be54f){if(typeof _0x216fe7==='number')_0x64d604+='['+_0x216fe7+']';else{const _0x4e79fd=String(_0x216fe7);_0x64d604+=_0x64d604?'.'+_0x4e79fd:_0x4e79fd;}}return _0x64d604;}export function flattenZodIssues(_0x2e61b0){const _0x23dacf=a166_0xa513,_0x3fb355=[];for(const _0x5afd4f of _0x2e61b0){if(_0x5afd4f[_0x23dacf(0x189)]===_0x23dacf(0x19e)&&_0x23dacf(0x186)in _0x5afd4f){const _0xcd8dfc=_0x5afd4f['errors'];let _0x150273=_0xcd8dfc[0x0]||[];for(const _0x445a7e of _0xcd8dfc){_0x445a7e[_0x23dacf(0x18a)]<_0x150273['length']&&(_0x150273=_0x445a7e);}const _0x1bac9f=_0x150273[_0x23dacf(0x191)](_0x489b8e=>({..._0x489b8e,'path':[..._0x5afd4f[_0x23dacf(0x197)],..._0x489b8e[_0x23dacf(0x197)]]}));_0x3fb355['push'](...flattenZodIssues(_0x1bac9f));}else _0x3fb355[_0x23dacf(0x194)](_0x5afd4f);}return _0x3fb355;}function a166_0x25a0(){const _0x1ed6ff=['error','max','cyan','yellow','9DazObC','8OvLZSP','getIn','\x27:\x20','toString','2366937EDOIFi','3110924SDzNNw','split','location','errors','join','repeat','code','length','flatMap','red','issues','column','range','2210Etaarb','map','parse','990zZSVnN','push','dim','310720TLOTAG','path','YAML\x20validation\x20error:\x20','match','164758AMEaVs','data','level','\x20|\x20','invalid_union','object','line','2562714BcHPxk','min','YAML\x20validation\x20error\x20at\x20\x27','message','6094456IwTECD','7422hpuqMy'];a166_0x25a0=function(){return _0x1ed6ff;};return a166_0x25a0();}export function safeParseYaml(_0x2d028f,_0x35b2fd){const _0x5f2773=a166_0xa513,_0x4c79d5=a166_0x2e03c7[_0x5f2773(0x192)](_0x2d028f);if(!_0x4c79d5||typeof _0x4c79d5!==_0x5f2773(0x19f))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0xddaa5=_0x35b2fd['safeParse'](_0x4c79d5);if(!_0xddaa5['success']){const _0xdb96a6=_0xddaa5[_0x5f2773(0x1a7)][_0x5f2773(0x18d)][0x0],_0x345ef9=formatZodPath(_0xdb96a6[_0x5f2773(0x197)]);throw new Error(_0x345ef9?_0x5f2773(0x1a3)+_0x345ef9+_0x5f2773(0x1ae)+_0xdb96a6[_0x5f2773(0x1a4)]:_0x5f2773(0x198)+_0xdb96a6[_0x5f2773(0x1a4)]);}return _0xddaa5[_0x5f2773(0x19b)];}export function formatIssueWithContext(_0x176405,_0x175f3c,_0x316285){const _0x5c62ad=a166_0xa513,_0x55a0d1=[],_0x10fb61=_0x176405['level']===_0x5c62ad(0x1a7),_0x21c90b=_0x10fb61?a166_0x3152f6['red']:a166_0x3152f6['yellow'],_0x35fa56=_0x10fb61?a166_0x3152f6[_0x5c62ad(0x18c)]:a166_0x3152f6[_0x5c62ad(0x1aa)],_0x54a1a5=_0x316285?a166_0x3152f6[_0x5c62ad(0x1a9)](_0x316285+':'):'';if(_0x176405[_0x5c62ad(0x185)]){const _0x5ae119=a166_0x3152f6[_0x5c62ad(0x1a9)](_0x176405[_0x5c62ad(0x185)][_0x5c62ad(0x1a0)]+':'+_0x176405[_0x5c62ad(0x185)][_0x5c62ad(0x18e)]);_0x55a0d1[_0x5c62ad(0x194)](''+_0x54a1a5+_0x5ae119+':\x20'+_0x21c90b(_0x176405[_0x5c62ad(0x19c)])+'\x20'+_0x35fa56('['+_0x176405[_0x5c62ad(0x189)]+']'));}else _0x55a0d1['push'](''+_0x54a1a5+a166_0x3152f6[_0x5c62ad(0x195)](_0x176405[_0x5c62ad(0x197)])+':\x20'+_0x21c90b(_0x176405[_0x5c62ad(0x19c)])+'\x20'+_0x35fa56('['+_0x176405[_0x5c62ad(0x189)]+']'));_0x55a0d1[_0x5c62ad(0x194)](_0x176405['message']);if(_0x176405[_0x5c62ad(0x185)]&&_0x175f3c){const _0x7e292d=_0x175f3c[_0x5c62ad(0x184)]('\x0a'),{line:_0x53b1ab,column:_0x52861}=_0x176405['location'],_0x4c6423=Math[_0x5c62ad(0x1a8)](0x1,_0x53b1ab-0x1),_0x497713=Math[_0x5c62ad(0x1a2)](_0x7e292d['length'],_0x53b1ab+0x1);_0x55a0d1[_0x5c62ad(0x194)]('');for(let _0x3ec28f=_0x4c6423;_0x3ec28f<=_0x497713;_0x3ec28f++){const _0x408c2d=_0x7e292d[_0x3ec28f-0x1]||'',_0x2f20b0=a166_0x3152f6[_0x5c62ad(0x195)](_0x3ec28f[_0x5c62ad(0x1af)]()['padStart'](0x4)),_0x51f3f7=a166_0x3152f6['dim'](_0x5c62ad(0x19d));if(_0x3ec28f===_0x53b1ab){_0x55a0d1[_0x5c62ad(0x194)]('\x20\x20'+_0x2f20b0+_0x51f3f7+_0x21c90b(_0x408c2d));const _0x2a2ca3='\x20'[_0x5c62ad(0x188)](0x4+0x3+_0x52861-0x1);_0x55a0d1[_0x5c62ad(0x194)]('\x20\x20'+_0x2a2ca3+_0x21c90b('^'));}else _0x55a0d1[_0x5c62ad(0x194)]('\x20\x20'+_0x2f20b0+_0x51f3f7+a166_0x3152f6[_0x5c62ad(0x195)](_0x408c2d));}}return _0x55a0d1[_0x5c62ad(0x187)]('\x0a');}export function formatValidationResult(_0xa31077,_0x3b8f8b,_0x36d52c){const _0x53f099=a166_0xa513,_0xa0cba0=[];for(const _0xc3fafe of _0xa31077['errors']){_0xa0cba0[_0x53f099(0x194)](formatIssueWithContext(_0xc3fafe,_0x3b8f8b,_0x36d52c)),_0xa0cba0['push']('');}for(const _0x469587 of _0xa31077['warnings']){_0xa0cba0['push'](formatIssueWithContext(_0x469587,_0x3b8f8b,_0x36d52c)),_0xa0cba0[_0x53f099(0x194)]('');}return _0xa0cba0['join']('\x0a');}