@treasuredata/tdx 0.25.6 → 0.25.7

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 (165) 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/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/personalization.js +1 -1
  99. package/dist/sdk/query/index.js +1 -1
  100. package/dist/sdk/query/sql-parser.js +1 -1
  101. package/dist/sdk/realtime.js +1 -1
  102. package/dist/sdk/schedule.js +1 -1
  103. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/fields-display.js +1 -1
  105. package/dist/sdk/segment/file-discovery.js +1 -1
  106. package/dist/sdk/segment/journey-utils.js +1 -1
  107. package/dist/sdk/segment/journey-yaml.js +1 -1
  108. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  109. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  110. package/dist/sdk/segment/pull-workflow.js +1 -1
  111. package/dist/sdk/segment/push-workflow.js +1 -1
  112. package/dist/sdk/segment/resolution-context.js +1 -1
  113. package/dist/sdk/segment/segment-path-parser.js +1 -1
  114. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  115. package/dist/sdk/segment/target-resolution.js +1 -1
  116. package/dist/sdk/segment/tdx-config.js +1 -1
  117. package/dist/sdk/segment/validate-files.js +1 -1
  118. package/dist/sdk/segment/yaml-validator.js +1 -1
  119. package/dist/sdk/segment.js +1 -1
  120. package/dist/sdk/types/index.js +1 -1
  121. package/dist/sdk/types/progress.js +1 -1
  122. package/dist/sdk/user.js +1 -1
  123. package/dist/sdk/util/format-detector.js +1 -1
  124. package/dist/sdk/util/formatters.js +1 -1
  125. package/dist/sdk/util/index.js +1 -1
  126. package/dist/sdk/util/tree-formatter.js +1 -1
  127. package/dist/sdk/workflow/archive-validation.js +1 -1
  128. package/dist/sdk/workflow/clone-workflow.js +1 -1
  129. package/dist/sdk/workflow/index.js +1 -1
  130. package/dist/sdk/workflow/pull-workflow.js +1 -1
  131. package/dist/sdk/workflow/push-workflow.js +1 -1
  132. package/dist/sdk/workflow/tdx-config.js +1 -1
  133. package/dist/sdk/workflow/workflow-utils.js +1 -1
  134. package/dist/test-utils/command-runner.js +1 -1
  135. package/dist/test-utils/factories.js +1 -1
  136. package/dist/test-utils/fixtures.js +1 -1
  137. package/dist/test-utils/http-mock.js +1 -1
  138. package/dist/test-utils/index.js +1 -1
  139. package/dist/utils/async.js +1 -1
  140. package/dist/utils/colors.js +1 -1
  141. package/dist/utils/diff.js +1 -1
  142. package/dist/utils/file-permissions.js +1 -1
  143. package/dist/utils/global-cache.js +1 -1
  144. package/dist/utils/json-loader.js +1 -1
  145. package/dist/utils/local-cache.js +1 -1
  146. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  147. package/dist/utils/logger/formatters/index.js +1 -1
  148. package/dist/utils/logger/handlers/console-handler.js +1 -1
  149. package/dist/utils/logger/handlers/file-handler.js +1 -1
  150. package/dist/utils/logger/handlers/index.js +1 -1
  151. package/dist/utils/logger/handlers/null-handler.js +1 -1
  152. package/dist/utils/logger/index.js +1 -1
  153. package/dist/utils/logger/logger.js +1 -1
  154. package/dist/utils/logger/types.js +1 -1
  155. package/dist/utils/option-validation.js +1 -1
  156. package/dist/utils/port.js +1 -1
  157. package/dist/utils/process.js +1 -1
  158. package/dist/utils/prompt.js +1 -1
  159. package/dist/utils/spinner.js +1 -1
  160. package/dist/utils/sse-parser.js +1 -1
  161. package/dist/utils/string-utils.js +1 -1
  162. package/dist/utils/table-ref-parser.js +1 -1
  163. package/dist/utils/tdx-logger.js +1 -1
  164. package/dist/utils/version-check.js +1 -1
  165. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x13f6ad,_0x2d94df){const _0xc471fb=a114_0xf4a3,_0xf4062c=_0x13f6ad();while(!![]){try{const _0x1c2c2c=-parseInt(_0xc471fb(0x15b))/0x1*(-parseInt(_0xc471fb(0x160))/0x2)+-parseInt(_0xc471fb(0x144))/0x3*(parseInt(_0xc471fb(0x14d))/0x4)+parseInt(_0xc471fb(0x15e))/0x5+-parseInt(_0xc471fb(0x146))/0x6+parseInt(_0xc471fb(0x14b))/0x7*(parseInt(_0xc471fb(0x152))/0x8)+-parseInt(_0xc471fb(0x16a))/0x9*(parseInt(_0xc471fb(0x148))/0xa)+parseInt(_0xc471fb(0x142))/0xb;if(_0x1c2c2c===_0x2d94df)break;else _0xf4062c['push'](_0xf4062c['shift']());}catch(_0x517a4c){_0xf4062c['push'](_0xf4062c['shift']());}}}(a114_0x3340,0x522e4));import a114_0x11e0fc from'path';import{parse as a114_0x3325ed}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x40c862){const _0x397735=a114_0xf4a3;if(!_0x40c862||_0x40c862[_0x397735(0x14a)]()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x241cb6=_0x40c862[_0x397735(0x14a)]();if(_0x241cb6==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x40c862};const _0x896a47=_0x241cb6[_0x397735(0x149)]('/')?_0x241cb6[_0x397735(0x166)](0x1):_0x241cb6,_0xc2a3d2=_0x896a47['split']('/')[_0x397735(0x145)](_0x1007af=>_0x1007af!=='');if(_0xc2a3d2[_0x397735(0x154)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x298050=_0x241cb6[_0x397735(0x149)]('/')||!isRelativePathSegment(_0xc2a3d2[0x0]);for(const _0x4706a8 of _0xc2a3d2){validatePathSegment(_0x4706a8);}return{'segments':_0xc2a3d2,'isAbsolute':_0x298050,'raw':_0x40c862};}function isRelativePathSegment(_0xd67cf5){return _0xd67cf5==='.'||_0xd67cf5==='..';}function validatePathSegment(_0x246761){const _0x170a7c=a114_0xf4a3;if(_0x246761==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x246761==='.'||_0x246761==='..')return;if(/[\x00-\x1F\x7F]/[_0x170a7c(0x156)](_0x246761))throw new Error(_0x170a7c(0x15f)+_0x246761);if(_0x246761!==_0x246761[_0x170a7c(0x14a)]()){}}export function validatePath(_0x124668){const _0xcaf231=a114_0xf4a3;if(_0x124668['segments']['length']===0x0&&!_0x124668[_0xcaf231(0x141)])throw new Error(_0xcaf231(0x147));if(_0x124668[_0xcaf231(0x141)]){if(_0x124668[_0xcaf231(0x16b)][0x0]==='..')throw new Error(_0xcaf231(0x158));let _0x728a68=0x0;for(const _0x36b072 of _0x124668[_0xcaf231(0x16b)]){if(_0x36b072==='..'){if(_0x728a68===0x0)throw new Error(_0xcaf231(0x16c));_0x728a68--;}else _0x36b072!=='.'&&_0x728a68++;}}}function a114_0xf4a3(_0x390b2b,_0x14fed0){_0x390b2b=_0x390b2b-0x141;const _0x334019=a114_0x3340();let _0xf4a31d=_0x334019[_0x390b2b];return _0xf4a31d;}export function joinPaths(_0x10b393,_0x3fe3e9){const _0x4f236b=a114_0xf4a3;if(!_0x10b393||_0x10b393==='/')return _0x3fe3e9;if(!_0x3fe3e9||_0x3fe3e9==='.')return _0x10b393;if(_0x3fe3e9[_0x4f236b(0x149)]('/'))return _0x3fe3e9;const _0x27dc84=parsePath(_0x10b393),_0x4c746f=parsePath(_0x3fe3e9),_0x1be0c4=[..._0x27dc84['segments']];for(const _0x4a72e4 of _0x4c746f[_0x4f236b(0x16b)]){if(_0x4a72e4==='.')continue;else{if(_0x4a72e4==='..'){if(_0x1be0c4[_0x4f236b(0x154)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x1be0c4[_0x4f236b(0x15c)]();}else _0x1be0c4['push'](_0x4a72e4);}}const _0x17f1b5=_0x1be0c4[_0x4f236b(0x168)]('/');return _0x27dc84['raw'][_0x4f236b(0x149)]('/')?'/'+_0x17f1b5:_0x17f1b5;}export function normalizePath(_0x2cc7dc){const _0x48e2dd=a114_0xf4a3,_0x4a9a29=parsePath(_0x2cc7dc),_0x5bd1a3=[];for(const _0x16f552 of _0x4a9a29[_0x48e2dd(0x16b)]){if(_0x16f552==='.')continue;else{if(_0x16f552==='..'){if(_0x5bd1a3['length']===0x0){if(_0x4a9a29[_0x48e2dd(0x141)])throw new Error(_0x48e2dd(0x143));_0x5bd1a3['push']('..');}else _0x5bd1a3[_0x5bd1a3[_0x48e2dd(0x154)]-0x1]==='..'?_0x5bd1a3['push']('..'):_0x5bd1a3[_0x48e2dd(0x15c)]();}else _0x5bd1a3['push'](_0x16f552);}}if(_0x5bd1a3[_0x48e2dd(0x154)]===0x0)return _0x4a9a29[_0x48e2dd(0x141)]?'/':'.';const _0x584397=_0x5bd1a3[_0x48e2dd(0x168)]('/');return _0x4a9a29[_0x48e2dd(0x16d)][_0x48e2dd(0x149)]('/')?'/'+_0x584397:_0x584397;}export function getParentPath(_0x349b30){const _0x5120e4=a114_0xf4a3,_0x4d444f=parsePath(_0x349b30);if(_0x4d444f['segments']['length']<=0x1)return'/';const _0x54a1f8=_0x4d444f[_0x5120e4(0x16b)][_0x5120e4(0x151)](0x0,-0x1)[_0x5120e4(0x168)]('/');return _0x4d444f[_0x5120e4(0x16d)]['startsWith']('/')?'/'+_0x54a1f8:_0x54a1f8;}export function getBaseName(_0x4ffc52){const _0x1945d9=a114_0xf4a3,_0x4fb64e=parsePath(_0x4ffc52);return _0x4fb64e['segments'][_0x4fb64e['segments'][_0x1945d9(0x154)]-0x1]||'';}export function isChildPath(_0x630f98,_0x39c0af){const _0x938f00=a114_0xf4a3,_0x47b202=parsePath(_0x630f98),_0x702916=parsePath(_0x39c0af);if(_0x47b202[_0x938f00(0x16b)]['length']<=_0x702916[_0x938f00(0x16b)]['length'])return![];for(let _0x5126eb=0x0;_0x5126eb<_0x702916['segments'][_0x938f00(0x154)];_0x5126eb++){if(_0x47b202[_0x938f00(0x16b)][_0x5126eb]!==_0x702916[_0x938f00(0x16b)][_0x5126eb])return![];}return!![];}export function splitPath(_0x1e3f58){const _0x1c08dd=a114_0xf4a3,_0x178c88=parsePath(_0x1e3f58);if(_0x178c88[_0x1c08dd(0x16b)][_0x1c08dd(0x154)]===0x0)throw new Error(_0x1c08dd(0x15a));if(_0x178c88[_0x1c08dd(0x16b)][_0x1c08dd(0x154)]===0x1)return{'parent':_0x178c88[_0x1c08dd(0x16b)][0x0]};return{'parent':_0x178c88[_0x1c08dd(0x16b)][0x0],'child':_0x178c88[_0x1c08dd(0x16b)][_0x1c08dd(0x151)](0x1)[_0x1c08dd(0x168)]('/')};}export function isYamlFilePath(_0x141c82){const _0x195cb1=a114_0xf4a3;return _0x141c82[_0x195cb1(0x15d)](_0x195cb1(0x159))||_0x141c82[_0x195cb1(0x15d)](_0x195cb1(0x157));}export async function resolveYamlFilePath(_0x4a24da,_0x269059=nodeFileSystem){const _0x4d2bbe=a114_0xf4a3,_0x3812f4=a114_0x11e0fc[_0x4d2bbe(0x165)](_0x4a24da);if(!await _0x269059['exists'](_0x3812f4))throw new Error(_0x4d2bbe(0x163)+_0x4a24da);let _0x3e18c0=a114_0x11e0fc[_0x4d2bbe(0x14f)](_0x3812f4),_0x1c5f0f=null,_0x34de1d=null;const _0x3acd18=a114_0x11e0fc['parse'](_0x3e18c0)['root'];while(_0x3e18c0!==_0x3acd18){const _0x25f380=a114_0x11e0fc[_0x4d2bbe(0x168)](_0x3e18c0,_0x4d2bbe(0x14c));if(await _0x269059['exists'](_0x25f380)){_0x1c5f0f=_0x25f380,_0x34de1d=_0x3e18c0;break;}_0x3e18c0=a114_0x11e0fc[_0x4d2bbe(0x14f)](_0x3e18c0);}if(!_0x1c5f0f||!_0x34de1d)throw new Error(_0x4d2bbe(0x155)+_0x4a24da);const _0x39cceb=await _0x269059[_0x4d2bbe(0x167)](_0x1c5f0f),_0x5ab6c5=JSON['parse'](_0x39cceb),_0x5ea94a=_0x5ab6c5[_0x4d2bbe(0x169)];if(!_0x5ea94a)throw new Error(_0x4d2bbe(0x161));const _0x3bb89e=await _0x269059[_0x4d2bbe(0x167)](_0x3812f4),_0x3c72a5=a114_0x3325ed(_0x3bb89e),_0x12cf06=_0x3c72a5[_0x4d2bbe(0x16e)];if(!_0x12cf06)throw new Error(_0x4d2bbe(0x16f)+_0x4a24da);const _0x297266=_0x3c72a5[_0x4d2bbe(0x14e)]===_0x4d2bbe(0x164)?'journey':_0x4d2bbe(0x150),_0x5b8688=a114_0x11e0fc[_0x4d2bbe(0x162)](_0x34de1d,_0x3812f4),_0x4a090b=a114_0x11e0fc[_0x4d2bbe(0x14f)](_0x5b8688),_0xe6f3cc=_0x4a090b==='.'?'':_0x4a090b[_0x4d2bbe(0x153)](/\\/g,'/'),_0x4fd8e2=_0xe6f3cc?_0x5ea94a+'/'+_0xe6f3cc+'/'+_0x12cf06:_0x5ea94a+'/'+_0x12cf06;return{'parentSegment':_0x5ea94a,'segmentName':_0x12cf06,'folderPath':_0xe6f3cc,'fullPath':_0x4fd8e2,'resourceType':_0x297266};}function a114_0x3340(){const _0x17dc90=['length','No\x20tdx.json\x20found\x20for\x20file:\x20','test','.yaml','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','.yml','Cannot\x20split\x20empty\x20path','29ranHtt','pop','endsWith','587640rAQufY','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','10730VcRSbf','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','relative','File\x20not\x20found:\x20','journey','resolve','substring','readFile','join','parent_segment','45MTatuD','segments','Path\x20attempts\x20to\x20navigate\x20above\x20root','raw','name','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','isAbsolute','10076638sfeKaC','Cannot\x20navigate\x20above\x20root','1671NeelpL','filter','3265542xqmaFb','Relative\x20path\x20cannot\x20be\x20empty','741890XWqWVr','startsWith','trim','14mKiKSy','tdx.json','668aIesgW','type','dirname','segment','slice','622648LIGIUE','replace'];a114_0x3340=function(){return _0x17dc90;};return a114_0x3340();}
1
+ (function(_0x4a1f7b,_0x3d324c){const _0x503a62=a114_0x48dd,_0x1e598b=_0x4a1f7b();while(!![]){try{const _0x3ebe74=-parseInt(_0x503a62(0x12c))/0x1+parseInt(_0x503a62(0x134))/0x2*(-parseInt(_0x503a62(0x11c))/0x3)+-parseInt(_0x503a62(0x11f))/0x4*(-parseInt(_0x503a62(0x13c))/0x5)+-parseInt(_0x503a62(0x127))/0x6*(-parseInt(_0x503a62(0x13e))/0x7)+parseInt(_0x503a62(0x120))/0x8*(-parseInt(_0x503a62(0x119))/0x9)+parseInt(_0x503a62(0x126))/0xa+-parseInt(_0x503a62(0x132))/0xb;if(_0x3ebe74===_0x3d324c)break;else _0x1e598b['push'](_0x1e598b['shift']());}catch(_0x3401c4){_0x1e598b['push'](_0x1e598b['shift']());}}}(a114_0xfd82,0x1b16b));import a114_0x1426a6 from'path';import{parse as a114_0x199d5b}from'yaml';import{nodeFileSystem}from'../io/node-filesystem.js';export function parsePath(_0x11b2f8){const _0x2a8434=a114_0x48dd;if(!_0x11b2f8||_0x11b2f8[_0x2a8434(0x117)]()==='')throw new Error(_0x2a8434(0x141));const _0x738e34=_0x11b2f8[_0x2a8434(0x117)]();if(_0x738e34==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x11b2f8};const _0x148b70=_0x738e34['startsWith']('/')?_0x738e34[_0x2a8434(0x13d)](0x1):_0x738e34,_0x2e473d=_0x148b70['split']('/')[_0x2a8434(0x12a)](_0x29bd93=>_0x29bd93!=='');if(_0x2e473d[_0x2a8434(0x135)]===0x0)throw new Error(_0x2a8434(0x113));const _0x5a5127=_0x738e34['startsWith']('/')||!isRelativePathSegment(_0x2e473d[0x0]);for(const _0xa80581 of _0x2e473d){validatePathSegment(_0xa80581);}return{'segments':_0x2e473d,'isAbsolute':_0x5a5127,'raw':_0x11b2f8};}function isRelativePathSegment(_0xb3b374){return _0xb3b374==='.'||_0xb3b374==='..';}function validatePathSegment(_0x49a412){const _0x8070ee=a114_0x48dd;if(_0x49a412==='')throw new Error(_0x8070ee(0x13f));if(_0x49a412==='.'||_0x49a412==='..')return;if(/[\x00-\x1F\x7F]/[_0x8070ee(0x129)](_0x49a412))throw new Error(_0x8070ee(0x116)+_0x49a412);if(_0x49a412!==_0x49a412['trim']()){}}export function validatePath(_0x398508){const _0x103d08=a114_0x48dd;if(_0x398508[_0x103d08(0x128)][_0x103d08(0x135)]===0x0&&!_0x398508['isAbsolute'])throw new Error(_0x103d08(0x139));if(_0x398508[_0x103d08(0x125)]){if(_0x398508[_0x103d08(0x128)][0x0]==='..')throw new Error(_0x103d08(0x133));let _0x5d063d=0x0;for(const _0x370343 of _0x398508[_0x103d08(0x128)]){if(_0x370343==='..'){if(_0x5d063d===0x0)throw new Error(_0x103d08(0x114));_0x5d063d--;}else _0x370343!=='.'&&_0x5d063d++;}}}export function joinPaths(_0x588ac2,_0x58be9c){const _0x424a30=a114_0x48dd;if(!_0x588ac2||_0x588ac2==='/')return _0x58be9c;if(!_0x58be9c||_0x58be9c==='.')return _0x588ac2;if(_0x58be9c[_0x424a30(0x115)]('/'))return _0x58be9c;const _0x543dd6=parsePath(_0x588ac2),_0x1f6786=parsePath(_0x58be9c),_0x6c7c86=[..._0x543dd6['segments']];for(const _0x145692 of _0x1f6786[_0x424a30(0x128)]){if(_0x145692==='.')continue;else{if(_0x145692==='..'){if(_0x6c7c86[_0x424a30(0x135)]===0x0)throw new Error(_0x424a30(0x130));_0x6c7c86[_0x424a30(0x122)]();}else _0x6c7c86['push'](_0x145692);}}const _0x592e73=_0x6c7c86[_0x424a30(0x131)]('/');return _0x543dd6[_0x424a30(0x12d)]['startsWith']('/')?'/'+_0x592e73:_0x592e73;}function a114_0x48dd(_0x4bbd5a,_0x26d9a3){_0x4bbd5a=_0x4bbd5a-0x113;const _0xfd825a=a114_0xfd82();let _0x48dd05=_0xfd825a[_0x4bbd5a];return _0x48dd05;}export function normalizePath(_0x5bca55){const _0x6d84db=a114_0x48dd,_0x5296ac=parsePath(_0x5bca55),_0xa3bf65=[];for(const _0x2e8f65 of _0x5296ac[_0x6d84db(0x128)]){if(_0x2e8f65==='.')continue;else{if(_0x2e8f65==='..'){if(_0xa3bf65[_0x6d84db(0x135)]===0x0){if(_0x5296ac['isAbsolute'])throw new Error(_0x6d84db(0x130));_0xa3bf65[_0x6d84db(0x136)]('..');}else _0xa3bf65[_0xa3bf65[_0x6d84db(0x135)]-0x1]==='..'?_0xa3bf65[_0x6d84db(0x136)]('..'):_0xa3bf65['pop']();}else _0xa3bf65[_0x6d84db(0x136)](_0x2e8f65);}}if(_0xa3bf65['length']===0x0)return _0x5296ac['isAbsolute']?'/':'.';const _0x2742ea=_0xa3bf65[_0x6d84db(0x131)]('/');return _0x5296ac[_0x6d84db(0x12d)]['startsWith']('/')?'/'+_0x2742ea:_0x2742ea;}export function getParentPath(_0x1f4fbf){const _0x498e9d=a114_0x48dd,_0xf01560=parsePath(_0x1f4fbf);if(_0xf01560[_0x498e9d(0x128)][_0x498e9d(0x135)]<=0x1)return'/';const _0x24b935=_0xf01560[_0x498e9d(0x128)][_0x498e9d(0x137)](0x0,-0x1)[_0x498e9d(0x131)]('/');return _0xf01560['raw'][_0x498e9d(0x115)]('/')?'/'+_0x24b935:_0x24b935;}function a114_0xfd82(){const _0x4d905b=['77656bLPrTq','1141336CIpbNQ','replace','pop','.yaml','endsWith','isAbsolute','1253700YFJfKS','6EnkQnK','segments','test','filter','exists','136216quQQdZ','raw','segment','dirname','Cannot\x20navigate\x20above\x20root','join','243067tuJwPf','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','188854iPZARP','length','push','slice','readFile','Relative\x20path\x20cannot\x20be\x20empty','name','File\x20not\x20found:\x20','45AWTHoM','substring','1443862IShXLJ','Path\x20segment\x20cannot\x20be\x20empty','Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20','Path\x20cannot\x20be\x20empty','journey','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','Path\x20attempts\x20to\x20navigate\x20above\x20root','startsWith','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','trim','parent_segment','9edcMXo','resolve','tdx.json','3ziGcPD','root','Cannot\x20split\x20empty\x20path'];a114_0xfd82=function(){return _0x4d905b;};return a114_0xfd82();}export function getBaseName(_0x1b8d95){const _0x5e7204=a114_0x48dd,_0x22ec6e=parsePath(_0x1b8d95);return _0x22ec6e[_0x5e7204(0x128)][_0x22ec6e[_0x5e7204(0x128)][_0x5e7204(0x135)]-0x1]||'';}export function isChildPath(_0x8f5cda,_0x48d3ff){const _0x458077=a114_0x48dd,_0x4bb1fd=parsePath(_0x8f5cda),_0x2fa0dc=parsePath(_0x48d3ff);if(_0x4bb1fd['segments'][_0x458077(0x135)]<=_0x2fa0dc[_0x458077(0x128)][_0x458077(0x135)])return![];for(let _0x74dcce=0x0;_0x74dcce<_0x2fa0dc[_0x458077(0x128)][_0x458077(0x135)];_0x74dcce++){if(_0x4bb1fd[_0x458077(0x128)][_0x74dcce]!==_0x2fa0dc[_0x458077(0x128)][_0x74dcce])return![];}return!![];}export function splitPath(_0x27de1e){const _0x454e68=a114_0x48dd,_0x551a5a=parsePath(_0x27de1e);if(_0x551a5a[_0x454e68(0x128)][_0x454e68(0x135)]===0x0)throw new Error(_0x454e68(0x11e));if(_0x551a5a['segments'][_0x454e68(0x135)]===0x1)return{'parent':_0x551a5a[_0x454e68(0x128)][0x0]};return{'parent':_0x551a5a[_0x454e68(0x128)][0x0],'child':_0x551a5a[_0x454e68(0x128)][_0x454e68(0x137)](0x1)[_0x454e68(0x131)]('/')};}export function isYamlFilePath(_0x330f1c){const _0x55a2e1=a114_0x48dd;return _0x330f1c[_0x55a2e1(0x124)]('.yml')||_0x330f1c['endsWith'](_0x55a2e1(0x123));}export async function resolveYamlFilePath(_0x2f1f20,_0xc5c99a=nodeFileSystem){const _0x2595d9=a114_0x48dd,_0x1db3c4=a114_0x1426a6[_0x2595d9(0x11a)](_0x2f1f20);if(!await _0xc5c99a[_0x2595d9(0x12b)](_0x1db3c4))throw new Error(_0x2595d9(0x13b)+_0x2f1f20);let _0xafcd0e=a114_0x1426a6[_0x2595d9(0x12f)](_0x1db3c4),_0x2ee446=null,_0x2e05d1=null;const _0x441dab=a114_0x1426a6['parse'](_0xafcd0e)[_0x2595d9(0x11d)];while(_0xafcd0e!==_0x441dab){const _0x41c3c4=a114_0x1426a6[_0x2595d9(0x131)](_0xafcd0e,_0x2595d9(0x11b));if(await _0xc5c99a[_0x2595d9(0x12b)](_0x41c3c4)){_0x2ee446=_0x41c3c4,_0x2e05d1=_0xafcd0e;break;}_0xafcd0e=a114_0x1426a6[_0x2595d9(0x12f)](_0xafcd0e);}if(!_0x2ee446||!_0x2e05d1)throw new Error('No\x20tdx.json\x20found\x20for\x20file:\x20'+_0x2f1f20);const _0x138239=await _0xc5c99a[_0x2595d9(0x138)](_0x2ee446),_0x5bc62f=JSON['parse'](_0x138239),_0x24e358=_0x5bc62f[_0x2595d9(0x118)];if(!_0x24e358)throw new Error('Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field');const _0x3760ab=await _0xc5c99a[_0x2595d9(0x138)](_0x1db3c4),_0x3e1f02=a114_0x199d5b(_0x3760ab),_0x110784=_0x3e1f02[_0x2595d9(0x13a)];if(!_0x110784)throw new Error(_0x2595d9(0x140)+_0x2f1f20);const _0x3a418e=_0x3e1f02['type']==='journey'?_0x2595d9(0x142):_0x2595d9(0x12e),_0x27a17d=a114_0x1426a6['relative'](_0x2e05d1,_0x1db3c4),_0x15c873=a114_0x1426a6[_0x2595d9(0x12f)](_0x27a17d),_0x558c86=_0x15c873==='.'?'':_0x15c873[_0x2595d9(0x121)](/\\/g,'/'),_0x2ed242=_0x558c86?_0x24e358+'/'+_0x558c86+'/'+_0x110784:_0x24e358+'/'+_0x110784;return{'parentSegment':_0x24e358,'segmentName':_0x110784,'folderPath':_0x558c86,'fullPath':_0x2ed242,'resourceType':_0x3a418e};}
@@ -1 +1 @@
1
- function a115_0x5bf3(_0x2c5bb0,_0x1542da){_0x2c5bb0=_0x2c5bb0-0x80;const _0x32359f=a115_0x3235();let _0x5bf32b=_0x32359f[_0x2c5bb0];return _0x5bf32b;}function a115_0x3235(){const _0x2558ad=['substring','729304uMFxsP','Invalid\x20segment\x20reference\x20format:\x20','1066023snOzox','47982mMLNDL','49699diKgrI','indexOf','6ANVaPv','1262982kEzknC','6QuJEPr','76060BcfXUu','.\x20Parent\x20name\x20cannot\x20be\x20empty','7716ifAQEG','205Aekcbk'];a115_0x3235=function(){return _0x2558ad;};return a115_0x3235();}(function(_0x20ecb0,_0x22f1c1){const _0x2e2587=a115_0x5bf3,_0x4b26da=_0x20ecb0();while(!![]){try{const _0x1b5423=-parseInt(_0x2e2587(0x83))/0x1+parseInt(_0x2e2587(0x82))/0x2*(parseInt(_0x2e2587(0x85))/0x3)+parseInt(_0x2e2587(0x8a))/0x4*(-parseInt(_0x2e2587(0x8b))/0x5)+-parseInt(_0x2e2587(0x87))/0x6*(-parseInt(_0x2e2587(0x86))/0x7)+-parseInt(_0x2e2587(0x8d))/0x8+parseInt(_0x2e2587(0x81))/0x9+parseInt(_0x2e2587(0x88))/0xa;if(_0x1b5423===_0x22f1c1)break;else _0x4b26da['push'](_0x4b26da['shift']());}catch(_0x17e3ac){_0x4b26da['push'](_0x4b26da['shift']());}}}(a115_0x3235,0x20d6e));export function parseSegmentRef(_0x2ec270){const _0x5339d6=a115_0x5bf3,_0x28bafd=_0x2ec270[_0x5339d6(0x84)]('/');if(_0x28bafd===-0x1)return{'parentId':_0x2ec270};if(_0x28bafd===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x2ec270+_0x5339d6(0x89));const _0x3a158c=_0x2ec270['substring'](0x0,_0x28bafd),_0x452954=_0x2ec270[_0x5339d6(0x8c)](_0x28bafd+0x1);if(_0x452954==='')throw new Error(_0x5339d6(0x80)+_0x2ec270+'.\x20Child\x20name\x20cannot\x20be\x20empty');return{'parentId':_0x3a158c,'childId':_0x452954};}
1
+ (function(_0x479ba4,_0x21eb95){const _0x723f6c=a115_0x47b6,_0x3fe172=_0x479ba4();while(!![]){try{const _0x2e6259=parseInt(_0x723f6c(0xbd))/0x1+parseInt(_0x723f6c(0xc8))/0x2+-parseInt(_0x723f6c(0xc3))/0x3*(-parseInt(_0x723f6c(0xbb))/0x4)+parseInt(_0x723f6c(0xbe))/0x5+-parseInt(_0x723f6c(0xbc))/0x6*(parseInt(_0x723f6c(0xbf))/0x7)+-parseInt(_0x723f6c(0xc1))/0x8+parseInt(_0x723f6c(0xc7))/0x9;if(_0x2e6259===_0x21eb95)break;else _0x3fe172['push'](_0x3fe172['shift']());}catch(_0x4e9ea2){_0x3fe172['push'](_0x3fe172['shift']());}}}(a115_0x2e86,0xbc3e8));function a115_0x2e86(){const _0x466166=['516cmHMKY','837454OcvfiR','478165yCQprI','27916fIrjTO','substring','8529968iyaycj','Invalid\x20segment\x20reference\x20format:\x20','531zASIbB','.\x20Parent\x20name\x20cannot\x20be\x20empty','.\x20Child\x20name\x20cannot\x20be\x20empty','indexOf','604341BexMev','341544rWBkTe','22808dJRwDB'];a115_0x2e86=function(){return _0x466166;};return a115_0x2e86();}function a115_0x47b6(_0x36afa9,_0x2508c3){_0x36afa9=_0x36afa9-0xbb;const _0x2e86bd=a115_0x2e86();let _0x47b666=_0x2e86bd[_0x36afa9];return _0x47b666;}export function parseSegmentRef(_0x19e34b){const _0x4afe3f=a115_0x47b6,_0x4f6137=_0x19e34b[_0x4afe3f(0xc6)]('/');if(_0x4f6137===-0x1)return{'parentId':_0x19e34b};if(_0x4f6137===0x0)throw new Error(_0x4afe3f(0xc2)+_0x19e34b+_0x4afe3f(0xc4));const _0x2f2981=_0x19e34b[_0x4afe3f(0xc0)](0x0,_0x4f6137),_0x5f33db=_0x19e34b[_0x4afe3f(0xc0)](_0x4f6137+0x1);if(_0x5f33db==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x19e34b+_0x4afe3f(0xc5));return{'parentId':_0x2f2981,'childId':_0x5f33db};}
@@ -1 +1 @@
1
- (function(_0x11743f,_0x728416){const _0xebf875=a116_0x3374,_0x44b686=_0x11743f();while(!![]){try{const _0x3cc281=-parseInt(_0xebf875(0x113))/0x1*(parseInt(_0xebf875(0x12f))/0x2)+-parseInt(_0xebf875(0x109))/0x3*(-parseInt(_0xebf875(0x104))/0x4)+parseInt(_0xebf875(0x102))/0x5+-parseInt(_0xebf875(0x129))/0x6*(-parseInt(_0xebf875(0xfc))/0x7)+-parseInt(_0xebf875(0x128))/0x8*(-parseInt(_0xebf875(0xfb))/0x9)+-parseInt(_0xebf875(0x10a))/0xa*(-parseInt(_0xebf875(0x121))/0xb)+-parseInt(_0xebf875(0x10c))/0xc;if(_0x3cc281===_0x728416)break;else _0x44b686['push'](_0x44b686['shift']());}catch(_0x191285){_0x44b686['push'](_0x44b686['shift']());}}}(a116_0x49f3,0x4b472));function a116_0x3374(_0x57323f,_0x571156){_0x57323f=_0x57323f-0xfb;const _0x49f384=a116_0x49f3();let _0x337430=_0x49f384[_0x57323f];return _0x337430;}import a116_0x3d54b8 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(_0x208ea7){return _0x208ea7['type']!=='error';}export function isScopedResolution(_0x29784d){const _0x47fde0=a116_0x3374;return _0x29784d[_0x47fde0(0x127)]===_0x47fde0(0xff)||_0x29784d[_0x47fde0(0x127)]===_0x47fde0(0x106)||_0x29784d[_0x47fde0(0x127)]===_0x47fde0(0x100);}export function getScopedDetails(_0x51a619){const _0xfe9ae0=a116_0x3374;if(isScopedResolution(_0x51a619))return{'isScoped':_0x51a619['isScoped'],'scopedFolderPath':_0x51a619[_0xfe9ae0(0x107)]};return undefined;}async function findTdxConfigAsync(_0x66ee9b,_0x6d7dfd){const _0x38757a=a116_0x3374;let _0x1c5d6e=a116_0x3d54b8[_0x38757a(0x117)](_0x66ee9b);const _0x74b768=a116_0x3d54b8[_0x38757a(0x133)](_0x1c5d6e)[_0x38757a(0x124)];while(_0x1c5d6e!==_0x74b768){const _0x5b1094=a116_0x3d54b8[_0x38757a(0x116)](_0x1c5d6e,_0x38757a(0x11b));if(await _0x6d7dfd[_0x38757a(0x135)](_0x5b1094))try{const _0x284ae4=await _0x6d7dfd[_0x38757a(0x11e)](_0x5b1094),_0x1bd322=JSON[_0x38757a(0x133)](_0x284ae4);if(_0x1bd322[_0x38757a(0x131)]&&typeof _0x1bd322[_0x38757a(0x131)]==='string')return{'configPath':_0x5b1094,'configDir':_0x1c5d6e,'parentSegment':_0x1bd322[_0x38757a(0x131)]};}catch{}_0x1c5d6e=a116_0x3d54b8[_0x38757a(0x103)](_0x1c5d6e);}return null;}function a116_0x49f3(){const _0x48adcd=['tdx.json','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cwd','readFile','error','invalid_yaml','17842liLRiP','segment','No\x20tdx.json\x20found\x20for\x20file:\x20','root','File\x20not\x20found','journey','type','70624eBWyQm','359862GyegYt','Parent\x20segment\x20not\x20specified','extname','parentSegment','message','includes','6MRaWQB','segmentName','parent_segment','File\x20not\x20found:\x20','parse','match','exists','504WKWlko','49ZlNzfW','isFile','startsWith','directory','context','no_config','1199600xjjhNg','dirname','68bxCvSn','parent_name','file','scopedFolderPath','folderPath','52743mvGNSM','3470HRAifk','resourceType','19312152PeieAQ','relative','isScoped','stat','Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension','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','basename','32718NAZRWm','replace','configDir','join','resolve','trim','file_not_found','no_parent'];a116_0x49f3=function(){return _0x48adcd;};return a116_0x49f3();}function calculateScopedPath(_0x198235,_0x19d255){const _0x278663=a116_0x3374,_0x142301=a116_0x3d54b8[_0x278663(0x10d)](_0x19d255,_0x198235),_0x1754db=_0x142301!==''&&_0x142301!=='.'&&!_0x142301[_0x278663(0xfe)]('..');return{'isScoped':_0x1754db,'scopedFolderPath':_0x1754db?_0x142301[_0x278663(0x114)](/\\/g,'/'):''};}export async function resolveTarget(_0x4e757e){const _0xc20260=a116_0x3374,{arg:_0x50cacf,contextParent:_0x2cf796,cwd:cwd=process[_0xc20260(0x11d)](),fs:fs=nodeFileSystem}=_0x4e757e;if(_0x50cacf&&isYamlFilePath(_0x50cacf))try{const _0x3ef426=await resolveYamlFilePath(_0x50cacf,fs),_0x5ebf2a=a116_0x3d54b8[_0xc20260(0x117)](_0x50cacf),_0xa974ad=a116_0x3d54b8[_0xc20260(0x103)](_0x5ebf2a),_0x12742d=await findTdxConfigAsync(_0xa974ad,fs);if(!_0x12742d){if(_0x2cf796){const _0x2d85c7=a116_0x3d54b8['dirname'](_0x5ebf2a);return{'type':'file','parentName':_0x2cf796,'targetDir':_0x2d85c7,'configRoot':_0x2d85c7,'filePath':_0x5ebf2a,'resourceName':_0x3ef426[_0xc20260(0x130)],'folderPath':_0x3ef426[_0xc20260(0x108)],'resourceType':_0x3ef426[_0xc20260(0x10b)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc20260(0x11f),'errorCode':_0xc20260(0x101),'message':_0xc20260(0x123)+_0x50cacf,'arg':_0x50cacf,'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 _0x4427a9=calculateScopedPath(_0xa974ad,_0x12742d[_0xc20260(0x115)]);return{'type':_0xc20260(0x106),'parentName':_0x12742d[_0xc20260(0x12c)],'targetDir':_0x12742d[_0xc20260(0x115)],'configRoot':_0x12742d[_0xc20260(0x115)],'filePath':_0x5ebf2a,'resourceName':_0x3ef426['segmentName'],'folderPath':_0x3ef426[_0xc20260(0x108)],'resourceType':_0x3ef426['resourceType'],'isScoped':_0x4427a9[_0xc20260(0x10e)],'scopedFolderPath':_0x4427a9[_0xc20260(0x107)]};}catch(_0x2155bc){const _0x17cf57=_0x2155bc instanceof Error?_0x2155bc[_0xc20260(0x12d)]:String(_0x2155bc);if(_0x17cf57[_0xc20260(0x12e)](_0xc20260(0x125)))return{'type':_0xc20260(0x11f),'errorCode':_0xc20260(0x119),'message':_0xc20260(0x132)+_0x50cacf,'arg':_0x50cacf};if(_0x17cf57[_0xc20260(0x12e)]('No\x20tdx.json\x20found')){if(_0x2cf796){const _0x327828=a116_0x3d54b8['resolve'](_0x50cacf);if(await fs['exists'](_0x327828)){const _0x521f0a=a116_0x3d54b8[_0xc20260(0x103)](_0x327828),_0x9062c8=await fs['readFile'](_0x327828),_0x2f684a=_0x9062c8[_0xc20260(0x134)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x919099=_0x9062c8[_0xc20260(0x134)](/^type:\s*["']?([^"'\n]+)["']?/m),_0x373ee5=_0x2f684a?_0x2f684a[0x1][_0xc20260(0x118)]():a116_0x3d54b8[_0xc20260(0x112)](_0x50cacf,a116_0x3d54b8[_0xc20260(0x12b)](_0x50cacf)),_0x42893f=_0x919099&&_0x919099[0x1][_0xc20260(0x118)]()===_0xc20260(0x126)?_0xc20260(0x126):_0xc20260(0x122);return{'type':'file','parentName':_0x2cf796,'targetDir':_0x521f0a,'configRoot':_0x521f0a,'filePath':_0x327828,'resourceName':_0x373ee5,'folderPath':'','resourceType':_0x42893f,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0xc20260(0x11f),'errorCode':'no_config','message':_0xc20260(0x123)+_0x50cacf,'arg':_0x50cacf,'helpText':_0xc20260(0x111)};}return{'type':_0xc20260(0x11f),'errorCode':_0xc20260(0x120),'message':_0x17cf57,'arg':_0x50cacf};}if(_0x50cacf){const _0x4fa5a1=a116_0x3d54b8['resolve'](cwd,_0x50cacf);let _0x294a04=null;try{_0x294a04=await fs[_0xc20260(0x10f)](_0x4fa5a1);}catch{}if(_0x294a04?.['isDirectory']()){const _0x59cdbe=await findTdxConfigAsync(_0x4fa5a1,fs);if(_0x59cdbe){const _0x40b514=calculateScopedPath(_0x4fa5a1,_0x59cdbe[_0xc20260(0x115)]);return{'type':_0xc20260(0xff),'parentName':_0x59cdbe[_0xc20260(0x12c)],'targetDir':_0x4fa5a1,'configRoot':_0x59cdbe[_0xc20260(0x115)],'isScoped':_0x40b514['isScoped'],'scopedFolderPath':_0x40b514[_0xc20260(0x107)]};}if(_0x2cf796)return{'type':_0xc20260(0xff),'parentName':_0x2cf796,'targetDir':_0x4fa5a1,'configRoot':_0x4fa5a1,'isScoped':![],'scopedFolderPath':''};return{'type':_0xc20260(0x11f),'errorCode':'no_config','message':_0xc20260(0x11c)+_0x50cacf,'arg':_0x50cacf,'helpText':_0xc20260(0x111)};}if(_0x294a04?.[_0xc20260(0xfd)]())return{'type':_0xc20260(0x11f),'errorCode':_0xc20260(0x120),'message':'Not\x20a\x20YAML\x20file:\x20'+_0x50cacf,'arg':_0x50cacf,'helpText':_0xc20260(0x110)};const _0x13f30a=sanitizeFileName(_0x50cacf),_0x5870e2=getSegmentRootDir(_0x13f30a,cwd);return{'type':_0xc20260(0x105),'parentName':_0x50cacf,'targetDir':_0x5870e2,'configRoot':_0x5870e2};}const _0x151f57=await findTdxConfigAsync(cwd,fs);if(_0x151f57){const _0x471062=calculateScopedPath(cwd,_0x151f57[_0xc20260(0x115)]);return{'type':_0xc20260(0x100),'parentName':_0x151f57[_0xc20260(0x12c)],'targetDir':cwd,'configRoot':_0x151f57[_0xc20260(0x115)],'isScoped':_0x471062[_0xc20260(0x10e)],'scopedFolderPath':_0x471062[_0xc20260(0x107)]};}if(_0x2cf796){const _0x2d7d9e=sanitizeFileName(_0x2cf796),_0x5c12d5=getSegmentRootDir(_0x2d7d9e,cwd);return{'type':'context','parentName':_0x2cf796,'targetDir':_0x5c12d5,'configRoot':_0x5c12d5,'isScoped':![],'scopedFolderPath':''};}return{'type':_0xc20260(0x11f),'errorCode':_0xc20260(0x11a),'message':_0xc20260(0x12a),'helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
1
+ (function(_0x504b15,_0x248ae6){const _0xdb5de9=a116_0xb76d,_0x5e8129=_0x504b15();while(!![]){try{const _0x28f112=-parseInt(_0xdb5de9(0x103))/0x1*(parseInt(_0xdb5de9(0x106))/0x2)+parseInt(_0xdb5de9(0x120))/0x3*(-parseInt(_0xdb5de9(0xf8))/0x4)+parseInt(_0xdb5de9(0x110))/0x5*(-parseInt(_0xdb5de9(0x11d))/0x6)+-parseInt(_0xdb5de9(0x104))/0x7+-parseInt(_0xdb5de9(0x10d))/0x8*(parseInt(_0xdb5de9(0x115))/0x9)+-parseInt(_0xdb5de9(0x114))/0xa*(-parseInt(_0xdb5de9(0xef))/0xb)+-parseInt(_0xdb5de9(0x11f))/0xc*(-parseInt(_0xdb5de9(0x118))/0xd);if(_0x28f112===_0x248ae6)break;else _0x5e8129['push'](_0x5e8129['shift']());}catch(_0x49ee46){_0x5e8129['push'](_0x5e8129['shift']());}}}(a116_0xe399,0xd9c22));import a116_0x4f2d21 from'path';import{sanitizeFileName}from'../../utils/string-utils.js';import{nodeFileSystem}from'../io/node-filesystem.js';function a116_0xb76d(_0x4e5c46,_0x1a08f4){_0x4e5c46=_0x4e5c46-0xee;const _0xe3993e=a116_0xe399();let _0xb76d22=_0xe3993e[_0x4e5c46];return _0xb76d22;}import{isYamlFilePath,resolveYamlFilePath}from'./segment-path-parser.js';import{getSegmentRootDir}from'./tdx-config.js';export function isSuccessfulResolution(_0x4ae72e){const _0x5e3a34=a116_0xb76d;return _0x4ae72e[_0x5e3a34(0x117)]!==_0x5e3a34(0x112);}export function isScopedResolution(_0x427a06){const _0x368ecb=a116_0xb76d;return _0x427a06[_0x368ecb(0x117)]===_0x368ecb(0xf1)||_0x427a06[_0x368ecb(0x117)]===_0x368ecb(0x11e)||_0x427a06[_0x368ecb(0x117)]==='context';}export function getScopedDetails(_0x2529bb){const _0x107318=a116_0xb76d;if(isScopedResolution(_0x2529bb))return{'isScoped':_0x2529bb[_0x107318(0x125)],'scopedFolderPath':_0x2529bb[_0x107318(0x100)]};return undefined;}async function findTdxConfigAsync(_0x5064af,_0x2941c1){const _0x5c0bdf=a116_0xb76d;let _0x840096=a116_0x4f2d21[_0x5c0bdf(0xfe)](_0x5064af);const _0x4eb3f5=a116_0x4f2d21[_0x5c0bdf(0xf7)](_0x840096)['root'];while(_0x840096!==_0x4eb3f5){const _0x1bae85=a116_0x4f2d21[_0x5c0bdf(0x10b)](_0x840096,_0x5c0bdf(0x113));if(await _0x2941c1[_0x5c0bdf(0xf5)](_0x1bae85))try{const _0x4b86dd=await _0x2941c1['readFile'](_0x1bae85),_0x28b48d=JSON['parse'](_0x4b86dd);if(_0x28b48d[_0x5c0bdf(0x105)]&&typeof _0x28b48d[_0x5c0bdf(0x105)]===_0x5c0bdf(0xfa))return{'configPath':_0x1bae85,'configDir':_0x840096,'parentSegment':_0x28b48d[_0x5c0bdf(0x105)]};}catch{}_0x840096=a116_0x4f2d21['dirname'](_0x840096);}return null;}function a116_0xe399(){const _0x4acec4=['invalid_yaml','exists','trim','parse','50452tePHUK','dirname','string','No\x20tdx.json\x20found\x20for\x20file:\x20','parentSegment','startsWith','resolve','cwd','scopedFolderPath','no_config','segment','3AMEPLI','5299238npUmYH','parent_segment','755762YDeStH','segmentName','No\x20tdx.json\x20found','basename','no_parent','join','file_not_found','516904YNlQzO','parent_name','configDir','2386325oTSnqU','context','error','tdx.json','9910BCfjEW','153shAcCL','replace','type','13GULVMb','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','journey','isDirectory','extname','6qeVeBV','file','44114820TwTEKc','135FVckvb','match','folderPath','stat','File\x20not\x20found:\x20','isScoped','Not\x20a\x20YAML\x20file:\x20','isFile','13871FqDQEF','File\x20not\x20found','directory','resourceType','No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'];a116_0xe399=function(){return _0x4acec4;};return a116_0xe399();}function calculateScopedPath(_0x49b863,_0x21fd14){const _0x2200a9=a116_0xb76d,_0x541b1e=a116_0x4f2d21['relative'](_0x21fd14,_0x49b863),_0x6cb2e9=_0x541b1e!==''&&_0x541b1e!=='.'&&!_0x541b1e[_0x2200a9(0xfd)]('..');return{'isScoped':_0x6cb2e9,'scopedFolderPath':_0x6cb2e9?_0x541b1e[_0x2200a9(0x116)](/\\/g,'/'):''};}export async function resolveTarget(_0x3ca5fa){const _0x516e90=a116_0xb76d,{arg:_0xe64337,contextParent:_0x215958,cwd:cwd=process[_0x516e90(0xff)](),fs:fs=nodeFileSystem}=_0x3ca5fa;if(_0xe64337&&isYamlFilePath(_0xe64337))try{const _0x2c1484=await resolveYamlFilePath(_0xe64337,fs),_0xccaf80=a116_0x4f2d21[_0x516e90(0xfe)](_0xe64337),_0x38249d=a116_0x4f2d21[_0x516e90(0xf9)](_0xccaf80),_0x8cc0ff=await findTdxConfigAsync(_0x38249d,fs);if(!_0x8cc0ff){if(_0x215958){const _0x464e57=a116_0x4f2d21[_0x516e90(0xf9)](_0xccaf80);return{'type':_0x516e90(0x11e),'parentName':_0x215958,'targetDir':_0x464e57,'configRoot':_0x464e57,'filePath':_0xccaf80,'resourceName':_0x2c1484['segmentName'],'folderPath':_0x2c1484['folderPath'],'resourceType':_0x2c1484[_0x516e90(0xf2)],'isScoped':![],'scopedFolderPath':''};}return{'type':_0x516e90(0x112),'errorCode':_0x516e90(0x101),'message':'No\x20tdx.json\x20found\x20for\x20file:\x20'+_0xe64337,'arg':_0xe64337,'helpText':_0x516e90(0x119)};}const _0x417be0=calculateScopedPath(_0x38249d,_0x8cc0ff[_0x516e90(0x10f)]);return{'type':'file','parentName':_0x8cc0ff['parentSegment'],'targetDir':_0x8cc0ff[_0x516e90(0x10f)],'configRoot':_0x8cc0ff[_0x516e90(0x10f)],'filePath':_0xccaf80,'resourceName':_0x2c1484[_0x516e90(0x107)],'folderPath':_0x2c1484[_0x516e90(0x122)],'resourceType':_0x2c1484[_0x516e90(0xf2)],'isScoped':_0x417be0[_0x516e90(0x125)],'scopedFolderPath':_0x417be0[_0x516e90(0x100)]};}catch(_0x5015d5){const _0x38c34e=_0x5015d5 instanceof Error?_0x5015d5['message']:String(_0x5015d5);if(_0x38c34e['includes'](_0x516e90(0xf0)))return{'type':_0x516e90(0x112),'errorCode':_0x516e90(0x10c),'message':_0x516e90(0x124)+_0xe64337,'arg':_0xe64337};if(_0x38c34e['includes'](_0x516e90(0x108))){if(_0x215958){const _0x3775f8=a116_0x4f2d21['resolve'](_0xe64337);if(await fs[_0x516e90(0xf5)](_0x3775f8)){const _0x3ba143=a116_0x4f2d21[_0x516e90(0xf9)](_0x3775f8),_0x914054=await fs['readFile'](_0x3775f8),_0x4a005b=_0x914054[_0x516e90(0x121)](/^name:\s*["']?([^"'\n]+)["']?/m),_0x5d6802=_0x914054['match'](/^type:\s*["']?([^"'\n]+)["']?/m),_0x5a917b=_0x4a005b?_0x4a005b[0x1][_0x516e90(0xf6)]():a116_0x4f2d21[_0x516e90(0x109)](_0xe64337,a116_0x4f2d21[_0x516e90(0x11c)](_0xe64337)),_0x3a7580=_0x5d6802&&_0x5d6802[0x1][_0x516e90(0xf6)]()==='journey'?_0x516e90(0x11a):_0x516e90(0x102);return{'type':_0x516e90(0x11e),'parentName':_0x215958,'targetDir':_0x3ba143,'configRoot':_0x3ba143,'filePath':_0x3775f8,'resourceName':_0x5a917b,'folderPath':'','resourceType':_0x3a7580,'isScoped':![],'scopedFolderPath':''};}}return{'type':_0x516e90(0x112),'errorCode':_0x516e90(0x101),'message':_0x516e90(0xfb)+_0xe64337,'arg':_0xe64337,'helpText':'Tip:\x20Run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure\x0a\x20\x20Or\x20set\x20context:\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27'};}return{'type':_0x516e90(0x112),'errorCode':_0x516e90(0xf4),'message':_0x38c34e,'arg':_0xe64337};}if(_0xe64337){const _0x32cfea=a116_0x4f2d21[_0x516e90(0xfe)](cwd,_0xe64337);let _0x5de48a=null;try{_0x5de48a=await fs[_0x516e90(0x123)](_0x32cfea);}catch{}if(_0x5de48a?.[_0x516e90(0x11b)]()){const _0x1264c7=await findTdxConfigAsync(_0x32cfea,fs);if(_0x1264c7){const _0x39246e=calculateScopedPath(_0x32cfea,_0x1264c7['configDir']);return{'type':'directory','parentName':_0x1264c7['parentSegment'],'targetDir':_0x32cfea,'configRoot':_0x1264c7[_0x516e90(0x10f)],'isScoped':_0x39246e['isScoped'],'scopedFolderPath':_0x39246e[_0x516e90(0x100)]};}if(_0x215958)return{'type':_0x516e90(0xf1),'parentName':_0x215958,'targetDir':_0x32cfea,'configRoot':_0x32cfea,'isScoped':![],'scopedFolderPath':''};return{'type':_0x516e90(0x112),'errorCode':_0x516e90(0x101),'message':_0x516e90(0xf3)+_0xe64337,'arg':_0xe64337,'helpText':_0x516e90(0x119)};}if(_0x5de48a?.[_0x516e90(0xee)]())return{'type':'error','errorCode':_0x516e90(0xf4),'message':_0x516e90(0x126)+_0xe64337,'arg':_0xe64337,'helpText':'Segment\x20and\x20journey\x20files\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension'};const _0x5d1f66=sanitizeFileName(_0xe64337),_0x102c36=getSegmentRootDir(_0x5d1f66,cwd);return{'type':_0x516e90(0x10e),'parentName':_0xe64337,'targetDir':_0x102c36,'configRoot':_0x102c36};}const _0x291624=await findTdxConfigAsync(cwd,fs);if(_0x291624){const _0x3a71d6=calculateScopedPath(cwd,_0x291624[_0x516e90(0x10f)]);return{'type':_0x516e90(0x111),'parentName':_0x291624[_0x516e90(0xfc)],'targetDir':cwd,'configRoot':_0x291624['configDir'],'isScoped':_0x3a71d6[_0x516e90(0x125)],'scopedFolderPath':_0x3a71d6['scopedFolderPath']};}if(_0x215958){const _0x25125b=sanitizeFileName(_0x215958),_0x4405a9=getSegmentRootDir(_0x25125b,cwd);return{'type':_0x516e90(0x111),'parentName':_0x215958,'targetDir':_0x4405a9,'configRoot':_0x4405a9,'isScoped':![],'scopedFolderPath':''};}return{'type':_0x516e90(0x112),'errorCode':_0x516e90(0x10a),'message':'Parent\x20segment\x20not\x20specified','helpText':'Use\x20\x27tdx\x20sg\x20use\x20<parent_name>\x27\x20to\x20set\x20context\x0aOr\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_name>\x27\x20to\x20create\x20the\x20folder\x20structure'};}
@@ -1 +1 @@
1
- const a117_0x2fa5fc=a117_0xf409;(function(_0x462a6f,_0x500295){const _0x3edd3b=a117_0xf409,_0x2a3e6d=_0x462a6f();while(!![]){try{const _0x4e0a76=-parseInt(_0x3edd3b(0x101))/0x1*(parseInt(_0x3edd3b(0xea))/0x2)+-parseInt(_0x3edd3b(0xec))/0x3*(-parseInt(_0x3edd3b(0xfe))/0x4)+-parseInt(_0x3edd3b(0xf9))/0x5*(parseInt(_0x3edd3b(0xf0))/0x6)+parseInt(_0x3edd3b(0xe8))/0x7+-parseInt(_0x3edd3b(0xef))/0x8*(-parseInt(_0x3edd3b(0xf7))/0x9)+parseInt(_0x3edd3b(0xfd))/0xa*(parseInt(_0x3edd3b(0xff))/0xb)+-parseInt(_0x3edd3b(0xe7))/0xc;if(_0x4e0a76===_0x500295)break;else _0x2a3e6d['push'](_0x2a3e6d['shift']());}catch(_0x9bcf08){_0x2a3e6d['push'](_0x2a3e6d['shift']());}}}(a117_0xa7d2,0xd0849));import{existsSync,readFileSync}from'fs';import a117_0x5af775 from'path';function a117_0xa7d2(){const _0x19c88d=['parent_segment','object','resolve','397730ONZigX','8ZZhAyq','418xeVAMS','relative','1qxWnuJ','replace','38641164TxwiXz','9660882sfqsyJ','dirname','3314264vKAsfF','tdx.json','2513028CQmDkb','stringify','cwd','16lnEFuo','3008832SoOPoi','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','join','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20tdx.json:\x20expected\x20object','segments','utf-8','7496721KLQwFZ','parse','5upsocY'];a117_0xa7d2=function(){return _0x19c88d;};return a117_0xa7d2();}const TDX_CONFIG_FILE=a117_0x2fa5fc(0xeb),SEGMENTS_DIR=a117_0x2fa5fc(0xf5);export function findTdxConfigPath(_0x44306d=process['cwd']()){const _0x34f059=a117_0x2fa5fc;let _0x2e3758=a117_0x5af775['resolve'](_0x44306d);const _0x3132aa=a117_0x5af775[_0x34f059(0xf8)](_0x2e3758)['root'];while(_0x2e3758!==_0x3132aa){const _0x5d3c2d=a117_0x5af775[_0x34f059(0xf2)](_0x2e3758,TDX_CONFIG_FILE);if(existsSync(_0x5d3c2d))return _0x5d3c2d;_0x2e3758=a117_0x5af775['dirname'](_0x2e3758);}return null;}export function loadTdxConfig(_0x4164ed){const _0x20f788=a117_0x2fa5fc,_0x4caf01=readFileSync(_0x4164ed,_0x20f788(0xf6));let _0x592d1f;try{_0x592d1f=JSON[_0x20f788(0xf8)](_0x4caf01);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x4164ed);}if(!_0x592d1f||typeof _0x592d1f!==_0x20f788(0xfb))throw new Error(_0x20f788(0xf4));const _0x4ed3e9=_0x592d1f;if(!_0x4ed3e9[_0x20f788(0xfa)]||typeof _0x4ed3e9[_0x20f788(0xfa)]!=='string')throw new Error(_0x20f788(0xf1));return{'parent_segment':_0x4ed3e9[_0x20f788(0xfa)]};}export function findTdxConfig(_0x1c3f7f=process[a117_0x2fa5fc(0xee)]()){const _0x2604b3=a117_0x2fa5fc,_0x5bcfcd=findTdxConfigPath(_0x1c3f7f);if(!_0x5bcfcd)throw new Error(_0x2604b3(0xf3));const _0x2deed2=loadTdxConfig(_0x5bcfcd),_0x190a48=a117_0x5af775[_0x2604b3(0xe9)](_0x5bcfcd);return{'config':_0x2deed2,'configPath':_0x5bcfcd,'configDir':_0x190a48};}export function tryFindTdxConfig(_0x4e0402){try{return findTdxConfig(_0x4e0402);}catch{return null;}}export function getSegmentRootDir(_0x2d9c2a,_0x4c408e=process[a117_0x2fa5fc(0xee)]()){const _0x238c7b=a117_0x2fa5fc;return a117_0x5af775[_0x238c7b(0xf2)](_0x4c408e,SEGMENTS_DIR,_0x2d9c2a);}export function getTdxConfigPath(_0xd12871,_0x307deb=process[a117_0x2fa5fc(0xee)]()){const _0x59b45e=a117_0x2fa5fc;return a117_0x5af775[_0x59b45e(0xf2)](getSegmentRootDir(_0xd12871,_0x307deb),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x1d1eba,_0x55fe8c){const _0x1b9202=a117_0x2fa5fc,_0x4fbe9c=a117_0x5af775[_0x1b9202(0xfc)](_0x1d1eba),_0x574a85=a117_0x5af775[_0x1b9202(0x100)](_0x55fe8c,_0x4fbe9c);if(_0x574a85['startsWith']('..'))return'';return _0x574a85;}export function localPathToTdFolderPath(_0x42123a){const _0x26899c=a117_0x2fa5fc,_0xe18423=a117_0x5af775[_0x26899c(0xe9)](_0x42123a);if(_0xe18423==='.'||_0xe18423==='')return'';return _0xe18423[_0x26899c(0xe6)](/\\/g,'/');}function a117_0xf409(_0x5da5b6,_0x1f2ab3){_0x5da5b6=_0x5da5b6-0xe6;const _0xa7d202=a117_0xa7d2();let _0xf409f5=_0xa7d202[_0x5da5b6];return _0xf409f5;}export function tdFolderPathToLocalPath(_0x419bf9,_0x318426){if(!_0x419bf9)return _0x318426;return a117_0x5af775['join'](_0x318426,_0x419bf9);}export function createTdxConfigContent(_0x5f1b0e){const _0x1ec93d=a117_0x2fa5fc,_0x20e050={'parent_segment':_0x5f1b0e};return JSON[_0x1ec93d(0xed)](_0x20e050,null,0x2)+'\x0a';}
1
+ const a117_0x6db733=a117_0x5d4b;(function(_0x290d96,_0x5aed99){const _0x3fe1c2=a117_0x5d4b,_0x50fdbb=_0x290d96();while(!![]){try{const _0x2057dd=-parseInt(_0x3fe1c2(0x173))/0x1*(-parseInt(_0x3fe1c2(0x178))/0x2)+parseInt(_0x3fe1c2(0x175))/0x3*(-parseInt(_0x3fe1c2(0x17c))/0x4)+-parseInt(_0x3fe1c2(0x17b))/0x5+-parseInt(_0x3fe1c2(0x17a))/0x6+parseInt(_0x3fe1c2(0x171))/0x7+-parseInt(_0x3fe1c2(0x165))/0x8*(parseInt(_0x3fe1c2(0x167))/0x9)+-parseInt(_0x3fe1c2(0x16c))/0xa*(-parseInt(_0x3fe1c2(0x163))/0xb);if(_0x2057dd===_0x5aed99)break;else _0x50fdbb['push'](_0x50fdbb['shift']());}catch(_0x4810cf){_0x50fdbb['push'](_0x50fdbb['shift']());}}}(a117_0x10a7,0xbfc33));function a117_0x5d4b(_0x16ec20,_0x2cd8cb){_0x16ec20=_0x16ec20-0x163;const _0x10a71e=a117_0x10a7();let _0x5d4b20=_0x10a71e[_0x16ec20];return _0x5d4b20;}import{existsSync,readFileSync}from'fs';import a117_0x2a7bdf from'path';const TDX_CONFIG_FILE=a117_0x6db733(0x164),SEGMENTS_DIR=a117_0x6db733(0x16e);export function findTdxConfigPath(_0x2ca96c=process[a117_0x6db733(0x168)]()){const _0x432853=a117_0x6db733;let _0x5b661f=a117_0x2a7bdf[_0x432853(0x172)](_0x2ca96c);const _0x4f4853=a117_0x2a7bdf[_0x432853(0x177)](_0x5b661f)[_0x432853(0x174)];while(_0x5b661f!==_0x4f4853){const _0x5e16ac=a117_0x2a7bdf['join'](_0x5b661f,TDX_CONFIG_FILE);if(existsSync(_0x5e16ac))return _0x5e16ac;_0x5b661f=a117_0x2a7bdf[_0x432853(0x179)](_0x5b661f);}return null;}export function loadTdxConfig(_0x10007b){const _0x51f558=a117_0x6db733,_0x2bc6fe=readFileSync(_0x10007b,_0x51f558(0x16d));let _0x323daf;try{_0x323daf=JSON[_0x51f558(0x177)](_0x2bc6fe);}catch{throw new Error(_0x51f558(0x17d)+_0x10007b);}if(!_0x323daf||typeof _0x323daf!==_0x51f558(0x16b))throw new Error(_0x51f558(0x16f));const _0x35b960=_0x323daf;if(!_0x35b960['parent_segment']||typeof _0x35b960['parent_segment']!==_0x51f558(0x169))throw new Error('Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field');return{'parent_segment':_0x35b960['parent_segment']};}export function findTdxConfig(_0x4cf070=process[a117_0x6db733(0x168)]()){const _0x43eb23=a117_0x6db733,_0xd58358=findTdxConfigPath(_0x4cf070);if(!_0xd58358)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x2124e0=loadTdxConfig(_0xd58358),_0x138b5c=a117_0x2a7bdf[_0x43eb23(0x179)](_0xd58358);return{'config':_0x2124e0,'configPath':_0xd58358,'configDir':_0x138b5c};}export function tryFindTdxConfig(_0x565bb7){try{return findTdxConfig(_0x565bb7);}catch{return null;}}export function getSegmentRootDir(_0x468753,_0x36ecd2=process[a117_0x6db733(0x168)]()){const _0x506ec6=a117_0x6db733;return a117_0x2a7bdf[_0x506ec6(0x166)](_0x36ecd2,SEGMENTS_DIR,_0x468753);}function a117_0x10a7(){const _0xacd056=['1886824xQdhjX','join','27TASycj','cwd','string','stringify','object','1267020sAMLVi','utf-8','segments','Invalid\x20tdx.json:\x20expected\x20object','startsWith','5439140NfGnpP','resolve','237857kcFaSj','root','988806RfVSrB','replace','parse','10WUmxTg','dirname','3397764YhGBDd','6122585KhSWYf','4VjAktS','Invalid\x20JSON\x20in\x20','relative','143jjdAjg','tdx.json'];a117_0x10a7=function(){return _0xacd056;};return a117_0x10a7();}export function getTdxConfigPath(_0x4e49f7,_0x238df9=process[a117_0x6db733(0x168)]()){const _0x43fcca=a117_0x6db733;return a117_0x2a7bdf[_0x43fcca(0x166)](getSegmentRootDir(_0x4e49f7,_0x238df9),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x3d1b3c,_0x1fbd87){const _0x22c528=a117_0x6db733,_0x2ff9c2=a117_0x2a7bdf[_0x22c528(0x172)](_0x3d1b3c),_0x100f0f=a117_0x2a7bdf[_0x22c528(0x17e)](_0x1fbd87,_0x2ff9c2);if(_0x100f0f[_0x22c528(0x170)]('..'))return'';return _0x100f0f;}export function localPathToTdFolderPath(_0x3e5498){const _0x799801=a117_0x6db733,_0x3e05f6=a117_0x2a7bdf[_0x799801(0x179)](_0x3e5498);if(_0x3e05f6==='.'||_0x3e05f6==='')return'';return _0x3e05f6[_0x799801(0x176)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x12fa9d,_0x5a1371){if(!_0x12fa9d)return _0x5a1371;return a117_0x2a7bdf['join'](_0x5a1371,_0x12fa9d);}export function createTdxConfigContent(_0x17c072){const _0x9bf5d5=a117_0x6db733,_0x571a9a={'parent_segment':_0x17c072};return JSON[_0x9bf5d5(0x16a)](_0x571a9a,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a121_0x4e8943=a121_0x4475;(function(_0x4a80de,_0x238de1){const _0x325d2c=a121_0x4475,_0x1f1eb9=_0x4a80de();while(!![]){try{const _0x12f2f1=parseInt(_0x325d2c(0x1e7))/0x1*(parseInt(_0x325d2c(0x1dd))/0x2)+-parseInt(_0x325d2c(0x1cc))/0x3+parseInt(_0x325d2c(0x1d2))/0x4+parseInt(_0x325d2c(0x1d1))/0x5+parseInt(_0x325d2c(0x1ce))/0x6+-parseInt(_0x325d2c(0x1e6))/0x7+-parseInt(_0x325d2c(0x1d0))/0x8;if(_0x12f2f1===_0x238de1)break;else _0x1f1eb9['push'](_0x1f1eb9['shift']());}catch(_0x35842f){_0x1f1eb9['push'](_0x1f1eb9['shift']());}}}(a121_0x242b,0x96a23));import{readFileSync}from'fs';import*as a121_0x314ab9 from'path';import*as a121_0x23f6c8 from'yaml';function a121_0x4475(_0x105f48,_0x34c4ef){_0x105f48=_0x105f48-0x1cc;const _0x242b18=a121_0x242b();let _0x4475ff=_0x242b18[_0x105f48];return _0x4475ff;}import{validateSegmentDef,validateJourneyDef}from'./yaml-validator.js';export function isJourneyDef(_0x3fe58f){const _0x20ceb8=a121_0x4475;return typeof _0x3fe58f===_0x20ceb8(0x1cd)&&_0x3fe58f!==null&&_0x20ceb8(0x1dc)in _0x3fe58f&&_0x3fe58f['type']===_0x20ceb8(0x1d9);}export function isValidationResult(_0x22b33e){const _0x56ae47=a121_0x4475;return!(_0x56ae47(0x1d4)in _0x22b33e);}export function createParseErrorResult(_0x3b053b,_0xb8c083,_0x23bab2,_0x64b7a6,_0x27b972=a121_0x4e8943(0x1df)){const _0x3eef3b=a121_0x4e8943;return{'filePath':_0x3b053b,'relativePath':_0xb8c083,'source':_0x23bab2,'result':{'valid':![],'errors':[{'level':_0x3eef3b(0x1d3),'path':'','code':_0x3eef3b(0x1d8),'message':_0x64b7a6}],'warnings':[]},'fileType':_0x27b972};}export function validateYamlFile(_0x56d58f,_0x3ed088,_0x46d96a={}){const _0x2550a0=a121_0x4e8943,_0x36e8bd=a121_0x314ab9[_0x2550a0(0x1e0)](_0x3ed088,_0x56d58f)||a121_0x314ab9[_0x2550a0(0x1d7)](_0x56d58f);try{const _0xd362f8=readFileSync(_0x56d58f,_0x2550a0(0x1de)),_0x1fd4cc=a121_0x23f6c8[_0x2550a0(0x1d5)](_0xd362f8),_0x523370=_0x1fd4cc[_0x2550a0(0x1e4)]();if(!_0x523370)return createParseErrorResult(_0x56d58f,_0x36e8bd,_0xd362f8,'Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)');const _0x292fbe=isJourneyDef(_0x523370)?_0x2550a0(0x1d9):_0x2550a0(0x1df);if(_0x46d96a[_0x2550a0(0x1e2)]&&_0x292fbe!==_0x46d96a[_0x2550a0(0x1e2)])return{'filePath':_0x56d58f,'relativePath':_0x36e8bd,'skipped':!![],'reason':_0x2550a0(0x1da)+_0x46d96a[_0x2550a0(0x1e2)]};const _0x1e32a0={'source':_0xd362f8,'document':_0x1fd4cc},_0x46c787=_0x292fbe===_0x2550a0(0x1d9)?validateJourneyDef(_0x523370,_0x1e32a0):validateSegmentDef(_0x523370,_0x1e32a0);return{'filePath':_0x56d58f,'relativePath':_0x36e8bd,'source':_0xd362f8,'result':_0x46c787,'fileType':_0x292fbe};}catch(_0x144b0d){const _0x2bd47a=_0x144b0d instanceof Error?_0x144b0d[_0x2550a0(0x1db)]:String(_0x144b0d);return createParseErrorResult(_0x56d58f,_0x36e8bd,'',_0x2550a0(0x1e3)+_0x2bd47a);}}function a121_0x242b(){const _0x1f9ac3=['map','filterType','YAML\x20parse\x20error:\x20','toJSON','result','493668fCCuhD','27145dOVOZt','1995633JXCPuV','object','3778302ftZvQN','valid','810144QcjDQQ','1066680dqAFPa','706500iMCuQr','error','skipped','parseDocument','warnings','basename','YAML_PARSE_ERROR','journey','not\x20a\x20','message','type','32HaXCiA','utf-8','segment','relative'];a121_0x242b=function(){return _0x1f9ac3;};return a121_0x242b();}export function validateYamlFiles(_0x523437,_0x236360,_0x2fccac={}){const _0x1441ea=a121_0x4e8943;return _0x523437[_0x1441ea(0x1e1)](_0x1853c5=>validateYamlFile(_0x1853c5,_0x236360,_0x2fccac));}export function calculateSummary(_0xe6afdb){const _0x2956ed=a121_0x4e8943;let _0x3ee04c=0x0,_0x224ad2=0x0,_0x5d98c8=0x0,_0x1a59d4=0x0;for(const _0x5e75de of _0xe6afdb){if(!isValidationResult(_0x5e75de)){_0x1a59d4++;continue;}_0x5e75de[_0x2956ed(0x1e5)][_0x2956ed(0x1cf)]?_0x3ee04c++:_0x224ad2++,_0x5d98c8+=_0x5e75de[_0x2956ed(0x1e5)][_0x2956ed(0x1d6)]['length'];}return{'validCount':_0x3ee04c,'invalidCount':_0x224ad2,'warningCount':_0x5d98c8,'skippedCount':_0x1a59d4,'hasErrors':_0x224ad2>0x0};}
1
+ function a121_0x5573(_0x27462f,_0x5da6a6){_0x27462f=_0x27462f-0x141;const _0x4ab480=a121_0x4ab4();let _0x5573a9=_0x4ab480[_0x27462f];return _0x5573a9;}(function(_0x2accf7,_0x42977a){const _0x125ef1=a121_0x5573,_0x1d1b12=_0x2accf7();while(!![]){try{const _0x3e1bf7=parseInt(_0x125ef1(0x15c))/0x1+parseInt(_0x125ef1(0x147))/0x2*(-parseInt(_0x125ef1(0x157))/0x3)+-parseInt(_0x125ef1(0x155))/0x4+parseInt(_0x125ef1(0x149))/0x5+-parseInt(_0x125ef1(0x154))/0x6*(-parseInt(_0x125ef1(0x146))/0x7)+parseInt(_0x125ef1(0x145))/0x8*(parseInt(_0x125ef1(0x15b))/0x9)+-parseInt(_0x125ef1(0x14e))/0xa;if(_0x3e1bf7===_0x42977a)break;else _0x1d1b12['push'](_0x1d1b12['shift']());}catch(_0x5e0b58){_0x1d1b12['push'](_0x1d1b12['shift']());}}}(a121_0x4ab4,0x9a4b1));import{readFileSync}from'fs';import*as a121_0x3126de from'path';import*as a121_0x587ca2 from'yaml';import{validateSegmentDef,validateJourneyDef}from'./yaml-validator.js';export function isJourneyDef(_0x4f98cf){const _0x46d0d5=a121_0x5573;return typeof _0x4f98cf===_0x46d0d5(0x156)&&_0x4f98cf!==null&&_0x46d0d5(0x151)in _0x4f98cf&&_0x4f98cf['type']===_0x46d0d5(0x14d);}export function isValidationResult(_0x3a3081){const _0x17defb=a121_0x5573;return!(_0x17defb(0x14b)in _0x3a3081);}function a121_0x4ab4(){const _0x1b8bf5=['utf-8','relative','8zsOZWQ','7Zpkows','2XTpbvF','filterType','96890PkkInq','Failed\x20to\x20parse\x20YAML\x20file\x20(empty\x20or\x20invalid)','skipped','error','journey','716080cyhoES','not\x20a\x20','valid','type','basename','warnings','2016414RBoxwn','467464ikULXM','object','2144007FvRbGj','YAML_PARSE_ERROR','result','toJSON','10212246eWAJha','44987Rgemso','length','map'];a121_0x4ab4=function(){return _0x1b8bf5;};return a121_0x4ab4();}export function createParseErrorResult(_0x530bc8,_0x520ead,_0x108d3d,_0x1b6ff5,_0x2754ba='segment'){const _0x12cf50=a121_0x5573;return{'filePath':_0x530bc8,'relativePath':_0x520ead,'source':_0x108d3d,'result':{'valid':![],'errors':[{'level':_0x12cf50(0x14c),'path':'','code':_0x12cf50(0x158),'message':_0x1b6ff5}],'warnings':[]},'fileType':_0x2754ba};}export function validateYamlFile(_0x22e678,_0x4a206c,_0x193cad={}){const _0xe60c41=a121_0x5573,_0xcc11b4=a121_0x3126de[_0xe60c41(0x144)](_0x4a206c,_0x22e678)||a121_0x3126de[_0xe60c41(0x152)](_0x22e678);try{const _0x5292d7=readFileSync(_0x22e678,_0xe60c41(0x143)),_0x48401b=a121_0x587ca2['parseDocument'](_0x5292d7),_0x3a9dd3=_0x48401b[_0xe60c41(0x15a)]();if(!_0x3a9dd3)return createParseErrorResult(_0x22e678,_0xcc11b4,_0x5292d7,_0xe60c41(0x14a));const _0x1cc216=isJourneyDef(_0x3a9dd3)?_0xe60c41(0x14d):'segment';if(_0x193cad[_0xe60c41(0x148)]&&_0x1cc216!==_0x193cad['filterType'])return{'filePath':_0x22e678,'relativePath':_0xcc11b4,'skipped':!![],'reason':_0xe60c41(0x14f)+_0x193cad['filterType']};const _0x4e536a={'source':_0x5292d7,'document':_0x48401b},_0x1f31a5=_0x1cc216===_0xe60c41(0x14d)?validateJourneyDef(_0x3a9dd3,_0x4e536a):validateSegmentDef(_0x3a9dd3,_0x4e536a);return{'filePath':_0x22e678,'relativePath':_0xcc11b4,'source':_0x5292d7,'result':_0x1f31a5,'fileType':_0x1cc216};}catch(_0x1c60af){const _0x21d1a7=_0x1c60af instanceof Error?_0x1c60af['message']:String(_0x1c60af);return createParseErrorResult(_0x22e678,_0xcc11b4,'','YAML\x20parse\x20error:\x20'+_0x21d1a7);}}export function validateYamlFiles(_0x1f3bd2,_0xe30971,_0x1d324d={}){const _0x2eea27=a121_0x5573;return _0x1f3bd2[_0x2eea27(0x142)](_0x27a4a9=>validateYamlFile(_0x27a4a9,_0xe30971,_0x1d324d));}export function calculateSummary(_0xe5fc3e){const _0x4d7c18=a121_0x5573;let _0x4125d6=0x0,_0x2300a8=0x0,_0x3e8daf=0x0,_0x37d8c0=0x0;for(const _0x34fb29 of _0xe5fc3e){if(!isValidationResult(_0x34fb29)){_0x37d8c0++;continue;}_0x34fb29[_0x4d7c18(0x159)][_0x4d7c18(0x150)]?_0x4125d6++:_0x2300a8++,_0x3e8daf+=_0x34fb29['result'][_0x4d7c18(0x153)][_0x4d7c18(0x141)];}return{'validCount':_0x4125d6,'invalidCount':_0x2300a8,'warningCount':_0x3e8daf,'skippedCount':_0x37d8c0,'hasErrors':_0x2300a8>0x0};}
@@ -1 +1 @@
1
- const a122_0x2d7cff=a122_0x54c2;function a122_0x54c2(_0x1b6e64,_0x256ef7){_0x1b6e64=_0x1b6e64-0x1df;const _0x40ffe1=a122_0x40ff();let _0x54c204=_0x40ffe1[_0x1b6e64];return _0x54c204;}(function(_0x1bbfae,_0x266e5d){const _0x39a13f=a122_0x54c2,_0x3cd8de=_0x1bbfae();while(!![]){try{const _0x25f2d1=parseInt(_0x39a13f(0x24f))/0x1*(parseInt(_0x39a13f(0x218))/0x2)+parseInt(_0x39a13f(0x20c))/0x3+parseInt(_0x39a13f(0x234))/0x4*(-parseInt(_0x39a13f(0x1fa))/0x5)+-parseInt(_0x39a13f(0x240))/0x6+parseInt(_0x39a13f(0x23d))/0x7+-parseInt(_0x39a13f(0x239))/0x8+parseInt(_0x39a13f(0x268))/0x9;if(_0x25f2d1===_0x266e5d)break;else _0x3cd8de['push'](_0x3cd8de['shift']());}catch(_0x144c17){_0x3cd8de['push'](_0x3cd8de['shift']());}}}(a122_0x40ff,0xa970f));import a122_0x4d7257 from'chalk';const VALID_OPERATOR_TYPES=new Set([a122_0x2d7cff(0x231),a122_0x2d7cff(0x256),a122_0x2d7cff(0x26c),'GreaterEqual',a122_0x2d7cff(0x259),a122_0x2d7cff(0x27c),'In',a122_0x2d7cff(0x21f),a122_0x2d7cff(0x219),a122_0x2d7cff(0x236),a122_0x2d7cff(0x25b),'Regexp',a122_0x2d7cff(0x203),a122_0x2d7cff(0x1f5),a122_0x2d7cff(0x1e8),'TimeRange',a122_0x2d7cff(0x262),a122_0x2d7cff(0x24a)]),OPERATORS_REQUIRING_VALUE=new Set([a122_0x2d7cff(0x231),a122_0x2d7cff(0x256),a122_0x2d7cff(0x26c),a122_0x2d7cff(0x253),'Less','LessEqual','In',a122_0x2d7cff(0x21f),'Contain',a122_0x2d7cff(0x236),a122_0x2d7cff(0x25b),a122_0x2d7cff(0x23a),a122_0x2d7cff(0x1f5),a122_0x2d7cff(0x1e8)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a122_0x2d7cff(0x1e8)]);export function getLocationFromPath(_0x31e10e,_0x247e0b,_0x5b22f1){const _0x38fa79=a122_0x2d7cff;if(!_0x31e10e||!_0x247e0b)return undefined;try{let _0x328fdc=_0x31e10e['getIn'](_0x5b22f1,!![]),_0x2a659e=[..._0x5b22f1];while((!_0x328fdc||typeof _0x328fdc!==_0x38fa79(0x275)||!(_0x38fa79(0x1f4)in _0x328fdc)||!_0x328fdc[_0x38fa79(0x1f4)])&&_0x2a659e['length']>0x0){_0x2a659e[_0x38fa79(0x22e)](),_0x328fdc=_0x2a659e[_0x38fa79(0x207)]>0x0?_0x31e10e[_0x38fa79(0x21d)](_0x2a659e,!![]):_0x31e10e[_0x38fa79(0x25e)];}if(!_0x328fdc||typeof _0x328fdc!==_0x38fa79(0x275)||!(_0x38fa79(0x1f4)in _0x328fdc)||!_0x328fdc[_0x38fa79(0x1f4)])return undefined;const [_0x24c947]=_0x328fdc[_0x38fa79(0x1f4)];return offsetToLocation(_0x247e0b,_0x24c947);}catch{return undefined;}}export function offsetToLocation(_0x49b02a,_0x4cd169){const _0x3614d2=a122_0x2d7cff;let _0x16ed1f=0x1,_0x4c8e71=0x1;for(let _0x5e66a5=0x0;_0x5e66a5<_0x4cd169&&_0x5e66a5<_0x49b02a[_0x3614d2(0x207)];_0x5e66a5++){_0x49b02a[_0x5e66a5]==='\x0a'?(_0x16ed1f++,_0x4c8e71=0x1):_0x4c8e71++;}return{'line':_0x16ed1f,'column':_0x4c8e71,'offset':_0x4cd169};}function pathToArray(_0xbbff59){const _0x470634=a122_0x2d7cff;if(!_0xbbff59)return[];return _0xbbff59[_0x470634(0x28d)]('.')[_0x470634(0x273)](_0x4d1d10=>{const _0x208d09=_0x4d1d10['match'](/^(\w+)\[(\d+)\]$/);if(_0x208d09)return[_0x208d09[0x1],parseInt(_0x208d09[0x2],0xa)];return[_0x4d1d10];});}export function validateRuleDef(_0x302e2b,_0x2439e7,_0xbb5d95){const _0x19af38=a122_0x2d7cff,_0xbf05e=[];if(!_0x302e2b)return _0xbf05e;_0x302e2b[_0x19af38(0x210)]!==_0x19af38(0x241)&&_0x302e2b[_0x19af38(0x210)]!=='Or'&&_0xbf05e[_0x19af38(0x223)]({'level':_0x19af38(0x1ee),'path':_0x2439e7+_0x19af38(0x26d),'code':'INVALID_RULE_TYPE','message':'Rule\x20type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27'+_0x302e2b[_0x19af38(0x210)]+'\x27','location':getLocationFromPath(_0xbb5d95[_0x19af38(0x1ed)],_0xbb5d95[_0x19af38(0x229)],pathToArray(_0x2439e7+_0x19af38(0x26d)))});if(!_0x302e2b[_0x19af38(0x221)]||!Array[_0x19af38(0x266)](_0x302e2b[_0x19af38(0x221)]))return _0xbf05e[_0x19af38(0x223)]({'level':_0x19af38(0x1ee),'path':_0x2439e7+_0x19af38(0x22c),'code':'MISSING_CONDITIONS','message':_0x19af38(0x248),'location':getLocationFromPath(_0xbb5d95[_0x19af38(0x1ed)],_0xbb5d95['source'],pathToArray(_0x2439e7))}),_0xbf05e;for(let _0x32e2cf=0x0;_0x32e2cf<_0x302e2b['conditions'][_0x19af38(0x207)];_0x32e2cf++){const _0x2b3f38=_0x302e2b[_0x19af38(0x221)][_0x32e2cf],_0x3d568e=_0x2439e7+_0x19af38(0x24c)+_0x32e2cf+']';_0xbf05e[_0x19af38(0x223)](...validateCondition(_0x2b3f38,_0x3d568e,_0xbb5d95));}return _0xbf05e;}function validateCondition(_0x4cd8be,_0x569388,_0x3d931c){const _0x3c5c10=a122_0x2d7cff,_0x1abe8a=[];if(!_0x4cd8be||typeof _0x4cd8be!==_0x3c5c10(0x275))return _0x1abe8a;if(_0x4cd8be['type']===_0x3c5c10(0x241)||_0x4cd8be['type']==='Or'){if(!_0x4cd8be[_0x3c5c10(0x221)]||!Array[_0x3c5c10(0x266)](_0x4cd8be[_0x3c5c10(0x221)]))_0x1abe8a['push']({'level':_0x3c5c10(0x1ee),'path':_0x569388+_0x3c5c10(0x22c),'code':'MISSING_CONDITIONS','message':_0x4cd8be[_0x3c5c10(0x210)]+_0x3c5c10(0x288),'location':getLocationFromPath(_0x3d931c[_0x3c5c10(0x1ed)],_0x3d931c[_0x3c5c10(0x229)],pathToArray(_0x569388))});else for(let _0x33d4b9=0x0;_0x33d4b9<_0x4cd8be[_0x3c5c10(0x221)][_0x3c5c10(0x207)];_0x33d4b9++){_0x1abe8a[_0x3c5c10(0x223)](...validateCondition(_0x4cd8be['conditions'][_0x33d4b9],_0x569388+_0x3c5c10(0x24c)+_0x33d4b9+']',_0x3d931c));}return _0x1abe8a;}if(_0x4cd8be['type']==='include'||_0x4cd8be['type']===_0x3c5c10(0x230))return!_0x4cd8be[_0x3c5c10(0x225)]&&_0x1abe8a[_0x3c5c10(0x223)]({'level':_0x3c5c10(0x1ee),'path':_0x569388+_0x3c5c10(0x22d),'code':_0x3c5c10(0x233),'message':_0x4cd8be[_0x3c5c10(0x210)]+_0x3c5c10(0x261),'location':getLocationFromPath(_0x3d931c[_0x3c5c10(0x1ed)],_0x3d931c[_0x3c5c10(0x229)],pathToArray(_0x569388))}),_0x1abe8a;if(_0x4cd8be[_0x3c5c10(0x210)]===_0x3c5c10(0x28a)||_0x4cd8be[_0x3c5c10(0x210)]===_0x3c5c10(0x280)){const _0x1f2a7d=_0x4cd8be,_0x3c7dc0=_0x1f2a7d[_0x3c5c10(0x229)],_0x2e3c4d=_0x1f2a7d[_0x3c5c10(0x23e)],_0x30a0ae=_0x3c7dc0||_0x2e3c4d;(!_0x1f2a7d[_0x3c5c10(0x27d)]||_0x1f2a7d['attribute']==='')&&!_0x30a0ae&&_0x1abe8a['push']({'level':_0x3c5c10(0x1ee),'path':_0x569388+_0x3c5c10(0x20b),'code':_0x3c5c10(0x21c),'message':_0x3c5c10(0x1f2),'location':getLocationFromPath(_0x3d931c[_0x3c5c10(0x1ed)],_0x3d931c[_0x3c5c10(0x229)],pathToArray(_0x569388+_0x3c5c10(0x20b)))}),_0x1f2a7d['operator']&&_0x1abe8a['push'](...validateOperator(_0x1f2a7d[_0x3c5c10(0x205)],_0x569388+'.operator',_0x3d931c)),_0x1f2a7d['arrayMatching']!==undefined&&_0x1abe8a['push'](...validateArrayMatching(_0x1f2a7d[_0x3c5c10(0x28b)],_0x569388+_0x3c5c10(0x1e0),_0x3d931c)),_0x1f2a7d[_0x3c5c10(0x220)]&&_0x1abe8a['push'](...validateRuleDef(_0x1f2a7d['filter'],_0x569388+_0x3c5c10(0x20e),_0x3d931c));}return _0x1abe8a;}function validateOperator(_0x14a2f8,_0x331c32,_0x2d71da){const _0x1246f9=a122_0x2d7cff,_0x3e9983=[];if(!VALID_OPERATOR_TYPES['has'](_0x14a2f8['type']))return _0x3e9983[_0x1246f9(0x223)]({'level':_0x1246f9(0x1ee),'path':_0x331c32+_0x1246f9(0x26d),'code':'INVALID_OPERATOR_TYPE','message':'Invalid\x20operator\x20type\x20\x27'+_0x14a2f8[_0x1246f9(0x210)]+'\x27.\x20Valid\x20types:\x20'+[...VALID_OPERATOR_TYPES][_0x1246f9(0x284)](',\x20'),'location':getLocationFromPath(_0x2d71da[_0x1246f9(0x1ed)],_0x2d71da[_0x1246f9(0x229)],pathToArray(_0x331c32+_0x1246f9(0x26d)))}),_0x3e9983;return OPERATORS_REQUIRING_VALUE[_0x1246f9(0x249)](_0x14a2f8[_0x1246f9(0x210)])&&((_0x14a2f8[_0x1246f9(0x242)]===undefined||_0x14a2f8[_0x1246f9(0x242)]===null)&&_0x3e9983[_0x1246f9(0x223)]({'level':_0x1246f9(0x1ee),'path':_0x331c32+'.value','code':_0x1246f9(0x25f),'message':'Operator\x20\x27'+_0x14a2f8[_0x1246f9(0x210)]+_0x1246f9(0x20a),'location':getLocationFromPath(_0x2d71da[_0x1246f9(0x1ed)],_0x2d71da[_0x1246f9(0x229)],pathToArray(_0x331c32))})),_0x14a2f8[_0x1246f9(0x210)]===_0x1246f9(0x24a)&&(_0x14a2f8[_0x1246f9(0x283)]===undefined&&_0x14a2f8[_0x1246f9(0x1e6)]===undefined&&_0x3e9983['push']({'level':'error','path':_0x331c32,'code':'MISSING_BETWEEN_BOUNDS','message':_0x1246f9(0x255),'location':getLocationFromPath(_0x2d71da[_0x1246f9(0x1ed)],_0x2d71da[_0x1246f9(0x229)],pathToArray(_0x331c32))})),OPERATORS_REQUIRING_UNIT[_0x1246f9(0x249)](_0x14a2f8['type'])&&(!_0x14a2f8[_0x1246f9(0x252)]&&_0x14a2f8[_0x1246f9(0x242)]!==undefined&&_0x3e9983[_0x1246f9(0x223)]({'level':'error','path':_0x331c32+_0x1246f9(0x286),'code':'MISSING_TIME_UNIT','message':_0x1246f9(0x27a)+_0x14a2f8[_0x1246f9(0x210)]+_0x1246f9(0x1f0),'location':getLocationFromPath(_0x2d71da['document'],_0x2d71da[_0x1246f9(0x229)],pathToArray(_0x331c32))})),_0x3e9983;}function validateArrayMatching(_0x105f08,_0x4bbf63,_0xc82987){const _0x4819ae=a122_0x2d7cff,_0x27ed2e=[];if(_0x105f08===_0x4819ae(0x1fc)||_0x105f08===_0x4819ae(0x27e))return _0x27ed2e;if(typeof _0x105f08==='object'){const _0x432544=Object['keys'](_0x105f08),_0x6aac7f=['atLeast',_0x4819ae(0x212),'exactly'],_0x126b3d=_0x432544['some'](_0x24a2d=>_0x6aac7f[_0x4819ae(0x211)](_0x24a2d));!_0x126b3d&&_0x27ed2e[_0x4819ae(0x223)]({'level':_0x4819ae(0x1ee),'path':_0x4bbf63,'code':'INVALID_ARRAY_MATCHING','message':_0x4819ae(0x257)+_0x6aac7f[_0x4819ae(0x284)]('/')+'.','location':getLocationFromPath(_0xc82987['document'],_0xc82987['source'],pathToArray(_0x4bbf63))});}else _0x27ed2e[_0x4819ae(0x223)]({'level':_0x4819ae(0x1ee),'path':_0x4bbf63,'code':_0x4819ae(0x1df),'message':'Invalid\x20arrayMatching\x20value.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20atLeast/atMost/exactly.','location':getLocationFromPath(_0xc82987[_0x4819ae(0x1ed)],_0xc82987['source'],pathToArray(_0x4bbf63))});return _0x27ed2e;}export function validateSegmentDef(_0x2de10c,_0xbf0cb1={}){const _0x30b8f9=a122_0x2d7cff,_0x2cb269=[],_0x5455a6=[];(!_0x2de10c[_0x30b8f9(0x222)]||_0x2de10c['name'][_0x30b8f9(0x23c)]()==='')&&_0x2cb269[_0x30b8f9(0x223)]({'level':_0x30b8f9(0x1ee),'path':_0x30b8f9(0x222),'code':_0x30b8f9(0x22a),'message':_0x30b8f9(0x26b),'location':getLocationFromPath(_0xbf0cb1[_0x30b8f9(0x1ed)],_0xbf0cb1[_0x30b8f9(0x229)],['name'])});if(_0x2de10c[_0x30b8f9(0x1f1)]){const _0x320610=validateRuleDef(_0x2de10c[_0x30b8f9(0x1f1)],_0x30b8f9(0x1f1),_0xbf0cb1);for(const _0xf18b44 of _0x320610){_0xf18b44['level']===_0x30b8f9(0x1ee)?_0x2cb269[_0x30b8f9(0x223)](_0xf18b44):_0x5455a6['push'](_0xf18b44);}}return{'valid':_0x2cb269[_0x30b8f9(0x207)]===0x0,'errors':_0x2cb269,'warnings':_0x5455a6};}export function validateJourneyDef(_0x4761c0,_0x3ef9dd={}){const _0x5d20b9=a122_0x2d7cff,_0x4b5b37=[],_0x233cb5=[];(!_0x4761c0[_0x5d20b9(0x222)]||_0x4761c0[_0x5d20b9(0x222)][_0x5d20b9(0x23c)]()==='')&&_0x4b5b37[_0x5d20b9(0x223)]({'level':'error','path':'name','code':_0x5d20b9(0x22a),'message':'Journey\x20name\x20is\x20required','location':getLocationFromPath(_0x3ef9dd[_0x5d20b9(0x1ed)],_0x3ef9dd[_0x5d20b9(0x229)],['name'])});const _0x55e456=new Set();if(_0x4761c0[_0x5d20b9(0x201)])for(const _0x2a0354 of Object[_0x5d20b9(0x285)](_0x4761c0[_0x5d20b9(0x201)])){_0x55e456[_0x5d20b9(0x282)](_0x2a0354);}const _0x57c1ae=new Set(),_0x2662a0={..._0x3ef9dd,'embeddedSegments':_0x55e456,'referencedSegments':_0x57c1ae};if(_0x4761c0[_0x5d20b9(0x201)])for(const [_0x500880,_0x464dd1]of Object['entries'](_0x4761c0[_0x5d20b9(0x201)])){const _0x313bae=validateEmbeddedSegment(_0x464dd1,_0x5d20b9(0x1eb)+_0x500880,_0x2662a0);for(const _0x4acf79 of _0x313bae){if(_0x4acf79[_0x5d20b9(0x21e)]===_0x5d20b9(0x1ee))_0x4b5b37[_0x5d20b9(0x223)](_0x4acf79);else _0x233cb5[_0x5d20b9(0x223)](_0x4acf79);}}const _0x160836=getJourneyStages(_0x4761c0);_0x160836[_0x5d20b9(0x207)]===0x0&&_0x4b5b37['push']({'level':_0x5d20b9(0x1ee),'path':_0x5d20b9(0x289),'code':_0x5d20b9(0x1f6),'message':'Journey\x20must\x20have\x20at\x20least\x20one\x20stage','location':getLocationFromPath(_0x3ef9dd[_0x5d20b9(0x1ed)],_0x3ef9dd['source'],[_0x5d20b9(0x289)])});const _0x2ecf92=new Set();for(const _0x39ed2c of _0x160836){if(_0x39ed2c[_0x5d20b9(0x1ef)])for(const _0x1b12b5 of _0x39ed2c['steps']){_0x1b12b5[_0x5d20b9(0x222)]&&_0x2ecf92[_0x5d20b9(0x282)](_0x1b12b5[_0x5d20b9(0x222)]);}}_0x2662a0[_0x5d20b9(0x1e3)]=_0x2ecf92;for(let _0x3e23fa=0x0;_0x3e23fa<_0x160836[_0x5d20b9(0x207)];_0x3e23fa++){const _0xe6ec3f=_0x160836[_0x3e23fa],_0x3177a1=_0x5d20b9(0x21a)+_0x3e23fa+']',_0x43596d=validateStage(_0xe6ec3f,_0x3177a1,_0x2662a0);for(const _0x248831 of _0x43596d){if(_0x248831[_0x5d20b9(0x21e)]==='error')_0x4b5b37[_0x5d20b9(0x223)](_0x248831);else _0x233cb5['push'](_0x248831);}}if(_0x4761c0['goal']){const _0x48e0a1=validateCriteria(_0x4761c0[_0x5d20b9(0x20f)],_0x5d20b9(0x20f),_0x2662a0);for(const _0x130a61 of _0x48e0a1){if(_0x130a61[_0x5d20b9(0x21e)]===_0x5d20b9(0x1ee))_0x4b5b37[_0x5d20b9(0x223)](_0x130a61);else _0x233cb5[_0x5d20b9(0x223)](_0x130a61);}}for(const _0x551f96 of _0x55e456){!_0x57c1ae[_0x5d20b9(0x249)](_0x551f96)&&!_0x551f96[_0x5d20b9(0x26e)](_0x5d20b9(0x23b))&&_0x233cb5['push']({'level':_0x5d20b9(0x274),'path':_0x5d20b9(0x1eb)+_0x551f96,'code':_0x5d20b9(0x264),'message':_0x5d20b9(0x287)+_0x551f96+_0x5d20b9(0x235),'location':getLocationFromPath(_0x3ef9dd['document'],_0x3ef9dd[_0x5d20b9(0x229)],['segments',_0x551f96])});}return{'valid':_0x4b5b37[_0x5d20b9(0x207)]===0x0,'errors':_0x4b5b37,'warnings':_0x233cb5};}function getJourneyStages(_0x25d0cb){const _0x5e0a1a=a122_0x2d7cff;if(_0x25d0cb[_0x5e0a1a(0x289)]&&_0x25d0cb[_0x5e0a1a(0x289)][_0x5e0a1a(0x207)]>0x0)return _0x25d0cb['stages'];if(_0x25d0cb['journeys']&&_0x25d0cb[_0x5e0a1a(0x1fe)][_0x5e0a1a(0x207)]>0x0)return _0x25d0cb['journeys'][_0x5e0a1a(0x273)](_0x5a370c=>_0x5a370c[_0x5e0a1a(0x289)]||[]);if(_0x25d0cb[_0x5e0a1a(0x227)]&&_0x25d0cb[_0x5e0a1a(0x227)]['length']>0x0)return _0x25d0cb[_0x5e0a1a(0x227)][_0x5e0a1a(0x273)](_0x97175e=>_0x97175e[_0x5e0a1a(0x289)]||[]);return[];}function validateEmbeddedSegment(_0x38f203,_0x3457d6,_0xdbef34){const _0x1efad3=a122_0x2d7cff,_0x189b09=[];return _0x38f203['rule']&&_0x189b09[_0x1efad3(0x223)](...validateRuleDef(_0x38f203[_0x1efad3(0x1f1)],_0x3457d6+'.rule',_0xdbef34)),_0x189b09;}function a122_0x40ff(){const _0xb4b118=['Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','NotEqual','Invalid\x20arrayMatching.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20','Jump\x20step\x20requires\x20a\x20target','Less','yellow','EndWith','INVALID_JUMP_TARGET','location','contents','MISSING_OPERATOR_VALUE','].next','\x20condition\x20must\x20have\x20a\x20segment\x20reference','TimeToday','timeout','UNUSED_EMBEDDED_SEGMENT','target','isArray','.with.target','11904579nSYFBh','\x27\x20(first\x20defined\x20at\x20steps[','get','Segment\x20name\x20is\x20required','Greater','.type','startsWith','.with.condition.timeout.next','column','Activation\x20step\x20requires\x20an\x20activation\x20reference','with','flatMap','warning','object','.with.variants[','.name','.exit_criteria[','dim','Operator\x20\x27','MISSING_CONDITIONS','LessEqual','attribute','all','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','Behavior','branches','add','min','join','keys','.unit','Embedded\x20segment\x20\x27','\x20condition\x20must\x20have\x20a\x20conditions\x20array','stages','Value','arrayMatching','.with.branches','split','INVALID_ARRAY_MATCHING','.arrayMatching','.with','stage','stepNames','MISSING_ACTIVATION_REF','message','max','journey','TimeWithinNext','cyan','reduce','segments.','.entry_criteria','document','error','steps','\x27\x20requires\x20a\x20time\x20unit','rule','Attribute\x20name\x20cannot\x20be\x20empty','path','range','TimeWithinPast','MISSING_STAGES','activation','Decision\x20branch\x20references\x20undefined\x20segment\x20\x27','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','5019545ibrDNI','condition','any','red','journeys','.with.variants','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','segments','milestone','IsNull','.next','operator','exit_criteria','length','INVALID_NEXT_REFERENCE','Criteria\x20references\x20undefined\x20segment\x20\x27','\x27\x20requires\x20a\x20value','.attribute','3198960kjjsrd','\x20|\x20','.filter','goal','type','includes','atMost','abs','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','.with.condition.next','.with.condition.segment','decision_point','1446442HOBdyQ','Contain','stages[','jump','EMPTY_ATTRIBUTE','getIn','level','NotIn','filter','conditions','name','push','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','segment','errors','versions','referencedSegments','source','MISSING_NAME','variants','.conditions','.segment','pop','Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','exclude','Equal','next','MISSING_SEGMENT_REFERENCE','4CmxxDj','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','StartWith','entry_criteria','.with.activation','6239304rHXaQY','Regexp','excluded_','trim','1800512dihpEM','aggregation','ref:','5349810XTZuus','And','value','set','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','repeat','INVALID_AB_TEST_PERCENTAGES','.with.branches[','Rule\x20must\x20have\x20a\x20conditions\x20array','has','Between','wait','.conditions[','embeddedSegments','code','1GLxcoV','warnings','excluded','unit','GreaterEqual','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27'];a122_0x40ff=function(){return _0xb4b118;};return a122_0x40ff();}function validateStage(_0x4a50a5,_0x538d14,_0x1482e9){const _0x3f56e6=a122_0x2d7cff,_0x175ffe=[],_0x45b041=new Map();if(_0x4a50a5[_0x3f56e6(0x1ef)])for(let _0x329c52=0x0;_0x329c52<_0x4a50a5[_0x3f56e6(0x1ef)]['length'];_0x329c52++){const _0xaa5699=_0x4a50a5[_0x3f56e6(0x1ef)][_0x329c52],_0x37bc8f=_0x538d14+'.steps['+_0x329c52+']';if(_0xaa5699[_0x3f56e6(0x222)]){if(_0x45b041[_0x3f56e6(0x249)](_0xaa5699[_0x3f56e6(0x222)])){const _0x3f7c5d=_0x45b041[_0x3f56e6(0x26a)](_0xaa5699['name']);_0x175ffe[_0x3f56e6(0x223)]({'level':_0x3f56e6(0x1ee),'path':_0x37bc8f+'.name','code':'DUPLICATE_STEP_NAME','message':'Duplicate\x20step\x20name\x20\x27'+_0xaa5699[_0x3f56e6(0x222)]+_0x3f56e6(0x269)+_0x3f7c5d+'])','location':getLocationFromPath(_0x1482e9[_0x3f56e6(0x1ed)],_0x1482e9[_0x3f56e6(0x229)],pathToArray(_0x37bc8f+_0x3f56e6(0x277)))});}else _0x45b041[_0x3f56e6(0x243)](_0xaa5699[_0x3f56e6(0x222)],_0x329c52);}_0x175ffe[_0x3f56e6(0x223)](...validateStep(_0xaa5699,_0x37bc8f,_0x1482e9));}_0x4a50a5['entry_criteria']&&_0x175ffe[_0x3f56e6(0x223)](...validateCriteria(_0x4a50a5[_0x3f56e6(0x237)],_0x538d14+_0x3f56e6(0x1ec),_0x1482e9));if(_0x4a50a5[_0x3f56e6(0x206)])for(let _0x3633a4=0x0;_0x3633a4<_0x4a50a5['exit_criteria'][_0x3f56e6(0x207)];_0x3633a4++){_0x175ffe[_0x3f56e6(0x223)](...validateCriteria(_0x4a50a5[_0x3f56e6(0x206)][_0x3633a4],_0x538d14+_0x3f56e6(0x278)+_0x3633a4+']',_0x1482e9));}return _0x4a50a5[_0x3f56e6(0x202)]&&_0x175ffe[_0x3f56e6(0x223)](...validateCriteria(_0x4a50a5['milestone'],_0x538d14+'.milestone',_0x1482e9)),_0x175ffe;}function validateStep(_0x289f57,_0x5d602a,_0x256687){const _0x547179=a122_0x2d7cff,_0x2870a2=[];_0x289f57['next']&&_0x289f57[_0x547179(0x210)]!=='end'&&(_0x256687['stepNames']&&!_0x256687[_0x547179(0x1e3)][_0x547179(0x249)](_0x289f57[_0x547179(0x232)])&&_0x2870a2['push']({'level':_0x547179(0x1ee),'path':_0x5d602a+_0x547179(0x204),'code':'INVALID_NEXT_REFERENCE','message':'Step\x20references\x20non-existent\x20step\x20\x27'+_0x289f57[_0x547179(0x232)]+'\x27','location':getLocationFromPath(_0x256687[_0x547179(0x1ed)],_0x256687[_0x547179(0x229)],pathToArray(_0x5d602a+_0x547179(0x204)))}));switch(_0x289f57[_0x547179(0x210)]){case _0x547179(0x24b):_0x2870a2[_0x547179(0x223)](...validateWaitStep(_0x289f57,_0x5d602a,_0x256687));break;case _0x547179(0x1f7):_0x2870a2['push'](...validateActivationStep(_0x289f57,_0x5d602a,_0x256687));break;case _0x547179(0x217):_0x2870a2['push'](...validateDecisionPointStep(_0x289f57,_0x5d602a,_0x256687));break;case'ab_test':_0x2870a2[_0x547179(0x223)](...validateAbTestStep(_0x289f57,_0x5d602a,_0x256687));break;case _0x547179(0x21b):_0x2870a2[_0x547179(0x223)](...validateJumpStep(_0x289f57,_0x5d602a,_0x256687));break;}return _0x2870a2;}function validateWaitStep(_0x514322,_0x289967,_0x2d53b3){const _0x507cbc=a122_0x2d7cff,_0x32ed71=[];if(!_0x514322['with'])return _0x32ed71[_0x507cbc(0x223)]({'level':'error','path':_0x289967+_0x507cbc(0x1e1),'code':'MISSING_WAIT_PARAMS','message':_0x507cbc(0x1f9),'location':getLocationFromPath(_0x2d53b3[_0x507cbc(0x1ed)],_0x2d53b3['source'],pathToArray(_0x289967))}),_0x32ed71;if(_0x514322[_0x507cbc(0x272)][_0x507cbc(0x1fb)]){const _0x2f4663=_0x514322[_0x507cbc(0x272)][_0x507cbc(0x1fb)];_0x2f4663[_0x507cbc(0x225)]&&(_0x2d53b3[_0x507cbc(0x228)]?.[_0x507cbc(0x282)](_0x2f4663['segment']),!_0x2f4663[_0x507cbc(0x225)][_0x507cbc(0x26e)]('ref:')&&(_0x2d53b3[_0x507cbc(0x24d)]&&!_0x2d53b3[_0x507cbc(0x24d)]['has'](_0x2f4663[_0x507cbc(0x225)])&&_0x32ed71[_0x507cbc(0x223)]({'level':_0x507cbc(0x1ee),'path':_0x289967+_0x507cbc(0x216),'code':_0x507cbc(0x233),'message':_0x507cbc(0x254)+_0x2f4663[_0x507cbc(0x225)]+_0x507cbc(0x244),'location':getLocationFromPath(_0x2d53b3['document'],_0x2d53b3[_0x507cbc(0x229)],pathToArray(_0x289967+_0x507cbc(0x216)))})),_0x2f4663[_0x507cbc(0x232)]&&_0x2d53b3[_0x507cbc(0x1e3)]&&!_0x2d53b3[_0x507cbc(0x1e3)][_0x507cbc(0x249)](_0x2f4663[_0x507cbc(0x232)])&&_0x32ed71['push']({'level':_0x507cbc(0x1ee),'path':_0x289967+_0x507cbc(0x215),'code':_0x507cbc(0x208),'message':'Wait\x20condition\x20references\x20non-existent\x20step\x20\x27'+_0x2f4663[_0x507cbc(0x232)]+'\x27','location':getLocationFromPath(_0x2d53b3['document'],_0x2d53b3[_0x507cbc(0x229)],pathToArray(_0x289967+_0x507cbc(0x215)))}),_0x2f4663['timeout']?.[_0x507cbc(0x232)]&&_0x2d53b3[_0x507cbc(0x1e3)]&&!_0x2d53b3['stepNames'][_0x507cbc(0x249)](_0x2f4663[_0x507cbc(0x263)]['next'])&&_0x32ed71[_0x507cbc(0x223)]({'level':'error','path':_0x289967+_0x507cbc(0x26f),'code':_0x507cbc(0x208),'message':_0x507cbc(0x224)+_0x2f4663[_0x507cbc(0x263)]['next']+'\x27','location':getLocationFromPath(_0x2d53b3[_0x507cbc(0x1ed)],_0x2d53b3['source'],pathToArray(_0x289967+_0x507cbc(0x26f)))}));}return _0x32ed71;}function validateActivationStep(_0x49c27a,_0x4270fd,_0x365896){const _0x48471d=a122_0x2d7cff,_0x3b10d1=[];return!_0x49c27a['with']?.[_0x48471d(0x1f7)]&&_0x3b10d1[_0x48471d(0x223)]({'level':_0x48471d(0x1ee),'path':_0x4270fd+_0x48471d(0x238),'code':_0x48471d(0x1e4),'message':_0x48471d(0x271),'location':getLocationFromPath(_0x365896[_0x48471d(0x1ed)],_0x365896[_0x48471d(0x229)],pathToArray(_0x4270fd))}),_0x3b10d1;}function validateDecisionPointStep(_0xf3f5a,_0x5d153c,_0x1ecf4a){const _0x4b89a0=a122_0x2d7cff,_0x4c8abb=[];if(!_0xf3f5a[_0x4b89a0(0x272)]?.[_0x4b89a0(0x281)]||_0xf3f5a['with']['branches']['length']===0x0)return _0x4c8abb[_0x4b89a0(0x223)]({'level':_0x4b89a0(0x1ee),'path':_0x5d153c+_0x4b89a0(0x28c),'code':_0x4b89a0(0x27b),'message':_0x4b89a0(0x22f),'location':getLocationFromPath(_0x1ecf4a[_0x4b89a0(0x1ed)],_0x1ecf4a[_0x4b89a0(0x229)],pathToArray(_0x5d153c))}),_0x4c8abb;for(let _0x4d3603=0x0;_0x4d3603<_0xf3f5a[_0x4b89a0(0x272)][_0x4b89a0(0x281)][_0x4b89a0(0x207)];_0x4d3603++){const _0x43e390=_0xf3f5a['with'][_0x4b89a0(0x281)][_0x4d3603],_0x12f04e=_0x5d153c+_0x4b89a0(0x247)+_0x4d3603+']';_0x43e390['segment']&&!_0x43e390[_0x4b89a0(0x251)]&&(_0x1ecf4a[_0x4b89a0(0x228)]?.[_0x4b89a0(0x282)](_0x43e390['segment']),!_0x43e390[_0x4b89a0(0x225)][_0x4b89a0(0x26e)]('ref:')&&(_0x1ecf4a[_0x4b89a0(0x24d)]&&!_0x1ecf4a[_0x4b89a0(0x24d)]['has'](_0x43e390[_0x4b89a0(0x225)])&&_0x4c8abb[_0x4b89a0(0x223)]({'level':_0x4b89a0(0x1ee),'path':_0x12f04e+'.segment','code':_0x4b89a0(0x233),'message':_0x4b89a0(0x1f8)+_0x43e390[_0x4b89a0(0x225)]+'\x27','location':getLocationFromPath(_0x1ecf4a[_0x4b89a0(0x1ed)],_0x1ecf4a['source'],pathToArray(_0x12f04e+_0x4b89a0(0x22d)))}))),_0x43e390[_0x4b89a0(0x232)]&&_0x1ecf4a['stepNames']&&!_0x1ecf4a[_0x4b89a0(0x1e3)]['has'](_0x43e390[_0x4b89a0(0x232)])&&_0x4c8abb[_0x4b89a0(0x223)]({'level':_0x4b89a0(0x1ee),'path':_0x12f04e+_0x4b89a0(0x204),'code':_0x4b89a0(0x208),'message':'Decision\x20branch\x20references\x20non-existent\x20step\x20\x27'+_0x43e390[_0x4b89a0(0x232)]+'\x27','location':getLocationFromPath(_0x1ecf4a[_0x4b89a0(0x1ed)],_0x1ecf4a[_0x4b89a0(0x229)],pathToArray(_0x12f04e+_0x4b89a0(0x204)))});}return _0x4c8abb;}function validateAbTestStep(_0x4acbaf,_0x35ba96,_0x2639a6){const _0xd1ed66=a122_0x2d7cff,_0x4befe8=[];if(!_0x4acbaf[_0xd1ed66(0x272)]?.[_0xd1ed66(0x22b)]||_0x4acbaf[_0xd1ed66(0x272)][_0xd1ed66(0x22b)][_0xd1ed66(0x207)]===0x0)return _0x4befe8[_0xd1ed66(0x223)]({'level':'error','path':_0x35ba96+'.with.variants','code':'MISSING_CONDITIONS','message':_0xd1ed66(0x214),'location':getLocationFromPath(_0x2639a6[_0xd1ed66(0x1ed)],_0x2639a6[_0xd1ed66(0x229)],pathToArray(_0x35ba96))}),_0x4befe8;const _0x43a13d=_0x4acbaf[_0xd1ed66(0x272)][_0xd1ed66(0x22b)][_0xd1ed66(0x1ea)]((_0x54acbb,_0x5bfb2f)=>_0x54acbb+(_0x5bfb2f['percentage']||0x0),0x0);Math[_0xd1ed66(0x213)](_0x43a13d-0x64)>0.01&&_0x4befe8[_0xd1ed66(0x223)]({'level':_0xd1ed66(0x1ee),'path':_0x35ba96+'.with.variants','code':_0xd1ed66(0x246),'message':'A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20'+_0x43a13d+'%)','location':getLocationFromPath(_0x2639a6[_0xd1ed66(0x1ed)],_0x2639a6['source'],pathToArray(_0x35ba96+_0xd1ed66(0x1ff)))});for(let _0x566845=0x0;_0x566845<_0x4acbaf[_0xd1ed66(0x272)][_0xd1ed66(0x22b)]['length'];_0x566845++){const _0x13cfb8=_0x4acbaf[_0xd1ed66(0x272)][_0xd1ed66(0x22b)][_0x566845];_0x13cfb8['next']&&_0x2639a6['stepNames']&&!_0x2639a6[_0xd1ed66(0x1e3)][_0xd1ed66(0x249)](_0x13cfb8[_0xd1ed66(0x232)])&&_0x4befe8[_0xd1ed66(0x223)]({'level':_0xd1ed66(0x1ee),'path':_0x35ba96+_0xd1ed66(0x276)+_0x566845+_0xd1ed66(0x260),'code':_0xd1ed66(0x208),'message':_0xd1ed66(0x27f)+_0x13cfb8[_0xd1ed66(0x232)]+'\x27','location':getLocationFromPath(_0x2639a6[_0xd1ed66(0x1ed)],_0x2639a6['source'],pathToArray(_0x35ba96+_0xd1ed66(0x276)+_0x566845+_0xd1ed66(0x260)))});}return _0x4befe8;}function validateJumpStep(_0x3d725b,_0x36caa7,_0x44b99a){const _0x31c3ec=a122_0x2d7cff,_0x51c168=[];if(!_0x3d725b[_0x31c3ec(0x272)]?.[_0x31c3ec(0x265)])return _0x51c168[_0x31c3ec(0x223)]({'level':'error','path':_0x36caa7+_0x31c3ec(0x267),'code':_0x31c3ec(0x25c),'message':_0x31c3ec(0x258),'location':getLocationFromPath(_0x44b99a['document'],_0x44b99a[_0x31c3ec(0x229)],pathToArray(_0x36caa7))}),_0x51c168;return(!_0x3d725b['with']['target'][_0x31c3ec(0x1e7)]||!_0x3d725b[_0x31c3ec(0x272)][_0x31c3ec(0x265)][_0x31c3ec(0x1e2)])&&_0x51c168[_0x31c3ec(0x223)]({'level':'error','path':_0x36caa7+'.with.target','code':_0x31c3ec(0x25c),'message':_0x31c3ec(0x200),'location':getLocationFromPath(_0x44b99a[_0x31c3ec(0x1ed)],_0x44b99a[_0x31c3ec(0x229)],pathToArray(_0x36caa7+_0x31c3ec(0x267)))}),_0x51c168;}function validateCriteria(_0x12a10e,_0x51476f,_0x178d07){const _0x54e208=a122_0x2d7cff,_0x3048f6=[];return _0x12a10e['segment']&&(_0x178d07[_0x54e208(0x228)]?.[_0x54e208(0x282)](_0x12a10e[_0x54e208(0x225)]),!_0x12a10e[_0x54e208(0x225)][_0x54e208(0x26e)](_0x54e208(0x23f))&&(_0x178d07[_0x54e208(0x24d)]&&!_0x178d07[_0x54e208(0x24d)]['has'](_0x12a10e['segment'])&&_0x3048f6[_0x54e208(0x223)]({'level':'error','path':_0x51476f+_0x54e208(0x22d),'code':_0x54e208(0x233),'message':_0x54e208(0x209)+_0x12a10e[_0x54e208(0x225)]+'\x27','location':getLocationFromPath(_0x178d07[_0x54e208(0x1ed)],_0x178d07['source'],pathToArray(_0x51476f+_0x54e208(0x22d)))}))),_0x3048f6;}export function formatIssueWithContext(_0x3ec9b5,_0x342c0a,_0x21e1ff){const _0xd4fb08=a122_0x2d7cff,_0x5407c1=[],_0x22ddb1=_0x3ec9b5[_0xd4fb08(0x21e)]==='error',_0x3c36ab=_0x22ddb1?a122_0x4d7257['red']:a122_0x4d7257['yellow'],_0x2c1e81=_0x22ddb1?a122_0x4d7257[_0xd4fb08(0x1fd)]:a122_0x4d7257[_0xd4fb08(0x25a)],_0x4c28dc=_0x21e1ff?a122_0x4d7257[_0xd4fb08(0x1e9)](_0x21e1ff+':'):'';if(_0x3ec9b5['location']){const _0x33e3d8=a122_0x4d7257['cyan'](_0x3ec9b5['location']['line']+':'+_0x3ec9b5[_0xd4fb08(0x25d)][_0xd4fb08(0x270)]);_0x5407c1[_0xd4fb08(0x223)](''+_0x4c28dc+_0x33e3d8+':\x20'+_0x3c36ab(_0x3ec9b5[_0xd4fb08(0x21e)])+'\x20'+_0x2c1e81('['+_0x3ec9b5['code']+']'));}else _0x5407c1[_0xd4fb08(0x223)](''+_0x4c28dc+a122_0x4d7257[_0xd4fb08(0x279)](_0x3ec9b5[_0xd4fb08(0x1f3)])+':\x20'+_0x3c36ab(_0x3ec9b5[_0xd4fb08(0x21e)])+'\x20'+_0x2c1e81('['+_0x3ec9b5[_0xd4fb08(0x24e)]+']'));_0x5407c1[_0xd4fb08(0x223)](_0x3ec9b5[_0xd4fb08(0x1e5)]);if(_0x3ec9b5[_0xd4fb08(0x25d)]&&_0x342c0a){const _0x168bc4=_0x342c0a[_0xd4fb08(0x28d)]('\x0a'),{line:_0x6f7e3c,column:_0x3a2f75}=_0x3ec9b5[_0xd4fb08(0x25d)],_0x5177e6=Math[_0xd4fb08(0x1e6)](0x1,_0x6f7e3c-0x1),_0x329b6f=Math[_0xd4fb08(0x283)](_0x168bc4['length'],_0x6f7e3c+0x1);_0x5407c1[_0xd4fb08(0x223)]('');for(let _0x2b1830=_0x5177e6;_0x2b1830<=_0x329b6f;_0x2b1830++){const _0x1eded2=_0x168bc4[_0x2b1830-0x1]||'',_0x114fa8=a122_0x4d7257[_0xd4fb08(0x279)](_0x2b1830['toString']()['padStart'](0x4)),_0x28108a=a122_0x4d7257[_0xd4fb08(0x279)](_0xd4fb08(0x20d));if(_0x2b1830===_0x6f7e3c){_0x5407c1[_0xd4fb08(0x223)]('\x20\x20'+_0x114fa8+_0x28108a+_0x3c36ab(_0x1eded2));const _0xd35388='\x20'[_0xd4fb08(0x245)](0x4+0x3+_0x3a2f75-0x1);_0x5407c1[_0xd4fb08(0x223)]('\x20\x20'+_0xd35388+_0x3c36ab('^'));}else _0x5407c1['push']('\x20\x20'+_0x114fa8+_0x28108a+a122_0x4d7257[_0xd4fb08(0x279)](_0x1eded2));}}return _0x5407c1[_0xd4fb08(0x284)]('\x0a');}export function formatValidationResult(_0x4910d4,_0x501182,_0x30a070){const _0x1772d5=a122_0x2d7cff,_0x4d4c8e=[];for(const _0x35c26a of _0x4910d4[_0x1772d5(0x226)]){_0x4d4c8e[_0x1772d5(0x223)](formatIssueWithContext(_0x35c26a,_0x501182,_0x30a070)),_0x4d4c8e[_0x1772d5(0x223)]('');}for(const _0x11c1ac of _0x4910d4[_0x1772d5(0x250)]){_0x4d4c8e['push'](formatIssueWithContext(_0x11c1ac,_0x501182,_0x30a070)),_0x4d4c8e[_0x1772d5(0x223)]('');}return _0x4d4c8e[_0x1772d5(0x284)]('\x0a');}
1
+ const a122_0x5991a6=a122_0x5a11;(function(_0x5b3f74,_0x298d08){const _0x320c54=a122_0x5a11,_0x17b970=_0x5b3f74();while(!![]){try{const _0x10bd21=parseInt(_0x320c54(0x1f9))/0x1+parseInt(_0x320c54(0x230))/0x2*(-parseInt(_0x320c54(0x1dc))/0x3)+-parseInt(_0x320c54(0x1c5))/0x4*(parseInt(_0x320c54(0x1e8))/0x5)+-parseInt(_0x320c54(0x21a))/0x6+-parseInt(_0x320c54(0x231))/0x7*(parseInt(_0x320c54(0x1a9))/0x8)+parseInt(_0x320c54(0x1a7))/0x9+parseInt(_0x320c54(0x1aa))/0xa;if(_0x10bd21===_0x298d08)break;else _0x17b970['push'](_0x17b970['shift']());}catch(_0x351ba9){_0x17b970['push'](_0x17b970['shift']());}}}(a122_0x4902,0xcad77));import a122_0x4382ef from'chalk';const VALID_OPERATOR_TYPES=new Set(['Equal',a122_0x5991a6(0x22d),a122_0x5991a6(0x20b),a122_0x5991a6(0x1f5),a122_0x5991a6(0x20a),a122_0x5991a6(0x22f),'In',a122_0x5991a6(0x214),'Contain',a122_0x5991a6(0x1fb),'EndWith','Regexp','IsNull',a122_0x5991a6(0x22b),a122_0x5991a6(0x21c),'TimeRange','TimeToday','Between']),OPERATORS_REQUIRING_VALUE=new Set([a122_0x5991a6(0x1f7),a122_0x5991a6(0x22d),a122_0x5991a6(0x20b),'GreaterEqual',a122_0x5991a6(0x20a),a122_0x5991a6(0x22f),'In',a122_0x5991a6(0x214),a122_0x5991a6(0x233),a122_0x5991a6(0x1fb),'EndWith','Regexp',a122_0x5991a6(0x22b),a122_0x5991a6(0x21c)]),OPERATORS_REQUIRING_UNIT=new Set(['TimeWithinPast',a122_0x5991a6(0x21c)]);export function getLocationFromPath(_0x51752d,_0x131528,_0x4541e6){const _0xfa6c9a=a122_0x5991a6;if(!_0x51752d||!_0x131528)return undefined;try{let _0x6e8e21=_0x51752d[_0xfa6c9a(0x215)](_0x4541e6,!![]),_0x2e1e2b=[..._0x4541e6];while((!_0x6e8e21||typeof _0x6e8e21!==_0xfa6c9a(0x228)||!(_0xfa6c9a(0x1bb)in _0x6e8e21)||!_0x6e8e21[_0xfa6c9a(0x1bb)])&&_0x2e1e2b['length']>0x0){_0x2e1e2b[_0xfa6c9a(0x220)](),_0x6e8e21=_0x2e1e2b[_0xfa6c9a(0x1a0)]>0x0?_0x51752d[_0xfa6c9a(0x215)](_0x2e1e2b,!![]):_0x51752d['contents'];}if(!_0x6e8e21||typeof _0x6e8e21!==_0xfa6c9a(0x228)||!(_0xfa6c9a(0x1bb)in _0x6e8e21)||!_0x6e8e21[_0xfa6c9a(0x1bb)])return undefined;const [_0x11bc41]=_0x6e8e21['range'];return offsetToLocation(_0x131528,_0x11bc41);}catch{return undefined;}}export function offsetToLocation(_0x57f166,_0x259934){let _0x3488f5=0x1,_0x4c65f5=0x1;for(let _0x331971=0x0;_0x331971<_0x259934&&_0x331971<_0x57f166['length'];_0x331971++){_0x57f166[_0x331971]==='\x0a'?(_0x3488f5++,_0x4c65f5=0x1):_0x4c65f5++;}return{'line':_0x3488f5,'column':_0x4c65f5,'offset':_0x259934};}function pathToArray(_0x51ea71){const _0x1d20e9=a122_0x5991a6;if(!_0x51ea71)return[];return _0x51ea71[_0x1d20e9(0x1b6)]('.')['flatMap'](_0xbafe70=>{const _0x103146=_0x1d20e9,_0x2bc988=_0xbafe70[_0x103146(0x1ae)](/^(\w+)\[(\d+)\]$/);if(_0x2bc988)return[_0x2bc988[0x1],parseInt(_0x2bc988[0x2],0xa)];return[_0xbafe70];});}export function validateRuleDef(_0x5bc366,_0x33364d,_0x39cd6c){const _0x4fde21=a122_0x5991a6,_0x2bd017=[];if(!_0x5bc366)return _0x2bd017;_0x5bc366[_0x4fde21(0x1d9)]!=='And'&&_0x5bc366[_0x4fde21(0x1d9)]!=='Or'&&_0x2bd017['push']({'level':_0x4fde21(0x1ff),'path':_0x33364d+_0x4fde21(0x237),'code':_0x4fde21(0x1e1),'message':_0x4fde21(0x1be)+_0x5bc366[_0x4fde21(0x1d9)]+'\x27','location':getLocationFromPath(_0x39cd6c[_0x4fde21(0x1a2)],_0x39cd6c['source'],pathToArray(_0x33364d+_0x4fde21(0x237)))});if(!_0x5bc366['conditions']||!Array[_0x4fde21(0x246)](_0x5bc366[_0x4fde21(0x1e0)]))return _0x2bd017[_0x4fde21(0x1b5)]({'level':_0x4fde21(0x1ff),'path':_0x33364d+'.conditions','code':_0x4fde21(0x226),'message':_0x4fde21(0x238),'location':getLocationFromPath(_0x39cd6c[_0x4fde21(0x1a2)],_0x39cd6c['source'],pathToArray(_0x33364d))}),_0x2bd017;for(let _0x2fb9ac=0x0;_0x2fb9ac<_0x5bc366['conditions'][_0x4fde21(0x1a0)];_0x2fb9ac++){const _0x6bb778=_0x5bc366['conditions'][_0x2fb9ac],_0xb20594=_0x33364d+_0x4fde21(0x1d7)+_0x2fb9ac+']';_0x2bd017['push'](...validateCondition(_0x6bb778,_0xb20594,_0x39cd6c));}return _0x2bd017;}function validateCondition(_0x45f98b,_0x3d94c0,_0x4068a9){const _0x350a1b=a122_0x5991a6,_0x18a503=[];if(!_0x45f98b||typeof _0x45f98b!==_0x350a1b(0x228))return _0x18a503;if(_0x45f98b['type']===_0x350a1b(0x23c)||_0x45f98b[_0x350a1b(0x1d9)]==='Or'){if(!_0x45f98b[_0x350a1b(0x1e0)]||!Array[_0x350a1b(0x246)](_0x45f98b['conditions']))_0x18a503[_0x350a1b(0x1b5)]({'level':_0x350a1b(0x1ff),'path':_0x3d94c0+_0x350a1b(0x224),'code':'MISSING_CONDITIONS','message':_0x45f98b[_0x350a1b(0x1d9)]+_0x350a1b(0x244),'location':getLocationFromPath(_0x4068a9[_0x350a1b(0x1a2)],_0x4068a9[_0x350a1b(0x1e9)],pathToArray(_0x3d94c0))});else for(let _0x284b0c=0x0;_0x284b0c<_0x45f98b[_0x350a1b(0x1e0)][_0x350a1b(0x1a0)];_0x284b0c++){_0x18a503[_0x350a1b(0x1b5)](...validateCondition(_0x45f98b[_0x350a1b(0x1e0)][_0x284b0c],_0x3d94c0+_0x350a1b(0x1d7)+_0x284b0c+']',_0x4068a9));}return _0x18a503;}if(_0x45f98b[_0x350a1b(0x1d9)]==='include'||_0x45f98b[_0x350a1b(0x1d9)]===_0x350a1b(0x217))return!_0x45f98b[_0x350a1b(0x1dd)]&&_0x18a503[_0x350a1b(0x1b5)]({'level':_0x350a1b(0x1ff),'path':_0x3d94c0+_0x350a1b(0x1ec),'code':_0x350a1b(0x243),'message':_0x45f98b['type']+_0x350a1b(0x223),'location':getLocationFromPath(_0x4068a9['document'],_0x4068a9[_0x350a1b(0x1e9)],pathToArray(_0x3d94c0))}),_0x18a503;if(_0x45f98b[_0x350a1b(0x1d9)]===_0x350a1b(0x19a)||_0x45f98b[_0x350a1b(0x1d9)]===_0x350a1b(0x210)){const _0x2d4d04=_0x45f98b,_0x143f7b=_0x2d4d04[_0x350a1b(0x1e9)],_0x32c0b3=_0x2d4d04[_0x350a1b(0x219)],_0x466cf1=_0x143f7b||_0x32c0b3;(!_0x2d4d04['attribute']||_0x2d4d04[_0x350a1b(0x198)]==='')&&!_0x466cf1&&_0x18a503['push']({'level':_0x350a1b(0x1ff),'path':_0x3d94c0+_0x350a1b(0x1de),'code':'EMPTY_ATTRIBUTE','message':_0x350a1b(0x248),'location':getLocationFromPath(_0x4068a9['document'],_0x4068a9[_0x350a1b(0x1e9)],pathToArray(_0x3d94c0+_0x350a1b(0x1de)))}),_0x2d4d04['operator']&&_0x18a503[_0x350a1b(0x1b5)](...validateOperator(_0x2d4d04['operator'],_0x3d94c0+'.operator',_0x4068a9)),_0x2d4d04[_0x350a1b(0x1e6)]!==undefined&&_0x18a503[_0x350a1b(0x1b5)](...validateArrayMatching(_0x2d4d04[_0x350a1b(0x1e6)],_0x3d94c0+_0x350a1b(0x1b2),_0x4068a9)),_0x2d4d04[_0x350a1b(0x232)]&&_0x18a503[_0x350a1b(0x1b5)](...validateRuleDef(_0x2d4d04[_0x350a1b(0x232)],_0x3d94c0+_0x350a1b(0x1c7),_0x4068a9));}return _0x18a503;}function validateOperator(_0x178d5d,_0x1a220a,_0x681737){const _0x34fa92=a122_0x5991a6,_0x1c90b7=[];if(!VALID_OPERATOR_TYPES[_0x34fa92(0x19e)](_0x178d5d['type']))return _0x1c90b7['push']({'level':_0x34fa92(0x1ff),'path':_0x1a220a+'.type','code':_0x34fa92(0x196),'message':'Invalid\x20operator\x20type\x20\x27'+_0x178d5d[_0x34fa92(0x1d9)]+'\x27.\x20Valid\x20types:\x20'+[...VALID_OPERATOR_TYPES][_0x34fa92(0x1b0)](',\x20'),'location':getLocationFromPath(_0x681737['document'],_0x681737[_0x34fa92(0x1e9)],pathToArray(_0x1a220a+'.type'))}),_0x1c90b7;return OPERATORS_REQUIRING_VALUE[_0x34fa92(0x19e)](_0x178d5d[_0x34fa92(0x1d9)])&&((_0x178d5d[_0x34fa92(0x19d)]===undefined||_0x178d5d['value']===null)&&_0x1c90b7[_0x34fa92(0x1b5)]({'level':_0x34fa92(0x1ff),'path':_0x1a220a+_0x34fa92(0x234),'code':'MISSING_OPERATOR_VALUE','message':_0x34fa92(0x1ba)+_0x178d5d[_0x34fa92(0x1d9)]+_0x34fa92(0x1cb),'location':getLocationFromPath(_0x681737[_0x34fa92(0x1a2)],_0x681737[_0x34fa92(0x1e9)],pathToArray(_0x1a220a))})),_0x178d5d[_0x34fa92(0x1d9)]===_0x34fa92(0x1db)&&(_0x178d5d[_0x34fa92(0x222)]===undefined&&_0x178d5d[_0x34fa92(0x1c4)]===undefined&&_0x1c90b7['push']({'level':_0x34fa92(0x1ff),'path':_0x1a220a,'code':'MISSING_BETWEEN_BOUNDS','message':_0x34fa92(0x1f1),'location':getLocationFromPath(_0x681737[_0x34fa92(0x1a2)],_0x681737[_0x34fa92(0x1e9)],pathToArray(_0x1a220a))})),OPERATORS_REQUIRING_UNIT['has'](_0x178d5d[_0x34fa92(0x1d9)])&&(!_0x178d5d[_0x34fa92(0x1a4)]&&_0x178d5d[_0x34fa92(0x19d)]!==undefined&&_0x1c90b7[_0x34fa92(0x1b5)]({'level':_0x34fa92(0x1ff),'path':_0x1a220a+_0x34fa92(0x1cd),'code':_0x34fa92(0x204),'message':_0x34fa92(0x1ba)+_0x178d5d[_0x34fa92(0x1d9)]+_0x34fa92(0x19b),'location':getLocationFromPath(_0x681737[_0x34fa92(0x1a2)],_0x681737[_0x34fa92(0x1e9)],pathToArray(_0x1a220a))})),_0x1c90b7;}function validateArrayMatching(_0x3e6b40,_0x1e12da,_0x18d00c){const _0x1f5068=a122_0x5991a6,_0x1d1d56=[];if(_0x3e6b40===_0x1f5068(0x1f2)||_0x3e6b40===_0x1f5068(0x218))return _0x1d1d56;if(typeof _0x3e6b40===_0x1f5068(0x228)){const _0x1a7d43=Object['keys'](_0x3e6b40),_0x3e4610=[_0x1f5068(0x1ef),_0x1f5068(0x225),_0x1f5068(0x1a1)],_0x39891e=_0x1a7d43[_0x1f5068(0x1d8)](_0x363cb8=>_0x3e4610[_0x1f5068(0x1f4)](_0x363cb8));!_0x39891e&&_0x1d1d56['push']({'level':_0x1f5068(0x1ff),'path':_0x1e12da,'code':'INVALID_ARRAY_MATCHING','message':_0x1f5068(0x201)+_0x3e4610['join']('/')+'.','location':getLocationFromPath(_0x18d00c[_0x1f5068(0x1a2)],_0x18d00c[_0x1f5068(0x1e9)],pathToArray(_0x1e12da))});}else _0x1d1d56[_0x1f5068(0x1b5)]({'level':_0x1f5068(0x1ff),'path':_0x1e12da,'code':_0x1f5068(0x20d),'message':'Invalid\x20arrayMatching\x20value.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20atLeast/atMost/exactly.','location':getLocationFromPath(_0x18d00c[_0x1f5068(0x1a2)],_0x18d00c[_0x1f5068(0x1e9)],pathToArray(_0x1e12da))});return _0x1d1d56;}function a122_0x4902(){const _0x47421b=['Operator\x20\x27','range','.with.branches','.with.branches[','Rule\x20type\x20must\x20be\x20\x27And\x27\x20or\x20\x27Or\x27,\x20got\x20\x27','location','A/B\x20test\x20variant\x20references\x20non-existent\x20step\x20\x27','milestone','flatMap','warnings','max','1152308SKTexb','startsWith','.filter','activation','warning','branches','\x27\x20requires\x20a\x20value','next','.unit','INVALID_AB_TEST_PERCENTAGES','.with.variants[','excluded_','].next','stage','toString','segments','reduce','MISSING_WAIT_PARAMS','.conditions[','some','type','keys','Between','763725tqQUKx','segment','.attribute','yellow','conditions','INVALID_RULE_TYPE','steps','variants','.with','entry_criteria','arrayMatching','.rule','10urjFxT','source','decision_point','set','.segment','rule','padStart','atLeast','journeys','Between\x20operator\x20requires\x20\x27min\x27\x20and/or\x20\x27max\x27\x20values','any','segments.','includes','GreaterEqual','\x27.\x20Define\x20it\x20in\x20the\x20\x27segments\x27\x20section\x20or\x20use\x20\x27ref:Segment\x20Name\x27\x20for\x20external\x20segments.','Equal','condition','276151LiaUZX','versions','StartWith','MISSING_NAME','Segment\x20name\x20is\x20required','\x27\x20(first\x20defined\x20at\x20steps[','error','exit_criteria','Invalid\x20arrayMatching.\x20Expected\x20\x27any\x27,\x20\x27all\x27,\x20or\x20object\x20with\x20','Wait\x20timeout\x20references\x20non-existent\x20step\x20\x27','Jump\x20target\x20requires\x20both\x20journey\x20and\x20stage\x20names','MISSING_TIME_UNIT','.name','goal','.with.variants','UNUSED_EMBEDDED_SEGMENT','with','Less','Greater','code','INVALID_ARRAY_MATCHING','embeddedSegments','jump','Behavior','.with.condition.next','level','ref:','NotIn','getIn','.with.condition.segment','exclude','all','aggregation','3169110dsINlt','.with.activation','TimeWithinNext','\x27\x20is\x20defined\x20but\x20not\x20referenced\x20in\x20the\x20journey','.with.condition.timeout.next','message','pop','repeat','min','\x20condition\x20must\x20have\x20a\x20segment\x20reference','.conditions','atMost','MISSING_CONDITIONS','Step\x20references\x20non-existent\x20step\x20\x27','object','Jump\x20step\x20requires\x20a\x20target','INVALID_JUMP_TARGET','TimeWithinPast','Wait\x20step\x20requires\x20parameters\x20in\x20\x22with\x22\x20field','NotEqual','stages[','LessEqual','10TPSkJD','9994628hCRRfj','filter','Contain','.value','A/B\x20test\x20requires\x20at\x20least\x20one\x20variant','stepNames','.type','Rule\x20must\x20have\x20a\x20conditions\x20array','percentage','get','MISSING_STAGES','And','Duplicate\x20step\x20name\x20\x27','excluded','column','Journey\x20name\x20is\x20required','path','INVALID_NEXT_REFERENCE','MISSING_SEGMENT_REFERENCE','\x20condition\x20must\x20have\x20a\x20conditions\x20array','Wait\x20condition\x20references\x20undefined\x20segment\x20\x27','isArray','journey','Attribute\x20name\x20cannot\x20be\x20empty','dim','.exit_criteria[','.steps[','INVALID_OPERATOR_TYPE','Activation\x20step\x20requires\x20an\x20activation\x20reference','attribute','\x20|\x20','Value','\x27\x20requires\x20a\x20time\x20unit','Decision\x20branch\x20references\x20non-existent\x20step\x20\x27','value','has','stages','length','exactly','document','referencedSegments','unit','name','A/B\x20test\x20variant\x20percentages\x20must\x20sum\x20to\x20100%\x20(got\x20','14175819uwUJEP','abs','8pbwSGQ','27846150dhCzuM','red','timeout','target','match','Journey\x20must\x20have\x20at\x20least\x20one\x20stage','join','Criteria\x20references\x20undefined\x20segment\x20\x27','.arrayMatching','trim','entries','push','split','.next','Wait\x20condition\x20references\x20non-existent\x20step\x20\x27','add'];a122_0x4902=function(){return _0x47421b;};return a122_0x4902();}export function validateSegmentDef(_0x43e5a0,_0x4c9320={}){const _0x1f507a=a122_0x5991a6,_0x7c956c=[],_0x2b770e=[];(!_0x43e5a0['name']||_0x43e5a0[_0x1f507a(0x1a5)][_0x1f507a(0x1b3)]()==='')&&_0x7c956c['push']({'level':_0x1f507a(0x1ff),'path':_0x1f507a(0x1a5),'code':_0x1f507a(0x1fc),'message':_0x1f507a(0x1fd),'location':getLocationFromPath(_0x4c9320[_0x1f507a(0x1a2)],_0x4c9320[_0x1f507a(0x1e9)],[_0x1f507a(0x1a5)])});if(_0x43e5a0[_0x1f507a(0x1ed)]){const _0x3cf7a3=validateRuleDef(_0x43e5a0[_0x1f507a(0x1ed)],_0x1f507a(0x1ed),_0x4c9320);for(const _0x34f833 of _0x3cf7a3){_0x34f833[_0x1f507a(0x212)]===_0x1f507a(0x1ff)?_0x7c956c[_0x1f507a(0x1b5)](_0x34f833):_0x2b770e[_0x1f507a(0x1b5)](_0x34f833);}}return{'valid':_0x7c956c[_0x1f507a(0x1a0)]===0x0,'errors':_0x7c956c,'warnings':_0x2b770e};}export function validateJourneyDef(_0x2936df,_0x11b8dc={}){const _0x4a6938=a122_0x5991a6,_0x3d16c0=[],_0x188f67=[];(!_0x2936df[_0x4a6938(0x1a5)]||_0x2936df[_0x4a6938(0x1a5)][_0x4a6938(0x1b3)]()==='')&&_0x3d16c0[_0x4a6938(0x1b5)]({'level':_0x4a6938(0x1ff),'path':_0x4a6938(0x1a5),'code':_0x4a6938(0x1fc),'message':_0x4a6938(0x240),'location':getLocationFromPath(_0x11b8dc['document'],_0x11b8dc[_0x4a6938(0x1e9)],[_0x4a6938(0x1a5)])});const _0x19b883=new Set();if(_0x2936df[_0x4a6938(0x1d4)])for(const _0x293fda of Object[_0x4a6938(0x1da)](_0x2936df['segments'])){_0x19b883[_0x4a6938(0x1b9)](_0x293fda);}const _0xf523b7=new Set(),_0xdf28ca={..._0x11b8dc,'embeddedSegments':_0x19b883,'referencedSegments':_0xf523b7};if(_0x2936df[_0x4a6938(0x1d4)])for(const [_0x2425cd,_0x5c3749]of Object[_0x4a6938(0x1b4)](_0x2936df['segments'])){const _0x352ccc=validateEmbeddedSegment(_0x5c3749,_0x4a6938(0x1f3)+_0x2425cd,_0xdf28ca);for(const _0x3a1633 of _0x352ccc){if(_0x3a1633[_0x4a6938(0x212)]===_0x4a6938(0x1ff))_0x3d16c0['push'](_0x3a1633);else _0x188f67[_0x4a6938(0x1b5)](_0x3a1633);}}const _0x4fcdb5=getJourneyStages(_0x2936df);_0x4fcdb5[_0x4a6938(0x1a0)]===0x0&&_0x3d16c0[_0x4a6938(0x1b5)]({'level':_0x4a6938(0x1ff),'path':_0x4a6938(0x19f),'code':_0x4a6938(0x23b),'message':_0x4a6938(0x1af),'location':getLocationFromPath(_0x11b8dc[_0x4a6938(0x1a2)],_0x11b8dc[_0x4a6938(0x1e9)],[_0x4a6938(0x19f)])});const _0x5c9b46=new Set();for(const _0x40fa27 of _0x4fcdb5){if(_0x40fa27[_0x4a6938(0x1e2)])for(const _0x38e84b of _0x40fa27[_0x4a6938(0x1e2)]){_0x38e84b[_0x4a6938(0x1a5)]&&_0x5c9b46['add'](_0x38e84b[_0x4a6938(0x1a5)]);}}_0xdf28ca[_0x4a6938(0x236)]=_0x5c9b46;for(let _0x1199a5=0x0;_0x1199a5<_0x4fcdb5[_0x4a6938(0x1a0)];_0x1199a5++){const _0x4dd100=_0x4fcdb5[_0x1199a5],_0x44efee=_0x4a6938(0x22e)+_0x1199a5+']',_0x95cf7=validateStage(_0x4dd100,_0x44efee,_0xdf28ca);for(const _0x574211 of _0x95cf7){if(_0x574211['level']==='error')_0x3d16c0[_0x4a6938(0x1b5)](_0x574211);else _0x188f67[_0x4a6938(0x1b5)](_0x574211);}}if(_0x2936df[_0x4a6938(0x206)]){const _0x6ab069=validateCriteria(_0x2936df[_0x4a6938(0x206)],_0x4a6938(0x206),_0xdf28ca);for(const _0x34dd91 of _0x6ab069){if(_0x34dd91[_0x4a6938(0x212)]===_0x4a6938(0x1ff))_0x3d16c0['push'](_0x34dd91);else _0x188f67[_0x4a6938(0x1b5)](_0x34dd91);}}for(const _0x426b32 of _0x19b883){!_0xf523b7[_0x4a6938(0x19e)](_0x426b32)&&!_0x426b32[_0x4a6938(0x1c6)](_0x4a6938(0x1d0))&&_0x188f67[_0x4a6938(0x1b5)]({'level':_0x4a6938(0x1c9),'path':_0x4a6938(0x1f3)+_0x426b32,'code':_0x4a6938(0x208),'message':'Embedded\x20segment\x20\x27'+_0x426b32+_0x4a6938(0x21d),'location':getLocationFromPath(_0x11b8dc['document'],_0x11b8dc[_0x4a6938(0x1e9)],[_0x4a6938(0x1d4),_0x426b32])});}return{'valid':_0x3d16c0['length']===0x0,'errors':_0x3d16c0,'warnings':_0x188f67};}function getJourneyStages(_0x40659f){const _0x511051=a122_0x5991a6;if(_0x40659f['stages']&&_0x40659f[_0x511051(0x19f)][_0x511051(0x1a0)]>0x0)return _0x40659f['stages'];if(_0x40659f[_0x511051(0x1f0)]&&_0x40659f['journeys']['length']>0x0)return _0x40659f[_0x511051(0x1f0)][_0x511051(0x1c2)](_0x39f4ce=>_0x39f4ce[_0x511051(0x19f)]||[]);if(_0x40659f[_0x511051(0x1fa)]&&_0x40659f[_0x511051(0x1fa)][_0x511051(0x1a0)]>0x0)return _0x40659f['versions'][_0x511051(0x1c2)](_0x2afd77=>_0x2afd77[_0x511051(0x19f)]||[]);return[];}function validateEmbeddedSegment(_0x48a90c,_0x40fd90,_0x379ddd){const _0xb6e488=a122_0x5991a6,_0x38ca0f=[];return _0x48a90c[_0xb6e488(0x1ed)]&&_0x38ca0f[_0xb6e488(0x1b5)](...validateRuleDef(_0x48a90c[_0xb6e488(0x1ed)],_0x40fd90+_0xb6e488(0x1e7),_0x379ddd)),_0x38ca0f;}function validateStage(_0x1d3adc,_0x26d006,_0x4c8a44){const _0x1648ed=a122_0x5991a6,_0x4cdad2=[],_0x54ce23=new Map();if(_0x1d3adc[_0x1648ed(0x1e2)])for(let _0x3f4ea8=0x0;_0x3f4ea8<_0x1d3adc[_0x1648ed(0x1e2)]['length'];_0x3f4ea8++){const _0x29a204=_0x1d3adc['steps'][_0x3f4ea8],_0x110e09=_0x26d006+_0x1648ed(0x195)+_0x3f4ea8+']';if(_0x29a204[_0x1648ed(0x1a5)]){if(_0x54ce23['has'](_0x29a204['name'])){const _0x37d0be=_0x54ce23[_0x1648ed(0x23a)](_0x29a204[_0x1648ed(0x1a5)]);_0x4cdad2['push']({'level':_0x1648ed(0x1ff),'path':_0x110e09+_0x1648ed(0x205),'code':'DUPLICATE_STEP_NAME','message':_0x1648ed(0x23d)+_0x29a204['name']+_0x1648ed(0x1fe)+_0x37d0be+'])','location':getLocationFromPath(_0x4c8a44[_0x1648ed(0x1a2)],_0x4c8a44[_0x1648ed(0x1e9)],pathToArray(_0x110e09+_0x1648ed(0x205)))});}else _0x54ce23[_0x1648ed(0x1eb)](_0x29a204[_0x1648ed(0x1a5)],_0x3f4ea8);}_0x4cdad2['push'](...validateStep(_0x29a204,_0x110e09,_0x4c8a44));}_0x1d3adc[_0x1648ed(0x1e5)]&&_0x4cdad2[_0x1648ed(0x1b5)](...validateCriteria(_0x1d3adc[_0x1648ed(0x1e5)],_0x26d006+'.entry_criteria',_0x4c8a44));if(_0x1d3adc[_0x1648ed(0x200)])for(let _0x553ba7=0x0;_0x553ba7<_0x1d3adc[_0x1648ed(0x200)]['length'];_0x553ba7++){_0x4cdad2[_0x1648ed(0x1b5)](...validateCriteria(_0x1d3adc[_0x1648ed(0x200)][_0x553ba7],_0x26d006+_0x1648ed(0x194)+_0x553ba7+']',_0x4c8a44));}return _0x1d3adc[_0x1648ed(0x1c1)]&&_0x4cdad2[_0x1648ed(0x1b5)](...validateCriteria(_0x1d3adc[_0x1648ed(0x1c1)],_0x26d006+'.milestone',_0x4c8a44)),_0x4cdad2;}function validateStep(_0x911203,_0x4b2c18,_0xd4085e){const _0x330011=a122_0x5991a6,_0x5bdd22=[];_0x911203[_0x330011(0x1cc)]&&_0x911203[_0x330011(0x1d9)]!=='end'&&(_0xd4085e['stepNames']&&!_0xd4085e[_0x330011(0x236)][_0x330011(0x19e)](_0x911203[_0x330011(0x1cc)])&&_0x5bdd22[_0x330011(0x1b5)]({'level':_0x330011(0x1ff),'path':_0x4b2c18+_0x330011(0x1b7),'code':_0x330011(0x242),'message':_0x330011(0x227)+_0x911203[_0x330011(0x1cc)]+'\x27','location':getLocationFromPath(_0xd4085e['document'],_0xd4085e[_0x330011(0x1e9)],pathToArray(_0x4b2c18+_0x330011(0x1b7)))}));switch(_0x911203[_0x330011(0x1d9)]){case'wait':_0x5bdd22[_0x330011(0x1b5)](...validateWaitStep(_0x911203,_0x4b2c18,_0xd4085e));break;case _0x330011(0x1c8):_0x5bdd22[_0x330011(0x1b5)](...validateActivationStep(_0x911203,_0x4b2c18,_0xd4085e));break;case _0x330011(0x1ea):_0x5bdd22[_0x330011(0x1b5)](...validateDecisionPointStep(_0x911203,_0x4b2c18,_0xd4085e));break;case'ab_test':_0x5bdd22[_0x330011(0x1b5)](...validateAbTestStep(_0x911203,_0x4b2c18,_0xd4085e));break;case _0x330011(0x20f):_0x5bdd22['push'](...validateJumpStep(_0x911203,_0x4b2c18,_0xd4085e));break;}return _0x5bdd22;}function validateWaitStep(_0x260ca0,_0x1bfebd,_0x38ec46){const _0x1ba6db=a122_0x5991a6,_0x26c6da=[];if(!_0x260ca0[_0x1ba6db(0x209)])return _0x26c6da[_0x1ba6db(0x1b5)]({'level':_0x1ba6db(0x1ff),'path':_0x1bfebd+_0x1ba6db(0x1e4),'code':_0x1ba6db(0x1d6),'message':_0x1ba6db(0x22c),'location':getLocationFromPath(_0x38ec46[_0x1ba6db(0x1a2)],_0x38ec46[_0x1ba6db(0x1e9)],pathToArray(_0x1bfebd))}),_0x26c6da;if(_0x260ca0['with'][_0x1ba6db(0x1f8)]){const _0x11ed82=_0x260ca0[_0x1ba6db(0x209)]['condition'];_0x11ed82['segment']&&(_0x38ec46[_0x1ba6db(0x1a3)]?.[_0x1ba6db(0x1b9)](_0x11ed82[_0x1ba6db(0x1dd)]),!_0x11ed82[_0x1ba6db(0x1dd)][_0x1ba6db(0x1c6)]('ref:')&&(_0x38ec46[_0x1ba6db(0x20e)]&&!_0x38ec46[_0x1ba6db(0x20e)][_0x1ba6db(0x19e)](_0x11ed82[_0x1ba6db(0x1dd)])&&_0x26c6da[_0x1ba6db(0x1b5)]({'level':_0x1ba6db(0x1ff),'path':_0x1bfebd+_0x1ba6db(0x216),'code':_0x1ba6db(0x243),'message':_0x1ba6db(0x245)+_0x11ed82['segment']+_0x1ba6db(0x1f6),'location':getLocationFromPath(_0x38ec46[_0x1ba6db(0x1a2)],_0x38ec46[_0x1ba6db(0x1e9)],pathToArray(_0x1bfebd+_0x1ba6db(0x216)))})),_0x11ed82[_0x1ba6db(0x1cc)]&&_0x38ec46[_0x1ba6db(0x236)]&&!_0x38ec46[_0x1ba6db(0x236)]['has'](_0x11ed82[_0x1ba6db(0x1cc)])&&_0x26c6da[_0x1ba6db(0x1b5)]({'level':'error','path':_0x1bfebd+_0x1ba6db(0x211),'code':_0x1ba6db(0x242),'message':_0x1ba6db(0x1b8)+_0x11ed82[_0x1ba6db(0x1cc)]+'\x27','location':getLocationFromPath(_0x38ec46['document'],_0x38ec46[_0x1ba6db(0x1e9)],pathToArray(_0x1bfebd+_0x1ba6db(0x211)))}),_0x11ed82[_0x1ba6db(0x1ac)]?.[_0x1ba6db(0x1cc)]&&_0x38ec46[_0x1ba6db(0x236)]&&!_0x38ec46[_0x1ba6db(0x236)][_0x1ba6db(0x19e)](_0x11ed82[_0x1ba6db(0x1ac)]['next'])&&_0x26c6da[_0x1ba6db(0x1b5)]({'level':_0x1ba6db(0x1ff),'path':_0x1bfebd+_0x1ba6db(0x21e),'code':_0x1ba6db(0x242),'message':_0x1ba6db(0x202)+_0x11ed82[_0x1ba6db(0x1ac)]['next']+'\x27','location':getLocationFromPath(_0x38ec46[_0x1ba6db(0x1a2)],_0x38ec46[_0x1ba6db(0x1e9)],pathToArray(_0x1bfebd+'.with.condition.timeout.next'))}));}return _0x26c6da;}function a122_0x5a11(_0x475394,_0x508cb5){_0x475394=_0x475394-0x193;const _0x4902e3=a122_0x4902();let _0x5a1133=_0x4902e3[_0x475394];return _0x5a1133;}function validateActivationStep(_0x4f09e8,_0x110d90,_0x4058fc){const _0x31c047=a122_0x5991a6,_0x356648=[];return!_0x4f09e8['with']?.[_0x31c047(0x1c8)]&&_0x356648[_0x31c047(0x1b5)]({'level':_0x31c047(0x1ff),'path':_0x110d90+_0x31c047(0x21b),'code':'MISSING_ACTIVATION_REF','message':_0x31c047(0x197),'location':getLocationFromPath(_0x4058fc[_0x31c047(0x1a2)],_0x4058fc[_0x31c047(0x1e9)],pathToArray(_0x110d90))}),_0x356648;}function validateDecisionPointStep(_0x421622,_0xd7f8d7,_0x13cf2d){const _0x349f97=a122_0x5991a6,_0x5ccc20=[];if(!_0x421622['with']?.[_0x349f97(0x1ca)]||_0x421622[_0x349f97(0x209)][_0x349f97(0x1ca)][_0x349f97(0x1a0)]===0x0)return _0x5ccc20[_0x349f97(0x1b5)]({'level':_0x349f97(0x1ff),'path':_0xd7f8d7+_0x349f97(0x1bc),'code':_0x349f97(0x226),'message':'Decision\x20point\x20requires\x20at\x20least\x20one\x20branch','location':getLocationFromPath(_0x13cf2d[_0x349f97(0x1a2)],_0x13cf2d['source'],pathToArray(_0xd7f8d7))}),_0x5ccc20;for(let _0x4504f5=0x0;_0x4504f5<_0x421622[_0x349f97(0x209)][_0x349f97(0x1ca)][_0x349f97(0x1a0)];_0x4504f5++){const _0x4ff2f2=_0x421622[_0x349f97(0x209)]['branches'][_0x4504f5],_0x151b28=_0xd7f8d7+_0x349f97(0x1bd)+_0x4504f5+']';_0x4ff2f2[_0x349f97(0x1dd)]&&!_0x4ff2f2[_0x349f97(0x23e)]&&(_0x13cf2d[_0x349f97(0x1a3)]?.[_0x349f97(0x1b9)](_0x4ff2f2[_0x349f97(0x1dd)]),!_0x4ff2f2[_0x349f97(0x1dd)][_0x349f97(0x1c6)](_0x349f97(0x213))&&(_0x13cf2d[_0x349f97(0x20e)]&&!_0x13cf2d[_0x349f97(0x20e)][_0x349f97(0x19e)](_0x4ff2f2[_0x349f97(0x1dd)])&&_0x5ccc20['push']({'level':_0x349f97(0x1ff),'path':_0x151b28+_0x349f97(0x1ec),'code':_0x349f97(0x243),'message':'Decision\x20branch\x20references\x20undefined\x20segment\x20\x27'+_0x4ff2f2[_0x349f97(0x1dd)]+'\x27','location':getLocationFromPath(_0x13cf2d[_0x349f97(0x1a2)],_0x13cf2d['source'],pathToArray(_0x151b28+_0x349f97(0x1ec)))}))),_0x4ff2f2[_0x349f97(0x1cc)]&&_0x13cf2d[_0x349f97(0x236)]&&!_0x13cf2d[_0x349f97(0x236)][_0x349f97(0x19e)](_0x4ff2f2[_0x349f97(0x1cc)])&&_0x5ccc20[_0x349f97(0x1b5)]({'level':_0x349f97(0x1ff),'path':_0x151b28+_0x349f97(0x1b7),'code':_0x349f97(0x242),'message':_0x349f97(0x19c)+_0x4ff2f2[_0x349f97(0x1cc)]+'\x27','location':getLocationFromPath(_0x13cf2d['document'],_0x13cf2d[_0x349f97(0x1e9)],pathToArray(_0x151b28+_0x349f97(0x1b7)))});}return _0x5ccc20;}function validateAbTestStep(_0x4b15ad,_0x48fc04,_0x57e766){const _0x4f5001=a122_0x5991a6,_0x55cb6e=[];if(!_0x4b15ad['with']?.['variants']||_0x4b15ad[_0x4f5001(0x209)][_0x4f5001(0x1e3)][_0x4f5001(0x1a0)]===0x0)return _0x55cb6e['push']({'level':_0x4f5001(0x1ff),'path':_0x48fc04+_0x4f5001(0x207),'code':'MISSING_CONDITIONS','message':_0x4f5001(0x235),'location':getLocationFromPath(_0x57e766[_0x4f5001(0x1a2)],_0x57e766['source'],pathToArray(_0x48fc04))}),_0x55cb6e;const _0x57ee03=_0x4b15ad[_0x4f5001(0x209)][_0x4f5001(0x1e3)][_0x4f5001(0x1d5)]((_0x387e2a,_0x4d2280)=>_0x387e2a+(_0x4d2280[_0x4f5001(0x239)]||0x0),0x0);Math[_0x4f5001(0x1a8)](_0x57ee03-0x64)>0.01&&_0x55cb6e[_0x4f5001(0x1b5)]({'level':'error','path':_0x48fc04+_0x4f5001(0x207),'code':_0x4f5001(0x1ce),'message':_0x4f5001(0x1a6)+_0x57ee03+'%)','location':getLocationFromPath(_0x57e766[_0x4f5001(0x1a2)],_0x57e766[_0x4f5001(0x1e9)],pathToArray(_0x48fc04+_0x4f5001(0x207)))});for(let _0x12de08=0x0;_0x12de08<_0x4b15ad[_0x4f5001(0x209)][_0x4f5001(0x1e3)][_0x4f5001(0x1a0)];_0x12de08++){const _0x5d0251=_0x4b15ad[_0x4f5001(0x209)][_0x4f5001(0x1e3)][_0x12de08];_0x5d0251[_0x4f5001(0x1cc)]&&_0x57e766[_0x4f5001(0x236)]&&!_0x57e766[_0x4f5001(0x236)][_0x4f5001(0x19e)](_0x5d0251[_0x4f5001(0x1cc)])&&_0x55cb6e[_0x4f5001(0x1b5)]({'level':'error','path':_0x48fc04+'.with.variants['+_0x12de08+_0x4f5001(0x1d1),'code':_0x4f5001(0x242),'message':_0x4f5001(0x1c0)+_0x5d0251[_0x4f5001(0x1cc)]+'\x27','location':getLocationFromPath(_0x57e766[_0x4f5001(0x1a2)],_0x57e766[_0x4f5001(0x1e9)],pathToArray(_0x48fc04+_0x4f5001(0x1cf)+_0x12de08+'].next'))});}return _0x55cb6e;}function validateJumpStep(_0x419d1c,_0x6c1e37,_0x4a70e8){const _0x17fea1=a122_0x5991a6,_0x4383df=[];if(!_0x419d1c[_0x17fea1(0x209)]?.[_0x17fea1(0x1ad)])return _0x4383df[_0x17fea1(0x1b5)]({'level':_0x17fea1(0x1ff),'path':_0x6c1e37+'.with.target','code':_0x17fea1(0x22a),'message':_0x17fea1(0x229),'location':getLocationFromPath(_0x4a70e8[_0x17fea1(0x1a2)],_0x4a70e8[_0x17fea1(0x1e9)],pathToArray(_0x6c1e37))}),_0x4383df;return(!_0x419d1c[_0x17fea1(0x209)][_0x17fea1(0x1ad)][_0x17fea1(0x247)]||!_0x419d1c[_0x17fea1(0x209)][_0x17fea1(0x1ad)][_0x17fea1(0x1d2)])&&_0x4383df[_0x17fea1(0x1b5)]({'level':'error','path':_0x6c1e37+'.with.target','code':_0x17fea1(0x22a),'message':_0x17fea1(0x203),'location':getLocationFromPath(_0x4a70e8[_0x17fea1(0x1a2)],_0x4a70e8[_0x17fea1(0x1e9)],pathToArray(_0x6c1e37+'.with.target'))}),_0x4383df;}function validateCriteria(_0x54f253,_0x26303e,_0x18cc82){const _0x260f96=a122_0x5991a6,_0x3c7271=[];return _0x54f253[_0x260f96(0x1dd)]&&(_0x18cc82[_0x260f96(0x1a3)]?.[_0x260f96(0x1b9)](_0x54f253[_0x260f96(0x1dd)]),!_0x54f253[_0x260f96(0x1dd)][_0x260f96(0x1c6)]('ref:')&&(_0x18cc82[_0x260f96(0x20e)]&&!_0x18cc82[_0x260f96(0x20e)][_0x260f96(0x19e)](_0x54f253[_0x260f96(0x1dd)])&&_0x3c7271[_0x260f96(0x1b5)]({'level':_0x260f96(0x1ff),'path':_0x26303e+'.segment','code':_0x260f96(0x243),'message':_0x260f96(0x1b1)+_0x54f253['segment']+'\x27','location':getLocationFromPath(_0x18cc82[_0x260f96(0x1a2)],_0x18cc82['source'],pathToArray(_0x26303e+_0x260f96(0x1ec)))}))),_0x3c7271;}export function formatIssueWithContext(_0x3f795a,_0x115c63,_0x45cd2c){const _0x1b43e5=a122_0x5991a6,_0x5900ec=[],_0x9392f5=_0x3f795a[_0x1b43e5(0x212)]===_0x1b43e5(0x1ff),_0x956ce9=_0x9392f5?a122_0x4382ef['red']:a122_0x4382ef[_0x1b43e5(0x1df)],_0x1222b8=_0x9392f5?a122_0x4382ef[_0x1b43e5(0x1ab)]:a122_0x4382ef[_0x1b43e5(0x1df)],_0x3aacf7=_0x45cd2c?a122_0x4382ef['cyan'](_0x45cd2c+':'):'';if(_0x3f795a[_0x1b43e5(0x1bf)]){const _0xb36a27=a122_0x4382ef['cyan'](_0x3f795a[_0x1b43e5(0x1bf)]['line']+':'+_0x3f795a['location'][_0x1b43e5(0x23f)]);_0x5900ec[_0x1b43e5(0x1b5)](''+_0x3aacf7+_0xb36a27+':\x20'+_0x956ce9(_0x3f795a[_0x1b43e5(0x212)])+'\x20'+_0x1222b8('['+_0x3f795a[_0x1b43e5(0x20c)]+']'));}else _0x5900ec[_0x1b43e5(0x1b5)](''+_0x3aacf7+a122_0x4382ef['dim'](_0x3f795a[_0x1b43e5(0x241)])+':\x20'+_0x956ce9(_0x3f795a[_0x1b43e5(0x212)])+'\x20'+_0x1222b8('['+_0x3f795a[_0x1b43e5(0x20c)]+']'));_0x5900ec[_0x1b43e5(0x1b5)](_0x3f795a[_0x1b43e5(0x21f)]);if(_0x3f795a['location']&&_0x115c63){const _0x53efd8=_0x115c63[_0x1b43e5(0x1b6)]('\x0a'),{line:_0x4989da,column:_0x19722e}=_0x3f795a[_0x1b43e5(0x1bf)],_0x1aaaed=Math[_0x1b43e5(0x1c4)](0x1,_0x4989da-0x1),_0x12e566=Math[_0x1b43e5(0x222)](_0x53efd8[_0x1b43e5(0x1a0)],_0x4989da+0x1);_0x5900ec[_0x1b43e5(0x1b5)]('');for(let _0x2ef6ed=_0x1aaaed;_0x2ef6ed<=_0x12e566;_0x2ef6ed++){const _0x17e219=_0x53efd8[_0x2ef6ed-0x1]||'',_0x2a5cee=a122_0x4382ef[_0x1b43e5(0x193)](_0x2ef6ed[_0x1b43e5(0x1d3)]()[_0x1b43e5(0x1ee)](0x4)),_0xecd3f3=a122_0x4382ef['dim'](_0x1b43e5(0x199));if(_0x2ef6ed===_0x4989da){_0x5900ec[_0x1b43e5(0x1b5)]('\x20\x20'+_0x2a5cee+_0xecd3f3+_0x956ce9(_0x17e219));const _0x378ddd='\x20'[_0x1b43e5(0x221)](0x4+0x3+_0x19722e-0x1);_0x5900ec['push']('\x20\x20'+_0x378ddd+_0x956ce9('^'));}else _0x5900ec['push']('\x20\x20'+_0x2a5cee+_0xecd3f3+a122_0x4382ef['dim'](_0x17e219));}}return _0x5900ec['join']('\x0a');}export function formatValidationResult(_0x903cec,_0x54e1eb,_0x54b38d){const _0x4d2582=a122_0x5991a6,_0x502f58=[];for(const _0x4966ad of _0x903cec['errors']){_0x502f58[_0x4d2582(0x1b5)](formatIssueWithContext(_0x4966ad,_0x54e1eb,_0x54b38d)),_0x502f58[_0x4d2582(0x1b5)]('');}for(const _0x1727c5 of _0x903cec[_0x4d2582(0x1c3)]){_0x502f58['push'](formatIssueWithContext(_0x1727c5,_0x54e1eb,_0x54b38d)),_0x502f58[_0x4d2582(0x1b5)]('');}return _0x502f58[_0x4d2582(0x1b0)]('\x0a');}