@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.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
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
|
-
|
|
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(
|
|
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
|
|
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
|
|
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');}
|