@treasuredata/tdx 2026.4.16 → 2026.4.17

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 (220) 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/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +1 -1
@@ -1 +1 @@
1
- function a157_0x5c7c(_0x824dfb,_0x24afef){_0x824dfb=_0x824dfb-0xaf;const _0x470c3e=a157_0x470c();let _0x5c7cef=_0x470c3e[_0x824dfb];return _0x5c7cef;}(function(_0x22c9aa,_0x241920){const _0x32eca0=a157_0x5c7c,_0x5922cc=_0x22c9aa();while(!![]){try{const _0x419c5e=-parseInt(_0x32eca0(0xcb))/0x1+parseInt(_0x32eca0(0xb1))/0x2*(parseInt(_0x32eca0(0xd4))/0x3)+-parseInt(_0x32eca0(0xce))/0x4*(-parseInt(_0x32eca0(0xc4))/0x5)+parseInt(_0x32eca0(0xda))/0x6*(-parseInt(_0x32eca0(0xd2))/0x7)+-parseInt(_0x32eca0(0xd0))/0x8+parseInt(_0x32eca0(0xb2))/0x9+parseInt(_0x32eca0(0xd7))/0xa;if(_0x419c5e===_0x241920)break;else _0x5922cc['push'](_0x5922cc['shift']());}catch(_0x326d21){_0x5922cc['push'](_0x5922cc['shift']());}}}(a157_0x470c,0xa0811));import a157_0x410905 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x1e0783){const _0x26fc2b=a157_0x5c7c;return _0x1e0783[_0x26fc2b(0xc9)]!==_0x26fc2b(0xb8);}export function isScopedResolution(_0xf85bdf){const _0x551709=a157_0x5c7c;return _0xf85bdf[_0x551709(0xc9)]===_0x551709(0xe2)||_0xf85bdf[_0x551709(0xc9)]===_0x551709(0xc1)||_0xf85bdf[_0x551709(0xc9)]===_0x551709(0xc5);}function a157_0x470c(){const _0x1f10ff=['file','resourceType','Not\x20a\x20YAML\x20file:\x20','6304425dkYlCL','context','invalid_yaml','journey','resolve','type','scopedFolderPath','647066mBvzjy','Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27','message','4ZMLLqV','No\x20tdx.json\x20found','5061120RDlBgl','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','7385343fqCwnN','exists','249hnkCFw','readFile','isScoped','5509320nyavnl','dirname','File\x20not\x20found','6UKUoYl','join','basename','parent_name','parentSegment','isDirectory','startsWith','Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure','directory','File\x20not\x20found:\x20','isFile','trim','folderPath','configDir','3686IlPzNc','9246546FLYTeb','replace','root','relative','no_config','Parent\x20segment\x20not\x20specified','error','match','segmentName','parent_segment','No\x20tdx.json\x20found\x20for\x20file:\x20','includes','cwd','segment','parse'];a157_0x470c=function(){return _0x1f10ff;};return a157_0x470c();}export function getScopedDetails(_0x4f7697){const _0x496ce8=a157_0x5c7c;if(isScopedResolution(_0x4f7697))return{'isScoped':_0x4f7697[_0x496ce8(0xd6)],'scopedFolderPath':_0x4f7697[_0x496ce8(0xca)]};return undefined;}async function findTdxConfigAsync(_0x56a3b7,_0x2a27b5){const _0x866136=a157_0x5c7c;let _0x2595ea=a157_0x410905[_0x866136(0xc8)](_0x56a3b7);const _0x27bc0a=a157_0x410905[_0x866136(0xc0)](_0x2595ea)[_0x866136(0xb4)];while(_0x2595ea!==_0x27bc0a){const _0x442481=a157_0x410905[_0x866136(0xdb)](_0x2595ea,'tdx.json');if(await _0x2a27b5[_0x866136(0xd3)](_0x442481))try{const _0x4fb120=await _0x2a27b5[_0x866136(0xd5)](_0x442481),_0x5d52c3=JSON['parse'](_0x4fb120);if(_0x5d52c3[_0x866136(0xbb)]&&typeof _0x5d52c3[_0x866136(0xbb)]==='string')return{'configPath':_0x442481,'configDir':_0x2595ea,'parentSegment':_0x5d52c3[_0x866136(0xbb)]};}catch{}_0x2595ea=a157_0x410905[_0x866136(0xd8)](_0x2595ea);}return null;}function calculateScopedPath(_0x1ca0bc,_0x22e88e){const _0x8ddb56=a157_0x5c7c,_0x7be746=a157_0x410905[_0x8ddb56(0xb5)](_0x22e88e,_0x1ca0bc),_0x5bd076=_0x7be746!==''&&_0x7be746!=='.'&&!_0x7be746[_0x8ddb56(0xe0)]('..');return{'isScoped':_0x5bd076,'scopedFolderPath':_0x5bd076?_0x7be746[_0x8ddb56(0xb3)](/\\/g,'/'):''};}export async function resolveTarget(_0x3931dd){const _0x1f747c=a157_0x5c7c,{arg:_0x468681,contextParent:_0x155ed6,cwd:cwd=process[_0x1f747c(0xbe)](),fs:fs=nodeFileSystem}=_0x3931dd;if(_0x468681&&isYamlFilePath(_0x468681))try{const _0x135d41=await resolveYamlFilePath(_0x468681,fs),_0x26753f=a157_0x410905[_0x1f747c(0xc8)](_0x468681),_0x4b17a9=a157_0x410905[_0x1f747c(0xd8)](_0x26753f),_0x487475=await findTdxConfigAsync(_0x4b17a9,fs);if(!_0x487475){if(_0x155ed6){const _0x393926=a157_0x410905[_0x1f747c(0xd8)](_0x26753f);return{'type':_0x1f747c(0xc1),'parentName':_0x155ed6,'targetDir':_0x393926,'configRoot':_0x393926,'filePath':_0x26753f,'resourceName':_0x135d41[_0x1f747c(0xba)],'folderPath':_0x135d41['folderPath'],'resourceType':_0x135d41['resourceType'],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1f747c(0xb8),'errorCode':_0x1f747c(0xb6),'message':_0x1f747c(0xbc)+_0x468681,'arg':_0x468681,'helpText':_0x1f747c(0xcc)};}const _0x439fa3=calculateScopedPath(_0x4b17a9,_0x487475[_0x1f747c(0xb0)]);return{'type':_0x1f747c(0xc1),'parentName':_0x487475[_0x1f747c(0xde)],'targetDir':_0x487475['configDir'],'configRoot':_0x487475[_0x1f747c(0xb0)],'filePath':_0x26753f,'resourceName':_0x135d41['segmentName'],'folderPath':_0x135d41[_0x1f747c(0xaf)],'resourceType':_0x135d41[_0x1f747c(0xc2)],'isScoped':_0x439fa3[_0x1f747c(0xd6)],'scopedFolderPath':_0x439fa3[_0x1f747c(0xca)]};}catch(_0x1d1e4e){const _0x2cdb57=_0x1d1e4e instanceof Error?_0x1d1e4e[_0x1f747c(0xcd)]:String(_0x1d1e4e);if(_0x2cdb57['includes'](_0x1f747c(0xd9)))return{'type':_0x1f747c(0xb8),'errorCode':'file_not_found','message':_0x1f747c(0xe3)+_0x468681,'arg':_0x468681};if(_0x2cdb57[_0x1f747c(0xbd)](_0x1f747c(0xcf))){if(_0x155ed6){const _0x47c626=a157_0x410905['resolve'](_0x468681);if(await fs[_0x1f747c(0xd3)](_0x47c626)){const _0x431664=a157_0x410905[_0x1f747c(0xd8)](_0x47c626),_0xa5895e=await fs['readFile'](_0x47c626),_0x220725=_0xa5895e[_0x1f747c(0xb9)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x466998=_0xa5895e[_0x1f747c(0xb9)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x201291=_0x220725?_0x220725[0x1][_0x1f747c(0xe5)]():a157_0x410905[_0x1f747c(0xdc)](_0x468681,a157_0x410905['extname'](_0x468681)),_0xc4856e=_0x466998&&_0x466998[0x1][_0x1f747c(0xe5)]()==='journey'?_0x1f747c(0xc7):_0x1f747c(0xbf);return{'type':_0x1f747c(0xc1),'parentName':_0x155ed6,'targetDir':_0x431664,'configRoot':_0x431664,'filePath':_0x47c626,'resourceName':_0x201291,'folderPath':'','resourceType':_0xc4856e,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x1f747c(0xb8),'errorCode':'no_config','message':_0x1f747c(0xbc)+_0x468681,'arg':_0x468681,'helpText':_0x1f747c(0xcc)};}return{'type':_0x1f747c(0xb8),'errorCode':'invalid_yaml','message':_0x2cdb57,'arg':_0x468681};}if(_0x468681){const _0x17a98f=a157_0x410905[_0x1f747c(0xc8)](cwd,_0x468681);let _0x2593ba=null;try{_0x2593ba=await fs['stat'](_0x17a98f);}catch{}if(_0x2593ba?.[_0x1f747c(0xdf)]()){const _0x5efaef=await findTdxConfigAsync(_0x17a98f,fs);if(_0x5efaef){const _0x5892bc=calculateScopedPath(_0x17a98f,_0x5efaef['configDir']);return{'type':_0x1f747c(0xe2),'parentName':_0x5efaef[_0x1f747c(0xde)],'targetDir':_0x17a98f,'configRoot':_0x5efaef[_0x1f747c(0xb0)],'isScoped':_0x5892bc['isScoped'],'scopedFolderPath':_0x5892bc['scopedFolderPath']};}if(_0x155ed6)return{'type':_0x1f747c(0xe2),'parentName':_0x155ed6,'targetDir':_0x17a98f,'configRoot':_0x17a98f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x1f747c(0xb8),'errorCode':'no_config','message':_0x1f747c(0xd1)+_0x468681,'arg':_0x468681,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}if(_0x2593ba?.[_0x1f747c(0xe4)]())return{'type':_0x1f747c(0xb8),'errorCode':_0x1f747c(0xc6),'message':_0x1f747c(0xc3)+_0x468681,'arg':_0x468681,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x27dfa6=sanitizeFileName(_0x468681),_0x4304d4=getSegmentRootDir(_0x27dfa6,cwd);return{'type':_0x1f747c(0xdd),'parentName':_0x468681,'targetDir':_0x4304d4,'configRoot':_0x4304d4};}const _0x4bdb07=await findTdxConfigAsync(cwd,fs);if(_0x4bdb07){const _0x4141c4=calculateScopedPath(cwd,_0x4bdb07[_0x1f747c(0xb0)]);return{'type':_0x1f747c(0xc5),'parentName':_0x4bdb07[_0x1f747c(0xde)],'targetDir':cwd,'configRoot':_0x4bdb07[_0x1f747c(0xb0)],'isScoped':_0x4141c4[_0x1f747c(0xd6)],'scopedFolderPath':_0x4141c4['scopedFolderPath']};}if(_0x155ed6){const _0x6a7609=sanitizeFileName(_0x155ed6),_0x21197f=getSegmentRootDir(_0x6a7609,cwd);return{'type':_0x1f747c(0xc5),'parentName':_0x155ed6,'targetDir':_0x21197f,'configRoot':_0x21197f,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x1f747c(0xb8),'errorCode':'no_parent','message':_0x1f747c(0xb7),'helpText':_0x1f747c(0xe1)};}
1
+ function a157_0x14b8(){const _0x50445d=['relative','segmentName','resolve','45118kGhook','no_config','file','Parent\x20segment\x20not\x20specified','directory','basename','File\x20not\x20found','startsWith','287dAvsKO','parse','No\x20tdx.json\x20found\x20for\x20file:\x20','join','File\x20not\x20found:\x20','isFile','resourceType','journey','readFile','dirname','type','configDir','message','includes','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','extname','invalid_yaml','Not\x20a\x20YAML\x20file:\x20','segment','cwd','No\x20tdx.json\x20found','stat','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','1133008mSvnQA','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','parentSegment','error','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','isDirectory','root','844533kFcoEz','17tzFiRk','parent_segment','exists','2290095SDWAST','isScoped','replace','folderPath','scopedFolderPath','context','trim','1889514nXqyzF','67816CPPtmv','match','file_not_found','6028434ApAgDQ'];a157_0x14b8=function(){return _0x50445d;};return a157_0x14b8();}(function(_0x535479,_0x3adae6){const _0x5d457f=a157_0x8d85,_0x50ced3=_0x535479();while(!![]){try{const _0x2187f8=parseInt(_0x5d457f(0x11f))/0x1*(parseInt(_0x5d457f(0xf7))/0x2)+-parseInt(_0x5d457f(0x11e))/0x3+-parseInt(_0x5d457f(0x117))/0x4+parseInt(_0x5d457f(0x122))/0x5+parseInt(_0x5d457f(0x129))/0x6+parseInt(_0x5d457f(0xff))/0x7*(parseInt(_0x5d457f(0x12a))/0x8)+-parseInt(_0x5d457f(0x12d))/0x9;if(_0x2187f8===_0x3adae6)break;else _0x50ced3['push'](_0x50ced3['shift']());}catch(_0x441ec9){_0x50ced3['push'](_0x50ced3['shift']());}}}(a157_0x14b8,0x41c61));import a157_0x19cdd2 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x18e265){const _0x2c2851=a157_0x8d85;return _0x18e265[_0x2c2851(0x109)]!==_0x2c2851(0x11a);}export function isScopedResolution(_0xb79763){const _0x6873b7=a157_0x8d85;return _0xb79763[_0x6873b7(0x109)]===_0x6873b7(0xfb)||_0xb79763[_0x6873b7(0x109)]===_0x6873b7(0xf9)||_0xb79763[_0x6873b7(0x109)]===_0x6873b7(0x127);}export function getScopedDetails(_0xd93d9a){if(isScopedResolution(_0xd93d9a))return{'isScoped':_0xd93d9a['isScoped'],'scopedFolderPath':_0xd93d9a['scopedFolderPath']};return undefined;}async function findTdxConfigAsync(_0x57b9bb,_0x1b1aef){const _0x5c89d7=a157_0x8d85;let _0x163348=a157_0x19cdd2[_0x5c89d7(0xf6)](_0x57b9bb);const _0x290d40=a157_0x19cdd2[_0x5c89d7(0x100)](_0x163348)[_0x5c89d7(0x11d)];while(_0x163348!==_0x290d40){const _0x1fbc69=a157_0x19cdd2[_0x5c89d7(0x102)](_0x163348,'tdx.json');if(await _0x1b1aef[_0x5c89d7(0x121)](_0x1fbc69))try{const _0x4485c9=await _0x1b1aef[_0x5c89d7(0x107)](_0x1fbc69),_0x59c3ad=JSON['parse'](_0x4485c9);if(_0x59c3ad[_0x5c89d7(0x120)]&&typeof _0x59c3ad[_0x5c89d7(0x120)]==='string')return{'configPath':_0x1fbc69,'configDir':_0x163348,'parentSegment':_0x59c3ad[_0x5c89d7(0x120)]};}catch{}_0x163348=a157_0x19cdd2[_0x5c89d7(0x108)](_0x163348);}return null;}function a157_0x8d85(_0x47d6e2,_0x12750e){_0x47d6e2=_0x47d6e2-0xf6;const _0x14b8b5=a157_0x14b8();let _0x8d8522=_0x14b8b5[_0x47d6e2];return _0x8d8522;}function calculateScopedPath(_0x5bbcf1,_0x525334){const _0x22f0f6=a157_0x8d85,_0x4ce35a=a157_0x19cdd2[_0x22f0f6(0x12e)](_0x525334,_0x5bbcf1),_0x2b202c=_0x4ce35a!==''&&_0x4ce35a!=='.'&&!_0x4ce35a[_0x22f0f6(0xfe)]('..');return{'isScoped':_0x2b202c,'scopedFolderPath':_0x2b202c?_0x4ce35a[_0x22f0f6(0x124)](/\\/g,'/'):''};}export async function resolveTarget(_0x572207){const _0x20efe5=a157_0x8d85,{arg:_0x1fe112,contextParent:_0x457b7f,cwd:cwd=process[_0x20efe5(0x113)](),fs:fs=nodeFileSystem}=_0x572207;if(_0x1fe112&&isYamlFilePath(_0x1fe112))try{const _0x440dd1=await resolveYamlFilePath(_0x1fe112,fs),_0x1420f2=a157_0x19cdd2[_0x20efe5(0xf6)](_0x1fe112),_0x13a848=a157_0x19cdd2['dirname'](_0x1420f2),_0x1cd492=await findTdxConfigAsync(_0x13a848,fs);if(!_0x1cd492){if(_0x457b7f){const _0x474d6a=a157_0x19cdd2[_0x20efe5(0x108)](_0x1420f2);return{'type':_0x20efe5(0xf9),'parentName':_0x457b7f,'targetDir':_0x474d6a,'configRoot':_0x474d6a,'filePath':_0x1420f2,'resourceName':_0x440dd1[_0x20efe5(0x12f)],'folderPath':_0x440dd1[_0x20efe5(0x125)],'resourceType':_0x440dd1[_0x20efe5(0x105)],'isScoped':![],'scopedFolderPath':''};}return{'type':'error','errorCode':'no_config','message':_0x20efe5(0x101)+_0x1fe112,'arg':_0x1fe112,'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 _0x1ae1dc=calculateScopedPath(_0x13a848,_0x1cd492['configDir']);return{'type':_0x20efe5(0xf9),'parentName':_0x1cd492[_0x20efe5(0x119)],'targetDir':_0x1cd492[_0x20efe5(0x10a)],'configRoot':_0x1cd492[_0x20efe5(0x10a)],'filePath':_0x1420f2,'resourceName':_0x440dd1[_0x20efe5(0x12f)],'folderPath':_0x440dd1[_0x20efe5(0x125)],'resourceType':_0x440dd1[_0x20efe5(0x105)],'isScoped':_0x1ae1dc['isScoped'],'scopedFolderPath':_0x1ae1dc[_0x20efe5(0x126)]};}catch(_0x57ee25){const _0x424d5d=_0x57ee25 instanceof Error?_0x57ee25[_0x20efe5(0x10b)]:String(_0x57ee25);if(_0x424d5d['includes'](_0x20efe5(0xfd)))return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0x12c),'message':_0x20efe5(0x103)+_0x1fe112,'arg':_0x1fe112};if(_0x424d5d[_0x20efe5(0x10c)](_0x20efe5(0x114))){if(_0x457b7f){const _0x55d9ab=a157_0x19cdd2[_0x20efe5(0xf6)](_0x1fe112);if(await fs[_0x20efe5(0x121)](_0x55d9ab)){const _0x668234=a157_0x19cdd2['dirname'](_0x55d9ab),_0xf29f60=await fs['readFile'](_0x55d9ab),_0x1b7365=_0xf29f60['match'](/^name:\s*["']?([^"'\n]+)["']?/m),_0x1f3cdb=_0xf29f60[_0x20efe5(0x12b)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x491791=_0x1b7365?_0x1b7365[0x1][_0x20efe5(0x128)]():a157_0x19cdd2[_0x20efe5(0xfc)](_0x1fe112,a157_0x19cdd2[_0x20efe5(0x10f)](_0x1fe112)),_0x2a8093=_0x1f3cdb&&_0x1f3cdb[0x1][_0x20efe5(0x128)]()===_0x20efe5(0x106)?_0x20efe5(0x106):_0x20efe5(0x112);return{'type':_0x20efe5(0xf9),'parentName':_0x457b7f,'targetDir':_0x668234,'configRoot':_0x668234,'filePath':_0x55d9ab,'resourceName':_0x491791,'folderPath':'','resourceType':_0x2a8093,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0xf8),'message':_0x20efe5(0x101)+_0x1fe112,'arg':_0x1fe112,'helpText':_0x20efe5(0x10e)};}return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0x110),'message':_0x424d5d,'arg':_0x1fe112};}if(_0x1fe112){const _0x23e17f=a157_0x19cdd2[_0x20efe5(0xf6)](cwd,_0x1fe112);let _0x17b1a2=null;try{_0x17b1a2=await fs[_0x20efe5(0x115)](_0x23e17f);}catch{}if(_0x17b1a2?.[_0x20efe5(0x11c)]()){const _0x11ce77=await findTdxConfigAsync(_0x23e17f,fs);if(_0x11ce77){const _0xabcb58=calculateScopedPath(_0x23e17f,_0x11ce77['configDir']);return{'type':_0x20efe5(0xfb),'parentName':_0x11ce77[_0x20efe5(0x119)],'targetDir':_0x23e17f,'configRoot':_0x11ce77['configDir'],'isScoped':_0xabcb58[_0x20efe5(0x123)],'scopedFolderPath':_0xabcb58[_0x20efe5(0x126)]};}if(_0x457b7f)return{'type':_0x20efe5(0xfb),'parentName':_0x457b7f,'targetDir':_0x23e17f,'configRoot':_0x23e17f,'isScoped':![],'scopedFolderPath':''};return{'type':_0x20efe5(0x11a),'errorCode':_0x20efe5(0xf8),'message':_0x20efe5(0x11b)+_0x1fe112,'arg':_0x1fe112,'helpText':_0x20efe5(0x10e)};}if(_0x17b1a2?.[_0x20efe5(0x104)]())return{'type':_0x20efe5(0x11a),'errorCode':'invalid_yaml','message':_0x20efe5(0x111)+_0x1fe112,'arg':_0x1fe112,'helpText':_0x20efe5(0x116)};const _0x4f2781=sanitizeFileName(_0x1fe112),_0x453562=getSegmentRootDir(_0x4f2781,cwd);return{'type':_0x20efe5(0x10d),'parentName':_0x1fe112,'targetDir':_0x453562,'configRoot':_0x453562};}const _0xaeff97=await findTdxConfigAsync(cwd,fs);if(_0xaeff97){const _0xe93682=calculateScopedPath(cwd,_0xaeff97[_0x20efe5(0x10a)]);return{'type':_0x20efe5(0x127),'parentName':_0xaeff97['parentSegment'],'targetDir':cwd,'configRoot':_0xaeff97['configDir'],'isScoped':_0xe93682[_0x20efe5(0x123)],'scopedFolderPath':_0xe93682[_0x20efe5(0x126)]};}if(_0x457b7f){const _0x29ffc4=sanitizeFileName(_0x457b7f),_0x434915=getSegmentRootDir(_0x29ffc4,cwd);return{'type':_0x20efe5(0x127),'parentName':_0x457b7f,'targetDir':_0x434915,'configRoot':_0x434915,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x20efe5(0x11a),'errorCode':'no_parent','message':_0x20efe5(0xfa),'helpText':_0x20efe5(0x118)};}
@@ -1 +1 @@
1
- function a158_0x4534(_0x27c595,_0x24ea1b){_0x27c595=_0x27c595-0x113;const _0x30b545=a158_0x30b5();let _0x453403=_0x30b545[_0x27c595];return _0x453403;}const a158_0x182320=a158_0x4534;(function(_0x3090aa,_0x5433ca){const _0x6920e5=a158_0x4534,_0x2b9366=_0x3090aa();while(!![]){try{const _0x5379aa=-parseInt(_0x6920e5(0x12a))/0x1+parseInt(_0x6920e5(0x126))/0x2*(-parseInt(_0x6920e5(0x113))/0x3)+-parseInt(_0x6920e5(0x11f))/0x4*(parseInt(_0x6920e5(0x116))/0x5)+parseInt(_0x6920e5(0x12d))/0x6*(parseInt(_0x6920e5(0x124))/0x7)+-parseInt(_0x6920e5(0x11b))/0x8+-parseInt(_0x6920e5(0x118))/0x9*(parseInt(_0x6920e5(0x120))/0xa)+parseInt(_0x6920e5(0x119))/0xb;if(_0x5379aa===_0x5433ca)break;else _0x2b9366['push'](_0x2b9366['shift']());}catch(_0x4784a0){_0x2b9366['push'](_0x2b9366['shift']());}}}(a158_0x30b5,0x70442));import{existsSync,readFileSync}from'fs';import a158_0x3850be from'path';const TDX_CONFIG_FILE=a158_0x182320(0x12e),SEGMENTS_DIR=a158_0x182320(0x12c);export function findTdxConfigPath(_0x34c6ff=process[a158_0x182320(0x11d)]()){const _0x535a21=a158_0x182320;let _0x2f0814=a158_0x3850be[_0x535a21(0x123)](_0x34c6ff);const _0x562e05=a158_0x3850be[_0x535a21(0x11a)](_0x2f0814)[_0x535a21(0x125)];while(_0x2f0814!==_0x562e05){const _0x90399e=a158_0x3850be[_0x535a21(0x115)](_0x2f0814,TDX_CONFIG_FILE);if(existsSync(_0x90399e))return _0x90399e;_0x2f0814=a158_0x3850be['dirname'](_0x2f0814);}return null;}export function loadTdxConfig(_0x2d0eb1){const _0x3d6696=a158_0x182320,_0x5556a5=readFileSync(_0x2d0eb1,_0x3d6696(0x11c));let _0x156a4f;try{_0x156a4f=JSON[_0x3d6696(0x11a)](_0x5556a5);}catch{throw new Error(_0x3d6696(0x11e)+_0x2d0eb1);}if(!_0x156a4f||typeof _0x156a4f!==_0x3d6696(0x12b))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x1aee7a=_0x156a4f,_0x3713a4=_0x1aee7a[_0x3d6696(0x127)]&&typeof _0x1aee7a[_0x3d6696(0x127)]==='string',_0xd787e1=_0x1aee7a['engage_workspace']&&typeof _0x1aee7a['engage_workspace']===_0x3d6696(0x121);if(!_0x3713a4&&!_0xd787e1)throw new Error(_0x3d6696(0x128));const _0x501ac4={};return _0x3713a4&&(_0x501ac4['parent_segment']=_0x1aee7a[_0x3d6696(0x127)]),_0xd787e1&&(_0x501ac4[_0x3d6696(0x129)]=_0x1aee7a[_0x3d6696(0x129)]),_0x501ac4;}export function findTdxConfig(_0x4cfaa5=process[a158_0x182320(0x11d)]()){const _0x5d8bbe=a158_0x182320,_0x219daf=findTdxConfigPath(_0x4cfaa5);if(!_0x219daf)throw new Error(_0x5d8bbe(0x114));const _0x913031=loadTdxConfig(_0x219daf),_0x35c253=a158_0x3850be[_0x5d8bbe(0x117)](_0x219daf);return{'config':_0x913031,'configPath':_0x219daf,'configDir':_0x35c253};}export function tryFindTdxConfig(_0x1d7953){try{return findTdxConfig(_0x1d7953);}catch{return null;}}export function getSegmentRootDir(_0x47f9ad,_0x5e96be=process[a158_0x182320(0x11d)]()){return a158_0x3850be['join'](_0x5e96be,SEGMENTS_DIR,_0x47f9ad);}export function getTdxConfigPath(_0xfed032,_0x9f2ccb=process['cwd']()){const _0x27f43d=a158_0x182320;return a158_0x3850be[_0x27f43d(0x115)](getSegmentRootDir(_0xfed032,_0x9f2ccb),TDX_CONFIG_FILE);}function a158_0x30b5(){const _0x495c81=['join','502395EAjiXJ','dirname','36CkIADA','32659957vCbMDx','parse','2108168ajECiO','utf-8','cwd','Invalid\x20JSON\x20in\x20','36GiMxpj','1582460tHkAyN','string','stringify','resolve','4444349TtdwDH','root','30zyBzfF','parent_segment','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','engage_workspace','615686wnGGuD','object','segments','6DkXegf','tdx.json','145530OvlgHp','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.'];a158_0x30b5=function(){return _0x495c81;};return a158_0x30b5();}export function getRelativePathFromConfig(_0x2e853b,_0x2e5b33){const _0x99a27a=a158_0x182320,_0x55ae3b=a158_0x3850be[_0x99a27a(0x123)](_0x2e853b),_0x1c873b=a158_0x3850be['relative'](_0x2e5b33,_0x55ae3b);if(_0x1c873b['startsWith']('..'))return'';return _0x1c873b;}export function localPathToTdFolderPath(_0x1ce6a8){const _0x2a700b=a158_0x182320,_0x2c9aa7=a158_0x3850be[_0x2a700b(0x117)](_0x1ce6a8);if(_0x2c9aa7==='.'||_0x2c9aa7==='')return'';return _0x2c9aa7['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x465e44,_0x564fcf){if(!_0x465e44)return _0x564fcf;return a158_0x3850be['join'](_0x564fcf,_0x465e44);}export function createTdxConfigContent(_0x313e76){const _0x4dba73=a158_0x182320,_0x380eea={'parent_segment':_0x313e76};return JSON[_0x4dba73(0x122)](_0x380eea,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x4e4f6d){const _0x14a782=a158_0x182320,_0x3ecef0={'engage_workspace':_0x4e4f6d};return JSON[_0x14a782(0x122)](_0x3ecef0,null,0x2)+'\x0a';}
1
+ const a158_0x28bed9=a158_0x3a1a;(function(_0x3150d2,_0x5a5dbb){const _0x4b3f7d=a158_0x3a1a,_0x137eed=_0x3150d2();while(!![]){try{const _0x3171d8=parseInt(_0x4b3f7d(0x1cd))/0x1+-parseInt(_0x4b3f7d(0x1d9))/0x2+-parseInt(_0x4b3f7d(0x1d5))/0x3*(-parseInt(_0x4b3f7d(0x1c6))/0x4)+parseInt(_0x4b3f7d(0x1d1))/0x5*(parseInt(_0x4b3f7d(0x1c4))/0x6)+-parseInt(_0x4b3f7d(0x1ce))/0x7*(-parseInt(_0x4b3f7d(0x1c7))/0x8)+-parseInt(_0x4b3f7d(0x1c8))/0x9*(parseInt(_0x4b3f7d(0x1c5))/0xa)+-parseInt(_0x4b3f7d(0x1d3))/0xb;if(_0x3171d8===_0x5a5dbb)break;else _0x137eed['push'](_0x137eed['shift']());}catch(_0x1aa73e){_0x137eed['push'](_0x137eed['shift']());}}}(a158_0x5d5e,0xa47f7));import{existsSync,readFileSync}from'fs';function a158_0x5d5e(){const _0x5d414c=['10OfOSqf','4uPVqSS','784ffRkFr','4120677zMCXhS','Invalid\x20tdx.json:\x20expected\x20object','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','utf-8','Invalid\x20JSON\x20in\x20','491461NJnCca','57162JbUCDs','cwd','tdx.json','485gyuRFY','Invalid\x20tdx.json:\x20must\x20contain\x20\x27parent_segment\x27\x20or\x20\x27engage_workspace\x27\x20field','16886001sptysY','engage_workspace','3871653wjnoug','join','root','stringify','34612NUKnbA','parse','replace','object','relative','parent_segment','dirname','6294KLVCYx'];a158_0x5d5e=function(){return _0x5d414c;};return a158_0x5d5e();}import a158_0x15b5cf from'path';const TDX_CONFIG_FILE=a158_0x28bed9(0x1d0),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x2524b9=process['cwd']()){const _0x494dc2=a158_0x28bed9;let _0x7d369=a158_0x15b5cf['resolve'](_0x2524b9);const _0x493f01=a158_0x15b5cf[_0x494dc2(0x1da)](_0x7d369)[_0x494dc2(0x1d7)];while(_0x7d369!==_0x493f01){const _0x920d37=a158_0x15b5cf[_0x494dc2(0x1d6)](_0x7d369,TDX_CONFIG_FILE);if(existsSync(_0x920d37))return _0x920d37;_0x7d369=a158_0x15b5cf['dirname'](_0x7d369);}return null;}export function loadTdxConfig(_0x576c69){const _0x15f546=a158_0x28bed9,_0x717ca9=readFileSync(_0x576c69,_0x15f546(0x1cb));let _0x392947;try{_0x392947=JSON[_0x15f546(0x1da)](_0x717ca9);}catch{throw new Error(_0x15f546(0x1cc)+_0x576c69);}if(!_0x392947||typeof _0x392947!==_0x15f546(0x1c0))throw new Error(_0x15f546(0x1c9));const _0x4e170e=_0x392947,_0xf6c0c7=_0x4e170e['parent_segment']&&typeof _0x4e170e['parent_segment']==='string',_0x132395=_0x4e170e[_0x15f546(0x1d4)]&&typeof _0x4e170e['engage_workspace']==='string';if(!_0xf6c0c7&&!_0x132395)throw new Error(_0x15f546(0x1d2));const _0x116071={};return _0xf6c0c7&&(_0x116071[_0x15f546(0x1c2)]=_0x4e170e[_0x15f546(0x1c2)]),_0x132395&&(_0x116071[_0x15f546(0x1d4)]=_0x4e170e[_0x15f546(0x1d4)]),_0x116071;}export function findTdxConfig(_0x5bccf7=process[a158_0x28bed9(0x1cf)]()){const _0x3e90fa=a158_0x28bed9,_0x223be0=findTdxConfigPath(_0x5bccf7);if(!_0x223be0)throw new Error(_0x3e90fa(0x1ca));const _0x5bf864=loadTdxConfig(_0x223be0),_0xfeef1c=a158_0x15b5cf[_0x3e90fa(0x1c3)](_0x223be0);return{'config':_0x5bf864,'configPath':_0x223be0,'configDir':_0xfeef1c};}function a158_0x3a1a(_0x2bc70d,_0x1c3be6){_0x2bc70d=_0x2bc70d-0x1c0;const _0x5d5e61=a158_0x5d5e();let _0x3a1a6c=_0x5d5e61[_0x2bc70d];return _0x3a1a6c;}export function tryFindTdxConfig(_0x38350f){try{return findTdxConfig(_0x38350f);}catch{return null;}}export function getSegmentRootDir(_0x434e57,_0x115655=process[a158_0x28bed9(0x1cf)]()){const _0x23dd2e=a158_0x28bed9;return a158_0x15b5cf[_0x23dd2e(0x1d6)](_0x115655,SEGMENTS_DIR,_0x434e57);}export function getTdxConfigPath(_0x31779b,_0xa9aea9=process[a158_0x28bed9(0x1cf)]()){const _0x38746a=a158_0x28bed9;return a158_0x15b5cf[_0x38746a(0x1d6)](getSegmentRootDir(_0x31779b,_0xa9aea9),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x2c1cdd,_0x4d04c7){const _0x2e4b68=a158_0x28bed9,_0x5c6bb0=a158_0x15b5cf['resolve'](_0x2c1cdd),_0x190f8a=a158_0x15b5cf[_0x2e4b68(0x1c1)](_0x4d04c7,_0x5c6bb0);if(_0x190f8a['startsWith']('..'))return'';return _0x190f8a;}export function localPathToTdFolderPath(_0x42a79c){const _0x574b90=a158_0x28bed9,_0x1feb6e=a158_0x15b5cf[_0x574b90(0x1c3)](_0x42a79c);if(_0x1feb6e==='.'||_0x1feb6e==='')return'';return _0x1feb6e[_0x574b90(0x1db)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x478fff,_0x2cfd5d){if(!_0x478fff)return _0x2cfd5d;return a158_0x15b5cf['join'](_0x2cfd5d,_0x478fff);}export function createTdxConfigContent(_0x3a7824){const _0x4ec39b=a158_0x28bed9,_0x2a6dbd={'parent_segment':_0x3a7824};return JSON[_0x4ec39b(0x1d8)](_0x2a6dbd,null,0x2)+'\x0a';}export function createEngageTdxConfigContent(_0x462890){const _0xb23586={'engage_workspace':_0x462890};return JSON['stringify'](_0xb23586,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a159_0x104da5=a159_0x125d;(function(_0x545357,_0x1eaeab){const _0x4ccf14=a159_0x125d,_0x381b68=_0x545357();while(!![]){try{const _0x34d552=-parseInt(_0x4ccf14(0x158))/0x1+parseInt(_0x4ccf14(0x156))/0x2*(-parseInt(_0x4ccf14(0x176))/0x3)+parseInt(_0x4ccf14(0x17b))/0x4+parseInt(_0x4ccf14(0x173))/0x5+parseInt(_0x4ccf14(0x160))/0x6*(parseInt(_0x4ccf14(0x174))/0x7)+parseInt(_0x4ccf14(0x153))/0x8*(parseInt(_0x4ccf14(0x155))/0x9)+-parseInt(_0x4ccf14(0x16a))/0xa;if(_0x34d552===_0x1eaeab)break;else _0x381b68['push'](_0x381b68['shift']());}catch(_0x513411){_0x381b68['push'](_0x381b68['shift']());}}}(a159_0xa89b,0xaf4d9));import{z}from'zod';function a159_0xa89b(){const _0x126d71=['week','6178660aimSKv','array','clear','daily','minute','enum','Last','none','First','6174285tdTuEW','2933iikvag','once','192sICSub','unknown','min','month','string','4327324wveUYc','onFailure','rows','All','nullable','optional','2033968LGweUw','object','27LSxLYt','41530RZOJlJ','day','920292qQfQxm','cols','monthly','record','onSuccess','Activation\x20name\x20is\x20required','weekly','hourly','7242joAyPa','union','Top-N','desc','number','asc','Connection\x20name\x20is\x20required','masked','boolean'];a159_0xa89b=function(){return _0x126d71;};return a159_0xa89b();}export const ScheduleTypeSchema=z['enum']([a159_0x104da5(0x171),a159_0x104da5(0x15f),a159_0x104da5(0x16d),a159_0x104da5(0x15e),a159_0x104da5(0x15a),'cron','minutes_interval']);export const RepeatUnitSchema=z[a159_0x104da5(0x16f)]([a159_0x104da5(0x16e),'hour',a159_0x104da5(0x157),a159_0x104da5(0x169),a159_0x104da5(0x179),a159_0x104da5(0x175),'none']);export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema['optional'](),'repeat_unit':RepeatUnitSchema['optional'](),'repeat_frequency':z[a159_0x104da5(0x164)]()['optional'](),'repeat_sub_frequency':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x164)]())[a159_0x104da5(0x152)](),'start_at':z[a159_0x104da5(0x17a)]()['nullable']()[a159_0x104da5(0x152)](),'end_on':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'timezone':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)]()});export const NotificationDefSchema=z[a159_0x104da5(0x154)]({'notify_on':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x16f)]([a159_0x104da5(0x15c),a159_0x104da5(0x17c)]))[a159_0x104da5(0x152)](),'email_recipients':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x17a)]())[a159_0x104da5(0x152)]()});function a159_0x125d(_0x30bcfa,_0x434f0d){_0x30bcfa=_0x30bcfa-0x14f;const _0xa89bf1=a159_0xa89b();let _0x125dd1=_0xa89bf1[_0x30bcfa];return _0x125dd1;}export const ActivationColumnDefSchema=z[a159_0x104da5(0x161)]([z[a159_0x104da5(0x17a)](),z[a159_0x104da5(0x154)]({'name':z[a159_0x104da5(0x17a)](),'type':z['string']()[a159_0x104da5(0x152)](),'visibility':z['enum']([a159_0x104da5(0x16c),a159_0x104da5(0x167)])[a159_0x104da5(0x152)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x104da5(0x154)]({'columns':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x154)]({'name':z[a159_0x104da5(0x17a)](),'type':z[a159_0x104da5(0x17a)]()['optional'](),'visibility':z[a159_0x104da5(0x16f)]([a159_0x104da5(0x16c),'masked'])[a159_0x104da5(0x152)]()}))[a159_0x104da5(0x152)](),'behavior_table':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)](),'join_row':z[a159_0x104da5(0x164)]()[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'join_strategy':z[a159_0x104da5(0x16f)]([a159_0x104da5(0x150),a159_0x104da5(0x172),a159_0x104da5(0x170),a159_0x104da5(0x162)])['optional'](),'formatting':z['enum']([a159_0x104da5(0x14f),a159_0x104da5(0x159)])['optional'](),'order_by':z[a159_0x104da5(0x16b)](z[a159_0x104da5(0x154)]({'key':z[a159_0x104da5(0x17a)](),'order':z[a159_0x104da5(0x16f)]([a159_0x104da5(0x165),a159_0x104da5(0x163)])}))['optional']()});export const ActivationDefSchema=z['object']({'name':z['string']()[a159_0x104da5(0x178)](0x1,a159_0x104da5(0x15d)),'description':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)](),'connection':z['string']()[a159_0x104da5(0x178)](0x1,a159_0x104da5(0x166)),'all_columns':z[a159_0x104da5(0x168)]()[a159_0x104da5(0x152)](),'columns':z[a159_0x104da5(0x16b)](ActivationColumnDefSchema)[a159_0x104da5(0x152)](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x104da5(0x152)](),'connector_config':z[a159_0x104da5(0x15b)](z[a159_0x104da5(0x17a)](),z[a159_0x104da5(0x177)]())['optional'](),'activation_template_id':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'behavior':ActivationBehaviorDefSchema[a159_0x104da5(0x151)]()[a159_0x104da5(0x152)](),'run_after_journey_refresh':z['boolean']()[a159_0x104da5(0x152)](),'nested_workflow_project_name':z[a159_0x104da5(0x17a)]()[a159_0x104da5(0x152)](),'nested_workflow_name':z[a159_0x104da5(0x17a)]()['optional'](),'lock_enabled':z['boolean']()[a159_0x104da5(0x152)]()});
1
+ const a159_0x24ddef=a159_0x3ac2;(function(_0x28d4e1,_0x32ff0c){const _0x4417f3=a159_0x3ac2,_0x352ca8=_0x28d4e1();while(!![]){try{const _0x4dc055=parseInt(_0x4417f3(0x207))/0x1+-parseInt(_0x4417f3(0x208))/0x2+-parseInt(_0x4417f3(0x1fc))/0x3*(-parseInt(_0x4417f3(0x1ff))/0x4)+-parseInt(_0x4417f3(0x209))/0x5+parseInt(_0x4417f3(0x20c))/0x6+-parseInt(_0x4417f3(0x1f1))/0x7+parseInt(_0x4417f3(0x204))/0x8;if(_0x4dc055===_0x32ff0c)break;else _0x352ca8['push'](_0x352ca8['shift']());}catch(_0x579104){_0x352ca8['push'](_0x352ca8['shift']());}}}(a159_0x517b,0x4cfb4));import{z}from'zod';export const ScheduleTypeSchema=z['enum'](['none',a159_0x24ddef(0x1f5),'daily',a159_0x24ddef(0x213),a159_0x24ddef(0x1fa),'cron','minutes_interval']);function a159_0x517b(){const _0x25ff2a=['584296ncLOqT','2897420DrkMtO','onSuccess','First','1730952LbxRKp','enum','object','hour','onFailure','All','Top-N','weekly','min','boolean','day','2859031WSkGKr','masked','number','rows','hourly','asc','nullable','union','desc','monthly','optional','821019rDMiFv','string','cols','4NJcJwA','unknown','array','minute','Connection\x20name\x20is\x20required','7623928YhEWic','week','clear','80225IaJVAX'];a159_0x517b=function(){return _0x25ff2a;};return a159_0x517b();}export const RepeatUnitSchema=z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x202),a159_0x24ddef(0x20f),a159_0x24ddef(0x1f0),a159_0x24ddef(0x205),'month','once','none']);function a159_0x3ac2(_0x1b8567,_0x2bb3d0){_0x1b8567=_0x1b8567-0x1ee;const _0x517b2f=a159_0x517b();let _0x3ac280=_0x517b2f[_0x1b8567];return _0x3ac280;}export const ScheduleDefSchema=z['object']({'type':ScheduleTypeSchema[a159_0x24ddef(0x1fb)](),'repeat_unit':RepeatUnitSchema[a159_0x24ddef(0x1fb)](),'repeat_frequency':z[a159_0x24ddef(0x1f3)]()[a159_0x24ddef(0x1fb)](),'repeat_sub_frequency':z['array'](z[a159_0x24ddef(0x1f3)]())[a159_0x24ddef(0x1fb)](),'start_at':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1f7)]()['optional'](),'end_on':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1f7)]()['optional'](),'timezone':z['string']()['optional']()});export const NotificationDefSchema=z[a159_0x24ddef(0x20e)]({'notify_on':z[a159_0x24ddef(0x201)](z['enum']([a159_0x24ddef(0x20a),a159_0x24ddef(0x210)]))[a159_0x24ddef(0x1fb)](),'email_recipients':z['array'](z[a159_0x24ddef(0x1fd)]())[a159_0x24ddef(0x1fb)]()});export const ActivationColumnDefSchema=z[a159_0x24ddef(0x1f8)]([z[a159_0x24ddef(0x1fd)](),z[a159_0x24ddef(0x20e)]({'name':z[a159_0x24ddef(0x1fd)](),'type':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1fb)](),'visibility':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x206),a159_0x24ddef(0x1f2)])[a159_0x24ddef(0x1fb)]()})]);export const ActivationBehaviorDefSchema=z[a159_0x24ddef(0x20e)]({'columns':z[a159_0x24ddef(0x201)](z[a159_0x24ddef(0x20e)]({'name':z['string'](),'type':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1fb)](),'visibility':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x206),'masked'])[a159_0x24ddef(0x1fb)]()}))['optional'](),'behavior_table':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1fb)](),'join_row':z[a159_0x24ddef(0x1f3)]()[a159_0x24ddef(0x1f7)]()['optional'](),'join_strategy':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x211),a159_0x24ddef(0x20b),'Last',a159_0x24ddef(0x212)])[a159_0x24ddef(0x1fb)](),'formatting':z['enum']([a159_0x24ddef(0x1f4),a159_0x24ddef(0x1fe)])[a159_0x24ddef(0x1fb)](),'order_by':z[a159_0x24ddef(0x201)](z[a159_0x24ddef(0x20e)]({'key':z[a159_0x24ddef(0x1fd)](),'order':z[a159_0x24ddef(0x20d)]([a159_0x24ddef(0x1f6),a159_0x24ddef(0x1f9)])}))[a159_0x24ddef(0x1fb)]()});export const ActivationDefSchema=z['object']({'name':z[a159_0x24ddef(0x1fd)]()[a159_0x24ddef(0x1ee)](0x1,'Activation\x20name\x20is\x20required'),'description':z[a159_0x24ddef(0x1fd)]()['optional'](),'connection':z['string']()[a159_0x24ddef(0x1ee)](0x1,a159_0x24ddef(0x203)),'all_columns':z[a159_0x24ddef(0x1ef)]()[a159_0x24ddef(0x1fb)](),'columns':z['array'](ActivationColumnDefSchema)['optional'](),'schedule':ScheduleDefSchema['optional'](),'notification':NotificationDefSchema[a159_0x24ddef(0x1fb)](),'connector_config':z['record'](z['string'](),z[a159_0x24ddef(0x200)]())[a159_0x24ddef(0x1fb)](),'activation_template_id':z['string']()[a159_0x24ddef(0x1f7)]()[a159_0x24ddef(0x1fb)](),'behavior':ActivationBehaviorDefSchema['nullable']()['optional'](),'run_after_journey_refresh':z[a159_0x24ddef(0x1ef)]()[a159_0x24ddef(0x1fb)](),'nested_workflow_project_name':z['string']()[a159_0x24ddef(0x1fb)](),'nested_workflow_name':z['string']()[a159_0x24ddef(0x1fb)](),'lock_enabled':z[a159_0x24ddef(0x1ef)]()[a159_0x24ddef(0x1fb)]()});
@@ -1 +1 @@
1
- function a160_0x9902(_0x5af9c6,_0x532f14){_0x5af9c6=_0x5af9c6-0x160;var _0x5c4db0=a160_0x5c4d();var _0x9902aa=_0x5c4db0[_0x5af9c6];return _0x9902aa;}(function(_0x5da681,_0x18765e){var _0x218260=a160_0x9902,_0x572ac0=_0x5da681();while(!![]){try{var _0x133f8c=-parseInt(_0x218260(0x165))/0x1*(parseInt(_0x218260(0x164))/0x2)+-parseInt(_0x218260(0x169))/0x3*(-parseInt(_0x218260(0x161))/0x4)+-parseInt(_0x218260(0x163))/0x5*(-parseInt(_0x218260(0x167))/0x6)+-parseInt(_0x218260(0x168))/0x7+parseInt(_0x218260(0x160))/0x8+-parseInt(_0x218260(0x162))/0x9+parseInt(_0x218260(0x166))/0xa;if(_0x133f8c===_0x18765e)break;else _0x572ac0['push'](_0x572ac0['shift']());}catch(_0x14499d){_0x572ac0['push'](_0x572ac0['shift']());}}}(a160_0x5c4d,0x592c1));function a160_0x5c4d(){var _0x4d7b8f=['3630272ElRMiS','184376btOCib','695385xkUxZY','4315xddDbx','1270762THBcwa','1rHLRYk','6416710XeHFPX','678qvXUVo','2096185ruaFoG','12cNzlPu'];a160_0x5c4d=function(){return _0x4d7b8f;};return a160_0x5c4d();}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';
1
+ (function(_0x265a2a,_0x171be6){var _0x5c5297=a160_0x4f52,_0x4018a3=_0x265a2a();while(!![]){try{var _0x13de23=parseInt(_0x5c5297(0x143))/0x1*(-parseInt(_0x5c5297(0x140))/0x2)+-parseInt(_0x5c5297(0x147))/0x3*(-parseInt(_0x5c5297(0x148))/0x4)+-parseInt(_0x5c5297(0x14a))/0x5*(parseInt(_0x5c5297(0x145))/0x6)+-parseInt(_0x5c5297(0x144))/0x7*(-parseInt(_0x5c5297(0x149))/0x8)+-parseInt(_0x5c5297(0x142))/0x9+parseInt(_0x5c5297(0x146))/0xa*(parseInt(_0x5c5297(0x13f))/0xb)+parseInt(_0x5c5297(0x141))/0xc;if(_0x13de23===_0x171be6)break;else _0x4018a3['push'](_0x4018a3['shift']());}catch(_0x4ea875){_0x4018a3['push'](_0x4018a3['shift']());}}}(a160_0x1da6,0x3122c));function a160_0x4f52(_0x3edd88,_0x16f47e){_0x3edd88=_0x3edd88-0x13f;var _0x1da6d3=a160_0x1da6();var _0x4f52e0=_0x1da6d3[_0x3edd88];return _0x4f52e0;}export{JourneyStateTypeSchema,ReentryModeTypeSchema,WaitUnitTypeSchema,StepTypeValueSchema,EmbeddedSegmentDefSchema,CriteriaDefSchema,StepDefSchema,StageDefSchema,JourneyEntryDefSchema,JourneyDefSchema}from'./journey-schema.js';function a160_0x1da6(){var _0x291337=['945960RHayPb','1192815hPUHfJ','20742fCcWiV','343xZcAVp','6mzFdjd','20gOHupX','15063kWravJ','204QCmxWg','28568piLgZy','1778285bewNaa','1101727jEkDCa','2dyjyGY'];a160_0x1da6=function(){return _0x291337;};return a160_0x1da6();}
@@ -1 +1 @@
1
- const a161_0x409b77=a161_0x6e59;(function(_0x2156ad,_0x4c35b9){const _0x5c02ab=a161_0x6e59,_0x5928a1=_0x2156ad();while(!![]){try{const _0x326a03=parseInt(_0x5c02ab(0x1a1))/0x1*(-parseInt(_0x5c02ab(0x19b))/0x2)+-parseInt(_0x5c02ab(0x196))/0x3+parseInt(_0x5c02ab(0x1b3))/0x4*(-parseInt(_0x5c02ab(0x19c))/0x5)+-parseInt(_0x5c02ab(0x1a0))/0x6+-parseInt(_0x5c02ab(0x19f))/0x7*(-parseInt(_0x5c02ab(0x194))/0x8)+parseInt(_0x5c02ab(0x1b0))/0x9+parseInt(_0x5c02ab(0x19a))/0xa;if(_0x326a03===_0x4c35b9)break;else _0x5928a1['push'](_0x5928a1['shift']());}catch(_0x3f3281){_0x5928a1['push'](_0x5928a1['shift']());}}}(a161_0x1c56,0x5ac38));import{z}from'zod';function a161_0x1c56(){const _0x2dc10d=['16381830jNETQQ','426812NGveeV','1439105cjNGwr','array','optional','104307DaeiaC','2130186ShGOTY','1iENQKq','merge','no_reentry','journeys','activation','number','day','draft','ab_test','min','jump','boolean','filter','stages','journey','1914930hpYMHr','launched','week','8nmewfm','record','enum','literal','decision_point','wait','object','reentry_unless_goal_achieved','isArray','48qoFVsc','length','1273536QWHwLr','string','passthrough','simulation'];a161_0x1c56=function(){return _0x2dc10d;};return a161_0x1c56();}import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x409b77(0x1b5)]([a161_0x409b77(0x1a8),a161_0x409b77(0x199),a161_0x409b77(0x1b1)]);export const ReentryModeTypeSchema=z[a161_0x409b77(0x1b5)]([a161_0x409b77(0x1a3),a161_0x409b77(0x192),'reentry_always']);export const WaitUnitTypeSchema=z['enum']([a161_0x409b77(0x1a7),a161_0x409b77(0x1b2)]);export const StepTypeValueSchema=z[a161_0x409b77(0x1b5)]([a161_0x409b77(0x190),a161_0x409b77(0x1a5),'decision_point',a161_0x409b77(0x1a9),a161_0x409b77(0x1a2),a161_0x409b77(0x1ab),'end']);export const EmbeddedSegmentDefSchema=z['object']({'description':z['string']()[a161_0x409b77(0x19e)](),'rule':RuleDefSchema});const JumpTargetDefSchema=z['object']({'journey':z[a161_0x409b77(0x197)](),'stage':z['string'](),'bundle_id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)]()});export const CriteriaDefSchema=z[a161_0x409b77(0x191)]({'name':z['string'](),'description':z[a161_0x409b77(0x197)]()['optional'](),'segment':z[a161_0x409b77(0x197)](),'target':JumpTargetDefSchema[a161_0x409b77(0x19e)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x409b77(0x1a6)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)]()}),WaitConditionDefSchema=z[a161_0x409b77(0x191)]({'segment':z['string'](),'next':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x409b77(0x19e)]()}),WaitStepParamsDefSchema=z[a161_0x409b77(0x191)]({'duration':z['number']()['optional'](),'unit':WaitUnitTypeSchema['optional'](),'wait_until':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'condition':WaitConditionDefSchema[a161_0x409b77(0x19e)](),'days_of_week':z[a161_0x409b77(0x19d)](z[a161_0x409b77(0x197)]())[a161_0x409b77(0x19e)]()}),StepBaseFields={'name':z[a161_0x409b77(0x197)](),'uuid':z[a161_0x409b77(0x197)]()['optional'](),'next':z[a161_0x409b77(0x197)]()['optional']()},WaitStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x190)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x409b77(0x191)]({'activation':z[a161_0x409b77(0x197)]()}),ActivationStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)]('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z[a161_0x409b77(0x191)]({'name':z['string'](),'segment':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'segment_id':z['string']()[a161_0x409b77(0x19e)](),'excluded':z[a161_0x409b77(0x1ac)]()['optional'](),'next':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)]()}),DecisionPointStepParamsDefSchema=z[a161_0x409b77(0x191)]({'branches':z['array'](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z['literal'](a161_0x409b77(0x1b7)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x409b77(0x191)]({'id':z['string']()[a161_0x409b77(0x19e)](),'name':z[a161_0x409b77(0x197)](),'percentage':z[a161_0x409b77(0x1a6)](),'next':z['string']()[a161_0x409b77(0x19e)]()}),AbTestStepParamsDefSchema=z[a161_0x409b77(0x191)]({'variants':z[a161_0x409b77(0x19d)](AbTestVariantDefSchema),'unique_id':z['string']()[a161_0x409b77(0x19e)](),'customized_split':z['boolean']()[a161_0x409b77(0x19e)]()}),AbTestStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x1a9)),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)]('merge')}),JumpStepParamsDefSchema=z[a161_0x409b77(0x191)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x1ab)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x409b77(0x191)]({...StepBaseFields,'type':z[a161_0x409b77(0x1b6)]('end')})[a161_0x409b77(0x198)]();export const StepDefSchema=z['discriminatedUnion']('type',[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x409b77(0x191)]({'name':z[a161_0x409b77(0x197)](),'description':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'entry_criteria':CriteriaDefSchema['optional'](),'exit_criteria':z[a161_0x409b77(0x19d)](CriteriaDefSchema)[a161_0x409b77(0x19e)](),'milestone':CriteriaDefSchema[a161_0x409b77(0x19e)](),'root_step':z['string']()[a161_0x409b77(0x19e)](),'steps':z['array'](StepDefSchema)[a161_0x409b77(0x19e)]()});export const JourneyEntryDefSchema=z['object']({'name':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'version':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'state':JourneyStateTypeSchema[a161_0x409b77(0x19e)](),'latest':z[a161_0x409b77(0x1ac)]()['optional'](),'stages':z['array'](StageDefSchema),'id':z['string']()[a161_0x409b77(0x19e)](),'version_number':z[a161_0x409b77(0x1a6)]()[a161_0x409b77(0x19e)](),'goal':CriteriaDefSchema[a161_0x409b77(0x19e)](),'reentry':ReentryModeTypeSchema[a161_0x409b77(0x19e)]()});function a161_0x6e59(_0x17022b,_0x4ac188){_0x17022b=_0x17022b-0x190;const _0x1c5604=a161_0x1c56();let _0x6e599d=_0x1c5604[_0x17022b];return _0x6e599d;}export const JourneyDefSchema=z['lazy'](()=>z['object']({'type':z[a161_0x409b77(0x1b6)](a161_0x409b77(0x1af)),'name':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x1aa)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x409b77(0x197)]()['optional'](),'bundle_id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'bundle_name':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'folder_id':z[a161_0x409b77(0x197)]()['optional'](),'reentry':ReentryModeTypeSchema[a161_0x409b77(0x19e)](),'allow_reentry':z[a161_0x409b77(0x1ac)]()[a161_0x409b77(0x19e)](),'goal':CriteriaDefSchema['optional'](),'id':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'version':z[a161_0x409b77(0x197)]()[a161_0x409b77(0x19e)](),'version_number':z[a161_0x409b77(0x1a6)]()['optional'](),'stages':z[a161_0x409b77(0x19d)](StageDefSchema)[a161_0x409b77(0x19e)](),'versions':z[a161_0x409b77(0x19d)](JourneyEntryDefSchema)[a161_0x409b77(0x19e)](),'journeys':z[a161_0x409b77(0x19d)](JourneyEntryDefSchema)[a161_0x409b77(0x19e)](),'segments':z[a161_0x409b77(0x1b4)](z[a161_0x409b77(0x197)](),EmbeddedSegmentDefSchema)[a161_0x409b77(0x19e)](),'activations':z[a161_0x409b77(0x1b4)](z[a161_0x409b77(0x197)](),ActivationDefSchema)[a161_0x409b77(0x19e)]()})['refine'](_0x250466=>{const _0x2f3a90=a161_0x409b77,_0x530258=[_0x250466[_0x2f3a90(0x1a4)],_0x250466[_0x2f3a90(0x1ae)],_0x250466['versions']][_0x2f3a90(0x1ad)](_0x33cdb3=>Array[_0x2f3a90(0x193)](_0x33cdb3)&&_0x33cdb3[_0x2f3a90(0x195)]>0x0)[_0x2f3a90(0x195)];return _0x530258===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a161_0x1ecc05=a161_0x48e2;(function(_0x2d6ddb,_0x40c532){const _0x2c7c7a=a161_0x48e2,_0x3c8846=_0x2d6ddb();while(!![]){try{const _0x44d4cf=-parseInt(_0x2c7c7a(0x12a))/0x1+parseInt(_0x2c7c7a(0x126))/0x2*(-parseInt(_0x2c7c7a(0x112))/0x3)+parseInt(_0x2c7c7a(0x133))/0x4*(-parseInt(_0x2c7c7a(0x10c))/0x5)+-parseInt(_0x2c7c7a(0x132))/0x6*(-parseInt(_0x2c7c7a(0x114))/0x7)+-parseInt(_0x2c7c7a(0x12f))/0x8+parseInt(_0x2c7c7a(0x116))/0x9+-parseInt(_0x2c7c7a(0x128))/0xa*(-parseInt(_0x2c7c7a(0x11e))/0xb);if(_0x44d4cf===_0x40c532)break;else _0x3c8846['push'](_0x3c8846['shift']());}catch(_0x446c40){_0x3c8846['push'](_0x3c8846['shift']());}}}(a161_0x421b,0x73174));function a161_0x421b(){const _0x534b58=['5460656ZqjAtn','passthrough','activation','5559018SRyWMz','35432taSukB','enum','record','day','235khJQJZ','literal','number','journeys','journey','reentry_always','38679PbpcFZ','merge','7qlhRYK','launched','643815mczPDw','ab_test','refine','jump','object','draft','wait','type','121tmiXwN','isArray','end','simulation','string','stages','optional','min','50gfncrR','array','835630jhjNXX','reentry_unless_goal_achieved','24586ZkgeWk','lazy','decision_point','filter','boolean'];a161_0x421b=function(){return _0x534b58;};return a161_0x421b();}import{z}from'zod';import{RuleDefSchema}from'./segment-schema.js';import{ActivationDefSchema}from'./activation-schema.js';export const JourneyStateTypeSchema=z[a161_0x1ecc05(0x134)]([a161_0x1ecc05(0x11b),a161_0x1ecc05(0x121),a161_0x1ecc05(0x115)]);export const ReentryModeTypeSchema=z[a161_0x1ecc05(0x134)](['no_reentry',a161_0x1ecc05(0x129),a161_0x1ecc05(0x111)]);export const WaitUnitTypeSchema=z['enum']([a161_0x1ecc05(0x10b),'week']);export const StepTypeValueSchema=z[a161_0x1ecc05(0x134)]([a161_0x1ecc05(0x11c),a161_0x1ecc05(0x131),a161_0x1ecc05(0x12c),a161_0x1ecc05(0x117),'merge',a161_0x1ecc05(0x119),a161_0x1ecc05(0x120)]);export const EmbeddedSegmentDefSchema=z[a161_0x1ecc05(0x11a)]({'description':z['string']()['optional'](),'rule':RuleDefSchema});const JumpTargetDefSchema=z[a161_0x1ecc05(0x11a)]({'journey':z[a161_0x1ecc05(0x122)](),'stage':z['string'](),'bundle_id':z[a161_0x1ecc05(0x122)]()['optional']()});export const CriteriaDefSchema=z['object']({'name':z[a161_0x1ecc05(0x122)](),'description':z['string']()[a161_0x1ecc05(0x124)](),'segment':z[a161_0x1ecc05(0x122)](),'target':JumpTargetDefSchema[a161_0x1ecc05(0x124)]()});const WaitConditionTimeoutDefSchema=z['object']({'duration':z[a161_0x1ecc05(0x10e)](),'unit':WaitUnitTypeSchema,'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)]()}),WaitConditionDefSchema=z[a161_0x1ecc05(0x11a)]({'segment':z[a161_0x1ecc05(0x122)](),'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'timeout':WaitConditionTimeoutDefSchema[a161_0x1ecc05(0x124)]()}),WaitStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'duration':z[a161_0x1ecc05(0x10e)]()['optional'](),'unit':WaitUnitTypeSchema[a161_0x1ecc05(0x124)](),'wait_until':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'condition':WaitConditionDefSchema[a161_0x1ecc05(0x124)](),'days_of_week':z[a161_0x1ecc05(0x127)](z['string']())[a161_0x1ecc05(0x124)]()}),StepBaseFields={'name':z['string'](),'uuid':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)]()},WaitStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x11c)),'with':WaitStepParamsDefSchema}),ActivationStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'activation':z[a161_0x1ecc05(0x122)]()}),ActivationStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z['literal']('activation'),'with':ActivationStepParamsDefSchema}),DecisionBranchDefSchema=z['object']({'name':z[a161_0x1ecc05(0x122)](),'segment':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'segment_id':z['string']()[a161_0x1ecc05(0x124)](),'excluded':z[a161_0x1ecc05(0x12e)]()[a161_0x1ecc05(0x124)](),'next':z['string']()[a161_0x1ecc05(0x124)]()}),DecisionPointStepParamsDefSchema=z['object']({'branches':z[a161_0x1ecc05(0x127)](DecisionBranchDefSchema)}),DecisionPointStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x12c)),'with':DecisionPointStepParamsDefSchema}),AbTestVariantDefSchema=z[a161_0x1ecc05(0x11a)]({'id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'name':z[a161_0x1ecc05(0x122)](),'percentage':z[a161_0x1ecc05(0x10e)](),'next':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)]()}),AbTestStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'variants':z['array'](AbTestVariantDefSchema),'unique_id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'customized_split':z[a161_0x1ecc05(0x12e)]()[a161_0x1ecc05(0x124)]()}),AbTestStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)]('ab_test'),'with':AbTestStepParamsDefSchema}),MergeStepDefSchema=z['object']({...StepBaseFields,'type':z['literal'](a161_0x1ecc05(0x113))}),JumpStepParamsDefSchema=z[a161_0x1ecc05(0x11a)]({'target':JumpTargetDefSchema}),JumpStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x119)),'with':JumpStepParamsDefSchema}),EndStepDefSchema=z[a161_0x1ecc05(0x11a)]({...StepBaseFields,'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x120))})[a161_0x1ecc05(0x130)]();export const StepDefSchema=z['discriminatedUnion'](a161_0x1ecc05(0x11d),[WaitStepDefSchema,ActivationStepDefSchema,DecisionPointStepDefSchema,AbTestStepDefSchema,MergeStepDefSchema,JumpStepDefSchema,EndStepDefSchema]);export const StageDefSchema=z[a161_0x1ecc05(0x11a)]({'name':z[a161_0x1ecc05(0x122)](),'description':z['string']()[a161_0x1ecc05(0x124)](),'id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'entry_criteria':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'exit_criteria':z['array'](CriteriaDefSchema)['optional'](),'milestone':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'root_step':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'steps':z[a161_0x1ecc05(0x127)](StepDefSchema)[a161_0x1ecc05(0x124)]()});function a161_0x48e2(_0x225ba7,_0x2111bc){_0x225ba7=_0x225ba7-0x10a;const _0x421bc2=a161_0x421b();let _0x48e26e=_0x421bc2[_0x225ba7];return _0x48e26e;}export const JourneyEntryDefSchema=z[a161_0x1ecc05(0x11a)]({'name':z[a161_0x1ecc05(0x122)]()['optional'](),'version':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'state':JourneyStateTypeSchema[a161_0x1ecc05(0x124)](),'latest':z[a161_0x1ecc05(0x12e)]()[a161_0x1ecc05(0x124)](),'stages':z['array'](StageDefSchema),'id':z[a161_0x1ecc05(0x122)]()['optional'](),'version_number':z[a161_0x1ecc05(0x10e)]()['optional'](),'goal':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'reentry':ReentryModeTypeSchema[a161_0x1ecc05(0x124)]()});export const JourneyDefSchema=z[a161_0x1ecc05(0x12b)](()=>z[a161_0x1ecc05(0x11a)]({'type':z[a161_0x1ecc05(0x10d)](a161_0x1ecc05(0x110)),'name':z['string']()[a161_0x1ecc05(0x125)](0x1,'Journey\x20name\x20is\x20required'),'description':z[a161_0x1ecc05(0x122)]()['optional'](),'bundle_id':z['string']()[a161_0x1ecc05(0x124)](),'bundle_name':z[a161_0x1ecc05(0x122)]()['optional'](),'folder_id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'reentry':ReentryModeTypeSchema[a161_0x1ecc05(0x124)](),'allow_reentry':z['boolean']()[a161_0x1ecc05(0x124)](),'goal':CriteriaDefSchema[a161_0x1ecc05(0x124)](),'id':z[a161_0x1ecc05(0x122)]()[a161_0x1ecc05(0x124)](),'version':z[a161_0x1ecc05(0x122)]()['optional'](),'version_number':z[a161_0x1ecc05(0x10e)]()[a161_0x1ecc05(0x124)](),'stages':z[a161_0x1ecc05(0x127)](StageDefSchema)['optional'](),'versions':z[a161_0x1ecc05(0x127)](JourneyEntryDefSchema)[a161_0x1ecc05(0x124)](),'journeys':z['array'](JourneyEntryDefSchema)[a161_0x1ecc05(0x124)](),'segments':z[a161_0x1ecc05(0x10a)](z[a161_0x1ecc05(0x122)](),EmbeddedSegmentDefSchema)[a161_0x1ecc05(0x124)](),'activations':z[a161_0x1ecc05(0x10a)](z[a161_0x1ecc05(0x122)](),ActivationDefSchema)[a161_0x1ecc05(0x124)]()})[a161_0x1ecc05(0x118)](_0x24e87a=>{const _0x56d685=a161_0x1ecc05,_0x44ed01=[_0x24e87a[_0x56d685(0x10f)],_0x24e87a[_0x56d685(0x123)],_0x24e87a['versions']][_0x56d685(0x12d)](_0x1667f6=>Array[_0x56d685(0x11f)](_0x1667f6)&&_0x1667f6['length']>0x0)['length'];return _0x44ed01===0x1;},{'message':'Journey\x20must\x20have\x20exactly\x20one\x20of:\x20journeys,\x20stages,\x20or\x20versions'}));const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a163_0x446f(_0x310534,_0x26e11c){_0x310534=_0x310534-0x66;var _0x2f71c1=a163_0x2f71();var _0x446f57=_0x2f71c1[_0x310534];return _0x446f57;}function a163_0x2f71(){var _0x3a8160=['7KSpTii','3hSLxuR','114myPHTp','33VvedDY','1555292HoXsui','3547410VSKKdJ','873254hqeSGD','10079991eVBrpp','213295MhZCHY','11605688vkgaNC','1762020tBAjAK'];a163_0x2f71=function(){return _0x3a8160;};return a163_0x2f71();}(function(_0x3af1fb,_0x2b2156){var _0x316c04=a163_0x446f,_0x59fe9a=_0x3af1fb();while(!![]){try{var _0x47336e=-parseInt(_0x316c04(0x70))/0x1+-parseInt(_0x316c04(0x69))/0x2+parseInt(_0x316c04(0x6b))/0x3*(parseInt(_0x316c04(0x6e))/0x4)+parseInt(_0x316c04(0x67))/0x5*(parseInt(_0x316c04(0x6c))/0x6)+-parseInt(_0x316c04(0x6a))/0x7*(-parseInt(_0x316c04(0x68))/0x8)+parseInt(_0x316c04(0x66))/0x9+parseInt(_0x316c04(0x6f))/0xa*(-parseInt(_0x316c04(0x6d))/0xb);if(_0x47336e===_0x2b2156)break;else _0x59fe9a['push'](_0x59fe9a['shift']());}catch(_0x458ce3){_0x59fe9a['push'](_0x59fe9a['shift']());}}}(a163_0x2f71,0xe850f));export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
1
+ (function(_0x1857cd,_0x544fcb){var _0x11e0e8=a163_0xc330,_0x133f45=_0x1857cd();while(!![]){try{var _0x1f74aa=-parseInt(_0x11e0e8(0xe3))/0x1*(-parseInt(_0x11e0e8(0xea))/0x2)+-parseInt(_0x11e0e8(0xe2))/0x3*(-parseInt(_0x11e0e8(0xe9))/0x4)+-parseInt(_0x11e0e8(0xe8))/0x5*(-parseInt(_0x11e0e8(0xe4))/0x6)+parseInt(_0x11e0e8(0xec))/0x7+parseInt(_0x11e0e8(0xe7))/0x8*(-parseInt(_0x11e0e8(0xe5))/0x9)+-parseInt(_0x11e0e8(0xe6))/0xa+-parseInt(_0x11e0e8(0xeb))/0xb;if(_0x1f74aa===_0x544fcb)break;else _0x133f45['push'](_0x133f45['shift']());}catch(_0x20bed2){_0x133f45['push'](_0x133f45['shift']());}}}(a163_0x43b0,0x2f1e7));function a163_0xc330(_0x58b985,_0x503228){_0x58b985=_0x58b985-0xe2;var _0x43b048=a163_0x43b0();var _0xc33072=_0x43b048[_0x58b985];return _0xc33072;}function a163_0x43b0(){var _0x38ca26=['84124WxQiaS','18BSOGTy','990902vDSMEF','267519KyQvWc','51XdmKRG','41649CvEFjC','49404ltbVFx','1379313GYEwCt','3589490NzOmOY','8jqhVbw','15izcjWr'];a163_0x43b0=function(){return _0x38ca26;};return a163_0x43b0();}export{OperatorTypeSchema,TimeUnitSchema,AggregationTypeSchema,ArrayMatchingSchema,OperatorDefSchema,AggregationDefSchema,TimeWindowDefSchema,FilterColumnConditionDefSchema,FilterRuleDefSchema,ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema,ConditionDefSchema,RuleDefSchema,SegmentDefSchema}from'./segment-schema.js';export{ScheduleTypeSchema,RepeatUnitSchema,ScheduleDefSchema,NotificationDefSchema,ActivationColumnDefSchema,ActivationBehaviorDefSchema,ActivationDefSchema}from'./activation-schema.js';
@@ -1 +1 @@
1
- const a164_0x455e43=a164_0x4a86;(function(_0x2e7917,_0x302de5){const _0x16df92=a164_0x4a86,_0x171d5f=_0x2e7917();while(!![]){try{const _0x16084e=parseInt(_0x16df92(0x174))/0x1+-parseInt(_0x16df92(0x162))/0x2*(parseInt(_0x16df92(0x155))/0x3)+-parseInt(_0x16df92(0x16d))/0x4*(-parseInt(_0x16df92(0x15c))/0x5)+parseInt(_0x16df92(0x18f))/0x6+-parseInt(_0x16df92(0x194))/0x7+parseInt(_0x16df92(0x171))/0x8+parseInt(_0x16df92(0x15b))/0x9;if(_0x16084e===_0x302de5)break;else _0x171d5f['push'](_0x171d5f['shift']());}catch(_0x227d06){_0x171d5f['push'](_0x171d5f['shift']());}}}(a164_0x2af0,0x2ca09));import{z}from'zod';export const OperatorTypeSchema=z[a164_0x455e43(0x16b)](['Equal',a164_0x455e43(0x167),a164_0x455e43(0x16c),a164_0x455e43(0x18d),'LessEqual','In',a164_0x455e43(0x15f),a164_0x455e43(0x170),a164_0x455e43(0x156),a164_0x455e43(0x16a),a164_0x455e43(0x17b),a164_0x455e43(0x196),'StartWith',a164_0x455e43(0x178),'TimeRange']);export const TimeUnitSchema=z[a164_0x455e43(0x16b)](['second',a164_0x455e43(0x176),a164_0x455e43(0x189),'day',a164_0x455e43(0x15e),a164_0x455e43(0x188),a164_0x455e43(0x163)]);export const AggregationTypeSchema=z[a164_0x455e43(0x16b)]([a164_0x455e43(0x169),a164_0x455e43(0x172),'Average','Min',a164_0x455e43(0x151),a164_0x455e43(0x14e),a164_0x455e43(0x186),'Last']);const TemporalValueSchema=z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x182)]({'timestamp':z[a164_0x455e43(0x181)]()}),z[a164_0x455e43(0x182)]({'last':z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x165)](z[a164_0x455e43(0x181)](),z[a164_0x455e43(0x184)]())]),'unit':z[a164_0x455e43(0x181)]()})]),OperatorValueSchema=z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x181)](),z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x17d)](),TemporalValueSchema,z['array'](z[a164_0x455e43(0x180)]([z[a164_0x455e43(0x181)](),z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x17d)]()]))]),OPERATORS_REQUIRING_VALUE=new Set(['Equal',a164_0x455e43(0x167),'GreaterEqual',a164_0x455e43(0x16c),'LessEqual','In',a164_0x455e43(0x196),a164_0x455e43(0x17f),a164_0x455e43(0x178),'Regexp',a164_0x455e43(0x16a),a164_0x455e43(0x17b)]),OPERATORS_REQUIRING_UNIT=new Set([a164_0x455e43(0x16a),'TimeWithinNext']);export const OperatorDefSchema=z[a164_0x455e43(0x182)]({'type':OperatorTypeSchema,'not':z[a164_0x455e43(0x17d)]()['optional'](),'value':OperatorValueSchema[a164_0x455e43(0x154)](),'min':z[a164_0x455e43(0x180)]([z['number'](),z[a164_0x455e43(0x181)](),TemporalValueSchema])[a164_0x455e43(0x154)](),'max':z['union']([z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x181)](),TemporalValueSchema])[a164_0x455e43(0x154)](),'unit':TimeUnitSchema['optional'](),'duration':z[a164_0x455e43(0x182)]({'day':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)](),'week':z[a164_0x455e43(0x184)]()['optional'](),'month':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)](),'year':z['number']()['optional'](),'hour':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)](),'minute':z[a164_0x455e43(0x184)]()['optional'](),'second':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)]()})['optional'](),'from':z[a164_0x455e43(0x182)]({'last':z['union']([z[a164_0x455e43(0x184)](),z[a164_0x455e43(0x181)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x455e43(0x17d)]()[a164_0x455e43(0x154)]()})['superRefine']((_0x545487,_0x1b8642)=>{const _0x510b72=a164_0x455e43;OPERATORS_REQUIRING_VALUE[_0x510b72(0x158)](_0x545487[_0x510b72(0x183)])&&(_0x545487[_0x510b72(0x177)]===undefined||_0x545487['value']===null)&&_0x1b8642[_0x510b72(0x15a)]({'code':_0x510b72(0x192),'message':_0x510b72(0x175)+_0x545487['type']+'\x27\x20requires\x20a\x20value','path':[_0x510b72(0x177)]}),_0x545487[_0x510b72(0x183)]==='Between'&&_0x545487[_0x510b72(0x18b)]===undefined&&_0x545487[_0x510b72(0x17e)]===undefined&&_0x1b8642[_0x510b72(0x15a)]({'code':_0x510b72(0x192),'message':'Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','params':{'validationCode':_0x510b72(0x160)}}),OPERATORS_REQUIRING_UNIT[_0x510b72(0x158)](_0x545487[_0x510b72(0x183)])&&_0x545487[_0x510b72(0x177)]!==undefined&&!_0x545487[_0x510b72(0x161)]&&_0x1b8642[_0x510b72(0x15a)]({'code':_0x510b72(0x192),'message':_0x510b72(0x175)+_0x545487[_0x510b72(0x183)]+_0x510b72(0x153),'path':[_0x510b72(0x161)],'params':{'validationCode':_0x510b72(0x190)}}),_0x545487[_0x510b72(0x183)]===_0x510b72(0x191)&&(!_0x545487[_0x510b72(0x159)]&&_0x1b8642['addIssue']({'code':_0x510b72(0x192),'message':'TimeRange\x20operator\x20requires\x20\x27duration\x27','path':[_0x510b72(0x159)]}),!_0x545487[_0x510b72(0x197)]&&_0x1b8642['addIssue']({'code':'custom','message':_0x510b72(0x168),'path':[_0x510b72(0x197)]}));});function a164_0x2af0(){const _0x29e043=['GreaterEqual','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','1689774ZNQFJL','MISSING_TIME_UNIT','TimeRange','custom','all','2316342oNPpUE','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','Contain','from','include','Last','CountDistinct','segment','literal','Max','column','\x27\x20requires\x20a\x20time\x20unit','optional','3DwVwZr','IsNull','timestamp','has','duration','addIssue','1379196MMMSdH','10obQRWt','realtime','week','Between','MISSING_BETWEEN_BOUNDS','unit','593930NtyZVQ','year','lazy','record','Column','Greater','TimeRange\x20operator\x20requires\x20\x27from\x27','Count','TimeWithinPast','enum','Less','21992pfkRbq','array','superRefine','Regexp','2783944rWBvRw','Sum','Min','16802AfpltN','Operator\x20\x27','minute','value','EndWith','any','operator','TimeWithinNext','funnel_stage','boolean','max','StartWith','union','string','object','type','number','And','First','exclude','month','hour','batch','min','Segment\x20reference\x20must\x20not\x20be\x20empty'];a164_0x2af0=function(){return _0x29e043;};return a164_0x2af0();}export const ArrayMatchingSchema=z['union']([z[a164_0x455e43(0x150)](a164_0x455e43(0x179)),z[a164_0x455e43(0x150)](a164_0x455e43(0x193)),z[a164_0x455e43(0x182)]({'atLeast':z[a164_0x455e43(0x184)]()}),z[a164_0x455e43(0x182)]({'atMost':z[a164_0x455e43(0x184)]()}),z[a164_0x455e43(0x182)]({'exactly':z['number']()})]);export const AggregationDefSchema=z['discriminatedUnion'](a164_0x455e43(0x183),[z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x16b)]([a164_0x455e43(0x172),a164_0x455e43(0x173),'Max','Average']),'column':z['string'](),'groupingColumns':z[a164_0x455e43(0x16e)](z['string']())[a164_0x455e43(0x154)]()}),z[a164_0x455e43(0x182)]({'type':z['literal'](a164_0x455e43(0x169)),'groupingColumns':z[a164_0x455e43(0x16e)](z[a164_0x455e43(0x181)]())[a164_0x455e43(0x154)]()}),z['object']({'type':z[a164_0x455e43(0x150)](a164_0x455e43(0x14e)),'columns':z[a164_0x455e43(0x16e)](z[a164_0x455e43(0x181)]())}),z[a164_0x455e43(0x182)]({'type':z['enum']([a164_0x455e43(0x186),a164_0x455e43(0x199)]),'column':z[a164_0x455e43(0x181)](),'orderColumn':z[a164_0x455e43(0x181)](),'groupingColumns':z[a164_0x455e43(0x16e)](z[a164_0x455e43(0x181)]())[a164_0x455e43(0x154)]()})]);export const TimeWindowDefSchema=z[a164_0x455e43(0x182)]({'duration':z[a164_0x455e43(0x184)](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x455e43(0x16a),a164_0x455e43(0x17b),a164_0x455e43(0x191)]);export const FilterColumnConditionDefSchema=z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x150)](a164_0x455e43(0x166)),'column':z['string'](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x455e43(0x154)]()})[a164_0x455e43(0x16f)]((_0x26fd0f,_0xabf9c7)=>{const _0xcd2fcb=a164_0x455e43,_0x2c74dd=_0x26fd0f[_0xcd2fcb(0x17a)][_0xcd2fcb(0x183)];_0x26fd0f[_0xcd2fcb(0x152)]===_0xcd2fcb(0x157)?!TIMESTAMP_OPERATORS[_0xcd2fcb(0x158)](_0x2c74dd)&&_0xabf9c7['addIssue']({'code':_0xcd2fcb(0x192),'message':_0xcd2fcb(0x18e)+_0x2c74dd+'\x27)','path':[_0xcd2fcb(0x17a),_0xcd2fcb(0x183)]}):TIMESTAMP_OPERATORS[_0xcd2fcb(0x158)](_0x2c74dd)&&_0xabf9c7[_0xcd2fcb(0x15a)]({'code':_0xcd2fcb(0x192),'message':_0xcd2fcb(0x175)+_0x2c74dd+_0xcd2fcb(0x195),'path':[_0xcd2fcb(0x17a),_0xcd2fcb(0x183)]});});export const FilterRuleDefSchema=z[a164_0x455e43(0x182)]({'type':z['literal']('And'),'conditions':z[a164_0x455e43(0x16e)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x455e43(0x164)](()=>z[a164_0x455e43(0x182)]({'type':z['literal']('Value'),'attribute':z[a164_0x455e43(0x181)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x455e43(0x154)](),'exclude':z[a164_0x455e43(0x17d)]()['optional'](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'filter':FilterRuleDefSchema[a164_0x455e43(0x154)](),'limit':z['number']()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x455e43(0x164)](()=>z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x150)]('Behavior'),'attribute':z[a164_0x455e43(0x181)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x455e43(0x154)](),'exclude':z[a164_0x455e43(0x17d)]()[a164_0x455e43(0x154)](),'aggregation':AggregationDefSchema['optional'](),'source':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'filter':FilterRuleDefSchema['optional'](),'timeWindow':TimeWindowDefSchema[a164_0x455e43(0x154)](),'limit':z[a164_0x455e43(0x184)]()[a164_0x455e43(0x154)]()}));function a164_0x4a86(_0x370703,_0x2717fe){_0x370703=_0x370703-0x14e;const _0x2af08f=a164_0x2af0();let _0x4a8615=_0x2af08f[_0x370703];return _0x4a8615;}export const ColumnConditionDefSchema=z['object']({'type':z[a164_0x455e43(0x150)](a164_0x455e43(0x166)),'column':z[a164_0x455e43(0x181)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x455e43(0x164)](()=>z[a164_0x455e43(0x182)]({'type':z['enum']([a164_0x455e43(0x185),'Or']),'conditions':z[a164_0x455e43(0x16e)](ConditionDefSchema),'description':z[a164_0x455e43(0x181)]()['optional']()}));export const SegmentRefConditionDefSchema=z['object']({'type':z[a164_0x455e43(0x16b)]([a164_0x455e43(0x198),a164_0x455e43(0x187)]),'segment':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x18b)](0x1,a164_0x455e43(0x18c))});export const ConditionDefSchema=z[a164_0x455e43(0x164)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z['lazy'](()=>z[a164_0x455e43(0x182)]({'type':z[a164_0x455e43(0x16b)]([a164_0x455e43(0x185),'Or']),'conditions':z[a164_0x455e43(0x16e)](ConditionDefSchema),'description':z['string']()['optional']()}));export const SegmentDefSchema=z[a164_0x455e43(0x182)]({'type':z['literal'](a164_0x455e43(0x14f))[a164_0x455e43(0x154)](),'name':z['string']()[a164_0x455e43(0x18b)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'folder':z[a164_0x455e43(0x181)]()[a164_0x455e43(0x154)](),'rule':RuleDefSchema[a164_0x455e43(0x154)](),'kind':z['enum']([a164_0x455e43(0x18a),a164_0x455e43(0x15d),a164_0x455e43(0x17c)])[a164_0x455e43(0x154)](),'visible':z[a164_0x455e43(0x17d)]()[a164_0x455e43(0x154)](),'activations':z['array'](z[a164_0x455e43(0x179)]())[a164_0x455e43(0x154)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
1
+ const a164_0x56efb6=a164_0x2b11;(function(_0x2bf565,_0x5e9df9){const _0x3a0fa1=a164_0x2b11,_0x382871=_0x2bf565();while(!![]){try{const _0x50ff57=parseInt(_0x3a0fa1(0x14e))/0x1*(-parseInt(_0x3a0fa1(0x17e))/0x2)+parseInt(_0x3a0fa1(0x13b))/0x3+parseInt(_0x3a0fa1(0x160))/0x4+parseInt(_0x3a0fa1(0x170))/0x5*(-parseInt(_0x3a0fa1(0x137))/0x6)+-parseInt(_0x3a0fa1(0x15d))/0x7+-parseInt(_0x3a0fa1(0x143))/0x8*(-parseInt(_0x3a0fa1(0x163))/0x9)+parseInt(_0x3a0fa1(0x167))/0xa;if(_0x50ff57===_0x5e9df9)break;else _0x382871['push'](_0x382871['shift']());}catch(_0x84c7a2){_0x382871['push'](_0x382871['shift']());}}}(a164_0x5d6f,0x1e15f));import{z}from'zod';function a164_0x5d6f(){const _0x15dfe8=['column','TimeRange\x20operator\x20requires\x20\x27from\x27','Timestamp\x20column\x20only\x20supports\x20TimeWithinPast,\x20TimeWithinNext,\x20or\x20TimeRange\x20operators\x20(got\x20\x27','Between','Value','min','Less','147603RsRBTR','Last','TimeRange\x20operator\x20requires\x20\x27duration\x27','MISSING_BETWEEN_BOUNDS','enum','realtime','timestamp','boolean','LessEqual','Count','TimeWithinPast','day','Greater','include','custom','579271BrKhqC','has','GreaterEqual','605432rnUIjT','Operator\x20\x27','Sum','117dlReFn','array','Column','exclude','1138620VFLvdH','union','week','Equal','\x27\x20requires\x20a\x20value','string','MISSING_TIME_UNIT','max','TimeWithinNext','24890TMEkUd','First','And','all','optional','operator','literal','record','CountDistinct','\x27\x20is\x20only\x20valid\x20for\x20the\x20\x27timestamp\x27\x20column','StartWith','EndWith','batch','funnel_stage','2tpueZf','value','discriminatedUnion','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','addIssue','Min','Max','hour','year','258AcdbRC','Contain','Average','second','402954FLMxyN','minute','number','Segment\x20reference\x20must\x20not\x20be\x20empty','duration','object','from','TimeRange','103448TPEwZN','type','lazy','\x27\x20requires\x20a\x20time\x20unit'];a164_0x5d6f=function(){return _0x15dfe8;};return a164_0x5d6f();}export const OperatorTypeSchema=z[a164_0x56efb6(0x152)](['Equal','Greater',a164_0x56efb6(0x14d),a164_0x56efb6(0x15f),a164_0x56efb6(0x156),'In',a164_0x56efb6(0x14a),'Regexp','IsNull',a164_0x56efb6(0x158),'TimeWithinNext',a164_0x56efb6(0x138),a164_0x56efb6(0x17a),a164_0x56efb6(0x17b),a164_0x56efb6(0x142)]);export const TimeUnitSchema=z['enum']([a164_0x56efb6(0x13a),a164_0x56efb6(0x13c),a164_0x56efb6(0x135),a164_0x56efb6(0x159),a164_0x56efb6(0x169),'month',a164_0x56efb6(0x136)]);export const AggregationTypeSchema=z['enum'](['Count',a164_0x56efb6(0x162),'Average','Min',a164_0x56efb6(0x184),'CountDistinct',a164_0x56efb6(0x171),a164_0x56efb6(0x14f)]);const TemporalValueSchema=z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x140)]({'timestamp':z[a164_0x56efb6(0x16c)]()}),z[a164_0x56efb6(0x140)]({'last':z[a164_0x56efb6(0x168)]([z['number'](),z[a164_0x56efb6(0x177)](z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)]())]),'unit':z[a164_0x56efb6(0x16c)]()})]),OperatorValueSchema=z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x155)](),TemporalValueSchema,z['array'](z['union']([z[a164_0x56efb6(0x16c)](),z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x155)]()]))]),OPERATORS_REQUIRING_VALUE=new Set([a164_0x56efb6(0x16a),a164_0x56efb6(0x15a),a164_0x56efb6(0x15f),'Less',a164_0x56efb6(0x156),'In','Contain',a164_0x56efb6(0x17a),'EndWith','Regexp',a164_0x56efb6(0x158),a164_0x56efb6(0x16f)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a164_0x56efb6(0x16f)]);export const OperatorDefSchema=z[a164_0x56efb6(0x140)]({'type':OperatorTypeSchema,'not':z['boolean']()[a164_0x56efb6(0x174)](),'value':OperatorValueSchema[a164_0x56efb6(0x174)](),'min':z[a164_0x56efb6(0x168)]([z['number'](),z[a164_0x56efb6(0x16c)](),TemporalValueSchema])[a164_0x56efb6(0x174)](),'max':z[a164_0x56efb6(0x168)]([z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x16c)](),TemporalValueSchema])['optional'](),'unit':TimeUnitSchema['optional'](),'duration':z['object']({'day':z[a164_0x56efb6(0x13d)]()['optional'](),'week':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)](),'month':z[a164_0x56efb6(0x13d)]()['optional'](),'year':z['number']()['optional'](),'hour':z['number']()[a164_0x56efb6(0x174)](),'minute':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)](),'second':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)]()})[a164_0x56efb6(0x174)](),'from':z['object']({'last':z['union']([z[a164_0x56efb6(0x13d)](),z[a164_0x56efb6(0x16c)]()]),'unit':TimeUnitSchema})['optional'](),'reverse':z[a164_0x56efb6(0x155)]()['optional']()})['superRefine']((_0x583cde,_0x450ce7)=>{const _0xbf8adb=a164_0x56efb6;OPERATORS_REQUIRING_VALUE['has'](_0x583cde[_0xbf8adb(0x144)])&&(_0x583cde[_0xbf8adb(0x17f)]===undefined||_0x583cde['value']===null)&&_0x450ce7['addIssue']({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x161)+_0x583cde['type']+_0xbf8adb(0x16b),'path':[_0xbf8adb(0x17f)]}),_0x583cde[_0xbf8adb(0x144)]==='Between'&&_0x583cde[_0xbf8adb(0x14c)]===undefined&&_0x583cde[_0xbf8adb(0x16e)]===undefined&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x181),'params':{'validationCode':_0xbf8adb(0x151)}}),OPERATORS_REQUIRING_UNIT[_0xbf8adb(0x15e)](_0x583cde[_0xbf8adb(0x144)])&&_0x583cde['value']!==undefined&&!_0x583cde['unit']&&_0x450ce7[_0xbf8adb(0x182)]({'code':'custom','message':_0xbf8adb(0x161)+_0x583cde[_0xbf8adb(0x144)]+_0xbf8adb(0x146),'path':['unit'],'params':{'validationCode':_0xbf8adb(0x16d)}}),_0x583cde[_0xbf8adb(0x144)]===_0xbf8adb(0x142)&&(!_0x583cde[_0xbf8adb(0x13f)]&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x150),'path':[_0xbf8adb(0x13f)]}),!_0x583cde[_0xbf8adb(0x141)]&&_0x450ce7[_0xbf8adb(0x182)]({'code':_0xbf8adb(0x15c),'message':_0xbf8adb(0x148),'path':[_0xbf8adb(0x141)]}));});export const ArrayMatchingSchema=z[a164_0x56efb6(0x168)]([z['literal']('any'),z[a164_0x56efb6(0x176)](a164_0x56efb6(0x173)),z[a164_0x56efb6(0x140)]({'atLeast':z['number']()}),z[a164_0x56efb6(0x140)]({'atMost':z[a164_0x56efb6(0x13d)]()}),z[a164_0x56efb6(0x140)]({'exactly':z['number']()})]);export const AggregationDefSchema=z[a164_0x56efb6(0x180)](a164_0x56efb6(0x144),[z['object']({'type':z['enum']([a164_0x56efb6(0x162),a164_0x56efb6(0x183),'Max',a164_0x56efb6(0x139)]),'column':z['string'](),'groupingColumns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())[a164_0x56efb6(0x174)]()}),z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x157)),'groupingColumns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())['optional']()}),z['object']({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x178)),'columns':z[a164_0x56efb6(0x164)](z[a164_0x56efb6(0x16c)]())}),z['object']({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x171),a164_0x56efb6(0x14f)]),'column':z['string'](),'orderColumn':z[a164_0x56efb6(0x16c)](),'groupingColumns':z['array'](z[a164_0x56efb6(0x16c)]())['optional']()})]);export const TimeWindowDefSchema=z['object']({'duration':z['number'](),'unit':TimeUnitSchema});const TIMESTAMP_OPERATORS=new Set([a164_0x56efb6(0x158),'TimeWithinNext',a164_0x56efb6(0x142)]);export const FilterColumnConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x165)),'column':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x56efb6(0x174)]()})['superRefine']((_0x8d7d8,_0x1fc318)=>{const _0xf57221=a164_0x56efb6,_0x26e1ce=_0x8d7d8['operator']['type'];_0x8d7d8[_0xf57221(0x147)]===_0xf57221(0x154)?!TIMESTAMP_OPERATORS['has'](_0x26e1ce)&&_0x1fc318[_0xf57221(0x182)]({'code':_0xf57221(0x15c),'message':_0xf57221(0x149)+_0x26e1ce+'\x27)','path':[_0xf57221(0x175),_0xf57221(0x144)]}):TIMESTAMP_OPERATORS['has'](_0x26e1ce)&&_0x1fc318[_0xf57221(0x182)]({'code':_0xf57221(0x15c),'message':_0xf57221(0x161)+_0x26e1ce+_0xf57221(0x179),'path':[_0xf57221(0x175),_0xf57221(0x144)]});});export const FilterRuleDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)](a164_0x56efb6(0x172)),'conditions':z[a164_0x56efb6(0x164)](FilterColumnConditionDefSchema)});export const ValueConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z['literal'](a164_0x56efb6(0x14b)),'attribute':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema[a164_0x56efb6(0x174)](),'exclude':z[a164_0x56efb6(0x155)]()[a164_0x56efb6(0x174)](),'aggregation':AggregationDefSchema[a164_0x56efb6(0x174)](),'source':z[a164_0x56efb6(0x16c)]()['optional'](),'filter':FilterRuleDefSchema[a164_0x56efb6(0x174)](),'limit':z[a164_0x56efb6(0x13d)]()['optional']()}));export const BehaviorConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z['literal']('Behavior'),'attribute':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema,'arrayMatching':ArrayMatchingSchema['optional'](),'exclude':z['boolean']()['optional'](),'aggregation':AggregationDefSchema[a164_0x56efb6(0x174)](),'source':z['string']()[a164_0x56efb6(0x174)](),'filter':FilterRuleDefSchema[a164_0x56efb6(0x174)](),'timeWindow':TimeWindowDefSchema[a164_0x56efb6(0x174)](),'limit':z[a164_0x56efb6(0x13d)]()[a164_0x56efb6(0x174)]()}));export const ColumnConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z['literal'](a164_0x56efb6(0x165)),'column':z[a164_0x56efb6(0x16c)](),'operator':OperatorDefSchema});export const CompositeConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z['object']({'type':z['enum']([a164_0x56efb6(0x172),'Or']),'conditions':z[a164_0x56efb6(0x164)](ConditionDefSchema),'description':z['string']()['optional']()}));function a164_0x2b11(_0x29342,_0x2fde75){_0x29342=_0x29342-0x135;const _0x5d6f5a=a164_0x5d6f();let _0x2b1151=_0x5d6f5a[_0x29342];return _0x2b1151;}export const SegmentRefConditionDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x15b),a164_0x56efb6(0x166)]),'segment':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x14c)](0x1,a164_0x56efb6(0x13e))});export const ConditionDefSchema=z[a164_0x56efb6(0x145)](()=>z['union']([ValueConditionDefSchema,BehaviorConditionDefSchema,ColumnConditionDefSchema,CompositeConditionDefSchema,SegmentRefConditionDefSchema]));export const RuleDefSchema=z[a164_0x56efb6(0x145)](()=>z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x172),'Or']),'conditions':z['array'](ConditionDefSchema),'description':z[a164_0x56efb6(0x16c)]()['optional']()}));export const SegmentDefSchema=z[a164_0x56efb6(0x140)]({'type':z[a164_0x56efb6(0x176)]('segment')[a164_0x56efb6(0x174)](),'name':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x14c)](0x1,'Segment\x20name\x20is\x20required'),'description':z[a164_0x56efb6(0x16c)]()[a164_0x56efb6(0x174)](),'folder':z[a164_0x56efb6(0x16c)]()['optional'](),'rule':RuleDefSchema['optional'](),'kind':z[a164_0x56efb6(0x152)]([a164_0x56efb6(0x17c),a164_0x56efb6(0x153),a164_0x56efb6(0x17d)])['optional'](),'visible':z['boolean']()[a164_0x56efb6(0x174)](),'activations':z[a164_0x56efb6(0x164)](z['any']())[a164_0x56efb6(0x174)]()});const _syncCheck1=!![],_syncCheck2=!![];void _syncCheck1,void _syncCheck2;
@@ -1 +1 @@
1
- function a165_0x5484(_0x267f17,_0x25cc49){_0x267f17=_0x267f17-0xcf;const _0x1cef5f=a165_0x1cef();let _0x548402=_0x1cef5f[_0x267f17];return _0x548402;}const a165_0x339dfa=a165_0x5484;(function(_0x2bab13,_0x6a6e82){const _0x3a78e4=a165_0x5484,_0x2dc824=_0x2bab13();while(!![]){try{const _0x45276a=parseInt(_0x3a78e4(0xd2))/0x1*(parseInt(_0x3a78e4(0xef))/0x2)+-parseInt(_0x3a78e4(0xe1))/0x3*(-parseInt(_0x3a78e4(0xde))/0x4)+-parseInt(_0x3a78e4(0xd4))/0x5*(-parseInt(_0x3a78e4(0xe2))/0x6)+parseInt(_0x3a78e4(0xe6))/0x7*(parseInt(_0x3a78e4(0xe9))/0x8)+parseInt(_0x3a78e4(0xea))/0x9*(-parseInt(_0x3a78e4(0xe0))/0xa)+parseInt(_0x3a78e4(0xec))/0xb*(parseInt(_0x3a78e4(0xcf))/0xc)+-parseInt(_0x3a78e4(0xe5))/0xd;if(_0x45276a===_0x6a6e82)break;else _0x2dc824['push'](_0x2dc824['shift']());}catch(_0x55dff8){_0x2dc824['push'](_0x2dc824['shift']());}}}(a165_0x1cef,0x60712));import{readFileSync}from'fs';import*as a165_0x21bd3e from'path';import*as a165_0x3a5d4a from'yaml';import{validateSegmentDef}from'./yaml-validator.js';import{validateJourneyDef}from'./journey-validator.js';import{validateCampaignDef}from'../engage/campaign-validator.js';import{validateTemplateDef}from'../engage/template-validator.js';const VALID_CAMPAIGN_TYPES=new Set([a165_0x339dfa(0xd5),'push']);export function isJourneyDef(_0x44498f){const _0x52f285=a165_0x339dfa;return typeof _0x44498f===_0x52f285(0xe4)&&_0x44498f!==null&&'type'in _0x44498f&&_0x44498f[_0x52f285(0xda)]===_0x52f285(0xd7);}export function isCampaignDef(_0x3306ce){const _0x323dd3=a165_0x339dfa;if(typeof _0x3306ce!=='object'||_0x3306ce===null)return![];const _0x289289=_0x3306ce,_0x2dc540=VALID_CAMPAIGN_TYPES['has'](_0x289289['campaign_type']);if(_0x289289[_0x323dd3(0xda)]==='campaign'&&_0x2dc540)return!![];if(_0x2dc540&&!_0x289289[_0x323dd3(0xda)])return!![];return![];}export function isTemplateDef(_0x40ae45){const _0x378f6d=a165_0x339dfa;return typeof _0x40ae45===_0x378f6d(0xe4)&&_0x40ae45!==null&&_0x378f6d(0xda)in _0x40ae45&&_0x40ae45[_0x378f6d(0xda)]===_0x378f6d(0xed);}export function isValidationResult(_0x1b98a3){return!('skipped'in _0x1b98a3);}export function createParseErrorResult(_0x482c40,_0x4ecb17,_0x2dc530,_0x231bbb,_0x4fe9d1=a165_0x339dfa(0xee)){const _0x464f82=a165_0x339dfa;return{'filePath':_0x482c40,'relativePath':_0x4ecb17,'source':_0x2dc530,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x464f82(0xe7),'message':_0x231bbb}],'warnings':[]},'fileType':_0x4fe9d1};}export function validateYamlFile(_0x5d478b,_0x546a0f,_0x23b3fa={}){const _0x1f806d=a165_0x339dfa,_0x2ffab1=a165_0x21bd3e[_0x1f806d(0xe3)](_0x546a0f,_0x5d478b)||a165_0x21bd3e[_0x1f806d(0xdf)](_0x5d478b);try{const _0x318ea7=readFileSync(_0x5d478b,_0x1f806d(0xd6)),_0x544080=a165_0x3a5d4a[_0x1f806d(0xf0)](_0x318ea7),_0x1f29dd=_0x544080[_0x1f806d(0xe8)]();if(!_0x1f29dd)return createParseErrorResult(_0x5d478b,_0x2ffab1,_0x318ea7,_0x1f806d(0xdc));let _0x1d5be9;if(isJourneyDef(_0x1f29dd))_0x1d5be9=_0x1f806d(0xd7);else{if(isCampaignDef(_0x1f29dd))_0x1d5be9='campaign';else isTemplateDef(_0x1f29dd)?_0x1d5be9=_0x1f806d(0xed):_0x1d5be9='segment';}if(_0x23b3fa[_0x1f806d(0xd3)]&&_0x1d5be9!==_0x23b3fa['filterType'])return{'filePath':_0x5d478b,'relativePath':_0x2ffab1,'skipped':!![],'reason':'not\x20a\x20'+_0x23b3fa[_0x1f806d(0xd3)]};const _0x261f46={'source':_0x318ea7,'document':_0x544080};let _0xadf665;if(_0x1d5be9===_0x1f806d(0xd7))_0xadf665=validateJourneyDef(_0x1f29dd,_0x261f46);else{if(_0x1d5be9===_0x1f806d(0xeb))_0xadf665=validateCampaignDef(_0x1f29dd,_0x261f46);else _0x1d5be9===_0x1f806d(0xed)?_0xadf665=validateTemplateDef(_0x1f29dd,_0x261f46):_0xadf665=validateSegmentDef(_0x1f29dd,_0x261f46);}return{'filePath':_0x5d478b,'relativePath':_0x2ffab1,'source':_0x318ea7,'result':_0xadf665,'fileType':_0x1d5be9};}catch(_0x3b7b83){const _0x2874f6=_0x3b7b83 instanceof Error?_0x3b7b83[_0x1f806d(0xd9)]:String(_0x3b7b83);return createParseErrorResult(_0x5d478b,_0x2ffab1,'',_0x1f806d(0xd8)+_0x2874f6);}}function a165_0x1cef(){const _0x44645f=['journey','YAML\x20parse\x20error:\x20','message','type','map','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','valid','4ZjedFm','basename','69670yJCiRc','299499KzgBXt','78QiuYzW','relative','object','8999445EynCzs','1197DJUNXK','YAML_PARSE_ERROR','toJSON','20264VfzqEP','189zhXBUt','campaign','189563pBWyAr','template','segment','25982MkjAqP','parseDocument','156oKiByI','result','warnings','26lLrKpp','filterType','53395WVBEwJ','email','utf-8'];a165_0x1cef=function(){return _0x44645f;};return a165_0x1cef();}export function validateYamlFiles(_0x44314d,_0x1db386,_0x46ca5f={}){const _0x2ab463=a165_0x339dfa;return _0x44314d[_0x2ab463(0xdb)](_0x43b55d=>validateYamlFile(_0x43b55d,_0x1db386,_0x46ca5f));}export function calculateSummary(_0x3934f6){const _0x4e86c2=a165_0x339dfa;let _0x35cc1f=0x0,_0x3a1dc1=0x0,_0x192d97=0x0,_0x878786=0x0;for(const _0xb0f9c5 of _0x3934f6){if(!isValidationResult(_0xb0f9c5)){_0x878786++;continue;}_0xb0f9c5[_0x4e86c2(0xd0)][_0x4e86c2(0xdd)]?_0x35cc1f++:_0x3a1dc1++,_0x192d97+=_0xb0f9c5['result'][_0x4e86c2(0xd1)]['length'];}return{'validCount':_0x35cc1f,'invalidCount':_0x3a1dc1,'warningCount':_0x192d97,'skippedCount':_0x878786,'hasErrors':_0x3a1dc1>0x0};}
1
+ const a165_0x32704c=a165_0x49ae;(function(_0x59a00f,_0x573620){const _0x289b5b=a165_0x49ae,_0x2dc3f5=_0x59a00f();while(!![]){try{const _0x49df69=-parseInt(_0x289b5b(0x146))/0x1+parseInt(_0x289b5b(0x12f))/0x2*(-parseInt(_0x289b5b(0x134))/0x3)+parseInt(_0x289b5b(0x149))/0x4+-parseInt(_0x289b5b(0x132))/0x5+parseInt(_0x289b5b(0x12a))/0x6+-parseInt(_0x289b5b(0x143))/0x7*(parseInt(_0x289b5b(0x13e))/0x8)+parseInt(_0x289b5b(0x12e))/0x9*(parseInt(_0x289b5b(0x129))/0xa);if(_0x49df69===_0x573620)break;else _0x2dc3f5['push'](_0x2dc3f5['shift']());}catch(_0x53f0c9){_0x2dc3f5['push'](_0x2dc3f5['shift']());}}}(a165_0x1ad1,0xde800));import{readFileSync}from'fs';import*as a165_0x57cc13 from'path';import*as a165_0x2dfc04 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_0x32704c(0x148),a165_0x32704c(0x13b)]);function a165_0x1ad1(){const _0x59c930=['type','7241800VdLMHK','basename','948nUStzM','map','campaign_type','segment','skipped','relative','has','push','parseDocument','not\x20a\x20','5239384rDMIEB','length','warnings','template','valid','7Egitso','filterType','object','282245bmOXjr','campaign','email','3175968zHNicB','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','YAML_PARSE_ERROR','YAML\x20parse\x20error:\x20','10TWNadM','1530426TcmBAz','toJSON','journey','utf-8','35778573CEtiZH','10934HcwYHh','message'];a165_0x1ad1=function(){return _0x59c930;};return a165_0x1ad1();}export function isJourneyDef(_0x221b63){const _0x29b31a=a165_0x32704c;return typeof _0x221b63===_0x29b31a(0x145)&&_0x221b63!==null&&_0x29b31a(0x131)in _0x221b63&&_0x221b63[_0x29b31a(0x131)]===_0x29b31a(0x12c);}export function isCampaignDef(_0x56bbf5){const _0x33a6d7=a165_0x32704c;if(typeof _0x56bbf5!==_0x33a6d7(0x145)||_0x56bbf5===null)return![];const _0x543a2a=_0x56bbf5,_0x4a38e5=VALID_CAMPAIGN_TYPES[_0x33a6d7(0x13a)](_0x543a2a[_0x33a6d7(0x136)]);if(_0x543a2a[_0x33a6d7(0x131)]===_0x33a6d7(0x147)&&_0x4a38e5)return!![];if(_0x4a38e5&&!_0x543a2a[_0x33a6d7(0x131)])return!![];return![];}function a165_0x49ae(_0x286d2a,_0x512450){_0x286d2a=_0x286d2a-0x127;const _0x1ad1b8=a165_0x1ad1();let _0x49ae50=_0x1ad1b8[_0x286d2a];return _0x49ae50;}export function isTemplateDef(_0x5bf48f){const _0x280625=a165_0x32704c;return typeof _0x5bf48f===_0x280625(0x145)&&_0x5bf48f!==null&&_0x280625(0x131)in _0x5bf48f&&_0x5bf48f[_0x280625(0x131)]===_0x280625(0x141);}export function isValidationResult(_0xc413f0){const _0x432006=a165_0x32704c;return!(_0x432006(0x138)in _0xc413f0);}export function createParseErrorResult(_0x513a33,_0x436b02,_0x114d57,_0x24cbba,_0x2c3e0b=a165_0x32704c(0x137)){const _0x2090a0=a165_0x32704c;return{'filePath':_0x513a33,'relativePath':_0x436b02,'source':_0x114d57,'result':{'valid':![],'errors':[{'level':'error','path':'','code':_0x2090a0(0x127),'message':_0x24cbba}],'warnings':[]},'fileType':_0x2c3e0b};}export function validateYamlFile(_0x4867ae,_0x3a1943,_0x3b6117={}){const _0x2d5a49=a165_0x32704c,_0x2d50fe=a165_0x57cc13[_0x2d5a49(0x139)](_0x3a1943,_0x4867ae)||a165_0x57cc13[_0x2d5a49(0x133)](_0x4867ae);try{const _0x54f8bd=readFileSync(_0x4867ae,_0x2d5a49(0x12d)),_0x184f11=a165_0x2dfc04[_0x2d5a49(0x13c)](_0x54f8bd),_0x3c7b7c=_0x184f11[_0x2d5a49(0x12b)]();if(!_0x3c7b7c)return createParseErrorResult(_0x4867ae,_0x2d50fe,_0x54f8bd,_0x2d5a49(0x14a));let _0x50eaf0;if(isJourneyDef(_0x3c7b7c))_0x50eaf0=_0x2d5a49(0x12c);else{if(isCampaignDef(_0x3c7b7c))_0x50eaf0=_0x2d5a49(0x147);else isTemplateDef(_0x3c7b7c)?_0x50eaf0='template':_0x50eaf0=_0x2d5a49(0x137);}if(_0x3b6117[_0x2d5a49(0x144)]&&_0x50eaf0!==_0x3b6117[_0x2d5a49(0x144)])return{'filePath':_0x4867ae,'relativePath':_0x2d50fe,'skipped':!![],'reason':_0x2d5a49(0x13d)+_0x3b6117[_0x2d5a49(0x144)]};const _0x4cb360={'source':_0x54f8bd,'document':_0x184f11};let _0x1d018f;if(_0x50eaf0===_0x2d5a49(0x12c))_0x1d018f=validateJourneyDef(_0x3c7b7c,_0x4cb360);else{if(_0x50eaf0===_0x2d5a49(0x147))_0x1d018f=validateCampaignDef(_0x3c7b7c,_0x4cb360);else _0x50eaf0===_0x2d5a49(0x141)?_0x1d018f=validateTemplateDef(_0x3c7b7c,_0x4cb360):_0x1d018f=validateSegmentDef(_0x3c7b7c,_0x4cb360);}return{'filePath':_0x4867ae,'relativePath':_0x2d50fe,'source':_0x54f8bd,'result':_0x1d018f,'fileType':_0x50eaf0};}catch(_0x2874fc){const _0x22a633=_0x2874fc instanceof Error?_0x2874fc[_0x2d5a49(0x130)]:String(_0x2874fc);return createParseErrorResult(_0x4867ae,_0x2d50fe,'',_0x2d5a49(0x128)+_0x22a633);}}export function validateYamlFiles(_0x2d689d,_0x266d0e,_0x52a6d9={}){const _0x1ae604=a165_0x32704c;return _0x2d689d[_0x1ae604(0x135)](_0x59c6d9=>validateYamlFile(_0x59c6d9,_0x266d0e,_0x52a6d9));}export function calculateSummary(_0x438e17){const _0x22f125=a165_0x32704c;let _0x3b9f71=0x0,_0x236f99=0x0,_0x34bf49=0x0,_0x4a0523=0x0;for(const _0x5e54d1 of _0x438e17){if(!isValidationResult(_0x5e54d1)){_0x4a0523++;continue;}_0x5e54d1['result'][_0x22f125(0x142)]?_0x3b9f71++:_0x236f99++,_0x34bf49+=_0x5e54d1['result'][_0x22f125(0x140)][_0x22f125(0x13f)];}return{'validCount':_0x3b9f71,'invalidCount':_0x236f99,'warningCount':_0x34bf49,'skippedCount':_0x4a0523,'hasErrors':_0x236f99>0x0};}
@@ -1 +1 @@
1
- (function(_0x13c621,_0x221058){const _0x5704cf=a166_0xa513,_0x30f999=_0x13c621();while(!![]){try{const _0x317598=-parseInt(_0x5704cf(0x1ac))/0x1*(parseInt(_0x5704cf(0x19a))/0x2)+-parseInt(_0x5704cf(0x1b0))/0x3+-parseInt(_0x5704cf(0x183))/0x4+-parseInt(_0x5704cf(0x190))/0x5*(parseInt(_0x5704cf(0x1a6))/0x6)+-parseInt(_0x5704cf(0x1a1))/0x7+parseInt(_0x5704cf(0x1a5))/0x8*(parseInt(_0x5704cf(0x1ab))/0x9)+parseInt(_0x5704cf(0x196))/0xa*(parseInt(_0x5704cf(0x193))/0xb);if(_0x317598===_0x221058)break;else _0x30f999['push'](_0x30f999['shift']());}catch(_0x188a1e){_0x30f999['push'](_0x30f999['shift']());}}}(a166_0x25a0,0x66769));import*as a166_0x2e03c7 from'yaml';import a166_0x3152f6 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x5199f7,_0x4284e4,_0x36f79e){const _0x12e7c3=a166_0xa513;if(!_0x5199f7||!_0x4284e4)return undefined;try{let _0x314350=_0x5199f7[_0x12e7c3(0x1ad)](_0x36f79e,!![]),_0x4ea1dc=[..._0x36f79e];while((!_0x314350||typeof _0x314350!==_0x12e7c3(0x19f)||!('range'in _0x314350)||!_0x314350['range'])&&_0x4ea1dc[_0x12e7c3(0x18a)]>0x0){_0x4ea1dc['pop'](),_0x314350=_0x4ea1dc[_0x12e7c3(0x18a)]>0x0?_0x5199f7['getIn'](_0x4ea1dc,!![]):_0x5199f7['contents'];}if(!_0x314350||typeof _0x314350!==_0x12e7c3(0x19f)||!(_0x12e7c3(0x18f)in _0x314350)||!_0x314350['range'])return undefined;const [_0x5b4ba6]=_0x314350[_0x12e7c3(0x18f)];return offsetToLocation(_0x4284e4,_0x5b4ba6);}catch{return undefined;}}export function offsetToLocation(_0x92f43b,_0x461b54){const _0x471541=a166_0xa513;let _0x433fcf=0x1,_0x5debcc=0x1;for(let _0x3dbded=0x0;_0x3dbded<_0x461b54&&_0x3dbded<_0x92f43b[_0x471541(0x18a)];_0x3dbded++){_0x92f43b[_0x3dbded]==='\x0a'?(_0x433fcf++,_0x5debcc=0x1):_0x5debcc++;}return{'line':_0x433fcf,'column':_0x5debcc,'offset':_0x461b54};}export function pathToArray(_0xfd0293){const _0x227adf=a166_0xa513;if(!_0xfd0293)return[];return _0xfd0293['split']('.')[_0x227adf(0x18b)](_0x98c14=>{const _0x469d21=_0x227adf,_0x2a9dd1=_0x98c14[_0x469d21(0x199)](/^(\w+)\[(\d+)\]$/);if(_0x2a9dd1)return[_0x2a9dd1[0x1],parseInt(_0x2a9dd1[0x2],0xa)];return[_0x98c14];});}function a166_0xa513(_0x30f092,_0x1a784a){_0x30f092=_0x30f092-0x183;const _0x25a0f5=a166_0x25a0();let _0xa51302=_0x25a0f5[_0x30f092];return _0xa51302;}export function formatZodPath(_0x2be54f){let _0x64d604='';for(const _0x216fe7 of _0x2be54f){if(typeof _0x216fe7==='number')_0x64d604+='['+_0x216fe7+']';else{const _0x4e79fd=String(_0x216fe7);_0x64d604+=_0x64d604?'.'+_0x4e79fd:_0x4e79fd;}}return _0x64d604;}export function flattenZodIssues(_0x2e61b0){const _0x23dacf=a166_0xa513,_0x3fb355=[];for(const _0x5afd4f of _0x2e61b0){if(_0x5afd4f[_0x23dacf(0x189)]===_0x23dacf(0x19e)&&_0x23dacf(0x186)in _0x5afd4f){const _0xcd8dfc=_0x5afd4f['errors'];let _0x150273=_0xcd8dfc[0x0]||[];for(const _0x445a7e of _0xcd8dfc){_0x445a7e[_0x23dacf(0x18a)]<_0x150273['length']&&(_0x150273=_0x445a7e);}const _0x1bac9f=_0x150273[_0x23dacf(0x191)](_0x489b8e=>({..._0x489b8e,'path':[..._0x5afd4f[_0x23dacf(0x197)],..._0x489b8e[_0x23dacf(0x197)]]}));_0x3fb355['push'](...flattenZodIssues(_0x1bac9f));}else _0x3fb355[_0x23dacf(0x194)](_0x5afd4f);}return _0x3fb355;}function a166_0x25a0(){const _0x1ed6ff=['error','max','cyan','yellow','9DazObC','8OvLZSP','getIn','\x27:\x20','toString','2366937EDOIFi','3110924SDzNNw','split','location','errors','join','repeat','code','length','flatMap','red','issues','column','range','2210Etaarb','map','parse','990zZSVnN','push','dim','310720TLOTAG','path','YAML\x20validation\x20error:\x20','match','164758AMEaVs','data','level','\x20|\x20','invalid_union','object','line','2562714BcHPxk','min','YAML\x20validation\x20error\x20at\x20\x27','message','6094456IwTECD','7422hpuqMy'];a166_0x25a0=function(){return _0x1ed6ff;};return a166_0x25a0();}export function safeParseYaml(_0x2d028f,_0x35b2fd){const _0x5f2773=a166_0xa513,_0x4c79d5=a166_0x2e03c7[_0x5f2773(0x192)](_0x2d028f);if(!_0x4c79d5||typeof _0x4c79d5!==_0x5f2773(0x19f))throw new Error('Invalid\x20YAML:\x20expected\x20an\x20object');const _0xddaa5=_0x35b2fd['safeParse'](_0x4c79d5);if(!_0xddaa5['success']){const _0xdb96a6=_0xddaa5[_0x5f2773(0x1a7)][_0x5f2773(0x18d)][0x0],_0x345ef9=formatZodPath(_0xdb96a6[_0x5f2773(0x197)]);throw new Error(_0x345ef9?_0x5f2773(0x1a3)+_0x345ef9+_0x5f2773(0x1ae)+_0xdb96a6[_0x5f2773(0x1a4)]:_0x5f2773(0x198)+_0xdb96a6[_0x5f2773(0x1a4)]);}return _0xddaa5[_0x5f2773(0x19b)];}export function formatIssueWithContext(_0x176405,_0x175f3c,_0x316285){const _0x5c62ad=a166_0xa513,_0x55a0d1=[],_0x10fb61=_0x176405['level']===_0x5c62ad(0x1a7),_0x21c90b=_0x10fb61?a166_0x3152f6['red']:a166_0x3152f6['yellow'],_0x35fa56=_0x10fb61?a166_0x3152f6[_0x5c62ad(0x18c)]:a166_0x3152f6[_0x5c62ad(0x1aa)],_0x54a1a5=_0x316285?a166_0x3152f6[_0x5c62ad(0x1a9)](_0x316285+':'):'';if(_0x176405[_0x5c62ad(0x185)]){const _0x5ae119=a166_0x3152f6[_0x5c62ad(0x1a9)](_0x176405[_0x5c62ad(0x185)][_0x5c62ad(0x1a0)]+':'+_0x176405[_0x5c62ad(0x185)][_0x5c62ad(0x18e)]);_0x55a0d1[_0x5c62ad(0x194)](''+_0x54a1a5+_0x5ae119+':\x20'+_0x21c90b(_0x176405[_0x5c62ad(0x19c)])+'\x20'+_0x35fa56('['+_0x176405[_0x5c62ad(0x189)]+']'));}else _0x55a0d1['push'](''+_0x54a1a5+a166_0x3152f6[_0x5c62ad(0x195)](_0x176405[_0x5c62ad(0x197)])+':\x20'+_0x21c90b(_0x176405[_0x5c62ad(0x19c)])+'\x20'+_0x35fa56('['+_0x176405[_0x5c62ad(0x189)]+']'));_0x55a0d1[_0x5c62ad(0x194)](_0x176405['message']);if(_0x176405[_0x5c62ad(0x185)]&&_0x175f3c){const _0x7e292d=_0x175f3c[_0x5c62ad(0x184)]('\x0a'),{line:_0x53b1ab,column:_0x52861}=_0x176405['location'],_0x4c6423=Math[_0x5c62ad(0x1a8)](0x1,_0x53b1ab-0x1),_0x497713=Math[_0x5c62ad(0x1a2)](_0x7e292d['length'],_0x53b1ab+0x1);_0x55a0d1[_0x5c62ad(0x194)]('');for(let _0x3ec28f=_0x4c6423;_0x3ec28f<=_0x497713;_0x3ec28f++){const _0x408c2d=_0x7e292d[_0x3ec28f-0x1]||'',_0x2f20b0=a166_0x3152f6[_0x5c62ad(0x195)](_0x3ec28f[_0x5c62ad(0x1af)]()['padStart'](0x4)),_0x51f3f7=a166_0x3152f6['dim'](_0x5c62ad(0x19d));if(_0x3ec28f===_0x53b1ab){_0x55a0d1[_0x5c62ad(0x194)]('\x20\x20'+_0x2f20b0+_0x51f3f7+_0x21c90b(_0x408c2d));const _0x2a2ca3='\x20'[_0x5c62ad(0x188)](0x4+0x3+_0x52861-0x1);_0x55a0d1[_0x5c62ad(0x194)]('\x20\x20'+_0x2a2ca3+_0x21c90b('^'));}else _0x55a0d1[_0x5c62ad(0x194)]('\x20\x20'+_0x2f20b0+_0x51f3f7+a166_0x3152f6[_0x5c62ad(0x195)](_0x408c2d));}}return _0x55a0d1[_0x5c62ad(0x187)]('\x0a');}export function formatValidationResult(_0xa31077,_0x3b8f8b,_0x36d52c){const _0x53f099=a166_0xa513,_0xa0cba0=[];for(const _0xc3fafe of _0xa31077['errors']){_0xa0cba0[_0x53f099(0x194)](formatIssueWithContext(_0xc3fafe,_0x3b8f8b,_0x36d52c)),_0xa0cba0['push']('');}for(const _0x469587 of _0xa31077['warnings']){_0xa0cba0['push'](formatIssueWithContext(_0x469587,_0x3b8f8b,_0x36d52c)),_0xa0cba0[_0x53f099(0x194)]('');}return _0xa0cba0['join']('\x0a');}
1
+ (function(_0x39d95f,_0x349655){const _0x2a73b3=a166_0x14dd,_0xef485b=_0x39d95f();while(!![]){try{const _0x359bf1=parseInt(_0x2a73b3(0x1e4))/0x1+parseInt(_0x2a73b3(0x1df))/0x2+parseInt(_0x2a73b3(0x1cc))/0x3*(parseInt(_0x2a73b3(0x1f0))/0x4)+-parseInt(_0x2a73b3(0x1da))/0x5+-parseInt(_0x2a73b3(0x1e7))/0x6+-parseInt(_0x2a73b3(0x1e2))/0x7*(parseInt(_0x2a73b3(0x1d4))/0x8)+parseInt(_0x2a73b3(0x1ec))/0x9;if(_0x359bf1===_0x349655)break;else _0xef485b['push'](_0xef485b['shift']());}catch(_0x22632c){_0xef485b['push'](_0xef485b['shift']());}}}(a166_0x2db6,0x41890));import*as a166_0x3e2bda from'yaml';import a166_0x3545c5 from'chalk';export{validateSegmentDef,validateRuleDef}from'./segment-validator.js';export function getLocationFromPath(_0x3730d9,_0x9b670f,_0x3cde3f){const _0x3e55a9=a166_0x14dd;if(!_0x3730d9||!_0x9b670f)return undefined;try{let _0x195811=_0x3730d9['getIn'](_0x3cde3f,!![]),_0x3a04b1=[..._0x3cde3f];while((!_0x195811||typeof _0x195811!==_0x3e55a9(0x1db)||!(_0x3e55a9(0x1e0)in _0x195811)||!_0x195811['range'])&&_0x3a04b1['length']>0x0){_0x3a04b1[_0x3e55a9(0x1d9)](),_0x195811=_0x3a04b1[_0x3e55a9(0x1eb)]>0x0?_0x3730d9['getIn'](_0x3a04b1,!![]):_0x3730d9['contents'];}if(!_0x195811||typeof _0x195811!=='object'||!(_0x3e55a9(0x1e0)in _0x195811)||!_0x195811['range'])return undefined;const [_0x28e295]=_0x195811[_0x3e55a9(0x1e0)];return offsetToLocation(_0x9b670f,_0x28e295);}catch{return undefined;}}export function offsetToLocation(_0x18c4b3,_0x49e2e4){const _0x20374e=a166_0x14dd;let _0x1d4b55=0x1,_0x19789c=0x1;for(let _0x141236=0x0;_0x141236<_0x49e2e4&&_0x141236<_0x18c4b3[_0x20374e(0x1eb)];_0x141236++){_0x18c4b3[_0x141236]==='\x0a'?(_0x1d4b55++,_0x19789c=0x1):_0x19789c++;}return{'line':_0x1d4b55,'column':_0x19789c,'offset':_0x49e2e4};}function a166_0x14dd(_0x11b48c,_0x3fba2e){_0x11b48c=_0x11b48c-0x1c4;const _0x2db6ab=a166_0x2db6();let _0x14ddc1=_0x2db6ab[_0x11b48c];return _0x14ddc1;}export function pathToArray(_0xfa854f){const _0x580072=a166_0x14dd;if(!_0xfa854f)return[];return _0xfa854f[_0x580072(0x1f1)]('.')[_0x580072(0x1ce)](_0x2d5e62=>{const _0x5f4795=_0x2d5e62['match'](/^(\w+)\[(\d+)\]$/);if(_0x5f4795)return[_0x5f4795[0x1],parseInt(_0x5f4795[0x2],0xa)];return[_0x2d5e62];});}function a166_0x2db6(){const _0x444d7a=['join','214088tWleMS','invalid_union','282297izltDQ','push','warnings','116880iwTZoL','repeat','red','YAML\x20validation\x20error\x20at\x20\x27','length','990522mnUuXB','level','min','success','4OmTiYj','split','error','toString','\x27:\x20','line','map','path','max','data','90141ZBItcZ','yellow','flatMap','column','message','issues','parse','errors','8LjFzxC','location','Invalid\x20YAML:\x20expected\x20an\x20object','padStart','cyan','pop','2394560xniwZw','object','YAML\x20validation\x20error:\x20','dim','code','750012YrXwot','range'];a166_0x2db6=function(){return _0x444d7a;};return a166_0x2db6();}export function formatZodPath(_0x24e296){let _0x57d314='';for(const _0x27983 of _0x24e296){if(typeof _0x27983==='number')_0x57d314+='['+_0x27983+']';else{const _0xf365e1=String(_0x27983);_0x57d314+=_0x57d314?'.'+_0xf365e1:_0xf365e1;}}return _0x57d314;}export function flattenZodIssues(_0x535ab7){const _0x26e3d1=a166_0x14dd,_0x631a2=[];for(const _0x3cc13b of _0x535ab7){if(_0x3cc13b['code']===_0x26e3d1(0x1e3)&&'errors'in _0x3cc13b){const _0x5cfd4f=_0x3cc13b[_0x26e3d1(0x1d3)];let _0x511b03=_0x5cfd4f[0x0]||[];for(const _0x4158cd of _0x5cfd4f){_0x4158cd[_0x26e3d1(0x1eb)]<_0x511b03[_0x26e3d1(0x1eb)]&&(_0x511b03=_0x4158cd);}const _0x4bdc62=_0x511b03[_0x26e3d1(0x1c8)](_0x4f7f84=>({..._0x4f7f84,'path':[..._0x3cc13b[_0x26e3d1(0x1c9)],..._0x4f7f84[_0x26e3d1(0x1c9)]]}));_0x631a2[_0x26e3d1(0x1e5)](...flattenZodIssues(_0x4bdc62));}else _0x631a2[_0x26e3d1(0x1e5)](_0x3cc13b);}return _0x631a2;}export function safeParseYaml(_0x36b6a6,_0x582a9b){const _0x3f7923=a166_0x14dd,_0x313c91=a166_0x3e2bda[_0x3f7923(0x1d2)](_0x36b6a6);if(!_0x313c91||typeof _0x313c91!==_0x3f7923(0x1db))throw new Error(_0x3f7923(0x1d6));const _0x3d117e=_0x582a9b['safeParse'](_0x313c91);if(!_0x3d117e[_0x3f7923(0x1ef)]){const _0xda9f1e=_0x3d117e[_0x3f7923(0x1c4)][_0x3f7923(0x1d1)][0x0],_0x49b8de=formatZodPath(_0xda9f1e[_0x3f7923(0x1c9)]);throw new Error(_0x49b8de?_0x3f7923(0x1ea)+_0x49b8de+_0x3f7923(0x1c6)+_0xda9f1e[_0x3f7923(0x1d0)]:_0x3f7923(0x1dc)+_0xda9f1e[_0x3f7923(0x1d0)]);}return _0x3d117e[_0x3f7923(0x1cb)];}export function formatIssueWithContext(_0x5ca960,_0x2908d6,_0x3813dc){const _0x56d0f9=a166_0x14dd,_0x4e085a=[],_0x3139bc=_0x5ca960[_0x56d0f9(0x1ed)]===_0x56d0f9(0x1c4),_0x48d7eb=_0x3139bc?a166_0x3545c5[_0x56d0f9(0x1e9)]:a166_0x3545c5[_0x56d0f9(0x1cd)],_0x125806=_0x3139bc?a166_0x3545c5[_0x56d0f9(0x1e9)]:a166_0x3545c5[_0x56d0f9(0x1cd)],_0x2167a7=_0x3813dc?a166_0x3545c5[_0x56d0f9(0x1d8)](_0x3813dc+':'):'';if(_0x5ca960[_0x56d0f9(0x1d5)]){const _0x42bef3=a166_0x3545c5['cyan'](_0x5ca960[_0x56d0f9(0x1d5)][_0x56d0f9(0x1c7)]+':'+_0x5ca960[_0x56d0f9(0x1d5)][_0x56d0f9(0x1cf)]);_0x4e085a['push'](''+_0x2167a7+_0x42bef3+':\x20'+_0x48d7eb(_0x5ca960[_0x56d0f9(0x1ed)])+'\x20'+_0x125806('['+_0x5ca960[_0x56d0f9(0x1de)]+']'));}else _0x4e085a[_0x56d0f9(0x1e5)](''+_0x2167a7+a166_0x3545c5[_0x56d0f9(0x1dd)](_0x5ca960[_0x56d0f9(0x1c9)])+':\x20'+_0x48d7eb(_0x5ca960[_0x56d0f9(0x1ed)])+'\x20'+_0x125806('['+_0x5ca960[_0x56d0f9(0x1de)]+']'));_0x4e085a[_0x56d0f9(0x1e5)](_0x5ca960[_0x56d0f9(0x1d0)]);if(_0x5ca960[_0x56d0f9(0x1d5)]&&_0x2908d6){const _0x2e9b44=_0x2908d6[_0x56d0f9(0x1f1)]('\x0a'),{line:_0x4a95ca,column:_0x1b5bbe}=_0x5ca960[_0x56d0f9(0x1d5)],_0x3e17b6=Math[_0x56d0f9(0x1ca)](0x1,_0x4a95ca-0x1),_0x8fb4f5=Math[_0x56d0f9(0x1ee)](_0x2e9b44['length'],_0x4a95ca+0x1);_0x4e085a[_0x56d0f9(0x1e5)]('');for(let _0x1026d8=_0x3e17b6;_0x1026d8<=_0x8fb4f5;_0x1026d8++){const _0x514562=_0x2e9b44[_0x1026d8-0x1]||'',_0x552ee2=a166_0x3545c5[_0x56d0f9(0x1dd)](_0x1026d8[_0x56d0f9(0x1c5)]()[_0x56d0f9(0x1d7)](0x4)),_0x271f0e=a166_0x3545c5[_0x56d0f9(0x1dd)]('\x20|\x20');if(_0x1026d8===_0x4a95ca){_0x4e085a[_0x56d0f9(0x1e5)]('\x20\x20'+_0x552ee2+_0x271f0e+_0x48d7eb(_0x514562));const _0x5155ff='\x20'[_0x56d0f9(0x1e8)](0x4+0x3+_0x1b5bbe-0x1);_0x4e085a[_0x56d0f9(0x1e5)]('\x20\x20'+_0x5155ff+_0x48d7eb('^'));}else _0x4e085a[_0x56d0f9(0x1e5)]('\x20\x20'+_0x552ee2+_0x271f0e+a166_0x3545c5[_0x56d0f9(0x1dd)](_0x514562));}}return _0x4e085a[_0x56d0f9(0x1e1)]('\x0a');}export function formatValidationResult(_0x2669ca,_0x248790,_0x380476){const _0x427d2d=a166_0x14dd,_0x51c64f=[];for(const _0x5770d1 of _0x2669ca[_0x427d2d(0x1d3)]){_0x51c64f['push'](formatIssueWithContext(_0x5770d1,_0x248790,_0x380476)),_0x51c64f[_0x427d2d(0x1e5)]('');}for(const _0x196161 of _0x2669ca[_0x427d2d(0x1e6)]){_0x51c64f[_0x427d2d(0x1e5)](formatIssueWithContext(_0x196161,_0x248790,_0x380476)),_0x51c64f['push']('');}return _0x51c64f[_0x427d2d(0x1e1)]('\x0a');}