@treasuredata/tdx 2026.4.21 → 2026.4.22

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 (231) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.d.ts.map +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-command.js.map +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-command.js +1 -1
  27. package/dist/commands/engage-template-pull-command.js +1 -1
  28. package/dist/commands/engage-template-push-command.js +1 -1
  29. package/dist/commands/engage-template-validate-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/journey-command.js +1 -1
  32. package/dist/commands/journey-validate-command.js +1 -1
  33. package/dist/commands/llm-command.js +1 -1
  34. package/dist/commands/mcp-command.js +1 -1
  35. package/dist/commands/parent-segment-command.js +1 -1
  36. package/dist/commands/policy-command.js +1 -1
  37. package/dist/commands/profile-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/schedule-command.js +1 -1
  41. package/dist/commands/segment-command.js +1 -1
  42. package/dist/commands/segment-create-command.js +1 -1
  43. package/dist/commands/segment-fields-command.js +1 -1
  44. package/dist/commands/segment-pull-command.js +1 -1
  45. package/dist/commands/segment-push-command.js +1 -1
  46. package/dist/commands/segment-update-command.js +1 -1
  47. package/dist/commands/segment-use-command.js +1 -1
  48. package/dist/commands/segment-validate-command.js +1 -1
  49. package/dist/commands/segments.js +1 -1
  50. package/dist/commands/show.js +1 -1
  51. package/dist/commands/status-command.js +1 -1
  52. package/dist/commands/tables.js +1 -1
  53. package/dist/commands/unset-command.js +1 -1
  54. package/dist/commands/upgrade-command.js +1 -1
  55. package/dist/commands/use-command.js +1 -1
  56. package/dist/commands/user-command.js +1 -1
  57. package/dist/commands/work-command.js +1 -1
  58. package/dist/commands/workflow-command.js +1 -1
  59. package/dist/core/auth.js +1 -1
  60. package/dist/core/command-output.js +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/connection-cache.js +1 -1
  63. package/dist/core/constants.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.js +1 -1
  66. package/dist/core/keychain.js +1 -1
  67. package/dist/core/oauth-keychain.js +1 -1
  68. package/dist/core/oauth.js +1 -1
  69. package/dist/core/profile.js +1 -1
  70. package/dist/core/project-config.js +1 -1
  71. package/dist/core/session.js +1 -1
  72. package/dist/core/user-cache.js +1 -1
  73. package/dist/core/version.js +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/mcp/server.js +1 -1
  76. package/dist/mcp/tools/index.js +1 -1
  77. package/dist/mcp/tools/tdx-run.js +1 -1
  78. package/dist/mcp/tools/tdx-search.js +1 -1
  79. package/dist/mcp/tools/work-create-item.js +1 -1
  80. package/dist/mcp/utils.js +1 -1
  81. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  82. package/dist/proxy/claude-usage-tracker.js +1 -1
  83. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  84. package/dist/proxy/passthrough-server.d.ts +10 -0
  85. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  86. package/dist/proxy/passthrough-server.js +1 -1
  87. package/dist/proxy/passthrough-server.js.map +1 -1
  88. package/dist/proxy/sse-usage-parser.js +1 -1
  89. package/dist/sdk/agent/agent-config.js +1 -1
  90. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  91. package/dist/sdk/agent/agent-yaml.js +1 -1
  92. package/dist/sdk/agent/test/evaluator.js +1 -1
  93. package/dist/sdk/agent/test/executor.js +1 -1
  94. package/dist/sdk/agent/test/index.js +1 -1
  95. package/dist/sdk/agent/test/output.js +1 -1
  96. package/dist/sdk/agent/test/parser.js +1 -1
  97. package/dist/sdk/agent/tool-target-registry.js +1 -1
  98. package/dist/sdk/api.js +1 -1
  99. package/dist/sdk/cas/cas-api-client.js +1 -1
  100. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  101. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  102. package/dist/sdk/cas/index.js +1 -1
  103. package/dist/sdk/cas/pull-workflow.js +1 -1
  104. package/dist/sdk/cas/push-workflow.js +1 -1
  105. package/dist/sdk/client/cdp-api-client.js +1 -1
  106. package/dist/sdk/client/delivery-api-client.js +1 -1
  107. package/dist/sdk/client/endpoints.js +1 -1
  108. package/dist/sdk/client/engage-api-client.js +1 -1
  109. package/dist/sdk/client/http-client.js +1 -1
  110. package/dist/sdk/client/llm-api-client.js +1 -1
  111. package/dist/sdk/client/oauth-refresh.js +1 -1
  112. package/dist/sdk/client/rate-limiter.js +1 -1
  113. package/dist/sdk/client/td-api-client.js +1 -1
  114. package/dist/sdk/client/trino-api-client.js +1 -1
  115. package/dist/sdk/client/workflow-client.js +1 -1
  116. package/dist/sdk/connection-validator.js +1 -1
  117. package/dist/sdk/connection.js +1 -1
  118. package/dist/sdk/delivery.js +1 -1
  119. package/dist/sdk/engage/campaign-pull.js +1 -1
  120. package/dist/sdk/engage/campaign-push.js +1 -1
  121. package/dist/sdk/engage/campaign-validator.js +1 -1
  122. package/dist/sdk/engage/campaign-yaml.js +1 -1
  123. package/dist/sdk/engage/template-pull.js +1 -1
  124. package/dist/sdk/engage/template-push.js +1 -1
  125. package/dist/sdk/engage/template-validator.js +1 -1
  126. package/dist/sdk/engage/template-yaml.js +1 -1
  127. package/dist/sdk/engage/types/campaign-def.js +1 -1
  128. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  129. package/dist/sdk/engage/types/template-schema.js +1 -1
  130. package/dist/sdk/engage.js +1 -1
  131. package/dist/sdk/errors.js +1 -1
  132. package/dist/sdk/index.js +1 -1
  133. package/dist/sdk/io/index.js +1 -1
  134. package/dist/sdk/io/node-filesystem.js +1 -1
  135. package/dist/sdk/job.js +1 -1
  136. package/dist/sdk/journey.js +1 -1
  137. package/dist/sdk/llm/chat-cache.js +1 -1
  138. package/dist/sdk/llm/index.js +1 -1
  139. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  140. package/dist/sdk/llm/model-factors.d.ts +33 -9
  141. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  142. package/dist/sdk/llm/model-factors.js +1 -1
  143. package/dist/sdk/llm/model-factors.js.map +1 -1
  144. package/dist/sdk/personalization.js +1 -1
  145. package/dist/sdk/policy.js +1 -1
  146. package/dist/sdk/query/index.js +1 -1
  147. package/dist/sdk/query/sql-parser.js +1 -1
  148. package/dist/sdk/realtime.js +1 -1
  149. package/dist/sdk/schedule.js +1 -1
  150. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  151. package/dist/sdk/segment/fields-display.js +1 -1
  152. package/dist/sdk/segment/file-discovery.js +1 -1
  153. package/dist/sdk/segment/journey-utils.js +1 -1
  154. package/dist/sdk/segment/journey-validator.js +1 -1
  155. package/dist/sdk/segment/journey-yaml.js +1 -1
  156. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  157. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  158. package/dist/sdk/segment/pull-workflow.js +1 -1
  159. package/dist/sdk/segment/push-recovery.js +1 -1
  160. package/dist/sdk/segment/push-workflow.js +1 -1
  161. package/dist/sdk/segment/resolution-context.js +1 -1
  162. package/dist/sdk/segment/segment-path-parser.js +1 -1
  163. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  164. package/dist/sdk/segment/segment-validator.js +1 -1
  165. package/dist/sdk/segment/target-resolution.js +1 -1
  166. package/dist/sdk/segment/tdx-config.js +1 -1
  167. package/dist/sdk/segment/types/activation-schema.js +1 -1
  168. package/dist/sdk/segment/types/journey-def.js +1 -1
  169. package/dist/sdk/segment/types/journey-schema.js +1 -1
  170. package/dist/sdk/segment/types/segment-def.js +1 -1
  171. package/dist/sdk/segment/types/segment-schema.js +1 -1
  172. package/dist/sdk/segment/validate-files.js +1 -1
  173. package/dist/sdk/segment/yaml-validator.js +1 -1
  174. package/dist/sdk/segment.js +1 -1
  175. package/dist/sdk/types/index.js +1 -1
  176. package/dist/sdk/types/progress.js +1 -1
  177. package/dist/sdk/types/workspace.js +1 -1
  178. package/dist/sdk/user.js +1 -1
  179. package/dist/sdk/util/format-detector.js +1 -1
  180. package/dist/sdk/util/formatters.js +1 -1
  181. package/dist/sdk/util/index.js +1 -1
  182. package/dist/sdk/util/paginate.js +1 -1
  183. package/dist/sdk/util/tree-formatter.js +1 -1
  184. package/dist/sdk/workflow/archive-validation.js +1 -1
  185. package/dist/sdk/workflow/clone-workflow.js +1 -1
  186. package/dist/sdk/workflow/index.js +1 -1
  187. package/dist/sdk/workflow/pull-workflow.js +1 -1
  188. package/dist/sdk/workflow/push-workflow.js +1 -1
  189. package/dist/sdk/workflow/task-graph.js +1 -1
  190. package/dist/sdk/workflow/tdx-config.js +1 -1
  191. package/dist/sdk/workflow/workflow-utils.js +1 -1
  192. package/dist/sdk/workspace/access-tracker.js +1 -1
  193. package/dist/sdk/workspace/frontmatter.js +1 -1
  194. package/dist/sdk/workspace/git.js +1 -1
  195. package/dist/sdk/workspace/index.js +1 -1
  196. package/dist/sdk/workspace/templates.js +1 -1
  197. package/dist/sdk/workspace/weekly.js +1 -1
  198. package/dist/sdk/workspace/wikilinks.js +1 -1
  199. package/dist/test-utils/command-runner.js +1 -1
  200. package/dist/test-utils/factories.js +1 -1
  201. package/dist/test-utils/fixtures.js +1 -1
  202. package/dist/test-utils/http-mock.js +1 -1
  203. package/dist/test-utils/index.js +1 -1
  204. package/dist/utils/async.js +1 -1
  205. package/dist/utils/colors.js +1 -1
  206. package/dist/utils/diff.js +1 -1
  207. package/dist/utils/file-permissions.js +1 -1
  208. package/dist/utils/file-reader.js +1 -1
  209. package/dist/utils/github-releases.js +1 -1
  210. package/dist/utils/global-cache.js +1 -1
  211. package/dist/utils/json-loader.js +1 -1
  212. package/dist/utils/local-cache.js +1 -1
  213. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  214. package/dist/utils/logger/formatters/index.js +1 -1
  215. package/dist/utils/logger/handlers/console-handler.js +1 -1
  216. package/dist/utils/logger/handlers/file-handler.js +1 -1
  217. package/dist/utils/logger/handlers/index.js +1 -1
  218. package/dist/utils/logger/handlers/null-handler.js +1 -1
  219. package/dist/utils/logger/index.js +1 -1
  220. package/dist/utils/logger/logger.js +1 -1
  221. package/dist/utils/logger/types.js +1 -1
  222. package/dist/utils/option-validation.js +1 -1
  223. package/dist/utils/process.js +1 -1
  224. package/dist/utils/prompt.js +1 -1
  225. package/dist/utils/spinner.js +1 -1
  226. package/dist/utils/sse-parser.js +1 -1
  227. package/dist/utils/string-utils.js +1 -1
  228. package/dist/utils/table-ref-parser.js +1 -1
  229. package/dist/utils/tdx-logger.js +1 -1
  230. package/dist/utils/version-check.js +1 -1
  231. package/package.json +1 -1
