@treasuredata/tdx 2026.4.0 → 2026.4.1

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 (219) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- function a157_0xe513(){const _0x2710d8=['70bajZPM','folderPath','File\x20not\x20found','No\x20tdx.json\x20found\x20for\x20file:\x20','isDirectory','39FJVhlK','3995635BKKdTw','cwd','includes','trim','scopedFolderPath','no_parent','13915WiViMe','parent_segment','relative','context','file','6wKEpuw','readFile','1403102XoxLxg','error','dirname','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','resolve','startsWith','root','message','tdx.json','38641044DgRpsV','parentSegment','exists','isFile','invalid_yaml','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','journey','segmentName','1686753shpaIB','match','configDir','110156mHDkhb','No\x20tdx.json\x20found','resourceType','directory','replace','File\x20not\x20found:\x20','string','type','7742532nMCWbk','join','isScoped','stat','Not\x20a\x20YAML\x20file:\x20','Parent\x20segment\x20not\x20specified','parent_name','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','segment','no_config','24aiewpP','1gLwWfx'];a157_0xe513=function(){return _0x2710d8;};return a157_0xe513();}(function(_0x433391,_0x4b1560){const _0x4b556e=a157_0x26cb,_0x15552c=_0x433391();while(!![]){try{const _0x1423de=-parseInt(_0x4b556e(0xf1))/0x1*(parseInt(_0x4b556e(0x105))/0x2)+parseInt(_0x4b556e(0xf7))/0x3*(-parseInt(_0x4b556e(0x119))/0x4)+parseInt(_0x4b556e(0xf8))/0x5*(-parseInt(_0x4b556e(0x103))/0x6)+-parseInt(_0x4b556e(0x121))/0x7+parseInt(_0x4b556e(0xf0))/0x8*(parseInt(_0x4b556e(0x116))/0x9)+parseInt(_0x4b556e(0xf2))/0xa*(-parseInt(_0x4b556e(0xfe))/0xb)+parseInt(_0x4b556e(0x10e))/0xc;if(_0x1423de===_0x4b1560)break;else _0x15552c['push'](_0x15552c['shift']());}catch(_0xdacb5f){_0x15552c['push'](_0x15552c['shift']());}}}(a157_0xe513,0xc5712));import a157_0x132032 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';function a157_0x26cb(_0x59d384,_0xc1e910){_0x59d384=_0x59d384-0xed;const _0xe51394=a157_0xe513();let _0x26cb54=_0xe51394[_0x59d384];return _0x26cb54;}import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x1492a9){const _0x4499e9=a157_0x26cb;return _0x1492a9[_0x4499e9(0x120)]!=='error';}export function isScopedResolution(_0x45d333){const _0x5e7bbe=a157_0x26cb;return _0x45d333[_0x5e7bbe(0x120)]===_0x5e7bbe(0x11c)||_0x45d333['type']===_0x5e7bbe(0x102)||_0x45d333[_0x5e7bbe(0x120)]==='context';}export function getScopedDetails(_0x3607dd){const _0x12993d=a157_0x26cb;if(isScopedResolution(_0x3607dd))return{'isScoped':_0x3607dd['isScoped'],'scopedFolderPath':_0x3607dd[_0x12993d(0xfc)]};return undefined;}async function findTdxConfigAsync(_0x12c4f2,_0x2a0946){const _0x42afbe=a157_0x26cb;let _0x486764=a157_0x132032['resolve'](_0x12c4f2);const _0x254c4d=a157_0x132032['parse'](_0x486764)[_0x42afbe(0x10b)];while(_0x486764!==_0x254c4d){const _0x35b038=a157_0x132032[_0x42afbe(0x122)](_0x486764,_0x42afbe(0x10d));if(await _0x2a0946[_0x42afbe(0x110)](_0x35b038))try{const _0x1ac298=await _0x2a0946[_0x42afbe(0x104)](_0x35b038),_0x86c504=JSON['parse'](_0x1ac298);if(_0x86c504[_0x42afbe(0xff)]&&typeof _0x86c504[_0x42afbe(0xff)]===_0x42afbe(0x11f))return{'configPath':_0x35b038,'configDir':_0x486764,'parentSegment':_0x86c504['parent_segment']};}catch{}_0x486764=a157_0x132032[_0x42afbe(0x107)](_0x486764);}return null;}function calculateScopedPath(_0x34667b,_0x472ee0){const _0x48511e=a157_0x26cb,_0x45d560=a157_0x132032[_0x48511e(0x100)](_0x472ee0,_0x34667b),_0x2c9b2c=_0x45d560!==''&&_0x45d560!=='.'&&!_0x45d560[_0x48511e(0x10a)]('..');return{'isScoped':_0x2c9b2c,'scopedFolderPath':_0x2c9b2c?_0x45d560[_0x48511e(0x11d)](/\\/g,'/'):''};}export async function resolveTarget(_0x173f62){const _0x4d82ba=a157_0x26cb,{arg:_0x4ae006,contextParent:_0x4eaaea,cwd:cwd=process[_0x4d82ba(0xf9)](),fs:fs=nodeFileSystem}=_0x173f62;if(_0x4ae006&&isYamlFilePath(_0x4ae006))try{const _0x580ede=await resolveYamlFilePath(_0x4ae006,fs),_0x50a773=a157_0x132032[_0x4d82ba(0x109)](_0x4ae006),_0x2e13e0=a157_0x132032['dirname'](_0x50a773),_0x28c032=await findTdxConfigAsync(_0x2e13e0,fs);if(!_0x28c032){if(_0x4eaaea){const _0x3e6ad5=a157_0x132032['dirname'](_0x50a773);return{'type':_0x4d82ba(0x102),'parentName':_0x4eaaea,'targetDir':_0x3e6ad5,'configRoot':_0x3e6ad5,'filePath':_0x50a773,'resourceName':_0x580ede[_0x4d82ba(0x115)],'folderPath':_0x580ede[_0x4d82ba(0xf3)],'resourceType':_0x580ede[_0x4d82ba(0x11b)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4d82ba(0x106),'errorCode':_0x4d82ba(0xef),'message':_0x4d82ba(0xf5)+_0x4ae006,'arg':_0x4ae006,'helpText':_0x4d82ba(0xed)};}const _0x2ff9ad=calculateScopedPath(_0x2e13e0,_0x28c032[_0x4d82ba(0x118)]);return{'type':_0x4d82ba(0x102),'parentName':_0x28c032[_0x4d82ba(0x10f)],'targetDir':_0x28c032[_0x4d82ba(0x118)],'configRoot':_0x28c032['configDir'],'filePath':_0x50a773,'resourceName':_0x580ede['segmentName'],'folderPath':_0x580ede['folderPath'],'resourceType':_0x580ede[_0x4d82ba(0x11b)],'isScoped':_0x2ff9ad['isScoped'],'scopedFolderPath':_0x2ff9ad['scopedFolderPath']};}catch(_0x5f2190){const _0x401297=_0x5f2190 instanceof Error?_0x5f2190[_0x4d82ba(0x10c)]:String(_0x5f2190);if(_0x401297[_0x4d82ba(0xfa)](_0x4d82ba(0xf4)))return{'type':_0x4d82ba(0x106),'errorCode':'file_not_found','message':_0x4d82ba(0x11e)+_0x4ae006,'arg':_0x4ae006};if(_0x401297[_0x4d82ba(0xfa)](_0x4d82ba(0x11a))){if(_0x4eaaea){const _0x2de011=a157_0x132032[_0x4d82ba(0x109)](_0x4ae006);if(await fs[_0x4d82ba(0x110)](_0x2de011)){const _0x252a71=a157_0x132032[_0x4d82ba(0x107)](_0x2de011),_0x17ec5f=await fs[_0x4d82ba(0x104)](_0x2de011),_0x2ee78f=_0x17ec5f[_0x4d82ba(0x117)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x33ffe7=_0x17ec5f[_0x4d82ba(0x117)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4f9bc7=_0x2ee78f?_0x2ee78f[0x1][_0x4d82ba(0xfb)]():a157_0x132032['basename'](_0x4ae006,a157_0x132032['extname'](_0x4ae006)),_0x3cc335=_0x33ffe7&&_0x33ffe7[0x1][_0x4d82ba(0xfb)]()===_0x4d82ba(0x114)?_0x4d82ba(0x114):_0x4d82ba(0xee);return{'type':_0x4d82ba(0x102),'parentName':_0x4eaaea,'targetDir':_0x252a71,'configRoot':_0x252a71,'filePath':_0x2de011,'resourceName':_0x4f9bc7,'folderPath':'','resourceType':_0x3cc335,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x4d82ba(0x106),'errorCode':'no_config','message':_0x4d82ba(0xf5)+_0x4ae006,'arg':_0x4ae006,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':_0x4d82ba(0x106),'errorCode':'invalid_yaml','message':_0x401297,'arg':_0x4ae006};}if(_0x4ae006){const _0xa4b7d1=a157_0x132032[_0x4d82ba(0x109)](cwd,_0x4ae006);let _0x1d7a4b=null;try{_0x1d7a4b=await fs[_0x4d82ba(0x124)](_0xa4b7d1);}catch{}if(_0x1d7a4b?.[_0x4d82ba(0xf6)]()){const _0x4c3c26=await findTdxConfigAsync(_0xa4b7d1,fs);if(_0x4c3c26){const _0x43ed48=calculateScopedPath(_0xa4b7d1,_0x4c3c26[_0x4d82ba(0x118)]);return{'type':_0x4d82ba(0x11c),'parentName':_0x4c3c26[_0x4d82ba(0x10f)],'targetDir':_0xa4b7d1,'configRoot':_0x4c3c26[_0x4d82ba(0x118)],'isScoped':_0x43ed48[_0x4d82ba(0x123)],'scopedFolderPath':_0x43ed48['scopedFolderPath']};}if(_0x4eaaea)return{'type':_0x4d82ba(0x11c),'parentName':_0x4eaaea,'targetDir':_0xa4b7d1,'configRoot':_0xa4b7d1,'isScoped':![],'scopedFolderPath':''};return{'type':_0x4d82ba(0x106),'errorCode':_0x4d82ba(0xef),'message':'No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x4ae006,'arg':_0x4ae006,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0x1d7a4b?.[_0x4d82ba(0x111)]())return{'type':_0x4d82ba(0x106),'errorCode':_0x4d82ba(0x112),'message':_0x4d82ba(0x125)+_0x4ae006,'arg':_0x4ae006,'helpText':_0x4d82ba(0x108)};const _0x51bf49=sanitizeFileName(_0x4ae006),_0x423079=getSegmentRootDir(_0x51bf49,cwd);return{'type':_0x4d82ba(0x127),'parentName':_0x4ae006,'targetDir':_0x423079,'configRoot':_0x423079};}const _0x516d20=await findTdxConfigAsync(cwd,fs);if(_0x516d20){const _0x2d8f00=calculateScopedPath(cwd,_0x516d20[_0x4d82ba(0x118)]);return{'type':'context','parentName':_0x516d20['parentSegment'],'targetDir':cwd,'configRoot':_0x516d20[_0x4d82ba(0x118)],'isScoped':_0x2d8f00[_0x4d82ba(0x123)],'scopedFolderPath':_0x2d8f00[_0x4d82ba(0xfc)]};}if(_0x4eaaea){const _0x50bb7a=sanitizeFileName(_0x4eaaea),_0x6930bf=getSegmentRootDir(_0x50bb7a,cwd);return{'type':_0x4d82ba(0x101),'parentName':_0x4eaaea,'targetDir':_0x6930bf,'configRoot':_0x6930bf,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x4d82ba(0x106),'errorCode':_0x4d82ba(0xfd),'message':_0x4d82ba(0x126),'helpText':_0x4d82ba(0x113)};}
1
+ (function(_0x3b978,_0x2b5d1e){const _0x21fce8=a157_0x54f3,_0x2e4aaa=_0x3b978();while(!![]){try{const _0x21e8b4=parseInt(_0x21fce8(0x106))/0x1*(-parseInt(_0x21fce8(0xdd))/0x2)+parseInt(_0x21fce8(0x109))/0x3*(parseInt(_0x21fce8(0xde))/0x4)+-parseInt(_0x21fce8(0xfa))/0x5+parseInt(_0x21fce8(0xe8))/0x6*(parseInt(_0x21fce8(0xf3))/0x7)+parseInt(_0x21fce8(0xee))/0x8+parseInt(_0x21fce8(0x105))/0x9+-parseInt(_0x21fce8(0x104))/0xa;if(_0x21e8b4===_0x2b5d1e)break;else _0x2e4aaa['push'](_0x2e4aaa['shift']());}catch(_0x58933b){_0x2e4aaa['push'](_0x2e4aaa['shift']());}}}(a157_0xbaa5,0x647e1));import a157_0x21c6c0 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a157_0xbaa5(){const _0x358523=['cwd','866reIfqn','236OWHoeS','startsWith','join','tdx.json','trim','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','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','no_parent','error','segment','227418fcpjma','file_not_found','type','No\x20tdx.json\x20found\x20for\x20file:\x20','isScoped','string','2539104VSCpJA','match','exists','context','directory','119iSLLJw','basename','dirname','file','parent_segment','journey','Not\x20a\x20YAML\x20file:\x20','2315355CVQuvU','replace','stat','root','resourceType','relative','parentSegment','isDirectory','segmentName','Parent\x20segment\x20not\x20specified','14331440pCeadS','7245567gYrxsC','118epJfwR','no_config','configDir','30108Garzjt','message','invalid_yaml','parse','extname','parent_name','folderPath','resolve','includes','scopedFolderPath'];a157_0xbaa5=function(){return _0x358523;};return a157_0xbaa5();}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x4aa194){const _0x37c47d=a157_0x54f3;return _0x4aa194['type']!==_0x37c47d(0xe6);}export function isScopedResolution(_0x1b4a70){const _0x3240f4=a157_0x54f3;return _0x1b4a70[_0x3240f4(0xea)]===_0x3240f4(0xf2)||_0x1b4a70['type']===_0x3240f4(0xf6)||_0x1b4a70[_0x3240f4(0xea)]===_0x3240f4(0xf1);}function a157_0x54f3(_0x43d5d9,_0x44e23d){_0x43d5d9=_0x43d5d9-0xd9;const _0xbaa599=a157_0xbaa5();let _0x54f329=_0xbaa599[_0x43d5d9];return _0x54f329;}export function getScopedDetails(_0x4d31c1){const _0x123b40=a157_0x54f3;if(isScopedResolution(_0x4d31c1))return{'isScoped':_0x4d31c1[_0x123b40(0xec)],'scopedFolderPath':_0x4d31c1[_0x123b40(0xdb)]};return undefined;}async function findTdxConfigAsync(_0x3a2a9d,_0x345d5){const _0x21a76f=a157_0x54f3;let _0xcc2e1e=a157_0x21c6c0['resolve'](_0x3a2a9d);const _0x29f491=a157_0x21c6c0[_0x21a76f(0x10c)](_0xcc2e1e)[_0x21a76f(0xfd)];while(_0xcc2e1e!==_0x29f491){const _0x48e58f=a157_0x21c6c0[_0x21a76f(0xe0)](_0xcc2e1e,_0x21a76f(0xe1));if(await _0x345d5[_0x21a76f(0xf0)](_0x48e58f))try{const _0xf285b3=await _0x345d5['readFile'](_0x48e58f),_0x41e8ae=JSON[_0x21a76f(0x10c)](_0xf285b3);if(_0x41e8ae[_0x21a76f(0xf7)]&&typeof _0x41e8ae[_0x21a76f(0xf7)]===_0x21a76f(0xed))return{'configPath':_0x48e58f,'configDir':_0xcc2e1e,'parentSegment':_0x41e8ae[_0x21a76f(0xf7)]};}catch{}_0xcc2e1e=a157_0x21c6c0[_0x21a76f(0xf5)](_0xcc2e1e);}return null;}function calculateScopedPath(_0x3e0071,_0x3f6f10){const _0x4056b4=a157_0x54f3,_0x3a0030=a157_0x21c6c0[_0x4056b4(0xff)](_0x3f6f10,_0x3e0071),_0x123b52=_0x3a0030!==''&&_0x3a0030!=='.'&&!_0x3a0030[_0x4056b4(0xdf)]('..');return{'isScoped':_0x123b52,'scopedFolderPath':_0x123b52?_0x3a0030[_0x4056b4(0xfb)](/\\/g,'/'):''};}export async function resolveTarget(_0x2d4825){const _0x2d14c7=a157_0x54f3,{arg:_0x596446,contextParent:_0x5c42c9,cwd:cwd=process[_0x2d14c7(0xdc)](),fs:fs=nodeFileSystem}=_0x2d4825;if(_0x596446&&isYamlFilePath(_0x596446))try{const _0x1f72e6=await resolveYamlFilePath(_0x596446,fs),_0x70a198=a157_0x21c6c0[_0x2d14c7(0xd9)](_0x596446),_0x810531=a157_0x21c6c0[_0x2d14c7(0xf5)](_0x70a198),_0x428bd5=await findTdxConfigAsync(_0x810531,fs);if(!_0x428bd5){if(_0x5c42c9){const _0x29b69b=a157_0x21c6c0[_0x2d14c7(0xf5)](_0x70a198);return{'type':'file','parentName':_0x5c42c9,'targetDir':_0x29b69b,'configRoot':_0x29b69b,'filePath':_0x70a198,'resourceName':_0x1f72e6['segmentName'],'folderPath':_0x1f72e6[_0x2d14c7(0x10f)],'resourceType':_0x1f72e6[_0x2d14c7(0xfe)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x2d14c7(0xeb)+_0x596446,'arg':_0x596446,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}const _0x19de30=calculateScopedPath(_0x810531,_0x428bd5[_0x2d14c7(0x108)]);return{'type':_0x2d14c7(0xf6),'parentName':_0x428bd5[_0x2d14c7(0x100)],'targetDir':_0x428bd5[_0x2d14c7(0x108)],'configRoot':_0x428bd5[_0x2d14c7(0x108)],'filePath':_0x70a198,'resourceName':_0x1f72e6[_0x2d14c7(0x102)],'folderPath':_0x1f72e6[_0x2d14c7(0x10f)],'resourceType':_0x1f72e6[_0x2d14c7(0xfe)],'isScoped':_0x19de30[_0x2d14c7(0xec)],'scopedFolderPath':_0x19de30['scopedFolderPath']};}catch(_0x2dfaa9){const _0x43cdf0=_0x2dfaa9 instanceof Error?_0x2dfaa9[_0x2d14c7(0x10a)]:String(_0x2dfaa9);if(_0x43cdf0[_0x2d14c7(0xda)]('File\x20not\x20found'))return{'type':'error','errorCode':_0x2d14c7(0xe9),'message':'File\x20not\x20found:\x20'+_0x596446,'arg':_0x596446};if(_0x43cdf0['includes']('No\x20tdx.json\x20found')){if(_0x5c42c9){const _0x1cdd16=a157_0x21c6c0[_0x2d14c7(0xd9)](_0x596446);if(await fs['exists'](_0x1cdd16)){const _0x43aea7=a157_0x21c6c0[_0x2d14c7(0xf5)](_0x1cdd16),_0x449d71=await fs['readFile'](_0x1cdd16),_0x5accfd=_0x449d71[_0x2d14c7(0xef)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x144f08=_0x449d71[_0x2d14c7(0xef)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x4c288f=_0x5accfd?_0x5accfd[0x1]['trim']():a157_0x21c6c0[_0x2d14c7(0xf4)](_0x596446,a157_0x21c6c0[_0x2d14c7(0x10d)](_0x596446)),_0x33c3bd=_0x144f08&&_0x144f08[0x1][_0x2d14c7(0xe2)]()===_0x2d14c7(0xf8)?_0x2d14c7(0xf8):_0x2d14c7(0xe7);return{'type':_0x2d14c7(0xf6),'parentName':_0x5c42c9,'targetDir':_0x43aea7,'configRoot':_0x43aea7,'filePath':_0x1cdd16,'resourceName':_0x4c288f,'folderPath':'','resourceType':_0x33c3bd,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x2d14c7(0xe6),'errorCode':'no_config','message':_0x2d14c7(0xeb)+_0x596446,'arg':_0x596446,'helpText':_0x2d14c7(0xe3)};}return{'type':_0x2d14c7(0xe6),'errorCode':_0x2d14c7(0x10b),'message':_0x43cdf0,'arg':_0x596446};}if(_0x596446){const _0x11697c=a157_0x21c6c0[_0x2d14c7(0xd9)](cwd,_0x596446);let _0x168ce5=null;try{_0x168ce5=await fs[_0x2d14c7(0xfc)](_0x11697c);}catch{}if(_0x168ce5?.[_0x2d14c7(0x101)]()){const _0x37ddee=await findTdxConfigAsync(_0x11697c,fs);if(_0x37ddee){const _0x50f502=calculateScopedPath(_0x11697c,_0x37ddee[_0x2d14c7(0x108)]);return{'type':_0x2d14c7(0xf2),'parentName':_0x37ddee[_0x2d14c7(0x100)],'targetDir':_0x11697c,'configRoot':_0x37ddee[_0x2d14c7(0x108)],'isScoped':_0x50f502['isScoped'],'scopedFolderPath':_0x50f502[_0x2d14c7(0xdb)]};}if(_0x5c42c9)return{'type':_0x2d14c7(0xf2),'parentName':_0x5c42c9,'targetDir':_0x11697c,'configRoot':_0x11697c,'isScoped':![],'scopedFolderPath':''};return{'type':_0x2d14c7(0xe6),'errorCode':_0x2d14c7(0x107),'message':_0x2d14c7(0xe4)+_0x596446,'arg':_0x596446,'helpText':_0x2d14c7(0xe3)};}if(_0x168ce5?.['isFile']())return{'type':'error','errorCode':_0x2d14c7(0x10b),'message':_0x2d14c7(0xf9)+_0x596446,'arg':_0x596446,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x10a4c1=sanitizeFileName(_0x596446),_0x5d1c3d=getSegmentRootDir(_0x10a4c1,cwd);return{'type':_0x2d14c7(0x10e),'parentName':_0x596446,'targetDir':_0x5d1c3d,'configRoot':_0x5d1c3d};}const _0x4aea64=await findTdxConfigAsync(cwd,fs);if(_0x4aea64){const _0x33739d=calculateScopedPath(cwd,_0x4aea64['configDir']);return{'type':_0x2d14c7(0xf1),'parentName':_0x4aea64[_0x2d14c7(0x100)],'targetDir':cwd,'configRoot':_0x4aea64[_0x2d14c7(0x108)],'isScoped':_0x33739d[_0x2d14c7(0xec)],'scopedFolderPath':_0x33739d['scopedFolderPath']};}if(_0x5c42c9){const _0x1aeb7a=sanitizeFileName(_0x5c42c9),_0x192879=getSegmentRootDir(_0x1aeb7a,cwd);return{'type':_0x2d14c7(0xf1),'parentName':_0x5c42c9,'targetDir':_0x192879,'configRoot':_0x192879,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x2d14c7(0xe6),'errorCode':_0x2d14c7(0xe5),'message':_0x2d14c7(0x103),'helpText':'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'};}
@@ -1 +1 @@
1
- const a158_0x3b7178=a158_0x5ce3;(function(_0x5d8a82,_0x2cf631){const _0x259d48=a158_0x5ce3,_0xe77d53=_0x5d8a82();while(!![]){try{const _0x2d7b0f=parseInt(_0x259d48(0x1ba))/0x1+parseInt(_0x259d48(0x1b8))/0x2+-parseInt(_0x259d48(0x1c6))/0x3*(parseInt(_0x259d48(0x1c7))/0x4)+-parseInt(_0x259d48(0x1bb))/0x5+-parseInt(_0x259d48(0x1bd))/0x6+-parseInt(_0x259d48(0x1b0))/0x7*(-parseInt(_0x259d48(0x1c5))/0x8)+parseInt(_0x259d48(0x1b3))/0x9;if(_0x2d7b0f===_0x2cf631)break;else _0xe77d53['push'](_0xe77d53['shift']());}catch(_0x4c37f7){_0xe77d53['push'](_0xe77d53['shift']());}}}(a158_0x28fc,0xb53c2));import{existsSync,readFileSync}from'fs';import a158_0x218328 from'path';function a158_0x28fc(){const _0x4195eb=['parent_segment','root','relative','118808KQOrDw','replace','549662HKLIZl','1222870pvbkre','join','731316OvWEVA','cwd','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','parse','string','object','stringify','utf-8','1208ZNvlNk','699rnPCsm','13912NLuCpf','engage_workspace','tdx.json','startsWith','segments','3864DENNrm','dirname','Invalid\x20tdx.json:\x20expected\x20object','11040786fVzLQN','resolve'];a158_0x28fc=function(){return _0x4195eb;};return a158_0x28fc();}function a158_0x5ce3(_0x470bcc,_0x412780){_0x470bcc=_0x470bcc-0x1b0;const _0x28fca0=a158_0x28fc();let _0x5ce362=_0x28fca0[_0x470bcc];return _0x5ce362;}const TDX_CONFIG_FILE=a158_0x3b7178(0x1c9),SEGMENTS_DIR=a158_0x3b7178(0x1cb);export function findTdxConfigPath(_0x4c85e5=process['cwd']()){const _0x1f7b40=a158_0x3b7178;let _0x4980ed=a158_0x218328[_0x1f7b40(0x1b4)](_0x4c85e5);const _0x560b2a=a158_0x218328[_0x1f7b40(0x1c0)](_0x4980ed)[_0x1f7b40(0x1b6)];while(_0x4980ed!==_0x560b2a){const _0x51ed03=a158_0x218328['join'](_0x4980ed,TDX_CONFIG_FILE);if(existsSync(_0x51ed03))return _0x51ed03;_0x4980ed=a158_0x218328[_0x1f7b40(0x1b1)](_0x4980ed);}return null;}export function loadTdxConfig(_0x48dc24){const _0x21eb83=a158_0x3b7178,_0xab7486=readFileSync(_0x48dc24,_0x21eb83(0x1c4));let _0x2d87fd;try{_0x2d87fd=JSON['parse'](_0xab7486);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x48dc24);}if(!_0x2d87fd||typeof _0x2d87fd!==_0x21eb83(0x1c2))throw new Error(_0x21eb83(0x1b2));const _0x5464c0=_0x2d87fd,_0x4c284f=_0x5464c0['parent_segment']&&typeof _0x5464c0[_0x21eb83(0x1b5)]===_0x21eb83(0x1c1),_0x2ea200=_0x5464c0['engage_workspace']&&typeof _0x5464c0['engage_workspace']===_0x21eb83(0x1c1);if(!_0x4c284f&&!_0x2ea200)throw new Error(_0x21eb83(0x1bf));const _0x2fdfd6={};return _0x4c284f&&(_0x2fdfd6['parent_segment']=_0x5464c0[_0x21eb83(0x1b5)]),_0x2ea200&&(_0x2fdfd6[_0x21eb83(0x1c8)]=_0x5464c0[_0x21eb83(0x1c8)]),_0x2fdfd6;}export function findTdxConfig(_0x470321=process['cwd']()){const _0x164504=a158_0x3b7178,_0x572493=findTdxConfigPath(_0x470321);if(!_0x572493)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x35fffc=loadTdxConfig(_0x572493),_0x1396f4=a158_0x218328[_0x164504(0x1b1)](_0x572493);return{'config':_0x35fffc,'configPath':_0x572493,'configDir':_0x1396f4};}export function tryFindTdxConfig(_0x1959d1){try{return findTdxConfig(_0x1959d1);}catch{return null;}}export function getSegmentRootDir(_0x2b0f77,_0x1fbfe4=process[a158_0x3b7178(0x1be)]()){const _0x3df6db=a158_0x3b7178;return a158_0x218328[_0x3df6db(0x1bc)](_0x1fbfe4,SEGMENTS_DIR,_0x2b0f77);}export function getTdxConfigPath(_0x4f525b,_0x2578c3=process['cwd']()){return a158_0x218328['join'](getSegmentRootDir(_0x4f525b,_0x2578c3),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3cbf8f,_0x3aa465){const _0x14a79d=a158_0x3b7178,_0x1e37d3=a158_0x218328['resolve'](_0x3cbf8f),_0x9ccc8c=a158_0x218328[_0x14a79d(0x1b7)](_0x3aa465,_0x1e37d3);if(_0x9ccc8c[_0x14a79d(0x1ca)]('..'))return'';return _0x9ccc8c;}export function localPathToTdFolderPath(_0x8dc497){const _0x706971=a158_0x3b7178,_0x1aacd4=a158_0x218328[_0x706971(0x1b1)](_0x8dc497);if(_0x1aacd4==='.'||_0x1aacd4==='')return'';return _0x1aacd4[_0x706971(0x1b9)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x2e64ba,_0x4a7976){const _0x48e431=a158_0x3b7178;if(!_0x2e64ba)return _0x4a7976;return a158_0x218328[_0x48e431(0x1bc)](_0x4a7976,_0x2e64ba);}export function createTdxConfigContent(_0x127ca2){const _0x4b0636=a158_0x3b7178,_0x478b41={'parent_segment':_0x127ca2};return JSON[_0x4b0636(0x1c3)](_0x478b41,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4ddec2){const _0x428a02=a158_0x3b7178,_0x5bfb5a={'engage_workspace':_0x4ddec2};return JSON[_0x428a02(0x1c3)](_0x5bfb5a,null,0x2)+'\x0a';}
1
+ const a158_0x5e1fb0=a158_0x31c3;(function(_0x380da3,_0x4e1474){const _0x7fceb6=a158_0x31c3,_0x27eef3=_0x380da3();while(!![]){try{const _0x56d115=-parseInt(_0x7fceb6(0x10a))/0x1*(-parseInt(_0x7fceb6(0x116))/0x2)+-parseInt(_0x7fceb6(0x112))/0x3*(parseInt(_0x7fceb6(0x119))/0x4)+parseInt(_0x7fceb6(0x10c))/0x5+parseInt(_0x7fceb6(0x109))/0x6*(-parseInt(_0x7fceb6(0x110))/0x7)+parseInt(_0x7fceb6(0x104))/0x8+parseInt(_0x7fceb6(0x11b))/0x9+-parseInt(_0x7fceb6(0x111))/0xa*(-parseInt(_0x7fceb6(0x115))/0xb);if(_0x56d115===_0x4e1474)break;else _0x27eef3['push'](_0x27eef3['shift']());}catch(_0x4659ff){_0x27eef3['push'](_0x27eef3['shift']());}}}(a158_0x45e7,0x54d11));import{existsSync,readFileSync}from'fs';import a158_0x4fd49b from'path';const TDX_CONFIG_FILE=a158_0x5e1fb0(0x10d),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x3e4587=process[a158_0x5e1fb0(0x113)]()){const _0x373e90=a158_0x5e1fb0;let _0x118535=a158_0x4fd49b[_0x373e90(0x10f)](_0x3e4587);const _0x5edcb6=a158_0x4fd49b[_0x373e90(0x103)](_0x118535)[_0x373e90(0x106)];while(_0x118535!==_0x5edcb6){const _0x4a3fb3=a158_0x4fd49b[_0x373e90(0x108)](_0x118535,TDX_CONFIG_FILE);if(existsSync(_0x4a3fb3))return _0x4a3fb3;_0x118535=a158_0x4fd49b[_0x373e90(0x11e)](_0x118535);}return null;}export function loadTdxConfig(_0x440f2c){const _0x4b0a1b=a158_0x5e1fb0,_0x36734e=readFileSync(_0x440f2c,_0x4b0a1b(0x105));let _0x66895e;try{_0x66895e=JSON[_0x4b0a1b(0x103)](_0x36734e);}catch{throw new Error(_0x4b0a1b(0x11a)+_0x440f2c);}if(!_0x66895e||typeof _0x66895e!=='object')throw new Error(_0x4b0a1b(0x10b));const _0x5921da=_0x66895e,_0x18d678=_0x5921da[_0x4b0a1b(0x11f)]&&typeof _0x5921da[_0x4b0a1b(0x11f)]==='string',_0x17d52d=_0x5921da[_0x4b0a1b(0x11c)]&&typeof _0x5921da[_0x4b0a1b(0x11c)]===_0x4b0a1b(0x11d);if(!_0x18d678&&!_0x17d52d)throw new Error(_0x4b0a1b(0x117));const _0x540cf0={};return _0x18d678&&(_0x540cf0['parent_segment']=_0x5921da['parent_segment']),_0x17d52d&&(_0x540cf0['engage_workspace']=_0x5921da[_0x4b0a1b(0x11c)]),_0x540cf0;}function a158_0x45e7(){const _0x4a2cc7=['utf-8','root','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','join','1218XOSxvN','306JIfDXz','Invalid\x20tdx.json:\x20expected\x20object','440775RfIHGf','tdx.json','replace','resolve','16086afTnIq','130ElpuhN','18bdZJUo','cwd','startsWith','130229JlTBRL','784RUzFLm','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','stringify','391604NRkSwV','Invalid\x20JSON\x20in\x20','5368752gRdCFc','engage_workspace','string','dirname','parent_segment','parse','3542136QmlBqR'];a158_0x45e7=function(){return _0x4a2cc7;};return a158_0x45e7();}export function findTdxConfig(_0x35ec62=process[a158_0x5e1fb0(0x113)]()){const _0x636f68=a158_0x5e1fb0,_0xd8496=findTdxConfigPath(_0x35ec62);if(!_0xd8496)throw new Error(_0x636f68(0x107));const _0x47f1cb=loadTdxConfig(_0xd8496),_0x2b74a8=a158_0x4fd49b['dirname'](_0xd8496);return{'config':_0x47f1cb,'configPath':_0xd8496,'configDir':_0x2b74a8};}export function tryFindTdxConfig(_0x2e2068){try{return findTdxConfig(_0x2e2068);}catch{return null;}}export function getSegmentRootDir(_0x300944,_0x3a19e=process[a158_0x5e1fb0(0x113)]()){return a158_0x4fd49b['join'](_0x3a19e,SEGMENTS_DIR,_0x300944);}export function getTdxConfigPath(_0x480f40,_0x2592c3=process[a158_0x5e1fb0(0x113)]()){const _0x166eee=a158_0x5e1fb0;return a158_0x4fd49b[_0x166eee(0x108)](getSegmentRootDir(_0x480f40,_0x2592c3),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2c7df1,_0x4c72e4){const _0x5a669c=a158_0x5e1fb0,_0x191c38=a158_0x4fd49b[_0x5a669c(0x10f)](_0x2c7df1),_0x4e87c6=a158_0x4fd49b['relative'](_0x4c72e4,_0x191c38);if(_0x4e87c6[_0x5a669c(0x114)]('..'))return'';return _0x4e87c6;}export function localPathToTdFolderPath(_0x1d8105){const _0x27152f=a158_0x5e1fb0,_0xf57c17=a158_0x4fd49b['dirname'](_0x1d8105);if(_0xf57c17==='.'||_0xf57c17==='')return'';return _0xf57c17[_0x27152f(0x10e)](/\\/g,'/');}function a158_0x31c3(_0x55e878,_0x1ab161){_0x55e878=_0x55e878-0x103;const _0x45e74c=a158_0x45e7();let _0x31c341=_0x45e74c[_0x55e878];return _0x31c341;}export function tdFolderPathToLocalPath(_0x406ae4,_0x1e7c45){const _0x4b8e2d=a158_0x5e1fb0;if(!_0x406ae4)return _0x1e7c45;return a158_0x4fd49b[_0x4b8e2d(0x108)](_0x1e7c45,_0x406ae4);}export function createTdxConfigContent(_0x37b3ea){const _0x4ea139=a158_0x5e1fb0,_0x2fa553={'parent_segment':_0x37b3ea};return JSON[_0x4ea139(0x118)](_0x2fa553,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x2d3888){const _0x1b8e9a=a158_0x5e1fb0,_0x497cec={'engage_workspace':_0x2d3888};return JSON[_0x1b8e9a(0x118)](_0x497cec,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x4b5c9f=a159_0x3d49;(function(_0x3cdfbb,_0x135fba){const _0x51b98b=a159_0x3d49,_0x5264c8=_0x3cdfbb();while(!![]){try{const _0x67e8b8=-parseInt(_0x51b98b(0x1f5))/0x1+parseInt(_0x51b98b(0x1dd))/0x2+parseInt(_0x51b98b(0x1e0))/0x3+-parseInt(_0x51b98b(0x200))/0x4*(parseInt(_0x51b98b(0x1de))/0x5)+-parseInt(_0x51b98b(0x1ee))/0x6+parseInt(_0x51b98b(0x1fc))/0x7*(-parseInt(_0x51b98b(0x1e5))/0x8)+parseInt(_0x51b98b(0x1e9))/0x9;if(_0x67e8b8===_0x135fba)break;else _0x5264c8['push'](_0x5264c8['shift']());}catch(_0xba5310){_0x5264c8['push'](_0x5264c8['shift']());}}}(a159_0x2612,0x362f8));function a159_0x3d49(_0x37ced1,_0x2ebdaf){_0x37ced1=_0x37ced1-0x1d6;const _0x2612eb=a159_0x2612();let _0x3d49b3=_0x2612eb[_0x37ced1];return _0x3d49b3;}import{z}from'zod';export const ScheduleTypeSchema=z[a159_0x4b5c9f(0x1f4)]([a159_0x4b5c9f(0x1e7),a159_0x4b5c9f(0x1f0),a159_0x4b5c9f(0x1e1),a159_0x4b5c9f(0x1fd),a159_0x4b5c9f(0x1d9),a159_0x4b5c9f(0x1da),'minutes_interval']);export const RepeatUnitSchema=z[a159_0x4b5c9f(0x1f4)]([a159_0x4b5c9f(0x1ef),a159_0x4b5c9f(0x1ed),a159_0x4b5c9f(0x1ff),a159_0x4b5c9f(0x1fb),a159_0x4b5c9f(0x1d6),a159_0x4b5c9f(0x1e8),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a159_0x4b5c9f(0x1d7)](),'repeat_frequency':z[a159_0x4b5c9f(0x1e3)]()[a159_0x4b5c9f(0x1d7)](),'repeat_sub_frequency':z[a159_0x4b5c9f(0x1f3)](z[a159_0x4b5c9f(0x1e3)]())['optional'](),'start_at':z['string']()[a159_0x4b5c9f(0x1fa)]()[a159_0x4b5c9f(0x1d7)](),'end_on':z[a159_0x4b5c9f(0x1dc)]()['nullable']()['optional'](),'timezone':z[a159_0x4b5c9f(0x1dc)]()[a159_0x4b5c9f(0x1d7)]()});export const NotificationDefSchema=z['object']({'notify_on':z[a159_0x4b5c9f(0x1f3)](z[a159_0x4b5c9f(0x1f4)]([a159_0x4b5c9f(0x1ec),a159_0x4b5c9f(0x1f9)]))[a159_0x4b5c9f(0x1d7)](),'email_recipients':z[a159_0x4b5c9f(0x1f3)](z[a159_0x4b5c9f(0x1dc)]())[a159_0x4b5c9f(0x1d7)]()});export const ActivationColumnDefSchema=z[a159_0x4b5c9f(0x1eb)]([z['string'](),z[a159_0x4b5c9f(0x1e4)]({'name':z[a159_0x4b5c9f(0x1dc)](),'type':z['string']()[a159_0x4b5c9f(0x1d7)](),'visibility':z[a159_0x4b5c9f(0x1f4)]([a159_0x4b5c9f(0x1df),a159_0x4b5c9f(0x1fe)])[a159_0x4b5c9f(0x1d7)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x4b5c9f(0x1e4)]({'columns':z[a159_0x4b5c9f(0x1f3)](z[a159_0x4b5c9f(0x1e4)]({'name':z[a159_0x4b5c9f(0x1dc)](),'type':z[a159_0x4b5c9f(0x1dc)]()[a159_0x4b5c9f(0x1d7)](),'visibility':z[a159_0x4b5c9f(0x1f4)]([a159_0x4b5c9f(0x1df),a159_0x4b5c9f(0x1fe)])[a159_0x4b5c9f(0x1d7)]()}))[a159_0x4b5c9f(0x1d7)](),'behavior_table':z[a159_0x4b5c9f(0x1dc)]()[a159_0x4b5c9f(0x1d7)](),'join_row':z[a159_0x4b5c9f(0x1e3)]()[a159_0x4b5c9f(0x1fa)]()[a159_0x4b5c9f(0x1d7)](),'join_strategy':z[a159_0x4b5c9f(0x1f4)]([a159_0x4b5c9f(0x1e6),'First',a159_0x4b5c9f(0x1db),a159_0x4b5c9f(0x1f6)])[a159_0x4b5c9f(0x1d7)](),'formatting':z[a159_0x4b5c9f(0x1f4)](['rows',a159_0x4b5c9f(0x1d8)])['optional'](),'order_by':z[a159_0x4b5c9f(0x1f3)](z['object']({'key':z[a159_0x4b5c9f(0x1dc)](),'order':z['enum']([a159_0x4b5c9f(0x1ea),'desc'])}))['optional']()});function a159_0x2612(){const _0x16c3cb=['All','none','once','10157733RHJXGx','asc','union','onSuccess','hour','2478102WpKGQJ','minute','hourly','min','record','array','enum','423732JcOPyG','Top-N','boolean','unknown','onFailure','nullable','week','490910omMnwY','weekly','masked','day','536XmaXzv','month','optional','cols','monthly','cron','Last','string','311494zlrtDm','11465YZSbzA','clear','455103IDgvHg','daily','Connection\x20name\x20is\x20required','number','object','8zjuJJw'];a159_0x2612=function(){return _0x16c3cb;};return a159_0x2612();}export const ActivationDefSchema=z[a159_0x4b5c9f(0x1e4)]({'name':z[a159_0x4b5c9f(0x1dc)]()['min'](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x4b5c9f(0x1dc)]()[a159_0x4b5c9f(0x1d7)](),'connection':z[a159_0x4b5c9f(0x1dc)]()[a159_0x4b5c9f(0x1f1)](0x1,a159_0x4b5c9f(0x1e2)),'all_columns':z['boolean']()[a159_0x4b5c9f(0x1d7)](),'columns':z[a159_0x4b5c9f(0x1f3)](ActivationColumnDefSchema)[a159_0x4b5c9f(0x1d7)](),'schedule':ScheduleDefSchema[a159_0x4b5c9f(0x1d7)](),'notification':NotificationDefSchema[a159_0x4b5c9f(0x1d7)](),'connector_config':z[a159_0x4b5c9f(0x1f2)](z[a159_0x4b5c9f(0x1dc)](),z[a159_0x4b5c9f(0x1f8)]())['optional'](),'activation_template_id':z[a159_0x4b5c9f(0x1dc)]()['nullable']()[a159_0x4b5c9f(0x1d7)](),'behavior':ActivationBehaviorDefSchema[a159_0x4b5c9f(0x1fa)]()['optional'](),'run_after_journey_refresh':z[a159_0x4b5c9f(0x1f7)]()[a159_0x4b5c9f(0x1d7)](),'nested_workflow_project_name':z['string']()[a159_0x4b5c9f(0x1d7)](),'nested_workflow_name':z[a159_0x4b5c9f(0x1dc)]()[a159_0x4b5c9f(0x1d7)](),'lock_enabled':z[a159_0x4b5c9f(0x1f7)]()['optional']()});
1
+ const a159_0x1bb815=a159_0x4d0f;function a159_0x1203(){const _0x41483d=['none','optional','11eWAaGk','69656kJFSjS','16209MhNnyX','record','asc','nullable','weekly','min','7hogSsJ','object','array','daily','All','enum','Last','monthly','75749DRfczy','boolean','clear','string','masked','minutes_interval','desc','3954102zejHJs','once','Top-N','rows','number','2664bnBPov','48561QrvYhj','minute','day','12124730CcJImG','onFailure','cron','First','cols','onSuccess','6LLoWfX','hourly','Connection\x20name\x20is\x20required','11579976JfmNCn','150YkjCWq'];a159_0x1203=function(){return _0x41483d;};return a159_0x1203();}(function(_0x5c311b,_0x20cb63){const _0x17a8b7=a159_0x4d0f,_0x27d404=_0x5c311b();while(!![]){try{const _0x319359=-parseInt(_0x17a8b7(0x112))/0x1+parseInt(_0x17a8b7(0xfb))/0x2*(-parseInt(_0x17a8b7(0x11f))/0x3)+-parseInt(_0x17a8b7(0x103))/0x4*(parseInt(_0x17a8b7(0xff))/0x5)+parseInt(_0x17a8b7(0x119))/0x6*(parseInt(_0x17a8b7(0x10a))/0x7)+-parseInt(_0x17a8b7(0x11e))/0x8*(-parseInt(_0x17a8b7(0x104))/0x9)+parseInt(_0x17a8b7(0x122))/0xa*(parseInt(_0x17a8b7(0x102))/0xb)+-parseInt(_0x17a8b7(0xfe))/0xc;if(_0x319359===_0x20cb63)break;else _0x27d404['push'](_0x27d404['shift']());}catch(_0x4b74ee){_0x27d404['push'](_0x27d404['shift']());}}}(a159_0x1203,0xd1d67));import{z}from'zod';export const ScheduleTypeSchema=z['enum']([a159_0x1bb815(0x100),a159_0x1bb815(0xfc),a159_0x1bb815(0x10d),a159_0x1bb815(0x108),a159_0x1bb815(0x111),a159_0x1bb815(0x124),a159_0x1bb815(0x117)]);export const RepeatUnitSchema=z['enum']([a159_0x1bb815(0x120),'hour',a159_0x1bb815(0x121),'week','month',a159_0x1bb815(0x11a),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema[a159_0x1bb815(0x101)](),'repeat_frequency':z[a159_0x1bb815(0x11d)]()['optional'](),'repeat_sub_frequency':z[a159_0x1bb815(0x10c)](z[a159_0x1bb815(0x11d)]())[a159_0x1bb815(0x101)](),'start_at':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x107)]()[a159_0x1bb815(0x101)](),'end_on':z[a159_0x1bb815(0x115)]()['nullable']()[a159_0x1bb815(0x101)](),'timezone':z[a159_0x1bb815(0x115)]()['optional']()});function a159_0x4d0f(_0x191778,_0x4ef0ac){_0x191778=_0x191778-0xfa;const _0x1203c6=a159_0x1203();let _0x4d0fbf=_0x1203c6[_0x191778];return _0x4d0fbf;}export const NotificationDefSchema=z[a159_0x1bb815(0x10b)]({'notify_on':z[a159_0x1bb815(0x10c)](z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0xfa),a159_0x1bb815(0x123)]))['optional'](),'email_recipients':z[a159_0x1bb815(0x10c)](z[a159_0x1bb815(0x115)]())[a159_0x1bb815(0x101)]()});export const ActivationColumnDefSchema=z['union']([z[a159_0x1bb815(0x115)](),z['object']({'name':z[a159_0x1bb815(0x115)](),'type':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'visibility':z[a159_0x1bb815(0x10f)](['clear',a159_0x1bb815(0x116)])[a159_0x1bb815(0x101)]()})]);export const ActivationBehaviorDefSchema=z['object']({'columns':z[a159_0x1bb815(0x10c)](z['object']({'name':z[a159_0x1bb815(0x115)](),'type':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'visibility':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x114),a159_0x1bb815(0x116)])[a159_0x1bb815(0x101)]()}))[a159_0x1bb815(0x101)](),'behavior_table':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'join_row':z[a159_0x1bb815(0x11d)]()[a159_0x1bb815(0x107)]()[a159_0x1bb815(0x101)](),'join_strategy':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x10e),a159_0x1bb815(0x125),a159_0x1bb815(0x110),a159_0x1bb815(0x11b)])[a159_0x1bb815(0x101)](),'formatting':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x11c),a159_0x1bb815(0x126)])[a159_0x1bb815(0x101)](),'order_by':z[a159_0x1bb815(0x10c)](z['object']({'key':z[a159_0x1bb815(0x115)](),'order':z[a159_0x1bb815(0x10f)]([a159_0x1bb815(0x106),a159_0x1bb815(0x118)])}))[a159_0x1bb815(0x101)]()});export const ActivationDefSchema=z[a159_0x1bb815(0x10b)]({'name':z['string']()[a159_0x1bb815(0x109)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'connection':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x109)](0x1,a159_0x1bb815(0xfd)),'all_columns':z[a159_0x1bb815(0x113)]()[a159_0x1bb815(0x101)](),'columns':z[a159_0x1bb815(0x10c)](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema[a159_0x1bb815(0x101)](),'notification':NotificationDefSchema['optional'](),'connector_config':z[a159_0x1bb815(0x105)](z[a159_0x1bb815(0x115)](),z['unknown']())[a159_0x1bb815(0x101)](),'activation_template_id':z['string']()['nullable']()['optional'](),'behavior':ActivationBehaviorDefSchema[a159_0x1bb815(0x107)]()['optional'](),'run_after_journey_refresh':z[a159_0x1bb815(0x113)]()[a159_0x1bb815(0x101)](),'nested_workflow_project_name':z[a159_0x1bb815(0x115)]()[a159_0x1bb815(0x101)](),'nested_workflow_name':z[a159_0x1bb815(0x115)]()['optional'](),'lock_enabled':z[a159_0x1bb815(0x113)]()[a159_0x1bb815(0x101)]()});
@@ -1 +1 @@
1
- (function(_0x46c743,_0x5a5707){var _0x302014=a160_0x4a4b,_0x4289dc=_0x46c743();while(!![]){try{var _0x2b46ce=parseInt(_0x302014(0x7a))/0x1*(parseInt(_0x302014(0x74))/0x2)+parseInt(_0x302014(0x71))/0x3*(parseInt(_0x302014(0x72))/0x4)+-parseInt(_0x302014(0x7c))/0x5*(parseInt(_0x302014(0x73))/0x6)+parseInt(_0x302014(0x76))/0x7*(-parseInt(_0x302014(0x70))/0x8)+-parseInt(_0x302014(0x79))/0x9+parseInt(_0x302014(0x77))/0xa*(parseInt(_0x302014(0x75))/0xb)+parseInt(_0x302014(0x7b))/0xc*(-parseInt(_0x302014(0x78))/0xd);if(_0x2b46ce===_0x5a5707)break;else _0x4289dc['push'](_0x4289dc['shift']());}catch(_0x493559){_0x4289dc['push'](_0x4289dc['shift']());}}}(a160_0x250d,0x399e8));export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x4a4b(_0x112126,_0x24605){_0x112126=_0x112126-0x70;var _0x250d71=a160_0x250d();var _0x4a4b27=_0x250d71[_0x112126];return _0x4a4b27;}function a160_0x250d(){var _0x1a853c=['489NUMIWU','4898556ISFbTH','25uuOwso','24Sbvkru','27jusUXJ','149012cKZUzf','398742SvDstc','1726Lgsjcs','930985pFyXKJ','191086cIzEXj','50MXTBHQ','13XUkrJR','1098531fwaoaZ'];a160_0x250d=function(){return _0x1a853c;};return a160_0x250d();}
1
+ (function(_0xa49fc5,_0xa17145){var _0x29fd86=a160_0x31f5,_0x56c3d7=_0xa49fc5();while(!![]){try{var _0x442d65=parseInt(_0x29fd86(0x138))/0x1+parseInt(_0x29fd86(0x132))/0x2*(-parseInt(_0x29fd86(0x130))/0x3)+-parseInt(_0x29fd86(0x133))/0x4+parseInt(_0x29fd86(0x139))/0x5+-parseInt(_0x29fd86(0x137))/0x6*(parseInt(_0x29fd86(0x134))/0x7)+parseInt(_0x29fd86(0x135))/0x8+parseInt(_0x29fd86(0x136))/0x9*(parseInt(_0x29fd86(0x131))/0xa);if(_0x442d65===_0xa17145)break;else _0x56c3d7['push'](_0x56c3d7['shift']());}catch(_0x123e16){_0x56c3d7['push'](_0x56c3d7['shift']());}}}(a160_0x61aa,0xbe6cd));function a160_0x31f5(_0x1c55c2,_0x1f8858){_0x1c55c2=_0x1c55c2-0x130;var _0x61aae0=a160_0x61aa();var _0x31f511=_0x61aae0[_0x1c55c2];return _0x31f511;}function a160_0x61aa(){var _0x351c7e=['2405520kTAKrD','11980620pZGPpm','714hiWSxI','313925EhSjCF','6612355ieStgJ','199497dFyZNX','10LgBZho','26mHdPjE','2492508HzZpNr','58863LdYFon'];a160_0x61aa=function(){return _0x351c7e;};return a160_0x61aa();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
@@ -1 +1 @@
1
- const a161_0x3f2610=a161_0x1142;(function(_0x5a832b,_0x5b7fb1){const _0x3f5021=a161_0x1142,_0x16960c=_0x5a832b();while(!![]){try{const _0x52162d=-parseInt(_0x3f5021(0x184))/0x1*(-parseInt(_0x3f5021(0x19f))/0x2)+-parseInt(_0x3f5021(0x183))/0x3+-parseInt(_0x3f5021(0x182))/0x4+-parseInt(_0x3f5021(0x18e))/0x5*(parseInt(_0x3f5021(0x198))/0x6)+-parseInt(_0x3f5021(0x185))/0x7*(parseInt(_0x3f5021(0x1a4))/0x8)+-parseInt(_0x3f5021(0x187))/0x9+parseInt(_0x3f5021(0x19d))/0xa*(parseInt(_0x3f5021(0x17e))/0xb);if(_0x52162d===_0x5b7fb1)break;else _0x16960c['push'](_0x16960c['shift']());}catch(_0x329cf2){_0x16960c['push'](_0x16960c['shift']());}}}(a161_0x2cca,0xa9b0f));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';function a161_0x2cca(){const _0x58498c=['end','isArray','type','enum','stages','56573308KimHzs','launched','activation','lazy','1121216RLskUZ','3507636wSsCnf','1MoJjAG','4494077QnOpdi','discriminatedUnion','12310029PDPySi','journey','no_reentry','min','day','Journey\x20name\x20is\x20required','object','58475GaGXNt','length','week','literal','record','draft','number','array','reentry_unless_goal_achieved','Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions','642doZDxB','jump','versions','boolean','string','10NilCWp','journeys','1809422qqPZMs','simulation','optional','refine','ab_test','16TukDmz','merge','filter'];a161_0x2cca=function(){return _0x58498c;};return a161_0x2cca();}function a161_0x1142(_0x317632,_0x4de47c){_0x317632=_0x317632-0x17c;const _0x2cca60=a161_0x2cca();let _0x11428c=_0x2cca60[_0x317632];return _0x11428c;}export const JourneyStateTypeSchema=z[a161_0x3f2610(0x17c)]([a161_0x3f2610(0x193),a161_0x3f2610(0x1a0),a161_0x3f2610(0x17f)]);export const ReentryModeTypeSchema=z[a161_0x3f2610(0x17c)]([a161_0x3f2610(0x189),a161_0x3f2610(0x196),'reentry_always']);export const WaitUnitTypeSchema=z[a161_0x3f2610(0x17c)]([a161_0x3f2610(0x18b),a161_0x3f2610(0x190)]);export const StepTypeValueSchema=z[a161_0x3f2610(0x17c)](['wait',a161_0x3f2610(0x180),'decision_point',a161_0x3f2610(0x1a3),'merge','jump',a161_0x3f2610(0x1a7)]);export const EmbeddedSegmentDefSchema=z[a161_0x3f2610(0x18d)]({'description':z['string']()[a161_0x3f2610(0x1a1)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x3f2610(0x18d)]({'journey':z[a161_0x3f2610(0x19c)](),'stage':z['string'](),'bundle_id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)]()});export const CriteriaDefSchema=z[a161_0x3f2610(0x18d)]({'name':z[a161_0x3f2610(0x19c)](),'description':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'segment':z[a161_0x3f2610(0x19c)](),'target':JumpTargetDefSchema[a161_0x3f2610(0x1a1)]()});const WaitConditionTimeoutDefSchema=z[a161_0x3f2610(0x18d)]({'duration':z['number'](),'unit':WaitUnitTypeSchema,'next':z[a161_0x3f2610(0x19c)]()['optional']()}),WaitConditionDefSchema=z[a161_0x3f2610(0x18d)]({'segment':z['string'](),'next':z['string']()[a161_0x3f2610(0x1a1)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x3f2610(0x1a1)]()}),WaitStepParamsDefSchema=z[a161_0x3f2610(0x18d)]({'duration':z[a161_0x3f2610(0x194)]()[a161_0x3f2610(0x1a1)](),'unit':WaitUnitTypeSchema[a161_0x3f2610(0x1a1)](),'wait_until':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'condition':WaitConditionDefSchema[a161_0x3f2610(0x1a1)](),'days_of_week':z[a161_0x3f2610(0x195)](z['string']())['optional']()}),StepBaseFields={'name':z[a161_0x3f2610(0x19c)](),'uuid':z[a161_0x3f2610(0x19c)]()['optional'](),'next':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)]()},WaitStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3f2610(0x191)]('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x3f2610(0x18d)]({'activation':z['string']()}),ActivationStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x3f2610(0x180)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x3f2610(0x18d)]({'name':z[a161_0x3f2610(0x19c)](),'segment':z['string']()[a161_0x3f2610(0x1a1)](),'segment_id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'excluded':z[a161_0x3f2610(0x19b)]()[a161_0x3f2610(0x1a1)](),'next':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)]()}),DecisionPointStepParamsDefSchema=z[a161_0x3f2610(0x18d)]({'branches':z[a161_0x3f2610(0x195)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3f2610(0x191)]('decision_point'),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x3f2610(0x18d)]({'id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'name':z[a161_0x3f2610(0x19c)](),'percentage':z[a161_0x3f2610(0x194)](),'next':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)]()}),AbTestStepParamsDefSchema=z[a161_0x3f2610(0x18d)]({'variants':z[a161_0x3f2610(0x195)](AbTestVariantDefSchema),'unique_id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'customized_split':z[a161_0x3f2610(0x19b)]()[a161_0x3f2610(0x1a1)]()}),AbTestStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3f2610(0x191)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x3f2610(0x18d)]({...StepBaseFields,'type':z['literal'](a161_0x3f2610(0x1a5))}),JumpStepParamsDefSchema=z[a161_0x3f2610(0x18d)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x3f2610(0x18d)]({...StepBaseFields,'type':z[a161_0x3f2610(0x191)](a161_0x3f2610(0x199)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3f2610(0x191)](a161_0x3f2610(0x1a7))})['passthrough']();export const StepDefSchema=z[a161_0x3f2610(0x186)](a161_0x3f2610(0x1a9),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z['object']({'name':z[a161_0x3f2610(0x19c)](),'description':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'id':z['string']()[a161_0x3f2610(0x1a1)](),'entry_criteria':CriteriaDefSchema[a161_0x3f2610(0x1a1)](),'exit_criteria':z[a161_0x3f2610(0x195)](CriteriaDefSchema)[a161_0x3f2610(0x1a1)](),'milestone':CriteriaDefSchema[a161_0x3f2610(0x1a1)](),'root_step':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'steps':z[a161_0x3f2610(0x195)](StepDefSchema)[a161_0x3f2610(0x1a1)]()});export const JourneyEntryDefSchema=z[a161_0x3f2610(0x18d)]({'name':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'version':z['string']()['optional'](),'state':JourneyStateTypeSchema[a161_0x3f2610(0x1a1)](),'latest':z[a161_0x3f2610(0x19b)]()['optional'](),'stages':z[a161_0x3f2610(0x195)](StageDefSchema),'id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'version_number':z['number']()['optional'](),'goal':CriteriaDefSchema['optional'](),'reentry':ReentryModeTypeSchema[a161_0x3f2610(0x1a1)]()});export const JourneyDefSchema=z[a161_0x3f2610(0x181)](()=>z[a161_0x3f2610(0x18d)]({'type':z['literal'](a161_0x3f2610(0x188)),'name':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x18a)](0x1,a161_0x3f2610(0x18c)),'description':z['string']()[a161_0x3f2610(0x1a1)](),'bundle_id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'bundle_name':z[a161_0x3f2610(0x19c)]()['optional'](),'folder_id':z['string']()[a161_0x3f2610(0x1a1)](),'reentry':ReentryModeTypeSchema[a161_0x3f2610(0x1a1)](),'allow_reentry':z[a161_0x3f2610(0x19b)]()['optional'](),'goal':CriteriaDefSchema[a161_0x3f2610(0x1a1)](),'id':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'version':z[a161_0x3f2610(0x19c)]()[a161_0x3f2610(0x1a1)](),'version_number':z['number']()[a161_0x3f2610(0x1a1)](),'stages':z['array'](StageDefSchema)[a161_0x3f2610(0x1a1)](),'versions':z['array'](JourneyEntryDefSchema)[a161_0x3f2610(0x1a1)](),'journeys':z[a161_0x3f2610(0x195)](JourneyEntryDefSchema)['optional'](),'segments':z['record'](z[a161_0x3f2610(0x19c)](),EmbeddedSegmentDefSchema)[a161_0x3f2610(0x1a1)](),'activations':z[a161_0x3f2610(0x192)](z[a161_0x3f2610(0x19c)](),ActivationDefSchema)[a161_0x3f2610(0x1a1)]()})[a161_0x3f2610(0x1a2)](_0x5c232d=>{const _0x5c794e=a161_0x3f2610,_0x2ae4b6=[_0x5c232d[_0x5c794e(0x19e)],_0x5c232d[_0x5c794e(0x17d)],_0x5c232d[_0x5c794e(0x19a)]][_0x5c794e(0x1a6)](_0x56609b=>Array[_0x5c794e(0x1a8)](_0x56609b)&&_0x56609b[_0x5c794e(0x18f)]>0x0)[_0x5c794e(0x18f)];return _0x2ae4b6===0x1;},{'message':a161_0x3f2610(0x197)}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x3be2e1=a161_0x5e81;(function(_0x36d51f,_0x17fef2){const _0x1080ad=a161_0x5e81,_0xd7fcb=_0x36d51f();while(!![]){try{const _0x44b0c7=parseInt(_0x1080ad(0x9d))/0x1*(-parseInt(_0x1080ad(0x94))/0x2)+-parseInt(_0x1080ad(0xaf))/0x3*(parseInt(_0x1080ad(0x99))/0x4)+-parseInt(_0x1080ad(0x90))/0x5+-parseInt(_0x1080ad(0x9a))/0x6+parseInt(_0x1080ad(0x9b))/0x7*(-parseInt(_0x1080ad(0xb2))/0x8)+parseInt(_0x1080ad(0xb6))/0x9*(-parseInt(_0x1080ad(0xaa))/0xa)+parseInt(_0x1080ad(0xb3))/0xb;if(_0x44b0c7===_0x17fef2)break;else _0xd7fcb['push'](_0xd7fcb['shift']());}catch(_0x5431d4){_0xd7fcb['push'](_0xd7fcb['shift']());}}}(a161_0x4cc8,0x619e1));import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x3be2e1(0x9c)]([a161_0x3be2e1(0xb9),a161_0x3be2e1(0xa0),a161_0x3be2e1(0x98)]);export const ReentryModeTypeSchema=z['enum'](['no_reentry','reentry_unless_goal_achieved',a161_0x3be2e1(0x9e)]);function a161_0x4cc8(){const _0x232831=['54yCUQtc','isArray','type','draft','decision_point','ab_test','541720wMnKrF','journey','object','lazy','14gaAUts','jump','merge','string','launched','24cyMoTQ','3507762ACrxgL','1631EOITfo','enum','97915mOPJiG','reentry_always','end','simulation','journeys','wait','Journey\x20name\x20is\x20required','versions','week','refine','stages','boolean','filter','1134130YAufIE','optional','array','activation','literal','112452tcbPHW','record','passthrough','7472NImpdj','31913431vtJbZp','number','length'];a161_0x4cc8=function(){return _0x232831;};return a161_0x4cc8();}export const WaitUnitTypeSchema=z['enum'](['day',a161_0x3be2e1(0xa5)]);export const StepTypeValueSchema=z['enum']([a161_0x3be2e1(0xa2),a161_0x3be2e1(0xad),a161_0x3be2e1(0xba),'ab_test',a161_0x3be2e1(0x96),a161_0x3be2e1(0x95),a161_0x3be2e1(0x9f)]);function a161_0x5e81(_0x5e522a,_0x227bc9){_0x5e522a=_0x5e522a-0x90;const _0x4cc869=a161_0x4cc8();let _0x5e810b=_0x4cc869[_0x5e522a];return _0x5e810b;}export const EmbeddedSegmentDefSchema=z[a161_0x3be2e1(0x92)]({'description':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x3be2e1(0x92)]({'journey':z[a161_0x3be2e1(0x97)](),'stage':z['string'](),'bundle_id':z['string']()[a161_0x3be2e1(0xab)]()});export const CriteriaDefSchema=z['object']({'name':z['string'](),'description':z[a161_0x3be2e1(0x97)]()['optional'](),'segment':z['string'](),'target':JumpTargetDefSchema['optional']()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x3be2e1(0xb4)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)]()}),WaitConditionDefSchema=z[a161_0x3be2e1(0x92)]({'segment':z[a161_0x3be2e1(0x97)](),'next':z['string']()['optional'](),'timeout':WaitConditionTimeoutDefSchema['optional']()}),WaitStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'duration':z[a161_0x3be2e1(0xb4)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x3be2e1(0xab)](),'wait_until':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'condition':WaitConditionDefSchema['optional'](),'days_of_week':z['array'](z['string']())[a161_0x3be2e1(0xab)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'next':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)]()},WaitStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z['literal']('wait'),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z['object']({'activation':z[a161_0x3be2e1(0x97)]()}),ActivationStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0xad)),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x3be2e1(0x92)]({'name':z[a161_0x3be2e1(0x97)](),'segment':z[a161_0x3be2e1(0x97)]()['optional'](),'segment_id':z[a161_0x3be2e1(0x97)]()['optional'](),'excluded':z[a161_0x3be2e1(0xa8)]()[a161_0x3be2e1(0xab)](),'next':z['string']()['optional']()}),DecisionPointStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'branches':z[a161_0x3be2e1(0xac)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0xba)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z['object']({'id':z['string']()[a161_0x3be2e1(0xab)](),'name':z[a161_0x3be2e1(0x97)](),'percentage':z[a161_0x3be2e1(0xb4)](),'next':z[a161_0x3be2e1(0x97)]()['optional']()}),AbTestStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'variants':z[a161_0x3be2e1(0xac)](AbTestVariantDefSchema),'unique_id':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'customized_split':z[a161_0x3be2e1(0xa8)]()[a161_0x3be2e1(0xab)]()}),AbTestStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0xbb)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x3be2e1(0x92)]({...StepBaseFields,'type':z['literal']('merge')}),JumpStepParamsDefSchema=z[a161_0x3be2e1(0x92)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)]('jump'),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z['object']({...StepBaseFields,'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0x9f))})[a161_0x3be2e1(0xb1)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x3be2e1(0xb8),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x3be2e1(0x92)]({'name':z[a161_0x3be2e1(0x97)](),'description':z[a161_0x3be2e1(0x97)]()['optional'](),'id':z[a161_0x3be2e1(0x97)]()['optional'](),'entry_criteria':CriteriaDefSchema[a161_0x3be2e1(0xab)](),'exit_criteria':z['array'](CriteriaDefSchema)[a161_0x3be2e1(0xab)](),'milestone':CriteriaDefSchema[a161_0x3be2e1(0xab)](),'root_step':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'steps':z[a161_0x3be2e1(0xac)](StepDefSchema)[a161_0x3be2e1(0xab)]()});export const JourneyEntryDefSchema=z[a161_0x3be2e1(0x92)]({'name':z['string']()[a161_0x3be2e1(0xab)](),'version':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'state':JourneyStateTypeSchema[a161_0x3be2e1(0xab)](),'latest':z['boolean']()[a161_0x3be2e1(0xab)](),'stages':z[a161_0x3be2e1(0xac)](StageDefSchema),'id':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'version_number':z['number']()['optional'](),'goal':CriteriaDefSchema[a161_0x3be2e1(0xab)](),'reentry':ReentryModeTypeSchema[a161_0x3be2e1(0xab)]()});export const JourneyDefSchema=z[a161_0x3be2e1(0x93)](()=>z[a161_0x3be2e1(0x92)]({'type':z[a161_0x3be2e1(0xae)](a161_0x3be2e1(0x91)),'name':z['string']()['min'](0x1,a161_0x3be2e1(0xa3)),'description':z['string']()['optional'](),'bundle_id':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'bundle_name':z[a161_0x3be2e1(0x97)]()[a161_0x3be2e1(0xab)](),'folder_id':z[a161_0x3be2e1(0x97)]()['optional'](),'reentry':ReentryModeTypeSchema[a161_0x3be2e1(0xab)](),'allow_reentry':z[a161_0x3be2e1(0xa8)]()[a161_0x3be2e1(0xab)](),'goal':CriteriaDefSchema['optional'](),'id':z['string']()[a161_0x3be2e1(0xab)](),'version':z[a161_0x3be2e1(0x97)]()['optional'](),'version_number':z[a161_0x3be2e1(0xb4)]()[a161_0x3be2e1(0xab)](),'stages':z['array'](StageDefSchema)[a161_0x3be2e1(0xab)](),'versions':z[a161_0x3be2e1(0xac)](JourneyEntryDefSchema)[a161_0x3be2e1(0xab)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x3be2e1(0xab)](),'segments':z[a161_0x3be2e1(0xb0)](z['string'](),EmbeddedSegmentDefSchema)['optional'](),'activations':z['record'](z[a161_0x3be2e1(0x97)](),ActivationDefSchema)[a161_0x3be2e1(0xab)]()})[a161_0x3be2e1(0xa6)](_0x5b439d=>{const _0x5bceee=a161_0x3be2e1,_0x55292=[_0x5b439d[_0x5bceee(0xa1)],_0x5b439d[_0x5bceee(0xa7)],_0x5b439d[_0x5bceee(0xa4)]][_0x5bceee(0xa9)](_0x4d9230=>Array[_0x5bceee(0xb7)](_0x4d9230)&&_0x4d9230[_0x5bceee(0xb5)]>0x0)[_0x5bceee(0xb5)];return _0x55292===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a163_0x53ff(){var _0x54f848=['9UhowjD','14jLFvrv','307792IzSXfk','425epxnrQ','1390496RmRRdX','12fiBkLN','348406DmUXAT','4321812mkKuIe','4506410xyMTyB','227059rbOwfF','4896zIYuNI','3nBnxtE'];a163_0x53ff=function(){return _0x54f848;};return a163_0x53ff();}(function(_0x1e06c7,_0x4615e4){var _0xa79410=a163_0x317d,_0x5f3858=_0x1e06c7();while(!![]){try{var _0x4f6e42=-parseInt(_0xa79410(0xc8))/0x1+parseInt(_0xa79410(0xc5))/0x2*(parseInt(_0xa79410(0xca))/0x3)+-parseInt(_0xa79410(0xc1))/0x4+-parseInt(_0xa79410(0xc2))/0x5*(-parseInt(_0xa79410(0xc9))/0x6)+-parseInt(_0xa79410(0xc0))/0x7*(-parseInt(_0xa79410(0xc3))/0x8)+parseInt(_0xa79410(0xcb))/0x9*(-parseInt(_0xa79410(0xc7))/0xa)+-parseInt(_0xa79410(0xc6))/0xb*(-parseInt(_0xa79410(0xc4))/0xc);if(_0x4f6e42===_0x4615e4)break;else _0x5f3858['push'](_0x5f3858['shift']());}catch(_0x391d95){_0x5f3858['push'](_0x5f3858['shift']());}}}(a163_0x53ff,0x38037));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';function a163_0x317d(_0x1f2f6e,_0x278437){_0x1f2f6e=_0x1f2f6e-0xc0;var _0x53ff75=a163_0x53ff();var _0x317dce=_0x53ff75[_0x1f2f6e];return _0x317dce;}export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ function a163_0x2b8b(_0x3e52d3,_0x38a1ce){_0x3e52d3=_0x3e52d3-0xad;var _0x5c2220=a163_0x5c22();var _0x2b8bf4=_0x5c2220[_0x3e52d3];return _0x2b8bf4;}(function(_0x37f883,_0x3a0680){var _0x9a831a=a163_0x2b8b,_0x11dd76=_0x37f883();while(!![]){try{var _0x4c7c55=parseInt(_0x9a831a(0xae))/0x1*(parseInt(_0x9a831a(0xb1))/0x2)+-parseInt(_0x9a831a(0xb5))/0x3*(-parseInt(_0x9a831a(0xaf))/0x4)+parseInt(_0x9a831a(0xb3))/0x5+parseInt(_0x9a831a(0xb2))/0x6+parseInt(_0x9a831a(0xb7))/0x7+-parseInt(_0x9a831a(0xad))/0x8*(parseInt(_0x9a831a(0xb0))/0x9)+-parseInt(_0x9a831a(0xb4))/0xa*(parseInt(_0x9a831a(0xb6))/0xb);if(_0x4c7c55===_0x3a0680)break;else _0x11dd76['push'](_0x11dd76['shift']());}catch(_0x128bed){_0x11dd76['push'](_0x11dd76['shift']());}}}(a163_0x5c22,0x3135e));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_0x5c22(){var _0x4dc0fc=['2tPmjQq','1724mJIsQX','9UnOZGa','105686JAQSdE','1286694ZVAfrf','637535wRxxwy','325790kzafIY','1494OIMoTg','187LigIZp','2273642CxLoRZ','1853416BlLNUA'];a163_0x5c22=function(){return _0x4dc0fc;};return a163_0x5c22();}
@@ -1 +1 @@
1
- const a164_0x5cc079=a164_0x15b3;(function(_0x1fa5b5,_0xc8c298){const _0x207c13=a164_0x15b3,_0x15b2ee=_0x1fa5b5();while(!![]){try{const _0x6bf6e1=-parseInt(_0x207c13(0xd5))/0x1*(-parseInt(_0x207c13(0xf9))/0x2)+-parseInt(_0x207c13(0xec))/0x3*(-parseInt(_0x207c13(0xfd))/0x4)+-parseInt(_0x207c13(0x10e))/0x5+-parseInt(_0x207c13(0xe7))/0x6+parseInt(_0x207c13(0xc2))/0x7+parseInt(_0x207c13(0x104))/0x8*(-parseInt(_0x207c13(0x103))/0x9)+-parseInt(_0x207c13(0xf1))/0xa*(-parseInt(_0x207c13(0xf6))/0xb);if(_0x6bf6e1===_0xc8c298)break;else _0x15b2ee['push'](_0x15b2ee['shift']());}catch(_0x1a5c2f){_0x15b2ee['push'](_0x15b2ee['shift']());}}}(a164_0x2c09,0xd76c7));import{z}from'zod';function a164_0x15b3(_0x3f8851,_0x584686){_0x3f8851=_0x3f8851-0xc2;const _0x2c09f4=a164_0x2c09();let _0x15b35b=_0x2c09f4[_0x3f8851];return _0x15b35b;}export const OperatorTypeSchema=z[a164_0x5cc079(0xc6)](['Equal',a164_0x5cc079(0x105),a164_0x5cc079(0xda),a164_0x5cc079(0xc7),a164_0x5cc079(0xf5),'In',a164_0x5cc079(0xd7),a164_0x5cc079(0x109),'IsNull','TimeWithinPast',a164_0x5cc079(0x106),a164_0x5cc079(0xfb),a164_0x5cc079(0xdf),a164_0x5cc079(0xe1),a164_0x5cc079(0xf8)]);export const TimeUnitSchema=z['enum']([a164_0x5cc079(0xeb),a164_0x5cc079(0xfc),a164_0x5cc079(0xe9),a164_0x5cc079(0xfe),'week','month',a164_0x5cc079(0xcb)]);export const AggregationTypeSchema=z[a164_0x5cc079(0xc6)](['Count',a164_0x5cc079(0xf0),a164_0x5cc079(0xc8),a164_0x5cc079(0xe0),a164_0x5cc079(0xd8),'CountDistinct',a164_0x5cc079(0xd3),a164_0x5cc079(0xe8)]);const TemporalValueSchema=z[a164_0x5cc079(0x10c)]([z['object']({'timestamp':z[a164_0x5cc079(0x101)]()}),z['object']({'last':z[a164_0x5cc079(0x10c)]([z['number'](),z['record'](z['string'](),z[a164_0x5cc079(0x108)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x101)](),z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0xdb)](),TemporalValueSchema,z[a164_0x5cc079(0x10a)](z['union']([z['string'](),z[a164_0x5cc079(0x108)](),z['boolean']()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x5cc079(0x105),a164_0x5cc079(0xc7),a164_0x5cc079(0xda),'LessEqual','In','Contain',a164_0x5cc079(0xdf),'EndWith',a164_0x5cc079(0x109),a164_0x5cc079(0xf3),a164_0x5cc079(0x106)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x5cc079(0x106)]);export const OperatorDefSchema=z['object']({'type':OperatorTypeSchema,'not':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'value':OperatorValueSchema['optional'](),'min':z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0x101)](),TemporalValueSchema])['optional'](),'max':z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0x101)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema[a164_0x5cc079(0xd2)](),'duration':z[a164_0x5cc079(0xe6)]({'day':z['number']()[a164_0x5cc079(0xd2)](),'week':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'month':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'year':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'hour':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'minute':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)](),'second':z['number']()[a164_0x5cc079(0xd2)]()})[a164_0x5cc079(0xd2)](),'from':z[a164_0x5cc079(0xe6)]({'last':z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0x108)](),z[a164_0x5cc079(0x101)]()]),'unit':TimeUnitSchema})[a164_0x5cc079(0xd2)](),'reverse':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)]()})['superRefine']((_0x596c81,_0x4408ad)=>{const _0x12dba0=a164_0x5cc079;OPERATORS_REQUIRING_VALUE[_0x12dba0(0xdd)](_0x596c81[_0x12dba0(0xe2)])&&(_0x596c81[_0x12dba0(0xde)]===undefined||_0x596c81[_0x12dba0(0xde)]===null)&&_0x4408ad['addIssue']({'code':_0x12dba0(0xcc),'message':_0x12dba0(0x102)+_0x596c81[_0x12dba0(0xe2)]+_0x12dba0(0x100),'path':['value']}),_0x596c81['type']===_0x12dba0(0xd7)&&_0x596c81[_0x12dba0(0xd1)]===undefined&&_0x596c81[_0x12dba0(0xcd)]===undefined&&_0x4408ad[_0x12dba0(0xf2)]({'code':_0x12dba0(0xcc),'message':_0x12dba0(0xc4),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x12dba0(0xdd)](_0x596c81[_0x12dba0(0xe2)])&&_0x596c81[_0x12dba0(0xde)]!==undefined&&!_0x596c81['unit']&&_0x4408ad[_0x12dba0(0xf2)]({'code':_0x12dba0(0xcc),'message':_0x12dba0(0x102)+_0x596c81[_0x12dba0(0xe2)]+_0x12dba0(0xea),'path':[_0x12dba0(0x10b)],'params':{'validationCode':_0x12dba0(0xee)}}),_0x596c81[_0x12dba0(0xe2)]==='TimeRange'&&(!_0x596c81['duration']&&_0x4408ad['addIssue']({'code':_0x12dba0(0xcc),'message':_0x12dba0(0xe3),'path':[_0x12dba0(0x107)]}),!_0x596c81[_0x12dba0(0xf4)]&&_0x4408ad[_0x12dba0(0xf2)]({'code':_0x12dba0(0xcc),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x12dba0(0xf4)]}));});export const ArrayMatchingSchema=z[a164_0x5cc079(0x10c)]([z[a164_0x5cc079(0xef)](a164_0x5cc079(0xed)),z['literal'](a164_0x5cc079(0xd4)),z[a164_0x5cc079(0xe6)]({'atLeast':z[a164_0x5cc079(0x108)]()}),z['object']({'atMost':z[a164_0x5cc079(0x108)]()}),z[a164_0x5cc079(0xe6)]({'exactly':z[a164_0x5cc079(0x108)]()})]);export const AggregationDefSchema=z[a164_0x5cc079(0xc3)]('type',[z[a164_0x5cc079(0xe6)]({'type':z['enum']([a164_0x5cc079(0xf0),a164_0x5cc079(0xe0),a164_0x5cc079(0xd8),a164_0x5cc079(0xc8)]),'column':z[a164_0x5cc079(0x101)](),'groupingColumns':z[a164_0x5cc079(0x10a)](z[a164_0x5cc079(0x101)]())[a164_0x5cc079(0xd2)]()}),z[a164_0x5cc079(0xe6)]({'type':z['literal']('Count'),'groupingColumns':z[a164_0x5cc079(0x10a)](z['string']())[a164_0x5cc079(0xd2)]()}),z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xf7)),'columns':z[a164_0x5cc079(0x10a)](z['string']())}),z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xc6)]([a164_0x5cc079(0xd3),a164_0x5cc079(0xe8)]),'column':z[a164_0x5cc079(0x101)](),'orderColumn':z[a164_0x5cc079(0x101)](),'groupingColumns':z['array'](z['string']())[a164_0x5cc079(0xd2)]()})]);function a164_0x2c09(){const _0x101290=['number','Regexp','array','unit','union','lazy','5307620KerNpQ','5268522nKYBje','discriminatedUnion','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','operator','enum','GreaterEqual','Average','Column','column','year','custom','max','exclude','batch','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','min','optional','First','all','1eHDWLN','funnel_stage','Between','Max','Behavior','Less','boolean','segment','has','value','StartWith','Min','EndWith','type','TimeRange\x20operator\x20requires\x20\x27duration\x27','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','realtime','object','9039336SNtRYR','Last','hour','\x27\x20requires\x20a\x20time\x20unit','second','1511778GIJpIK','any','MISSING_TIME_UNIT','literal','Sum','63730pcLJwW','addIssue','TimeWithinPast','from','LessEqual','2497HfQrmS','CountDistinct','TimeRange','2034084zbtQkX','And','Contain','minute','12xhDxnJ','day','Value','\x27\x20requires\x20a\x20value','string','Operator\x20\x27','9mvAppg','10221456iFWIeu','Greater','TimeWithinNext','duration'];a164_0x2c09=function(){return _0x101290;};return a164_0x2c09();}export const TimeWindowDefSchema=z[a164_0x5cc079(0xe6)]({'duration':z[a164_0x5cc079(0x108)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x5cc079(0xf3),a164_0x5cc079(0x106),a164_0x5cc079(0xf8)]);export const FilterColumnConditionDefSchema=z[a164_0x5cc079(0xe6)]({'type':z['literal'](a164_0x5cc079(0xc9)),'column':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cc079(0xd2)]()})['superRefine']((_0xe90478,_0x1ba525)=>{const _0x388d4d=a164_0x5cc079,_0x32643d=_0xe90478['operator'][_0x388d4d(0xe2)];_0xe90478[_0x388d4d(0xca)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x388d4d(0xdd)](_0x32643d)&&_0x1ba525[_0x388d4d(0xf2)]({'code':_0x388d4d(0xcc),'message':_0x388d4d(0xd0)+_0x32643d+'\x27)','path':['operator',_0x388d4d(0xe2)]}):TIMESTAMP_OPERATORS[_0x388d4d(0xdd)](_0x32643d)&&_0x1ba525[_0x388d4d(0xf2)]({'code':_0x388d4d(0xcc),'message':'Operator\x20\x27'+_0x32643d+_0x388d4d(0xe4),'path':[_0x388d4d(0xc5),_0x388d4d(0xe2)]});});export const FilterRuleDefSchema=z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xfa)),'conditions':z['array'](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z['object']({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xff)),'attribute':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cc079(0xd2)](),'exclude':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'aggregation':AggregationDefSchema[a164_0x5cc079(0xd2)](),'source':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)](),'filter':FilterRuleDefSchema[a164_0x5cc079(0xd2)](),'limit':z[a164_0x5cc079(0x108)]()[a164_0x5cc079(0xd2)]()}));export const BehaviorConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z[a164_0x5cc079(0xe6)]({'type':z['literal'](a164_0x5cc079(0xd9)),'attribute':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x5cc079(0xd2)](),'exclude':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'aggregation':AggregationDefSchema[a164_0x5cc079(0xd2)](),'source':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)](),'filter':FilterRuleDefSchema[a164_0x5cc079(0xd2)](),'timeWindow':TimeWindowDefSchema[a164_0x5cc079(0xd2)](),'limit':z['number']()[a164_0x5cc079(0xd2)]()}));export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xc9)),'column':z[a164_0x5cc079(0x101)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z[a164_0x5cc079(0xe6)]({'type':z['enum']([a164_0x5cc079(0xfa),'Or']),'conditions':z[a164_0x5cc079(0x10a)](ConditionDefSchema),'description':z[a164_0x5cc079(0x101)]()['optional']()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x5cc079(0xc6)](['include',a164_0x5cc079(0xce)]),'segment':z[a164_0x5cc079(0x101)]()['min'](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z[a164_0x5cc079(0x10d)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x5cc079(0x10d)](()=>z['object']({'type':z['enum']([a164_0x5cc079(0xfa),'Or']),'conditions':z[a164_0x5cc079(0x10a)](ConditionDefSchema),'description':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)]()}));export const SegmentDefSchema=z[a164_0x5cc079(0xe6)]({'type':z[a164_0x5cc079(0xef)](a164_0x5cc079(0xdc))[a164_0x5cc079(0xd2)](),'name':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd1)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x5cc079(0x101)]()[a164_0x5cc079(0xd2)](),'folder':z[a164_0x5cc079(0x101)]()['optional'](),'rule':RuleDefSchema[a164_0x5cc079(0xd2)](),'kind':z['enum']([a164_0x5cc079(0xcf),a164_0x5cc079(0xe5),a164_0x5cc079(0xd6)])[a164_0x5cc079(0xd2)](),'visible':z[a164_0x5cc079(0xdb)]()[a164_0x5cc079(0xd2)](),'activations':z['array'](z['any']())[a164_0x5cc079(0xd2)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x1630dc=a164_0x51fb;(function(_0x333d2b,_0x59d3db){const _0x2a09ea=a164_0x51fb,_0x3fad6b=_0x333d2b();while(!![]){try{const _0x3e3544=parseInt(_0x2a09ea(0x20c))/0x1*(parseInt(_0x2a09ea(0x228))/0x2)+-parseInt(_0x2a09ea(0x233))/0x3+-parseInt(_0x2a09ea(0x225))/0x4+parseInt(_0x2a09ea(0x22a))/0x5+parseInt(_0x2a09ea(0x211))/0x6*(parseInt(_0x2a09ea(0x1fa))/0x7)+parseInt(_0x2a09ea(0x234))/0x8+-parseInt(_0x2a09ea(0x201))/0x9*(parseInt(_0x2a09ea(0x210))/0xa);if(_0x3e3544===_0x59d3db)break;else _0x3fad6b['push'](_0x3fad6b['shift']());}catch(_0x1f83bd){_0x3fad6b['push'](_0x3fad6b['shift']());}}}(a164_0x193a,0xd82a7));import{z}from'zod';export const OperatorTypeSchema=z['enum']([a164_0x1630dc(0x1f0),'Greater','Less',a164_0x1630dc(0x203),a164_0x1630dc(0x205),'In',a164_0x1630dc(0x20b),a164_0x1630dc(0x22f),a164_0x1630dc(0x20e),a164_0x1630dc(0x217),a164_0x1630dc(0x230),'Contain',a164_0x1630dc(0x202),a164_0x1630dc(0x1ef),'TimeRange']);export const TimeUnitSchema=z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x222),'minute',a164_0x1630dc(0x204),a164_0x1630dc(0x206),'week',a164_0x1630dc(0x21f),'year']);export const AggregationTypeSchema=z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x200),a164_0x1630dc(0x213),a164_0x1630dc(0x223),'Min','Max',a164_0x1630dc(0x214),a164_0x1630dc(0x207),'Last']);function a164_0x193a(){const _0x238094=['day','First','Contain','discriminatedUnion','Behavior','Between','14549XQkRXl','Value','IsNull','array','30xmnMxX','6SWuKMA','realtime','Sum','CountDistinct','TimeRange\x20operator\x20requires\x20\x27duration\x27','addIssue','TimeWithinPast','include','Column','type','column','from','Segment\x20name\x20is\x20required','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','month','And','boolean','second','Average','lazy','539768EFFeQH','Operator\x20\x27','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','42pQBeOd','string','361405uNnllX','Last','enum','union','custom','Regexp','TimeWithinNext','object','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','1974675sVSoTi','9053616hnKyhL','TimeRange','operator','any','EndWith','Equal','min','duration','number','record','segment','literal','max','value','superRefine','6816467xVGabA','unit','MISSING_TIME_UNIT','has','Greater','optional','Count','2414133nLXpnb','StartWith','GreaterEqual','hour','LessEqual'];a164_0x193a=function(){return _0x238094;};return a164_0x193a();}const TemporalValueSchema=z[a164_0x1630dc(0x22d)]([z['object']({'timestamp':z[a164_0x1630dc(0x229)]()}),z[a164_0x1630dc(0x231)]({'last':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x1f4)](z[a164_0x1630dc(0x229)](),z[a164_0x1630dc(0x1f3)]())]),'unit':z['string']()})]),OperatorValueSchema=z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x229)](),z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x221)](),TemporalValueSchema,z['array'](z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x229)](),z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x221)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x1630dc(0x1fe),a164_0x1630dc(0x203),'Less','LessEqual','In',a164_0x1630dc(0x208),a164_0x1630dc(0x202),'EndWith',a164_0x1630dc(0x22f),a164_0x1630dc(0x217),'TimeWithinNext']),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast','TimeWithinNext']);export const OperatorDefSchema=z[a164_0x1630dc(0x231)]({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x1630dc(0x1ff)](),'value':OperatorValueSchema[a164_0x1630dc(0x1ff)](),'min':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x229)](),TemporalValueSchema])['optional'](),'max':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z['string'](),TemporalValueSchema])[a164_0x1630dc(0x1ff)](),'unit':TimeUnitSchema[a164_0x1630dc(0x1ff)](),'duration':z[a164_0x1630dc(0x231)]({'day':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'week':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'month':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'year':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'hour':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'minute':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)](),'second':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)]()})[a164_0x1630dc(0x1ff)](),'from':z['object']({'last':z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f3)](),z[a164_0x1630dc(0x229)]()]),'unit':TimeUnitSchema})[a164_0x1630dc(0x1ff)](),'reverse':z['boolean']()[a164_0x1630dc(0x1ff)]()})['superRefine']((_0x43a1ce,_0x20083f)=>{const _0x4b47fe=a164_0x1630dc;OPERATORS_REQUIRING_VALUE[_0x4b47fe(0x1fd)](_0x43a1ce[_0x4b47fe(0x21a)])&&(_0x43a1ce[_0x4b47fe(0x1f8)]===undefined||_0x43a1ce['value']===null)&&_0x20083f[_0x4b47fe(0x216)]({'code':'custom','message':'Operator\x20\x27'+_0x43a1ce[_0x4b47fe(0x21a)]+'\x27\x20requires\x20a\x20value','path':[_0x4b47fe(0x1f8)]}),_0x43a1ce['type']===_0x4b47fe(0x20b)&&_0x43a1ce[_0x4b47fe(0x1f1)]===undefined&&_0x43a1ce[_0x4b47fe(0x1f7)]===undefined&&_0x20083f[_0x4b47fe(0x216)]({'code':_0x4b47fe(0x22e),'message':_0x4b47fe(0x227),'params':{'validationCode':'MISSING_BETWEEN_BOUNDS'}}),OPERATORS_REQUIRING_UNIT[_0x4b47fe(0x1fd)](_0x43a1ce['type'])&&_0x43a1ce[_0x4b47fe(0x1f8)]!==undefined&&!_0x43a1ce['unit']&&_0x20083f['addIssue']({'code':_0x4b47fe(0x22e),'message':_0x4b47fe(0x226)+_0x43a1ce['type']+'\x27\x20requires\x20a\x20time\x20unit','path':[_0x4b47fe(0x1fb)],'params':{'validationCode':_0x4b47fe(0x1fc)}}),_0x43a1ce[_0x4b47fe(0x21a)]===_0x4b47fe(0x235)&&(!_0x43a1ce[_0x4b47fe(0x1f2)]&&_0x20083f['addIssue']({'code':'custom','message':_0x4b47fe(0x215),'path':['duration']}),!_0x43a1ce['from']&&_0x20083f['addIssue']({'code':_0x4b47fe(0x22e),'message':'TimeRange\x20operator\x20requires\x20\x27from\x27','path':[_0x4b47fe(0x21c)]}));});export const ArrayMatchingSchema=z[a164_0x1630dc(0x22d)]([z[a164_0x1630dc(0x1f6)]('any'),z[a164_0x1630dc(0x1f6)]('all'),z[a164_0x1630dc(0x231)]({'atLeast':z[a164_0x1630dc(0x1f3)]()}),z[a164_0x1630dc(0x231)]({'atMost':z['number']()}),z['object']({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x1630dc(0x209)](a164_0x1630dc(0x21a),[z['object']({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x213),'Min','Max',a164_0x1630dc(0x223)]),'column':z[a164_0x1630dc(0x229)](),'groupingColumns':z[a164_0x1630dc(0x20f)](z[a164_0x1630dc(0x229)]())[a164_0x1630dc(0x1ff)]()}),z['object']({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x200)),'groupingColumns':z[a164_0x1630dc(0x20f)](z[a164_0x1630dc(0x229)]())['optional']()}),z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x214)),'columns':z[a164_0x1630dc(0x20f)](z[a164_0x1630dc(0x229)]())}),z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x207),a164_0x1630dc(0x22b)]),'column':z[a164_0x1630dc(0x229)](),'orderColumn':z[a164_0x1630dc(0x229)](),'groupingColumns':z['array'](z[a164_0x1630dc(0x229)]())['optional']()})]);export const TimeWindowDefSchema=z[a164_0x1630dc(0x231)]({'duration':z[a164_0x1630dc(0x1f3)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x1630dc(0x217),'TimeWithinNext',a164_0x1630dc(0x235)]);export const FilterColumnConditionDefSchema=z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x219)),'column':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x1630dc(0x1ff)]()})[a164_0x1630dc(0x1f9)]((_0x224f27,_0x79af8d)=>{const _0x140579=a164_0x1630dc,_0x25ac3e=_0x224f27[_0x140579(0x236)]['type'];_0x224f27[_0x140579(0x21b)]==='timestamp'?!TIMESTAMP_OPERATORS[_0x140579(0x1fd)](_0x25ac3e)&&_0x79af8d[_0x140579(0x216)]({'code':'custom','message':_0x140579(0x21e)+_0x25ac3e+'\x27)','path':[_0x140579(0x236),'type']}):TIMESTAMP_OPERATORS['has'](_0x25ac3e)&&_0x79af8d[_0x140579(0x216)]({'code':_0x140579(0x22e),'message':'Operator\x20\x27'+_0x25ac3e+_0x140579(0x232),'path':['operator','type']});});function a164_0x51fb(_0x4ce1a5,_0x46a742){_0x4ce1a5=_0x4ce1a5-0x1ee;const _0x193add=a164_0x193a();let _0x51fb50=_0x193add[_0x4ce1a5];return _0x51fb50;}export const FilterRuleDefSchema=z['object']({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x220)),'conditions':z[a164_0x1630dc(0x20f)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z['lazy'](()=>z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x1f6)](a164_0x1630dc(0x20d)),'attribute':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x1630dc(0x1ff)](),'exclude':z['boolean']()[a164_0x1630dc(0x1ff)](),'aggregation':AggregationDefSchema[a164_0x1630dc(0x1ff)](),'source':z['string']()['optional'](),'filter':FilterRuleDefSchema[a164_0x1630dc(0x1ff)](),'limit':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)]()}));export const BehaviorConditionDefSchema=z['lazy'](()=>z['object']({'type':z['literal'](a164_0x1630dc(0x20a)),'attribute':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z[a164_0x1630dc(0x221)]()[a164_0x1630dc(0x1ff)](),'aggregation':AggregationDefSchema[a164_0x1630dc(0x1ff)](),'source':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x1630dc(0x1ff)](),'limit':z[a164_0x1630dc(0x1f3)]()[a164_0x1630dc(0x1ff)]()}));export const ColumnConditionDefSchema=z[a164_0x1630dc(0x231)]({'type':z['literal']('Column'),'column':z[a164_0x1630dc(0x229)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x1630dc(0x224)](()=>z['object']({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x220),'Or']),'conditions':z[a164_0x1630dc(0x20f)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentRefConditionDefSchema=z[a164_0x1630dc(0x231)]({'type':z[a164_0x1630dc(0x22c)]([a164_0x1630dc(0x218),'exclude']),'segment':z['string']()[a164_0x1630dc(0x1f1)](0x1,'Segment\x20reference\x20must\x20not\x20be\x20empty')});export const ConditionDefSchema=z['lazy'](()=>z[a164_0x1630dc(0x22d)]([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x1630dc(0x224)](()=>z[a164_0x1630dc(0x231)]({'type':z['enum']([a164_0x1630dc(0x220),'Or']),'conditions':z[a164_0x1630dc(0x20f)](ConditionDefSchema),'description':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)]()}));export const SegmentDefSchema=z[a164_0x1630dc(0x231)]({'type':z['literal'](a164_0x1630dc(0x1f5))[a164_0x1630dc(0x1ff)](),'name':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1f1)](0x1,a164_0x1630dc(0x21d)),'description':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)](),'folder':z[a164_0x1630dc(0x229)]()[a164_0x1630dc(0x1ff)](),'rule':RuleDefSchema['optional'](),'kind':z['enum'](['batch',a164_0x1630dc(0x212),'funnel_stage'])[a164_0x1630dc(0x1ff)](),'visible':z[a164_0x1630dc(0x221)]()[a164_0x1630dc(0x1ff)](),'activations':z['array'](z[a164_0x1630dc(0x1ee)]())[a164_0x1630dc(0x1ff)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- const a165_0x45c96b=a165_0x59cb;(function(_0x16e547,_0xa74f9a){const _0x1ccfb9=a165_0x59cb,_0x937ddc=_0x16e547();while(!![]){try{const _0x1b6963=-parseInt(_0x1ccfb9(0x12f))/0x1*(-parseInt(_0x1ccfb9(0x124))/0x2)+-parseInt(_0x1ccfb9(0x130))/0x3+-parseInt(_0x1ccfb9(0x127))/0x4+parseInt(_0x1ccfb9(0x120))/0x5+-parseInt(_0x1ccfb9(0x13b))/0x6*(-parseInt(_0x1ccfb9(0x12e))/0x7)+parseInt(_0x1ccfb9(0x12d))/0x8*(parseInt(_0x1ccfb9(0x138))/0x9)+-parseInt(_0x1ccfb9(0x13e))/0xa;if(_0x1b6963===_0xa74f9a)break;else _0x937ddc['push'](_0x937ddc['shift']());}catch(_0x5607da){_0x937ddc['push'](_0x937ddc['shift']());}}}(a165_0x4a13,0xc048c));import{readFileSync}from'fs';import*as a165_0x37ebae from'path';import*as a165_0x4e2a7a from'yaml';function a165_0x4a13(){const _0x52e99=['message','not\x20a\x20','skipped','filterType','valid','object','8071893uSxnFC','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','error','133512JCvfTb','YAML\x20parse\x20error:\x20','push','24840250URIoDO','segment','7507115zIdgni','parseDocument','toJSON','type','2918ySgmbi','result','template','584468knnUvK','journey','email','length','campaign','warnings','8KfDPEI','287HEqYmr','845osIpyA','3377247IFCmqU','utf-8'];a165_0x4a13=function(){return _0x52e99;};return a165_0x4a13();}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_0x45c96b(0x129),a165_0x45c96b(0x13d)]);export function isJourneyDef(_0x147bad){const _0x1fcbd8=a165_0x45c96b;return typeof _0x147bad===_0x1fcbd8(0x137)&&_0x147bad!==null&&_0x1fcbd8(0x123)in _0x147bad&&_0x147bad['type']==='journey';}export function isCampaignDef(_0x6c02ec){const _0x4f2d77=a165_0x45c96b;if(typeof _0x6c02ec!==_0x4f2d77(0x137)||_0x6c02ec===null)return![];const _0x32a0ca=_0x6c02ec,_0xf22f26=VALID_CAMPAIGN_TYPES['has'](_0x32a0ca['campaign_type']);if(_0x32a0ca[_0x4f2d77(0x123)]===_0x4f2d77(0x12b)&&_0xf22f26)return!![];if(_0xf22f26&&!_0x32a0ca[_0x4f2d77(0x123)])return!![];return![];}export function isTemplateDef(_0x5025b9){const _0x85bc87=a165_0x45c96b;return typeof _0x5025b9==='object'&&_0x5025b9!==null&&_0x85bc87(0x123)in _0x5025b9&&_0x5025b9['type']==='template';}export function isValidationResult(_0x5c2943){const _0x307bd9=a165_0x45c96b;return!(_0x307bd9(0x134)in _0x5c2943);}export function createParseErrorResult(_0x47f47a,_0x1dd62b,_0x410802,_0x83e5b2,_0x30175b=a165_0x45c96b(0x11f)){const _0x204b36=a165_0x45c96b;return{'filePath':_0x47f47a,'relativePath':_0x1dd62b,'source':_0x410802,'result':{'valid':![],'errors':[{'level':_0x204b36(0x13a),'path':'','code':'YAML_PARSE_ERROR','message':_0x83e5b2}],'warnings':[]},'fileType':_0x30175b};}function a165_0x59cb(_0x33fec9,_0x2646e9){_0x33fec9=_0x33fec9-0x11f;const _0x4a1341=a165_0x4a13();let _0x59cb5c=_0x4a1341[_0x33fec9];return _0x59cb5c;}export function validateYamlFile(_0x31a627,_0xcd4e40,_0x3a234c={}){const _0x410645=a165_0x45c96b,_0x106f80=a165_0x37ebae['relative'](_0xcd4e40,_0x31a627)||a165_0x37ebae['basename'](_0x31a627);try{const _0x503d73=readFileSync(_0x31a627,_0x410645(0x131)),_0x1407db=a165_0x4e2a7a[_0x410645(0x121)](_0x503d73),_0x59082a=_0x1407db[_0x410645(0x122)]();if(!_0x59082a)return createParseErrorResult(_0x31a627,_0x106f80,_0x503d73,_0x410645(0x139));let _0x28ee91;if(isJourneyDef(_0x59082a))_0x28ee91='journey';else{if(isCampaignDef(_0x59082a))_0x28ee91=_0x410645(0x12b);else isTemplateDef(_0x59082a)?_0x28ee91=_0x410645(0x126):_0x28ee91=_0x410645(0x11f);}if(_0x3a234c[_0x410645(0x135)]&&_0x28ee91!==_0x3a234c[_0x410645(0x135)])return{'filePath':_0x31a627,'relativePath':_0x106f80,'skipped':!![],'reason':_0x410645(0x133)+_0x3a234c[_0x410645(0x135)]};const _0x1fb6ca={'source':_0x503d73,'document':_0x1407db};let _0x2741c4;if(_0x28ee91===_0x410645(0x128))_0x2741c4=validateJourneyDef(_0x59082a,_0x1fb6ca);else{if(_0x28ee91===_0x410645(0x12b))_0x2741c4=validateCampaignDef(_0x59082a,_0x1fb6ca);else _0x28ee91===_0x410645(0x126)?_0x2741c4=validateTemplateDef(_0x59082a,_0x1fb6ca):_0x2741c4=validateSegmentDef(_0x59082a,_0x1fb6ca);}return{'filePath':_0x31a627,'relativePath':_0x106f80,'source':_0x503d73,'result':_0x2741c4,'fileType':_0x28ee91};}catch(_0x371662){const _0x48c8f4=_0x371662 instanceof Error?_0x371662[_0x410645(0x132)]:String(_0x371662);return createParseErrorResult(_0x31a627,_0x106f80,'',_0x410645(0x13c)+_0x48c8f4);}}export function validateYamlFiles(_0x20b4c1,_0x54b039,_0x1d8b4f={}){return _0x20b4c1['map'](_0x590bb9=>validateYamlFile(_0x590bb9,_0x54b039,_0x1d8b4f));}export function calculateSummary(_0x3d05d0){const _0x2954b6=a165_0x45c96b;let _0x782d6f=0x0,_0x4ea793=0x0,_0x26fac1=0x0,_0x42de99=0x0;for(const _0x38ca1e of _0x3d05d0){if(!isValidationResult(_0x38ca1e)){_0x42de99++;continue;}_0x38ca1e[_0x2954b6(0x125)][_0x2954b6(0x136)]?_0x782d6f++:_0x4ea793++,_0x26fac1+=_0x38ca1e[_0x2954b6(0x125)][_0x2954b6(0x12c)][_0x2954b6(0x12a)];}return{'validCount':_0x782d6f,'invalidCount':_0x4ea793,'warningCount':_0x26fac1,'skippedCount':_0x42de99,'hasErrors':_0x4ea793>0x0};}
1
+ const a165_0x4e4d4c=a165_0x4ecf;(function(_0x5d5163,_0x40cda6){const _0x440f5e=a165_0x4ecf,_0x395275=_0x5d5163();while(!![]){try{const _0x3c5db9=parseInt(_0x440f5e(0x150))/0x1*(-parseInt(_0x440f5e(0x15a))/0x2)+parseInt(_0x440f5e(0x14f))/0x3+-parseInt(_0x440f5e(0x14d))/0x4*(-parseInt(_0x440f5e(0x151))/0x5)+parseInt(_0x440f5e(0x154))/0x6+-parseInt(_0x440f5e(0x14a))/0x7*(-parseInt(_0x440f5e(0x149))/0x8)+-parseInt(_0x440f5e(0x160))/0x9*(parseInt(_0x440f5e(0x161))/0xa)+-parseInt(_0x440f5e(0x144))/0xb;if(_0x3c5db9===_0x40cda6)break;else _0x395275['push'](_0x395275['shift']());}catch(_0x1998ce){_0x395275['push'](_0x395275['shift']());}}}(a165_0x2ecb,0xa10be));import{readFileSync}from'fs';import*as a165_0x2e1af3 from'path';import*as a165_0x2db897 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_0x4e4d4c(0x157),'push']);function a165_0x2ecb(){const _0x757307=['8NCzBqo','7350903CPuHlG','template','campaign_type','71112SWZtHD','toJSON','392910vqKemo','2eQXuIv','310BXtbVR','object','journey','1682010MrrNJy','length','message','email','segment','type','254596HoABcG','error','result','not\x20a\x20','parseDocument','relative','45vTEJDH','1336540amdzOq','YAML\x20parse\x20error:\x20','YAML_PARSE_ERROR','has','valid','basename','10792738vSUVDr','map','utf-8','campaign','filterType'];a165_0x2ecb=function(){return _0x757307;};return a165_0x2ecb();}export function isJourneyDef(_0x4b7731){const _0x30deb2=a165_0x4e4d4c;return typeof _0x4b7731==='object'&&_0x4b7731!==null&&_0x30deb2(0x159)in _0x4b7731&&_0x4b7731['type']==='journey';}export function isCampaignDef(_0x3628cc){const _0x45ff25=a165_0x4e4d4c;if(typeof _0x3628cc!=='object'||_0x3628cc===null)return![];const _0x2060b5=_0x3628cc,_0x5923b7=VALID_CAMPAIGN_TYPES[_0x45ff25(0x141)](_0x2060b5[_0x45ff25(0x14c)]);if(_0x2060b5[_0x45ff25(0x159)]==='campaign'&&_0x5923b7)return!![];if(_0x5923b7&&!_0x2060b5['type'])return!![];return![];}export function isTemplateDef(_0x5740ac){const _0x528988=a165_0x4e4d4c;return typeof _0x5740ac===_0x528988(0x152)&&_0x5740ac!==null&&_0x528988(0x159)in _0x5740ac&&_0x5740ac[_0x528988(0x159)]==='template';}export function isValidationResult(_0x27960f){return!('skipped'in _0x27960f);}export function createParseErrorResult(_0x1edd2c,_0x250245,_0x4a8965,_0xfef0c8,_0x59c572='segment'){const _0x3d7006=a165_0x4e4d4c;return{'filePath':_0x1edd2c,'relativePath':_0x250245,'source':_0x4a8965,'result':{'valid':![],'errors':[{'level':_0x3d7006(0x15b),'path':'','code':_0x3d7006(0x163),'message':_0xfef0c8}],'warnings':[]},'fileType':_0x59c572};}function a165_0x4ecf(_0xbe4328,_0x15e508){_0xbe4328=_0xbe4328-0x141;const _0x2ecb69=a165_0x2ecb();let _0x4ecfd1=_0x2ecb69[_0xbe4328];return _0x4ecfd1;}export function validateYamlFile(_0x266a44,_0x7d3715,_0x56d250={}){const _0x5cdafe=a165_0x4e4d4c,_0x9ae6ed=a165_0x2e1af3[_0x5cdafe(0x15f)](_0x7d3715,_0x266a44)||a165_0x2e1af3[_0x5cdafe(0x143)](_0x266a44);try{const _0x216fe1=readFileSync(_0x266a44,_0x5cdafe(0x146)),_0x4a783c=a165_0x2db897[_0x5cdafe(0x15e)](_0x216fe1),_0x5f4d60=_0x4a783c[_0x5cdafe(0x14e)]();if(!_0x5f4d60)return createParseErrorResult(_0x266a44,_0x9ae6ed,_0x216fe1,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');let _0xeae697;if(isJourneyDef(_0x5f4d60))_0xeae697=_0x5cdafe(0x153);else{if(isCampaignDef(_0x5f4d60))_0xeae697='campaign';else isTemplateDef(_0x5f4d60)?_0xeae697=_0x5cdafe(0x14b):_0xeae697=_0x5cdafe(0x158);}if(_0x56d250['filterType']&&_0xeae697!==_0x56d250[_0x5cdafe(0x148)])return{'filePath':_0x266a44,'relativePath':_0x9ae6ed,'skipped':!![],'reason':_0x5cdafe(0x15d)+_0x56d250[_0x5cdafe(0x148)]};const _0x104489={'source':_0x216fe1,'document':_0x4a783c};let _0x38029f;if(_0xeae697===_0x5cdafe(0x153))_0x38029f=validateJourneyDef(_0x5f4d60,_0x104489);else{if(_0xeae697===_0x5cdafe(0x147))_0x38029f=validateCampaignDef(_0x5f4d60,_0x104489);else _0xeae697===_0x5cdafe(0x14b)?_0x38029f=validateTemplateDef(_0x5f4d60,_0x104489):_0x38029f=validateSegmentDef(_0x5f4d60,_0x104489);}return{'filePath':_0x266a44,'relativePath':_0x9ae6ed,'source':_0x216fe1,'result':_0x38029f,'fileType':_0xeae697};}catch(_0x3ca9b7){const _0x1638f6=_0x3ca9b7 instanceof Error?_0x3ca9b7[_0x5cdafe(0x156)]:String(_0x3ca9b7);return createParseErrorResult(_0x266a44,_0x9ae6ed,'',_0x5cdafe(0x162)+_0x1638f6);}}export function validateYamlFiles(_0x5eb827,_0x2b116f,_0x142df0={}){const _0x3987af=a165_0x4e4d4c;return _0x5eb827[_0x3987af(0x145)](_0xeaf8c1=>validateYamlFile(_0xeaf8c1,_0x2b116f,_0x142df0));}export function calculateSummary(_0x1b8620){const _0x456c81=a165_0x4e4d4c;let _0x937f21=0x0,_0x3f1788=0x0,_0xe88a7e=0x0,_0x6f5db4=0x0;for(const _0x633ef of _0x1b8620){if(!isValidationResult(_0x633ef)){_0x6f5db4++;continue;}_0x633ef[_0x456c81(0x15c)][_0x456c81(0x142)]?_0x937f21++:_0x3f1788++,_0xe88a7e+=_0x633ef[_0x456c81(0x15c)]['warnings'][_0x456c81(0x155)];}return{'validCount':_0x937f21,'invalidCount':_0x3f1788,'warningCount':_0xe88a7e,'skippedCount':_0x6f5db4,'hasErrors':_0x3f1788>0x0};}
@@ -1 +1 @@
1
- (function(_0x3a4d6e,_0x1f9994){const _0x17017e=a166_0x3390,_0x4a9a3f=_0x3a4d6e();while(!![]){try{const _0xd4e78c=-parseInt(_0x17017e(0x20f))/0x1*(parseInt(_0x17017e(0x214))/0x2)+-parseInt(_0x17017e(0x1f7))/0x3*(parseInt(_0x17017e(0x1f3))/0x4)+parseInt(_0x17017e(0x1ea))/0x5+-parseInt(_0x17017e(0x206))/0x6*(-parseInt(_0x17017e(0x1e8))/0x7)+-parseInt(_0x17017e(0x1ec))/0x8*(parseInt(_0x17017e(0x20c))/0x9)+-parseInt(_0x17017e(0x1ff))/0xa*(-parseInt(_0x17017e(0x207))/0xb)+parseInt(_0x17017e(0x216))/0xc;if(_0xd4e78c===_0x1f9994)break;else _0x4a9a3f['push'](_0x4a9a3f['shift']());}catch(_0x5405d9){_0x4a9a3f['push'](_0x4a9a3f['shift']());}}}(a166_0x1cc9,0x963c7));import*as a166_0x35a4f3 from'yaml';import a166_0x464529 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x88d8b6,_0x58f9a7,_0x47a397){const _0x3d5a21=a166_0x3390;if(!_0x88d8b6||!_0x58f9a7)return undefined;try{let _0x129f83=_0x88d8b6[_0x3d5a21(0x213)](_0x47a397,!![]),_0x13b1ef=[..._0x47a397];while((!_0x129f83||typeof _0x129f83!==_0x3d5a21(0x1f2)||!(_0x3d5a21(0x1fb)in _0x129f83)||!_0x129f83[_0x3d5a21(0x1fb)])&&_0x13b1ef[_0x3d5a21(0x1f1)]>0x0){_0x13b1ef[_0x3d5a21(0x1f9)](),_0x129f83=_0x13b1ef[_0x3d5a21(0x1f1)]>0x0?_0x88d8b6['getIn'](_0x13b1ef,!![]):_0x88d8b6[_0x3d5a21(0x209)];}if(!_0x129f83||typeof _0x129f83!=='object'||!('range'in _0x129f83)||!_0x129f83[_0x3d5a21(0x1fb)])return undefined;const [_0x1e80b1]=_0x129f83[_0x3d5a21(0x1fb)];return offsetToLocation(_0x58f9a7,_0x1e80b1);}catch{return undefined;}}export function offsetToLocation(_0x1503da,_0x2964f2){const _0x17c68c=a166_0x3390;let _0x375f6b=0x1,_0x5ba334=0x1;for(let _0x16a77c=0x0;_0x16a77c<_0x2964f2&&_0x16a77c<_0x1503da[_0x17c68c(0x1f1)];_0x16a77c++){_0x1503da[_0x16a77c]==='\x0a'?(_0x375f6b++,_0x5ba334=0x1):_0x5ba334++;}return{'line':_0x375f6b,'column':_0x5ba334,'offset':_0x2964f2};}export function pathToArray(_0x16947b){if(!_0x16947b)return[];return _0x16947b['split']('.')['flatMap'](_0x4dc5e7=>{const _0x4b53e6=a166_0x3390,_0x3b6b88=_0x4dc5e7[_0x4b53e6(0x215)](/^(\w+)\[(\d+)\]$/);if(_0x3b6b88)return[_0x3b6b88[0x1],parseInt(_0x3b6b88[0x2],0xa)];return[_0x4dc5e7];});}export function formatZodPath(_0x289f10){const _0x4a9dc0=a166_0x3390;let _0x2f2dbb='';for(const _0x1698bb of _0x289f10){if(typeof _0x1698bb===_0x4a9dc0(0x1ef))_0x2f2dbb+='['+_0x1698bb+']';else{const _0x58e254=String(_0x1698bb);_0x2f2dbb+=_0x2f2dbb?'.'+_0x58e254:_0x58e254;}}return _0x2f2dbb;}function a166_0x1cc9(){const _0x3a3ff9=['6120tEFTRE','column','toString','number','yellow','length','object','3269788qSECKV','message','warnings','location','3cPEdgL','Invalid\x20YAML:\x20expected\x20an\x20object','pop','level','range','push','red','data','2288470DVscyb','errors','max','min','split','safeParse','path','6tRlzPi','44fzBmcF','dim','contents','map','padStart','12483oyYkhs','success','\x27:\x20','7949wuYeeK','issues','code','error','getIn','206UfDpKq','match','12138588BiYeDJ','1502277EiXAqU','cyan','5855340SaytQA','line'];a166_0x1cc9=function(){return _0x3a3ff9;};return a166_0x1cc9();}export function flattenZodIssues(_0x17964c){const _0x3f9caf=a166_0x3390,_0x4f7a71=[];for(const _0x4add3c of _0x17964c){if(_0x4add3c[_0x3f9caf(0x211)]==='invalid_union'&&_0x3f9caf(0x200)in _0x4add3c){const _0x14f918=_0x4add3c[_0x3f9caf(0x200)];let _0x3efd59=_0x14f918[0x0]||[];for(const _0x2e90b1 of _0x14f918){_0x2e90b1['length']<_0x3efd59['length']&&(_0x3efd59=_0x2e90b1);}const _0x4dff10=_0x3efd59[_0x3f9caf(0x20a)](_0x28adc6=>({..._0x28adc6,'path':[..._0x4add3c['path'],..._0x28adc6[_0x3f9caf(0x205)]]}));_0x4f7a71[_0x3f9caf(0x1fc)](...flattenZodIssues(_0x4dff10));}else _0x4f7a71[_0x3f9caf(0x1fc)](_0x4add3c);}return _0x4f7a71;}export function safeParseYaml(_0x58abf0,_0x548065){const _0x344642=a166_0x3390,_0x4ba20d=a166_0x35a4f3['parse'](_0x58abf0);if(!_0x4ba20d||typeof _0x4ba20d!==_0x344642(0x1f2))throw new Error(_0x344642(0x1f8));const _0x35b309=_0x548065[_0x344642(0x204)](_0x4ba20d);if(!_0x35b309[_0x344642(0x20d)]){const _0x641788=_0x35b309['error'][_0x344642(0x210)][0x0],_0x2a5a8c=formatZodPath(_0x641788['path']);throw new Error(_0x2a5a8c?'YAML\x20validation\x20error\x20at\x20\x27'+_0x2a5a8c+_0x344642(0x20e)+_0x641788[_0x344642(0x1f4)]:'YAML\x20validation\x20error:\x20'+_0x641788[_0x344642(0x1f4)]);}return _0x35b309[_0x344642(0x1fe)];}export function formatIssueWithContext(_0x54fcbc,_0x2f5048,_0x45063b){const _0x4d8d56=a166_0x3390,_0x4962b8=[],_0x4705e4=_0x54fcbc[_0x4d8d56(0x1fa)]===_0x4d8d56(0x212),_0x5b42bb=_0x4705e4?a166_0x464529[_0x4d8d56(0x1fd)]:a166_0x464529[_0x4d8d56(0x1f0)],_0x29e5cb=_0x4705e4?a166_0x464529[_0x4d8d56(0x1fd)]:a166_0x464529[_0x4d8d56(0x1f0)],_0x3da1db=_0x45063b?a166_0x464529[_0x4d8d56(0x1e9)](_0x45063b+':'):'';if(_0x54fcbc[_0x4d8d56(0x1f6)]){const _0x419761=a166_0x464529[_0x4d8d56(0x1e9)](_0x54fcbc[_0x4d8d56(0x1f6)][_0x4d8d56(0x1eb)]+':'+_0x54fcbc[_0x4d8d56(0x1f6)][_0x4d8d56(0x1ed)]);_0x4962b8[_0x4d8d56(0x1fc)](''+_0x3da1db+_0x419761+':\x20'+_0x5b42bb(_0x54fcbc[_0x4d8d56(0x1fa)])+'\x20'+_0x29e5cb('['+_0x54fcbc[_0x4d8d56(0x211)]+']'));}else _0x4962b8['push'](''+_0x3da1db+a166_0x464529[_0x4d8d56(0x208)](_0x54fcbc[_0x4d8d56(0x205)])+':\x20'+_0x5b42bb(_0x54fcbc[_0x4d8d56(0x1fa)])+'\x20'+_0x29e5cb('['+_0x54fcbc[_0x4d8d56(0x211)]+']'));_0x4962b8[_0x4d8d56(0x1fc)](_0x54fcbc[_0x4d8d56(0x1f4)]);if(_0x54fcbc[_0x4d8d56(0x1f6)]&&_0x2f5048){const _0x419153=_0x2f5048[_0x4d8d56(0x203)]('\x0a'),{line:_0x5f1bc1,column:_0x4dccb4}=_0x54fcbc[_0x4d8d56(0x1f6)],_0x367577=Math[_0x4d8d56(0x201)](0x1,_0x5f1bc1-0x1),_0x5dc278=Math[_0x4d8d56(0x202)](_0x419153[_0x4d8d56(0x1f1)],_0x5f1bc1+0x1);_0x4962b8[_0x4d8d56(0x1fc)]('');for(let _0x1fdc78=_0x367577;_0x1fdc78<=_0x5dc278;_0x1fdc78++){const _0x57ecad=_0x419153[_0x1fdc78-0x1]||'',_0x498f82=a166_0x464529[_0x4d8d56(0x208)](_0x1fdc78[_0x4d8d56(0x1ee)]()[_0x4d8d56(0x20b)](0x4)),_0x2119e3=a166_0x464529[_0x4d8d56(0x208)]('\x20|\x20');if(_0x1fdc78===_0x5f1bc1){_0x4962b8[_0x4d8d56(0x1fc)]('\x20\x20'+_0x498f82+_0x2119e3+_0x5b42bb(_0x57ecad));const _0xcda3b9='\x20'['repeat'](0x4+0x3+_0x4dccb4-0x1);_0x4962b8[_0x4d8d56(0x1fc)]('\x20\x20'+_0xcda3b9+_0x5b42bb('^'));}else _0x4962b8[_0x4d8d56(0x1fc)]('\x20\x20'+_0x498f82+_0x2119e3+a166_0x464529[_0x4d8d56(0x208)](_0x57ecad));}}return _0x4962b8['join']('\x0a');}function a166_0x3390(_0x5ee38a,_0x50cbf1){_0x5ee38a=_0x5ee38a-0x1e8;const _0x1cc97e=a166_0x1cc9();let _0x3390e0=_0x1cc97e[_0x5ee38a];return _0x3390e0;}export function formatValidationResult(_0x2849e9,_0x173bab,_0xf7ed82){const _0x2ee1f3=a166_0x3390,_0x1fa060=[];for(const _0x10c8fb of _0x2849e9[_0x2ee1f3(0x200)]){_0x1fa060[_0x2ee1f3(0x1fc)](formatIssueWithContext(_0x10c8fb,_0x173bab,_0xf7ed82)),_0x1fa060[_0x2ee1f3(0x1fc)]('');}for(const _0x9fcc97 of _0x2849e9[_0x2ee1f3(0x1f5)]){_0x1fa060['push'](formatIssueWithContext(_0x9fcc97,_0x173bab,_0xf7ed82)),_0x1fa060[_0x2ee1f3(0x1fc)]('');}return _0x1fa060['join']('\x0a');}
1
+ (function(_0x3c1f3d,_0x38f2db){const _0xc07a22=a166_0x47c1,_0x255cab=_0x3c1f3d();while(!![]){try{const _0x20f779=parseInt(_0xc07a22(0xc7))/0x1+parseInt(_0xc07a22(0xe6))/0x2*(parseInt(_0xc07a22(0xd1))/0x3)+-parseInt(_0xc07a22(0xc9))/0x4*(-parseInt(_0xc07a22(0xcb))/0x5)+parseInt(_0xc07a22(0xcd))/0x6+-parseInt(_0xc07a22(0xf0))/0x7*(parseInt(_0xc07a22(0xdf))/0x8)+parseInt(_0xc07a22(0xd0))/0x9*(parseInt(_0xc07a22(0xd3))/0xa)+-parseInt(_0xc07a22(0xe8))/0xb;if(_0x20f779===_0x38f2db)break;else _0x255cab['push'](_0x255cab['shift']());}catch(_0x45d1c4){_0x255cab['push'](_0x255cab['shift']());}}}(a166_0x2133,0x5a442));import*as a166_0x2dce5f from'yaml';import a166_0x136c87 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';function a166_0x2133(){const _0x20073a=['message','issues','code','length','4006415YvBkEV','min','red','number','error','match','34279dgbiHJ','safeParse','92LQAanj','Invalid\x20YAML:\x20expected\x20an\x20object','40105cHMVZf','path','3751794IqpxJd','errors','pop','55197nWDYSA','14478XDLmtR','toString','500HdUMJK','dim','YAML\x20validation\x20error:\x20','map','data','success','cyan','repeat','getIn','max','column','range','8BrMIPk','object','level','flatMap','contents','join','push','160mNfUyl','invalid_union','6541876vOtVaM','split','location','\x20|\x20'];a166_0x2133=function(){return _0x20073a;};return a166_0x2133();}export function getLocationFromPath(_0x546a13,_0x4b97ce,_0x481cf9){const _0x280296=a166_0x47c1;if(!_0x546a13||!_0x4b97ce)return undefined;try{let _0x34199c=_0x546a13[_0x280296(0xdb)](_0x481cf9,!![]),_0x48cb81=[..._0x481cf9];while((!_0x34199c||typeof _0x34199c!==_0x280296(0xe0)||!(_0x280296(0xde)in _0x34199c)||!_0x34199c[_0x280296(0xde)])&&_0x48cb81[_0x280296(0xef)]>0x0){_0x48cb81[_0x280296(0xcf)](),_0x34199c=_0x48cb81[_0x280296(0xef)]>0x0?_0x546a13['getIn'](_0x48cb81,!![]):_0x546a13[_0x280296(0xe3)];}if(!_0x34199c||typeof _0x34199c!==_0x280296(0xe0)||!('range'in _0x34199c)||!_0x34199c[_0x280296(0xde)])return undefined;const [_0x12a391]=_0x34199c[_0x280296(0xde)];return offsetToLocation(_0x4b97ce,_0x12a391);}catch{return undefined;}}function a166_0x47c1(_0x441cc,_0x1571d5){_0x441cc=_0x441cc-0xc6;const _0x21337b=a166_0x2133();let _0x47c106=_0x21337b[_0x441cc];return _0x47c106;}export function offsetToLocation(_0x2d810c,_0x56a56a){const _0x4a08da=a166_0x47c1;let _0x5f3c47=0x1,_0x5dade7=0x1;for(let _0x4864c2=0x0;_0x4864c2<_0x56a56a&&_0x4864c2<_0x2d810c[_0x4a08da(0xef)];_0x4864c2++){_0x2d810c[_0x4864c2]==='\x0a'?(_0x5f3c47++,_0x5dade7=0x1):_0x5dade7++;}return{'line':_0x5f3c47,'column':_0x5dade7,'offset':_0x56a56a};}export function pathToArray(_0x670a5c){const _0x26cf7d=a166_0x47c1;if(!_0x670a5c)return[];return _0x670a5c[_0x26cf7d(0xe9)]('.')[_0x26cf7d(0xe2)](_0x534a66=>{const _0x127a77=_0x26cf7d,_0x48e8f1=_0x534a66[_0x127a77(0xc6)](/^(\w+)\[(\d+)\]$/);if(_0x48e8f1)return[_0x48e8f1[0x1],parseInt(_0x48e8f1[0x2],0xa)];return[_0x534a66];});}export function formatZodPath(_0x4b7add){const _0x34e3cc=a166_0x47c1;let _0x5c6d12='';for(const _0x208094 of _0x4b7add){if(typeof _0x208094===_0x34e3cc(0xf3))_0x5c6d12+='['+_0x208094+']';else{const _0xd33311=String(_0x208094);_0x5c6d12+=_0x5c6d12?'.'+_0xd33311:_0xd33311;}}return _0x5c6d12;}export function flattenZodIssues(_0x108d7b){const _0xc3fdf4=a166_0x47c1,_0x59bb7b=[];for(const _0x1e7f14 of _0x108d7b){if(_0x1e7f14['code']===_0xc3fdf4(0xe7)&&'errors'in _0x1e7f14){const _0x523f8d=_0x1e7f14['errors'];let _0x3a2760=_0x523f8d[0x0]||[];for(const _0x52b8a2 of _0x523f8d){_0x52b8a2[_0xc3fdf4(0xef)]<_0x3a2760['length']&&(_0x3a2760=_0x52b8a2);}const _0x4e16f3=_0x3a2760[_0xc3fdf4(0xd6)](_0x2bcaee=>({..._0x2bcaee,'path':[..._0x1e7f14[_0xc3fdf4(0xcc)],..._0x2bcaee['path']]}));_0x59bb7b[_0xc3fdf4(0xe5)](...flattenZodIssues(_0x4e16f3));}else _0x59bb7b[_0xc3fdf4(0xe5)](_0x1e7f14);}return _0x59bb7b;}export function safeParseYaml(_0x3a48fc,_0x2ec66d){const _0x1a5027=a166_0x47c1,_0x1caaa7=a166_0x2dce5f['parse'](_0x3a48fc);if(!_0x1caaa7||typeof _0x1caaa7!==_0x1a5027(0xe0))throw new Error(_0x1a5027(0xca));const _0x3225be=_0x2ec66d[_0x1a5027(0xc8)](_0x1caaa7);if(!_0x3225be[_0x1a5027(0xd8)]){const _0x2d1f97=_0x3225be[_0x1a5027(0xf4)][_0x1a5027(0xed)][0x0],_0x2bc6f5=formatZodPath(_0x2d1f97[_0x1a5027(0xcc)]);throw new Error(_0x2bc6f5?'YAML\x20validation\x20error\x20at\x20\x27'+_0x2bc6f5+'\x27:\x20'+_0x2d1f97[_0x1a5027(0xec)]:_0x1a5027(0xd5)+_0x2d1f97[_0x1a5027(0xec)]);}return _0x3225be[_0x1a5027(0xd7)];}export function formatIssueWithContext(_0x2c8915,_0x5cb7d3,_0x177303){const _0x2c1fa0=a166_0x47c1,_0x38a94c=[],_0x487433=_0x2c8915[_0x2c1fa0(0xe1)]===_0x2c1fa0(0xf4),_0x4fb76a=_0x487433?a166_0x136c87[_0x2c1fa0(0xf2)]:a166_0x136c87['yellow'],_0x12dbbc=_0x487433?a166_0x136c87[_0x2c1fa0(0xf2)]:a166_0x136c87['yellow'],_0x2e1213=_0x177303?a166_0x136c87[_0x2c1fa0(0xd9)](_0x177303+':'):'';if(_0x2c8915[_0x2c1fa0(0xea)]){const _0x4d7a30=a166_0x136c87[_0x2c1fa0(0xd9)](_0x2c8915[_0x2c1fa0(0xea)]['line']+':'+_0x2c8915[_0x2c1fa0(0xea)][_0x2c1fa0(0xdd)]);_0x38a94c[_0x2c1fa0(0xe5)](''+_0x2e1213+_0x4d7a30+':\x20'+_0x4fb76a(_0x2c8915[_0x2c1fa0(0xe1)])+'\x20'+_0x12dbbc('['+_0x2c8915['code']+']'));}else _0x38a94c[_0x2c1fa0(0xe5)](''+_0x2e1213+a166_0x136c87[_0x2c1fa0(0xd4)](_0x2c8915[_0x2c1fa0(0xcc)])+':\x20'+_0x4fb76a(_0x2c8915[_0x2c1fa0(0xe1)])+'\x20'+_0x12dbbc('['+_0x2c8915[_0x2c1fa0(0xee)]+']'));_0x38a94c[_0x2c1fa0(0xe5)](_0x2c8915[_0x2c1fa0(0xec)]);if(_0x2c8915[_0x2c1fa0(0xea)]&&_0x5cb7d3){const _0x3d2920=_0x5cb7d3['split']('\x0a'),{line:_0x22ce0c,column:_0x57d2a1}=_0x2c8915[_0x2c1fa0(0xea)],_0xea5663=Math[_0x2c1fa0(0xdc)](0x1,_0x22ce0c-0x1),_0x169114=Math[_0x2c1fa0(0xf1)](_0x3d2920[_0x2c1fa0(0xef)],_0x22ce0c+0x1);_0x38a94c[_0x2c1fa0(0xe5)]('');for(let _0x53e3b5=_0xea5663;_0x53e3b5<=_0x169114;_0x53e3b5++){const _0x318579=_0x3d2920[_0x53e3b5-0x1]||'',_0x39dfa7=a166_0x136c87[_0x2c1fa0(0xd4)](_0x53e3b5[_0x2c1fa0(0xd2)]()['padStart'](0x4)),_0x202920=a166_0x136c87[_0x2c1fa0(0xd4)](_0x2c1fa0(0xeb));if(_0x53e3b5===_0x22ce0c){_0x38a94c[_0x2c1fa0(0xe5)]('\x20\x20'+_0x39dfa7+_0x202920+_0x4fb76a(_0x318579));const _0x2aa194='\x20'[_0x2c1fa0(0xda)](0x4+0x3+_0x57d2a1-0x1);_0x38a94c['push']('\x20\x20'+_0x2aa194+_0x4fb76a('^'));}else _0x38a94c[_0x2c1fa0(0xe5)]('\x20\x20'+_0x39dfa7+_0x202920+a166_0x136c87[_0x2c1fa0(0xd4)](_0x318579));}}return _0x38a94c[_0x2c1fa0(0xe4)]('\x0a');}export function formatValidationResult(_0x3873a2,_0x1ba4a2,_0x2d7c80){const _0x4e0410=a166_0x47c1,_0x895f8c=[];for(const _0x516835 of _0x3873a2[_0x4e0410(0xce)]){_0x895f8c[_0x4e0410(0xe5)](formatIssueWithContext(_0x516835,_0x1ba4a2,_0x2d7c80)),_0x895f8c[_0x4e0410(0xe5)]('');}for(const _0x286665 of _0x3873a2['warnings']){_0x895f8c[_0x4e0410(0xe5)](formatIssueWithContext(_0x286665,_0x1ba4a2,_0x2d7c80)),_0x895f8c[_0x4e0410(0xe5)]('');}return _0x895f8c[_0x4e0410(0xe4)]('\x0a');}