@@ -1 +1 @@
1
- function a156_0x25d4(){const _0x5e43e6=['code','MISSING_BETWEEN_BOUNDS','Attribute\x20\x27','4647452xCTybz','1312147aFvNhw','\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','type','MISSING_SEGMENT_REFERENCE','symbol','level','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','.conditions[','includes','EMPTY_CONDITIONS','rule.type','INVALID_RULE_TYPE','rule','skipSchema','.operator.value','.source','safeParse','MISSING_OPERATOR_VALUE','match','attribute','.attribute','message','Behavior\x20source\x20\x27','5njifxm','endsWith','push','10bLgPUD','MISSING_TIME_UNIT','length','success','warning','.conditions','563716pftgrG','Attribute\x20name\x20cannot\x20be\x20empty','filter','3bEhrgp','NESTED_CONDITION_GROUP','path','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','invalid_value','aggregation','23977349SMqWvR','MISSING_CONDITIONS','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','map','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','INVALID_OPERATOR_TYPE','conditions','832632BTqHzM','72uAZBDe','source','document','data','issues','SEGMENT_SCHEMA_ERROR','MISSING_NAME','10337404XHdcxq','params','error','.type','6849918vSWIbD','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','validationCode','custom','description'];a156_0x25d4=function(){return _0x5e43e6;};return a156_0x25d4();}(function(_0x3e7c80,_0x2ea80d){const _0x593ed9=a156_0x367b,_0x1125d2=_0x3e7c80();while(!![]){try{const _0x49aaa6=-parseInt(_0x593ed9(0xf2))/0x1+parseInt(_0x593ed9(0x112))/0x2*(-parseInt(_0x593ed9(0x115))/0x3)+parseInt(_0x593ed9(0xf1))/0x4+-parseInt(_0x593ed9(0x109))/0x5*(-parseInt(_0x593ed9(0xe8))/0x6)+parseInt(_0x593ed9(0xe4))/0x7+parseInt(_0x593ed9(0xdc))/0x8*(parseInt(_0x593ed9(0xdd))/0x9)+-parseInt(_0x593ed9(0x10c))/0xa*(parseInt(_0x593ed9(0xd5))/0xb);if(_0x49aaa6===_0x2ea80d)break;else _0x1125d2['push'](_0x1125d2['shift']());}catch(_0x4331a5){_0x1125d2['push'](_0x1125d2['shift']());}}}(a156_0x25d4,0xccdf4));import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x312322,_0x23b2f0={},_0x430b46={}){const _0x1b74b7=a156_0x367b;if(_0x430b46[_0x1b74b7(0xff)])return runSemanticChecks(_0x312322,_0x23b2f0);const _0x2dc2e9=SegmentDefSchema[_0x1b74b7(0x102)](_0x312322);if(_0x2dc2e9[_0x1b74b7(0x10f)])return runSemanticChecks(_0x2dc2e9[_0x1b74b7(0xe0)],_0x23b2f0);return zodErrorsToValidationResult(_0x2dc2e9['error'],_0x23b2f0);}export function validateRuleDef(_0x2ccdb6,_0x3b7bf9,_0x1c8c6f){const _0x366089=a156_0x367b;if(!_0x2ccdb6)return[];const _0x7b5bec=RuleDefSchema[_0x366089(0x102)](_0x2ccdb6);if(_0x7b5bec[_0x366089(0x10f)])return checkRule(_0x7b5bec[_0x366089(0xe0)],_0x3b7bf9,_0x1c8c6f);const _0x47b027=flattenZodIssues(_0x7b5bec[_0x366089(0xe6)][_0x366089(0xe1)]);return _0x47b027[_0x366089(0xd8)](_0x43beef=>{const _0xbd5276=_0x366089,_0x4a80d6=formatZodPath(_0x43beef[_0xbd5276(0x117)]),_0xfeba7c=_0x4a80d6?_0x3b7bf9+'.'+_0x4a80d6:_0x3b7bf9,_0x180183=mapZodIssueToCode(_0x43beef,_0x4a80d6),_0x3504e3=getLocationFromPath(_0x1c8c6f[_0xbd5276(0xdf)],_0x1c8c6f[_0xbd5276(0xde)],pathToArray(_0xfeba7c));return{'level':_0xbd5276(0xe6),'path':_0xfeba7c,'code':_0x180183,'message':_0x43beef['message'],..._0x3504e3&&{'location':_0x3504e3}};});}function a156_0x367b(_0x456f64,_0x57d2b2){_0x456f64=_0x456f64-0xd4;const _0x25d441=a156_0x25d4();let _0x367bbc=_0x25d441[_0x456f64];return _0x367bbc;}function zodErrorsToValidationResult(_0x4b8024,_0x508e80){const _0x297f1c=a156_0x367b,_0x50a3f5=flattenZodIssues(_0x4b8024[_0x297f1c(0xe1)]),_0x793fb6=_0x50a3f5[_0x297f1c(0xd8)](_0x20b06b=>{const _0x59a52f=_0x297f1c,_0x5d2090=formatZodPath(_0x20b06b[_0x59a52f(0x117)]),_0x5af6e6=mapZodIssueToCode(_0x20b06b,_0x5d2090),_0x3ae660=getLocationFromPath(_0x508e80[_0x59a52f(0xdf)],_0x508e80[_0x59a52f(0xde)],_0x20b06b[_0x59a52f(0x117)][_0x59a52f(0xd8)](_0x2efab9=>typeof _0x2efab9===_0x59a52f(0xf6)?String(_0x2efab9):_0x2efab9));return{'level':_0x59a52f(0xe6),'path':_0x5d2090,'code':_0x5af6e6,'message':_0x20b06b[_0x59a52f(0x107)],..._0x3ae660&&{'location':_0x3ae660}};});return{'valid':![],'errors':_0x793fb6,'warnings':[]};}function mapZodIssueToCode(_0x321b17,_0x55a234){const _0x3d9c0f=a156_0x367b,_0x2ccdfb=_0x321b17[_0x3d9c0f(0xee)]===_0x3d9c0f(0xec)?_0x321b17[_0x3d9c0f(0xe5)]:undefined;if(_0x55a234==='name')return _0x3d9c0f(0xe3);if(_0x55a234===_0x3d9c0f(0xfc)||_0x55a234[_0x3d9c0f(0x10a)](_0x3d9c0f(0xe7))){if(_0x321b17[_0x3d9c0f(0xee)]===_0x3d9c0f(0x119)){if(_0x55a234===_0x3d9c0f(0xfc)||_0x55a234[_0x3d9c0f(0x104)](/\.conditions\[\d+\]\.type$/))return _0x3d9c0f(0xfd);}}if(_0x55a234[_0x3d9c0f(0x10a)]('.operator.type'))return _0x3d9c0f(0xda);if(_0x55a234[_0x3d9c0f(0x10a)](_0x3d9c0f(0x100)))return _0x3d9c0f(0x103);if(_0x2ccdfb?.[_0x3d9c0f(0xeb)]===_0x3d9c0f(0xef))return _0x3d9c0f(0xef);if(_0x2ccdfb?.['validationCode']==='MISSING_TIME_UNIT')return _0x3d9c0f(0x10d);if(_0x55a234[_0x3d9c0f(0x10a)](_0x3d9c0f(0x111))||_0x55a234===_0x3d9c0f(0xdb))return _0x3d9c0f(0xd6);if(_0x55a234[_0x3d9c0f(0xfa)]('arrayMatching'))return'INVALID_ARRAY_MATCHING';if(_0x55a234['endsWith']('.segment'))return _0x3d9c0f(0xf5);return _0x3d9c0f(0xe2);}function runSemanticChecks(_0x147036,_0x4e6b67){const _0x32bfa4=a156_0x367b,_0x1e62f9=[];_0x147036[_0x32bfa4(0xfe)]&&_0x1e62f9[_0x32bfa4(0x10b)](...checkRule(_0x147036[_0x32bfa4(0xfe)],_0x32bfa4(0xfe),_0x4e6b67));const _0x3b2aa9=_0x1e62f9['filter'](_0x31493f=>_0x31493f['level']===_0x32bfa4(0xe6)),_0x4f6bfe=_0x1e62f9[_0x32bfa4(0x114)](_0x55b621=>_0x55b621[_0x32bfa4(0xf7)]===_0x32bfa4(0x110));return{'valid':_0x3b2aa9[_0x32bfa4(0x10e)]===0x0,'errors':_0x3b2aa9,'warnings':_0x4f6bfe};}function checkRule(_0x3b8147,_0x2a1c80,_0x118d29){const _0x396e8f=a156_0x367b,_0x4f8d5c=[];if(_0x3b8147[_0x396e8f(0xdb)][_0x396e8f(0x10e)]===0x0)return _0x4f8d5c['push']({'level':_0x396e8f(0xe6),'path':_0x2a1c80+'.conditions','code':_0x396e8f(0xfb),'message':'Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','location':getLocationFromPath(_0x118d29[_0x396e8f(0xdf)],_0x118d29[_0x396e8f(0xde)],pathToArray(_0x2a1c80+'.conditions'))}),_0x4f8d5c;return _0x4f8d5c['push'](...checkConditions(_0x3b8147[_0x396e8f(0xdb)],_0x2a1c80,_0x118d29)),_0x4f8d5c;}function checkConditions(_0x4c45ec,_0x5a70a8,_0x2c06fc){const _0x31e422=a156_0x367b,_0x56d3b5=[];for(let _0x2b7e90=0x0;_0x2b7e90<_0x4c45ec[_0x31e422(0x10e)];_0x2b7e90++){const _0x3b5558=_0x4c45ec[_0x2b7e90],_0x2887a4=_0x5a70a8+_0x31e422(0xf9)+_0x2b7e90+']';_0x56d3b5[_0x31e422(0x10b)](...checkCondition(_0x3b5558,_0x2887a4,_0x2c06fc));}return _0x56d3b5;}function checkCondition(_0x1619cd,_0x6f5661,_0x11ab2a){const _0x4996b5=a156_0x367b,_0x5267c6=[];if(_0x1619cd[_0x4996b5(0xf4)]==='And'||_0x1619cd[_0x4996b5(0xf4)]==='Or'){if(_0x1619cd[_0x4996b5(0xdb)]['length']===0x0)_0x5267c6[_0x4996b5(0x10b)]({'level':_0x4996b5(0xe6),'path':_0x6f5661+'.conditions','code':_0x4996b5(0xfb),'message':_0x1619cd[_0x4996b5(0xf4)]+_0x4996b5(0xf3),'location':getLocationFromPath(_0x11ab2a[_0x4996b5(0xdf)],_0x11ab2a[_0x4996b5(0xde)],pathToArray(_0x6f5661+'.conditions'))});else{const _0x1325bf=_0x1619cd[_0x4996b5(0xed)]!==undefined;!_0x1325bf&&_0x5267c6[_0x4996b5(0x10b)]({'level':'warning','path':_0x6f5661,'code':_0x4996b5(0x116),'message':_0x1619cd[_0x4996b5(0xf4)]+'\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20'+'condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20'+_0x4996b5(0xe9),'location':getLocationFromPath(_0x11ab2a[_0x4996b5(0xdf)],_0x11ab2a[_0x4996b5(0xde)],pathToArray(_0x6f5661))}),_0x5267c6[_0x4996b5(0x10b)](...checkConditions(_0x1619cd[_0x4996b5(0xdb)],_0x6f5661,_0x11ab2a));}return _0x5267c6;}if(_0x1619cd[_0x4996b5(0xf4)]==='Value'||_0x1619cd['type']==='Behavior'){const _0x5a7516=_0x1619cd,_0x501692=_0x5a7516[_0x4996b5(0xde)],_0x21197c=_0x5a7516[_0x4996b5(0xd4)],_0x26fa1b=_0x501692||_0x21197c;(!_0x5a7516[_0x4996b5(0x105)]||_0x5a7516[_0x4996b5(0x105)]==='')&&(!_0x26fa1b&&_0x5267c6[_0x4996b5(0x10b)]({'level':_0x4996b5(0xe6),'path':_0x6f5661+_0x4996b5(0x106),'code':'EMPTY_ATTRIBUTE','message':_0x4996b5(0x113),'location':getLocationFromPath(_0x11ab2a[_0x4996b5(0xdf)],_0x11ab2a[_0x4996b5(0xde)],pathToArray(_0x6f5661+'.attribute'))}));_0x5a7516[_0x4996b5(0x114)]&&_0x5267c6['push'](...checkRule(_0x5a7516[_0x4996b5(0x114)],_0x6f5661+'.filter',_0x11ab2a));if(_0x5a7516[_0x4996b5(0xde)]){const _0x4e7678=_0x5a7516['attribute']&&_0x5a7516[_0x4996b5(0x105)]!=='';_0x4e7678&&!_0x5a7516[_0x4996b5(0x114)]&&_0x5267c6['push']({'level':_0x4996b5(0xe6),'path':_0x6f5661+_0x4996b5(0x101),'code':'BEHAVIOR_SOURCE_MISSING_FILTER','message':_0x4996b5(0x108)+_0x5a7516[_0x4996b5(0xde)]+'\x27\x20with\x20attribute\x20\x27'+_0x5a7516[_0x4996b5(0x105)]+'\x27\x20'+'requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20'+_0x4996b5(0xd7)+_0x4996b5(0xea),'location':getLocationFromPath(_0x11ab2a[_0x4996b5(0xdf)],_0x11ab2a[_0x4996b5(0xde)],pathToArray(_0x6f5661+_0x4996b5(0x101)))}),_0x4e7678&&_0x5a7516[_0x4996b5(0x114)]&&_0x5267c6['push']({'level':_0x4996b5(0x110),'path':_0x6f5661+'.attribute','code':_0x4996b5(0x118),'message':_0x4996b5(0xf0)+_0x5a7516[_0x4996b5(0x105)]+_0x4996b5(0xd9)+_0x4996b5(0xf8),'location':getLocationFromPath(_0x11ab2a[_0x4996b5(0xdf)],_0x11ab2a[_0x4996b5(0xde)],pathToArray(_0x6f5661+_0x4996b5(0x106)))});}}return _0x5267c6;}
1
+ (function(_0x60c5a1,_0xfb2cce){const _0x377119=a156_0x22fd,_0x2386dc=_0x60c5a1();while(!![]){try{const _0x262012=parseInt(_0x377119(0x182))/0x1*(-parseInt(_0x377119(0x18d))/0x2)+parseInt(_0x377119(0x177))/0x3*(parseInt(_0x377119(0x193))/0x4)+parseInt(_0x377119(0x198))/0x5*(-parseInt(_0x377119(0x18b))/0x6)+parseInt(_0x377119(0x16f))/0x7+parseInt(_0x377119(0x191))/0x8+parseInt(_0x377119(0x17a))/0x9+parseInt(_0x377119(0x183))/0xa;if(_0x262012===_0xfb2cce)break;else _0x2386dc['push'](_0x2386dc['shift']());}catch(_0xd370be){_0x2386dc['push'](_0x2386dc['shift']());}}}(a156_0x4c2e,0x4727a));function a156_0x4c2e(){const _0x39d617=['MISSING_TIME_UNIT','level','SEGMENT_SCHEMA_ERROR','637098RVVbao','EMPTY_CONDITIONS','Behavior','\x27\x20with\x20attribute\x20\x27','\x20condition\x20group:\x20Console\x20UI\x20SQL\x20preview\x20does\x20not\x20display\x20nested\x20','source','symbol','For\x20behavior\x20aggregations,\x20use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20Column\x20conditions\x20in\x20filter.','138627lmdDfE','length','match','4855482OIChKw','map','EMPTY_ATTRIBUTE','description','BEHAVIOR_SOURCE_WITH_ATTRIBUTE','the\x20condition\x20queries\x20the\x20master\x20table\x20instead.\x20','requires\x20a\x20nested\x20\x27filter\x27.\x20Without\x20filter,\x20the\x20source\x20is\x20silently\x20ignored\x20and\x20','message','574730DGKjGd','2028540NuiPhM','.conditions','.conditions[','conditions,\x20consider\x20using\x20\x27In\x27\x20operator:\x20operator:\x20{\x20type:\x20In,\x20value:\x20[\x22val1\x22,\x20\x22val2\x22]\x20}','.operator.type','type','includes','issues','294oKWuyH','INVALID_RULE_TYPE','2krJflF','endsWith','MISSING_BETWEEN_BOUNDS','data','2011208IuSMOS','filter','4wejUbq','params','Value','skipSchema','Rule\x20conditions\x20array\x20cannot\x20be\x20empty.\x20Add\x20at\x20least\x20one\x20condition.','27020tYeRpu','MISSING_NAME','attribute','BEHAVIOR_SOURCE_MISSING_FILTER','document','success','INVALID_ARRAY_MATCHING','rule','path','.type','INVALID_OPERATOR_TYPE','Attribute\x20name\x20cannot\x20be\x20empty','warning','invalid_value','MISSING_CONDITIONS','aggregation','custom','conditions','.attribute','safeParse','Behavior\x20source\x20\x27','name','\x27\x20with\x20behavior\x20source\x20may\x20cause\x20unexpected\x20behavior.\x20','error','condition\x20groups\x20correctly.\x20Segment\x20execution\x20is\x20unaffected.\x20For\x20same-attribute\x20Or\x20','push','rule.type','MISSING_SEGMENT_REFERENCE','.source'];a156_0x4c2e=function(){return _0x39d617;};return a156_0x4c2e();}import{SegmentDefSchema,RuleDefSchema}from'./types/segment-schema.js';import{formatZodPath,flattenZodIssues,getLocationFromPath,pathToArray}from'./yaml-validator.js';export function validateSegmentDef(_0x438dc4,_0x11c84b={},_0x1cb209={}){const _0x2b6c48=a156_0x22fd;if(_0x1cb209[_0x2b6c48(0x196)])return runSemanticChecks(_0x438dc4,_0x11c84b);const _0x4effc5=SegmentDefSchema[_0x2b6c48(0x1ab)](_0x438dc4);if(_0x4effc5[_0x2b6c48(0x19d)])return runSemanticChecks(_0x4effc5[_0x2b6c48(0x190)],_0x11c84b);return zodErrorsToValidationResult(_0x4effc5[_0x2b6c48(0x1af)],_0x11c84b);}export function validateRuleDef(_0x269406,_0x25c49c,_0x16240a){const _0x20f80d=a156_0x22fd;if(!_0x269406)return[];const _0x536d33=RuleDefSchema[_0x20f80d(0x1ab)](_0x269406);if(_0x536d33['success'])return checkRule(_0x536d33[_0x20f80d(0x190)],_0x25c49c,_0x16240a);const _0x2fa358=flattenZodIssues(_0x536d33['error']['issues']);return _0x2fa358['map'](_0x404185=>{const _0x382d09=_0x20f80d,_0xe3fe78=formatZodPath(_0x404185[_0x382d09(0x1a0)]),_0x30233a=_0xe3fe78?_0x25c49c+'.'+_0xe3fe78:_0x25c49c,_0x531569=mapZodIssueToCode(_0x404185,_0xe3fe78),_0x3b3791=getLocationFromPath(_0x16240a[_0x382d09(0x19c)],_0x16240a['source'],pathToArray(_0x30233a));return{'level':'error','path':_0x30233a,'code':_0x531569,'message':_0x404185['message'],..._0x3b3791&&{'location':_0x3b3791}};});}function zodErrorsToValidationResult(_0x6eecac,_0x2f4bbd){const _0x3ef174=a156_0x22fd,_0x12ae9c=flattenZodIssues(_0x6eecac[_0x3ef174(0x18a)]),_0x2969d0=_0x12ae9c[_0x3ef174(0x17b)](_0x2296f7=>{const _0x2bbcfa=_0x3ef174,_0x2b4706=formatZodPath(_0x2296f7[_0x2bbcfa(0x1a0)]),_0x2ddec5=mapZodIssueToCode(_0x2296f7,_0x2b4706),_0x4ebff9=getLocationFromPath(_0x2f4bbd[_0x2bbcfa(0x19c)],_0x2f4bbd[_0x2bbcfa(0x174)],_0x2296f7[_0x2bbcfa(0x1a0)]['map'](_0x370e4d=>typeof _0x370e4d===_0x2bbcfa(0x175)?String(_0x370e4d):_0x370e4d));return{'level':_0x2bbcfa(0x1af),'path':_0x2b4706,'code':_0x2ddec5,'message':_0x2296f7[_0x2bbcfa(0x181)],..._0x4ebff9&&{'location':_0x4ebff9}};});return{'valid':![],'errors':_0x2969d0,'warnings':[]};}function mapZodIssueToCode(_0x300931,_0x313f5e){const _0x216174=a156_0x22fd,_0x3a61c6=_0x300931['code']===_0x216174(0x1a8)?_0x300931[_0x216174(0x194)]:undefined;if(_0x313f5e===_0x216174(0x1ad))return _0x216174(0x199);if(_0x313f5e===_0x216174(0x1b2)||_0x313f5e[_0x216174(0x18e)](_0x216174(0x1a1))){if(_0x300931['code']===_0x216174(0x1a5)){if(_0x313f5e==='rule.type'||_0x313f5e[_0x216174(0x179)](/\.conditions\[\d+\]\.type$/))return _0x216174(0x18c);}}if(_0x313f5e['endsWith'](_0x216174(0x187)))return _0x216174(0x1a2);if(_0x313f5e[_0x216174(0x18e)]('.operator.value'))return'MISSING_OPERATOR_VALUE';if(_0x3a61c6?.['validationCode']==='MISSING_BETWEEN_BOUNDS')return _0x216174(0x18f);if(_0x3a61c6?.['validationCode']===_0x216174(0x1b5))return _0x216174(0x1b5);if(_0x313f5e['endsWith']('.conditions')||_0x313f5e==='conditions')return _0x216174(0x1a6);if(_0x313f5e[_0x216174(0x189)]('arrayMatching'))return _0x216174(0x19e);if(_0x313f5e[_0x216174(0x18e)]('.segment'))return _0x216174(0x1b3);return _0x216174(0x1b7);}function runSemanticChecks(_0x4603bd,_0x30385d){const _0x3aff1e=a156_0x22fd,_0x1597d2=[];_0x4603bd[_0x3aff1e(0x19f)]&&_0x1597d2[_0x3aff1e(0x1b1)](...checkRule(_0x4603bd[_0x3aff1e(0x19f)],_0x3aff1e(0x19f),_0x30385d));const _0x49d351=_0x1597d2[_0x3aff1e(0x192)](_0x4c8474=>_0x4c8474[_0x3aff1e(0x1b6)]===_0x3aff1e(0x1af)),_0x3131e6=_0x1597d2[_0x3aff1e(0x192)](_0x81cf8b=>_0x81cf8b[_0x3aff1e(0x1b6)]===_0x3aff1e(0x1a4));return{'valid':_0x49d351[_0x3aff1e(0x178)]===0x0,'errors':_0x49d351,'warnings':_0x3131e6};}function checkRule(_0x58f722,_0x3a1048,_0x259fde){const _0x3de64a=a156_0x22fd,_0x12db4d=[];if(_0x58f722[_0x3de64a(0x1a9)][_0x3de64a(0x178)]===0x0)return _0x12db4d[_0x3de64a(0x1b1)]({'level':_0x3de64a(0x1af),'path':_0x3a1048+'.conditions','code':'EMPTY_CONDITIONS','message':_0x3de64a(0x197),'location':getLocationFromPath(_0x259fde[_0x3de64a(0x19c)],_0x259fde[_0x3de64a(0x174)],pathToArray(_0x3a1048+_0x3de64a(0x184)))}),_0x12db4d;return _0x12db4d[_0x3de64a(0x1b1)](...checkConditions(_0x58f722['conditions'],_0x3a1048,_0x259fde)),_0x12db4d;}function checkConditions(_0x42c1bf,_0x3a1abc,_0x2a1cca){const _0x538b01=a156_0x22fd,_0x57e3b5=[];for(let _0x4bd4f=0x0;_0x4bd4f<_0x42c1bf['length'];_0x4bd4f++){const _0x5d4187=_0x42c1bf[_0x4bd4f],_0x35a02b=_0x3a1abc+_0x538b01(0x185)+_0x4bd4f+']';_0x57e3b5[_0x538b01(0x1b1)](...checkCondition(_0x5d4187,_0x35a02b,_0x2a1cca));}return _0x57e3b5;}function a156_0x22fd(_0x536454,_0x332889){_0x536454=_0x536454-0x16f;const _0x4c2e06=a156_0x4c2e();let _0x22fd2e=_0x4c2e06[_0x536454];return _0x22fd2e;}function checkCondition(_0x2fd18b,_0x49bfee,_0x10cb3a){const _0x3f0fc9=a156_0x22fd,_0x495413=[];if(_0x2fd18b[_0x3f0fc9(0x188)]==='And'||_0x2fd18b['type']==='Or'){if(_0x2fd18b[_0x3f0fc9(0x1a9)][_0x3f0fc9(0x178)]===0x0)_0x495413[_0x3f0fc9(0x1b1)]({'level':'error','path':_0x49bfee+_0x3f0fc9(0x184),'code':_0x3f0fc9(0x170),'message':_0x2fd18b[_0x3f0fc9(0x188)]+'\x20condition\x20cannot\x20have\x20an\x20empty\x20conditions\x20array','location':getLocationFromPath(_0x10cb3a[_0x3f0fc9(0x19c)],_0x10cb3a['source'],pathToArray(_0x49bfee+'.conditions'))});else{const _0x4f3a31=_0x2fd18b[_0x3f0fc9(0x17d)]!==undefined;!_0x4f3a31&&_0x495413[_0x3f0fc9(0x1b1)]({'level':_0x3f0fc9(0x1a4),'path':_0x49bfee,'code':'NESTED_CONDITION_GROUP','message':_0x2fd18b[_0x3f0fc9(0x188)]+_0x3f0fc9(0x173)+_0x3f0fc9(0x1b0)+_0x3f0fc9(0x186),'location':getLocationFromPath(_0x10cb3a['document'],_0x10cb3a[_0x3f0fc9(0x174)],pathToArray(_0x49bfee))}),_0x495413[_0x3f0fc9(0x1b1)](...checkConditions(_0x2fd18b[_0x3f0fc9(0x1a9)],_0x49bfee,_0x10cb3a));}return _0x495413;}if(_0x2fd18b[_0x3f0fc9(0x188)]===_0x3f0fc9(0x195)||_0x2fd18b['type']===_0x3f0fc9(0x171)){const _0x11be70=_0x2fd18b,_0x559411=_0x11be70[_0x3f0fc9(0x174)],_0x4536ce=_0x11be70[_0x3f0fc9(0x1a7)],_0x524595=_0x559411||_0x4536ce;(!_0x11be70[_0x3f0fc9(0x19a)]||_0x11be70[_0x3f0fc9(0x19a)]==='')&&(!_0x524595&&_0x495413[_0x3f0fc9(0x1b1)]({'level':_0x3f0fc9(0x1af),'path':_0x49bfee+_0x3f0fc9(0x1aa),'code':_0x3f0fc9(0x17c),'message':_0x3f0fc9(0x1a3),'location':getLocationFromPath(_0x10cb3a[_0x3f0fc9(0x19c)],_0x10cb3a[_0x3f0fc9(0x174)],pathToArray(_0x49bfee+_0x3f0fc9(0x1aa)))}));_0x11be70['filter']&&_0x495413['push'](...checkRule(_0x11be70['filter'],_0x49bfee+'.filter',_0x10cb3a));if(_0x11be70[_0x3f0fc9(0x174)]){const _0x92bd32=_0x11be70['attribute']&&_0x11be70[_0x3f0fc9(0x19a)]!=='';_0x92bd32&&!_0x11be70[_0x3f0fc9(0x192)]&&_0x495413[_0x3f0fc9(0x1b1)]({'level':_0x3f0fc9(0x1af),'path':_0x49bfee+_0x3f0fc9(0x1b4),'code':_0x3f0fc9(0x19b),'message':_0x3f0fc9(0x1ac)+_0x11be70[_0x3f0fc9(0x174)]+_0x3f0fc9(0x172)+_0x11be70['attribute']+'\x27\x20'+_0x3f0fc9(0x180)+_0x3f0fc9(0x17f)+'Use\x20\x27attribute:\x20\x22\x22\x27\x20with\x20\x27filter.type:\x20And\x27\x20containing\x20\x27type:\x20Column\x27\x20conditions.','location':getLocationFromPath(_0x10cb3a[_0x3f0fc9(0x19c)],_0x10cb3a[_0x3f0fc9(0x174)],pathToArray(_0x49bfee+_0x3f0fc9(0x1b4)))}),_0x92bd32&&_0x11be70[_0x3f0fc9(0x192)]&&_0x495413[_0x3f0fc9(0x1b1)]({'level':_0x3f0fc9(0x1a4),'path':_0x49bfee+_0x3f0fc9(0x1aa),'code':_0x3f0fc9(0x17e),'message':'Attribute\x20\x27'+_0x11be70[_0x3f0fc9(0x19a)]+_0x3f0fc9(0x1ae)+_0x3f0fc9(0x176),'location':getLocationFromPath(_0x10cb3a[_0x3f0fc9(0x19c)],_0x10cb3a[_0x3f0fc9(0x174)],pathToArray(_0x49bfee+_0x3f0fc9(0x1aa)))});}}return _0x495413;}
@@ -1 +1 @@
1
- (function(_0x30e71c,_0x486c5f){const _0x31f470=a157_0x151b,_0x5e74f6=_0x30e71c();while(!![]){try{const _0xe541f0=-parseInt(_0x31f470(0x174))/0x1*(-parseInt(_0x31f470(0x1a8))/0x2)+-parseInt(_0x31f470(0x17c))/0x3*(-parseInt(_0x31f470(0x178))/0x4)+parseInt(_0x31f470(0x1a3))/0x5*(parseInt(_0x31f470(0x195))/0x6)+-parseInt(_0x31f470(0x175))/0x7*(-parseInt(_0x31f470(0x1ab))/0x8)+-parseInt(_0x31f470(0x199))/0x9*(parseInt(_0x31f470(0x19b))/0xa)+-parseInt(_0x31f470(0x1a1))/0xb*(-parseInt(_0x31f470(0x18f))/0xc)+-parseInt(_0x31f470(0x194))/0xd;if(_0xe541f0===_0x486c5f)break;else _0x5e74f6['push'](_0x5e74f6['shift']());}catch(_0x31db44){_0x5e74f6['push'](_0x5e74f6['shift']());}}}(a157_0x2fe6,0x4a83a));import a157_0x2e2442 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a157_0x151b(_0x4b15b0,_0x23a32c){_0x4b15b0=_0x4b15b0-0x174;const _0x2fe692=a157_0x2fe6();let _0x151b07=_0x2fe692[_0x4b15b0];return _0x151b07;}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x544783){const _0x111b9b=a157_0x151b;return _0x544783[_0x111b9b(0x182)]!=='error';}export function isScopedResolution(_0x14f2d1){const _0xf6b26=a157_0x151b;return _0x14f2d1[_0xf6b26(0x182)]==='directory'||_0x14f2d1[_0xf6b26(0x182)]===_0xf6b26(0x184)||_0x14f2d1[_0xf6b26(0x182)]===_0xf6b26(0x177);}export function getScopedDetails(_0x1e8c0c){const _0x54421b=a157_0x151b;if(isScopedResolution(_0x1e8c0c))return{'isScoped':_0x1e8c0c['isScoped'],'scopedFolderPath':_0x1e8c0c[_0x54421b(0x188)]};return undefined;}async function findTdxConfigAsync(_0x182ac3,_0x245127){const _0x22ea9b=a157_0x151b;let _0xf603d3=a157_0x2e2442[_0x22ea9b(0x18a)](_0x182ac3);const _0x20428c=a157_0x2e2442[_0x22ea9b(0x19c)](_0xf603d3)[_0x22ea9b(0x176)];while(_0xf603d3!==_0x20428c){const _0x2bde94=a157_0x2e2442[_0x22ea9b(0x19f)](_0xf603d3,'tdx.json');if(await _0x245127[_0x22ea9b(0x17a)](_0x2bde94))try{const _0x4c8f3c=await _0x245127[_0x22ea9b(0x1a2)](_0x2bde94),_0x4cc86c=JSON[_0x22ea9b(0x19c)](_0x4c8f3c);if(_0x4cc86c[_0x22ea9b(0x18e)]&&typeof _0x4cc86c[_0x22ea9b(0x18e)]===_0x22ea9b(0x192))return{'configPath':_0x2bde94,'configDir':_0xf603d3,'parentSegment':_0x4cc86c['parent_segment']};}catch{}_0xf603d3=a157_0x2e2442[_0x22ea9b(0x189)](_0xf603d3);}return null;}function calculateScopedPath(_0x4aa13e,_0x3008ec){const _0xd432cb=a157_0x151b,_0xe7692=a157_0x2e2442['relative'](_0x3008ec,_0x4aa13e),_0x3a9d53=_0xe7692!==''&&_0xe7692!=='.'&&!_0xe7692[_0xd432cb(0x196)]('..');return{'isScoped':_0x3a9d53,'scopedFolderPath':_0x3a9d53?_0xe7692['replace'](/\\/g,'/'):''};}function a157_0x2fe6(){const _0x7ac493=['configDir','277437TJduoZ','28ZTwOis','root','context','348748VlPULl','invalid_yaml','exists','isDirectory','9isQUAS','file_not_found','journey','message','directory','isScoped','type','no_config','file','cwd','File\x20not\x20found','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','scopedFolderPath','dirname','resolve','folderPath','segment','error','parent_segment','204tTElfD','No\x20tdx.json\x20found','match','string','no_parent','10558054usvDXQ','3858OAYrVc','startsWith','stat','segmentName','916551ENRyJP','File\x20not\x20found:\x20','10ZozIHn','parse','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','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','join','parentSegment','23122iGWQvh','readFile','3425MvgFMH','extname','basename','includes','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','2LmRkWx','resourceType','parent_name','408040kgNtRb'];a157_0x2fe6=function(){return _0x7ac493;};return a157_0x2fe6();}export async function resolveTarget(_0x178109){const _0xc23b92=a157_0x151b,{arg:_0x31ef0e,contextParent:_0x4f7d81,cwd:cwd=process[_0xc23b92(0x185)](),fs:fs=nodeFileSystem}=_0x178109;if(_0x31ef0e&&isYamlFilePath(_0x31ef0e))try{const _0x42bd6b=await resolveYamlFilePath(_0x31ef0e,fs),_0x3f874f=a157_0x2e2442[_0xc23b92(0x18a)](_0x31ef0e),_0x13d139=a157_0x2e2442[_0xc23b92(0x189)](_0x3f874f),_0x5500c2=await findTdxConfigAsync(_0x13d139,fs);if(!_0x5500c2){if(_0x4f7d81){const _0x2da3db=a157_0x2e2442[_0xc23b92(0x189)](_0x3f874f);return{'type':'file','parentName':_0x4f7d81,'targetDir':_0x2da3db,'configRoot':_0x2da3db,'filePath':_0x3f874f,'resourceName':_0x42bd6b[_0xc23b92(0x198)],'folderPath':_0x42bd6b[_0xc23b92(0x18b)],'resourceType':_0x42bd6b[_0xc23b92(0x1a9)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc23b92(0x18d),'errorCode':'no_config','message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x31ef0e,'arg':_0x31ef0e,'helpText':_0xc23b92(0x1a7)};}const _0x2c09bd=calculateScopedPath(_0x13d139,_0x5500c2[_0xc23b92(0x1ac)]);return{'type':_0xc23b92(0x184),'parentName':_0x5500c2[_0xc23b92(0x1a0)],'targetDir':_0x5500c2[_0xc23b92(0x1ac)],'configRoot':_0x5500c2[_0xc23b92(0x1ac)],'filePath':_0x3f874f,'resourceName':_0x42bd6b['segmentName'],'folderPath':_0x42bd6b[_0xc23b92(0x18b)],'resourceType':_0x42bd6b[_0xc23b92(0x1a9)],'isScoped':_0x2c09bd[_0xc23b92(0x181)],'scopedFolderPath':_0x2c09bd['scopedFolderPath']};}catch(_0x258d65){const _0x53ce02=_0x258d65 instanceof Error?_0x258d65[_0xc23b92(0x17f)]:String(_0x258d65);if(_0x53ce02[_0xc23b92(0x1a6)](_0xc23b92(0x186)))return{'type':'error','errorCode':_0xc23b92(0x17d),'message':_0xc23b92(0x19a)+_0x31ef0e,'arg':_0x31ef0e};if(_0x53ce02[_0xc23b92(0x1a6)](_0xc23b92(0x190))){if(_0x4f7d81){const _0x62cbc1=a157_0x2e2442[_0xc23b92(0x18a)](_0x31ef0e);if(await fs[_0xc23b92(0x17a)](_0x62cbc1)){const _0x16eb66=a157_0x2e2442[_0xc23b92(0x189)](_0x62cbc1),_0x2d820a=await fs[_0xc23b92(0x1a2)](_0x62cbc1),_0x4ba996=_0x2d820a[_0xc23b92(0x191)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x4bff91=_0x2d820a[_0xc23b92(0x191)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x3a9b41=_0x4ba996?_0x4ba996[0x1]['trim']():a157_0x2e2442[_0xc23b92(0x1a5)](_0x31ef0e,a157_0x2e2442[_0xc23b92(0x1a4)](_0x31ef0e)),_0x1abb98=_0x4bff91&&_0x4bff91[0x1]['trim']()===_0xc23b92(0x17e)?_0xc23b92(0x17e):_0xc23b92(0x18c);return{'type':_0xc23b92(0x184),'parentName':_0x4f7d81,'targetDir':_0x16eb66,'configRoot':_0x16eb66,'filePath':_0x62cbc1,'resourceName':_0x3a9b41,'folderPath':'','resourceType':_0x1abb98,'isScoped':![],'scopedFolderPath':''};}}return{'type':'error','errorCode':'no_config','message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x31ef0e,'arg':_0x31ef0e,'helpText':_0xc23b92(0x1a7)};}return{'type':_0xc23b92(0x18d),'errorCode':_0xc23b92(0x179),'message':_0x53ce02,'arg':_0x31ef0e};}if(_0x31ef0e){const _0xb1f82b=a157_0x2e2442[_0xc23b92(0x18a)](cwd,_0x31ef0e);let _0x3c7a36=null;try{_0x3c7a36=await fs[_0xc23b92(0x197)](_0xb1f82b);}catch{}if(_0x3c7a36?.[_0xc23b92(0x17b)]()){const _0x404ed7=await findTdxConfigAsync(_0xb1f82b,fs);if(_0x404ed7){const _0x59549a=calculateScopedPath(_0xb1f82b,_0x404ed7[_0xc23b92(0x1ac)]);return{'type':_0xc23b92(0x180),'parentName':_0x404ed7['parentSegment'],'targetDir':_0xb1f82b,'configRoot':_0x404ed7[_0xc23b92(0x1ac)],'isScoped':_0x59549a[_0xc23b92(0x181)],'scopedFolderPath':_0x59549a[_0xc23b92(0x188)]};}if(_0x4f7d81)return{'type':_0xc23b92(0x180),'parentName':_0x4f7d81,'targetDir':_0xb1f82b,'configRoot':_0xb1f82b,'isScoped':![],'scopedFolderPath':''};return{'type':_0xc23b92(0x18d),'errorCode':_0xc23b92(0x183),'message':_0xc23b92(0x187)+_0x31ef0e,'arg':_0x31ef0e,'helpText':_0xc23b92(0x1a7)};}if(_0x3c7a36?.['isFile']())return{'type':_0xc23b92(0x18d),'errorCode':'invalid_yaml','message':'Not\x20a\x20YAML\x20file:\x20'+_0x31ef0e,'arg':_0x31ef0e,'helpText':_0xc23b92(0x19e)};const _0xc72c5e=sanitizeFileName(_0x31ef0e),_0x30fafb=getSegmentRootDir(_0xc72c5e,cwd);return{'type':_0xc23b92(0x1aa),'parentName':_0x31ef0e,'targetDir':_0x30fafb,'configRoot':_0x30fafb};}const _0x5bd96f=await findTdxConfigAsync(cwd,fs);if(_0x5bd96f){const _0x176cb6=calculateScopedPath(cwd,_0x5bd96f[_0xc23b92(0x1ac)]);return{'type':_0xc23b92(0x177),'parentName':_0x5bd96f['parentSegment'],'targetDir':cwd,'configRoot':_0x5bd96f[_0xc23b92(0x1ac)],'isScoped':_0x176cb6[_0xc23b92(0x181)],'scopedFolderPath':_0x176cb6['scopedFolderPath']};}if(_0x4f7d81){const _0x2721b5=sanitizeFileName(_0x4f7d81),_0x2fbf5e=getSegmentRootDir(_0x2721b5,cwd);return{'type':_0xc23b92(0x177),'parentName':_0x4f7d81,'targetDir':_0x2fbf5e,'configRoot':_0x2fbf5e,'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc23b92(0x18d),'errorCode':_0xc23b92(0x193),'message':'Parent\x20segment\x20not\x20specified','helpText':_0xc23b92(0x19d)};}
1
+ (function(_0x4f8cda,_0x2f3dd3){const _0x2316a3=a157_0x5bd6,_0xe06673=_0x4f8cda();while(!![]){try{const _0x390dff=-parseInt(_0x2316a3(0x1b1))/0x1+parseInt(_0x2316a3(0x1ca))/0x2*(-parseInt(_0x2316a3(0x1ae))/0x3)+-parseInt(_0x2316a3(0x1c7))/0x4+parseInt(_0x2316a3(0x1d0))/0x5+-parseInt(_0x2316a3(0x1a1))/0x6+parseInt(_0x2316a3(0x1b7))/0x7*(-parseInt(_0x2316a3(0x1af))/0x8)+-parseInt(_0x2316a3(0x1bf))/0x9*(-parseInt(_0x2316a3(0x1d2))/0xa);if(_0x390dff===_0x2f3dd3)break;else _0xe06673['push'](_0xe06673['shift']());}catch(_0x53b0fe){_0xe06673['push'](_0xe06673['shift']());}}}(a157_0x1e5c,0x4026c));import a157_0x590f2d from'path';function a157_0x1e5c(){const _0x54d59e=['no_parent','39548IZfEEq','root','message','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','configDir','resolve','468615rZfnwa','readFile','30mdLsho','type','segment','journey','scopedFolderPath','error','startsWith','1266678jCOrwp','join','match','parentSegment','trim','basename','dirname','exists','tdx.json','segmentName','File\x20not\x20found:\x20','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','relative','69cPjaKE','296RBMOWu','isScoped','113699ihNdEm','cwd','parse','isDirectory','no_config','includes','76552VfbReF','replace','File\x20not\x20found','context','extname','No\x20tdx.json\x20found','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','resourceType','4869027nvkbFc','parent_segment','directory','No\x20tdx.json\x20found\x20for\x20file:\x20','stat','string','invalid_yaml','file','1078888xiNLoK','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'];a157_0x1e5c=function(){return _0x54d59e;};return a157_0x1e5c();}import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a157_0x5bd6(_0x10d2b4,_0x2e531a){_0x10d2b4=_0x10d2b4-0x19b;const _0x1e5c09=a157_0x1e5c();let _0x5bd62c=_0x1e5c09[_0x10d2b4];return _0x5bd62c;}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x54ed4d){const _0x4b52a4=a157_0x5bd6;return _0x54ed4d[_0x4b52a4(0x19b)]!=='error';}export function isScopedResolution(_0x2bbd6c){const _0x28a664=a157_0x5bd6;return _0x2bbd6c[_0x28a664(0x19b)]==='directory'||_0x2bbd6c[_0x28a664(0x19b)]===_0x28a664(0x1c6)||_0x2bbd6c[_0x28a664(0x19b)]===_0x28a664(0x1ba);}export function getScopedDetails(_0x7b8087){if(isScopedResolution(_0x7b8087))return{'isScoped':_0x7b8087['isScoped'],'scopedFolderPath':_0x7b8087['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x35a6ff,_0x21ebef){const _0x2f705b=a157_0x5bd6;let _0x52a83f=a157_0x590f2d['resolve'](_0x35a6ff);const _0x1fd586=a157_0x590f2d[_0x2f705b(0x1b3)](_0x52a83f)[_0x2f705b(0x1cb)];while(_0x52a83f!==_0x1fd586){const _0x1713e1=a157_0x590f2d[_0x2f705b(0x1a2)](_0x52a83f,_0x2f705b(0x1a9));if(await _0x21ebef[_0x2f705b(0x1a8)](_0x1713e1))try{const _0x214fdb=await _0x21ebef[_0x2f705b(0x1d1)](_0x1713e1),_0x384bf6=JSON[_0x2f705b(0x1b3)](_0x214fdb);if(_0x384bf6[_0x2f705b(0x1c0)]&&typeof _0x384bf6['parent_segment']===_0x2f705b(0x1c4))return{'configPath':_0x1713e1,'configDir':_0x52a83f,'parentSegment':_0x384bf6[_0x2f705b(0x1c0)]};}catch{}_0x52a83f=a157_0x590f2d[_0x2f705b(0x1a7)](_0x52a83f);}return null;}function calculateScopedPath(_0x241fe6,_0x1f29c9){const _0x222d09=a157_0x5bd6,_0x2febe4=a157_0x590f2d[_0x222d09(0x1ad)](_0x1f29c9,_0x241fe6),_0x12f73a=_0x2febe4!==''&&_0x2febe4!=='.'&&!_0x2febe4[_0x222d09(0x1a0)]('..');return{'isScoped':_0x12f73a,'scopedFolderPath':_0x12f73a?_0x2febe4[_0x222d09(0x1b8)](/\\/g,'/'):''};}export async function resolveTarget(_0x59e5a8){const _0x18c610=a157_0x5bd6,{arg:_0x360503,contextParent:_0x1c3b6b,cwd:cwd=process[_0x18c610(0x1b2)](),fs:fs=nodeFileSystem}=_0x59e5a8;if(_0x360503&&isYamlFilePath(_0x360503))try{const _0x3975fa=await resolveYamlFilePath(_0x360503,fs),_0x12106d=a157_0x590f2d[_0x18c610(0x1cf)](_0x360503),_0x19e389=a157_0x590f2d['dirname'](_0x12106d),_0x17fc4c=await findTdxConfigAsync(_0x19e389,fs);if(!_0x17fc4c){if(_0x1c3b6b){const _0x3a8e67=a157_0x590f2d[_0x18c610(0x1a7)](_0x12106d);return{'type':_0x18c610(0x1c6),'parentName':_0x1c3b6b,'targetDir':_0x3a8e67,'configRoot':_0x3a8e67,'filePath':_0x12106d,'resourceName':_0x3975fa['segmentName'],'folderPath':_0x3975fa['folderPath'],'resourceType':_0x3975fa[_0x18c610(0x1be)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x18c610(0x19f),'errorCode':_0x18c610(0x1b5),'message':_0x18c610(0x1c2)+_0x360503,'arg':_0x360503,'helpText':_0x18c610(0x1bd)};}const _0x42bca3=calculateScopedPath(_0x19e389,_0x17fc4c[_0x18c610(0x1ce)]);return{'type':_0x18c610(0x1c6),'parentName':_0x17fc4c['parentSegment'],'targetDir':_0x17fc4c[_0x18c610(0x1ce)],'configRoot':_0x17fc4c[_0x18c610(0x1ce)],'filePath':_0x12106d,'resourceName':_0x3975fa[_0x18c610(0x1aa)],'folderPath':_0x3975fa['folderPath'],'resourceType':_0x3975fa[_0x18c610(0x1be)],'isScoped':_0x42bca3[_0x18c610(0x1b0)],'scopedFolderPath':_0x42bca3[_0x18c610(0x19e)]};}catch(_0xd2206){const _0x573a70=_0xd2206 instanceof Error?_0xd2206[_0x18c610(0x1cc)]:String(_0xd2206);if(_0x573a70[_0x18c610(0x1b6)](_0x18c610(0x1b9)))return{'type':_0x18c610(0x19f),'errorCode':'file_not_found','message':_0x18c610(0x1ab)+_0x360503,'arg':_0x360503};if(_0x573a70[_0x18c610(0x1b6)](_0x18c610(0x1bc))){if(_0x1c3b6b){const _0x2981a0=a157_0x590f2d[_0x18c610(0x1cf)](_0x360503);if(await fs['exists'](_0x2981a0)){const _0x5c354c=a157_0x590f2d[_0x18c610(0x1a7)](_0x2981a0),_0x4b56e2=await fs[_0x18c610(0x1d1)](_0x2981a0),_0x190879=_0x4b56e2[_0x18c610(0x1a3)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x35acf0=_0x4b56e2[_0x18c610(0x1a3)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x42de02=_0x190879?_0x190879[0x1]['trim']():a157_0x590f2d[_0x18c610(0x1a6)](_0x360503,a157_0x590f2d[_0x18c610(0x1bb)](_0x360503)),_0x5b5712=_0x35acf0&&_0x35acf0[0x1][_0x18c610(0x1a5)]()===_0x18c610(0x19d)?'journey':_0x18c610(0x19c);return{'type':_0x18c610(0x1c6),'parentName':_0x1c3b6b,'targetDir':_0x5c354c,'configRoot':_0x5c354c,'filePath':_0x2981a0,'resourceName':_0x42de02,'folderPath':'','resourceType':_0x5b5712,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x18c610(0x19f),'errorCode':_0x18c610(0x1b5),'message':_0x18c610(0x1c2)+_0x360503,'arg':_0x360503,'helpText':_0x18c610(0x1bd)};}return{'type':_0x18c610(0x19f),'errorCode':'invalid_yaml','message':_0x573a70,'arg':_0x360503};}if(_0x360503){const _0x161259=a157_0x590f2d[_0x18c610(0x1cf)](cwd,_0x360503);let _0x2dff68=null;try{_0x2dff68=await fs[_0x18c610(0x1c3)](_0x161259);}catch{}if(_0x2dff68?.[_0x18c610(0x1b4)]()){const _0x4b1c3b=await findTdxConfigAsync(_0x161259,fs);if(_0x4b1c3b){const _0x43691a=calculateScopedPath(_0x161259,_0x4b1c3b['configDir']);return{'type':_0x18c610(0x1c1),'parentName':_0x4b1c3b[_0x18c610(0x1a4)],'targetDir':_0x161259,'configRoot':_0x4b1c3b['configDir'],'isScoped':_0x43691a[_0x18c610(0x1b0)],'scopedFolderPath':_0x43691a[_0x18c610(0x19e)]};}if(_0x1c3b6b)return{'type':_0x18c610(0x1c1),'parentName':_0x1c3b6b,'targetDir':_0x161259,'configRoot':_0x161259,'isScoped':![],'scopedFolderPath':''};return{'type':_0x18c610(0x19f),'errorCode':_0x18c610(0x1b5),'message':_0x18c610(0x1cd)+_0x360503,'arg':_0x360503,'helpText':_0x18c610(0x1bd)};}if(_0x2dff68?.['isFile']())return{'type':'error','errorCode':_0x18c610(0x1c5),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x360503,'arg':_0x360503,'helpText':_0x18c610(0x1ac)};const _0x4b13dc=sanitizeFileName(_0x360503),_0x231f23=getSegmentRootDir(_0x4b13dc,cwd);return{'type':'parent_name','parentName':_0x360503,'targetDir':_0x231f23,'configRoot':_0x231f23};}const _0x50ab95=await findTdxConfigAsync(cwd,fs);if(_0x50ab95){const _0x1b7ced=calculateScopedPath(cwd,_0x50ab95['configDir']);return{'type':_0x18c610(0x1ba),'parentName':_0x50ab95[_0x18c610(0x1a4)],'targetDir':cwd,'configRoot':_0x50ab95['configDir'],'isScoped':_0x1b7ced[_0x18c610(0x1b0)],'scopedFolderPath':_0x1b7ced['scopedFolderPath']};}if(_0x1c3b6b){const _0x70fc4d=sanitizeFileName(_0x1c3b6b),_0x56c6fa=getSegmentRootDir(_0x70fc4d,cwd);return{'type':_0x18c610(0x1ba),'parentName':_0x1c3b6b,'targetDir':_0x56c6fa,'configRoot':_0x56c6fa,'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':_0x18c610(0x1c9),'message':'Parent\x20segment\x20not\x20specified','helpText':_0x18c610(0x1c8)};}
@@ -1 +1 @@
1
- const a158_0x469630=a158_0x1911;(function(_0x4f1401,_0x2d5183){const _0x22dd07=a158_0x1911,_0x108606=_0x4f1401();while(!![]){try{const _0x1686a5=-parseInt(_0x22dd07(0x148))/0x1+-parseInt(_0x22dd07(0x14b))/0x2+-parseInt(_0x22dd07(0x15b))/0x3+parseInt(_0x22dd07(0x14a))/0x4*(-parseInt(_0x22dd07(0x14d))/0x5)+parseInt(_0x22dd07(0x154))/0x6*(-parseInt(_0x22dd07(0x151))/0x7)+parseInt(_0x22dd07(0x145))/0x8*(-parseInt(_0x22dd07(0x157))/0x9)+parseInt(_0x22dd07(0x156))/0xa*(parseInt(_0x22dd07(0x153))/0xb);if(_0x1686a5===_0x2d5183)break;else _0x108606['push'](_0x108606['shift']());}catch(_0x3828df){_0x108606['push'](_0x108606['shift']());}}}(a158_0x4e8f,0xa0104));import{existsSync,readFileSync}from'fs';import a158_0x4ac9a1 from'path';const TDX_CONFIG_FILE=a158_0x469630(0x15e),SEGMENTS_DIR=a158_0x469630(0x149);export function findTdxConfigPath(_0x5bf235=process[a158_0x469630(0x14f)]()){const _0x4a005f=a158_0x469630;let _0x2d8a05=a158_0x4ac9a1[_0x4a005f(0x155)](_0x5bf235);const _0x39bdcf=a158_0x4ac9a1[_0x4a005f(0x15a)](_0x2d8a05)[_0x4a005f(0x150)];while(_0x2d8a05!==_0x39bdcf){const _0x277dfb=a158_0x4ac9a1[_0x4a005f(0x15f)](_0x2d8a05,TDX_CONFIG_FILE);if(existsSync(_0x277dfb))return _0x277dfb;_0x2d8a05=a158_0x4ac9a1[_0x4a005f(0x14e)](_0x2d8a05);}return null;}export function loadTdxConfig(_0x5324a7){const _0xc4264=a158_0x469630,_0x2d3111=readFileSync(_0x5324a7,_0xc4264(0x158));let _0x57ccbf;try{_0x57ccbf=JSON['parse'](_0x2d3111);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x5324a7);}if(!_0x57ccbf||typeof _0x57ccbf!==_0xc4264(0x14c))throw new Error(_0xc4264(0x147));const _0x32ad47=_0x57ccbf,_0x3f8cf6=_0x32ad47[_0xc4264(0x152)]&&typeof _0x32ad47['parent_segment']===_0xc4264(0x15c),_0x27a339=_0x32ad47[_0xc4264(0x146)]&&typeof _0x32ad47['engage_workspace']===_0xc4264(0x15c);if(!_0x3f8cf6&&!_0x27a339)throw new Error('Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field');const _0x68f9f5={};return _0x3f8cf6&&(_0x68f9f5[_0xc4264(0x152)]=_0x32ad47['parent_segment']),_0x27a339&&(_0x68f9f5[_0xc4264(0x146)]=_0x32ad47[_0xc4264(0x146)]),_0x68f9f5;}export function findTdxConfig(_0x338b59=process[a158_0x469630(0x14f)]()){const _0xe2370d=a158_0x469630,_0x565a8f=findTdxConfigPath(_0x338b59);if(!_0x565a8f)throw new Error(_0xe2370d(0x159));const _0xbb0d31=loadTdxConfig(_0x565a8f),_0xbfbfd0=a158_0x4ac9a1[_0xe2370d(0x14e)](_0x565a8f);return{'config':_0xbb0d31,'configPath':_0x565a8f,'configDir':_0xbfbfd0};}export function tryFindTdxConfig(_0x53ae48){try{return findTdxConfig(_0x53ae48);}catch{return null;}}export function getSegmentRootDir(_0x1831bc,_0x50bdc2=process['cwd']()){const _0x104d02=a158_0x469630;return a158_0x4ac9a1[_0x104d02(0x15f)](_0x50bdc2,SEGMENTS_DIR,_0x1831bc);}export function getTdxConfigPath(_0x22dd8a,_0x5b68a9=process[a158_0x469630(0x14f)]()){const _0x3ac63e=a158_0x469630;return a158_0x4ac9a1[_0x3ac63e(0x15f)](getSegmentRootDir(_0x22dd8a,_0x5b68a9),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x28c25a,_0x295c52){const _0x1fd92e=a158_0x469630,_0xbf5696=a158_0x4ac9a1[_0x1fd92e(0x155)](_0x28c25a),_0x4d06a2=a158_0x4ac9a1[_0x1fd92e(0x160)](_0x295c52,_0xbf5696);if(_0x4d06a2['startsWith']('..'))return'';return _0x4d06a2;}function a158_0x1911(_0x64d301,_0x5ec4c8){_0x64d301=_0x64d301-0x145;const _0x4e8fca=a158_0x4e8f();let _0x1911f9=_0x4e8fca[_0x64d301];return _0x1911f9;}export function localPathToTdFolderPath(_0x4bf25e){const _0x3a4ccd=a158_0x469630,_0x58081f=a158_0x4ac9a1[_0x3a4ccd(0x14e)](_0x4bf25e);if(_0x58081f==='.'||_0x58081f==='')return'';return _0x58081f['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1524dc,_0x49fc60){const _0x18e147=a158_0x469630;if(!_0x1524dc)return _0x49fc60;return a158_0x4ac9a1[_0x18e147(0x15f)](_0x49fc60,_0x1524dc);}export function createTdxConfigContent(_0x49eacc){const _0x84eaa1={'parent_segment':_0x49eacc};return JSON['stringify'](_0x84eaa1,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x36e40c){const _0x362d03=a158_0x469630,_0x444304={'engage_workspace':_0x36e40c};return JSON[_0x362d03(0x15d)](_0x444304,null,0x2)+'\x0a';}function a158_0x4e8f(){const _0xa0f1ac=['Invalid\x20tdx.json:\x20expected\x20object','137576IBPwXA','segments','4boBtsy','2233662DvtbgF','object','4395530kieqff','dirname','cwd','root','33502TDFqZr','parent_segment','3850jBgeNS','1038DrXbjp','resolve','120710ZApZQx','36Ofvdzf','utf-8','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parse','1789041rylknu','string','stringify','tdx.json','join','relative','22784wJYmWv','engage_workspace'];a158_0x4e8f=function(){return _0xa0f1ac;};return a158_0x4e8f();}
1
+ const a158_0xf4da08=a158_0x38eb;(function(_0x75ea2a,_0x8750e8){const _0x6301a5=a158_0x38eb,_0x471fc9=_0x75ea2a();while(!![]){try{const _0xde2a8c=parseInt(_0x6301a5(0xc0))/0x1+parseInt(_0x6301a5(0xcf))/0x2*(-parseInt(_0x6301a5(0xd2))/0x3)+parseInt(_0x6301a5(0xd8))/0x4+-parseInt(_0x6301a5(0xd9))/0x5+parseInt(_0x6301a5(0xd3))/0x6+-parseInt(_0x6301a5(0xbf))/0x7*(-parseInt(_0x6301a5(0xbe))/0x8)+parseInt(_0x6301a5(0xd5))/0x9;if(_0xde2a8c===_0x8750e8)break;else _0x471fc9['push'](_0x471fc9['shift']());}catch(_0x75d882){_0x471fc9['push'](_0x471fc9['shift']());}}}(a158_0xe6eb,0x73379));import{existsSync,readFileSync}from'fs';import a158_0x3dfc41 from'path';const TDX_CONFIG_FILE=a158_0xf4da08(0xc4),SEGMENTS_DIR=a158_0xf4da08(0xd6);export function findTdxConfigPath(_0x13fef1=process[a158_0xf4da08(0xd1)]()){const _0x23373d=a158_0xf4da08;let _0x19e3c7=a158_0x3dfc41[_0x23373d(0xcb)](_0x13fef1);const _0xb6a3e=a158_0x3dfc41[_0x23373d(0xc5)](_0x19e3c7)['root'];while(_0x19e3c7!==_0xb6a3e){const _0x1dbbf4=a158_0x3dfc41[_0x23373d(0xd4)](_0x19e3c7,TDX_CONFIG_FILE);if(existsSync(_0x1dbbf4))return _0x1dbbf4;_0x19e3c7=a158_0x3dfc41[_0x23373d(0xc9)](_0x19e3c7);}return null;}export function loadTdxConfig(_0x30bb79){const _0x1807bd=a158_0xf4da08,_0x1f92a9=readFileSync(_0x30bb79,_0x1807bd(0xd7));let _0x2796b7;try{_0x2796b7=JSON[_0x1807bd(0xc5)](_0x1f92a9);}catch{throw new Error(_0x1807bd(0xc1)+_0x30bb79);}if(!_0x2796b7||typeof _0x2796b7!==_0x1807bd(0xc8))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x465088=_0x2796b7,_0x4087c8=_0x465088['parent_segment']&&typeof _0x465088[_0x1807bd(0xc3)]===_0x1807bd(0xca),_0x2e29a5=_0x465088[_0x1807bd(0xce)]&&typeof _0x465088['engage_workspace']===_0x1807bd(0xca);if(!_0x4087c8&&!_0x2e29a5)throw new Error(_0x1807bd(0xc7));const _0x2c4880={};return _0x4087c8&&(_0x2c4880[_0x1807bd(0xc3)]=_0x465088[_0x1807bd(0xc3)]),_0x2e29a5&&(_0x2c4880[_0x1807bd(0xce)]=_0x465088['engage_workspace']),_0x2c4880;}export function findTdxConfig(_0x1810ef=process['cwd']()){const _0x4c25d0=a158_0xf4da08,_0x215441=findTdxConfigPath(_0x1810ef);if(!_0x215441)throw new Error(_0x4c25d0(0xcd));const _0x3ce008=loadTdxConfig(_0x215441),_0x506df3=a158_0x3dfc41[_0x4c25d0(0xc9)](_0x215441);return{'config':_0x3ce008,'configPath':_0x215441,'configDir':_0x506df3};}export function tryFindTdxConfig(_0x5c1b11){try{return findTdxConfig(_0x5c1b11);}catch{return null;}}function a158_0x38eb(_0x258c31,_0x4847b4){_0x258c31=_0x258c31-0xbe;const _0xe6ebd0=a158_0xe6eb();let _0x38eb67=_0xe6ebd0[_0x258c31];return _0x38eb67;}export function getSegmentRootDir(_0x544271,_0x1f5bff=process[a158_0xf4da08(0xd1)]()){const _0xe5b1d5=a158_0xf4da08;return a158_0x3dfc41[_0xe5b1d5(0xd4)](_0x1f5bff,SEGMENTS_DIR,_0x544271);}export function getTdxConfigPath(_0x305c8d,_0x2efe7d=process[a158_0xf4da08(0xd1)]()){const _0x18ee8d=a158_0xf4da08;return a158_0x3dfc41[_0x18ee8d(0xd4)](getSegmentRootDir(_0x305c8d,_0x2efe7d),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x4bd913,_0x5ce060){const _0x200df3=a158_0xf4da08,_0x31db93=a158_0x3dfc41['resolve'](_0x4bd913),_0x1b722a=a158_0x3dfc41[_0x200df3(0xc6)](_0x5ce060,_0x31db93);if(_0x1b722a[_0x200df3(0xcc)]('..'))return'';return _0x1b722a;}export function localPathToTdFolderPath(_0x356efe){const _0x2b782f=a158_0xf4da08,_0x29166e=a158_0x3dfc41['dirname'](_0x356efe);if(_0x29166e==='.'||_0x29166e==='')return'';return _0x29166e[_0x2b782f(0xd0)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x9450de,_0x418553){const _0x58b73e=a158_0xf4da08;if(!_0x9450de)return _0x418553;return a158_0x3dfc41[_0x58b73e(0xd4)](_0x418553,_0x9450de);}export function createTdxConfigContent(_0x3a93a9){const _0x1a3269=a158_0xf4da08,_0x2d9d34={'parent_segment':_0x3a93a9};return JSON[_0x1a3269(0xc2)](_0x2d9d34,null,0x2)+'\x0a';}function a158_0xe6eb(){const _0x2e3a2d=['No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','engage_workspace','90UUCofD','replace','cwd','16077jpyKrd','4704618WQqeCQ','join','276444qFEdbv','segments','utf-8','2237080NLnYDQ','4327410xPRURN','88912HqDbGU','70ofVxnG','93337EzcQoz','Invalid\x20JSON\x20in\x20','stringify','parent_segment','tdx.json','parse','relative','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','object','dirname','string','resolve','startsWith'];a158_0xe6eb=function(){return _0x2e3a2d;};return a158_0xe6eb();}export function createEngageTdxConfigContent(_0x4df04d){const _0x188352=a158_0xf4da08,_0x15dd26={'engage_workspace':_0x4df04d};return JSON[_0x188352(0xc2)](_0x15dd26,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x20c5c9=a159_0x390a;(function(_0x489d11,_0x1ac1dc){const _0x5bac48=a159_0x390a,_0x17b373=_0x489d11();while(!![]){try{const _0x16d5a3=-parseInt(_0x5bac48(0xed))/0x1*(-parseInt(_0x5bac48(0xda))/0x2)+parseInt(_0x5bac48(0xe5))/0x3+-parseInt(_0x5bac48(0xe8))/0x4+-parseInt(_0x5bac48(0xdf))/0x5+-parseInt(_0x5bac48(0xc7))/0x6*(parseInt(_0x5bac48(0xd2))/0x7)+-parseInt(_0x5bac48(0xc9))/0x8*(parseInt(_0x5bac48(0xeb))/0x9)+-parseInt(_0x5bac48(0xcb))/0xa*(-parseInt(_0x5bac48(0xe9))/0xb);if(_0x16d5a3===_0x1ac1dc)break;else _0x17b373['push'](_0x17b373['shift']());}catch(_0x4cb256){_0x17b373['push'](_0x17b373['shift']());}}}(a159_0x4126,0xd9c85));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x20c5c9(0xd3)]([a159_0x20c5c9(0xcf),a159_0x20c5c9(0xce),a159_0x20c5c9(0xd9),a159_0x20c5c9(0xd5),a159_0x20c5c9(0xd7),a159_0x20c5c9(0xdb),a159_0x20c5c9(0xee)]);function a159_0x390a(_0x46b25f,_0x3bbad6){_0x46b25f=_0x46b25f-0xc7;const _0x4126cf=a159_0x4126();let _0x390ad5=_0x4126cf[_0x46b25f];return _0x390ad5;}export const RepeatUnitSchema=z[a159_0x20c5c9(0xd3)](['minute',a159_0x20c5c9(0xcc),a159_0x20c5c9(0xe2),a159_0x20c5c9(0xd8),a159_0x20c5c9(0xd0),a159_0x20c5c9(0xca),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x20c5c9(0xcd)](),'repeat_unit':RepeatUnitSchema[a159_0x20c5c9(0xcd)](),'repeat_frequency':z['number']()['optional'](),'repeat_sub_frequency':z[a159_0x20c5c9(0xe4)](z['number']())['optional'](),'start_at':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xe7)]()['optional'](),'end_on':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xe7)]()[a159_0x20c5c9(0xcd)](),'timezone':z['string']()[a159_0x20c5c9(0xcd)]()});export const NotificationDefSchema=z[a159_0x20c5c9(0xdd)]({'notify_on':z[a159_0x20c5c9(0xe4)](z[a159_0x20c5c9(0xd3)](['onSuccess',a159_0x20c5c9(0xe6)]))[a159_0x20c5c9(0xcd)](),'email_recipients':z[a159_0x20c5c9(0xe4)](z['string']())[a159_0x20c5c9(0xcd)]()});export const ActivationColumnDefSchema=z[a159_0x20c5c9(0xd1)]([z['string'](),z[a159_0x20c5c9(0xdd)]({'name':z[a159_0x20c5c9(0xc8)](),'type':z[a159_0x20c5c9(0xc8)]()['optional'](),'visibility':z[a159_0x20c5c9(0xd3)](['clear',a159_0x20c5c9(0xd6)])[a159_0x20c5c9(0xcd)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x20c5c9(0xdd)]({'columns':z[a159_0x20c5c9(0xe4)](z[a159_0x20c5c9(0xdd)]({'name':z[a159_0x20c5c9(0xc8)](),'type':z['string']()['optional'](),'visibility':z['enum'](['clear',a159_0x20c5c9(0xd6)])['optional']()}))[a159_0x20c5c9(0xcd)](),'behavior_table':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xcd)](),'join_row':z['number']()[a159_0x20c5c9(0xe7)]()[a159_0x20c5c9(0xcd)](),'join_strategy':z[a159_0x20c5c9(0xd3)](['All',a159_0x20c5c9(0xe0),'Last','Top-N'])['optional'](),'formatting':z['enum'](['rows',a159_0x20c5c9(0xe3)])['optional'](),'order_by':z[a159_0x20c5c9(0xe4)](z['object']({'key':z[a159_0x20c5c9(0xc8)](),'order':z['enum']([a159_0x20c5c9(0xde),a159_0x20c5c9(0xea)])}))[a159_0x20c5c9(0xcd)]()});function a159_0x4126(){const _0x3d03c6=['object','asc','7700695MrZPLJ','First','Activation\x20name\x20is\x20required','day','cols','array','2046894ZczjSy','onFailure','nullable','2352092ruUyeI','9361hLtbJz','desc','1674jTlPXL','min','13NywZgx','minutes_interval','1944wVxQaP','string','65768HRmdZB','once','45500BmwMJw','hour','optional','hourly','none','month','union','15386EzWBDA','enum','Connection\x20name\x20is\x20required','weekly','masked','monthly','week','daily','108786ErClKD','cron','boolean'];a159_0x4126=function(){return _0x3d03c6;};return a159_0x4126();}export const ActivationDefSchema=z[a159_0x20c5c9(0xdd)]({'name':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xec)](0x1,a159_0x20c5c9(0xe1)),'description':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xcd)](),'connection':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xec)](0x1,a159_0x20c5c9(0xd4)),'all_columns':z[a159_0x20c5c9(0xdc)]()['optional'](),'columns':z[a159_0x20c5c9(0xe4)](ActivationColumnDefSchema)[a159_0x20c5c9(0xcd)](),'schedule':ScheduleDefSchema[a159_0x20c5c9(0xcd)](),'notification':NotificationDefSchema[a159_0x20c5c9(0xcd)](),'connector_config':z['record'](z['string'](),z['unknown']())[a159_0x20c5c9(0xcd)](),'activation_template_id':z[a159_0x20c5c9(0xc8)]()[a159_0x20c5c9(0xe7)]()[a159_0x20c5c9(0xcd)](),'behavior':ActivationBehaviorDefSchema['nullable']()[a159_0x20c5c9(0xcd)](),'run_after_journey_refresh':z[a159_0x20c5c9(0xdc)]()[a159_0x20c5c9(0xcd)](),'nested_workflow_project_name':z['string']()['optional'](),'nested_workflow_name':z[a159_0x20c5c9(0xc8)]()['optional'](),'lock_enabled':z[a159_0x20c5c9(0xdc)]()['optional']()});
1
+ function a159_0x39cd(_0x563593,_0x5f5a44){_0x563593=_0x563593-0x1e1;const _0x359acc=a159_0x359a();let _0x39cdaf=_0x359acc[_0x563593];return _0x39cdaf;}const a159_0x29fd9b=a159_0x39cd;(function(_0x25674e,_0x37ac82){const _0x196478=a159_0x39cd,_0x50881f=_0x25674e();while(!![]){try{const _0x5ba4f8=parseInt(_0x196478(0x20b))/0x1*(parseInt(_0x196478(0x1f3))/0x2)+parseInt(_0x196478(0x202))/0x3*(-parseInt(_0x196478(0x206))/0x4)+-parseInt(_0x196478(0x1f8))/0x5*(parseInt(_0x196478(0x20a))/0x6)+-parseInt(_0x196478(0x1fd))/0x7+-parseInt(_0x196478(0x203))/0x8+parseInt(_0x196478(0x1e2))/0x9*(-parseInt(_0x196478(0x204))/0xa)+parseInt(_0x196478(0x1ed))/0xb*(parseInt(_0x196478(0x1f5))/0xc);if(_0x5ba4f8===_0x37ac82)break;else _0x50881f['push'](_0x50881f['shift']());}catch(_0x36b5e8){_0x50881f['push'](_0x50881f['shift']());}}}(a159_0x359a,0x22b73));import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x1ff),'hourly',a159_0x29fd9b(0x1f0),a159_0x29fd9b(0x1ef),'monthly',a159_0x29fd9b(0x1e9),a159_0x29fd9b(0x1e3)]);export const RepeatUnitSchema=z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x201),'hour',a159_0x29fd9b(0x209),a159_0x29fd9b(0x1e8),a159_0x29fd9b(0x208),a159_0x29fd9b(0x1ea),a159_0x29fd9b(0x1ff)]);export const ScheduleDefSchema=z[a159_0x29fd9b(0x1f9)]({'type':ScheduleTypeSchema[a159_0x29fd9b(0x1fa)](),'repeat_unit':RepeatUnitSchema[a159_0x29fd9b(0x1fa)](),'repeat_frequency':z[a159_0x29fd9b(0x1e4)]()[a159_0x29fd9b(0x1fa)](),'repeat_sub_frequency':z[a159_0x29fd9b(0x1e1)](z[a159_0x29fd9b(0x1e4)]())['optional'](),'start_at':z['string']()[a159_0x29fd9b(0x200)]()[a159_0x29fd9b(0x1fa)](),'end_on':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x200)]()[a159_0x29fd9b(0x1fa)](),'timezone':z['string']()[a159_0x29fd9b(0x1fa)]()});export const NotificationDefSchema=z[a159_0x29fd9b(0x1f9)]({'notify_on':z[a159_0x29fd9b(0x1e1)](z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x1e5),'onFailure']))['optional'](),'email_recipients':z[a159_0x29fd9b(0x1e1)](z[a159_0x29fd9b(0x1e7)]())[a159_0x29fd9b(0x1fa)]()});function a159_0x359a(){const _0x2577dc=['78815UoXtEE','array','60381UpEmJp','minutes_interval','number','onSuccess','rows','string','week','cron','once','Last','enum','127556hSNFgF','min','weekly','daily','asc','clear','4cTPfbq','boolean','828zNZvMH','Top-N','First','12265ohcWeO','object','optional','union','unknown','768901NozLeS','record','none','nullable','minute','2076KiMfZH','2264416qPIpRB','370eWtron','masked','512tXpDna','All','month','day','210uaUWTz'];a159_0x359a=function(){return _0x2577dc;};return a159_0x359a();}export const ActivationColumnDefSchema=z[a159_0x29fd9b(0x1fb)]([z[a159_0x29fd9b(0x1e7)](),z['object']({'name':z[a159_0x29fd9b(0x1e7)](),'type':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x1fa)](),'visibility':z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x1f2),a159_0x29fd9b(0x205)])[a159_0x29fd9b(0x1fa)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x29fd9b(0x1f9)]({'columns':z[a159_0x29fd9b(0x1e1)](z[a159_0x29fd9b(0x1f9)]({'name':z[a159_0x29fd9b(0x1e7)](),'type':z[a159_0x29fd9b(0x1e7)]()['optional'](),'visibility':z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x1f2),a159_0x29fd9b(0x205)])['optional']()}))['optional'](),'behavior_table':z['string']()[a159_0x29fd9b(0x1fa)](),'join_row':z['number']()[a159_0x29fd9b(0x200)]()['optional'](),'join_strategy':z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x207),a159_0x29fd9b(0x1f7),a159_0x29fd9b(0x1eb),a159_0x29fd9b(0x1f6)])['optional'](),'formatting':z['enum']([a159_0x29fd9b(0x1e6),'cols'])[a159_0x29fd9b(0x1fa)](),'order_by':z[a159_0x29fd9b(0x1e1)](z[a159_0x29fd9b(0x1f9)]({'key':z[a159_0x29fd9b(0x1e7)](),'order':z[a159_0x29fd9b(0x1ec)]([a159_0x29fd9b(0x1f1),'desc'])}))[a159_0x29fd9b(0x1fa)]()});export const ActivationDefSchema=z[a159_0x29fd9b(0x1f9)]({'name':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x1ee)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x1fa)](),'connection':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x1ee)](0x1,'Connection\x20name\x20is\x20required'),'all_columns':z[a159_0x29fd9b(0x1f4)]()[a159_0x29fd9b(0x1fa)](),'columns':z[a159_0x29fd9b(0x1e1)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x29fd9b(0x1fa)](),'connector_config':z[a159_0x29fd9b(0x1fe)](z[a159_0x29fd9b(0x1e7)](),z[a159_0x29fd9b(0x1fc)]())[a159_0x29fd9b(0x1fa)](),'activation_template_id':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x200)]()['optional'](),'behavior':ActivationBehaviorDefSchema['nullable']()[a159_0x29fd9b(0x1fa)](),'run_after_journey_refresh':z['boolean']()['optional'](),'nested_workflow_project_name':z[a159_0x29fd9b(0x1e7)]()[a159_0x29fd9b(0x1fa)](),'nested_workflow_name':z[a159_0x29fd9b(0x1e7)]()['optional'](),'lock_enabled':z['boolean']()[a159_0x29fd9b(0x1fa)]()});
@@ -1 +1 @@
1
- function a160_0x2a1d(_0x50e9e3,_0x30d286){_0x50e9e3=_0x50e9e3-0x77;var _0x5ed38d=a160_0x5ed3();var _0x2a1d66=_0x5ed38d[_0x50e9e3];return _0x2a1d66;}function a160_0x5ed3(){var _0x18a173=['41507523iboUiJ','77lPVnAn','2996936qBvXqd','985347YcnBmX','1705145wWXbdh','6643536ZmnRGx','131786oCNZNp','494152IqkNDM','39SFEEkn'];a160_0x5ed3=function(){return _0x18a173;};return a160_0x5ed3();}(function(_0x46e8e9,_0x5df406){var _0x2acf41=a160_0x2a1d,_0x86a719=_0x46e8e9();while(!![]){try{var _0xc241f9=-parseInt(_0x2acf41(0x7b))/0x1+parseInt(_0x2acf41(0x7e))/0x2*(-parseInt(_0x2acf41(0x77))/0x3)+-parseInt(_0x2acf41(0x7a))/0x4+parseInt(_0x2acf41(0x7c))/0x5+-parseInt(_0x2acf41(0x7d))/0x6+parseInt(_0x2acf41(0x79))/0x7*(-parseInt(_0x2acf41(0x7f))/0x8)+parseInt(_0x2acf41(0x78))/0x9;if(_0xc241f9===_0x5df406)break;else _0x86a719['push'](_0x86a719['shift']());}catch(_0x122920){_0x86a719['push'](_0x86a719['shift']());}}}(a160_0x5ed3,0x8c65f));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ (function(_0x26e90e,_0x2bb6bb){var _0x10fdd2=a160_0xe60f,_0xc65742=_0x26e90e();while(!![]){try{var _0x5d7f20=parseInt(_0x10fdd2(0x19d))/0x1*(parseInt(_0x10fdd2(0x19e))/0x2)+-parseInt(_0x10fdd2(0x19f))/0x3+parseInt(_0x10fdd2(0x19b))/0x4+parseInt(_0x10fdd2(0x1a0))/0x5+parseInt(_0x10fdd2(0x1a1))/0x6+parseInt(_0x10fdd2(0x19c))/0x7+-parseInt(_0x10fdd2(0x1a2))/0x8;if(_0x5d7f20===_0x2bb6bb)break;else _0xc65742['push'](_0xc65742['shift']());}catch(_0x39a9b9){_0xc65742['push'](_0xc65742['shift']());}}}(a160_0x1507,0xda5a8));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0xe60f(_0x74dbc2,_0x4b257a){_0x74dbc2=_0x74dbc2-0x19b;var _0x150728=a160_0x1507();var _0xe60fe7=_0x150728[_0x74dbc2];return _0xe60fe7;}function a160_0x1507(){var _0x26bebd=['2973160hPQDKI','3499888NWJAAT','182408PYUssI','2sXkVUM','1162044yDfDAc','4710465llZvYD','7393068CWQTPJ','18545832ECthmO'];a160_0x1507=function(){return _0x26bebd;};return a160_0x1507();}
@@ -1 +1 @@
1
- const a161_0x2a3ede=a161_0x114e;(function(_0x4966b6,_0x1f3b3a){const _0x1451a7=a161_0x114e,_0x12a1e3=_0x4966b6();while(!![]){try{const _0x468994=parseInt(_0x1451a7(0xae))/0x1*(-parseInt(_0x1451a7(0xa6))/0x2)+-parseInt(_0x1451a7(0xb7))/0x3*(parseInt(_0x1451a7(0xa2))/0x4)+parseInt(_0x1451a7(0xbd))/0x5*(-parseInt(_0x1451a7(0x9e))/0x6)+parseInt(_0x1451a7(0xab))/0x7*(-parseInt(_0x1451a7(0x96))/0x8)+-parseInt(_0x1451a7(0x97))/0x9+parseInt(_0x1451a7(0x9b))/0xa+-parseInt(_0x1451a7(0x98))/0xb*(-parseInt(_0x1451a7(0xb8))/0xc);if(_0x468994===_0x1f3b3a)break;else _0x12a1e3['push'](_0x12a1e3['shift']());}catch(_0x435097){_0x12a1e3['push'](_0x12a1e3['shift']());}}}(a161_0x146a,0x2bc47));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';function a161_0x114e(_0x2f589c,_0x2947c4){_0x2f589c=_0x2f589c-0x91;const _0x146aa7=a161_0x146a();let _0x114e5d=_0x146aa7[_0x2f589c];return _0x114e5d;}import{ActivationDefSchema}from'./activation-schema.js';function a161_0x146a(){const _0x6126bb=['14JVKswZ','journey','activation','561ozbkOH','length','discriminatedUnion','passthrough','wait','day','merge','object','Journey\x20name\x20is\x20required','119787IuUjeM','95592hkRMyd','literal','ab_test','versions','optional','1200565pxlgWx','refine','lazy','string','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','filter','number','type','draft','end','169976KjlRLy','1096335rYamdv','649hqxgVz','jump','isArray','2120700QGuudM','stages','boolean','6qHVdVT','reentry_always','reentry_unless_goal_achieved','array','8aCVEwg','enum','no_reentry','launched','66jgxVZV','journeys','simulation','decision_point','record'];a161_0x146a=function(){return _0x6126bb;};return a161_0x146a();}export const JourneyStateTypeSchema=z['enum']([a161_0x2a3ede(0x94),a161_0x2a3ede(0xa8),a161_0x2a3ede(0xa5)]);export const ReentryModeTypeSchema=z['enum']([a161_0x2a3ede(0xa4),a161_0x2a3ede(0xa0),a161_0x2a3ede(0x9f)]);export const WaitUnitTypeSchema=z['enum']([a161_0x2a3ede(0xb3),'week']);export const StepTypeValueSchema=z[a161_0x2a3ede(0xa3)](['wait',a161_0x2a3ede(0xad),a161_0x2a3ede(0xa9),a161_0x2a3ede(0xba),'merge',a161_0x2a3ede(0x99),a161_0x2a3ede(0x95)]);export const EmbeddedSegmentDefSchema=z[a161_0x2a3ede(0xb5)]({'description':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x2a3ede(0xb5)]({'journey':z[a161_0x2a3ede(0xc0)](),'stage':z['string'](),'bundle_id':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)]()});export const CriteriaDefSchema=z['object']({'name':z[a161_0x2a3ede(0xc0)](),'description':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'segment':z[a161_0x2a3ede(0xc0)](),'target':JumpTargetDefSchema[a161_0x2a3ede(0xbc)]()});const WaitConditionTimeoutDefSchema=z[a161_0x2a3ede(0xb5)]({'duration':z[a161_0x2a3ede(0x92)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)]()}),WaitConditionDefSchema=z[a161_0x2a3ede(0xb5)]({'segment':z[a161_0x2a3ede(0xc0)](),'next':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x2a3ede(0xbc)]()}),WaitStepParamsDefSchema=z[a161_0x2a3ede(0xb5)]({'duration':z['number']()[a161_0x2a3ede(0xbc)](),'unit':WaitUnitTypeSchema[a161_0x2a3ede(0xbc)](),'wait_until':z['string']()['optional'](),'condition':WaitConditionDefSchema[a161_0x2a3ede(0xbc)](),'days_of_week':z['array'](z[a161_0x2a3ede(0xc0)]())[a161_0x2a3ede(0xbc)]()}),StepBaseFields={'name':z[a161_0x2a3ede(0xc0)](),'uuid':z[a161_0x2a3ede(0xc0)]()['optional'](),'next':z['string']()[a161_0x2a3ede(0xbc)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x2a3ede(0xb9)](a161_0x2a3ede(0xb2)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x2a3ede(0xb5)]({'activation':z['string']()}),ActivationStepDefSchema=z[a161_0x2a3ede(0xb5)]({...StepBaseFields,'type':z[a161_0x2a3ede(0xb9)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x2a3ede(0xb5)]({'name':z[a161_0x2a3ede(0xc0)](),'segment':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'segment_id':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'excluded':z['boolean']()[a161_0x2a3ede(0xbc)](),'next':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)]()}),DecisionPointStepParamsDefSchema=z[a161_0x2a3ede(0xb5)]({'branches':z[a161_0x2a3ede(0xa1)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x2a3ede(0xb5)]({...StepBaseFields,'type':z[a161_0x2a3ede(0xb9)](a161_0x2a3ede(0xa9)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x2a3ede(0xb5)]({'id':z[a161_0x2a3ede(0xc0)]()['optional'](),'name':z['string'](),'percentage':z[a161_0x2a3ede(0x92)](),'next':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)]()}),AbTestStepParamsDefSchema=z[a161_0x2a3ede(0xb5)]({'variants':z[a161_0x2a3ede(0xa1)](AbTestVariantDefSchema),'unique_id':z[a161_0x2a3ede(0xc0)]()['optional'](),'customized_split':z[a161_0x2a3ede(0x9d)]()[a161_0x2a3ede(0xbc)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x2a3ede(0xb9)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x2a3ede(0xb5)]({...StepBaseFields,'type':z[a161_0x2a3ede(0xb9)](a161_0x2a3ede(0xb4))}),JumpStepParamsDefSchema=z['object']({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z['literal']('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x2a3ede(0xb9)](a161_0x2a3ede(0x95))})[a161_0x2a3ede(0xb1)]();export const StepDefSchema=z[a161_0x2a3ede(0xb0)](a161_0x2a3ede(0x93),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x2a3ede(0xb5)]({'name':z[a161_0x2a3ede(0xc0)](),'description':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'id':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a161_0x2a3ede(0xa1)](CriteriaDefSchema)[a161_0x2a3ede(0xbc)](),'milestone':CriteriaDefSchema[a161_0x2a3ede(0xbc)](),'root_step':z['string']()[a161_0x2a3ede(0xbc)](),'steps':z['array'](StepDefSchema)[a161_0x2a3ede(0xbc)]()});export const JourneyEntryDefSchema=z[a161_0x2a3ede(0xb5)]({'name':z['string']()[a161_0x2a3ede(0xbc)](),'version':z['string']()['optional'](),'state':JourneyStateTypeSchema[a161_0x2a3ede(0xbc)](),'latest':z[a161_0x2a3ede(0x9d)]()[a161_0x2a3ede(0xbc)](),'stages':z[a161_0x2a3ede(0xa1)](StageDefSchema),'id':z[a161_0x2a3ede(0xc0)]()['optional'](),'version_number':z['number']()[a161_0x2a3ede(0xbc)](),'goal':CriteriaDefSchema[a161_0x2a3ede(0xbc)](),'reentry':ReentryModeTypeSchema[a161_0x2a3ede(0xbc)]()});export const JourneyDefSchema=z[a161_0x2a3ede(0xbf)](()=>z['object']({'type':z['literal'](a161_0x2a3ede(0xac)),'name':z[a161_0x2a3ede(0xc0)]()['min'](0x1,a161_0x2a3ede(0xb6)),'description':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'bundle_id':z[a161_0x2a3ede(0xc0)]()['optional'](),'bundle_name':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'folder_id':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'reentry':ReentryModeTypeSchema[a161_0x2a3ede(0xbc)](),'allow_reentry':z['boolean']()[a161_0x2a3ede(0xbc)](),'goal':CriteriaDefSchema[a161_0x2a3ede(0xbc)](),'id':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'version':z[a161_0x2a3ede(0xc0)]()[a161_0x2a3ede(0xbc)](),'version_number':z[a161_0x2a3ede(0x92)]()['optional'](),'stages':z[a161_0x2a3ede(0xa1)](StageDefSchema)[a161_0x2a3ede(0xbc)](),'versions':z[a161_0x2a3ede(0xa1)](JourneyEntryDefSchema)[a161_0x2a3ede(0xbc)](),'journeys':z[a161_0x2a3ede(0xa1)](JourneyEntryDefSchema)[a161_0x2a3ede(0xbc)](),'segments':z[a161_0x2a3ede(0xaa)](z[a161_0x2a3ede(0xc0)](),EmbeddedSegmentDefSchema)[a161_0x2a3ede(0xbc)](),'activations':z[a161_0x2a3ede(0xaa)](z[a161_0x2a3ede(0xc0)](),ActivationDefSchema)[a161_0x2a3ede(0xbc)]()})[a161_0x2a3ede(0xbe)](_0x27c52f=>{const _0x4e6b21=a161_0x2a3ede,_0x1da362=[_0x27c52f[_0x4e6b21(0xa7)],_0x27c52f[_0x4e6b21(0x9c)],_0x27c52f[_0x4e6b21(0xbb)]][_0x4e6b21(0x91)](_0x3733a9=>Array[_0x4e6b21(0x9a)](_0x3733a9)&&_0x3733a9[_0x4e6b21(0xaf)]>0x0)[_0x4e6b21(0xaf)];return _0x1da362===0x1;},{'message':a161_0x2a3ede(0xc1)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x13e906=a161_0x6334;(function(_0x317b6b,_0x538a44){const _0x1f330b=a161_0x6334,_0x5bc275=_0x317b6b();while(!![]){try{const _0x298c98=parseInt(_0x1f330b(0x1d2))/0x1*(-parseInt(_0x1f330b(0x1e7))/0x2)+-parseInt(_0x1f330b(0x1d7))/0x3+parseInt(_0x1f330b(0x1eb))/0x4+parseInt(_0x1f330b(0x1d0))/0x5+parseInt(_0x1f330b(0x1f1))/0x6*(-parseInt(_0x1f330b(0x1ec))/0x7)+parseInt(_0x1f330b(0x1d3))/0x8+-parseInt(_0x1f330b(0x1ee))/0x9*(-parseInt(_0x1f330b(0x1f3))/0xa);if(_0x298c98===_0x538a44)break;else _0x5bc275['push'](_0x5bc275['shift']());}catch(_0x207757){_0x5bc275['push'](_0x5bc275['shift']());}}}(a161_0x190e,0xb2ee8));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a161_0x190e(){const _0x3f606f=['draft','array','string','literal','passthrough','enum','end','stages','ab_test','wait','day','week','lazy','record','merge','715436SOFBmJ','boolean','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','jump','2033020OUryjv','77413oRidBv','object','592659LISGox','type','length','18POKVHZ','versions','30rQHZCG','decision_point','activation','4221510SjgLPG','number','3TZKrjh','11404504SAJfZW','simulation','optional','journey','3409314hHGkSJ'];a161_0x190e=function(){return _0x3f606f;};return a161_0x190e();}export const JourneyStateTypeSchema=z[a161_0x13e906(0x1dd)]([a161_0x13e906(0x1d8),a161_0x13e906(0x1d4),'launched']);export const ReentryModeTypeSchema=z[a161_0x13e906(0x1dd)](['no_reentry','reentry_unless_goal_achieved','reentry_always']);export const WaitUnitTypeSchema=z[a161_0x13e906(0x1dd)]([a161_0x13e906(0x1e2),a161_0x13e906(0x1e3)]);export const StepTypeValueSchema=z['enum']([a161_0x13e906(0x1e1),a161_0x13e906(0x1cf),a161_0x13e906(0x1f4),a161_0x13e906(0x1e0),a161_0x13e906(0x1e6),a161_0x13e906(0x1ea),a161_0x13e906(0x1de)]);export const EmbeddedSegmentDefSchema=z[a161_0x13e906(0x1ed)]({'description':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x13e906(0x1ed)]({'journey':z['string'](),'stage':z['string'](),'bundle_id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)]()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'segment':z[a161_0x13e906(0x1da)](),'target':JumpTargetDefSchema[a161_0x13e906(0x1d5)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x13e906(0x1d1)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)]()}),WaitConditionDefSchema=z['object']({'segment':z[a161_0x13e906(0x1da)](),'next':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x13e906(0x1d5)]()}),WaitStepParamsDefSchema=z[a161_0x13e906(0x1ed)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema[a161_0x13e906(0x1d5)](),'wait_until':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z[a161_0x13e906(0x1d9)](z[a161_0x13e906(0x1da)]())['optional']()}),StepBaseFields={'name':z[a161_0x13e906(0x1da)](),'uuid':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'next':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)]()},WaitStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z['literal'](a161_0x13e906(0x1e1)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x13e906(0x1ed)]({'activation':z['string']()}),ActivationStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z[a161_0x13e906(0x1db)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x13e906(0x1ed)]({'name':z[a161_0x13e906(0x1da)](),'segment':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'segment_id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'excluded':z['boolean']()[a161_0x13e906(0x1d5)](),'next':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)]()}),DecisionPointStepParamsDefSchema=z[a161_0x13e906(0x1ed)]({'branches':z[a161_0x13e906(0x1d9)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z[a161_0x13e906(0x1db)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x13e906(0x1ed)]({'id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'name':z[a161_0x13e906(0x1da)](),'percentage':z[a161_0x13e906(0x1d1)](),'next':z[a161_0x13e906(0x1da)]()['optional']()}),AbTestStepParamsDefSchema=z['object']({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z['string']()['optional'](),'customized_split':z[a161_0x13e906(0x1e8)]()[a161_0x13e906(0x1d5)]()}),AbTestStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z['literal'](a161_0x13e906(0x1e0)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z[a161_0x13e906(0x1db)]('merge')}),JumpStepParamsDefSchema=z[a161_0x13e906(0x1ed)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z['literal'](a161_0x13e906(0x1ea)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x13e906(0x1ed)]({...StepBaseFields,'type':z[a161_0x13e906(0x1db)](a161_0x13e906(0x1de))})[a161_0x13e906(0x1dc)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x13e906(0x1ef),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x13e906(0x1ed)]({'name':z[a161_0x13e906(0x1da)](),'description':z[a161_0x13e906(0x1da)]()['optional'](),'id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a161_0x13e906(0x1d9)](CriteriaDefSchema)[a161_0x13e906(0x1d5)](),'milestone':CriteriaDefSchema[a161_0x13e906(0x1d5)](),'root_step':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'steps':z[a161_0x13e906(0x1d9)](StepDefSchema)[a161_0x13e906(0x1d5)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'version':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'state':JourneyStateTypeSchema[a161_0x13e906(0x1d5)](),'latest':z[a161_0x13e906(0x1e8)]()[a161_0x13e906(0x1d5)](),'stages':z[a161_0x13e906(0x1d9)](StageDefSchema),'id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'version_number':z[a161_0x13e906(0x1d1)]()['optional'](),'goal':CriteriaDefSchema[a161_0x13e906(0x1d5)](),'reentry':ReentryModeTypeSchema['optional']()});function a161_0x6334(_0x148abd,_0x135cbd){_0x148abd=_0x148abd-0x1cf;const _0x190ee0=a161_0x190e();let _0x63347c=_0x190ee0[_0x148abd];return _0x63347c;}export const JourneyDefSchema=z[a161_0x13e906(0x1e4)](()=>z[a161_0x13e906(0x1ed)]({'type':z[a161_0x13e906(0x1db)](a161_0x13e906(0x1d6)),'name':z[a161_0x13e906(0x1da)]()['min'](0x1,'Journey\x20name\x20is\x20required'),'description':z['string']()[a161_0x13e906(0x1d5)](),'bundle_id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'bundle_name':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'folder_id':z['string']()[a161_0x13e906(0x1d5)](),'reentry':ReentryModeTypeSchema[a161_0x13e906(0x1d5)](),'allow_reentry':z['boolean']()[a161_0x13e906(0x1d5)](),'goal':CriteriaDefSchema[a161_0x13e906(0x1d5)](),'id':z[a161_0x13e906(0x1da)]()[a161_0x13e906(0x1d5)](),'version':z['string']()[a161_0x13e906(0x1d5)](),'version_number':z[a161_0x13e906(0x1d1)]()[a161_0x13e906(0x1d5)](),'stages':z[a161_0x13e906(0x1d9)](StageDefSchema)[a161_0x13e906(0x1d5)](),'versions':z['array'](JourneyEntryDefSchema)['optional'](),'journeys':z[a161_0x13e906(0x1d9)](JourneyEntryDefSchema)['optional'](),'segments':z[a161_0x13e906(0x1e5)](z[a161_0x13e906(0x1da)](),EmbeddedSegmentDefSchema)[a161_0x13e906(0x1d5)](),'activations':z[a161_0x13e906(0x1e5)](z['string'](),ActivationDefSchema)[a161_0x13e906(0x1d5)]()})['refine'](_0x8535f=>{const _0x188908=a161_0x13e906,_0x2860c0=[_0x8535f['journeys'],_0x8535f[_0x188908(0x1df)],_0x8535f[_0x188908(0x1f2)]]['filter'](_0x33735d=>Array['isArray'](_0x33735d)&&_0x33735d[_0x188908(0x1f0)]>0x0)[_0x188908(0x1f0)];return _0x2860c0===0x1;},{'message':a161_0x13e906(0x1e9)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- (function(_0x366cc6,_0x271da1){var _0x1dc2df=a163_0x32c3,_0x5652a1=_0x366cc6();while(!![]){try{var _0x2c3f56=parseInt(_0x1dc2df(0xb7))/0x1+-parseInt(_0x1dc2df(0xb9))/0x2*(-parseInt(_0x1dc2df(0xb2))/0x3)+-parseInt(_0x1dc2df(0xb5))/0x4*(-parseInt(_0x1dc2df(0xba))/0x5)+-parseInt(_0x1dc2df(0xb4))/0x6*(parseInt(_0x1dc2df(0xb3))/0x7)+parseInt(_0x1dc2df(0xb6))/0x8+-parseInt(_0x1dc2df(0xb8))/0x9*(parseInt(_0x1dc2df(0xbd))/0xa)+-parseInt(_0x1dc2df(0xbc))/0xb*(-parseInt(_0x1dc2df(0xbb))/0xc);if(_0x2c3f56===_0x271da1)break;else _0x5652a1['push'](_0x5652a1['shift']());}catch(_0x3dad01){_0x5652a1['push'](_0x5652a1['shift']());}}}(a163_0x2b85,0x51bb4));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0x2b85(){var _0x5007f2=['14377HbcpXu','1620ALTmrk','3CVYudC','2905pLlYsz','6060vcvORx','4eDGcew','1393176XYUoeQ','651565uBihBY','26451rITKDn','414296rwokjn','77535XitzRI','1668EmALaQ'];a163_0x2b85=function(){return _0x5007f2;};return a163_0x2b85();}function a163_0x32c3(_0x1ed3e0,_0x462422){_0x1ed3e0=_0x1ed3e0-0xb2;var _0x2b85a7=a163_0x2b85();var _0x32c38d=_0x2b85a7[_0x1ed3e0];return _0x32c38d;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x2c6fc5,_0x1f940c){var _0x2496b5=a163_0x15ac,_0x3b21d7=_0x2c6fc5();while(!![]){try{var _0x251472=-parseInt(_0x2496b5(0x9c))/0x1+parseInt(_0x2496b5(0x99))/0x2+parseInt(_0x2496b5(0x9d))/0x3+-parseInt(_0x2496b5(0x9e))/0x4*(parseInt(_0x2496b5(0xa0))/0x5)+parseInt(_0x2496b5(0xa1))/0x6*(-parseInt(_0x2496b5(0x9f))/0x7)+-parseInt(_0x2496b5(0x9b))/0x8+-parseInt(_0x2496b5(0x9a))/0x9*(-parseInt(_0x2496b5(0x98))/0xa);if(_0x251472===_0x1f940c)break;else _0x3b21d7['push'](_0x3b21d7['shift']());}catch(_0x1ed062){_0x3b21d7['push'](_0x3b21d7['shift']());}}}(a163_0x42df,0xd18ef));function a163_0x15ac(_0x259f9b,_0x5688e3){_0x259f9b=_0x259f9b-0x98;var _0x42df84=a163_0x42df();var _0x15ac6d=_0x42df84[_0x259f9b];return _0x15ac6d;}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_0x42df(){var _0x4ed1a8=['20nRobpI','795360uXLdYz','19908153qjNAVB','6968656ctJaut','1190030fIKWyH','159501TBBdVW','200260JKOMjn','434ZQAbIp','100gcyFmn','92334gYWbaE'];a163_0x42df=function(){return _0x4ed1a8;};return a163_0x42df();}
@@ -1 +1 @@
1
- function a164_0xd6d8(_0x449e52,_0x5493f8){_0x449e52=_0x449e52-0xc4;const _0x2a9fb5=a164_0x2a9f();let _0xd6d84f=_0x2a9fb5[_0x449e52];return _0xd6d84f;}const a164_0x3a3d26=a164_0xd6d8;(function(_0x19a4ee,_0x147645){const _0x11dfae=a164_0xd6d8,_0x31ee57=_0x19a4ee();while(!![]){try{const _0x22212f=parseInt(_0x11dfae(0xc4))/0x1*(-parseInt(_0x11dfae(0xd2))/0x2)+-parseInt(_0x11dfae(0x104))/0x3+parseInt(_0x11dfae(0xd4))/0x4*(-parseInt(_0x11dfae(0xc7))/0x5)+parseInt(_0x11dfae(0xde))/0x6*(parseInt(_0x11dfae(0x113))/0x7)+parseInt(_0x11dfae(0x109))/0x8*(-parseInt(_0x11dfae(0xe9))/0x9)+-parseInt(_0x11dfae(0x103))/0xa+parseInt(_0x11dfae(0xfd))/0xb*(parseInt(_0x11dfae(0x10d))/0xc);if(_0x22212f===_0x147645)break;else _0x31ee57['push'](_0x31ee57['shift']());}catch(_0x51b59e){_0x31ee57['push'](_0x31ee57['shift']());}}}(a164_0x2a9f,0x19b33));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x3a3d26(0xcb)]([a164_0x3a3d26(0xc9),a164_0x3a3d26(0xd6),a164_0x3a3d26(0xdf),a164_0x3a3d26(0xdc),a164_0x3a3d26(0x102),'In',a164_0x3a3d26(0x114),'Regexp',a164_0x3a3d26(0xee),a164_0x3a3d26(0xcf),a164_0x3a3d26(0xe2),a164_0x3a3d26(0xe4),a164_0x3a3d26(0x107),a164_0x3a3d26(0xcd),'TimeRange']);export const TimeUnitSchema=z[a164_0x3a3d26(0xcb)](['second','minute','hour','day',a164_0x3a3d26(0xce),a164_0x3a3d26(0xfa),a164_0x3a3d26(0x115)]);export const AggregationTypeSchema=z[a164_0x3a3d26(0xcb)]([a164_0x3a3d26(0x105),a164_0x3a3d26(0xda),a164_0x3a3d26(0xe5),a164_0x3a3d26(0xfe),a164_0x3a3d26(0x100),a164_0x3a3d26(0xef),a164_0x3a3d26(0x10a),a164_0x3a3d26(0xc5)]);const TemporalValueSchema=z[a164_0x3a3d26(0xcc)]([z[a164_0x3a3d26(0x112)]({'timestamp':z[a164_0x3a3d26(0xed)]()}),z['object']({'last':z['union']([z['number'](),z[a164_0x3a3d26(0xf3)](z[a164_0x3a3d26(0xed)](),z[a164_0x3a3d26(0x10c)]())]),'unit':z[a164_0x3a3d26(0xed)]()})]),OperatorValueSchema=z[a164_0x3a3d26(0xcc)]([z[a164_0x3a3d26(0xed)](),z[a164_0x3a3d26(0x10c)](),z[a164_0x3a3d26(0x10f)](),TemporalValueSchema,z[a164_0x3a3d26(0xdd)](z[a164_0x3a3d26(0xcc)]([z[a164_0x3a3d26(0xed)](),z['number'](),z[a164_0x3a3d26(0x10f)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x3a3d26(0xc9),'Greater',a164_0x3a3d26(0xdc),a164_0x3a3d26(0xdf),a164_0x3a3d26(0x102),'In',a164_0x3a3d26(0xe4),a164_0x3a3d26(0x107),a164_0x3a3d26(0xcd),a164_0x3a3d26(0x10e),a164_0x3a3d26(0xcf),a164_0x3a3d26(0xe2)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x3a3d26(0xcf),a164_0x3a3d26(0xe2)]);function a164_0x2a9f(){const _0xdc4c0=['string','IsNull','CountDistinct','TimeRange','type','realtime','record','optional','Operator\x20\x27','has','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','funnel_stage','\x27\x20requires\x20a\x20value','month','duration','addIssue','27445TxwAid','Min','MISSING_BETWEEN_BOUNDS','Max','value','LessEqual','1099470RilEsw','321030ezbtGo','Count','superRefine','StartWith','TimeRange\x20operator\x20requires\x20\x27from\x27','1784ftIzUH','First','from','number','3096sblwuY','Regexp','boolean','Column','And','object','182kJWijT','Between','year','unit','193kQEAPs','Last','literal','5XlYGdj','MISSING_TIME_UNIT','Equal','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','enum','union','EndWith','week','TimeWithinPast','discriminatedUnion','max','1452pVfVLy','min','806948EXZxJm','all','Greater','Behavior','operator','segment','Sum','any','GreaterEqual','array','11442HOkVWJ','Less','batch','exclude','TimeWithinNext','Segment\x20reference\x20must\x20not\x20be\x20empty','Contain','Average','column','custom','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','1179kZVxwf','Value','lazy','timestamp'];a164_0x2a9f=function(){return _0xdc4c0;};return a164_0x2a9f();}export const OperatorDefSchema=z[a164_0x3a3d26(0x112)]({'type':OperatorTypeSchema,'not':z[a164_0x3a3d26(0x10f)]()[a164_0x3a3d26(0xf4)](),'value':OperatorValueSchema[a164_0x3a3d26(0xf4)](),'min':z['union']([z[a164_0x3a3d26(0x10c)](),z[a164_0x3a3d26(0xed)](),TemporalValueSchema])['optional'](),'max':z[a164_0x3a3d26(0xcc)]([z[a164_0x3a3d26(0x10c)](),z[a164_0x3a3d26(0xed)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a164_0x3a3d26(0xf4)](),'duration':z[a164_0x3a3d26(0x112)]({'day':z['number']()[a164_0x3a3d26(0xf4)](),'week':z['number']()[a164_0x3a3d26(0xf4)](),'month':z[a164_0x3a3d26(0x10c)]()[a164_0x3a3d26(0xf4)](),'year':z[a164_0x3a3d26(0x10c)]()['optional'](),'hour':z['number']()[a164_0x3a3d26(0xf4)](),'minute':z['number']()[a164_0x3a3d26(0xf4)](),'second':z[a164_0x3a3d26(0x10c)]()[a164_0x3a3d26(0xf4)]()})[a164_0x3a3d26(0xf4)](),'from':z[a164_0x3a3d26(0x112)]({'last':z[a164_0x3a3d26(0xcc)]([z['number'](),z['string']()]),'unit':TimeUnitSchema})['optional'](),'reverse':z['boolean']()[a164_0x3a3d26(0xf4)]()})['superRefine']((_0x186722,_0x191136)=>{const _0x29e4ad=a164_0x3a3d26;OPERATORS_REQUIRING_VALUE['has'](_0x186722[_0x29e4ad(0xf1)])&&(_0x186722['value']===undefined||_0x186722['value']===null)&&_0x191136[_0x29e4ad(0xfc)]({'code':_0x29e4ad(0xe7),'message':_0x29e4ad(0xf5)+_0x186722[_0x29e4ad(0xf1)]+_0x29e4ad(0xf9),'path':[_0x29e4ad(0x101)]}),_0x186722['type']===_0x29e4ad(0x114)&&_0x186722[_0x29e4ad(0xd3)]===undefined&&_0x186722[_0x29e4ad(0xd1)]===undefined&&_0x191136[_0x29e4ad(0xfc)]({'code':'custom','message':_0x29e4ad(0xe8),'params':{'validationCode':_0x29e4ad(0xff)}}),OPERATORS_REQUIRING_UNIT[_0x29e4ad(0xf6)](_0x186722[_0x29e4ad(0xf1)])&&_0x186722[_0x29e4ad(0x101)]!==undefined&&!_0x186722[_0x29e4ad(0x116)]&&_0x191136[_0x29e4ad(0xfc)]({'code':_0x29e4ad(0xe7),'message':'Operator\x20\x27'+_0x186722[_0x29e4ad(0xf1)]+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x29e4ad(0x116)],'params':{'validationCode':_0x29e4ad(0xc8)}}),_0x186722[_0x29e4ad(0xf1)]===_0x29e4ad(0xf0)&&(!_0x186722[_0x29e4ad(0xfb)]&&_0x191136[_0x29e4ad(0xfc)]({'code':_0x29e4ad(0xe7),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':['duration']}),!_0x186722['from']&&_0x191136['addIssue']({'code':_0x29e4ad(0xe7),'message':_0x29e4ad(0x108),'path':[_0x29e4ad(0x10b)]}));});export const ArrayMatchingSchema=z[a164_0x3a3d26(0xcc)]([z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0xdb)),z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0xd5)),z['object']({'atLeast':z['number']()}),z[a164_0x3a3d26(0x112)]({'atMost':z['number']()}),z[a164_0x3a3d26(0x112)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x3a3d26(0xd0)](a164_0x3a3d26(0xf1),[z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xcb)]([a164_0x3a3d26(0xda),a164_0x3a3d26(0xfe),a164_0x3a3d26(0x100),a164_0x3a3d26(0xe5)]),'column':z['string'](),'groupingColumns':z[a164_0x3a3d26(0xdd)](z[a164_0x3a3d26(0xed)]())['optional']()}),z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0x105)),'groupingColumns':z[a164_0x3a3d26(0xdd)](z[a164_0x3a3d26(0xed)]())['optional']()}),z[a164_0x3a3d26(0x112)]({'type':z['literal'](a164_0x3a3d26(0xef)),'columns':z[a164_0x3a3d26(0xdd)](z[a164_0x3a3d26(0xed)]())}),z['object']({'type':z[a164_0x3a3d26(0xcb)]([a164_0x3a3d26(0x10a),a164_0x3a3d26(0xc5)]),'column':z[a164_0x3a3d26(0xed)](),'orderColumn':z[a164_0x3a3d26(0xed)](),'groupingColumns':z[a164_0x3a3d26(0xdd)](z[a164_0x3a3d26(0xed)]())['optional']()})]);export const TimeWindowDefSchema=z[a164_0x3a3d26(0x112)]({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set(['TimeWithinPast',a164_0x3a3d26(0xe2),a164_0x3a3d26(0xf0)]);export const FilterColumnConditionDefSchema=z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0x110)),'column':z[a164_0x3a3d26(0xed)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3a3d26(0xf4)]()})[a164_0x3a3d26(0x106)]((_0x4bb90f,_0x84f659)=>{const _0x43ec9f=a164_0x3a3d26,_0x17839d=_0x4bb90f['operator'][_0x43ec9f(0xf1)];_0x4bb90f[_0x43ec9f(0xe6)]===_0x43ec9f(0xec)?!TIMESTAMP_OPERATORS[_0x43ec9f(0xf6)](_0x17839d)&&_0x84f659['addIssue']({'code':'custom','message':_0x43ec9f(0xca)+_0x17839d+'\x27)','path':[_0x43ec9f(0xd8),_0x43ec9f(0xf1)]}):TIMESTAMP_OPERATORS['has'](_0x17839d)&&_0x84f659['addIssue']({'code':_0x43ec9f(0xe7),'message':_0x43ec9f(0xf5)+_0x17839d+_0x43ec9f(0xf7),'path':[_0x43ec9f(0xd8),_0x43ec9f(0xf1)]});});export const FilterRuleDefSchema=z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xc6)]('And'),'conditions':z[a164_0x3a3d26(0xdd)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x3a3d26(0xeb)](()=>z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0xea)),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3a3d26(0xf4)](),'exclude':z[a164_0x3a3d26(0x10f)]()[a164_0x3a3d26(0xf4)](),'aggregation':AggregationDefSchema[a164_0x3a3d26(0xf4)](),'source':z[a164_0x3a3d26(0xed)]()[a164_0x3a3d26(0xf4)](),'filter':FilterRuleDefSchema['optional'](),'limit':z[a164_0x3a3d26(0x10c)]()[a164_0x3a3d26(0xf4)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0xd7)),'attribute':z[a164_0x3a3d26(0xed)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x3a3d26(0xf4)](),'exclude':z[a164_0x3a3d26(0x10f)]()[a164_0x3a3d26(0xf4)](),'aggregation':AggregationDefSchema[a164_0x3a3d26(0xf4)](),'source':z[a164_0x3a3d26(0xed)]()[a164_0x3a3d26(0xf4)](),'filter':FilterRuleDefSchema[a164_0x3a3d26(0xf4)](),'timeWindow':TimeWindowDefSchema[a164_0x3a3d26(0xf4)](),'limit':z[a164_0x3a3d26(0x10c)]()[a164_0x3a3d26(0xf4)]()}));export const ColumnConditionDefSchema=z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xc6)](a164_0x3a3d26(0x110)),'column':z[a164_0x3a3d26(0xed)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x3a3d26(0xeb)](()=>z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xcb)]([a164_0x3a3d26(0x111),'Or']),'conditions':z[a164_0x3a3d26(0xdd)](ConditionDefSchema),'description':z[a164_0x3a3d26(0xed)]()[a164_0x3a3d26(0xf4)]()}));export const SegmentRefConditionDefSchema=z[a164_0x3a3d26(0x112)]({'type':z[a164_0x3a3d26(0xcb)](['include',a164_0x3a3d26(0xe1)]),'segment':z[a164_0x3a3d26(0xed)]()['min'](0x1,a164_0x3a3d26(0xe3))});export const ConditionDefSchema=z[a164_0x3a3d26(0xeb)](()=>z[a164_0x3a3d26(0xcc)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x3a3d26(0xeb)](()=>z['object']({'type':z['enum'](['And','Or']),'conditions':z['array'](ConditionDefSchema),'description':z['string']()[a164_0x3a3d26(0xf4)]()}));export const SegmentDefSchema=z[a164_0x3a3d26(0x112)]({'type':z['literal'](a164_0x3a3d26(0xd9))[a164_0x3a3d26(0xf4)](),'name':z[a164_0x3a3d26(0xed)]()[a164_0x3a3d26(0xd3)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x3a3d26(0xed)]()[a164_0x3a3d26(0xf4)](),'folder':z['string']()[a164_0x3a3d26(0xf4)](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x3a3d26(0xcb)]([a164_0x3a3d26(0xe0),a164_0x3a3d26(0xf2),a164_0x3a3d26(0xf8)])[a164_0x3a3d26(0xf4)](),'visible':z['boolean']()['optional'](),'activations':z[a164_0x3a3d26(0xdd)](z[a164_0x3a3d26(0xdb)]())[a164_0x3a3d26(0xf4)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0xac45c7=a164_0x30f4;(function(_0x5b7e9c,_0xdfb1a7){const _0x2870ec=a164_0x30f4,_0x4febbf=_0x5b7e9c();while(!![]){try{const _0x32a1f0=-parseInt(_0x2870ec(0xe9))/0x1*(-parseInt(_0x2870ec(0xed))/0x2)+parseInt(_0x2870ec(0xdd))/0x3*(-parseInt(_0x2870ec(0x109))/0x4)+-parseInt(_0x2870ec(0xda))/0x5*(parseInt(_0x2870ec(0x10d))/0x6)+-parseInt(_0x2870ec(0xee))/0x7*(parseInt(_0x2870ec(0xf1))/0x8)+-parseInt(_0x2870ec(0x128))/0x9+parseInt(_0x2870ec(0xf9))/0xa*(-parseInt(_0x2870ec(0xfb))/0xb)+-parseInt(_0x2870ec(0x126))/0xc*(-parseInt(_0x2870ec(0x111))/0xd);if(_0x32a1f0===_0xdfb1a7)break;else _0x4febbf['push'](_0x4febbf['shift']());}catch(_0x5c0fe4){_0x4febbf['push'](_0x4febbf['shift']());}}}(a164_0xfe60,0xc6b2f));import{z}from'zod';function a164_0x30f4(_0x550a06,_0xe15378){_0x550a06=_0x550a06-0xd7;const _0xfe6095=a164_0xfe60();let _0x30f4b0=_0xfe6095[_0x550a06];return _0x30f4b0;}export const OperatorTypeSchema=z[a164_0xac45c7(0x110)]([a164_0xac45c7(0xe5),a164_0xac45c7(0xef),a164_0xac45c7(0xde),a164_0xac45c7(0xf3),a164_0xac45c7(0x11f),'In',a164_0xac45c7(0x11d),'Regexp',a164_0xac45c7(0x118),'TimeWithinPast',a164_0xac45c7(0x115),a164_0xac45c7(0x104),'StartWith',a164_0xac45c7(0xd7),'TimeRange']);export const TimeUnitSchema=z['enum']([a164_0xac45c7(0x117),a164_0xac45c7(0xdf),a164_0xac45c7(0x10a),a164_0xac45c7(0x108),'week',a164_0xac45c7(0x10c),a164_0xac45c7(0x107)]);export const AggregationTypeSchema=z[a164_0xac45c7(0x110)]([a164_0xac45c7(0xff),a164_0xac45c7(0x113),'Average',a164_0xac45c7(0x114),'Max','CountDistinct',a164_0xac45c7(0x112),'Last']);const TemporalValueSchema=z['union']([z[a164_0xac45c7(0xf8)]({'timestamp':z[a164_0xac45c7(0xe1)]()}),z[a164_0xac45c7(0xf8)]({'last':z['union']([z[a164_0xac45c7(0xdb)](),z['record'](z['string'](),z[a164_0xac45c7(0xdb)]())]),'unit':z['string']()})]),OperatorValueSchema=z['union']([z[a164_0xac45c7(0xe1)](),z['number'](),z['boolean'](),TemporalValueSchema,z['array'](z[a164_0xac45c7(0xfd)]([z[a164_0xac45c7(0xe1)](),z[a164_0xac45c7(0xdb)](),z[a164_0xac45c7(0x119)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0xac45c7(0xe5),a164_0xac45c7(0xef),a164_0xac45c7(0xf3),a164_0xac45c7(0xde),a164_0xac45c7(0x11f),'In','Contain',a164_0xac45c7(0xe4),a164_0xac45c7(0xd7),a164_0xac45c7(0xfe),a164_0xac45c7(0x11a),a164_0xac45c7(0x115)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0xac45c7(0x11a),a164_0xac45c7(0x115)]);export const OperatorDefSchema=z[a164_0xac45c7(0xf8)]({'type':OperatorTypeSchema,'not':z[a164_0xac45c7(0x119)]()[a164_0xac45c7(0x11c)](),'value':OperatorValueSchema[a164_0xac45c7(0x11c)](),'min':z[a164_0xac45c7(0xfd)]([z[a164_0xac45c7(0xdb)](),z['string'](),TemporalValueSchema])['optional'](),'max':z[a164_0xac45c7(0xfd)]([z['number'](),z[a164_0xac45c7(0xe1)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0xac45c7(0xf8)]({'day':z[a164_0xac45c7(0xdb)]()[a164_0xac45c7(0x11c)](),'week':z[a164_0xac45c7(0xdb)]()[a164_0xac45c7(0x11c)](),'month':z[a164_0xac45c7(0xdb)]()['optional'](),'year':z[a164_0xac45c7(0xdb)]()[a164_0xac45c7(0x11c)](),'hour':z['number']()[a164_0xac45c7(0x11c)](),'minute':z[a164_0xac45c7(0xdb)]()[a164_0xac45c7(0x11c)](),'second':z[a164_0xac45c7(0xdb)]()[a164_0xac45c7(0x11c)]()})[a164_0xac45c7(0x11c)](),'from':z[a164_0xac45c7(0xf8)]({'last':z['union']([z[a164_0xac45c7(0xdb)](),z[a164_0xac45c7(0xe1)]()]),'unit':TimeUnitSchema})[a164_0xac45c7(0x11c)](),'reverse':z[a164_0xac45c7(0x119)]()['optional']()})['superRefine']((_0x357dcf,_0x3f45eb)=>{const _0x1fe616=a164_0xac45c7;OPERATORS_REQUIRING_VALUE[_0x1fe616(0xd9)](_0x357dcf['type'])&&(_0x357dcf[_0x1fe616(0x102)]===undefined||_0x357dcf[_0x1fe616(0x102)]===null)&&_0x3f45eb[_0x1fe616(0x129)]({'code':_0x1fe616(0xf7),'message':_0x1fe616(0x10f)+_0x357dcf[_0x1fe616(0x121)]+_0x1fe616(0xe7),'path':[_0x1fe616(0x102)]}),_0x357dcf[_0x1fe616(0x121)]===_0x1fe616(0x11d)&&_0x357dcf[_0x1fe616(0x11b)]===undefined&&_0x357dcf[_0x1fe616(0x105)]===undefined&&_0x3f45eb[_0x1fe616(0x129)]({'code':_0x1fe616(0xf7),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x1fe616(0xfc)}}),OPERATORS_REQUIRING_UNIT[_0x1fe616(0xd9)](_0x357dcf['type'])&&_0x357dcf[_0x1fe616(0x102)]!==undefined&&!_0x357dcf[_0x1fe616(0x100)]&&_0x3f45eb[_0x1fe616(0x129)]({'code':_0x1fe616(0xf7),'message':_0x1fe616(0x10f)+_0x357dcf[_0x1fe616(0x121)]+_0x1fe616(0xe8),'path':['unit'],'params':{'validationCode':_0x1fe616(0x122)}}),_0x357dcf[_0x1fe616(0x121)]===_0x1fe616(0x125)&&(!_0x357dcf['duration']&&_0x3f45eb[_0x1fe616(0x129)]({'code':_0x1fe616(0xf7),'message':_0x1fe616(0x10b),'path':[_0x1fe616(0xf4)]}),!_0x357dcf[_0x1fe616(0xe3)]&&_0x3f45eb[_0x1fe616(0x129)]({'code':_0x1fe616(0xf7),'message':_0x1fe616(0xe6),'path':[_0x1fe616(0xe3)]}));});export const ArrayMatchingSchema=z['union']([z[a164_0xac45c7(0x106)](a164_0xac45c7(0xe0)),z[a164_0xac45c7(0x106)]('all'),z['object']({'atLeast':z[a164_0xac45c7(0xdb)]()}),z['object']({'atMost':z[a164_0xac45c7(0xdb)]()}),z[a164_0xac45c7(0xf8)]({'exactly':z[a164_0xac45c7(0xdb)]()})]);export const AggregationDefSchema=z[a164_0xac45c7(0xd8)](a164_0xac45c7(0x121),[z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x110)]([a164_0xac45c7(0x113),'Min',a164_0xac45c7(0x10e),a164_0xac45c7(0x116)]),'column':z[a164_0xac45c7(0xe1)](),'groupingColumns':z['array'](z[a164_0xac45c7(0xe1)]())[a164_0xac45c7(0x11c)]()}),z['object']({'type':z['literal'](a164_0xac45c7(0xff)),'groupingColumns':z[a164_0xac45c7(0xf6)](z[a164_0xac45c7(0xe1)]())[a164_0xac45c7(0x11c)]()}),z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x106)](a164_0xac45c7(0x12a)),'columns':z[a164_0xac45c7(0xf6)](z[a164_0xac45c7(0xe1)]())}),z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x110)]([a164_0xac45c7(0x112),a164_0xac45c7(0xf5)]),'column':z['string'](),'orderColumn':z[a164_0xac45c7(0xe1)](),'groupingColumns':z['array'](z[a164_0xac45c7(0xe1)]())['optional']()})]);export const TimeWindowDefSchema=z[a164_0xac45c7(0xf8)]({'duration':z[a164_0xac45c7(0xdb)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0xac45c7(0x11a),a164_0xac45c7(0x115),a164_0xac45c7(0x125)]);export const FilterColumnConditionDefSchema=z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x106)](a164_0xac45c7(0x124)),'column':z[a164_0xac45c7(0xe1)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional']()})[a164_0xac45c7(0x123)]((_0x180234,_0x4cec89)=>{const _0x247bb0=a164_0xac45c7,_0x29fdd4=_0x180234[_0x247bb0(0xec)]['type'];_0x180234[_0x247bb0(0xea)]===_0x247bb0(0xf2)?!TIMESTAMP_OPERATORS['has'](_0x29fdd4)&&_0x4cec89[_0x247bb0(0x129)]({'code':_0x247bb0(0xf7),'message':_0x247bb0(0xeb)+_0x29fdd4+'\x27)','path':['operator','type']}):TIMESTAMP_OPERATORS[_0x247bb0(0xd9)](_0x29fdd4)&&_0x4cec89['addIssue']({'code':_0x247bb0(0xf7),'message':_0x247bb0(0x10f)+_0x29fdd4+_0x247bb0(0x127),'path':[_0x247bb0(0xec),_0x247bb0(0x121)]});});export const FilterRuleDefSchema=z['object']({'type':z[a164_0xac45c7(0x106)](a164_0xac45c7(0xf0)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z['object']({'type':z[a164_0xac45c7(0x106)]('Value'),'attribute':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0xac45c7(0x11c)](),'exclude':z[a164_0xac45c7(0x119)]()[a164_0xac45c7(0x11c)](),'aggregation':AggregationDefSchema[a164_0xac45c7(0x11c)](),'source':z[a164_0xac45c7(0xe1)]()['optional'](),'filter':FilterRuleDefSchema[a164_0xac45c7(0x11c)](),'limit':z['number']()[a164_0xac45c7(0x11c)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x106)](a164_0xac45c7(0x101)),'attribute':z[a164_0xac45c7(0xe1)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0xac45c7(0x11c)](),'exclude':z[a164_0xac45c7(0x119)]()[a164_0xac45c7(0x11c)](),'aggregation':AggregationDefSchema[a164_0xac45c7(0x11c)](),'source':z[a164_0xac45c7(0xe1)]()['optional'](),'filter':FilterRuleDefSchema[a164_0xac45c7(0x11c)](),'timeWindow':TimeWindowDefSchema[a164_0xac45c7(0x11c)](),'limit':z['number']()['optional']()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0xac45c7(0x106)](a164_0xac45c7(0x124)),'column':z[a164_0xac45c7(0xe1)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z['lazy'](()=>z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x110)]([a164_0xac45c7(0xf0),'Or']),'conditions':z[a164_0xac45c7(0xf6)](ConditionDefSchema),'description':z[a164_0xac45c7(0xe1)]()[a164_0xac45c7(0x11c)]()}));export const SegmentRefConditionDefSchema=z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x110)]([a164_0xac45c7(0xe2),a164_0xac45c7(0x103)]),'segment':z[a164_0xac45c7(0xe1)]()[a164_0xac45c7(0x11b)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});function a164_0xfe60(){const _0x182480=['literal','year','day','32884WCQyIO','hour','TimeRange\x20operator\x20requires\x20\x27duration\x27','month','4308IBBIee','Max','Operator\x20\x27','enum','55412799SSkrEL','First','Sum','Min','TimeWithinNext','Average','second','IsNull','boolean','TimeWithinPast','min','optional','Between','lazy','LessEqual','batch','type','MISSING_TIME_UNIT','superRefine','Column','TimeRange','12BpGoWo','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','6902802ciNylX','addIssue','CountDistinct','EndWith','discriminatedUnion','has','6790FmdDsZ','number','segment','303tezwaF','Less','minute','any','string','include','from','StartWith','Equal','TimeRange\x20operator\x20requires\x20\x27from\x27','\x27\x20requires\x20a\x20value','\x27\x20requires\x20a\x20time\x20unit','268FbyaLs','column','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','operator','64nUJJlh','7SvulKD','Greater','And','1700176ZqYFgf','timestamp','GreaterEqual','duration','Last','array','custom','object','90UaEgly','Segment\x20name\x20is\x20required','821777pRsmKE','MISSING_BETWEEN_BOUNDS','union','Regexp','Count','unit','Behavior','value','exclude','Contain','max'];a164_0xfe60=function(){return _0x182480;};return a164_0xfe60();}export const ConditionDefSchema=z[a164_0xac45c7(0x11e)](()=>z[a164_0xac45c7(0xfd)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0xac45c7(0x11e)](()=>z['object']({'type':z[a164_0xac45c7(0x110)](['And','Or']),'conditions':z[a164_0xac45c7(0xf6)](ConditionDefSchema),'description':z['string']()[a164_0xac45c7(0x11c)]()}));export const SegmentDefSchema=z[a164_0xac45c7(0xf8)]({'type':z[a164_0xac45c7(0x106)](a164_0xac45c7(0xdc))[a164_0xac45c7(0x11c)](),'name':z[a164_0xac45c7(0xe1)]()[a164_0xac45c7(0x11b)](0x1,a164_0xac45c7(0xfa)),'description':z[a164_0xac45c7(0xe1)]()[a164_0xac45c7(0x11c)](),'folder':z['string']()[a164_0xac45c7(0x11c)](),'rule':RuleDefSchema[a164_0xac45c7(0x11c)](),'kind':z[a164_0xac45c7(0x110)]([a164_0xac45c7(0x120),'realtime','funnel_stage'])['optional'](),'visible':z[a164_0xac45c7(0x119)]()[a164_0xac45c7(0x11c)](),'activations':z[a164_0xac45c7(0xf6)](z[a164_0xac45c7(0xe0)]())[a164_0xac45c7(0x11c)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x28eb79=a165_0xe619;(function(_0x57d86b,_0x3042a7){const _0x4e2e15=a165_0xe619,_0x2a8472=_0x57d86b();while(!![]){try{const _0xd89dfa=-parseInt(_0x4e2e15(0x1e3))/0x1*(parseInt(_0x4e2e15(0x1dd))/0x2)+parseInt(_0x4e2e15(0x1ea))/0x3+-parseInt(_0x4e2e15(0x1d6))/0x4+-parseInt(_0x4e2e15(0x1f6))/0x5+-parseInt(_0x4e2e15(0x1e6))/0x6+-parseInt(_0x4e2e15(0x1e8))/0x7+-parseInt(_0x4e2e15(0x1eb))/0x8*(-parseInt(_0x4e2e15(0x1f3))/0x9);if(_0xd89dfa===_0x3042a7)break;else _0x2a8472['push'](_0x2a8472['shift']());}catch(_0x1786ab){_0x2a8472['push'](_0x2a8472['shift']());}}}(a165_0x520a,0x3ec6f));function a165_0xe619(_0x1c55e8,_0x412ca3){_0x1c55e8=_0x1c55e8-0x1d6;const _0x520aa6=a165_0x520a();let _0xe619ee=_0x520aa6[_0x1c55e8];return _0xe619ee;}import{readFileSync}from'fs';import*as a165_0x12f798 from'path';import*as a165_0x445733 from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set(['email',a165_0x28eb79(0x1f1)]);export function isJourneyDef(_0x586d31){const _0x3781ed=a165_0x28eb79;return typeof _0x586d31==='object'&&_0x586d31!==null&&_0x3781ed(0x1d9)in _0x586d31&&_0x586d31[_0x3781ed(0x1d9)]===_0x3781ed(0x1f0);}export function isCampaignDef(_0x111507){const _0x2e3b1b=a165_0x28eb79;if(typeof _0x111507!=='object'||_0x111507===null)return![];const _0x215166=_0x111507,_0x4e1363=VALID_CAMPAIGN_TYPES[_0x2e3b1b(0x1e4)](_0x215166[_0x2e3b1b(0x1e0)]);if(_0x215166[_0x2e3b1b(0x1d9)]===_0x2e3b1b(0x1d8)&&_0x4e1363)return!![];if(_0x4e1363&&!_0x215166[_0x2e3b1b(0x1d9)])return!![];return![];}function a165_0x520a(){const _0xa4fe22=['result','12825agWSsK','toJSON','error','1276300xKieJk','1773088bvHAUp','message','campaign','type','valid','basename','object','24yfrVgx','map','filterType','campaign_type','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','length','28567FphYaC','has','segment','1732608qZZqjG','not\x20a\x20','1874341ArWuJV','YAML\x20parse\x20error:\x20','191331YTWDoB','10056QNNLov','utf-8','skipped','warnings','template','journey','push'];a165_0x520a=function(){return _0xa4fe22;};return a165_0x520a();}export function isTemplateDef(_0x3614d4){const _0x2ffaa8=a165_0x28eb79;return typeof _0x3614d4===_0x2ffaa8(0x1dc)&&_0x3614d4!==null&&_0x2ffaa8(0x1d9)in _0x3614d4&&_0x3614d4[_0x2ffaa8(0x1d9)]===_0x2ffaa8(0x1ef);}export function isValidationResult(_0x27099b){const _0x21e369=a165_0x28eb79;return!(_0x21e369(0x1ed)in _0x27099b);}export function createParseErrorResult(_0x241181,_0x17d08c,_0xb1aa6f,_0x185421,_0x5704c6=a165_0x28eb79(0x1e5)){const _0x16ee83=a165_0x28eb79;return{'filePath':_0x241181,'relativePath':_0x17d08c,'source':_0xb1aa6f,'result':{'valid':![],'errors':[{'level':_0x16ee83(0x1f5),'path':'','code':'YAML_PARSE_ERROR','message':_0x185421}],'warnings':[]},'fileType':_0x5704c6};}export function validateYamlFile(_0x1db548,_0x2da683,_0x44863b={}){const _0x20d76c=a165_0x28eb79,_0xd6cdd9=a165_0x12f798['relative'](_0x2da683,_0x1db548)||a165_0x12f798[_0x20d76c(0x1db)](_0x1db548);try{const _0x1b39f6=readFileSync(_0x1db548,_0x20d76c(0x1ec)),_0x204d49=a165_0x445733['parseDocument'](_0x1b39f6),_0x1a5687=_0x204d49[_0x20d76c(0x1f4)]();if(!_0x1a5687)return createParseErrorResult(_0x1db548,_0xd6cdd9,_0x1b39f6,_0x20d76c(0x1e1));let _0xfe84a7;if(isJourneyDef(_0x1a5687))_0xfe84a7=_0x20d76c(0x1f0);else{if(isCampaignDef(_0x1a5687))_0xfe84a7='campaign';else isTemplateDef(_0x1a5687)?_0xfe84a7=_0x20d76c(0x1ef):_0xfe84a7=_0x20d76c(0x1e5);}if(_0x44863b[_0x20d76c(0x1df)]&&_0xfe84a7!==_0x44863b['filterType'])return{'filePath':_0x1db548,'relativePath':_0xd6cdd9,'skipped':!![],'reason':_0x20d76c(0x1e7)+_0x44863b[_0x20d76c(0x1df)]};const _0x1c3998={'source':_0x1b39f6,'document':_0x204d49};let _0x427cd1;if(_0xfe84a7===_0x20d76c(0x1f0))_0x427cd1=validateJourneyDef(_0x1a5687,_0x1c3998);else{if(_0xfe84a7===_0x20d76c(0x1d8))_0x427cd1=validateCampaignDef(_0x1a5687,_0x1c3998);else _0xfe84a7===_0x20d76c(0x1ef)?_0x427cd1=validateTemplateDef(_0x1a5687,_0x1c3998):_0x427cd1=validateSegmentDef(_0x1a5687,_0x1c3998);}return{'filePath':_0x1db548,'relativePath':_0xd6cdd9,'source':_0x1b39f6,'result':_0x427cd1,'fileType':_0xfe84a7};}catch(_0x1c0906){const _0xcee911=_0x1c0906 instanceof Error?_0x1c0906[_0x20d76c(0x1d7)]:String(_0x1c0906);return createParseErrorResult(_0x1db548,_0xd6cdd9,'',_0x20d76c(0x1e9)+_0xcee911);}}export function validateYamlFiles(_0x3551f0,_0x3e3575,_0x2c848a={}){const _0x17dba7=a165_0x28eb79;return _0x3551f0[_0x17dba7(0x1de)](_0x57eeb7=>validateYamlFile(_0x57eeb7,_0x3e3575,_0x2c848a));}export function calculateSummary(_0x27dee9){const _0x46afa9=a165_0x28eb79;let _0x200932=0x0,_0x39dcc2=0x0,_0x5d541b=0x0,_0x76d56=0x0;for(const _0x440024 of _0x27dee9){if(!isValidationResult(_0x440024)){_0x76d56++;continue;}_0x440024[_0x46afa9(0x1f2)][_0x46afa9(0x1da)]?_0x200932++:_0x39dcc2++,_0x5d541b+=_0x440024[_0x46afa9(0x1f2)][_0x46afa9(0x1ee)][_0x46afa9(0x1e2)];}return{'validCount':_0x200932,'invalidCount':_0x39dcc2,'warningCount':_0x5d541b,'skippedCount':_0x76d56,'hasErrors':_0x39dcc2>0x0};}
1
+ const a165_0x15437a=a165_0x1f47;(function(_0x439866,_0x1a9997){const _0x17e4bd=a165_0x1f47,_0x497c35=_0x439866();while(!![]){try{const _0x44a9c8=-parseInt(_0x17e4bd(0x191))/0x1*(-parseInt(_0x17e4bd(0x18d))/0x2)+parseInt(_0x17e4bd(0x173))/0x3+parseInt(_0x17e4bd(0x190))/0x4+-parseInt(_0x17e4bd(0x186))/0x5+-parseInt(_0x17e4bd(0x176))/0x6+parseInt(_0x17e4bd(0x181))/0x7*(parseInt(_0x17e4bd(0x18f))/0x8)+-parseInt(_0x17e4bd(0x187))/0x9*(parseInt(_0x17e4bd(0x184))/0xa);if(_0x44a9c8===_0x1a9997)break;else _0x497c35['push'](_0x497c35['shift']());}catch(_0x26c53c){_0x497c35['push'](_0x497c35['shift']());}}}(a165_0x232d,0x8daf3));import{readFileSync}from'fs';import*as a165_0x1960f4 from'path';function a165_0x1f47(_0x10135d,_0x32c2af){_0x10135d=_0x10135d-0x172;const _0x232da3=a165_0x232d();let _0x1f4789=_0x232da3[_0x10135d];return _0x1f4789;}import*as a165_0xb9d1d3 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_0x15437a(0x180),'push']);export function isJourneyDef(_0x152ebe){const _0x12b564=a165_0x15437a;return typeof _0x152ebe==='object'&&_0x152ebe!==null&&_0x12b564(0x174)in _0x152ebe&&_0x152ebe[_0x12b564(0x174)]==='journey';}export function isCampaignDef(_0x749a65){const _0x1a2f2f=a165_0x15437a;if(typeof _0x749a65!==_0x1a2f2f(0x192)||_0x749a65===null)return![];const _0x5d3900=_0x749a65,_0x5ecbe0=VALID_CAMPAIGN_TYPES[_0x1a2f2f(0x172)](_0x5d3900['campaign_type']);if(_0x5d3900[_0x1a2f2f(0x174)]===_0x1a2f2f(0x188)&&_0x5ecbe0)return!![];if(_0x5ecbe0&&!_0x5d3900[_0x1a2f2f(0x174)])return!![];return![];}export function isTemplateDef(_0x1f276c){const _0x2eb99c=a165_0x15437a;return typeof _0x1f276c==='object'&&_0x1f276c!==null&&_0x2eb99c(0x174)in _0x1f276c&&_0x1f276c[_0x2eb99c(0x174)]===_0x2eb99c(0x18c);}export function isValidationResult(_0x5f1ce0){const _0x3d77b0=a165_0x15437a;return!(_0x3d77b0(0x17c)in _0x5f1ce0);}export function createParseErrorResult(_0x233055,_0x56464c,_0x5486bc,_0x1c7ecd,_0x41e0f0='segment'){const _0x122748=a165_0x15437a;return{'filePath':_0x233055,'relativePath':_0x56464c,'source':_0x5486bc,'result':{'valid':![],'errors':[{'level':_0x122748(0x189),'path':'','code':_0x122748(0x177),'message':_0x1c7ecd}],'warnings':[]},'fileType':_0x41e0f0};}export function validateYamlFile(_0x1a7b04,_0x33ab24,_0x2ec8d1={}){const _0x2f127f=a165_0x15437a,_0x156e4d=a165_0x1960f4[_0x2f127f(0x17a)](_0x33ab24,_0x1a7b04)||a165_0x1960f4[_0x2f127f(0x17b)](_0x1a7b04);try{const _0x1320ea=readFileSync(_0x1a7b04,'utf-8'),_0x48732e=a165_0xb9d1d3[_0x2f127f(0x182)](_0x1320ea),_0xd1b704=_0x48732e[_0x2f127f(0x18e)]();if(!_0xd1b704)return createParseErrorResult(_0x1a7b04,_0x156e4d,_0x1320ea,_0x2f127f(0x17e));let _0x39221d;if(isJourneyDef(_0xd1b704))_0x39221d='journey';else{if(isCampaignDef(_0xd1b704))_0x39221d=_0x2f127f(0x188);else isTemplateDef(_0xd1b704)?_0x39221d=_0x2f127f(0x18c):_0x39221d=_0x2f127f(0x185);}if(_0x2ec8d1['filterType']&&_0x39221d!==_0x2ec8d1[_0x2f127f(0x18b)])return{'filePath':_0x1a7b04,'relativePath':_0x156e4d,'skipped':!![],'reason':_0x2f127f(0x17f)+_0x2ec8d1['filterType']};const _0x15fa4e={'source':_0x1320ea,'document':_0x48732e};let _0x12c233;if(_0x39221d===_0x2f127f(0x183))_0x12c233=validateJourneyDef(_0xd1b704,_0x15fa4e);else{if(_0x39221d===_0x2f127f(0x188))_0x12c233=validateCampaignDef(_0xd1b704,_0x15fa4e);else _0x39221d==='template'?_0x12c233=validateTemplateDef(_0xd1b704,_0x15fa4e):_0x12c233=validateSegmentDef(_0xd1b704,_0x15fa4e);}return{'filePath':_0x1a7b04,'relativePath':_0x156e4d,'source':_0x1320ea,'result':_0x12c233,'fileType':_0x39221d};}catch(_0x26851f){const _0x42fb11=_0x26851f instanceof Error?_0x26851f['message']:String(_0x26851f);return createParseErrorResult(_0x1a7b04,_0x156e4d,'','YAML\x20parse\x20error:\x20'+_0x42fb11);}}function a165_0x232d(){const _0x366e8f=['toJSON','24mRLCGE','1025940xTCaXF','254nsQqsk','object','has','1175130zjlVEq','type','map','2565144bAWnIG','YAML_PARSE_ERROR','result','length','relative','basename','skipped','warnings','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','not\x20a\x20','email','315644idMBpO','parseDocument','journey','74830XdJXUk','segment','2134080Gumyto','414tfyzbr','campaign','error','valid','filterType','template','7838nKPRHL'];a165_0x232d=function(){return _0x366e8f;};return a165_0x232d();}export function validateYamlFiles(_0xfdbd98,_0x4cadc8,_0x7910cc={}){const _0x9181f4=a165_0x15437a;return _0xfdbd98[_0x9181f4(0x175)](_0x2e5a14=>validateYamlFile(_0x2e5a14,_0x4cadc8,_0x7910cc));}export function calculateSummary(_0x2265b9){const _0x38cd4f=a165_0x15437a;let _0x57530a=0x0,_0x2201fc=0x0,_0x32dc18=0x0,_0x3cb93c=0x0;for(const _0x491f04 of _0x2265b9){if(!isValidationResult(_0x491f04)){_0x3cb93c++;continue;}_0x491f04['result'][_0x38cd4f(0x18a)]?_0x57530a++:_0x2201fc++,_0x32dc18+=_0x491f04[_0x38cd4f(0x178)][_0x38cd4f(0x17d)][_0x38cd4f(0x179)];}return{'validCount':_0x57530a,'invalidCount':_0x2201fc,'warningCount':_0x32dc18,'skippedCount':_0x3cb93c,'hasErrors':_0x2201fc>0x0};}
@@ -1 +1 @@
1
- function a166_0x250f(_0x499ecd,_0x15d173){_0x499ecd=_0x499ecd-0x172;const _0x147709=a166_0x1477();let _0x250f67=_0x147709[_0x499ecd];return _0x250f67;}(function(_0x3fa8e3,_0x4266e2){const _0x1db628=a166_0x250f,_0x45e154=_0x3fa8e3();while(!![]){try{const _0x506a0b=parseInt(_0x1db628(0x17c))/0x1*(-parseInt(_0x1db628(0x17b))/0x2)+-parseInt(_0x1db628(0x18a))/0x3+-parseInt(_0x1db628(0x18f))/0x4+-parseInt(_0x1db628(0x19e))/0x5*(-parseInt(_0x1db628(0x18e))/0x6)+parseInt(_0x1db628(0x188))/0x7+-parseInt(_0x1db628(0x17f))/0x8+-parseInt(_0x1db628(0x195))/0x9*(-parseInt(_0x1db628(0x19b))/0xa);if(_0x506a0b===_0x4266e2)break;else _0x45e154['push'](_0x45e154['shift']());}catch(_0x2787b7){_0x45e154['push'](_0x45e154['shift']());}}}(a166_0x1477,0x9baaf));import*as a166_0x4ec92e from'yaml';import a166_0x232f43 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x10c946,_0x57fa5d,_0x52eaa2){const _0x17e5dc=a166_0x250f;if(!_0x10c946||!_0x57fa5d)return undefined;try{let _0x479a19=_0x10c946['getIn'](_0x52eaa2,!![]),_0x5c6f20=[..._0x52eaa2];while((!_0x479a19||typeof _0x479a19!==_0x17e5dc(0x19a)||!(_0x17e5dc(0x180)in _0x479a19)||!_0x479a19[_0x17e5dc(0x180)])&&_0x5c6f20[_0x17e5dc(0x187)]>0x0){_0x5c6f20[_0x17e5dc(0x18d)](),_0x479a19=_0x5c6f20[_0x17e5dc(0x187)]>0x0?_0x10c946[_0x17e5dc(0x179)](_0x5c6f20,!![]):_0x10c946['contents'];}if(!_0x479a19||typeof _0x479a19!==_0x17e5dc(0x19a)||!('range'in _0x479a19)||!_0x479a19['range'])return undefined;const [_0x55af97]=_0x479a19['range'];return offsetToLocation(_0x57fa5d,_0x55af97);}catch{return undefined;}}export function offsetToLocation(_0x3ef9e6,_0x19e599){const _0xfcea5e=a166_0x250f;let _0x15fba6=0x1,_0x283f6d=0x1;for(let _0x520c32=0x0;_0x520c32<_0x19e599&&_0x520c32<_0x3ef9e6[_0xfcea5e(0x187)];_0x520c32++){_0x3ef9e6[_0x520c32]==='\x0a'?(_0x15fba6++,_0x283f6d=0x1):_0x283f6d++;}return{'line':_0x15fba6,'column':_0x283f6d,'offset':_0x19e599};}export function pathToArray(_0x1cbf55){const _0x1d91cf=a166_0x250f;if(!_0x1cbf55)return[];return _0x1cbf55[_0x1d91cf(0x176)]('.')[_0x1d91cf(0x175)](_0x3628c6=>{const _0x2fbdfb=_0x1d91cf,_0x38ecde=_0x3628c6[_0x2fbdfb(0x172)](/^(\w+)\[(\d+)\]$/);if(_0x38ecde)return[_0x38ecde[0x1],parseInt(_0x38ecde[0x2],0xa)];return[_0x3628c6];});}export function formatZodPath(_0xfb3d38){const _0x46efc6=a166_0x250f;let _0x29fd2c='';for(const _0x24b124 of _0xfb3d38){if(typeof _0x24b124===_0x46efc6(0x190))_0x29fd2c+='['+_0x24b124+']';else{const _0x404b51=String(_0x24b124);_0x29fd2c+=_0x29fd2c?'.'+_0x404b51:_0x404b51;}}return _0x29fd2c;}function a166_0x1477(){const _0x26898b=['line','yellow','flatMap','split','padStart','data','getIn','errors','957538GjYCUQ','2dqkrYt','safeParse','code','6332856FMuMkg','range','message','level','warnings','column','Invalid\x20YAML:\x20expected\x20an\x20object','repeat','length','6281275RsnsZX','min','1340514pdtMYA','YAML\x20validation\x20error:\x20','parse','pop','16854vXsXch','2936120kUshWT','number','red','YAML\x20validation\x20error\x20at\x20\x27','dim','cyan','6903HhgLDw','max','issues','map','\x27:\x20','object','27710oYnIXX','path','push','970ImQtYx','join','location','match'];a166_0x1477=function(){return _0x26898b;};return a166_0x1477();}export function flattenZodIssues(_0x38006f){const _0xd45f27=a166_0x250f,_0x3f66cb=[];for(const _0x1103c4 of _0x38006f){if(_0x1103c4['code']==='invalid_union'&&_0xd45f27(0x17a)in _0x1103c4){const _0x174917=_0x1103c4[_0xd45f27(0x17a)];let _0x4c3e3b=_0x174917[0x0]||[];for(const _0x313fd2 of _0x174917){_0x313fd2[_0xd45f27(0x187)]<_0x4c3e3b[_0xd45f27(0x187)]&&(_0x4c3e3b=_0x313fd2);}const _0xef977b=_0x4c3e3b[_0xd45f27(0x198)](_0xa32039=>({..._0xa32039,'path':[..._0x1103c4['path'],..._0xa32039[_0xd45f27(0x19c)]]}));_0x3f66cb[_0xd45f27(0x19d)](...flattenZodIssues(_0xef977b));}else _0x3f66cb[_0xd45f27(0x19d)](_0x1103c4);}return _0x3f66cb;}export function safeParseYaml(_0x225903,_0x434381){const _0x312a1a=a166_0x250f,_0x42d6a4=a166_0x4ec92e[_0x312a1a(0x18c)](_0x225903);if(!_0x42d6a4||typeof _0x42d6a4!==_0x312a1a(0x19a))throw new Error(_0x312a1a(0x185));const _0x11de20=_0x434381[_0x312a1a(0x17d)](_0x42d6a4);if(!_0x11de20['success']){const _0x3d6258=_0x11de20['error'][_0x312a1a(0x197)][0x0],_0x5f1219=formatZodPath(_0x3d6258[_0x312a1a(0x19c)]);throw new Error(_0x5f1219?_0x312a1a(0x192)+_0x5f1219+_0x312a1a(0x199)+_0x3d6258['message']:_0x312a1a(0x18b)+_0x3d6258[_0x312a1a(0x181)]);}return _0x11de20[_0x312a1a(0x178)];}export function formatIssueWithContext(_0xe6eb9a,_0x4b389e,_0x51b308){const _0x5335d6=a166_0x250f,_0x1a46ba=[],_0x34e2a4=_0xe6eb9a[_0x5335d6(0x182)]==='error',_0x5d6e4d=_0x34e2a4?a166_0x232f43[_0x5335d6(0x191)]:a166_0x232f43[_0x5335d6(0x174)],_0x451b27=_0x34e2a4?a166_0x232f43['red']:a166_0x232f43[_0x5335d6(0x174)],_0x3cc148=_0x51b308?a166_0x232f43[_0x5335d6(0x194)](_0x51b308+':'):'';if(_0xe6eb9a[_0x5335d6(0x1a0)]){const _0x215cd1=a166_0x232f43['cyan'](_0xe6eb9a[_0x5335d6(0x1a0)][_0x5335d6(0x173)]+':'+_0xe6eb9a[_0x5335d6(0x1a0)][_0x5335d6(0x184)]);_0x1a46ba[_0x5335d6(0x19d)](''+_0x3cc148+_0x215cd1+':\x20'+_0x5d6e4d(_0xe6eb9a[_0x5335d6(0x182)])+'\x20'+_0x451b27('['+_0xe6eb9a[_0x5335d6(0x17e)]+']'));}else _0x1a46ba[_0x5335d6(0x19d)](''+_0x3cc148+a166_0x232f43[_0x5335d6(0x193)](_0xe6eb9a[_0x5335d6(0x19c)])+':\x20'+_0x5d6e4d(_0xe6eb9a[_0x5335d6(0x182)])+'\x20'+_0x451b27('['+_0xe6eb9a[_0x5335d6(0x17e)]+']'));_0x1a46ba[_0x5335d6(0x19d)](_0xe6eb9a['message']);if(_0xe6eb9a[_0x5335d6(0x1a0)]&&_0x4b389e){const _0x327a94=_0x4b389e[_0x5335d6(0x176)]('\x0a'),{line:_0x562e34,column:_0x311fa2}=_0xe6eb9a[_0x5335d6(0x1a0)],_0x3ce824=Math[_0x5335d6(0x196)](0x1,_0x562e34-0x1),_0x46f3c5=Math[_0x5335d6(0x189)](_0x327a94[_0x5335d6(0x187)],_0x562e34+0x1);_0x1a46ba[_0x5335d6(0x19d)]('');for(let _0x3051cb=_0x3ce824;_0x3051cb<=_0x46f3c5;_0x3051cb++){const _0x4d530e=_0x327a94[_0x3051cb-0x1]||'',_0xeebb89=a166_0x232f43[_0x5335d6(0x193)](_0x3051cb['toString']()[_0x5335d6(0x177)](0x4)),_0x3a28c7=a166_0x232f43['dim']('\x20|\x20');if(_0x3051cb===_0x562e34){_0x1a46ba['push']('\x20\x20'+_0xeebb89+_0x3a28c7+_0x5d6e4d(_0x4d530e));const _0x511d4e='\x20'[_0x5335d6(0x186)](0x4+0x3+_0x311fa2-0x1);_0x1a46ba[_0x5335d6(0x19d)]('\x20\x20'+_0x511d4e+_0x5d6e4d('^'));}else _0x1a46ba['push']('\x20\x20'+_0xeebb89+_0x3a28c7+a166_0x232f43[_0x5335d6(0x193)](_0x4d530e));}}return _0x1a46ba[_0x5335d6(0x19f)]('\x0a');}export function formatValidationResult(_0x24156f,_0x18c6ad,_0x6afb8e){const _0x5ebe39=a166_0x250f,_0x668cbd=[];for(const _0x5db3cc of _0x24156f[_0x5ebe39(0x17a)]){_0x668cbd[_0x5ebe39(0x19d)](formatIssueWithContext(_0x5db3cc,_0x18c6ad,_0x6afb8e)),_0x668cbd['push']('');}for(const _0xe00ecd of _0x24156f[_0x5ebe39(0x183)]){_0x668cbd[_0x5ebe39(0x19d)](formatIssueWithContext(_0xe00ecd,_0x18c6ad,_0x6afb8e)),_0x668cbd[_0x5ebe39(0x19d)]('');}return _0x668cbd[_0x5ebe39(0x19f)]('\x0a');}
1
+ (function(_0xdac44,_0x3338d6){const _0x20b059=a166_0x3fed,_0x1e6317=_0xdac44();while(!![]){try{const _0x21b286=-parseInt(_0x20b059(0x1fa))/0x1*(parseInt(_0x20b059(0x1cf))/0x2)+-parseInt(_0x20b059(0x1ef))/0x3+parseInt(_0x20b059(0x1ec))/0x4+-parseInt(_0x20b059(0x1ed))/0x5*(parseInt(_0x20b059(0x1f2))/0x6)+-parseInt(_0x20b059(0x1e1))/0x7*(parseInt(_0x20b059(0x1df))/0x8)+-parseInt(_0x20b059(0x1f5))/0x9+-parseInt(_0x20b059(0x1db))/0xa*(-parseInt(_0x20b059(0x1fb))/0xb);if(_0x21b286===_0x3338d6)break;else _0x1e6317['push'](_0x1e6317['shift']());}catch(_0x9b3d52){_0x1e6317['push'](_0x1e6317['shift']());}}}(a166_0x2ff9,0x83be0));import*as a166_0x4c0476 from'yaml';function a166_0x2ff9(){const _0xbfa29a=['line','match','cyan','data','flatMap','length','location','error','380bQnitZ','pop','errors','join','8OucyQh','object','686063LJNvRR','parse','\x20|\x20','issues','split','min','dim','number','push','message','red','1208116BWIdFT','335480WPAuWY','contents','584817FqfUtu','range','getIn','18oCRrsJ','path','Invalid\x20YAML:\x20expected\x20an\x20object','4479309hwaQEI','column','invalid_union','code','padStart','3558uBrAMc','470239vgqRjN','level','222gHZSab','toString','YAML\x20validation\x20error\x20at\x20\x27','repeat'];a166_0x2ff9=function(){return _0xbfa29a;};return a166_0x2ff9();}import a166_0x5343c9 from'chalk';function a166_0x3fed(_0x3b65d6,_0x340b45){_0x3b65d6=_0x3b65d6-0x1cf;const _0x2ff938=a166_0x2ff9();let _0x3fed1c=_0x2ff938[_0x3b65d6];return _0x3fed1c;}export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x422a78,_0x1537b8,_0x56371b){const _0x5d0e09=a166_0x3fed;if(!_0x422a78||!_0x1537b8)return undefined;try{let _0x480d5f=_0x422a78[_0x5d0e09(0x1f1)](_0x56371b,!![]),_0x2e1281=[..._0x56371b];while((!_0x480d5f||typeof _0x480d5f!==_0x5d0e09(0x1e0)||!(_0x5d0e09(0x1f0)in _0x480d5f)||!_0x480d5f[_0x5d0e09(0x1f0)])&&_0x2e1281[_0x5d0e09(0x1d8)]>0x0){_0x2e1281[_0x5d0e09(0x1dc)](),_0x480d5f=_0x2e1281['length']>0x0?_0x422a78[_0x5d0e09(0x1f1)](_0x2e1281,!![]):_0x422a78[_0x5d0e09(0x1ee)];}if(!_0x480d5f||typeof _0x480d5f!==_0x5d0e09(0x1e0)||!('range'in _0x480d5f)||!_0x480d5f[_0x5d0e09(0x1f0)])return undefined;const [_0x3f5876]=_0x480d5f[_0x5d0e09(0x1f0)];return offsetToLocation(_0x1537b8,_0x3f5876);}catch{return undefined;}}export function offsetToLocation(_0x2c52e2,_0x28ee5c){let _0x1e3117=0x1,_0x460300=0x1;for(let _0x4f7871=0x0;_0x4f7871<_0x28ee5c&&_0x4f7871<_0x2c52e2['length'];_0x4f7871++){_0x2c52e2[_0x4f7871]==='\x0a'?(_0x1e3117++,_0x460300=0x1):_0x460300++;}return{'line':_0x1e3117,'column':_0x460300,'offset':_0x28ee5c};}export function pathToArray(_0x4eef01){const _0x555371=a166_0x3fed;if(!_0x4eef01)return[];return _0x4eef01[_0x555371(0x1e5)]('.')[_0x555371(0x1d7)](_0x54c186=>{const _0x475b86=_0x555371,_0x20ffff=_0x54c186[_0x475b86(0x1d4)](/^(\w+)\[(\d+)\]$/);if(_0x20ffff)return[_0x20ffff[0x1],parseInt(_0x20ffff[0x2],0xa)];return[_0x54c186];});}export function formatZodPath(_0x16ccb5){const _0x6d2289=a166_0x3fed;let _0x3b4163='';for(const _0xc1f5e of _0x16ccb5){if(typeof _0xc1f5e===_0x6d2289(0x1e8))_0x3b4163+='['+_0xc1f5e+']';else{const _0x563ba6=String(_0xc1f5e);_0x3b4163+=_0x3b4163?'.'+_0x563ba6:_0x563ba6;}}return _0x3b4163;}export function flattenZodIssues(_0x558c65){const _0x59f1d3=a166_0x3fed,_0x409155=[];for(const _0x2fa66a of _0x558c65){if(_0x2fa66a[_0x59f1d3(0x1f8)]===_0x59f1d3(0x1f7)&&'errors'in _0x2fa66a){const _0x39864d=_0x2fa66a['errors'];let _0x5bd7c1=_0x39864d[0x0]||[];for(const _0x5dbb46 of _0x39864d){_0x5dbb46[_0x59f1d3(0x1d8)]<_0x5bd7c1['length']&&(_0x5bd7c1=_0x5dbb46);}const _0x35a99c=_0x5bd7c1['map'](_0x3186a9=>({..._0x3186a9,'path':[..._0x2fa66a[_0x59f1d3(0x1f3)],..._0x3186a9[_0x59f1d3(0x1f3)]]}));_0x409155[_0x59f1d3(0x1e9)](...flattenZodIssues(_0x35a99c));}else _0x409155[_0x59f1d3(0x1e9)](_0x2fa66a);}return _0x409155;}export function safeParseYaml(_0x5c6d80,_0x3a8ec8){const _0x3cb76d=a166_0x3fed,_0x1f36ca=a166_0x4c0476[_0x3cb76d(0x1e2)](_0x5c6d80);if(!_0x1f36ca||typeof _0x1f36ca!==_0x3cb76d(0x1e0))throw new Error(_0x3cb76d(0x1f4));const _0x1afe93=_0x3a8ec8['safeParse'](_0x1f36ca);if(!_0x1afe93['success']){const _0x2fe71a=_0x1afe93['error'][_0x3cb76d(0x1e4)][0x0],_0x2a38b1=formatZodPath(_0x2fe71a[_0x3cb76d(0x1f3)]);throw new Error(_0x2a38b1?_0x3cb76d(0x1d1)+_0x2a38b1+'\x27:\x20'+_0x2fe71a['message']:'YAML\x20validation\x20error:\x20'+_0x2fe71a[_0x3cb76d(0x1ea)]);}return _0x1afe93[_0x3cb76d(0x1d6)];}export function formatIssueWithContext(_0xc3341c,_0x3b71e3,_0x55a78c){const _0x495ead=a166_0x3fed,_0x7130a7=[],_0x26cd11=_0xc3341c['level']===_0x495ead(0x1da),_0x23653d=_0x26cd11?a166_0x5343c9[_0x495ead(0x1eb)]:a166_0x5343c9['yellow'],_0x431bad=_0x26cd11?a166_0x5343c9['red']:a166_0x5343c9['yellow'],_0x140095=_0x55a78c?a166_0x5343c9[_0x495ead(0x1d5)](_0x55a78c+':'):'';if(_0xc3341c[_0x495ead(0x1d9)]){const _0x29f85f=a166_0x5343c9[_0x495ead(0x1d5)](_0xc3341c['location'][_0x495ead(0x1d3)]+':'+_0xc3341c[_0x495ead(0x1d9)][_0x495ead(0x1f6)]);_0x7130a7[_0x495ead(0x1e9)](''+_0x140095+_0x29f85f+':\x20'+_0x23653d(_0xc3341c[_0x495ead(0x1fc)])+'\x20'+_0x431bad('['+_0xc3341c['code']+']'));}else _0x7130a7[_0x495ead(0x1e9)](''+_0x140095+a166_0x5343c9[_0x495ead(0x1e7)](_0xc3341c[_0x495ead(0x1f3)])+':\x20'+_0x23653d(_0xc3341c[_0x495ead(0x1fc)])+'\x20'+_0x431bad('['+_0xc3341c[_0x495ead(0x1f8)]+']'));_0x7130a7[_0x495ead(0x1e9)](_0xc3341c[_0x495ead(0x1ea)]);if(_0xc3341c[_0x495ead(0x1d9)]&&_0x3b71e3){const _0x149b95=_0x3b71e3[_0x495ead(0x1e5)]('\x0a'),{line:_0x1036f0,column:_0x45db12}=_0xc3341c[_0x495ead(0x1d9)],_0x5bc68e=Math['max'](0x1,_0x1036f0-0x1),_0x134a34=Math[_0x495ead(0x1e6)](_0x149b95[_0x495ead(0x1d8)],_0x1036f0+0x1);_0x7130a7[_0x495ead(0x1e9)]('');for(let _0x1ab8b5=_0x5bc68e;_0x1ab8b5<=_0x134a34;_0x1ab8b5++){const _0x5b3c48=_0x149b95[_0x1ab8b5-0x1]||'',_0xaa5bbc=a166_0x5343c9[_0x495ead(0x1e7)](_0x1ab8b5[_0x495ead(0x1d0)]()[_0x495ead(0x1f9)](0x4)),_0x26f7a0=a166_0x5343c9['dim'](_0x495ead(0x1e3));if(_0x1ab8b5===_0x1036f0){_0x7130a7[_0x495ead(0x1e9)]('\x20\x20'+_0xaa5bbc+_0x26f7a0+_0x23653d(_0x5b3c48));const _0x341d83='\x20'[_0x495ead(0x1d2)](0x4+0x3+_0x45db12-0x1);_0x7130a7[_0x495ead(0x1e9)]('\x20\x20'+_0x341d83+_0x23653d('^'));}else _0x7130a7[_0x495ead(0x1e9)]('\x20\x20'+_0xaa5bbc+_0x26f7a0+a166_0x5343c9['dim'](_0x5b3c48));}}return _0x7130a7['join']('\x0a');}export function formatValidationResult(_0x356b0e,_0xf0bb76,_0x4f31a0){const _0xa8a8a4=a166_0x3fed,_0x2d9c40=[];for(const _0x3c722e of _0x356b0e[_0xa8a8a4(0x1dd)]){_0x2d9c40[_0xa8a8a4(0x1e9)](formatIssueWithContext(_0x3c722e,_0xf0bb76,_0x4f31a0)),_0x2d9c40[_0xa8a8a4(0x1e9)]('');}for(const _0x1d47ce of _0x356b0e['warnings']){_0x2d9c40[_0xa8a8a4(0x1e9)](formatIssueWithContext(_0x1d47ce,_0xf0bb76,_0x4f31a0)),_0x2d9c40[_0xa8a8a4(0x1e9)]('');}return _0x2d9c40[_0xa8a8a4(0x1de)]('\x0a');}