@treasuredata/tdx 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/prompt.js +1 -1
  157. package/dist/utils/spinner.js +1 -1
  158. package/dist/utils/sse-parser.js +1 -1
  159. package/dist/utils/string-utils.js +1 -1
  160. package/dist/utils/table-ref-parser.js +1 -1
  161. package/dist/utils/tdx-logger.js +1 -1
  162. package/dist/utils/version-check.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4f512d,_0xd0344a){const _0x45cf8c=a100_0x3338,_0x5525d9=_0x4f512d();while(!![]){try{const _0xb12a1=-parseInt(_0x45cf8c(0xe2))/0x1+-parseInt(_0x45cf8c(0xcf))/0x2*(-parseInt(_0x45cf8c(0xdb))/0x3)+-parseInt(_0x45cf8c(0xde))/0x4*(parseInt(_0x45cf8c(0xd8))/0x5)+-parseInt(_0x45cf8c(0xcc))/0x6+-parseInt(_0x45cf8c(0xe3))/0x7*(parseInt(_0x45cf8c(0xd6))/0x8)+-parseInt(_0x45cf8c(0xed))/0x9+-parseInt(_0x45cf8c(0xe6))/0xa*(-parseInt(_0x45cf8c(0xd3))/0xb);if(_0xb12a1===_0xd0344a)break;else _0x5525d9['push'](_0x5525d9['shift']());}catch(_0x8c9397){_0x5525d9['push'](_0x5525d9['shift']());}}}(a100_0x26be,0x30a47));import{readFileSync}from'fs';function a100_0x3338(_0x5d8425,_0x19c260){_0x5d8425=_0x5d8425-0xcb;const _0x26be85=a100_0x26be();let _0x333850=_0x26be85[_0x5d8425];return _0x333850;}function a100_0x26be(){const _0x3e4327=['8FCSMiy','stdin\x20','5MBfBov','\x27\x20not\x20found','test','897BDTXBH','line','Content\x20contains\x20no\x20SQL\x20statements','851296FGStho','error','map','File\x20\x27','314030YvwBjD','34286oAqBbY','replace','message','10CTdZMt','filter','toLowerCase','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','\x27:\x20','stdin','Error\x20reading\x20file\x20\x27','1618776YrpYkY','EACCES','utf-8','884262CgAJeq','close','length','2594GxPnTA','join','trim','Permission\x20denied\x20reading\x20file\x20\x27','7374719LOkTWc','Error\x20reading\x20from\x20stdin:\x20','isTTY'];a100_0x26be=function(){return _0x3e4327;};return a100_0x26be();}import{createInterface}from'readline';export function stripSqlComments(_0x3ec549){const _0x1aad8b=a100_0x3338;let _0x551cad=_0x3ec549[_0x1aad8b(0xe4)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x551cad=_0x551cad[_0x1aad8b(0xe4)](/--.*$/gm,''),_0x551cad[_0x1aad8b(0xd1)]();}function isEscaped(_0x1bae1f,_0x2a6284){let _0x34dabc=0x0;for(let _0x31df21=_0x2a6284-0x1;_0x31df21>=0x0&&_0x1bae1f[_0x31df21]==='\x5c';_0x31df21--){_0x34dabc++;}return _0x34dabc%0x2===0x1;}export function splitSqlStatements(_0x2db76c){const _0x3e5e3c=a100_0x3338,_0x551077=stripSqlComments(_0x2db76c);if(!_0x551077)throw new Error(_0x3e5e3c(0xdd));const _0x2d0fe2=[];let _0x208c82='',_0x28d763=![],_0x58914b=![],_0x301fb6=![];for(let _0x22721d=0x0;_0x22721d<_0x2db76c[_0x3e5e3c(0xce)];_0x22721d++){const _0x4591ef=_0x2db76c[_0x22721d];if(_0x4591ef==='\x27'&&!isEscaped(_0x2db76c,_0x22721d)&&!_0x58914b&&!_0x301fb6)_0x28d763=!_0x28d763;else{if(_0x4591ef==='\x22'&&!isEscaped(_0x2db76c,_0x22721d)&&!_0x28d763&&!_0x301fb6)_0x58914b=!_0x58914b;else _0x4591ef==='`'&&!isEscaped(_0x2db76c,_0x22721d)&&!_0x28d763&&!_0x58914b&&(_0x301fb6=!_0x301fb6);}if(_0x4591ef===';'&&!_0x28d763&&!_0x58914b&&!_0x301fb6){const _0x22b5f4=_0x208c82[_0x3e5e3c(0xd1)]();_0x22b5f4&&_0x2d0fe2['push'](_0x22b5f4),_0x208c82='';}else _0x208c82+=_0x4591ef;}const _0x47849a=_0x208c82['trim']();_0x47849a&&_0x2d0fe2['push'](_0x47849a);const _0x3f2156=_0x2d0fe2[_0x3e5e3c(0xe0)](_0xf904c4=>_0xf904c4[_0x3e5e3c(0xd1)]())[_0x3e5e3c(0xe7)](_0x2ab0e5=>{const _0x2efcd6=_0x3e5e3c,_0x2f7ba3=stripSqlComments(_0x2ab0e5);return _0x2f7ba3[_0x2efcd6(0xce)]>0x0;});if(_0x3f2156[_0x3e5e3c(0xce)]===0x0)throw new Error(_0x3e5e3c(0xdd));return _0x3f2156;}export function readFileContent(_0x3767d4){const _0x2c5ad9=a100_0x3338;try{return readFileSync(_0x3767d4,_0x2c5ad9(0xcb));}catch(_0x53d628){const _0x105ac7=_0x53d628['code'];if(_0x105ac7==='ENOENT')throw new Error(_0x2c5ad9(0xe1)+_0x3767d4+_0x2c5ad9(0xd9));else{if(_0x105ac7===_0x2c5ad9(0xee))throw new Error(_0x2c5ad9(0xd2)+_0x3767d4+'\x27');else throw new Error(_0x2c5ad9(0xec)+_0x3767d4+_0x2c5ad9(0xea)+_0x53d628[_0x2c5ad9(0xe5)]);}}}export function readSqlStatementsFromFile(_0x30f754){const _0x306819=a100_0x3338,_0x3d9b28=readFileContent(_0x30f754);try{return splitSqlStatements(_0x3d9b28);}catch(_0x12bf95){throw new Error(_0x306819(0xe1)+_0x30f754+'\x27\x20'+_0x12bf95['message'][_0x306819(0xe8)]());}}export async function readStdinContent(){const _0x2e9b64=a100_0x3338;if(process['stdin'][_0x2e9b64(0xd5)])throw new Error(_0x2e9b64(0xe9));return new Promise((_0x4b4d87,_0xb0ff94)=>{const _0x1c0d12=_0x2e9b64,_0x43a9bb=[],_0x429a89=createInterface({'input':process[_0x1c0d12(0xeb)],'terminal':![]});_0x429a89['on'](_0x1c0d12(0xdc),_0x371d46=>{_0x43a9bb['push'](_0x371d46);}),_0x429a89['on']('close',()=>{const _0x1307fd=_0x1c0d12;_0x4b4d87(_0x43a9bb[_0x1307fd(0xd0)]('\x0a'));}),_0x429a89['on'](_0x1c0d12(0xdf),_0x10f526=>{const _0x149212=_0x1c0d12;_0x429a89[_0x149212(0xcd)](),_0xb0ff94(new Error(_0x149212(0xd4)+_0x10f526[_0x149212(0xe5)]));});});}export async function readSqlStatementsFromStdin(){const _0x24d575=a100_0x3338,_0xb64eed=await readStdinContent();try{return splitSqlStatements(_0xb64eed);}catch(_0x1f53ff){throw new Error(_0x24d575(0xd7)+_0x1f53ff[_0x24d575(0xe5)]['toLowerCase']());}}export function isSqlFilePath(_0x1d0b6f){const _0x35e997=a100_0x3338;return/\w\.sql$/[_0x35e997(0xda)](_0x1d0b6f);}
1
+ (function(_0x3e7b50,_0x110779){const _0x443c6f=a100_0x5f0f,_0x29dbda=_0x3e7b50();while(!![]){try{const _0x1805cb=-parseInt(_0x443c6f(0x149))/0x1+parseInt(_0x443c6f(0x13d))/0x2+parseInt(_0x443c6f(0x14c))/0x3+parseInt(_0x443c6f(0x14a))/0x4+parseInt(_0x443c6f(0x135))/0x5*(parseInt(_0x443c6f(0x13c))/0x6)+parseInt(_0x443c6f(0x141))/0x7+-parseInt(_0x443c6f(0x134))/0x8;if(_0x1805cb===_0x110779)break;else _0x29dbda['push'](_0x29dbda['shift']());}catch(_0x1935f0){_0x29dbda['push'](_0x29dbda['shift']());}}}(a100_0x3367,0x1cf54));import{readFileSync}from'fs';import{createInterface}from'readline';function a100_0x5f0f(_0x2a0ce6,_0x1ae407){_0x2a0ce6=_0x2a0ce6-0x132;const _0x33672b=a100_0x3367();let _0x5f0f0a=_0x33672b[_0x2a0ce6];return _0x5f0f0a;}export function stripSqlComments(_0x5ddb4d){const _0x501587=a100_0x5f0f;let _0x25e460=_0x5ddb4d['replace'](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x25e460=_0x25e460[_0x501587(0x132)](/--.*$/gm,''),_0x25e460['trim']();}function isEscaped(_0x10691d,_0x34b544){let _0x3867b5=0x0;for(let _0x352ff6=_0x34b544-0x1;_0x352ff6>=0x0&&_0x10691d[_0x352ff6]==='\x5c';_0x352ff6--){_0x3867b5++;}return _0x3867b5%0x2===0x1;}export function splitSqlStatements(_0x2d180c){const _0x47a121=a100_0x5f0f,_0x3c1857=stripSqlComments(_0x2d180c);if(!_0x3c1857)throw new Error(_0x47a121(0x148));const _0x3a1dd=[];let _0x49ccc8='',_0x1c86d8=![],_0x5b8500=![],_0xff9ee=![];for(let _0xbe0b81=0x0;_0xbe0b81<_0x2d180c[_0x47a121(0x145)];_0xbe0b81++){const _0x183e35=_0x2d180c[_0xbe0b81];if(_0x183e35==='\x27'&&!isEscaped(_0x2d180c,_0xbe0b81)&&!_0x5b8500&&!_0xff9ee)_0x1c86d8=!_0x1c86d8;else{if(_0x183e35==='\x22'&&!isEscaped(_0x2d180c,_0xbe0b81)&&!_0x1c86d8&&!_0xff9ee)_0x5b8500=!_0x5b8500;else _0x183e35==='`'&&!isEscaped(_0x2d180c,_0xbe0b81)&&!_0x1c86d8&&!_0x5b8500&&(_0xff9ee=!_0xff9ee);}if(_0x183e35===';'&&!_0x1c86d8&&!_0x5b8500&&!_0xff9ee){const _0x2af9a1=_0x49ccc8['trim']();_0x2af9a1&&_0x3a1dd[_0x47a121(0x147)](_0x2af9a1),_0x49ccc8='';}else _0x49ccc8+=_0x183e35;}const _0x455469=_0x49ccc8[_0x47a121(0x13b)]();_0x455469&&_0x3a1dd['push'](_0x455469);const _0xc5a5f6=_0x3a1dd[_0x47a121(0x14d)](_0x4056b7=>_0x4056b7[_0x47a121(0x13b)]())['filter'](_0x3fc5bf=>{const _0x46008d=stripSqlComments(_0x3fc5bf);return _0x46008d['length']>0x0;});if(_0xc5a5f6['length']===0x0)throw new Error(_0x47a121(0x148));return _0xc5a5f6;}export function readFileContent(_0x241702){const _0x2d7f9b=a100_0x5f0f;try{return readFileSync(_0x241702,'utf-8');}catch(_0xe08348){const _0x1385ba=_0xe08348['code'];if(_0x1385ba===_0x2d7f9b(0x14b))throw new Error('File\x20\x27'+_0x241702+_0x2d7f9b(0x139));else{if(_0x1385ba==='EACCES')throw new Error(_0x2d7f9b(0x146)+_0x241702+'\x27');else throw new Error(_0x2d7f9b(0x133)+_0x241702+'\x27:\x20'+_0xe08348[_0x2d7f9b(0x142)]);}}}export function readSqlStatementsFromFile(_0x12420c){const _0x580c66=a100_0x5f0f,_0x20f104=readFileContent(_0x12420c);try{return splitSqlStatements(_0x20f104);}catch(_0x2a768d){throw new Error(_0x580c66(0x136)+_0x12420c+'\x27\x20'+_0x2a768d[_0x580c66(0x142)][_0x580c66(0x143)]());}}export async function readStdinContent(){const _0x177029=a100_0x5f0f;if(process[_0x177029(0x13f)]['isTTY'])throw new Error(_0x177029(0x140));return new Promise((_0x183e9c,_0x5dd1aa)=>{const _0x55b9b4=_0x177029,_0x5c22dc=[],_0x23de90=createInterface({'input':process[_0x55b9b4(0x13f)],'terminal':![]});_0x23de90['on'](_0x55b9b4(0x144),_0x1a73de=>{const _0x3d8ba6=_0x55b9b4;_0x5c22dc[_0x3d8ba6(0x147)](_0x1a73de);}),_0x23de90['on'](_0x55b9b4(0x13a),()=>{const _0x13822f=_0x55b9b4;_0x183e9c(_0x5c22dc[_0x13822f(0x137)]('\x0a'));}),_0x23de90['on']('error',_0x116814=>{const _0x1f6a37=_0x55b9b4;_0x23de90[_0x1f6a37(0x13a)](),_0x5dd1aa(new Error(_0x1f6a37(0x138)+_0x116814[_0x1f6a37(0x142)]));});});}function a100_0x3367(){const _0x28df87=['stdin\x20','stdin','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','2569iztJpy','message','toLowerCase','line','length','Permission\x20denied\x20reading\x20file\x20\x27','push','Content\x20contains\x20no\x20SQL\x20statements','188151vNlETe','212708OtgtcM','ENOENT','652620qtEqfN','map','replace','Error\x20reading\x20file\x20\x27','774384qEVmRF','293525avTEIV','File\x20\x27','join','Error\x20reading\x20from\x20stdin:\x20','\x27\x20not\x20found','close','trim','6vegfaM','147544FtBhoF'];a100_0x3367=function(){return _0x28df87;};return a100_0x3367();}export async function readSqlStatementsFromStdin(){const _0x29ca24=a100_0x5f0f,_0x3d3f76=await readStdinContent();try{return splitSqlStatements(_0x3d3f76);}catch(_0x34e32f){throw new Error(_0x29ca24(0x13e)+_0x34e32f['message'][_0x29ca24(0x143)]());}}export function isSqlFilePath(_0x45e52b){return/\w\.sql$/['test'](_0x45e52b);}
@@ -1 +1 @@
1
- const a101_0x2f7dc4=a101_0x185f;(function(_0x101857,_0x2dbac6){const _0x3f3cf2=a101_0x185f,_0x3d29fb=_0x101857();while(!![]){try{const _0xcee18=parseInt(_0x3f3cf2(0x13c))/0x1+-parseInt(_0x3f3cf2(0x166))/0x2*(-parseInt(_0x3f3cf2(0x167))/0x3)+parseInt(_0x3f3cf2(0x159))/0x4+-parseInt(_0x3f3cf2(0x150))/0x5*(-parseInt(_0x3f3cf2(0x13e))/0x6)+parseInt(_0x3f3cf2(0x14b))/0x7+parseInt(_0x3f3cf2(0x141))/0x8*(-parseInt(_0x3f3cf2(0x163))/0x9)+-parseInt(_0x3f3cf2(0x140))/0xa;if(_0xcee18===_0x2dbac6)break;else _0x3d29fb['push'](_0x3d29fb['shift']());}catch(_0x14fd48){_0x3d29fb['push'](_0x3d29fb['shift']());}}}(a101_0x2033,0xbb5a9));import{TDApiClient}from'./client/td-api-client.js';function a101_0x2033(){const _0x30a262=['Type\x20is\x20required','database','\x20UTC','num\x20must\x20be\x20between\x201\x20and\x2010','created_at','updated_at','history','5151447KeFYqy','listSchedules','NOT_FOUND','\x5c$&','name','157770sUixaN','start_at','INVALID_ARGUMENT','create','delete','find','pagination','updateSchedule','map','3261012wPwYMY','now','client','Database\x20is\x20required','replace','getTime','length','type','time','scheduled','4196601AYVYYN','limit','has_next_page','34478lEGWVs','186oBgWPd','slice','queries','test','filter','deleteSchedule','push','runSchedule','string','Schedule\x20name\x20is\x20required','getScheduleHistory','query','createSchedule','1403280DmOhHs','show','36OSeFwW','listQueries','29789060SspSuJ','8TDEgvs','num','run'];a101_0x2033=function(){return _0x30a262;};return a101_0x2033();}import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x3c307e){const _0x39712f=a101_0x185f;if(!_0x3c307e)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x39712f(0x132)](_0x3c307e))return _0x3c307e;return _0x3c307e['replace'](_0x39712f(0x146),'Z')['replace']('\x20','T');}function a101_0x185f(_0x5238e9,_0x51b9d0){_0x5238e9=_0x5238e9-0x132;const _0x2033a9=a101_0x2033();let _0x185ffa=_0x2033a9[_0x5238e9];return _0x185ffa;}export class ScheduleSDK{[a101_0x2f7dc4(0x15b)];constructor(_0x40c76f){this['client']=new TDApiClient(_0x40c76f);}async['list'](_0x5686ec){const _0x55f284=a101_0x2f7dc4,_0x1e3203=await this[_0x55f284(0x15b)][_0x55f284(0x14c)](),_0x208d6b=_0x1e3203[_0x55f284(0x158)](_0x551859=>({..._0x551859,'created_at':normalizeTimestamp(_0x551859[_0x55f284(0x148)])??_0x551859[_0x55f284(0x148)]}));if(_0x5686ec?.[_0x55f284(0x164)]&&_0x5686ec['limit']>0x0)return _0x208d6b[_0x55f284(0x168)](0x0,_0x5686ec[_0x55f284(0x164)]);return _0x208d6b;}async[a101_0x2f7dc4(0x13f)](_0x574e3d){const _0x5b1d04=a101_0x2f7dc4,_0x55cd92=0x64,_0x1b1f61=_0x574e3d?.[_0x5b1d04(0x164)],_0x44270a=[];let _0x377e81=!![],_0x1ef7b5,_0x3d74c4,_0x4717c2;if(_0x574e3d?.['pattern']){const _0x8fb19b=_0x574e3d['pattern'][_0x5b1d04(0x15d)](/[.+^${}()|[\]\\]/g,_0x5b1d04(0x14e)),_0x4f709a=_0x8fb19b[_0x5b1d04(0x15d)](/\*/g,'.*')['replace'](/\?/g,'.');_0x4717c2=new RegExp('^'+_0x4f709a+'$','i');}while(_0x377e81&&(!_0x1b1f61||_0x44270a[_0x5b1d04(0x15f)]<_0x1b1f61)){const _0x3ee0da=await this['client']['listQueries']({'anchor_column':_0x5b1d04(0x149),'sort_direction':'desc','page_size':_0x55cd92,'anchor_id':_0x1ef7b5,'anchor_value':_0x3d74c4});let _0x3856c7=_0x3ee0da[_0x5b1d04(0x169)];_0x574e3d?.[_0x5b1d04(0x162)]&&(_0x3856c7=_0x3856c7[_0x5b1d04(0x133)](_0x385482=>_0x385482['cron']!==null));_0x4717c2&&(_0x3856c7=_0x3856c7[_0x5b1d04(0x133)](_0x2ef0e6=>_0x2ef0e6[_0x5b1d04(0x14f)]&&_0x4717c2[_0x5b1d04(0x132)](_0x2ef0e6[_0x5b1d04(0x14f)])));_0x44270a[_0x5b1d04(0x135)](..._0x3856c7),_0x377e81=_0x3ee0da[_0x5b1d04(0x156)][_0x5b1d04(0x165)];if(_0x377e81&&_0x3ee0da[_0x5b1d04(0x169)][_0x5b1d04(0x15f)]>0x0){const _0xdbe059=_0x3ee0da[_0x5b1d04(0x169)][_0x3ee0da[_0x5b1d04(0x169)]['length']-0x1];_0x1ef7b5=_0xdbe059['id'],_0x3d74c4=_0xdbe059[_0x5b1d04(0x149)];}}const _0x4a8216=_0x1b1f61?_0x44270a[_0x5b1d04(0x168)](0x0,_0x1b1f61):_0x44270a;return{'queries':_0x4a8216,'pagination':{'has_next_page':_0x377e81||(_0x1b1f61?_0x44270a[_0x5b1d04(0x15f)]>_0x1b1f61:![])}};}async[a101_0x2f7dc4(0x13d)](_0x33647a){const _0x26f850=a101_0x2f7dc4,_0x26b750=await this[_0x26f850(0x15b)][_0x26f850(0x14c)](),_0x914649=_0x26b750[_0x26f850(0x155)](_0x1f5bfe=>_0x1f5bfe[_0x26f850(0x14f)]===_0x33647a);if(!_0x914649)throw new SDKError(ErrorCode[_0x26f850(0x14d)],'Schedule\x20not\x20found:\x20'+_0x33647a);return{..._0x914649,'created_at':normalizeTimestamp(_0x914649[_0x26f850(0x148)])??_0x914649[_0x26f850(0x148)]};}async[a101_0x2f7dc4(0x153)](_0x4b01f9,_0x1ac0f6){const _0x359cbd=a101_0x2f7dc4;if(!_0x4b01f9)throw new SDKError(ErrorCode[_0x359cbd(0x152)],_0x359cbd(0x138));if(!_0x1ac0f6[_0x359cbd(0x145)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x359cbd(0x15c));if(!_0x1ac0f6[_0x359cbd(0x13a)])throw new SDKError(ErrorCode[_0x359cbd(0x152)],'Query\x20is\x20required');if(!_0x1ac0f6[_0x359cbd(0x160)])throw new SDKError(ErrorCode[_0x359cbd(0x152)],_0x359cbd(0x144));return await this[_0x359cbd(0x15b)][_0x359cbd(0x13b)](_0x4b01f9,_0x1ac0f6);}async['update'](_0x325375,_0xd997b3){const _0x9d463f=a101_0x2f7dc4;if(!_0x325375)throw new SDKError(ErrorCode[_0x9d463f(0x152)],_0x9d463f(0x138));return await this['client'][_0x9d463f(0x157)](_0x325375,_0xd997b3);}async[a101_0x2f7dc4(0x154)](_0x3a1dc9){const _0x20b11b=a101_0x2f7dc4;if(!_0x3a1dc9)throw new SDKError(ErrorCode[_0x20b11b(0x152)],_0x20b11b(0x138));return await this[_0x20b11b(0x15b)][_0x20b11b(0x134)](_0x3a1dc9);}async[a101_0x2f7dc4(0x143)](_0x162165,_0x4be066){const _0xb6a070=a101_0x2f7dc4;if(!_0x162165)throw new SDKError(ErrorCode[_0xb6a070(0x152)],'Schedule\x20name\x20is\x20required');let _0x4b43ba;if(_0x4be066?.[_0xb6a070(0x161)]){const _0xedfd50=typeof _0x4be066['time']===_0xb6a070(0x137)?new Date(_0x4be066[_0xb6a070(0x161)]):_0x4be066['time'];if(isNaN(_0xedfd50['getTime']()))throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Invalid\x20time\x20format:\x20'+_0x4be066[_0xb6a070(0x161)]);_0x4b43ba=Math['floor'](_0xedfd50[_0xb6a070(0x15e)]()/0x3e8);}else _0x4b43ba=Math['floor'](Date[_0xb6a070(0x15a)]()/0x3e8);if(_0x4be066?.[_0xb6a070(0x142)]!==undefined){if(_0x4be066['num']<0x1||_0x4be066[_0xb6a070(0x142)]>0xa)throw new SDKError(ErrorCode[_0xb6a070(0x152)],_0xb6a070(0x147));}return await this['client'][_0xb6a070(0x136)](_0x162165,_0x4b43ba,_0x4be066?.[_0xb6a070(0x142)]);}async[a101_0x2f7dc4(0x14a)](_0x5cb7d7,_0x5cbe39){const _0x665c11=a101_0x2f7dc4;if(!_0x5cb7d7)throw new SDKError(ErrorCode[_0x665c11(0x152)],_0x665c11(0x138));const _0x6ba3c7=await this['client'][_0x665c11(0x139)](_0x5cb7d7,_0x5cbe39);return{..._0x6ba3c7,'history':_0x6ba3c7[_0x665c11(0x14a)][_0x665c11(0x158)](_0x1a1e1f=>({..._0x1a1e1f,'created_at':normalizeTimestamp(_0x1a1e1f[_0x665c11(0x148)]),'start_at':normalizeTimestamp(_0x1a1e1f[_0x665c11(0x151)]),'end_at':normalizeTimestamp(_0x1a1e1f['end_at'])}))};}}
1
+ function a101_0x440d(_0x20255c,_0x37d701){_0x20255c=_0x20255c-0x1b1;const _0x2daa0f=a101_0x2daa();let _0x440d6c=_0x2daa0f[_0x20255c];return _0x440d6c;}const a101_0x591d50=a101_0x440d;(function(_0x4c5b9a,_0x22591e){const _0x28bc3f=a101_0x440d,_0x2e9469=_0x4c5b9a();while(!![]){try{const _0x33b137=parseInt(_0x28bc3f(0x1c7))/0x1*(-parseInt(_0x28bc3f(0x1e0))/0x2)+-parseInt(_0x28bc3f(0x1ce))/0x3*(-parseInt(_0x28bc3f(0x1be))/0x4)+-parseInt(_0x28bc3f(0x1b7))/0x5*(parseInt(_0x28bc3f(0x1bc))/0x6)+parseInt(_0x28bc3f(0x1b4))/0x7+parseInt(_0x28bc3f(0x1bf))/0x8+parseInt(_0x28bc3f(0x1cf))/0x9*(parseInt(_0x28bc3f(0x1bb))/0xa)+parseInt(_0x28bc3f(0x1e2))/0xb*(-parseInt(_0x28bc3f(0x1da))/0xc);if(_0x33b137===_0x22591e)break;else _0x2e9469['push'](_0x2e9469['shift']());}catch(_0x513e90){_0x2e9469['push'](_0x2e9469['shift']());}}}(a101_0x2daa,0x41556));import{TDApiClient}from'./client/td-api-client.js';function a101_0x2daa(){const _0x58abcb=['pattern','update','94wTZsTz','find','48697QfgSTP','NOT_FOUND','INVALID_ARGUMENT','getTime','listQueries','listSchedules','client','replace','length','run','Schedule\x20name\x20is\x20required','queries','1302014IoKiAQ','now','map','95750lcqavT','\x20UTC','updateSchedule','Query\x20is\x20required','6170QBZKcT','18gmfcPs','delete','4KBxTSC','845624VCPaTQ','slice','limit','has_next_page','name','created_at','history','query','5807JFUoSQ','test','floor','Schedule\x20not\x20found:\x20','\x5c$&','list','string','1436247jnpKVT','2844nphWpT','num','time','filter','Type\x20is\x20required','end_at','push','Database\x20is\x20required','updated_at','create','pagination','996BCXiAw','runSchedule','cron','type'];a101_0x2daa=function(){return _0x58abcb;};return a101_0x2daa();}import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x2d39cd){const _0x3c3bae=a101_0x440d;if(!_0x2d39cd)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x3c3bae(0x1c8)](_0x2d39cd))return _0x2d39cd;return _0x2d39cd[_0x3c3bae(0x1e9)](_0x3c3bae(0x1b8),'Z')[_0x3c3bae(0x1e9)]('\x20','T');}export class ScheduleSDK{['client'];constructor(_0x3eb81a){const _0x3c2996=a101_0x440d;this[_0x3c2996(0x1e8)]=new TDApiClient(_0x3eb81a);}async[a101_0x591d50(0x1cc)](_0x37ec24){const _0x4b122e=a101_0x591d50,_0x1d6dd8=await this[_0x4b122e(0x1e8)][_0x4b122e(0x1e7)](),_0x143cfa=_0x1d6dd8[_0x4b122e(0x1b6)](_0x3a4e35=>({..._0x3a4e35,'created_at':normalizeTimestamp(_0x3a4e35[_0x4b122e(0x1c4)])??_0x3a4e35[_0x4b122e(0x1c4)]}));if(_0x37ec24?.['limit']&&_0x37ec24[_0x4b122e(0x1c1)]>0x0)return _0x143cfa['slice'](0x0,_0x37ec24['limit']);return _0x143cfa;}async['listQueries'](_0x50b2cb){const _0x35ca6d=a101_0x591d50,_0x24253f=0x64,_0x488830=_0x50b2cb?.[_0x35ca6d(0x1c1)],_0x3f8e40=[];let _0x1b0281=!![],_0x3656cc,_0x2e4008,_0x8670b;if(_0x50b2cb?.[_0x35ca6d(0x1de)]){const _0x5356b5=_0x50b2cb[_0x35ca6d(0x1de)]['replace'](/[.+^${}()|[\]\\]/g,_0x35ca6d(0x1cb)),_0x621706=_0x5356b5['replace'](/\*/g,'.*')[_0x35ca6d(0x1e9)](/\?/g,'.');_0x8670b=new RegExp('^'+_0x621706+'$','i');}while(_0x1b0281&&(!_0x488830||_0x3f8e40[_0x35ca6d(0x1ea)]<_0x488830)){const _0x20ad16=await this[_0x35ca6d(0x1e8)][_0x35ca6d(0x1e6)]({'anchor_column':_0x35ca6d(0x1d7),'sort_direction':'desc','page_size':_0x24253f,'anchor_id':_0x3656cc,'anchor_value':_0x2e4008});let _0xc9f33c=_0x20ad16[_0x35ca6d(0x1b3)];_0x50b2cb?.['scheduled']&&(_0xc9f33c=_0xc9f33c['filter'](_0x31fbe7=>_0x31fbe7[_0x35ca6d(0x1dc)]!==null));_0x8670b&&(_0xc9f33c=_0xc9f33c[_0x35ca6d(0x1d2)](_0x58dcbf=>_0x58dcbf[_0x35ca6d(0x1c3)]&&_0x8670b[_0x35ca6d(0x1c8)](_0x58dcbf['name'])));_0x3f8e40[_0x35ca6d(0x1d5)](..._0xc9f33c),_0x1b0281=_0x20ad16[_0x35ca6d(0x1d9)][_0x35ca6d(0x1c2)];if(_0x1b0281&&_0x20ad16['queries'][_0x35ca6d(0x1ea)]>0x0){const _0x45e771=_0x20ad16[_0x35ca6d(0x1b3)][_0x20ad16['queries'][_0x35ca6d(0x1ea)]-0x1];_0x3656cc=_0x45e771['id'],_0x2e4008=_0x45e771['updated_at'];}}const _0x506704=_0x488830?_0x3f8e40[_0x35ca6d(0x1c0)](0x0,_0x488830):_0x3f8e40;return{'queries':_0x506704,'pagination':{'has_next_page':_0x1b0281||(_0x488830?_0x3f8e40[_0x35ca6d(0x1ea)]>_0x488830:![])}};}async['show'](_0x358e71){const _0x2aedea=a101_0x591d50,_0x667dc0=await this[_0x2aedea(0x1e8)][_0x2aedea(0x1e7)](),_0x2c388c=_0x667dc0[_0x2aedea(0x1e1)](_0x42a030=>_0x42a030['name']===_0x358e71);if(!_0x2c388c)throw new SDKError(ErrorCode[_0x2aedea(0x1e3)],_0x2aedea(0x1ca)+_0x358e71);return{..._0x2c388c,'created_at':normalizeTimestamp(_0x2c388c['created_at'])??_0x2c388c[_0x2aedea(0x1c4)]};}async[a101_0x591d50(0x1d8)](_0x17c7d3,_0x473465){const _0x35dbc7=a101_0x591d50;if(!_0x17c7d3)throw new SDKError(ErrorCode[_0x35dbc7(0x1e4)],_0x35dbc7(0x1b2));if(!_0x473465['database'])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x35dbc7(0x1d6));if(!_0x473465[_0x35dbc7(0x1c6)])throw new SDKError(ErrorCode[_0x35dbc7(0x1e4)],_0x35dbc7(0x1ba));if(!_0x473465[_0x35dbc7(0x1dd)])throw new SDKError(ErrorCode[_0x35dbc7(0x1e4)],_0x35dbc7(0x1d3));return await this[_0x35dbc7(0x1e8)]['createSchedule'](_0x17c7d3,_0x473465);}async[a101_0x591d50(0x1df)](_0x809308,_0x1200bf){const _0x5e44de=a101_0x591d50;if(!_0x809308)throw new SDKError(ErrorCode[_0x5e44de(0x1e4)],_0x5e44de(0x1b2));return await this[_0x5e44de(0x1e8)][_0x5e44de(0x1b9)](_0x809308,_0x1200bf);}async[a101_0x591d50(0x1bd)](_0x314d3d){const _0x3280df=a101_0x591d50;if(!_0x314d3d)throw new SDKError(ErrorCode[_0x3280df(0x1e4)],'Schedule\x20name\x20is\x20required');return await this[_0x3280df(0x1e8)]['deleteSchedule'](_0x314d3d);}async[a101_0x591d50(0x1b1)](_0x317e0f,_0x2417ba){const _0x118411=a101_0x591d50;if(!_0x317e0f)throw new SDKError(ErrorCode[_0x118411(0x1e4)],_0x118411(0x1b2));let _0x44a8d7;if(_0x2417ba?.[_0x118411(0x1d1)]){const _0x25e471=typeof _0x2417ba[_0x118411(0x1d1)]===_0x118411(0x1cd)?new Date(_0x2417ba[_0x118411(0x1d1)]):_0x2417ba[_0x118411(0x1d1)];if(isNaN(_0x25e471[_0x118411(0x1e5)]()))throw new SDKError(ErrorCode[_0x118411(0x1e4)],'Invalid\x20time\x20format:\x20'+_0x2417ba['time']);_0x44a8d7=Math[_0x118411(0x1c9)](_0x25e471[_0x118411(0x1e5)]()/0x3e8);}else _0x44a8d7=Math['floor'](Date[_0x118411(0x1b5)]()/0x3e8);if(_0x2417ba?.[_0x118411(0x1d0)]!==undefined){if(_0x2417ba[_0x118411(0x1d0)]<0x1||_0x2417ba['num']>0xa)throw new SDKError(ErrorCode[_0x118411(0x1e4)],'num\x20must\x20be\x20between\x201\x20and\x2010');}return await this[_0x118411(0x1e8)][_0x118411(0x1db)](_0x317e0f,_0x44a8d7,_0x2417ba?.[_0x118411(0x1d0)]);}async[a101_0x591d50(0x1c5)](_0x345f07,_0x47af8d){const _0xa405b6=a101_0x591d50;if(!_0x345f07)throw new SDKError(ErrorCode[_0xa405b6(0x1e4)],_0xa405b6(0x1b2));const _0x58b1c4=await this['client']['getScheduleHistory'](_0x345f07,_0x47af8d);return{..._0x58b1c4,'history':_0x58b1c4[_0xa405b6(0x1c5)][_0xa405b6(0x1b6)](_0x551fac=>({..._0x551fac,'created_at':normalizeTimestamp(_0x551fac[_0xa405b6(0x1c4)]),'start_at':normalizeTimestamp(_0x551fac['start_at']),'end_at':normalizeTimestamp(_0x551fac[_0xa405b6(0x1d4)])}))};}}
@@ -1 +1 @@
1
- const a102_0x46222a=a102_0x57cc;(function(_0x52a2f7,_0x40252a){const _0x5bc611=a102_0x57cc,_0x4bc50c=_0x52a2f7();while(!![]){try{const _0x2014ff=parseInt(_0x5bc611(0x121))/0x1+-parseInt(_0x5bc611(0xdd))/0x2+parseInt(_0x5bc611(0xdb))/0x3*(-parseInt(_0x5bc611(0xf4))/0x4)+parseInt(_0x5bc611(0xaf))/0x5*(-parseInt(_0x5bc611(0xdf))/0x6)+-parseInt(_0x5bc611(0x10d))/0x7*(parseInt(_0x5bc611(0xd3))/0x8)+parseInt(_0x5bc611(0xc5))/0x9*(parseInt(_0x5bc611(0xc9))/0xa)+parseInt(_0x5bc611(0x9f))/0xb;if(_0x2014ff===_0x40252a)break;else _0x4bc50c['push'](_0x4bc50c['shift']());}catch(_0x5ad9b8){_0x4bc50c['push'](_0x4bc50c['shift']());}}}(a102_0x47f5,0x53e4d));function a102_0x47f5(){const _0xdf65cc=['ruleHashToName','from','push','repeat_sub_frequency','stringify','test','not','valid','realtime','parse','CONNECTOR_SCHEMA_NOT_FOUND','source','connector_config','visible','rule','74020uerOYI','conditions','resolveSegmentName','startAt','timezone','connection','notify_on','segmentFolderId','set','Equal','\x27:\x20','usedNames','has','every','activationTemplateId','get','rightValue','limit','start_at','CONNECTION_NOT_FOUND','order_by','emailRecipients','allColumns','joinStrategy','And','9345ZlRuLM','rule:','JOURNEY_SYNTAX_ERROR','\x0a\x0aAvailable\x20fields:\x0a','joinRow','\x22:\x0a','kind','join_strategy','CONNECTOR_INVALID_CONFIG','repeatUnit','__SEGMENT_REF__','type','repeat_frequency','attribute_name','filter','visibility','repeatSubFrequency','values','value','formatting','224062mXSpsG','attribute','Reference','segment','groupingColumns','YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20','all_columns','email_recipients','join_row','null','isArray','aggregation','folder','object','New\x20Segment','connectionId','connectionNameToTypeMap','5438510TcQFOq','code','behavior_table','string','activations','getSchema','connector_config\x20for\x20activation\x20\x22','].attribute\x20cannot\x20be\x20empty.\x0a','Unknown\x20email\x20recipient:\x20','YAML\x20config\x20missing\x20required\x20field:\x20name','funnel_stage','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','arrayMatching','add','warnings','373855kGgbqk','Unknown\x20connection:\x20','map','forEach','orderBy','rightValues','emailToIdMap','length','exclude','columns','warn','Value','Segment\x20description','endOn','scheduleType','leftValue','unit','duration','attributes','connectorConfig','__UNRESOLVED__','activationParams','9jRdmwW','isVisible','max','activation_template_id','4417570TeYdRX','any','notification','end_on','keys','Connector:\x20','replace','description','sort','include','2704LUfeBI','operator','behavior','repeatFrequency','repeat_unit','batch','name','behaviorTableName','6rjMOdM','syndicationBehavior','507178vrPRod','notifyOn','6UfRBnw','schedule','Please\x20specify\x20a\x20valid\x20attribute\x20name.','localeCompare','all','errors'];a102_0x47f5=function(){return _0xdf65cc;};return a102_0x47f5();}import*as a102_0x326e79 from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x273dcf,_0x463d7d){const _0x113052=a102_0x57cc,_0x9493b=_0x273dcf[_0x113052(0xf3)]&&_0x113052(0x118)in _0x273dcf[_0x113052(0xf3)]&&_0x273dcf['rule'][_0x113052(0x118)];return{'type':_0x113052(0x124),'name':_0x273dcf[_0x113052(0xd9)],..._0x273dcf[_0x113052(0xd0)]&&{'description':_0x273dcf[_0x113052(0xd0)]},..._0x463d7d&&{'folder':_0x463d7d},..._0x9493b&&{'rule':apiRuleToYaml(_0x273dcf['rule'])},..._0x273dcf[_0x113052(0x113)]!==undefined&&{'kind':_0x273dcf[_0x113052(0x113)]===0x0?_0x113052(0xd8):_0x273dcf['kind']===0x1?_0x113052(0xed):_0x113052(0xa9)},..._0x273dcf[_0x113052(0xc6)]!==undefined&&{'visible':_0x273dcf[_0x113052(0xc6)]}};}export async function segmentResponseToDef(_0x3429b2,_0x426f70,_0x4950db){const _0x52a617=a102_0x57cc,_0x49a64a=segmentResponseToDefSync(_0x3429b2,_0x4950db);if(!_0x426f70||!_0x426f70[_0x52a617(0xf6)])return _0x49a64a;return _0x49a64a[_0x52a617(0xf3)]&&(_0x49a64a['rule']=await resolveRuleSegmentRefs(_0x49a64a[_0x52a617(0xf3)],_0x426f70[_0x52a617(0xf6)])),_0x49a64a;}export function apiRuleToYaml(_0xf5a68e){const _0x5c3b06=a102_0x57cc,_0x3b91e2=(_0xf5a68e['conditions']||[])['map'](apiConditionToYaml);if(_0x3b91e2[_0x5c3b06(0xb6)]===0x1&&!_0xf5a68e[_0x5c3b06(0xd0)]&&_0x5c3b06(0x118)in _0x3b91e2[0x0]&&(_0x3b91e2[0x0][_0x5c3b06(0x118)]===_0x5c3b06(0x10c)||_0x3b91e2[0x0][_0x5c3b06(0x118)]==='Or')){const _0x197035=_0x3b91e2[0x0];if(_0x197035['type']===_0xf5a68e[_0x5c3b06(0x118)]&&_0x197035[_0x5c3b06(0xf5)])return{'type':_0xf5a68e[_0x5c3b06(0x118)],'conditions':_0x197035[_0x5c3b06(0xf5)],..._0x197035['description']&&{'description':_0x197035[_0x5c3b06(0xd0)]}};}return{'type':_0xf5a68e[_0x5c3b06(0x118)],'conditions':_0x3b91e2,..._0xf5a68e[_0x5c3b06(0xd0)]&&{'description':_0xf5a68e['description']}};}export async function resolveRuleSegmentRefs(_0x5c2dbd,_0x5b24c4){const _0x2e4495=a102_0x57cc,_0x22f68f=await Promise[_0x2e4495(0xe3)](_0x5c2dbd[_0x2e4495(0xf5)][_0x2e4495(0xb1)](_0xe9d144=>resolveConditionSegmentRefs(_0xe9d144,_0x5b24c4)));return{..._0x5c2dbd,'conditions':_0x22f68f};}async function resolveConditionSegmentRefs(_0x556ebd,_0x187fdb){const _0x5ae2d9=a102_0x57cc;if(_0x5ae2d9(0x124)in _0x556ebd&&(_0x556ebd[_0x5ae2d9(0x118)]==='include'||_0x556ebd[_0x5ae2d9(0x118)]===_0x5ae2d9(0xb7))){const _0x4f12db=_0x556ebd;if(/^\d+$/[_0x5ae2d9(0xea)](_0x4f12db[_0x5ae2d9(0x124)])){const _0x1522f4=await _0x187fdb(_0x4f12db[_0x5ae2d9(0x124)]);return{..._0x4f12db,'segment':_0x1522f4};}return _0x556ebd;}if(_0x5ae2d9(0xf5)in _0x556ebd&&_0x556ebd[_0x5ae2d9(0xf5)]){const _0x49823b=_0x556ebd,_0x51ea94=await Promise['all'](_0x49823b[_0x5ae2d9(0xf5)][_0x5ae2d9(0xb1)](_0x3baef4=>resolveConditionSegmentRefs(_0x3baef4,_0x187fdb)));return{..._0x49823b,'conditions':_0x51ea94};}if('filter'in _0x556ebd&&_0x556ebd[_0x5ae2d9(0x11b)]){const _0x44d82a=_0x556ebd,_0x4c6e4a=await resolveRuleSegmentRefs(_0x44d82a[_0x5ae2d9(0x11b)],_0x187fdb);return{..._0x44d82a,'filter':_0x4c6e4a};}return _0x556ebd;}export async function resolveRuleSegmentIds(_0x3bbc9b,_0x36f000){const _0x1d9a06=a102_0x57cc,_0x24c6ed=await Promise['all'](_0x3bbc9b[_0x1d9a06(0xf5)][_0x1d9a06(0xb1)](_0x2c7f76=>resolveConditionSegmentIds(_0x2c7f76,_0x36f000)));return{..._0x3bbc9b,'conditions':_0x24c6ed};}async function resolveConditionSegmentIds(_0x5d54ab,_0x24045f){const _0x5d16f4=a102_0x57cc;if('segment'in _0x5d54ab&&(_0x5d54ab[_0x5d16f4(0x118)]===_0x5d16f4(0xd2)||_0x5d54ab['type']===_0x5d16f4(0xb7))){const _0x509d56=_0x5d54ab;if(!/^\d+$/['test'](_0x509d56[_0x5d16f4(0x124)])){const _0x2bbd57=await _0x24045f(_0x509d56[_0x5d16f4(0x124)]);return{..._0x509d56,'segment':_0x2bbd57};}return _0x5d54ab;}if('conditions'in _0x5d54ab&&_0x5d54ab['conditions']){const _0xdd819f=_0x5d54ab,_0x165e1c=await Promise[_0x5d16f4(0xe3)](_0xdd819f[_0x5d16f4(0xf5)]['map'](_0x118b88=>resolveConditionSegmentIds(_0x118b88,_0x24045f)));return{..._0xdd819f,'conditions':_0x165e1c};}if('filter'in _0x5d54ab&&_0x5d54ab[_0x5d16f4(0x11b)]){const _0x4e2210=_0x5d54ab,_0x55da5d=await resolveRuleSegmentIds(_0x4e2210[_0x5d16f4(0x11b)],_0x24045f);return{..._0x4e2210,'filter':_0x55da5d};}return _0x5d54ab;}function apiConditionToYaml(_0x2426e7){const _0x36d891=a102_0x57cc;if(_0x2426e7['type']===_0x36d891(0x10c)||_0x2426e7['type']==='Or'){if(_0x2426e7[_0x36d891(0xf5)]){const _0x56f4fc=_0x2426e7[_0x36d891(0xf5)][_0x36d891(0xb1)](apiConditionToYaml);if(_0x56f4fc['length']===0x1&&!_0x2426e7[_0x36d891(0xd0)])return _0x56f4fc[0x0];return{'type':_0x2426e7[_0x36d891(0x118)],'conditions':_0x56f4fc,..._0x2426e7[_0x36d891(0xd0)]&&{'description':_0x2426e7[_0x36d891(0xd0)]}};}}if(_0x2426e7['type']===_0x36d891(0xba)&&_0x2426e7[_0x36d891(0xbe)]&&_0x2426e7['operator']){const _0x2f22=_0x2426e7[_0x36d891(0xbe)][_0x36d891(0x99)]?{'type':_0x2426e7['leftValue']['aggregation']['type'],..._0x2426e7[_0x36d891(0xbe)]['aggregation'][_0x36d891(0x92)]&&{'groupingColumns':_0x2426e7['leftValue'][_0x36d891(0x99)][_0x36d891(0x92)]}}:undefined;return{'type':_0x36d891(0xba),'attribute':_0x2426e7[_0x36d891(0xbe)]['name']||'','operator':apiOperatorToYaml(_0x2426e7[_0x36d891(0xd4)]),..._0x2426e7[_0x36d891(0xac)]&&_0x2426e7['arrayMatching']!==_0x36d891(0xca)?{'arrayMatching':_0x2426e7['arrayMatching']}:{},..._0x2426e7[_0x36d891(0xb7)]?{'exclude':_0x2426e7['exclude']}:{},..._0x2f22?{'aggregation':_0x2f22}:{},..._0x2426e7[_0x36d891(0xbe)][_0x36d891(0xf0)]?{'source':_0x2426e7[_0x36d891(0xbe)][_0x36d891(0xf0)][_0x36d891(0xd9)]}:{},..._0x2426e7['leftValue'][_0x36d891(0x11b)]?{'filter':apiRuleToYaml(_0x2426e7['leftValue'][_0x36d891(0x11b)])}:{},..._0x2426e7[_0x36d891(0x105)]!==undefined&&_0x2426e7[_0x36d891(0x105)]!==null?{'limit':_0x2426e7[_0x36d891(0x105)]}:{}};}if(_0x2426e7[_0x36d891(0x118)]===_0x36d891(0x123)&&_0x2426e7['id'])return{'type':_0x2426e7[_0x36d891(0xb7)]?'exclude':_0x36d891(0xd2),'segment':_0x2426e7['id']};return{'type':_0x36d891(0x10c),'conditions':[]};}function isTemporalOperator(_0x3a19a0){return _0x3a19a0==='TimeWithinPast'||_0x3a19a0==='TimeWithinNext';}function getEffectiveValue(_0x2f132a){const _0x30186c=a102_0x57cc,_0x35b72d=_0x2f132a[_0x30186c(0x11e)];return _0x2f132a[_0x30186c(0x11f)]??_0x35b72d;}function apiOperatorToYaml(_0x1701a4){const _0x101400=a102_0x57cc;let _0x1528ab;if(_0x1701a4[_0x101400(0xb4)]&&_0x1701a4[_0x101400(0xb4)][_0x101400(0xb6)]>0x0)_0x1528ab=_0x1701a4[_0x101400(0xb4)];else{if(_0x1701a4['rightValue']!==undefined)_0x1528ab=_0x1701a4[_0x101400(0x104)];else isTemporalOperator(_0x1701a4[_0x101400(0x118)])&&_0x1701a4[_0x101400(0x11f)]!==undefined&&(_0x1528ab=_0x1701a4[_0x101400(0x11f)]);}return{'type':mapApiOperatorType(_0x1701a4[_0x101400(0x118)]),..._0x1701a4['not']&&{'not':_0x1701a4[_0x101400(0xeb)]},..._0x1528ab!==undefined&&{'value':_0x1528ab},..._0x1701a4[_0x101400(0xbf)]&&{'unit':_0x1701a4[_0x101400(0xbf)]}};}function mapApiOperatorType(_0x191792){return _0x191792;}export function segmentDefToCreateRequest(_0x4c8055,_0x12e6ff){const _0xa44000=a102_0x57cc,_0x395ded={'name':_0x4c8055['name']};return _0x4c8055[_0xa44000(0xd0)]&&(_0x395ded[_0xa44000(0xd0)]=_0x4c8055[_0xa44000(0xd0)]),_0x4c8055[_0xa44000(0xf3)]&&(_0x395ded[_0xa44000(0xf3)]=yamlRuleToApi(_0x4c8055[_0xa44000(0xf3)])),_0x4c8055[_0xa44000(0x113)]&&(_0x395ded[_0xa44000(0x113)]=_0x4c8055[_0xa44000(0x113)]===_0xa44000(0xd8)?0x0:_0x4c8055['kind']===_0xa44000(0xed)?0x1:0x2),_0x4c8055[_0xa44000(0xf2)]!==undefined&&(_0x395ded[_0xa44000(0xc6)]=_0x4c8055['visible']),_0x12e6ff&&(_0x395ded[_0xa44000(0xfb)]=_0x12e6ff),_0x395ded;}export function segmentDefToUpdateRequest(_0x320e47){const _0x4fcc12=a102_0x57cc,_0x339c62={'name':_0x320e47[_0x4fcc12(0xd9)]};return _0x320e47['description']!==undefined&&(_0x339c62[_0x4fcc12(0xd0)]=_0x320e47[_0x4fcc12(0xd0)]),_0x320e47[_0x4fcc12(0xf3)]&&(_0x339c62[_0x4fcc12(0xf3)]=yamlRuleToApi(_0x320e47[_0x4fcc12(0xf3)])),_0x320e47['kind']&&(_0x339c62[_0x4fcc12(0x113)]=_0x320e47[_0x4fcc12(0x113)]===_0x4fcc12(0xd8)?0x0:_0x320e47[_0x4fcc12(0x113)]===_0x4fcc12(0xed)?0x1:0x2),_0x339c62;}export function yamlRuleToApi(_0x3f652c,_0x316310=![]){const _0x2ae649=a102_0x57cc,_0x118c72=_0x3f652c[_0x2ae649(0xf5)][_0x2ae649(0xb1)](yamlConditionToApi);if(_0x316310){const _0x4d89b2=_0x118c72[_0x2ae649(0x101)](_0x3e2ad5=>_0x3e2ad5['type']===_0x2ae649(0x10c)||_0x3e2ad5[_0x2ae649(0x118)]==='Or');if(!_0x4d89b2&&_0x118c72[_0x2ae649(0xb6)]>0x0)return{'type':_0x3f652c[_0x2ae649(0x118)],'conditions':[{'type':_0x2ae649(0x10c),'description':_0x3f652c['description']||'','conditions':_0x118c72}]};}return{'type':_0x3f652c[_0x2ae649(0x118)],'conditions':_0x118c72,..._0x3f652c['description']&&{'description':_0x3f652c[_0x2ae649(0xd0)]}};}function yamlConditionToApi(_0x4fa44d){const _0x2bfc21=a102_0x57cc;if(_0x2bfc21(0x124)in _0x4fa44d&&(_0x4fa44d[_0x2bfc21(0x118)]===_0x2bfc21(0xd2)||_0x4fa44d[_0x2bfc21(0x118)]===_0x2bfc21(0xb7))){const _0x4e3963=_0x4fa44d;return{'type':'Reference','id':_0x4e3963['segment'],'exclude':_0x4e3963[_0x2bfc21(0x118)]===_0x2bfc21(0xb7)};}if('type'in _0x4fa44d&&(_0x4fa44d['type']===_0x2bfc21(0x10c)||_0x4fa44d[_0x2bfc21(0x118)]==='Or')){const _0x50cabf=_0x4fa44d;return{'type':_0x50cabf[_0x2bfc21(0x118)],'conditions':_0x50cabf[_0x2bfc21(0xf5)]['map'](yamlConditionToApi),..._0x50cabf[_0x2bfc21(0xd0)]&&{'description':_0x50cabf[_0x2bfc21(0xd0)]}};}const _0x4ac65c=_0x4fa44d,_0x39a206={'type':'Value','leftValue':buildLeftValue(_0x4ac65c),'operator':yamlOperatorToApi(_0x4ac65c[_0x2bfc21(0xd4)]),'exclude':_0x4ac65c[_0x2bfc21(0xb7)]??![],'arrayMatching':_0x4ac65c['arrayMatching']??'any'};return _0x4ac65c[_0x2bfc21(0x105)]!==undefined&&(_0x39a206['limit']=_0x4ac65c[_0x2bfc21(0x105)]),_0x39a206;}function buildLeftValue(_0xc9cc70){const _0x2db24d=a102_0x57cc,_0x3929d6={'name':_0xc9cc70['attribute']};return _0xc9cc70[_0x2db24d(0x99)]&&(_0x3929d6['aggregation']={'type':_0xc9cc70[_0x2db24d(0x99)][_0x2db24d(0x118)],..._0xc9cc70[_0x2db24d(0x99)]['groupingColumns']&&{'groupingColumns':_0xc9cc70[_0x2db24d(0x99)][_0x2db24d(0x92)]}}),_0xc9cc70[_0x2db24d(0xf0)]&&(_0x3929d6[_0x2db24d(0xf0)]={'name':_0xc9cc70[_0x2db24d(0xf0)]}),_0xc9cc70[_0x2db24d(0x11b)]&&(_0x3929d6[_0x2db24d(0x11b)]=yamlRuleToApi(_0xc9cc70[_0x2db24d(0x11b)])),_0x3929d6;}function yamlOperatorToApi(_0x339773){const _0x22095a=a102_0x57cc,_0x109b63={'type':mapYamlOperatorType(_0x339773['type']),'not':_0x339773[_0x22095a(0xeb)]??![]},_0x2d82a7=getEffectiveValue(_0x339773);if(_0x2d82a7!==undefined){if(Array['isArray'](_0x2d82a7))_0x109b63[_0x22095a(0xb4)]=_0x2d82a7;else isTemporalOperator(_0x339773[_0x22095a(0x118)])?_0x109b63[_0x22095a(0x11f)]=_0x2d82a7:_0x109b63[_0x22095a(0x104)]=_0x2d82a7;}return _0x339773[_0x22095a(0xbf)]&&(_0x109b63[_0x22095a(0xbf)]=_0x339773[_0x22095a(0xbf)]),_0x109b63;}function mapYamlOperatorType(_0x5b5f1c){return _0x5b5f1c;}export function toYamlString(_0x5f1972){const _0x48c291=a102_0x57cc,_0x1baaee=JSON[_0x48c291(0xee)](JSON[_0x48c291(0xe9)](_0x5f1972)),_0x46dea8=a102_0x326e79[_0x48c291(0xe9)](_0x1baaee,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x48c291(0x97)}),_0x7dee4f=[_0x48c291(0x10e)];let _0x463c1c=_0x46dea8;for(const _0x34b87b of _0x7dee4f){_0x463c1c=_0x463c1c[_0x48c291(0xcf)](new RegExp('^('+_0x34b87b+')','m'),(_0x326430,_0x549eda,_0x9a67b5)=>{if(_0x9a67b5===0x0||_0x463c1c[_0x9a67b5-0x1]==='\x0a'&&_0x463c1c[_0x9a67b5-0x2]==='\x0a')return _0x549eda;return'\x0a'+_0x549eda;});}return _0x463c1c;}export function parseYamlString(_0x535c65){const _0x22a077=a102_0x57cc,_0x6bf5e1=a102_0x326e79[_0x22a077(0xee)](_0x535c65);if(!_0x6bf5e1[_0x22a077(0xd9)])throw new Error(_0x22a077(0xa8));if(_0x6bf5e1[_0x22a077(0x118)]&&_0x6bf5e1['type']!==_0x22a077(0x124))throw new Error(_0x22a077(0x93)+_0x6bf5e1[_0x22a077(0x118)]);return _0x6bf5e1;}export function isSegmentYaml(_0x4a40be){const _0xd50f28=a102_0x57cc;if(typeof _0x4a40be!==_0xd50f28(0x9b)||_0x4a40be===null)return![];const _0x4a402a=_0x4a40be;return _0x4a402a['type']===_0xd50f28(0x124)||_0x4a402a[_0xd50f28(0x118)]===undefined;}export function generateTemplate(_0x189799=a102_0x46222a(0x9c)){const _0x255ff5=a102_0x46222a,_0x5700a9={'type':_0x255ff5(0x124),'name':_0x189799,'description':_0x255ff5(0xbb),'rule':{'type':_0x255ff5(0x10c),'conditions':[{'type':'Value','attribute':_0x255ff5(0x11a),'operator':{'type':_0x255ff5(0xfd),'value':'value'}}]}};return toYamlString(_0x5700a9);}export function segmentToYamlString(_0x3e87ef){const _0x18199b=a102_0x46222a,_0xfc7a26=JSON['parse'](JSON['stringify'](_0x3e87ef)),_0xb0cf8a=a102_0x326e79['stringify'](_0xfc7a26,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x18199b(0x97)}),_0x367463=[_0x18199b(0x10e),'activations:'];let _0x5be010=_0xb0cf8a;for(const _0x142101 of _0x367463){_0x5be010=_0x5be010['replace'](new RegExp('^('+_0x142101+')','m'),(_0x449bb3,_0x3941c6,_0x1d0af7)=>{if(_0x1d0af7===0x0||_0x5be010[_0x1d0af7-0x1]==='\x0a'&&_0x5be010[_0x1d0af7-0x2]==='\x0a')return _0x3941c6;return'\x0a'+_0x3941c6;});}return _0x5be010;}export function parseSegmentYamlFile(_0x4c5717){const _0x7f3a23=a102_0x46222a,_0x4d9e9a=a102_0x326e79['parse'](_0x4c5717);if(!_0x4d9e9a[_0x7f3a23(0xd9)])throw new Error(_0x7f3a23(0xa8));return _0x4d9e9a;}export function normalizeChildSegmentYaml(_0x2f8106){const _0x33fc74=a102_0x46222a;return{'type':_0x33fc74(0x124),'name':_0x2f8106[_0x33fc74(0xd9)],..._0x2f8106[_0x33fc74(0xd0)]!==undefined&&{'description':_0x2f8106[_0x33fc74(0xd0)]},..._0x2f8106[_0x33fc74(0x9a)]!==undefined&&{'folder':_0x2f8106[_0x33fc74(0x9a)]},..._0x2f8106[_0x33fc74(0xf3)]&&{'rule':normalizeRule(_0x2f8106['rule'])},..._0x2f8106[_0x33fc74(0x113)]!==undefined&&{'kind':_0x2f8106[_0x33fc74(0x113)]},..._0x2f8106[_0x33fc74(0xf2)]!==undefined&&{'visible':_0x2f8106[_0x33fc74(0xf2)]},..._0x2f8106[_0x33fc74(0xa3)]&&{'activations':_0x2f8106[_0x33fc74(0xa3)]['map'](normalizeActivation)}};}export function normalizeRule(_0x339485){const _0x2d787a=a102_0x46222a;return{'type':_0x339485[_0x2d787a(0x118)],'conditions':_0x339485['conditions'][_0x2d787a(0xb1)](normalizeCondition),..._0x339485['description']!==undefined&&{'description':_0x339485[_0x2d787a(0xd0)]}};}function normalizeCondition(_0x5018e8){const _0x3938ef=a102_0x46222a;if('segment'in _0x5018e8&&(_0x5018e8[_0x3938ef(0x118)]===_0x3938ef(0xd2)||_0x5018e8[_0x3938ef(0x118)]===_0x3938ef(0xb7))){const _0x130769=_0x5018e8;return{'type':_0x130769[_0x3938ef(0x118)],'segment':_0x130769[_0x3938ef(0x124)]};}if(_0x3938ef(0x118)in _0x5018e8&&(_0x5018e8[_0x3938ef(0x118)]===_0x3938ef(0x10c)||_0x5018e8[_0x3938ef(0x118)]==='Or')){const _0x118253=_0x5018e8;return{'type':_0x118253[_0x3938ef(0x118)],'conditions':_0x118253['conditions'][_0x3938ef(0xb1)](normalizeCondition),..._0x118253[_0x3938ef(0xd0)]!==undefined&&{'description':_0x118253[_0x3938ef(0xd0)]}};}const _0x311064=_0x5018e8;return{'type':_0x3938ef(0xba),'attribute':_0x311064[_0x3938ef(0x122)],'operator':normalizeOperator(_0x311064[_0x3938ef(0xd4)]),..._0x311064[_0x3938ef(0xac)]!==undefined&&{'arrayMatching':_0x311064['arrayMatching']},..._0x311064[_0x3938ef(0xb7)]!==undefined&&{'exclude':_0x311064[_0x3938ef(0xb7)]},..._0x311064[_0x3938ef(0x99)]!==undefined&&{'aggregation':_0x311064[_0x3938ef(0x99)]},..._0x311064['source']!==undefined&&{'source':_0x311064[_0x3938ef(0xf0)]},..._0x311064[_0x3938ef(0x11b)]!==undefined&&{'filter':normalizeRule(_0x311064[_0x3938ef(0x11b)])},..._0x311064[_0x3938ef(0x105)]!==undefined&&{'limit':_0x311064[_0x3938ef(0x105)]}};}function normalizeOperator(_0x1424f1){const _0x17cb5b=a102_0x46222a,_0x182e38=getEffectiveValue(_0x1424f1);return{'type':_0x1424f1[_0x17cb5b(0x118)],..._0x1424f1[_0x17cb5b(0xeb)]!==undefined&&{'not':_0x1424f1[_0x17cb5b(0xeb)]},..._0x182e38!==undefined&&{'value':_0x182e38},..._0x1424f1['min']!==undefined&&{'min':_0x1424f1['min']},..._0x1424f1[_0x17cb5b(0xc7)]!==undefined&&{'max':_0x1424f1[_0x17cb5b(0xc7)]},..._0x1424f1['unit']!==undefined&&{'unit':_0x1424f1[_0x17cb5b(0xbf)]},..._0x1424f1[_0x17cb5b(0xc0)]!==undefined&&{'duration':_0x1424f1[_0x17cb5b(0xc0)]},..._0x1424f1[_0x17cb5b(0xe6)]!==undefined&&{'from':_0x1424f1[_0x17cb5b(0xe6)]}};}function normalizeActivation(_0x3805d8){const _0x1abe87=a102_0x46222a;return{'name':_0x3805d8[_0x1abe87(0xd9)],'connection':_0x3805d8[_0x1abe87(0xf9)],..._0x3805d8[_0x1abe87(0xd0)]!==undefined&&{'description':_0x3805d8[_0x1abe87(0xd0)]},..._0x3805d8[_0x1abe87(0x94)]!==undefined&&{'all_columns':_0x3805d8[_0x1abe87(0x94)]},..._0x3805d8[_0x1abe87(0xb8)]!==undefined&&{'columns':_0x3805d8['columns']},..._0x3805d8[_0x1abe87(0xd5)]!==undefined&&{'behavior':_0x3805d8[_0x1abe87(0xd5)]},..._0x3805d8[_0x1abe87(0xe0)]!==undefined&&{'schedule':_0x3805d8['schedule']},..._0x3805d8[_0x1abe87(0xcb)]!==undefined&&{'notification':_0x3805d8[_0x1abe87(0xcb)]},..._0x3805d8[_0x1abe87(0xf1)]!==undefined&&{'connector_config':_0x3805d8[_0x1abe87(0xf1)]},..._0x3805d8[_0x1abe87(0xc8)]!==undefined&&{'activation_template_id':_0x3805d8[_0x1abe87(0xc8)]}};}export function activationResponseToDef(_0x564ec7,_0x2fba4c,_0x46494d){const _0x2478ba=a102_0x46222a,_0x5f3db1=_0x564ec7[_0x2478ba(0x9d)]||'',_0x4972d7=_0x46494d?.[_0x2478ba(0x103)](_0x5f3db1)??_0x5f3db1,_0x3fb5a4={'name':_0x564ec7[_0x2478ba(0xd9)],'connection':_0x4972d7};_0x564ec7[_0x2478ba(0xd0)]&&(_0x3fb5a4[_0x2478ba(0xd0)]=_0x564ec7[_0x2478ba(0xd0)]);let _0xfa9bfb=[];_0x564ec7['columns']&&_0x564ec7[_0x2478ba(0xb8)][_0x2478ba(0xb6)]>0x0&&(_0xfa9bfb=_0x564ec7[_0x2478ba(0xb8)][_0x2478ba(0x11b)](_0x330bbc=>_0x330bbc&&_0x330bbc['name'])['map'](_0x3f6328=>{const _0x4b1b40=_0x2478ba;if(_0x3f6328['type']||_0x3f6328['visibility'])return{'name':_0x3f6328[_0x4b1b40(0xd9)],..._0x3f6328[_0x4b1b40(0x118)]&&{'type':_0x3f6328[_0x4b1b40(0x118)]},..._0x3f6328[_0x4b1b40(0x11c)]&&{'visibility':_0x3f6328[_0x4b1b40(0x11c)]}};return _0x3f6328['name'];}));_0xfa9bfb[_0x2478ba(0xb6)]>0x0&&(_0x3fb5a4[_0x2478ba(0xb8)]=_0xfa9bfb);_0x564ec7[_0x2478ba(0x10a)]!==undefined&&(_0x564ec7['allColumns']===![]&&_0xfa9bfb[_0x2478ba(0xb6)]===0x0?_0x3fb5a4['all_columns']=!![]:_0x3fb5a4[_0x2478ba(0x94)]=_0x564ec7['allColumns']);const _0x47508c={};let _0x26ded9=![];_0x564ec7[_0x2478ba(0xbd)]&&(_0x47508c[_0x2478ba(0x118)]=_0x564ec7['scheduleType'],_0x26ded9=!![]);_0x564ec7[_0x2478ba(0x116)]&&(_0x47508c[_0x2478ba(0xd7)]=_0x564ec7[_0x2478ba(0x116)],_0x26ded9=!![]);_0x564ec7[_0x2478ba(0xd6)]!==undefined&&_0x564ec7[_0x2478ba(0xd6)]!==null&&(_0x47508c[_0x2478ba(0x119)]=_0x564ec7['repeatFrequency'],_0x26ded9=!![]);_0x564ec7['repeatSubFrequency']&&_0x564ec7['repeatSubFrequency'][_0x2478ba(0xb6)]>0x0&&(_0x47508c['repeat_sub_frequency']=_0x564ec7[_0x2478ba(0x11d)],_0x26ded9=!![]);_0x564ec7[_0x2478ba(0xf7)]!==undefined&&(_0x47508c[_0x2478ba(0x106)]=_0x564ec7[_0x2478ba(0xf7)],_0x26ded9=!![]);_0x564ec7[_0x2478ba(0xbc)]!==undefined&&(_0x47508c[_0x2478ba(0xcc)]=_0x564ec7[_0x2478ba(0xbc)],_0x26ded9=!![]);_0x564ec7['timezone']&&(_0x47508c[_0x2478ba(0xf8)]=_0x564ec7[_0x2478ba(0xf8)],_0x26ded9=!![]);_0x26ded9&&(_0x3fb5a4['schedule']=_0x47508c);(_0x564ec7[_0x2478ba(0xde)]&&_0x564ec7['notifyOn']['length']>0x0||_0x564ec7[_0x2478ba(0x109)]&&_0x564ec7[_0x2478ba(0x109)][_0x2478ba(0xb6)]>0x0)&&(_0x3fb5a4[_0x2478ba(0xcb)]={},_0x564ec7[_0x2478ba(0xde)]&&_0x564ec7[_0x2478ba(0xde)][_0x2478ba(0xb6)]>0x0&&(_0x3fb5a4[_0x2478ba(0xcb)][_0x2478ba(0xfa)]=_0x564ec7[_0x2478ba(0xde)]),_0x564ec7['emailRecipients']&&_0x564ec7[_0x2478ba(0x109)][_0x2478ba(0xb6)]>0x0&&(_0x3fb5a4[_0x2478ba(0xcb)][_0x2478ba(0x95)]=_0x564ec7[_0x2478ba(0x109)][_0x2478ba(0xb1)](_0x18af92=>{const _0x1a6613=_0x2478ba,_0x1e41ae=_0x2fba4c?.[_0x1a6613(0x103)](_0x18af92);return _0x1e41ae??String(_0x18af92);})));_0x564ec7[_0x2478ba(0xc2)]&&Object[_0x2478ba(0xcd)](_0x564ec7[_0x2478ba(0xc2)])['length']>0x0&&(_0x3fb5a4[_0x2478ba(0xf1)]=normalizeConnectorConfigForYaml(_0x564ec7['connectorConfig']));_0x564ec7[_0x2478ba(0x102)]&&(_0x3fb5a4[_0x2478ba(0xc8)]=_0x564ec7[_0x2478ba(0x102)]);if(_0x564ec7['syndicationBehavior']){const _0x358de4={},_0x1e99ae=_0x564ec7['syndicationBehavior'];_0x1e99ae['columns']&&_0x1e99ae[_0x2478ba(0xb8)][_0x2478ba(0xb6)]>0x0&&(_0x358de4[_0x2478ba(0xb8)]=_0x1e99ae[_0x2478ba(0xb8)]['filter'](_0x382c4a=>_0x382c4a&&_0x382c4a[_0x2478ba(0xd9)])[_0x2478ba(0xb1)](_0x372f34=>({'name':_0x372f34[_0x2478ba(0xd9)],..._0x372f34[_0x2478ba(0x118)]&&{'type':_0x372f34[_0x2478ba(0x118)]},..._0x372f34['visibility']&&{'visibility':_0x372f34[_0x2478ba(0x11c)]}}))),_0x1e99ae[_0x2478ba(0xda)]&&(_0x358de4[_0x2478ba(0xa1)]=_0x1e99ae['behaviorTableName']),_0x1e99ae[_0x2478ba(0x111)]!==undefined&&(_0x358de4[_0x2478ba(0x96)]=_0x1e99ae['joinRow']),_0x1e99ae[_0x2478ba(0x10b)]&&(_0x358de4[_0x2478ba(0x114)]=_0x1e99ae[_0x2478ba(0x10b)]),_0x1e99ae[_0x2478ba(0x120)]&&(_0x358de4[_0x2478ba(0x120)]=_0x1e99ae[_0x2478ba(0x120)]),_0x1e99ae[_0x2478ba(0xb3)]&&_0x1e99ae[_0x2478ba(0xb3)][_0x2478ba(0xb6)]>0x0&&(_0x358de4[_0x2478ba(0x108)]=_0x1e99ae[_0x2478ba(0xb3)]),Object[_0x2478ba(0xcd)](_0x358de4)[_0x2478ba(0xb6)]>0x0&&(_0x3fb5a4['behavior']=_0x358de4);}return _0x3fb5a4;}export function journeyActivationStepToYaml(_0x322d50,_0x54a483,_0x193fc0){const _0xc9b5dc=a102_0x46222a,_0x2b668c=_0x322d50[_0xc9b5dc(0xc1)][_0xc9b5dc(0xc4)],_0x27fa19=_0x2b668c[_0xc9b5dc(0x9d)]||'',_0x1c14fc=_0x193fc0?.[_0xc9b5dc(0x103)](_0x27fa19)??_0x27fa19,_0x3f520c={'name':_0x2b668c['name']||'','connection':_0x1c14fc};_0x2b668c[_0xc9b5dc(0xd0)]&&(_0x3f520c[_0xc9b5dc(0xd0)]=_0x2b668c[_0xc9b5dc(0xd0)]);let _0x44330=[];_0x2b668c[_0xc9b5dc(0xb8)]&&_0x2b668c[_0xc9b5dc(0xb8)][_0xc9b5dc(0xb6)]>0x0&&(_0x44330=_0x2b668c[_0xc9b5dc(0xb8)]['filter'](_0x23be2d=>_0x23be2d&&_0x23be2d[_0xc9b5dc(0xd9)])[_0xc9b5dc(0xb1)](_0x2327dc=>{const _0x58a50f=_0xc9b5dc;if(_0x2327dc['type']||_0x2327dc[_0x58a50f(0x11c)])return{'name':_0x2327dc[_0x58a50f(0xd9)],..._0x2327dc[_0x58a50f(0x118)]&&{'type':_0x2327dc['type']},..._0x2327dc[_0x58a50f(0x11c)]&&{'visibility':_0x2327dc[_0x58a50f(0x11c)]}};return _0x2327dc[_0x58a50f(0xd9)];}));_0x44330[_0xc9b5dc(0xb6)]>0x0&&(_0x3f520c[_0xc9b5dc(0xb8)]=_0x44330);_0x2b668c['allColumns']!==undefined&&(_0x2b668c[_0xc9b5dc(0x10a)]===![]&&_0x44330[_0xc9b5dc(0xb6)]===0x0?_0x3f520c[_0xc9b5dc(0x94)]=!![]:_0x3f520c['all_columns']=_0x2b668c['allColumns']);const _0x46c069={};let _0x179b75=![];_0x2b668c['scheduleType']&&(_0x46c069[_0xc9b5dc(0x118)]=_0x2b668c[_0xc9b5dc(0xbd)],_0x179b75=!![]);_0x2b668c[_0xc9b5dc(0x116)]&&(_0x46c069[_0xc9b5dc(0xd7)]=_0x2b668c['repeatUnit'],_0x179b75=!![]);_0x2b668c[_0xc9b5dc(0xd6)]!==undefined&&_0x2b668c['repeatFrequency']!==null&&(_0x46c069[_0xc9b5dc(0x119)]=_0x2b668c[_0xc9b5dc(0xd6)],_0x179b75=!![]);_0x2b668c[_0xc9b5dc(0xf7)]!==undefined&&(_0x46c069[_0xc9b5dc(0x106)]=_0x2b668c[_0xc9b5dc(0xf7)],_0x179b75=!![]);_0x2b668c['endOn']!==undefined&&(_0x46c069[_0xc9b5dc(0xcc)]=_0x2b668c[_0xc9b5dc(0xbc)],_0x179b75=!![]);_0x2b668c['timezone']&&(_0x46c069[_0xc9b5dc(0xf8)]=_0x2b668c[_0xc9b5dc(0xf8)],_0x179b75=!![]);_0x179b75&&(_0x3f520c[_0xc9b5dc(0xe0)]=_0x46c069);(_0x2b668c['notifyOn']&&_0x2b668c[_0xc9b5dc(0xde)][_0xc9b5dc(0xb6)]>0x0||_0x2b668c['emailRecipients']&&_0x2b668c[_0xc9b5dc(0x109)][_0xc9b5dc(0xb6)]>0x0)&&(_0x3f520c[_0xc9b5dc(0xcb)]={},_0x2b668c['notifyOn']&&_0x2b668c[_0xc9b5dc(0xde)][_0xc9b5dc(0xb6)]>0x0&&(_0x3f520c[_0xc9b5dc(0xcb)][_0xc9b5dc(0xfa)]=_0x2b668c['notifyOn']),_0x2b668c[_0xc9b5dc(0x109)]&&_0x2b668c[_0xc9b5dc(0x109)][_0xc9b5dc(0xb6)]>0x0&&(_0x3f520c[_0xc9b5dc(0xcb)][_0xc9b5dc(0x95)]=_0x2b668c[_0xc9b5dc(0x109)]['map'](_0x499764=>{const _0x279bba=_0x54a483?.['get'](_0x499764);return _0x279bba??String(_0x499764);})));_0x2b668c[_0xc9b5dc(0xc2)]&&Object[_0xc9b5dc(0xcd)](_0x2b668c['connectorConfig'])[_0xc9b5dc(0xb6)]>0x0&&(_0x3f520c['connector_config']=normalizeConnectorConfigForYaml(_0x2b668c[_0xc9b5dc(0xc2)]));_0x2b668c['activationTemplateId']&&(_0x3f520c[_0xc9b5dc(0xc8)]=_0x2b668c['activationTemplateId']);if(_0x2b668c[_0xc9b5dc(0xdc)]){const _0x2a264d={},_0x1e5be2=_0x2b668c['syndicationBehavior'];_0x1e5be2[_0xc9b5dc(0xb8)]&&_0x1e5be2[_0xc9b5dc(0xb8)]['length']>0x0&&(_0x2a264d[_0xc9b5dc(0xb8)]=_0x1e5be2[_0xc9b5dc(0xb8)][_0xc9b5dc(0x11b)](_0x1b9f94=>_0x1b9f94&&_0x1b9f94[_0xc9b5dc(0xd9)])[_0xc9b5dc(0xb1)](_0xda285=>({'name':_0xda285['name'],..._0xda285[_0xc9b5dc(0x118)]&&{'type':_0xda285[_0xc9b5dc(0x118)]},..._0xda285[_0xc9b5dc(0x11c)]&&{'visibility':_0xda285[_0xc9b5dc(0x11c)]}}))),_0x1e5be2[_0xc9b5dc(0xda)]&&(_0x2a264d[_0xc9b5dc(0xa1)]=_0x1e5be2[_0xc9b5dc(0xda)]),_0x1e5be2['joinRow']!==undefined&&(_0x2a264d[_0xc9b5dc(0x96)]=_0x1e5be2[_0xc9b5dc(0x111)]),_0x1e5be2[_0xc9b5dc(0x10b)]&&(_0x2a264d[_0xc9b5dc(0x114)]=_0x1e5be2['joinStrategy']),_0x1e5be2[_0xc9b5dc(0x120)]&&(_0x2a264d[_0xc9b5dc(0x120)]=_0x1e5be2[_0xc9b5dc(0x120)]),_0x1e5be2[_0xc9b5dc(0xb3)]&&_0x1e5be2[_0xc9b5dc(0xb3)][_0xc9b5dc(0xb6)]>0x0&&(_0x2a264d[_0xc9b5dc(0x108)]=_0x1e5be2['orderBy']),Object['keys'](_0x2a264d)[_0xc9b5dc(0xb6)]>0x0&&(_0x3f520c[_0xc9b5dc(0xd5)]=_0x2a264d);}return _0x3f520c;}export function segmentWithActivationsToYaml(_0x44e718,_0x12687a,_0x76df5c,_0x5d5645,_0x94b215){const _0x2c13fa=a102_0x46222a,_0x1f4f3b=segmentResponseToDefSync(_0x44e718,_0x76df5c);return _0x12687a[_0x2c13fa(0xb6)]>0x0&&(_0x1f4f3b[_0x2c13fa(0xa3)]=_0x12687a['map'](_0x5570bc=>activationResponseToDef(_0x5570bc,_0x5d5645,_0x94b215))),_0x1f4f3b;}function normalizeColumn(_0x2baa85){const _0x2f9871=a102_0x46222a;if(typeof _0x2baa85===_0x2f9871(0xa2))return{'name':_0x2baa85};return{'name':_0x2baa85[_0x2f9871(0xd9)],..._0x2baa85[_0x2f9871(0x118)]&&{'type':_0x2baa85[_0x2f9871(0x118)]},..._0x2baa85[_0x2f9871(0x11c)]&&{'visibility':_0x2baa85[_0x2f9871(0x11c)]}};}export async function activationDefToCreateRequest(_0x363081,_0x3eb7af){const _0x4b66a1=a102_0x46222a,_0xdabb84=_0x3eb7af?.[_0x4b66a1(0xb5)],_0x4141e8=_0x3eb7af?.['connectionNameToIdMap'],_0x28852d=_0x363081[_0x4b66a1(0xf9)];let _0x35cfdb;const _0x17e72f=parseInt(_0x28852d,0xa);if(!isNaN(_0x17e72f)&&String(_0x17e72f)===_0x28852d)_0x35cfdb=_0x17e72f;else{const _0x40a721=_0x4141e8?.[_0x4b66a1(0x103)](_0x28852d);if(_0x40a721===undefined)throw new SDKError(ErrorCode[_0x4b66a1(0x107)],_0x4b66a1(0xb0)+_0x28852d,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x35cfdb=_0x40a721;}const _0x240492={'name':_0x363081['name'],'connectionId':_0x35cfdb};_0x363081[_0x4b66a1(0xd0)]&&(_0x240492['description']=_0x363081[_0x4b66a1(0xd0)]);let _0x1610e6=[];_0x363081[_0x4b66a1(0xb8)]&&_0x363081[_0x4b66a1(0xb8)][_0x4b66a1(0xb6)]>0x0&&(_0x1610e6=_0x363081['columns'][_0x4b66a1(0x11b)](_0x5eb20d=>_0x5eb20d!=null)[_0x4b66a1(0xb1)](normalizeColumn));_0x1610e6['length']>0x0&&(_0x240492[_0x4b66a1(0xb8)]=_0x1610e6);_0x363081[_0x4b66a1(0x94)]!==undefined&&(_0x363081[_0x4b66a1(0x94)]===![]&&_0x1610e6[_0x4b66a1(0xb6)]===0x0?_0x240492[_0x4b66a1(0x10a)]=!![]:_0x240492[_0x4b66a1(0x10a)]=_0x363081[_0x4b66a1(0x94)]);if(_0x363081[_0x4b66a1(0xe0)]){const _0x6008d5=_0x363081[_0x4b66a1(0xe0)];_0x6008d5['type']&&(_0x240492[_0x4b66a1(0xbd)]=_0x6008d5['type']),_0x6008d5[_0x4b66a1(0xd7)]&&(_0x240492[_0x4b66a1(0x116)]=_0x6008d5[_0x4b66a1(0xd7)]),_0x6008d5['repeat_frequency']!==undefined&&(_0x240492[_0x4b66a1(0xd6)]=_0x6008d5[_0x4b66a1(0x119)]),_0x6008d5[_0x4b66a1(0xe8)]&&(_0x240492['repeatSubFrequency']=_0x6008d5[_0x4b66a1(0xe8)]),_0x6008d5[_0x4b66a1(0x106)]!==undefined&&(_0x240492[_0x4b66a1(0xf7)]=_0x6008d5[_0x4b66a1(0x106)]),_0x6008d5['end_on']!==undefined&&(_0x240492[_0x4b66a1(0xbc)]=_0x6008d5[_0x4b66a1(0xcc)]),_0x6008d5[_0x4b66a1(0xf8)]&&(_0x240492[_0x4b66a1(0xf8)]=_0x6008d5[_0x4b66a1(0xf8)]);}_0x363081[_0x4b66a1(0xcb)]&&(_0x363081[_0x4b66a1(0xcb)][_0x4b66a1(0xfa)]&&(_0x240492[_0x4b66a1(0xde)]=_0x363081['notification'][_0x4b66a1(0xfa)]),_0x363081['notification'][_0x4b66a1(0x95)]&&(_0x240492['emailRecipients']=_0x363081[_0x4b66a1(0xcb)][_0x4b66a1(0x95)][_0x4b66a1(0xb1)](_0x33963d=>{const _0x342779=_0x4b66a1,_0x34edc3=Number(_0x33963d);if(!isNaN(_0x34edc3)&&String(_0x34edc3)===_0x33963d)return _0x34edc3;const _0x3ea238=_0xdabb84?.[_0x342779(0x103)](_0x33963d['toLowerCase']());if(_0x3ea238===undefined)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x342779(0xa7)+_0x33963d+_0x342779(0xab));return _0x3ea238;})));if(_0x363081[_0x4b66a1(0xf1)]){const _0x5d9930=_0x3eb7af?.[_0x4b66a1(0x9e)]?.[_0x4b66a1(0x103)](_0x28852d);if(_0x5d9930&&_0x3eb7af?.[_0x4b66a1(0xa4)])try{const _0x449013=await _0x3eb7af['getSchema'](_0x5d9930),_0x9b26ac=validateConnectorConfig(_0x363081['connector_config'],_0x449013);if(!_0x9b26ac[_0x4b66a1(0xec)])throw new SDKError(ErrorCode[_0x4b66a1(0x115)],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x363081[_0x4b66a1(0xd9)]+_0x4b66a1(0x112)+formatValidationErrors(_0x9b26ac[_0x4b66a1(0xe4)]),undefined,{'helpText':_0x4b66a1(0xce)+_0x5d9930+_0x4b66a1(0x110)+formatSchemaAsHelp(_0x449013)});if(_0x9b26ac[_0x4b66a1(0xae)][_0x4b66a1(0xb6)]>0x0){const _0x35210d=formatValidationWarnings(_0x9b26ac[_0x4b66a1(0xae)]);console[_0x4b66a1(0xb9)](_0x4b66a1(0xa5)+_0x363081[_0x4b66a1(0xd9)]+'\x22:\x0a'+_0x35210d);}_0x240492[_0x4b66a1(0xc2)]=transformConfigToLegacy(_0x363081[_0x4b66a1(0xf1)],_0x449013);}catch(_0x3e054a){if(_0x3e054a instanceof SDKError&&_0x3e054a[_0x4b66a1(0xa0)]===ErrorCode[_0x4b66a1(0xef)])_0x240492[_0x4b66a1(0xc2)]=_0x363081['connector_config'];else throw _0x3e054a;}else _0x240492[_0x4b66a1(0xc2)]=_0x363081['connector_config'];}_0x363081[_0x4b66a1(0xc8)]!==undefined&&(_0x240492[_0x4b66a1(0x102)]=_0x363081[_0x4b66a1(0xc8)]);if(_0x363081[_0x4b66a1(0xd5)]){const _0x332b79=_0x363081[_0x4b66a1(0xd5)],_0x1c26c7={};if(_0x332b79[_0x4b66a1(0xb8)]&&_0x332b79[_0x4b66a1(0xb8)]['length']>0x0){const _0x581bc8=_0x332b79[_0x4b66a1(0xb8)][_0x4b66a1(0x11b)](_0x391e8e=>_0x391e8e&&_0x391e8e[_0x4b66a1(0xd9)]);_0x581bc8[_0x4b66a1(0xb6)]>0x0&&(_0x1c26c7[_0x4b66a1(0xb8)]=_0x581bc8);}_0x332b79[_0x4b66a1(0xa1)]&&(_0x1c26c7[_0x4b66a1(0xda)]=_0x332b79[_0x4b66a1(0xa1)]),_0x332b79[_0x4b66a1(0x96)]!==undefined&&(_0x1c26c7[_0x4b66a1(0x111)]=_0x332b79[_0x4b66a1(0x96)]),_0x332b79[_0x4b66a1(0x114)]&&(_0x1c26c7[_0x4b66a1(0x10b)]=_0x332b79[_0x4b66a1(0x114)]),_0x332b79[_0x4b66a1(0x120)]&&(_0x1c26c7[_0x4b66a1(0x120)]=_0x332b79[_0x4b66a1(0x120)]),_0x332b79[_0x4b66a1(0x108)]&&(_0x1c26c7['orderBy']=_0x332b79[_0x4b66a1(0x108)]),_0x240492['syndicationBehavior']=_0x1c26c7;}return _0x240492;}export async function activationDefToUpdateRequest(_0x252c26,_0x3e2b79){return activationDefToCreateRequest(_0x252c26,_0x3e2b79);}export function deepSortObject(_0x1761f4){const _0xca83d3=a102_0x46222a;if(_0x1761f4===null||typeof _0x1761f4!==_0xca83d3(0x9b))return _0x1761f4;if(Array['isArray'](_0x1761f4))return _0x1761f4['map'](deepSortObject)[_0xca83d3(0xd1)]((_0xec68f0,_0x3d5700)=>JSON['stringify'](_0xec68f0)[_0xca83d3(0xe2)](JSON[_0xca83d3(0xe9)](_0x3d5700)));const _0x9ddd7={};for(const _0x1f94e5 of Object[_0xca83d3(0xcd)](_0x1761f4)[_0xca83d3(0xd1)]()){_0x9ddd7[_0x1f94e5]=deepSortObject(_0x1761f4[_0x1f94e5]);}return _0x9ddd7;}function a102_0x57cc(_0x24a189,_0x3b2954){_0x24a189=_0x24a189-0x92;const _0x47f51c=a102_0x47f5();let _0x57cc5c=_0x47f51c[_0x24a189];return _0x57cc5c;}export function serializeRule(_0x1e4207){const _0x5ae441=a102_0x46222a;return JSON[_0x5ae441(0xe9)](deepSortObject(_0x1e4207));}export function normalizeRuleForMatching(_0x42c18a){return normalizeConditionsForMatching(_0x42c18a);}function normalizeConditionsForMatching(_0x461fbc){const _0x54168f=a102_0x46222a;if(_0x461fbc===null||typeof _0x461fbc!==_0x54168f(0x9b))return _0x461fbc;if(Array[_0x54168f(0x98)](_0x461fbc))return _0x461fbc['map'](normalizeConditionsForMatching);const _0x3940a3=_0x461fbc;if((_0x3940a3['type']===_0x54168f(0xd2)||_0x3940a3[_0x54168f(0x118)]===_0x54168f(0xb7))&&typeof _0x3940a3['segment']===_0x54168f(0xa2))return{..._0x3940a3,'segment':_0x54168f(0x117)};const _0x3e151a={};for(const _0x2d62f4 of Object[_0x54168f(0xcd)](_0x3940a3)){_0x3e151a[_0x2d62f4]=normalizeConditionsForMatching(_0x3940a3[_0x2d62f4]);}return _0x3e151a;}export function serializeRuleForMatching(_0x5e362e){return JSON['stringify'](deepSortObject(normalizeRuleForMatching(_0x5e362e)));}export function expandSegmentReferences(_0x45d625,_0x5b0d8c,_0x3237b7=new Set()){return expandConditions(_0x45d625,_0x5b0d8c,_0x3237b7);}function expandConditions(_0x1a6b57,_0x42426e,_0x3da938){const _0x52bcc5=a102_0x46222a;if(_0x1a6b57===null||typeof _0x1a6b57!=='object')return _0x1a6b57;if(Array['isArray'](_0x1a6b57))return _0x1a6b57[_0x52bcc5(0xb1)](_0x1f8125=>expandConditions(_0x1f8125,_0x42426e,_0x3da938));const _0x53f367=_0x1a6b57;if((_0x53f367[_0x52bcc5(0x118)]===_0x52bcc5(0xd2)||_0x53f367['type']===_0x52bcc5(0xb7))&&typeof _0x53f367[_0x52bcc5(0x124)]==='string'){const _0x43edd3=_0x53f367['segment'],_0xf7d337=_0x42426e[_0x52bcc5(0x103)](_0x43edd3);if(_0xf7d337&&!_0x3da938[_0x52bcc5(0x100)](_0x43edd3)){const _0x5eaa8d=new Set(_0x3da938);_0x5eaa8d['add'](_0x43edd3);const _0xb99c1f=expandConditions(_0xf7d337,_0x42426e,_0x5eaa8d);return{'type':_0x53f367[_0x52bcc5(0x118)],'expanded_rule':_0xb99c1f};}return{'type':_0x53f367['type'],'expanded_rule':_0x52bcc5(0xc3)};}const _0x255a33={};for(const _0x2ff492 of Object[_0x52bcc5(0xcd)](_0x53f367)){_0x255a33[_0x2ff492]=expandConditions(_0x53f367[_0x2ff492],_0x42426e,_0x3da938);}return _0x255a33;}export function serializeExpandedRule(_0x5909d8,_0xaa95f6){const _0x18f49a=a102_0x46222a,_0xb202af=expandSegmentReferences(_0x5909d8,_0xaa95f6);return JSON[_0x18f49a(0xe9)](deepSortObject(_0xb202af));}export function createSegmentNameContext(_0x4913b2){const _0x294fad=a102_0x46222a,_0x44ab4e=new Set(),_0x4e1088=new Map(),_0x5a6948=new Map();if(_0x4913b2)for(const [_0xa87c4b,_0x4030b1]of Object['entries'](_0x4913b2)){if(_0x4030b1[_0x294fad(0xf3)]){const _0x4a0266=serializeRule(_0x4030b1['rule']);_0x5a6948[_0x294fad(0xfc)](_0x4a0266,_0xa87c4b),_0x44ab4e[_0x294fad(0xad)](_0xa87c4b);}}return{'usedNames':_0x44ab4e,'ruleHashToName':_0x4e1088,'localRuleToName':_0x4913b2?_0x5a6948:undefined};}export function resolveSegmentName(_0x4d3071,_0x17cc28,_0x2d57c0,_0x3500d3){const _0x1f6892=a102_0x46222a,_0x39b226=serializeRule(_0x17cc28);if(_0x2d57c0['localRuleToName']){const _0x18e535=_0x2d57c0['localRuleToName'][_0x1f6892(0x103)](_0x39b226);if(_0x18e535)return{'name':_0x18e535,'isDuplicate':![],'isLocalMatch':!![]};}const _0x5b33fc=_0x2d57c0[_0x1f6892(0xe5)][_0x1f6892(0x103)](_0x39b226);if(_0x5b33fc)return{'name':_0x5b33fc,'isDuplicate':!![],'isLocalMatch':![]};const _0x34d1c4=_0x3500d3(_0x4d3071);let _0x49cf0d=_0x34d1c4||_0x4d3071,_0x29c3db=_0x49cf0d,_0x4ed7e1=0x2;while(_0x2d57c0['usedNames'][_0x1f6892(0x100)](_0x29c3db)){_0x29c3db=_0x49cf0d+'_'+_0x4ed7e1,_0x4ed7e1++;}return _0x2d57c0[_0x1f6892(0xff)][_0x1f6892(0xad)](_0x29c3db),_0x2d57c0['ruleHashToName'][_0x1f6892(0xfc)](_0x39b226,_0x29c3db),{'name':_0x29c3db,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x37b94d){const _0x2634fe=[],_0xc5eda9=_0x304a69=>{const _0x54fc3e=a102_0x57cc;if(!_0x304a69||typeof _0x304a69!=='object')return;if(Array[_0x54fc3e(0x98)](_0x304a69)){_0x304a69[_0x54fc3e(0xb2)](_0xc5eda9);return;}const _0x2b5cc3=_0x304a69;(_0x2b5cc3[_0x54fc3e(0x118)]===_0x54fc3e(0xd2)||_0x2b5cc3[_0x54fc3e(0x118)]===_0x54fc3e(0xb7))&&typeof _0x2b5cc3[_0x54fc3e(0x124)]===_0x54fc3e(0xa2)&&_0x2634fe[_0x54fc3e(0xe7)](_0x2b5cc3[_0x54fc3e(0x124)]);for(const _0x5dfdec of Object['values'](_0x2b5cc3)){_0xc5eda9(_0x5dfdec);}};return _0xc5eda9(_0x37b94d),_0x2634fe;}export function validateSegmentRule(_0x1a9359,_0x530292){const _0x44480e=a102_0x46222a;if(!_0x530292||!_0x530292[_0x44480e(0xf5)])return;for(let _0x319548=0x0;_0x319548<_0x530292[_0x44480e(0xf5)][_0x44480e(0xb6)];_0x319548++){const _0x1e4870=_0x530292['conditions'][_0x319548];if('type'in _0x1e4870&&_0x1e4870['type']===_0x44480e(0xba)){const _0xf26d42=_0x1e4870;if(!_0xf26d42[_0x44480e(0x122)]||_0xf26d42['attribute']==='')throw new SDKError(ErrorCode[_0x44480e(0x10f)],_0x44480e(0xaa)+_0x1a9359+_0x44480e(0xfe)+('conditions['+_0x319548+_0x44480e(0xa6))+_0x44480e(0xe1));}}}
1
+ (function(_0x35331b,_0x41faa2){const _0x348ff1=a102_0x417c,_0x1a51af=_0x35331b();while(!![]){try{const _0x1f6fe2=parseInt(_0x348ff1(0x1b8))/0x1*(parseInt(_0x348ff1(0x1db))/0x2)+-parseInt(_0x348ff1(0x170))/0x3*(parseInt(_0x348ff1(0x1c8))/0x4)+parseInt(_0x348ff1(0x184))/0x5+parseInt(_0x348ff1(0x188))/0x6+parseInt(_0x348ff1(0x16e))/0x7+parseInt(_0x348ff1(0x1cc))/0x8+-parseInt(_0x348ff1(0x185))/0x9*(parseInt(_0x348ff1(0x175))/0xa);if(_0x1f6fe2===_0x41faa2)break;else _0x1a51af['push'](_0x1a51af['shift']());}catch(_0x47a9d4){_0x1a51af['push'](_0x1a51af['shift']());}}}(a102_0x5466,0xb1fc9));import*as a102_0xf1f92b from'yaml';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp}from'../connection-validator.js';export function segmentResponseToDefSync(_0x8137a5,_0x3501aa){const _0x48102b=a102_0x417c,_0x3d4958=_0x8137a5['rule']&&'type'in _0x8137a5[_0x48102b(0x19e)]&&_0x8137a5[_0x48102b(0x19e)][_0x48102b(0x1d2)];return{'type':_0x48102b(0x1d5),'name':_0x8137a5[_0x48102b(0x1eb)],..._0x8137a5[_0x48102b(0x1f1)]&&{'description':_0x8137a5[_0x48102b(0x1f1)]},..._0x3501aa&&{'folder':_0x3501aa},..._0x3d4958&&{'rule':apiRuleToYaml(_0x8137a5['rule'])},..._0x8137a5[_0x48102b(0x16a)]!==undefined&&{'kind':_0x8137a5[_0x48102b(0x16a)]===0x0?_0x48102b(0x187):_0x8137a5[_0x48102b(0x16a)]===0x1?_0x48102b(0x1f6):_0x48102b(0x1c2)},..._0x8137a5[_0x48102b(0x1e2)]!==undefined&&{'visible':_0x8137a5[_0x48102b(0x1e2)]}};}export async function segmentResponseToDef(_0x23a1e3,_0x2547ea,_0x35d14f){const _0x2fc62d=a102_0x417c,_0x48b824=segmentResponseToDefSync(_0x23a1e3,_0x35d14f);if(!_0x2547ea||!_0x2547ea[_0x2fc62d(0x1ed)])return _0x48b824;return _0x48b824[_0x2fc62d(0x19e)]&&(_0x48b824[_0x2fc62d(0x19e)]=await resolveRuleSegmentRefs(_0x48b824[_0x2fc62d(0x19e)],_0x2547ea['resolveSegmentName'])),_0x48b824;}export function apiRuleToYaml(_0x181b4a){const _0x1d0eae=a102_0x417c,_0x45bff3=(_0x181b4a['conditions']||[])[_0x1d0eae(0x16b)](apiConditionToYaml);if(_0x45bff3[_0x1d0eae(0x172)]===0x1&&!_0x181b4a['description']&&_0x1d0eae(0x1d2)in _0x45bff3[0x0]&&(_0x45bff3[0x0][_0x1d0eae(0x1d2)]===_0x1d0eae(0x1a6)||_0x45bff3[0x0]['type']==='Or')){const _0x3038fa=_0x45bff3[0x0];if(_0x3038fa['type']===_0x181b4a['type']&&_0x3038fa['conditions'])return{'type':_0x181b4a[_0x1d0eae(0x1d2)],'conditions':_0x3038fa[_0x1d0eae(0x1a0)],..._0x3038fa['description']&&{'description':_0x3038fa[_0x1d0eae(0x1f1)]}};}return{'type':_0x181b4a['type'],'conditions':_0x45bff3,..._0x181b4a[_0x1d0eae(0x1f1)]&&{'description':_0x181b4a[_0x1d0eae(0x1f1)]}};}export async function resolveRuleSegmentRefs(_0x2ffb10,_0x2fa4d0){const _0x113bec=a102_0x417c,_0x12b73a=await Promise[_0x113bec(0x17d)](_0x2ffb10[_0x113bec(0x1a0)][_0x113bec(0x16b)](_0x23ed68=>resolveConditionSegmentRefs(_0x23ed68,_0x2fa4d0)));return{..._0x2ffb10,'conditions':_0x12b73a};}async function resolveConditionSegmentRefs(_0x310c46,_0x447402){const _0x10cf03=a102_0x417c;if(_0x10cf03(0x1d5)in _0x310c46&&(_0x310c46[_0x10cf03(0x1d2)]===_0x10cf03(0x199)||_0x310c46['type']===_0x10cf03(0x19c))){const _0x269416=_0x310c46;if(/^\d+$/[_0x10cf03(0x1ef)](_0x269416[_0x10cf03(0x1d5)])){const _0x4d0c83=await _0x447402(_0x269416['segment']);return{..._0x269416,'segment':_0x4d0c83};}return _0x310c46;}if(_0x10cf03(0x1a0)in _0x310c46&&_0x310c46[_0x10cf03(0x1a0)]){const _0x277d9f=_0x310c46,_0x2f8e42=await Promise['all'](_0x277d9f['conditions'][_0x10cf03(0x16b)](_0xd208ac=>resolveConditionSegmentRefs(_0xd208ac,_0x447402)));return{..._0x277d9f,'conditions':_0x2f8e42};}if(_0x10cf03(0x1b7)in _0x310c46&&_0x310c46[_0x10cf03(0x1b7)]){const _0x3ebf1b=_0x310c46,_0x32d9a3=await resolveRuleSegmentRefs(_0x3ebf1b['filter'],_0x447402);return{..._0x3ebf1b,'filter':_0x32d9a3};}return _0x310c46;}export async function resolveRuleSegmentIds(_0x18fc54,_0x344ff6){const _0x160a28=a102_0x417c,_0x207740=await Promise[_0x160a28(0x17d)](_0x18fc54[_0x160a28(0x1a0)][_0x160a28(0x16b)](_0x83ccc9=>resolveConditionSegmentIds(_0x83ccc9,_0x344ff6)));return{..._0x18fc54,'conditions':_0x207740};}async function resolveConditionSegmentIds(_0x4315da,_0x3928c4){const _0x2636f7=a102_0x417c;if('segment'in _0x4315da&&(_0x4315da[_0x2636f7(0x1d2)]===_0x2636f7(0x199)||_0x4315da[_0x2636f7(0x1d2)]===_0x2636f7(0x19c))){const _0x3157e5=_0x4315da;if(!/^\d+$/[_0x2636f7(0x1ef)](_0x3157e5[_0x2636f7(0x1d5)])){const _0x4a5843=await _0x3928c4(_0x3157e5[_0x2636f7(0x1d5)]);return{..._0x3157e5,'segment':_0x4a5843};}return _0x4315da;}if(_0x2636f7(0x1a0)in _0x4315da&&_0x4315da[_0x2636f7(0x1a0)]){const _0xf976e9=_0x4315da,_0x23b5bd=await Promise[_0x2636f7(0x17d)](_0xf976e9[_0x2636f7(0x1a0)][_0x2636f7(0x16b)](_0x4da9f5=>resolveConditionSegmentIds(_0x4da9f5,_0x3928c4)));return{..._0xf976e9,'conditions':_0x23b5bd};}if(_0x2636f7(0x1b7)in _0x4315da&&_0x4315da[_0x2636f7(0x1b7)]){const _0x5a6491=_0x4315da,_0x5570ab=await resolveRuleSegmentIds(_0x5a6491['filter'],_0x3928c4);return{..._0x5a6491,'filter':_0x5570ab};}return _0x4315da;}function apiConditionToYaml(_0x1e220b){const _0x3be572=a102_0x417c;if(_0x1e220b[_0x3be572(0x1d2)]===_0x3be572(0x1a6)||_0x1e220b[_0x3be572(0x1d2)]==='Or'){if(_0x1e220b[_0x3be572(0x1a0)]){const _0x347769=_0x1e220b[_0x3be572(0x1a0)][_0x3be572(0x16b)](apiConditionToYaml);if(_0x347769['length']===0x1&&!_0x1e220b[_0x3be572(0x1f1)])return _0x347769[0x0];return{'type':_0x1e220b[_0x3be572(0x1d2)],'conditions':_0x347769,..._0x1e220b[_0x3be572(0x1f1)]&&{'description':_0x1e220b[_0x3be572(0x1f1)]}};}}if(_0x1e220b['type']===_0x3be572(0x17a)&&_0x1e220b[_0x3be572(0x1d4)]&&_0x1e220b[_0x3be572(0x16c)]){const _0x5b2def=_0x1e220b[_0x3be572(0x1d4)]['aggregation']?{'type':_0x1e220b[_0x3be572(0x1d4)]['aggregation'][_0x3be572(0x1d2)],..._0x1e220b['leftValue'][_0x3be572(0x18d)][_0x3be572(0x1f0)]&&{'groupingColumns':_0x1e220b[_0x3be572(0x1d4)][_0x3be572(0x18d)][_0x3be572(0x1f0)]}}:undefined;return{'type':_0x3be572(0x17a),'attribute':_0x1e220b[_0x3be572(0x1d4)][_0x3be572(0x1eb)]||'','operator':apiOperatorToYaml(_0x1e220b[_0x3be572(0x16c)]),..._0x1e220b['arrayMatching']&&_0x1e220b['arrayMatching']!==_0x3be572(0x1d0)?{'arrayMatching':_0x1e220b['arrayMatching']}:{},..._0x1e220b[_0x3be572(0x19c)]?{'exclude':_0x1e220b['exclude']}:{},..._0x5b2def?{'aggregation':_0x5b2def}:{},..._0x1e220b['leftValue'][_0x3be572(0x1ec)]?{'source':_0x1e220b[_0x3be572(0x1d4)][_0x3be572(0x1ec)][_0x3be572(0x1eb)]}:{},..._0x1e220b[_0x3be572(0x1d4)][_0x3be572(0x1b7)]?{'filter':apiRuleToYaml(_0x1e220b[_0x3be572(0x1d4)][_0x3be572(0x1b7)])}:{},..._0x1e220b[_0x3be572(0x177)]!==undefined&&_0x1e220b[_0x3be572(0x177)]!==null?{'limit':_0x1e220b[_0x3be572(0x177)]}:{}};}if(_0x1e220b[_0x3be572(0x1d2)]==='Reference'&&_0x1e220b['id'])return{'type':_0x1e220b[_0x3be572(0x19c)]?_0x3be572(0x19c):'include','segment':_0x1e220b['id']};return{'type':_0x3be572(0x1a6),'conditions':[]};}function isTemporalOperator(_0x1576bc){const _0x5b949d=a102_0x417c;return _0x1576bc===_0x5b949d(0x18b)||_0x1576bc===_0x5b949d(0x1f2);}function getEffectiveValue(_0x3e9f19){const _0x369ed4=a102_0x417c,_0x3929c9=_0x3e9f19['values'];return _0x3e9f19[_0x369ed4(0x1a8)]??_0x3929c9;}function apiOperatorToYaml(_0x2be414){const _0x509e9d=a102_0x417c;let _0x4c9233;if(_0x2be414[_0x509e9d(0x19b)]&&_0x2be414[_0x509e9d(0x19b)][_0x509e9d(0x172)]>0x0)_0x4c9233=_0x2be414[_0x509e9d(0x19b)];else{if(_0x2be414[_0x509e9d(0x1aa)]!==undefined)_0x4c9233=_0x2be414[_0x509e9d(0x1aa)];else isTemporalOperator(_0x2be414[_0x509e9d(0x1d2)])&&_0x2be414[_0x509e9d(0x1a8)]!==undefined&&(_0x4c9233=_0x2be414[_0x509e9d(0x1a8)]);}return{'type':mapApiOperatorType(_0x2be414[_0x509e9d(0x1d2)]),..._0x2be414[_0x509e9d(0x1c7)]&&{'not':_0x2be414[_0x509e9d(0x1c7)]},..._0x4c9233!==undefined&&{'value':_0x4c9233},..._0x2be414[_0x509e9d(0x18e)]&&{'unit':_0x2be414[_0x509e9d(0x18e)]}};}function mapApiOperatorType(_0x17b3f5){return _0x17b3f5;}export function segmentDefToCreateRequest(_0x3636ff,_0x51d41e){const _0x597f79=a102_0x417c,_0x17017d={'name':_0x3636ff[_0x597f79(0x1eb)]};return _0x3636ff[_0x597f79(0x1f1)]&&(_0x17017d[_0x597f79(0x1f1)]=_0x3636ff['description']),_0x3636ff[_0x597f79(0x19e)]&&(_0x17017d[_0x597f79(0x19e)]=yamlRuleToApi(_0x3636ff[_0x597f79(0x19e)])),_0x3636ff[_0x597f79(0x16a)]&&(_0x17017d['kind']=_0x3636ff[_0x597f79(0x16a)]==='batch'?0x0:_0x3636ff[_0x597f79(0x16a)]===_0x597f79(0x1f6)?0x1:0x2),_0x3636ff[_0x597f79(0x193)]!==undefined&&(_0x17017d[_0x597f79(0x1e2)]=_0x3636ff[_0x597f79(0x193)]),_0x51d41e&&(_0x17017d['segmentFolderId']=_0x51d41e),_0x17017d;}export function segmentDefToUpdateRequest(_0x58bf4c){const _0x26e65a=a102_0x417c,_0x2ed1ba={'name':_0x58bf4c[_0x26e65a(0x1eb)]};return _0x58bf4c[_0x26e65a(0x1f1)]!==undefined&&(_0x2ed1ba[_0x26e65a(0x1f1)]=_0x58bf4c[_0x26e65a(0x1f1)]),_0x58bf4c[_0x26e65a(0x19e)]&&(_0x2ed1ba[_0x26e65a(0x19e)]=yamlRuleToApi(_0x58bf4c['rule'])),_0x58bf4c[_0x26e65a(0x16a)]&&(_0x2ed1ba[_0x26e65a(0x16a)]=_0x58bf4c[_0x26e65a(0x16a)]===_0x26e65a(0x187)?0x0:_0x58bf4c[_0x26e65a(0x16a)]==='realtime'?0x1:0x2),_0x2ed1ba;}export function yamlRuleToApi(_0x4c5892,_0x4a6e67=![]){const _0x4a8984=a102_0x417c,_0x351d58=_0x4c5892[_0x4a8984(0x1a0)]['map'](yamlConditionToApi);if(_0x4a6e67){const _0x31ac52=_0x351d58[_0x4a8984(0x1e0)](_0x145626=>_0x145626[_0x4a8984(0x1d2)]==='And'||_0x145626['type']==='Or');if(!_0x31ac52&&_0x351d58[_0x4a8984(0x172)]>0x0)return{'type':_0x4c5892[_0x4a8984(0x1d2)],'conditions':[{'type':_0x4a8984(0x1a6),'description':_0x4c5892['description']||'','conditions':_0x351d58}]};}return{'type':_0x4c5892[_0x4a8984(0x1d2)],'conditions':_0x351d58,..._0x4c5892['description']&&{'description':_0x4c5892[_0x4a8984(0x1f1)]}};}function yamlConditionToApi(_0x77452d){const _0x1c891c=a102_0x417c;if(_0x1c891c(0x1d5)in _0x77452d&&(_0x77452d['type']==='include'||_0x77452d['type']==='exclude')){const _0x4cda7b=_0x77452d;return{'type':'Reference','id':_0x4cda7b[_0x1c891c(0x1d5)],'exclude':_0x4cda7b[_0x1c891c(0x1d2)]===_0x1c891c(0x19c)};}if(_0x1c891c(0x1d2)in _0x77452d&&(_0x77452d['type']===_0x1c891c(0x1a6)||_0x77452d['type']==='Or')){const _0x2973e6=_0x77452d;return{'type':_0x2973e6['type'],'conditions':_0x2973e6['conditions'][_0x1c891c(0x16b)](yamlConditionToApi),..._0x2973e6['description']&&{'description':_0x2973e6[_0x1c891c(0x1f1)]}};}const _0x40df7d=_0x77452d,_0x149584={'type':'Value','leftValue':buildLeftValue(_0x40df7d),'operator':yamlOperatorToApi(_0x40df7d[_0x1c891c(0x16c)]),'exclude':_0x40df7d['exclude']??![],'arrayMatching':_0x40df7d[_0x1c891c(0x1af)]??'any'};return _0x40df7d['limit']!==undefined&&(_0x149584['limit']=_0x40df7d['limit']),_0x149584;}function buildLeftValue(_0xc45ee7){const _0x2f8e5b=a102_0x417c,_0x450edf={'name':_0xc45ee7['attribute']};return _0xc45ee7['aggregation']&&(_0x450edf[_0x2f8e5b(0x18d)]={'type':_0xc45ee7['aggregation'][_0x2f8e5b(0x1d2)],..._0xc45ee7[_0x2f8e5b(0x18d)][_0x2f8e5b(0x1f0)]&&{'groupingColumns':_0xc45ee7[_0x2f8e5b(0x18d)][_0x2f8e5b(0x1f0)]}}),_0xc45ee7[_0x2f8e5b(0x1ec)]&&(_0x450edf[_0x2f8e5b(0x1ec)]={'name':_0xc45ee7['source']}),_0xc45ee7['filter']&&(_0x450edf[_0x2f8e5b(0x1b7)]=yamlRuleToApi(_0xc45ee7[_0x2f8e5b(0x1b7)])),_0x450edf;}function yamlOperatorToApi(_0x5efa1f){const _0x41e9c0=a102_0x417c,_0x7d79c1={'type':mapYamlOperatorType(_0x5efa1f['type']),'not':_0x5efa1f[_0x41e9c0(0x1c7)]??![]},_0x21f083=getEffectiveValue(_0x5efa1f);if(_0x21f083!==undefined){if(Array[_0x41e9c0(0x17b)](_0x21f083))_0x7d79c1[_0x41e9c0(0x19b)]=_0x21f083;else isTemporalOperator(_0x5efa1f[_0x41e9c0(0x1d2)])?_0x7d79c1[_0x41e9c0(0x1a8)]=_0x21f083:_0x7d79c1['rightValue']=_0x21f083;}return _0x5efa1f[_0x41e9c0(0x18e)]&&(_0x7d79c1[_0x41e9c0(0x18e)]=_0x5efa1f[_0x41e9c0(0x18e)]),_0x7d79c1;}function mapYamlOperatorType(_0x8c4072){return _0x8c4072;}export function toYamlString(_0x960130){const _0x4a70de=a102_0x417c,_0x189245=JSON[_0x4a70de(0x1cf)](JSON[_0x4a70de(0x173)](_0x960130)),_0x32dd2a=a102_0xf1f92b['stringify'](_0x189245,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x4a70de(0x16f)}),_0x4da8d5=[_0x4a70de(0x196)];let _0x43eba9=_0x32dd2a;for(const _0x5a0000 of _0x4da8d5){_0x43eba9=_0x43eba9[_0x4a70de(0x1d7)](new RegExp('^('+_0x5a0000+')','m'),(_0x14f1dd,_0x1f70ad,_0x1940fe)=>{if(_0x1940fe===0x0||_0x43eba9[_0x1940fe-0x1]==='\x0a'&&_0x43eba9[_0x1940fe-0x2]==='\x0a')return _0x1f70ad;return'\x0a'+_0x1f70ad;});}return _0x43eba9;}export function parseYamlString(_0x22fd5a){const _0x44022a=a102_0x417c,_0x851894=a102_0xf1f92b[_0x44022a(0x1cf)](_0x22fd5a);if(!_0x851894[_0x44022a(0x1eb)])throw new Error(_0x44022a(0x1b2));if(_0x851894[_0x44022a(0x1d2)]&&_0x851894[_0x44022a(0x1d2)]!==_0x44022a(0x1d5))throw new Error('YAML\x20type\x20must\x20be\x20\x27segment\x27\x20or\x20omitted,\x20got:\x20'+_0x851894['type']);return _0x851894;}export function isSegmentYaml(_0x445a45){const _0x1670d2=a102_0x417c;if(typeof _0x445a45!==_0x1670d2(0x1dc)||_0x445a45===null)return![];const _0x476b72=_0x445a45;return _0x476b72[_0x1670d2(0x1d2)]===_0x1670d2(0x1d5)||_0x476b72[_0x1670d2(0x1d2)]===undefined;}export function generateTemplate(_0xd713ca='New\x20Segment'){const _0x452e1e=a102_0x417c,_0x4595ff={'type':'segment','name':_0xd713ca,'description':_0x452e1e(0x1e7),'rule':{'type':_0x452e1e(0x1a6),'conditions':[{'type':'Value','attribute':_0x452e1e(0x167),'operator':{'type':'Equal','value':'value'}}]}};return toYamlString(_0x4595ff);}export function segmentToYamlString(_0x3e6755){const _0x33d167=a102_0x417c,_0x586965=JSON[_0x33d167(0x1cf)](JSON['stringify'](_0x3e6755)),_0x7535bd=a102_0xf1f92b['stringify'](_0x586965,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x33d167(0x16f)}),_0x5b0eda=['rule:',_0x33d167(0x1bd)];let _0x1bdcb1=_0x7535bd;for(const _0x20e14d of _0x5b0eda){_0x1bdcb1=_0x1bdcb1[_0x33d167(0x1d7)](new RegExp('^('+_0x20e14d+')','m'),(_0x4eab91,_0x387778,_0xcd3e92)=>{if(_0xcd3e92===0x0||_0x1bdcb1[_0xcd3e92-0x1]==='\x0a'&&_0x1bdcb1[_0xcd3e92-0x2]==='\x0a')return _0x387778;return'\x0a'+_0x387778;});}return _0x1bdcb1;}export function parseSegmentYamlFile(_0x100b09){const _0x160642=a102_0x417c,_0x5088e9=a102_0xf1f92b[_0x160642(0x1cf)](_0x100b09);if(!_0x5088e9['name'])throw new Error(_0x160642(0x1b2));return _0x5088e9;}export function normalizeChildSegmentYaml(_0x5683dc){const _0xc9a2a2=a102_0x417c;return{'type':_0xc9a2a2(0x1d5),'name':_0x5683dc[_0xc9a2a2(0x1eb)],..._0x5683dc['description']!==undefined&&{'description':_0x5683dc['description']},..._0x5683dc[_0xc9a2a2(0x1c0)]!==undefined&&{'folder':_0x5683dc[_0xc9a2a2(0x1c0)]},..._0x5683dc[_0xc9a2a2(0x19e)]&&{'rule':normalizeRule(_0x5683dc[_0xc9a2a2(0x19e)])},..._0x5683dc[_0xc9a2a2(0x16a)]!==undefined&&{'kind':_0x5683dc[_0xc9a2a2(0x16a)]},..._0x5683dc[_0xc9a2a2(0x193)]!==undefined&&{'visible':_0x5683dc['visible']},..._0x5683dc[_0xc9a2a2(0x174)]&&{'activations':_0x5683dc[_0xc9a2a2(0x174)][_0xc9a2a2(0x16b)](normalizeActivation)}};}export function normalizeRule(_0x5a3db9){const _0x21a667=a102_0x417c;return{'type':_0x5a3db9['type'],'conditions':_0x5a3db9['conditions'][_0x21a667(0x16b)](normalizeCondition),..._0x5a3db9[_0x21a667(0x1f1)]!==undefined&&{'description':_0x5a3db9[_0x21a667(0x1f1)]}};}function normalizeCondition(_0x177ac3){const _0x42077e=a102_0x417c;if(_0x42077e(0x1d5)in _0x177ac3&&(_0x177ac3['type']==='include'||_0x177ac3['type']===_0x42077e(0x19c))){const _0x3ecebc=_0x177ac3;return{'type':_0x3ecebc[_0x42077e(0x1d2)],'segment':_0x3ecebc[_0x42077e(0x1d5)]};}if(_0x42077e(0x1d2)in _0x177ac3&&(_0x177ac3[_0x42077e(0x1d2)]===_0x42077e(0x1a6)||_0x177ac3[_0x42077e(0x1d2)]==='Or')){const _0x224f14=_0x177ac3;return{'type':_0x224f14['type'],'conditions':_0x224f14['conditions']['map'](normalizeCondition),..._0x224f14[_0x42077e(0x1f1)]!==undefined&&{'description':_0x224f14[_0x42077e(0x1f1)]}};}const _0x44a70f=_0x177ac3;return{'type':_0x42077e(0x17a),'attribute':_0x44a70f[_0x42077e(0x1bc)],'operator':normalizeOperator(_0x44a70f['operator']),..._0x44a70f[_0x42077e(0x1af)]!==undefined&&{'arrayMatching':_0x44a70f[_0x42077e(0x1af)]},..._0x44a70f[_0x42077e(0x19c)]!==undefined&&{'exclude':_0x44a70f[_0x42077e(0x19c)]},..._0x44a70f['aggregation']!==undefined&&{'aggregation':_0x44a70f['aggregation']},..._0x44a70f[_0x42077e(0x1ec)]!==undefined&&{'source':_0x44a70f['source']},..._0x44a70f[_0x42077e(0x1b7)]!==undefined&&{'filter':normalizeRule(_0x44a70f[_0x42077e(0x1b7)])},..._0x44a70f['limit']!==undefined&&{'limit':_0x44a70f[_0x42077e(0x177)]}};}function normalizeOperator(_0x4b0039){const _0x397463=a102_0x417c,_0x34c328=getEffectiveValue(_0x4b0039);return{'type':_0x4b0039[_0x397463(0x1d2)],..._0x4b0039['not']!==undefined&&{'not':_0x4b0039[_0x397463(0x1c7)]},..._0x34c328!==undefined&&{'value':_0x34c328},..._0x4b0039[_0x397463(0x1c5)]!==undefined&&{'min':_0x4b0039[_0x397463(0x1c5)]},..._0x4b0039[_0x397463(0x1a3)]!==undefined&&{'max':_0x4b0039[_0x397463(0x1a3)]},..._0x4b0039['unit']!==undefined&&{'unit':_0x4b0039['unit']},..._0x4b0039[_0x397463(0x194)]!==undefined&&{'duration':_0x4b0039[_0x397463(0x194)]},..._0x4b0039[_0x397463(0x171)]!==undefined&&{'from':_0x4b0039[_0x397463(0x171)]}};}function a102_0x417c(_0x4c2cab,_0x3223a3){_0x4c2cab=_0x4c2cab-0x167;const _0x5466e1=a102_0x5466();let _0x417c64=_0x5466e1[_0x4c2cab];return _0x417c64;}function normalizeActivation(_0x125e29){const _0x4ac049=a102_0x417c;return{'name':_0x125e29[_0x4ac049(0x1eb)],'connection':_0x125e29[_0x4ac049(0x1ee)],..._0x125e29['description']!==undefined&&{'description':_0x125e29[_0x4ac049(0x1f1)]},..._0x125e29[_0x4ac049(0x1a2)]!==undefined&&{'all_columns':_0x125e29[_0x4ac049(0x1a2)]},..._0x125e29[_0x4ac049(0x1a7)]!==undefined&&{'columns':_0x125e29[_0x4ac049(0x1a7)]},..._0x125e29['behavior']!==undefined&&{'behavior':_0x125e29['behavior']},..._0x125e29[_0x4ac049(0x176)]!==undefined&&{'schedule':_0x125e29[_0x4ac049(0x176)]},..._0x125e29['notification']!==undefined&&{'notification':_0x125e29['notification']},..._0x125e29[_0x4ac049(0x168)]!==undefined&&{'connector_config':_0x125e29[_0x4ac049(0x168)]},..._0x125e29[_0x4ac049(0x1b9)]!==undefined&&{'activation_template_id':_0x125e29['activation_template_id']}};}export function activationResponseToDef(_0x470d06,_0x525f2a,_0x15b2a8){const _0x57b325=a102_0x417c,_0x25d316=_0x470d06['connectionId']||'',_0x36958a=_0x15b2a8?.['get'](_0x25d316)??_0x25d316,_0x502f74={'name':_0x470d06[_0x57b325(0x1eb)],'connection':_0x36958a};_0x470d06[_0x57b325(0x1f1)]&&(_0x502f74['description']=_0x470d06[_0x57b325(0x1f1)]);let _0x38873a=[];_0x470d06[_0x57b325(0x1a7)]&&_0x470d06[_0x57b325(0x1a7)]['length']>0x0&&(_0x38873a=_0x470d06[_0x57b325(0x1a7)]['filter'](_0xd9c73=>_0xd9c73&&_0xd9c73[_0x57b325(0x1eb)])['map'](_0x44b1f6=>{const _0xbc946a=_0x57b325;if(_0x44b1f6[_0xbc946a(0x1d2)]||_0x44b1f6[_0xbc946a(0x19a)])return{'name':_0x44b1f6[_0xbc946a(0x1eb)],..._0x44b1f6[_0xbc946a(0x1d2)]&&{'type':_0x44b1f6[_0xbc946a(0x1d2)]},..._0x44b1f6[_0xbc946a(0x19a)]&&{'visibility':_0x44b1f6[_0xbc946a(0x19a)]}};return _0x44b1f6[_0xbc946a(0x1eb)];}));_0x38873a['length']>0x0&&(_0x502f74[_0x57b325(0x1a7)]=_0x38873a);_0x470d06[_0x57b325(0x1ab)]!==undefined&&(_0x470d06[_0x57b325(0x1ab)]===![]&&_0x38873a['length']===0x0?_0x502f74[_0x57b325(0x1a2)]=!![]:_0x502f74[_0x57b325(0x1a2)]=_0x470d06['allColumns']);const _0x342728={};let _0x4e4940=![];_0x470d06[_0x57b325(0x1cb)]&&(_0x342728[_0x57b325(0x1d2)]=_0x470d06['scheduleType'],_0x4e4940=!![]);_0x470d06['repeatUnit']&&(_0x342728[_0x57b325(0x191)]=_0x470d06[_0x57b325(0x1bf)],_0x4e4940=!![]);_0x470d06[_0x57b325(0x17f)]!==undefined&&_0x470d06[_0x57b325(0x17f)]!==null&&(_0x342728[_0x57b325(0x179)]=_0x470d06[_0x57b325(0x17f)],_0x4e4940=!![]);_0x470d06['repeatSubFrequency']&&_0x470d06[_0x57b325(0x1a9)][_0x57b325(0x172)]>0x0&&(_0x342728[_0x57b325(0x1e1)]=_0x470d06[_0x57b325(0x1a9)],_0x4e4940=!![]);_0x470d06[_0x57b325(0x18f)]!==undefined&&(_0x342728['start_at']=_0x470d06['startAt'],_0x4e4940=!![]);_0x470d06['endOn']!==undefined&&(_0x342728['end_on']=_0x470d06[_0x57b325(0x1ce)],_0x4e4940=!![]);_0x470d06['timezone']&&(_0x342728[_0x57b325(0x1ae)]=_0x470d06['timezone'],_0x4e4940=!![]);_0x4e4940&&(_0x502f74[_0x57b325(0x176)]=_0x342728);(_0x470d06['notifyOn']&&_0x470d06['notifyOn'][_0x57b325(0x172)]>0x0||_0x470d06[_0x57b325(0x182)]&&_0x470d06[_0x57b325(0x182)][_0x57b325(0x172)]>0x0)&&(_0x502f74[_0x57b325(0x1a1)]={},_0x470d06[_0x57b325(0x1da)]&&_0x470d06['notifyOn'][_0x57b325(0x172)]>0x0&&(_0x502f74[_0x57b325(0x1a1)][_0x57b325(0x17c)]=_0x470d06['notifyOn']),_0x470d06[_0x57b325(0x182)]&&_0x470d06[_0x57b325(0x182)][_0x57b325(0x172)]>0x0&&(_0x502f74[_0x57b325(0x1a1)][_0x57b325(0x1c3)]=_0x470d06[_0x57b325(0x182)][_0x57b325(0x16b)](_0x1ce247=>{const _0x377445=_0x57b325,_0x5b4b73=_0x525f2a?.[_0x377445(0x192)](_0x1ce247);return _0x5b4b73??String(_0x1ce247);})));_0x470d06[_0x57b325(0x178)]&&Object[_0x57b325(0x1d6)](_0x470d06[_0x57b325(0x178)])[_0x57b325(0x172)]>0x0&&(_0x502f74[_0x57b325(0x168)]=normalizeConnectorConfigForYaml(_0x470d06[_0x57b325(0x178)]));_0x470d06['activationTemplateId']&&(_0x502f74[_0x57b325(0x1b9)]=_0x470d06['activationTemplateId']);if(_0x470d06['syndicationBehavior']){const _0xee3b69={},_0x3f8f35=_0x470d06[_0x57b325(0x1d3)];_0x3f8f35[_0x57b325(0x1a7)]&&_0x3f8f35['columns'][_0x57b325(0x172)]>0x0&&(_0xee3b69[_0x57b325(0x1a7)]=_0x3f8f35[_0x57b325(0x1a7)][_0x57b325(0x1b7)](_0x1c9583=>_0x1c9583&&_0x1c9583[_0x57b325(0x1eb)])[_0x57b325(0x16b)](_0x45fd22=>({'name':_0x45fd22[_0x57b325(0x1eb)],..._0x45fd22[_0x57b325(0x1d2)]&&{'type':_0x45fd22[_0x57b325(0x1d2)]},..._0x45fd22[_0x57b325(0x19a)]&&{'visibility':_0x45fd22['visibility']}}))),_0x3f8f35[_0x57b325(0x1b3)]&&(_0xee3b69['behavior_table']=_0x3f8f35[_0x57b325(0x1b3)]),_0x3f8f35[_0x57b325(0x1e6)]!==undefined&&(_0xee3b69[_0x57b325(0x1b6)]=_0x3f8f35[_0x57b325(0x1e6)]),_0x3f8f35[_0x57b325(0x189)]&&(_0xee3b69[_0x57b325(0x1d1)]=_0x3f8f35[_0x57b325(0x189)]),_0x3f8f35[_0x57b325(0x198)]&&(_0xee3b69[_0x57b325(0x198)]=_0x3f8f35['formatting']),_0x3f8f35[_0x57b325(0x1e8)]&&_0x3f8f35[_0x57b325(0x1e8)][_0x57b325(0x172)]>0x0&&(_0xee3b69[_0x57b325(0x1ad)]=_0x3f8f35[_0x57b325(0x1e8)]),Object[_0x57b325(0x1d6)](_0xee3b69)[_0x57b325(0x172)]>0x0&&(_0x502f74['behavior']=_0xee3b69);}return _0x502f74;}export function journeyActivationStepToYaml(_0x19373d,_0x184651,_0x2d2014){const _0x52c370=a102_0x417c,_0x21397c=_0x19373d['attributes'][_0x52c370(0x186)],_0x26370e=_0x21397c['connectionId']||'',_0x107384=_0x2d2014?.[_0x52c370(0x192)](_0x26370e)??_0x26370e,_0x171653={'name':_0x21397c[_0x52c370(0x1eb)]||'','connection':_0x107384};_0x21397c['description']&&(_0x171653['description']=_0x21397c[_0x52c370(0x1f1)]);let _0x1d8fbb=[];_0x21397c['columns']&&_0x21397c[_0x52c370(0x1a7)][_0x52c370(0x172)]>0x0&&(_0x1d8fbb=_0x21397c['columns']['filter'](_0xe4ce29=>_0xe4ce29&&_0xe4ce29[_0x52c370(0x1eb)])[_0x52c370(0x16b)](_0x2bd1bd=>{const _0x364838=_0x52c370;if(_0x2bd1bd[_0x364838(0x1d2)]||_0x2bd1bd[_0x364838(0x19a)])return{'name':_0x2bd1bd[_0x364838(0x1eb)],..._0x2bd1bd[_0x364838(0x1d2)]&&{'type':_0x2bd1bd[_0x364838(0x1d2)]},..._0x2bd1bd[_0x364838(0x19a)]&&{'visibility':_0x2bd1bd[_0x364838(0x19a)]}};return _0x2bd1bd['name'];}));_0x1d8fbb[_0x52c370(0x172)]>0x0&&(_0x171653[_0x52c370(0x1a7)]=_0x1d8fbb);_0x21397c[_0x52c370(0x1ab)]!==undefined&&(_0x21397c[_0x52c370(0x1ab)]===![]&&_0x1d8fbb[_0x52c370(0x172)]===0x0?_0x171653['all_columns']=!![]:_0x171653[_0x52c370(0x1a2)]=_0x21397c[_0x52c370(0x1ab)]);const _0x1144d1={};let _0x150066=![];_0x21397c[_0x52c370(0x1cb)]&&(_0x1144d1['type']=_0x21397c[_0x52c370(0x1cb)],_0x150066=!![]);_0x21397c['repeatUnit']&&(_0x1144d1[_0x52c370(0x191)]=_0x21397c['repeatUnit'],_0x150066=!![]);_0x21397c[_0x52c370(0x17f)]!==undefined&&_0x21397c[_0x52c370(0x17f)]!==null&&(_0x1144d1[_0x52c370(0x179)]=_0x21397c['repeatFrequency'],_0x150066=!![]);_0x21397c[_0x52c370(0x18f)]!==undefined&&(_0x1144d1[_0x52c370(0x1dd)]=_0x21397c[_0x52c370(0x18f)],_0x150066=!![]);_0x21397c[_0x52c370(0x1ce)]!==undefined&&(_0x1144d1[_0x52c370(0x1c6)]=_0x21397c[_0x52c370(0x1ce)],_0x150066=!![]);_0x21397c[_0x52c370(0x1ae)]&&(_0x1144d1[_0x52c370(0x1ae)]=_0x21397c[_0x52c370(0x1ae)],_0x150066=!![]);_0x150066&&(_0x171653[_0x52c370(0x176)]=_0x1144d1);(_0x21397c[_0x52c370(0x1da)]&&_0x21397c[_0x52c370(0x1da)][_0x52c370(0x172)]>0x0||_0x21397c['emailRecipients']&&_0x21397c[_0x52c370(0x182)][_0x52c370(0x172)]>0x0)&&(_0x171653[_0x52c370(0x1a1)]={},_0x21397c['notifyOn']&&_0x21397c[_0x52c370(0x1da)][_0x52c370(0x172)]>0x0&&(_0x171653[_0x52c370(0x1a1)][_0x52c370(0x17c)]=_0x21397c[_0x52c370(0x1da)]),_0x21397c[_0x52c370(0x182)]&&_0x21397c[_0x52c370(0x182)][_0x52c370(0x172)]>0x0&&(_0x171653[_0x52c370(0x1a1)][_0x52c370(0x1c3)]=_0x21397c[_0x52c370(0x182)][_0x52c370(0x16b)](_0x3f96e3=>{const _0x307fdd=_0x52c370,_0x44db45=_0x184651?.[_0x307fdd(0x192)](_0x3f96e3);return _0x44db45??String(_0x3f96e3);})));_0x21397c['connectorConfig']&&Object[_0x52c370(0x1d6)](_0x21397c[_0x52c370(0x178)])[_0x52c370(0x172)]>0x0&&(_0x171653[_0x52c370(0x168)]=normalizeConnectorConfigForYaml(_0x21397c[_0x52c370(0x178)]));_0x21397c[_0x52c370(0x1b0)]&&(_0x171653['activation_template_id']=_0x21397c[_0x52c370(0x1b0)]);if(_0x21397c[_0x52c370(0x1d3)]){const _0x37a614={},_0x158db7=_0x21397c[_0x52c370(0x1d3)];_0x158db7[_0x52c370(0x1a7)]&&_0x158db7['columns'][_0x52c370(0x172)]>0x0&&(_0x37a614['columns']=_0x158db7[_0x52c370(0x1a7)][_0x52c370(0x1b7)](_0x24fab0=>_0x24fab0&&_0x24fab0[_0x52c370(0x1eb)])[_0x52c370(0x16b)](_0x2e007f=>({'name':_0x2e007f[_0x52c370(0x1eb)],..._0x2e007f[_0x52c370(0x1d2)]&&{'type':_0x2e007f[_0x52c370(0x1d2)]},..._0x2e007f[_0x52c370(0x19a)]&&{'visibility':_0x2e007f['visibility']}}))),_0x158db7[_0x52c370(0x1b3)]&&(_0x37a614['behavior_table']=_0x158db7['behaviorTableName']),_0x158db7[_0x52c370(0x1e6)]!==undefined&&(_0x37a614[_0x52c370(0x1b6)]=_0x158db7[_0x52c370(0x1e6)]),_0x158db7['joinStrategy']&&(_0x37a614[_0x52c370(0x1d1)]=_0x158db7[_0x52c370(0x189)]),_0x158db7[_0x52c370(0x198)]&&(_0x37a614[_0x52c370(0x198)]=_0x158db7[_0x52c370(0x198)]),_0x158db7[_0x52c370(0x1e8)]&&_0x158db7['orderBy'][_0x52c370(0x172)]>0x0&&(_0x37a614[_0x52c370(0x1ad)]=_0x158db7[_0x52c370(0x1e8)]),Object[_0x52c370(0x1d6)](_0x37a614)['length']>0x0&&(_0x171653[_0x52c370(0x19d)]=_0x37a614);}return _0x171653;}export function segmentWithActivationsToYaml(_0x2e1555,_0x4a1097,_0x5114b7,_0xcba943,_0x4ce73b){const _0x5b3330=a102_0x417c,_0x695806=segmentResponseToDefSync(_0x2e1555,_0x5114b7);return _0x4a1097[_0x5b3330(0x172)]>0x0&&(_0x695806[_0x5b3330(0x174)]=_0x4a1097[_0x5b3330(0x16b)](_0x8da1b1=>activationResponseToDef(_0x8da1b1,_0xcba943,_0x4ce73b))),_0x695806;}function normalizeColumn(_0x4cbcc2){const _0x409eb3=a102_0x417c;if(typeof _0x4cbcc2===_0x409eb3(0x197))return{'name':_0x4cbcc2};return{'name':_0x4cbcc2['name'],..._0x4cbcc2['type']&&{'type':_0x4cbcc2[_0x409eb3(0x1d2)]},..._0x4cbcc2['visibility']&&{'visibility':_0x4cbcc2[_0x409eb3(0x19a)]}};}export async function activationDefToCreateRequest(_0x5a1ca8,_0x28d891){const _0xcb8e65=a102_0x417c,_0x4d7188=_0x28d891?.[_0xcb8e65(0x1b5)],_0x2d56a6=_0x28d891?.[_0xcb8e65(0x1df)],_0x3f43b3=_0x5a1ca8[_0xcb8e65(0x1ee)];let _0x38efc0;const _0x477439=parseInt(_0x3f43b3,0xa);if(!isNaN(_0x477439)&&String(_0x477439)===_0x3f43b3)_0x38efc0=_0x477439;else{const _0x3ada7c=_0x2d56a6?.[_0xcb8e65(0x192)](_0x3f43b3);if(_0x3ada7c===undefined)throw new SDKError(ErrorCode[_0xcb8e65(0x169)],_0xcb8e65(0x1b1)+_0x3f43b3,undefined,{'helpText':_0xcb8e65(0x1f3)});_0x38efc0=_0x3ada7c;}const _0x68847e={'name':_0x5a1ca8[_0xcb8e65(0x1eb)],'connectionId':_0x38efc0};_0x5a1ca8[_0xcb8e65(0x1f1)]&&(_0x68847e['description']=_0x5a1ca8[_0xcb8e65(0x1f1)]);let _0x359150=[];_0x5a1ca8['columns']&&_0x5a1ca8['columns']['length']>0x0&&(_0x359150=_0x5a1ca8[_0xcb8e65(0x1a7)]['filter'](_0x2e0cfe=>_0x2e0cfe!=null)['map'](normalizeColumn));_0x359150[_0xcb8e65(0x172)]>0x0&&(_0x68847e[_0xcb8e65(0x1a7)]=_0x359150);_0x5a1ca8['all_columns']!==undefined&&(_0x5a1ca8[_0xcb8e65(0x1a2)]===![]&&_0x359150[_0xcb8e65(0x172)]===0x0?_0x68847e['allColumns']=!![]:_0x68847e[_0xcb8e65(0x1ab)]=_0x5a1ca8[_0xcb8e65(0x1a2)]);if(_0x5a1ca8[_0xcb8e65(0x176)]){const _0x3b247c=_0x5a1ca8[_0xcb8e65(0x176)];_0x3b247c[_0xcb8e65(0x1d2)]&&(_0x68847e[_0xcb8e65(0x1cb)]=_0x3b247c[_0xcb8e65(0x1d2)]),_0x3b247c[_0xcb8e65(0x191)]&&(_0x68847e['repeatUnit']=_0x3b247c['repeat_unit']),_0x3b247c[_0xcb8e65(0x179)]!==undefined&&(_0x68847e[_0xcb8e65(0x17f)]=_0x3b247c[_0xcb8e65(0x179)]),_0x3b247c['repeat_sub_frequency']&&(_0x68847e[_0xcb8e65(0x1a9)]=_0x3b247c[_0xcb8e65(0x1e1)]),_0x3b247c[_0xcb8e65(0x1dd)]!==undefined&&(_0x68847e[_0xcb8e65(0x18f)]=_0x3b247c[_0xcb8e65(0x1dd)]),_0x3b247c[_0xcb8e65(0x1c6)]!==undefined&&(_0x68847e[_0xcb8e65(0x1ce)]=_0x3b247c[_0xcb8e65(0x1c6)]),_0x3b247c[_0xcb8e65(0x1ae)]&&(_0x68847e['timezone']=_0x3b247c[_0xcb8e65(0x1ae)]);}_0x5a1ca8[_0xcb8e65(0x1a1)]&&(_0x5a1ca8['notification']['notify_on']&&(_0x68847e[_0xcb8e65(0x1da)]=_0x5a1ca8['notification']['notify_on']),_0x5a1ca8['notification'][_0xcb8e65(0x1c3)]&&(_0x68847e[_0xcb8e65(0x182)]=_0x5a1ca8[_0xcb8e65(0x1a1)][_0xcb8e65(0x1c3)][_0xcb8e65(0x16b)](_0x473f06=>{const _0x33de96=_0xcb8e65,_0x4cfac=Number(_0x473f06);if(!isNaN(_0x4cfac)&&String(_0x4cfac)===_0x473f06)return _0x4cfac;const _0x50c1a6=_0x4d7188?.[_0x33de96(0x192)](_0x473f06[_0x33de96(0x1cd)]());if(_0x50c1a6===undefined)throw new SDKError(ErrorCode[_0x33de96(0x1c4)],_0x33de96(0x16d)+_0x473f06+'.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.');return _0x50c1a6;})));if(_0x5a1ca8[_0xcb8e65(0x168)]){const _0x5002d2=_0x28d891?.[_0xcb8e65(0x1bb)]?.['get'](_0x3f43b3);if(_0x5002d2&&_0x28d891?.[_0xcb8e65(0x1ea)])try{const _0xa5caa5=await _0x28d891[_0xcb8e65(0x1ea)](_0x5002d2),_0xb7aa59=validateConnectorConfig(_0x5a1ca8['connector_config'],_0xa5caa5);if(!_0xb7aa59[_0xcb8e65(0x18a)])throw new SDKError(ErrorCode['CONNECTOR_INVALID_CONFIG'],_0xcb8e65(0x1c1)+_0x5a1ca8[_0xcb8e65(0x1eb)]+_0xcb8e65(0x183)+formatValidationErrors(_0xb7aa59[_0xcb8e65(0x1be)]),undefined,{'helpText':_0xcb8e65(0x190)+_0x5002d2+_0xcb8e65(0x180)+formatSchemaAsHelp(_0xa5caa5)});if(_0xb7aa59[_0xcb8e65(0x1f4)]['length']>0x0){const _0x391723=formatValidationWarnings(_0xb7aa59['warnings']);console[_0xcb8e65(0x1b4)](_0xcb8e65(0x1e5)+_0x5a1ca8[_0xcb8e65(0x1eb)]+_0xcb8e65(0x183)+_0x391723);}_0x68847e['connectorConfig']=transformConfigToLegacy(_0x5a1ca8['connector_config'],_0xa5caa5);}catch(_0x366165){if(_0x366165 instanceof SDKError&&_0x366165[_0xcb8e65(0x1a5)]===ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])_0x68847e['connectorConfig']=_0x5a1ca8[_0xcb8e65(0x168)];else throw _0x366165;}else _0x68847e[_0xcb8e65(0x178)]=_0x5a1ca8[_0xcb8e65(0x168)];}_0x5a1ca8[_0xcb8e65(0x1b9)]!==undefined&&(_0x68847e[_0xcb8e65(0x1b0)]=_0x5a1ca8[_0xcb8e65(0x1b9)]);if(_0x5a1ca8[_0xcb8e65(0x19d)]){const _0x1a1964=_0x5a1ca8[_0xcb8e65(0x19d)],_0x24d495={};if(_0x1a1964[_0xcb8e65(0x1a7)]&&_0x1a1964[_0xcb8e65(0x1a7)][_0xcb8e65(0x172)]>0x0){const _0x479a6f=_0x1a1964['columns'][_0xcb8e65(0x1b7)](_0x2ea298=>_0x2ea298&&_0x2ea298[_0xcb8e65(0x1eb)]);_0x479a6f['length']>0x0&&(_0x24d495[_0xcb8e65(0x1a7)]=_0x479a6f);}_0x1a1964[_0xcb8e65(0x1a4)]&&(_0x24d495[_0xcb8e65(0x1b3)]=_0x1a1964[_0xcb8e65(0x1a4)]),_0x1a1964[_0xcb8e65(0x1b6)]!==undefined&&(_0x24d495[_0xcb8e65(0x1e6)]=_0x1a1964['join_row']),_0x1a1964[_0xcb8e65(0x1d1)]&&(_0x24d495[_0xcb8e65(0x189)]=_0x1a1964[_0xcb8e65(0x1d1)]),_0x1a1964[_0xcb8e65(0x198)]&&(_0x24d495[_0xcb8e65(0x198)]=_0x1a1964[_0xcb8e65(0x198)]),_0x1a1964[_0xcb8e65(0x1ad)]&&(_0x24d495[_0xcb8e65(0x1e8)]=_0x1a1964[_0xcb8e65(0x1ad)]),_0x68847e['syndicationBehavior']=_0x24d495;}return _0x68847e;}export async function activationDefToUpdateRequest(_0x57b68e,_0x4e3a97){return activationDefToCreateRequest(_0x57b68e,_0x4e3a97);}function a102_0x5466(){const _0x6b6bb0=['joinRow','Segment\x20description','orderBy','usedNames','getSchema','name','source','resolveSegmentName','connection','test','groupingColumns','description','TimeWithinNext','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','warnings','].attribute\x20cannot\x20be\x20empty.\x0a','realtime','attribute_name','connector_config','CONNECTION_NOT_FOUND','kind','map','operator','Unknown\x20email\x20recipient:\x20','8786330RMLZBh','null','3KAlrGF','from','length','stringify','activations','5476820qecIBg','schedule','limit','connectorConfig','repeat_frequency','Value','isArray','notify_on','all','values','repeatFrequency','\x0a\x0aAvailable\x20fields:\x0a','set','emailRecipients','\x22:\x0a','670700buABUW','27YJkPnQ','activationParams','batch','2506482dYeIHr','joinStrategy','valid','TimeWithinPast','conditions[','aggregation','unit','startAt','Connector:\x20','repeat_unit','get','visible','duration','entries','rule:','string','formatting','include','visibility','rightValues','exclude','behavior','rule','__SEGMENT_REF__','conditions','notification','all_columns','max','behavior_table','code','And','columns','value','repeatSubFrequency','rightValue','allColumns','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','order_by','timezone','arrayMatching','activationTemplateId','Unknown\x20connection:\x20','YAML\x20config\x20missing\x20required\x20field:\x20name','behaviorTableName','warn','emailToIdMap','join_row','filter','644135etCawz','activation_template_id','has','connectionNameToTypeMap','attribute','activations:','errors','repeatUnit','folder','Invalid\x20connector_config\x20for\x20activation\x20\x22','funnel_stage','email_recipients','INVALID_ARGUMENT','min','end_on','not','4638860SCOWrN','\x27:\x20','add','scheduleType','8644656wxLlGX','toLowerCase','endOn','parse','any','join_strategy','type','syndicationBehavior','leftValue','segment','keys','replace','__UNRESOLVED__','ruleHashToName','notifyOn','2CMtbWq','object','start_at','sort','connectionNameToIdMap','every','repeat_sub_frequency','isVisible','localRuleToName','forEach','connector_config\x20for\x20activation\x20\x22'];a102_0x5466=function(){return _0x6b6bb0;};return a102_0x5466();}export function deepSortObject(_0x315e8f){const _0x70387f=a102_0x417c;if(_0x315e8f===null||typeof _0x315e8f!=='object')return _0x315e8f;if(Array[_0x70387f(0x17b)](_0x315e8f))return _0x315e8f[_0x70387f(0x16b)](deepSortObject)[_0x70387f(0x1de)]((_0x47e77d,_0x438601)=>JSON['stringify'](_0x47e77d)['localeCompare'](JSON[_0x70387f(0x173)](_0x438601)));const _0x242fac={};for(const _0x3867b5 of Object[_0x70387f(0x1d6)](_0x315e8f)[_0x70387f(0x1de)]()){_0x242fac[_0x3867b5]=deepSortObject(_0x315e8f[_0x3867b5]);}return _0x242fac;}export function serializeRule(_0x5610c7){const _0x32ecdb=a102_0x417c;return JSON[_0x32ecdb(0x173)](deepSortObject(_0x5610c7));}export function normalizeRuleForMatching(_0x3019b1){return normalizeConditionsForMatching(_0x3019b1);}function normalizeConditionsForMatching(_0x4a025f){const _0x8ccf58=a102_0x417c;if(_0x4a025f===null||typeof _0x4a025f!==_0x8ccf58(0x1dc))return _0x4a025f;if(Array[_0x8ccf58(0x17b)](_0x4a025f))return _0x4a025f[_0x8ccf58(0x16b)](normalizeConditionsForMatching);const _0x305825=_0x4a025f;if((_0x305825['type']===_0x8ccf58(0x199)||_0x305825[_0x8ccf58(0x1d2)]==='exclude')&&typeof _0x305825[_0x8ccf58(0x1d5)]===_0x8ccf58(0x197))return{..._0x305825,'segment':_0x8ccf58(0x19f)};const _0x96d4e0={};for(const _0x10dfab of Object[_0x8ccf58(0x1d6)](_0x305825)){_0x96d4e0[_0x10dfab]=normalizeConditionsForMatching(_0x305825[_0x10dfab]);}return _0x96d4e0;}export function serializeRuleForMatching(_0x14ab6c){const _0x41622b=a102_0x417c;return JSON[_0x41622b(0x173)](deepSortObject(normalizeRuleForMatching(_0x14ab6c)));}export function expandSegmentReferences(_0x177220,_0x248f2a,_0x21dabf=new Set()){return expandConditions(_0x177220,_0x248f2a,_0x21dabf);}function expandConditions(_0x1578b6,_0x230089,_0x47512c){const _0x347112=a102_0x417c;if(_0x1578b6===null||typeof _0x1578b6!==_0x347112(0x1dc))return _0x1578b6;if(Array[_0x347112(0x17b)](_0x1578b6))return _0x1578b6[_0x347112(0x16b)](_0x17cf94=>expandConditions(_0x17cf94,_0x230089,_0x47512c));const _0x11be2a=_0x1578b6;if((_0x11be2a['type']==='include'||_0x11be2a[_0x347112(0x1d2)]===_0x347112(0x19c))&&typeof _0x11be2a[_0x347112(0x1d5)]===_0x347112(0x197)){const _0x235b6c=_0x11be2a[_0x347112(0x1d5)],_0x4321f4=_0x230089['get'](_0x235b6c);if(_0x4321f4&&!_0x47512c[_0x347112(0x1ba)](_0x235b6c)){const _0x4ba8f2=new Set(_0x47512c);_0x4ba8f2[_0x347112(0x1ca)](_0x235b6c);const _0xe479df=expandConditions(_0x4321f4,_0x230089,_0x4ba8f2);return{'type':_0x11be2a['type'],'expanded_rule':_0xe479df};}return{'type':_0x11be2a['type'],'expanded_rule':_0x347112(0x1d8)};}const _0x54ab28={};for(const _0x26111f of Object[_0x347112(0x1d6)](_0x11be2a)){_0x54ab28[_0x26111f]=expandConditions(_0x11be2a[_0x26111f],_0x230089,_0x47512c);}return _0x54ab28;}export function serializeExpandedRule(_0x4f4527,_0x2cbbeb){const _0x5e2449=a102_0x417c,_0x514d03=expandSegmentReferences(_0x4f4527,_0x2cbbeb);return JSON[_0x5e2449(0x173)](deepSortObject(_0x514d03));}export function createSegmentNameContext(_0x2f4a80){const _0x1994d0=a102_0x417c,_0x2f453b=new Set(),_0x3c4e70=new Map(),_0x33ea31=new Map();if(_0x2f4a80)for(const [_0xc095f5,_0x4b8f60]of Object[_0x1994d0(0x195)](_0x2f4a80)){if(_0x4b8f60[_0x1994d0(0x19e)]){const _0x9eb340=serializeRule(_0x4b8f60[_0x1994d0(0x19e)]);_0x33ea31[_0x1994d0(0x181)](_0x9eb340,_0xc095f5),_0x2f453b[_0x1994d0(0x1ca)](_0xc095f5);}}return{'usedNames':_0x2f453b,'ruleHashToName':_0x3c4e70,'localRuleToName':_0x2f4a80?_0x33ea31:undefined};}export function resolveSegmentName(_0x36bd21,_0x1ceca2,_0x295af7,_0xda6bca){const _0x5ed8d7=a102_0x417c,_0x2bc50f=serializeRule(_0x1ceca2);if(_0x295af7[_0x5ed8d7(0x1e3)]){const _0x138078=_0x295af7['localRuleToName'][_0x5ed8d7(0x192)](_0x2bc50f);if(_0x138078)return{'name':_0x138078,'isDuplicate':![],'isLocalMatch':!![]};}const _0x2333d3=_0x295af7[_0x5ed8d7(0x1d9)][_0x5ed8d7(0x192)](_0x2bc50f);if(_0x2333d3)return{'name':_0x2333d3,'isDuplicate':!![],'isLocalMatch':![]};const _0x461513=_0xda6bca(_0x36bd21);let _0x4785b3=_0x461513||_0x36bd21,_0x517a79=_0x4785b3,_0x429220=0x2;while(_0x295af7['usedNames']['has'](_0x517a79)){_0x517a79=_0x4785b3+'_'+_0x429220,_0x429220++;}return _0x295af7[_0x5ed8d7(0x1e9)][_0x5ed8d7(0x1ca)](_0x517a79),_0x295af7[_0x5ed8d7(0x1d9)][_0x5ed8d7(0x181)](_0x2bc50f,_0x517a79),{'name':_0x517a79,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x88a15d){const _0x4a3076=[],_0x277b6b=_0x1ccf48=>{const _0x311723=a102_0x417c;if(!_0x1ccf48||typeof _0x1ccf48!==_0x311723(0x1dc))return;if(Array['isArray'](_0x1ccf48)){_0x1ccf48[_0x311723(0x1e4)](_0x277b6b);return;}const _0x329e06=_0x1ccf48;(_0x329e06[_0x311723(0x1d2)]===_0x311723(0x199)||_0x329e06['type']===_0x311723(0x19c))&&typeof _0x329e06['segment']===_0x311723(0x197)&&_0x4a3076['push'](_0x329e06[_0x311723(0x1d5)]);for(const _0x14c95b of Object[_0x311723(0x17e)](_0x329e06)){_0x277b6b(_0x14c95b);}};return _0x277b6b(_0x88a15d),_0x4a3076;}export function validateSegmentRule(_0xfad4a2,_0x57c87e){const _0x6edfbd=a102_0x417c;if(!_0x57c87e||!_0x57c87e[_0x6edfbd(0x1a0)])return;for(let _0x18509a=0x0;_0x18509a<_0x57c87e[_0x6edfbd(0x1a0)][_0x6edfbd(0x172)];_0x18509a++){const _0xa6857a=_0x57c87e['conditions'][_0x18509a];if('type'in _0xa6857a&&_0xa6857a[_0x6edfbd(0x1d2)]===_0x6edfbd(0x17a)){const _0x191a83=_0xa6857a;if(!_0x191a83[_0x6edfbd(0x1bc)]||_0x191a83[_0x6edfbd(0x1bc)]==='')throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x6edfbd(0x1ac)+_0xfad4a2+_0x6edfbd(0x1c9)+(_0x6edfbd(0x18c)+_0x18509a+_0x6edfbd(0x1f5))+'Please\x20specify\x20a\x20valid\x20attribute\x20name.');}}}
@@ -1 +1 @@
1
- (function(_0x5f9aab,_0x482ced){const _0x20f52f=a103_0x27a1,_0x2b6f1a=_0x5f9aab();while(!![]){try{const _0x2e5824=-parseInt(_0x20f52f(0x115))/0x1*(-parseInt(_0x20f52f(0x131))/0x2)+-parseInt(_0x20f52f(0x10e))/0x3+parseInt(_0x20f52f(0x134))/0x4+parseInt(_0x20f52f(0x13b))/0x5*(-parseInt(_0x20f52f(0x11f))/0x6)+-parseInt(_0x20f52f(0x139))/0x7*(-parseInt(_0x20f52f(0x113))/0x8)+parseInt(_0x20f52f(0x12a))/0x9+parseInt(_0x20f52f(0x135))/0xa*(parseInt(_0x20f52f(0x11c))/0xb);if(_0x2e5824===_0x482ced)break;else _0x2b6f1a['push'](_0x2b6f1a['shift']());}catch(_0x2e73b9){_0x2b6f1a['push'](_0x2b6f1a['shift']());}}}(a103_0x272e,0x73a41));import a103_0x27aafd from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a103_0x272e(){const _0x3c1b65=['Schema\x20query:\x0a','2167YPYsIN','column_name','type','24LZwoPx','displayName','data','replace','varchar','setJobId','parentColumn','YES','bold','null','set','4748031ISladt','behaviorName','get','localeCompare','groupingName','Fetching\x20schema...','slice','229644KlHGnR','push','dim','1390624AjLXgv','10940vXbRie','query','filter','tableName','2047073OHIveC','startsWith','1177965LzUgud','\x20\x20\x20\x20','entries','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','extra','name','2657133xAmCNA','sort','cyan','default','Behaviors','8PdAnpp','error','8zQJHOj','parentTableName','length','verbose','fields','Unknown'];a103_0x272e=function(){return _0x3c1b65;};return a103_0x272e();}export function buildSchemaResult(_0x33821b){const _0x4044bb=a103_0x27a1,_0x393c90=_0x33821b['columns']['map'](_0x44b61e=>({'column_name':_0x44b61e[_0x4044bb(0x10d)],'column_type':_0x44b61e['type'],'null':_0x4044bb(0x126),'key':null,'default':null,'extra':null}));return{..._0x33821b,'columns':[{'name':_0x4044bb(0x11d),'type':_0x4044bb(0x123)},{'name':'column_type','type':_0x4044bb(0x123)},{'name':_0x4044bb(0x128),'type':'varchar'},{'name':'key','type':'varchar'},{'name':_0x4044bb(0x111),'type':_0x4044bb(0x123)},{'name':_0x4044bb(0x10c),'type':'varchar'}],'data':_0x393c90};}export async function executeSchemaQuery(_0x8527a9,_0xf8829b,_0x1c0f0f){const _0x3547e4=a103_0x27a1,_0x15f6ac=_0x8527a9['trim']()[_0x3547e4(0x122)](/;+$/,''),_0x5d3d14='SELECT\x20*\x20FROM\x20(\x0a'+_0x15f6ac+_0x3547e4(0x10b);_0x1c0f0f[_0x3547e4(0x118)]&&console[_0x3547e4(0x114)](_0x3547e4(0x11b)+_0x5d3d14);const _0x326796=await withProgressSpinner(_0x3547e4(0x12f),async _0x562aad=>{const _0x143d7d=_0x3547e4,_0x255c51=await _0xf8829b[_0x143d7d(0x136)]['execute'](_0x5d3d14,{'catalog':'td','schema':'information_schema','onJobId':_0x3844fc=>{const _0x2356ab=_0x143d7d;_0x562aad[_0x2356ab(0x124)](_0x3844fc);}});return _0x255c51;},{'verbose':_0x1c0f0f[_0x3547e4(0x118)]});return buildSchemaResult(_0x326796[_0x3547e4(0x121)]);}function a103_0x27a1(_0x2f4592,_0x59036b){_0x2f4592=_0x2f4592-0x10a;const _0x272e78=a103_0x272e();let _0x27a1f5=_0x272e78[_0x2f4592];return _0x27a1f5;}export function displayFieldsHumanReadable(_0x4119d1,_0x3818e8){const _0x506ddf=a103_0x27a1,_0x3b7c00=_0x4119d1[_0x506ddf(0x137)](_0x1f368f=>_0x1f368f['source']==='attribute'),_0x5b8d0c=_0x4119d1['filter'](_0x2e35af=>_0x2e35af['source']==='behavior'),_0x28a619=new Map();for(const _0x786280 of _0x3b7c00){const _0x4a37d4=_0x786280[_0x506ddf(0x12e)]||_0x786280['parentTableName']||_0x506ddf(0x11a),_0xaf8656=_0x28a619[_0x506ddf(0x12c)](_0x4a37d4);_0xaf8656?_0xaf8656['fields'][_0x506ddf(0x132)](_0x786280):_0x28a619[_0x506ddf(0x129)](_0x4a37d4,{'displayName':_0x4a37d4,'tableName':_0x786280[_0x506ddf(0x116)],'fields':[_0x786280]});}const _0x238fda=new Map();for(const _0x2d7c55 of _0x5b8d0c){const _0x27e1f5=_0x2d7c55[_0x506ddf(0x12b)]||_0x506ddf(0x11a),_0x321206=_0x238fda['get'](_0x27e1f5)||[];_0x321206['push'](_0x2d7c55),_0x238fda[_0x506ddf(0x129)](_0x27e1f5,_0x321206);}console[_0x506ddf(0x114)]('\x0a'+a103_0x27aafd[_0x506ddf(0x127)](_0x3818e8));if(_0x28a619['size']>0x0){console[_0x506ddf(0x114)]('\x0a'+a103_0x27aafd[_0x506ddf(0x133)]('Attributes'));const _0x4340b6=[..._0x28a619['entries']()][_0x506ddf(0x10f)]((_0x4416a9,_0x4cb99d)=>_0x4416a9[0x0][_0x506ddf(0x12d)](_0x4cb99d[0x0]));for(const [,_0x1033fb]of _0x4340b6){const _0x410d9e=_0x1033fb[_0x506ddf(0x138)]&&_0x1033fb[_0x506ddf(0x138)]!==_0x1033fb[_0x506ddf(0x120)]?'\x20'+a103_0x27aafd[_0x506ddf(0x133)]('('+_0x1033fb['tableName']+')'):'';console[_0x506ddf(0x114)]('\x20\x20'+a103_0x27aafd[_0x506ddf(0x127)](_0x1033fb['displayName'])+_0x410d9e);const _0x1ab7e6=[..._0x1033fb[_0x506ddf(0x119)]][_0x506ddf(0x10f)]((_0x280d3a,_0x3598e8)=>_0x280d3a[_0x506ddf(0x10d)][_0x506ddf(0x12d)](_0x3598e8['name']));for(const _0x2b9dbe of _0x1ab7e6){const _0x28cad4=_0x2b9dbe[_0x506ddf(0x125)]&&_0x2b9dbe[_0x506ddf(0x125)]!==_0x2b9dbe['name']?'\x20'+a103_0x27aafd[_0x506ddf(0x133)]('('+_0x2b9dbe['parentColumn']+')'):'';console['error']('\x20\x20\x20\x20'+_0x2b9dbe[_0x506ddf(0x10d)]+_0x28cad4+':\x20'+a103_0x27aafd[_0x506ddf(0x110)](_0x2b9dbe[_0x506ddf(0x11e)]));}}}if(_0x238fda['size']>0x0){console[_0x506ddf(0x114)]('\x0a'+a103_0x27aafd['dim'](_0x506ddf(0x112)));const _0xa0e70d=[..._0x238fda[_0x506ddf(0x10a)]()][_0x506ddf(0x10f)]((_0x29cc2b,_0x5d4f8a)=>_0x29cc2b[0x0][_0x506ddf(0x12d)](_0x5d4f8a[0x0]));for(const [_0x40cd13,_0x5d4033]of _0xa0e70d){const _0x384bf0=_0x5d4033[0x0],_0x577f4b=_0x384bf0?.['parentTableName']||'';console['error']('\x20\x20'+a103_0x27aafd[_0x506ddf(0x127)](_0x40cd13)+(_0x577f4b?'\x20'+a103_0x27aafd['dim']('('+_0x577f4b+')'):''));const _0xac325c=[..._0x5d4033][_0x506ddf(0x10f)]((_0x2175f0,_0x16132f)=>_0x2175f0[_0x506ddf(0x10d)]['localeCompare'](_0x16132f[_0x506ddf(0x10d)]));for(const _0x4e5e9f of _0xac325c){const _0x2e3f45=_0x4e5e9f['name'][_0x506ddf(0x13a)](_0x40cd13+'.')?_0x4e5e9f[_0x506ddf(0x10d)][_0x506ddf(0x130)](_0x40cd13[_0x506ddf(0x117)]+0x1):_0x4e5e9f['name'],_0x330059=_0x4e5e9f[_0x506ddf(0x125)]&&_0x4e5e9f['parentColumn']!==_0x2e3f45?'\x20'+a103_0x27aafd[_0x506ddf(0x133)]('('+_0x4e5e9f[_0x506ddf(0x125)]+')'):'';console[_0x506ddf(0x114)](_0x506ddf(0x13c)+_0x2e3f45+_0x330059+':\x20'+a103_0x27aafd[_0x506ddf(0x110)](_0x4e5e9f['type']));}}}console[_0x506ddf(0x114)]('');}
1
+ (function(_0x3fac7e,_0x37aca4){const _0x59116a=a103_0x1599,_0x2a9da3=_0x3fac7e();while(!![]){try{const _0x44e19a=-parseInt(_0x59116a(0xf4))/0x1*(parseInt(_0x59116a(0x104))/0x2)+-parseInt(_0x59116a(0x12a))/0x3*(parseInt(_0x59116a(0x11e))/0x4)+parseInt(_0x59116a(0xf7))/0x5+parseInt(_0x59116a(0xf5))/0x6*(-parseInt(_0x59116a(0x11f))/0x7)+parseInt(_0x59116a(0xff))/0x8+-parseInt(_0x59116a(0xfc))/0x9+parseInt(_0x59116a(0x129))/0xa;if(_0x44e19a===_0x37aca4)break;else _0x2a9da3['push'](_0x2a9da3['shift']());}catch(_0x55de8c){_0x2a9da3['push'](_0x2a9da3['shift']());}}}(a103_0x1290,0xf39e4));import a103_0x53c442 from'chalk';function a103_0x1290(){const _0x108c23=['Attributes','name','extra','attribute','fields','length','sort','localeCompare','replace','slice','trim','null','error','displayName','columns','default','Behaviors','SELECT\x20*\x20FROM\x20(\x0a','dim','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','4adPGWZ','882679CwpxWB','Unknown','parentTableName','Schema\x20query:\x0a','set','varchar','tableName','type','startsWith','filter','26181540sCbIJP','1367997ryAdGN','size','454056zdWcwJ','24HRdbEo','YES','621750cRfBQB','get','bold','parentColumn','column_name','6494958iQUSfN','cyan','data','3131688dkivSw','groupingName','push','entries','setJobId','2ONJlyQ','behavior','\x20\x20\x20\x20','Fetching\x20schema...','source','map'];a103_0x1290=function(){return _0x108c23;};return a103_0x1290();}function a103_0x1599(_0x17b790,_0xdc51d3){_0x17b790=_0x17b790-0xf4;const _0x1290f3=a103_0x1290();let _0x15995b=_0x1290f3[_0x17b790];return _0x15995b;}import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x8f1aa4){const _0x19e050=a103_0x1599,_0x54c541=_0x8f1aa4[_0x19e050(0x118)][_0x19e050(0x109)](_0x4a7387=>({'column_name':_0x4a7387[_0x19e050(0x10b)],'column_type':_0x4a7387[_0x19e050(0x126)],'null':_0x19e050(0xf6),'key':null,'default':null,'extra':null}));return{..._0x8f1aa4,'columns':[{'name':_0x19e050(0xfb),'type':_0x19e050(0x124)},{'name':'column_type','type':_0x19e050(0x124)},{'name':_0x19e050(0x115),'type':_0x19e050(0x124)},{'name':'key','type':'varchar'},{'name':_0x19e050(0x119),'type':'varchar'},{'name':_0x19e050(0x10c),'type':_0x19e050(0x124)}],'data':_0x54c541};}export async function executeSchemaQuery(_0x99c9f,_0x1a7fe6,_0x553310){const _0x2765ed=a103_0x1599,_0x25437c=_0x99c9f[_0x2765ed(0x114)]()[_0x2765ed(0x112)](/;+$/,''),_0x455060=_0x2765ed(0x11b)+_0x25437c+_0x2765ed(0x11d);_0x553310['verbose']&&console[_0x2765ed(0x116)](_0x2765ed(0x122)+_0x455060);const _0x398041=await withProgressSpinner(_0x2765ed(0x107),async _0x5df3e4=>{const _0x10d2a2=await _0x1a7fe6['query']['execute'](_0x455060,{'catalog':'td','schema':'information_schema','onJobId':_0x40d05d=>{const _0x547bf6=a103_0x1599;_0x5df3e4[_0x547bf6(0x103)](_0x40d05d);}});return _0x10d2a2;},{'verbose':_0x553310['verbose']});return buildSchemaResult(_0x398041[_0x2765ed(0xfe)]);}export function displayFieldsHumanReadable(_0x4880dc,_0x1b63f7){const _0x3555f9=a103_0x1599,_0x2dca39=_0x4880dc[_0x3555f9(0x128)](_0x74db29=>_0x74db29['source']===_0x3555f9(0x10d)),_0x32c5ff=_0x4880dc[_0x3555f9(0x128)](_0x20b2bc=>_0x20b2bc[_0x3555f9(0x108)]===_0x3555f9(0x105)),_0x15fdd5=new Map();for(const _0x1f8813 of _0x2dca39){const _0x509330=_0x1f8813[_0x3555f9(0x100)]||_0x1f8813['parentTableName']||'Unknown',_0x46d826=_0x15fdd5[_0x3555f9(0xf8)](_0x509330);_0x46d826?_0x46d826[_0x3555f9(0x10e)][_0x3555f9(0x101)](_0x1f8813):_0x15fdd5[_0x3555f9(0x123)](_0x509330,{'displayName':_0x509330,'tableName':_0x1f8813[_0x3555f9(0x121)],'fields':[_0x1f8813]});}const _0x5a477a=new Map();for(const _0x4006a0 of _0x32c5ff){const _0x560765=_0x4006a0['behaviorName']||_0x3555f9(0x120),_0xcf4abe=_0x5a477a[_0x3555f9(0xf8)](_0x560765)||[];_0xcf4abe[_0x3555f9(0x101)](_0x4006a0),_0x5a477a['set'](_0x560765,_0xcf4abe);}console[_0x3555f9(0x116)]('\x0a'+a103_0x53c442[_0x3555f9(0xf9)](_0x1b63f7));if(_0x15fdd5[_0x3555f9(0x12b)]>0x0){console[_0x3555f9(0x116)]('\x0a'+a103_0x53c442[_0x3555f9(0x11c)](_0x3555f9(0x10a)));const _0x55d17c=[..._0x15fdd5[_0x3555f9(0x102)]()]['sort']((_0x4e5911,_0x1b8b50)=>_0x4e5911[0x0]['localeCompare'](_0x1b8b50[0x0]));for(const [,_0x4dc4c6]of _0x55d17c){const _0x142815=_0x4dc4c6[_0x3555f9(0x125)]&&_0x4dc4c6[_0x3555f9(0x125)]!==_0x4dc4c6[_0x3555f9(0x117)]?'\x20'+a103_0x53c442[_0x3555f9(0x11c)]('('+_0x4dc4c6['tableName']+')'):'';console[_0x3555f9(0x116)]('\x20\x20'+a103_0x53c442[_0x3555f9(0xf9)](_0x4dc4c6[_0x3555f9(0x117)])+_0x142815);const _0x1d2cea=[..._0x4dc4c6[_0x3555f9(0x10e)]][_0x3555f9(0x110)]((_0x54cb59,_0x5b3502)=>_0x54cb59[_0x3555f9(0x10b)][_0x3555f9(0x111)](_0x5b3502[_0x3555f9(0x10b)]));for(const _0x2233cd of _0x1d2cea){const _0x5edbda=_0x2233cd['parentColumn']&&_0x2233cd[_0x3555f9(0xfa)]!==_0x2233cd['name']?'\x20'+a103_0x53c442[_0x3555f9(0x11c)]('('+_0x2233cd[_0x3555f9(0xfa)]+')'):'';console['error'](_0x3555f9(0x106)+_0x2233cd[_0x3555f9(0x10b)]+_0x5edbda+':\x20'+a103_0x53c442[_0x3555f9(0xfd)](_0x2233cd[_0x3555f9(0x126)]));}}}if(_0x5a477a[_0x3555f9(0x12b)]>0x0){console[_0x3555f9(0x116)]('\x0a'+a103_0x53c442[_0x3555f9(0x11c)](_0x3555f9(0x11a)));const _0x11f748=[..._0x5a477a[_0x3555f9(0x102)]()]['sort']((_0x1aa328,_0x2715fa)=>_0x1aa328[0x0][_0x3555f9(0x111)](_0x2715fa[0x0]));for(const [_0x3ec95b,_0x1df661]of _0x11f748){const _0x1a3b20=_0x1df661[0x0],_0x524c7a=_0x1a3b20?.[_0x3555f9(0x121)]||'';console[_0x3555f9(0x116)]('\x20\x20'+a103_0x53c442[_0x3555f9(0xf9)](_0x3ec95b)+(_0x524c7a?'\x20'+a103_0x53c442[_0x3555f9(0x11c)]('('+_0x524c7a+')'):''));const _0x458e43=[..._0x1df661][_0x3555f9(0x110)]((_0x25dca8,_0xef87d3)=>_0x25dca8[_0x3555f9(0x10b)][_0x3555f9(0x111)](_0xef87d3['name']));for(const _0x2b7ace of _0x458e43){const _0x449478=_0x2b7ace[_0x3555f9(0x10b)][_0x3555f9(0x127)](_0x3ec95b+'.')?_0x2b7ace['name'][_0x3555f9(0x113)](_0x3ec95b[_0x3555f9(0x10f)]+0x1):_0x2b7ace[_0x3555f9(0x10b)],_0x386560=_0x2b7ace[_0x3555f9(0xfa)]&&_0x2b7ace['parentColumn']!==_0x449478?'\x20'+a103_0x53c442[_0x3555f9(0x11c)]('('+_0x2b7ace['parentColumn']+')'):'';console[_0x3555f9(0x116)](_0x3555f9(0x106)+_0x449478+_0x386560+':\x20'+a103_0x53c442['cyan'](_0x2b7ace[_0x3555f9(0x126)]));}}}console['error']('');}
@@ -1 +1 @@
1
- (function(_0x3a814b,_0x4708e2){const _0x29710=a104_0x55c1,_0x540dcc=_0x3a814b();while(!![]){try{const _0x5911b4=-parseInt(_0x29710(0x1f9))/0x1*(parseInt(_0x29710(0x200))/0x2)+-parseInt(_0x29710(0x1f0))/0x3+-parseInt(_0x29710(0x1fa))/0x4*(parseInt(_0x29710(0x1ee))/0x5)+-parseInt(_0x29710(0x1f4))/0x6+-parseInt(_0x29710(0x1fc))/0x7*(-parseInt(_0x29710(0x1f6))/0x8)+-parseInt(_0x29710(0x1f2))/0x9*(parseInt(_0x29710(0x1f8))/0xa)+parseInt(_0x29710(0x1f7))/0xb;if(_0x5911b4===_0x4708e2)break;else _0x540dcc['push'](_0x540dcc['shift']());}catch(_0x3076ee){_0x540dcc['push'](_0x540dcc['shift']());}}}(a104_0x36e7,0x7dac7));function a104_0x55c1(_0x5e87ec,_0x4f25c8){_0x5e87ec=_0x5e87ec-0x1ed;const _0x36e7e2=a104_0x36e7();let _0x55c164=_0x36e7e2[_0x5e87ec];return _0x55c164;}import{readdirSync,statSync}from'fs';import a104_0x3ac129 from'path';export function findYamlFiles(_0x16e829){const _0x1c1f36=[];function _0x2cf1f1(_0x4b98f5){const _0x1f88ec=a104_0x55c1,_0x561b8a=readdirSync(_0x4b98f5,{'withFileTypes':!![]});for(const _0x2b1199 of _0x561b8a){const _0x9cc682=a104_0x3ac129[_0x1f88ec(0x1f1)](_0x4b98f5,_0x2b1199['name']);if(_0x2b1199['isDirectory']())_0x2cf1f1(_0x9cc682);else(_0x2b1199[_0x1f88ec(0x1f5)][_0x1f88ec(0x1fe)](_0x1f88ec(0x1ed))||_0x2b1199[_0x1f88ec(0x1f5)]['endsWith'](_0x1f88ec(0x1fd)))&&_0x1c1f36['push'](_0x9cc682);}}return _0x2cf1f1(_0x16e829),_0x1c1f36;}function a104_0x36e7(){const _0x2d427e=['1091877rigWoE','join','63diIwam','map','5679666CaFxYC','name','136EWIooF','29524990YNlAUp','898290XUTJDx','13831eVmfzp','16rkZHbh','isFile','220521oNnwMv','.yaml','endsWith','relative','14WHajjK','.yml','835865KndHKB','toLowerCase'];a104_0x36e7=function(){return _0x2d427e;};return a104_0x36e7();}export function discoverYamlFiles(_0x1d7876){const _0x2d6446=a104_0x55c1,_0x2c4332=findYamlFiles(_0x1d7876);return _0x2c4332[_0x2d6446(0x1f3)](_0x44c14b=>{const _0x46e50c=_0x2d6446,_0x1d1347=a104_0x3ac129[_0x46e50c(0x1ff)](_0x1d7876,_0x44c14b),_0x5bec48=a104_0x3ac129['dirname'](_0x1d1347);return{'absolutePath':_0x44c14b,'relativePath':_0x1d1347,'folderPath':_0x5bec48==='.'?'':_0x5bec48};});}export function isYamlFile(_0xb534e4){const _0x2bac9e=a104_0x55c1;try{const _0x59a5cf=statSync(_0xb534e4);if(!_0x59a5cf[_0x2bac9e(0x1fb)]())return![];const _0x180106=a104_0x3ac129['extname'](_0xb534e4)[_0x2bac9e(0x1ef)]();return _0x180106===_0x2bac9e(0x1ed)||_0x180106===_0x2bac9e(0x1fd);}catch{return![];}}
1
+ function a104_0x3607(_0x3c3dba,_0x2c4aeb){_0x3c3dba=_0x3c3dba-0x15d;const _0x2872ba=a104_0x2872();let _0x3607ca=_0x2872ba[_0x3c3dba];return _0x3607ca;}(function(_0x2e427b,_0x1e3125){const _0x4bf795=a104_0x3607,_0x27efc3=_0x2e427b();while(!![]){try{const _0x5a5d83=parseInt(_0x4bf795(0x16c))/0x1*(-parseInt(_0x4bf795(0x164))/0x2)+-parseInt(_0x4bf795(0x166))/0x3*(-parseInt(_0x4bf795(0x16f))/0x4)+parseInt(_0x4bf795(0x16d))/0x5*(-parseInt(_0x4bf795(0x16a))/0x6)+-parseInt(_0x4bf795(0x170))/0x7+parseInt(_0x4bf795(0x163))/0x8+-parseInt(_0x4bf795(0x162))/0x9*(parseInt(_0x4bf795(0x165))/0xa)+parseInt(_0x4bf795(0x169))/0xb;if(_0x5a5d83===_0x1e3125)break;else _0x27efc3['push'](_0x27efc3['shift']());}catch(_0x39e6d5){_0x27efc3['push'](_0x27efc3['shift']());}}}(a104_0x2872,0xbac6c));function a104_0x2872(){const _0x55d8b3=['relative','23723gRiUNR','190GeBNRK','name','26732hiOgkF','10082226qVVCUm','isFile','toLowerCase','map','.yaml','dirname','.yml','1017oCYWnf','5589040kJNWYm','118TcakSM','83090CciWUd','291KOIElP','join','endsWith','47580863pBSwre','178182dqqSvI'];a104_0x2872=function(){return _0x55d8b3;};return a104_0x2872();}import{readdirSync,statSync}from'fs';import a104_0x466132 from'path';export function findYamlFiles(_0x17ce33){const _0x58699f=[];function _0x385955(_0x4e0bdb){const _0x10a3b5=a104_0x3607,_0x280815=readdirSync(_0x4e0bdb,{'withFileTypes':!![]});for(const _0xf3552c of _0x280815){const _0x3286a4=a104_0x466132[_0x10a3b5(0x167)](_0x4e0bdb,_0xf3552c[_0x10a3b5(0x16e)]);if(_0xf3552c['isDirectory']())_0x385955(_0x3286a4);else(_0xf3552c[_0x10a3b5(0x16e)][_0x10a3b5(0x168)]('.yml')||_0xf3552c[_0x10a3b5(0x16e)][_0x10a3b5(0x168)](_0x10a3b5(0x15f)))&&_0x58699f['push'](_0x3286a4);}}return _0x385955(_0x17ce33),_0x58699f;}export function discoverYamlFiles(_0x46257f){const _0x24aada=a104_0x3607,_0xc20088=findYamlFiles(_0x46257f);return _0xc20088[_0x24aada(0x15e)](_0x24739b=>{const _0x3df3a3=_0x24aada,_0x1be93a=a104_0x466132[_0x3df3a3(0x16b)](_0x46257f,_0x24739b),_0x5883ce=a104_0x466132[_0x3df3a3(0x160)](_0x1be93a);return{'absolutePath':_0x24739b,'relativePath':_0x1be93a,'folderPath':_0x5883ce==='.'?'':_0x5883ce};});}export function isYamlFile(_0xd933a0){const _0x53b5d8=a104_0x3607;try{const _0xe584f2=statSync(_0xd933a0);if(!_0xe584f2[_0x53b5d8(0x171)]())return![];const _0x218566=a104_0x466132['extname'](_0xd933a0)[_0x53b5d8(0x15d)]();return _0x218566===_0x53b5d8(0x161)||_0x218566===_0x53b5d8(0x15f);}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x4b6b40,_0xb56177){const _0x28c7b1=a105_0x11ba,_0x56b585=_0x4b6b40();while(!![]){try{const _0x268c88=parseInt(_0x28c7b1(0x9d))/0x1*(parseInt(_0x28c7b1(0xa9))/0x2)+-parseInt(_0x28c7b1(0x98))/0x3+parseInt(_0x28c7b1(0x90))/0x4+-parseInt(_0x28c7b1(0x71))/0x5*(-parseInt(_0x28c7b1(0x6c))/0x6)+parseInt(_0x28c7b1(0x95))/0x7*(-parseInt(_0x28c7b1(0x82))/0x8)+parseInt(_0x28c7b1(0x8c))/0x9*(-parseInt(_0x28c7b1(0x7e))/0xa)+parseInt(_0x28c7b1(0x9c))/0xb;if(_0x268c88===_0xb56177)break;else _0x56b585['push'](_0x56b585['shift']());}catch(_0x12ab2e){_0x56b585['push'](_0x56b585['shift']());}}}(a105_0x2848,0xd469f));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x4448f7){const _0x584de0=a105_0x11ba;return _0x4448f7[_0x584de0(0x75)]()[_0x584de0(0x97)](/\s+/g,'_')[_0x584de0(0x97)](/[^a-z0-9_]/g,'')[_0x584de0(0x97)](/_+/g,'_')[_0x584de0(0x97)](/^_|_$/g,'');}export function generateJourneyLocalName(_0x34c9ab){const _0x44471f=a105_0x11ba,_0x11696d=_0x34c9ab[_0x44471f(0x87)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x11696d){const _0x3a3d2b=_0x11696d[0x1][_0x44471f(0x75)](),_0x5d9167=_0x11696d[0x2],_0x38030c=_0x5d9167[_0x44471f(0x97)](/-/g,'')[_0x44471f(0xb6)](0x0,0x4)[_0x44471f(0x75)]();return _0x3a3d2b+'_'+_0x38030c;}const _0x297d78=_0x34c9ab[_0x44471f(0x87)](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x297d78){const _0x4cae6e=_0x297d78[0x1],_0x2564d4=_0x297d78[0x2][_0x44471f(0x75)](),_0xadbac9=_0x4cae6e[_0x44471f(0x97)](/-/g,'')[_0x44471f(0xb6)](0x0,0x4)[_0x44471f(0x75)]();return _0x2564d4+'_'+_0xadbac9;}return undefined;}function stableStringify(_0x45bb25){const _0x5d3469=a105_0x11ba;if(Array[_0x5d3469(0x6b)](_0x45bb25))return'['+_0x45bb25['map'](_0x223092=>stableStringify(_0x223092))[_0x5d3469(0xb9)](',')+']';if(_0x45bb25&&typeof _0x45bb25===_0x5d3469(0x8e)){const _0x4dc0d2=_0x45bb25,_0x30ca8b=Object[_0x5d3469(0xa1)](_0x4dc0d2)['sort'](),_0x5e6bb9=_0x30ca8b[_0x5d3469(0xa8)](_0x9d4fb8=>'\x22'+_0x9d4fb8+'\x22:'+stableStringify(_0x4dc0d2[_0x9d4fb8]));return'{'+_0x5e6bb9['join'](',')+'}';}const _0x1004e1=JSON['stringify'](_0x45bb25);return _0x1004e1===undefined?'null':_0x1004e1;}export function consolidateActivationsByContent(_0xd08761){const _0x4f2660=a105_0x11ba,_0x5c5f9c={},_0xfb68ae=new Map(),_0x5a229d=new Map();for(const _0x9dfef1 of _0xd08761){if(!_0x9dfef1)continue;for(const [_0x569f08,_0x4fa946]of Object['entries'](_0x9dfef1)){const _0x5ea4b5={'connection':_0x4fa946[_0x4f2660(0x7f)],..._0x4fa946[_0x4f2660(0xb0)]!==undefined&&{'all_columns':_0x4fa946['all_columns']},..._0x4fa946[_0x4f2660(0x99)]!==undefined&&{'columns':_0x4fa946[_0x4f2660(0x99)]},..._0x4fa946[_0x4f2660(0x80)]!==undefined&&{'behavior':_0x4fa946['behavior']},..._0x4fa946[_0x4f2660(0x77)]!==undefined&&{'schedule':_0x4fa946[_0x4f2660(0x77)]},..._0x4fa946['notification']!==undefined&&{'notification':_0x4fa946['notification']},..._0x4fa946[_0x4f2660(0xa3)]!==undefined&&{'connector_config':_0x4fa946[_0x4f2660(0xa3)]},..._0x4fa946[_0x4f2660(0x72)]!==undefined&&{'activation_template_id':_0x4fa946['activation_template_id']}},_0x18ec9c=stableStringify(_0x5ea4b5),_0x4238aa=_0x5a229d['get'](_0x18ec9c);_0x4238aa?_0xfb68ae[_0x4f2660(0x74)](_0x569f08,_0x4238aa):(_0x5c5f9c[_0x569f08]=_0x4fa946,_0xfb68ae[_0x4f2660(0x74)](_0x569f08,_0x569f08),_0x5a229d[_0x4f2660(0x74)](_0x18ec9c,_0x569f08));}}return{'merged':_0x5c5f9c,'nameMapping':_0xfb68ae};}export function updateActivationReferences(_0x4ced97,_0x8e15af){const _0x5a2196=a105_0x11ba;if(!_0x4ced97)return;for(const _0x986a81 of _0x4ced97){if(!_0x986a81[_0x5a2196(0x9a)])continue;for(const _0x338a97 of _0x986a81['steps']){if(_0x338a97[_0x5a2196(0x78)]==='activation'&&_0x338a97[_0x5a2196(0x9b)]?.['activation']){const _0xc95027=_0x8e15af[_0x5a2196(0x6f)](_0x338a97[_0x5a2196(0x9b)][_0x5a2196(0x6e)]);_0xc95027&&_0xc95027!==_0x338a97[_0x5a2196(0x9b)][_0x5a2196(0x6e)]&&(_0x338a97[_0x5a2196(0x9b)][_0x5a2196(0x6e)]=_0xc95027);}}}}export function consolidateSegmentsByContent(_0xf30344,_0x46242e){const _0x5cb569=a105_0x11ba,_0x3dfd39={},_0x4e1782=new Map(),_0x4c30f6=new Map();for(const _0x86b0ed of _0xf30344){if(!_0x86b0ed)continue;for(const [_0x437cc7,_0x39bf67]of Object[_0x5cb569(0xa4)](_0x86b0ed)){if(!_0x39bf67[_0x5cb569(0xaa)]){_0x3dfd39[_0x437cc7]=_0x39bf67,_0x4e1782['set'](_0x437cc7,_0x437cc7);continue;}const _0x97ef0d=_0x39bf67[_0x5cb569(0x70)]&&_0x39bf67[_0x5cb569(0x70)][_0x5cb569(0x7b)]()?_0x39bf67[_0x5cb569(0x70)]:undefined,_0x485a20=JSON[_0x5cb569(0xb7)]({'description':_0x97ef0d,'rule':deepSortObject(_0x39bf67[_0x5cb569(0xaa)])}),_0x105f9e=_0x4c30f6['get'](_0x485a20);if(_0x105f9e){const _0x3d65c2={..._0x39bf67[_0x5cb569(0x70)]!==undefined&&{'description':_0x39bf67[_0x5cb569(0x70)]},'rule':_0x39bf67[_0x5cb569(0xaa)]?deepSortObject(_0x39bf67[_0x5cb569(0xaa)]):_0x39bf67[_0x5cb569(0xaa)]};if(_0x437cc7<_0x105f9e){_0x3dfd39[_0x437cc7]=_0x3d65c2,delete _0x3dfd39[_0x105f9e];for(const [_0x9e3697,_0x95e968]of _0x4e1782[_0x5cb569(0xa4)]()){_0x95e968===_0x105f9e&&_0x4e1782['set'](_0x9e3697,_0x437cc7);}_0x4e1782[_0x5cb569(0x74)](_0x437cc7,_0x437cc7),_0x4c30f6['set'](_0x485a20,_0x437cc7);}else _0x3dfd39[_0x105f9e]=_0x3d65c2,_0x4e1782[_0x5cb569(0x74)](_0x437cc7,_0x105f9e);}else{let _0x5d46ba=_0x437cc7;if(_0x46242e){const _0x309c48=_0x46242e[_0x5cb569(0x6f)](_0x485a20);_0x309c48&&_0x309c48[_0x5cb569(0xad)]>0x0&&(_0x5d46ba=_0x309c48[_0x5cb569(0xb6)]()['sort']()[0x0]);}const _0x516480={..._0x39bf67['description']!==undefined&&{'description':_0x39bf67['description']},'rule':_0x39bf67['rule']?deepSortObject(_0x39bf67[_0x5cb569(0xaa)]):_0x39bf67[_0x5cb569(0xaa)]};_0x3dfd39[_0x5d46ba]=_0x516480,_0x4e1782[_0x5cb569(0x74)](_0x437cc7,_0x5d46ba),_0x4c30f6[_0x5cb569(0x74)](_0x485a20,_0x5d46ba);}}}return{'merged':_0x3dfd39,'nameMapping':_0x4e1782};}export function updateSegmentReferences(_0x149fcc,_0x2aee96){const _0x43de0d=a105_0x11ba;if(!_0x149fcc)return;for(const _0x2e0881 of _0x149fcc){if(_0x2e0881['entry_criteria']?.[_0x43de0d(0xb1)]){const _0x360ff8=_0x2aee96['get'](_0x2e0881[_0x43de0d(0xaf)]['segment']);_0x360ff8&&(_0x2e0881[_0x43de0d(0xaf)][_0x43de0d(0xb1)]=_0x360ff8);}if(_0x2e0881[_0x43de0d(0x9a)])for(const _0x3ec3fb of _0x2e0881[_0x43de0d(0x9a)]){if(_0x3ec3fb[_0x43de0d(0x78)]==='decision_point'&&_0x3ec3fb['with']?.[_0x43de0d(0x88)])for(const _0x40b8f8 of _0x3ec3fb[_0x43de0d(0x9b)][_0x43de0d(0x88)]){if(_0x40b8f8['segment']){const _0x51cd53=_0x2aee96[_0x43de0d(0x6f)](_0x40b8f8['segment']);_0x51cd53&&(_0x40b8f8['segment']=_0x51cd53);}}}}}function a105_0x2848(){const _0x19c433=['6977zqWfYP','attributes','state','journeyBundleName','keys','index','connector_config','entries','yaml','has','versions','map','178PFizde','rule','values','versionNumber','length','include','entry_criteria','all_columns','segment','wait','exit_criteria','conditions','launched','slice','stringify','version','join','push','journey','max','journeyStages','isArray','30dCQKvu','exclude','activation','get','description','238715kHikMy','activation_template_id','bundle_id','set','toLowerCase','.yaml','schedule','type','journeys','name','trim','merged','draft','1120TGeGEl','connection','behavior','condition','281696SCvIBO','from','some','goal','decision_point','match','branches','segments','sort','stages','138213oenMFt','bundle_name','object','endsWith','3818464sIgGCP','version_number','item','activations','nameMapping','7onYEoQ','milestone','replace','167034SSKJDx','columns','steps','with','9533007wLvvzN'];a105_0x2848=function(){return _0x19c433;};return a105_0x2848();}export function updateSegmentRefsInSegments(_0x38e877,_0x57a544){const _0x551aab=a105_0x11ba;for(const _0x2047e1 of Object[_0x551aab(0xab)](_0x38e877)){_0x2047e1['rule']&&updateSegmentRefsInRule(_0x2047e1[_0x551aab(0xaa)],_0x57a544);}}function updateSegmentRefsInRule(_0x5d16b3,_0x1364c4){const _0x8eaefb=a105_0x11ba;if(_0x5d16b3===null||typeof _0x5d16b3!=='object')return;if(Array[_0x8eaefb(0x6b)](_0x5d16b3)){for(const _0x2ebe7e of _0x5d16b3){updateSegmentRefsInRule(_0x2ebe7e,_0x1364c4);}return;}const _0x21a921=_0x5d16b3;if((_0x21a921[_0x8eaefb(0x78)]===_0x8eaefb(0xae)||_0x21a921[_0x8eaefb(0x78)]===_0x8eaefb(0x6d))&&typeof _0x21a921[_0x8eaefb(0xb1)]==='string'){const _0xf20551=_0x1364c4[_0x8eaefb(0x6f)](_0x21a921[_0x8eaefb(0xb1)]);_0xf20551&&(_0x21a921[_0x8eaefb(0xb1)]=_0xf20551);}if(_0x21a921[_0x8eaefb(0xb4)]&&Array[_0x8eaefb(0x6b)](_0x21a921['conditions']))for(const _0x3d6b84 of _0x21a921[_0x8eaefb(0xb4)]){updateSegmentRefsInRule(_0x3d6b84,_0x1364c4);}}export function buildJourneysArray(_0x5f55d5){const _0x4ef7cd=a105_0x11ba,_0x337718=Math[_0x4ef7cd(0x69)](..._0x5f55d5[_0x4ef7cd(0xa8)](_0x395a19=>_0x395a19['item'][_0x4ef7cd(0xac)]||0x0));return _0x5f55d5[_0x4ef7cd(0xa8)](_0xbb343a=>{const _0x1f1def=_0x4ef7cd,_0x127acb=(_0xbb343a['item'][_0x1f1def(0xac)]||0x0)===_0x337718,_0x5ad89e=_0xbb343a[_0x1f1def(0xa5)][_0x1f1def(0x79)]?.[0x0],_0xef54a5={'version':_0x5ad89e?.[_0x1f1def(0xb8)]||_0xbb343a['yaml']['version']||_0xbb343a[_0x1f1def(0x92)][_0x1f1def(0x7a)],'state':_0xbb343a[_0x1f1def(0x92)][_0x1f1def(0x9f)]===_0x1f1def(0xb5)?'launched':_0x1f1def(0x7d),'stages':_0x5ad89e?.[_0x1f1def(0x8b)]||_0xbb343a[_0x1f1def(0xa5)][_0x1f1def(0x8b)]||[],'id':_0x5ad89e?.['id']||_0xbb343a[_0x1f1def(0xa5)]['id'],'version_number':_0x5ad89e?.[_0x1f1def(0x91)]||_0xbb343a[_0x1f1def(0xa5)][_0x1f1def(0x91)]};return _0x127acb&&(_0xef54a5['latest']=!![]),_0xef54a5;});}export function buildMergedJourneyDef(_0xe4a127,_0x1ff00b){const _0x74df23=a105_0x11ba,_0x3cb275=_0xe4a127[0x0][_0x74df23(0xa5)],_0x2c3e15=buildJourneysArray(_0xe4a127),{merged:_0x4cc9f4,nameMapping:_0x3b9fa6}=consolidateSegmentsByContent(_0xe4a127[_0x74df23(0xa8)](_0x42af75=>_0x42af75[_0x74df23(0xa5)]['segments']),_0x1ff00b);updateSegmentRefsInSegments(_0x4cc9f4,_0x3b9fa6);const _0x13bd93=Array[_0x74df23(0x83)](_0x3b9fa6[_0x74df23(0xa4)]())[_0x74df23(0x84)](([_0x483a49,_0x56938f])=>_0x483a49!==_0x56938f&&_0x483a49['startsWith']('entry_criteria'));let _0x1437d2=_0x4cc9f4,_0x141c74=new Map();if(_0x13bd93){const _0x10346c=consolidateSegmentsByContent([_0x4cc9f4],_0x1ff00b);_0x1437d2=_0x10346c[_0x74df23(0x7c)],_0x141c74=_0x10346c[_0x74df23(0x94)];}const _0xd2688c=new Map(_0x3b9fa6);for(const [_0x5db581,_0x12f0e2]of _0x141c74[_0x74df23(0xa4)]()){_0xd2688c[_0x74df23(0x74)](_0x5db581,_0x12f0e2);}for(const [_0x44331a,_0xa6fadf]of _0xd2688c[_0x74df23(0xa4)]()){let _0x41d605=_0xa6fadf,_0x239c93=0x0;while(_0xd2688c[_0x74df23(0xa6)](_0x41d605)&&_0xd2688c[_0x74df23(0x6f)](_0x41d605)!==_0x41d605&&_0x239c93<MAX_MAPPING_CHAIN_DEPTH){_0x41d605=_0xd2688c[_0x74df23(0x6f)](_0x41d605),_0x239c93++;}_0x41d605!==_0xa6fadf&&_0xd2688c[_0x74df23(0x74)](_0x44331a,_0x41d605);}for(const _0x417e75 of _0x2c3e15){updateSegmentReferences(_0x417e75[_0x74df23(0x8b)],_0xd2688c);}const {merged:_0x85971,nameMapping:_0x5f145c}=consolidateActivationsByContent(_0xe4a127[_0x74df23(0xa8)](_0x52c355=>_0x52c355[_0x74df23(0xa5)][_0x74df23(0x93)]));for(const _0x35181f of _0x2c3e15){updateActivationReferences(_0x35181f[_0x74df23(0x8b)],_0x5f145c);}let _0x5690f4=_0x3cb275[_0x74df23(0x85)];if(_0x5690f4?.[_0x74df23(0xb1)]){const _0x4a7342=_0xd2688c[_0x74df23(0x6f)](_0x5690f4[_0x74df23(0xb1)]);_0x4a7342&&(_0x5690f4={..._0x5690f4,'segment':_0x4a7342});}for(const _0x430db0 of _0x2c3e15){if(_0x430db0[_0x74df23(0x85)]?.[_0x74df23(0xb1)]){const _0x1723bc=_0xd2688c[_0x74df23(0x6f)](_0x430db0[_0x74df23(0x85)][_0x74df23(0xb1)]);_0x1723bc&&(_0x430db0[_0x74df23(0x85)]={..._0x430db0[_0x74df23(0x85)],'segment':_0x1723bc});}}return{'type':_0x74df23(0x68),'name':_0x3cb275[_0x74df23(0x7a)],'description':_0x3cb275[_0x74df23(0x70)],'goal':_0x5690f4,'reentry':_0x3cb275['reentry'],'segments':Object[_0x74df23(0xa1)](_0x1437d2)[_0x74df23(0xad)]>0x0?_0x1437d2:undefined,'activations':Object[_0x74df23(0xa1)](_0x85971)[_0x74df23(0xad)]>0x0?_0x85971:undefined,'journeys':_0x2c3e15,'bundle_id':_0x3cb275[_0x74df23(0x73)],'bundle_name':_0x3cb275[_0x74df23(0x8d)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x3aa831,_0x5343af,_0x27ff56,_0x3c4758){const _0x4fe6a7=a105_0x11ba,_0xedcb5e=_0x3aa831+':'+_0x5343af,_0x341d22=_0x27ff56[_0x4fe6a7(0x6f)](_0xedcb5e);if(_0x341d22)return _0x341d22;const _0xbe9e7f=await _0x3c4758(_0x3aa831),_0x1e2ea8=_0xbe9e7f[_0x4fe6a7(0x9e)][_0x4fe6a7(0xa0)]||_0xbe9e7f[_0x4fe6a7(0x9e)][_0x4fe6a7(0x7a)],_0x15794d=_0xbe9e7f[_0x4fe6a7(0x9e)][_0x4fe6a7(0x6a)]['find'](_0x459a52=>String(_0x459a52['id'])===String(_0x5343af)),_0x294bb4=_0x15794d?.[_0x4fe6a7(0x7a)]||_0x5343af,_0xcce471={'journeyName':_0x1e2ea8,'stageName':_0x294bb4};return _0x27ff56[_0x4fe6a7(0x74)](_0xedcb5e,_0xcce471),_0xcce471;}export function formatApiJourneyName(_0x32d21b,_0x1fc98c){return _0x1fc98c+'\x20('+_0x32d21b+')';}export function isLocalJourneyRef(_0x34eb14){const _0x21f3cc=a105_0x11ba;return _0x34eb14['endsWith']('.yml')||_0x34eb14[_0x21f3cc(0x8f)](_0x21f3cc(0x76));}function a105_0x11ba(_0x157dce,_0x4b0b5c){_0x157dce=_0x157dce-0x67;const _0x284843=a105_0x2848();let _0x11bab1=_0x284843[_0x157dce];return _0x11bab1;}export function buildLocalRuleToNameMapping(_0x15b466){const _0x3ac464=a105_0x11ba,_0x247ded=new Map();if(!_0x15b466)return _0x247ded;for(const [_0x169b09,_0x484dae]of Object[_0x3ac464(0xa4)](_0x15b466)){if(_0x484dae[_0x3ac464(0xaa)]){const _0x223f8c=serializeRule(_0x484dae['rule']),_0x295313=_0x247ded[_0x3ac464(0x6f)](_0x223f8c)||[];_0x295313[_0x3ac464(0x67)](_0x169b09),_0x247ded[_0x3ac464(0x74)](_0x223f8c,_0x295313);}}return _0x247ded;}export function buildLocalRuleToNameMappingFromJourney(_0x52416e){const _0x293bbe=a105_0x11ba,_0x23ccfb=_0x52416e[_0x293bbe(0x89)];if(!_0x23ccfb)return new Map();const _0x4e5afa=collectSegmentUsageCounts(_0x52416e),_0x29980e=new Map();let _0x510dff=0x0;for(const [_0x31ecd9,_0x57d1ae]of Object[_0x293bbe(0xa4)](_0x23ccfb)){if(!_0x57d1ae[_0x293bbe(0xaa)]){_0x510dff++;continue;}const _0x133342=serializeRule(_0x57d1ae[_0x293bbe(0xaa)]),_0x1ed2c5=_0x29980e['get'](_0x133342)||[];_0x1ed2c5[_0x293bbe(0x67)]({'name':_0x31ecd9,'index':_0x510dff}),_0x29980e[_0x293bbe(0x74)](_0x133342,_0x1ed2c5),_0x510dff++;}const _0x9bb518=new Map();for(const [_0x18cc4,_0x3bb12e]of _0x29980e){const _0x41d56c=_0x3bb12e['slice']()[_0x293bbe(0x8a)]((_0x57e353,_0x56618c)=>{const _0x108762=_0x293bbe,_0x513603=_0x4e5afa[_0x108762(0x6f)](_0x57e353[_0x108762(0x7a)])||0x0,_0x58d4d4=_0x4e5afa[_0x108762(0x6f)](_0x56618c[_0x108762(0x7a)])||0x0;if(_0x513603!==_0x58d4d4)return _0x58d4d4-_0x513603;return _0x57e353['index']-_0x56618c[_0x108762(0xa2)];})['map'](_0x32eb3e=>_0x32eb3e[_0x293bbe(0x7a)]);_0x9bb518[_0x293bbe(0x74)](_0x18cc4,_0x41d56c);}return _0x9bb518;}export function collectSegmentUsageCounts(_0x3bae60){const _0x15332f=a105_0x11ba,_0x100d0b=new Map(),_0x29eb8a=_0x25689b=>{const _0x103777=a105_0x11ba;if(!_0x25689b)return;_0x100d0b[_0x103777(0x74)](_0x25689b,(_0x100d0b['get'](_0x25689b)||0x0)+0x1);},_0x5ac302=_0x40bdac=>{const _0x1412fd=a105_0x11ba;for(const _0x5a3b15 of _0x40bdac){_0x29eb8a(_0x5a3b15['entry_criteria']?.[_0x1412fd(0xb1)]);if(_0x5a3b15[_0x1412fd(0xb3)])for(const _0x3d46cb of _0x5a3b15[_0x1412fd(0xb3)]){_0x29eb8a(_0x3d46cb[_0x1412fd(0xb1)]);}_0x29eb8a(_0x5a3b15[_0x1412fd(0x96)]?.[_0x1412fd(0xb1)]);if(_0x5a3b15[_0x1412fd(0x9a)])for(const _0x5cdb84 of _0x5a3b15['steps']){if(_0x5cdb84[_0x1412fd(0x78)]===_0x1412fd(0x86))for(const _0x26ffb4 of _0x5cdb84[_0x1412fd(0x9b)][_0x1412fd(0x88)]){_0x29eb8a(_0x26ffb4[_0x1412fd(0xb1)]);}else _0x5cdb84[_0x1412fd(0x78)]===_0x1412fd(0xb2)&&_0x29eb8a(_0x5cdb84[_0x1412fd(0x9b)][_0x1412fd(0x81)]?.['segment']);}}};_0x29eb8a(_0x3bae60['goal']?.[_0x15332f(0xb1)]);if(_0x3bae60['journeys'])for(const _0x46e2a0 of _0x3bae60[_0x15332f(0x79)]){_0x29eb8a(_0x46e2a0[_0x15332f(0x85)]?.[_0x15332f(0xb1)]),_0x5ac302(_0x46e2a0[_0x15332f(0x8b)]);}_0x3bae60[_0x15332f(0x8b)]&&_0x5ac302(_0x3bae60[_0x15332f(0x8b)]);if(_0x3bae60[_0x15332f(0xa7)])for(const _0x2213fc of _0x3bae60[_0x15332f(0xa7)]){_0x5ac302(_0x2213fc['stages']);}return _0x100d0b;}
1
+ (function(_0x2b9d3d,_0x173478){const _0x4184c5=a105_0x4b7a,_0x1c6103=_0x2b9d3d();while(!![]){try{const _0x533b29=parseInt(_0x4184c5(0x142))/0x1*(-parseInt(_0x4184c5(0x151))/0x2)+-parseInt(_0x4184c5(0x144))/0x3+-parseInt(_0x4184c5(0x12f))/0x4+-parseInt(_0x4184c5(0x133))/0x5*(parseInt(_0x4184c5(0x137))/0x6)+-parseInt(_0x4184c5(0x140))/0x7+-parseInt(_0x4184c5(0x13e))/0x8+parseInt(_0x4184c5(0x119))/0x9;if(_0x533b29===_0x173478)break;else _0x1c6103['push'](_0x1c6103['shift']());}catch(_0x2cf635){_0x1c6103['push'](_0x1c6103['shift']());}}}(a105_0x26b6,0xca904));import{serializeRule,deepSortObject}from'./child-segment-yaml.js';export const SEGMENT_KIND_JOURNEY=0x3;const MAX_MAPPING_CHAIN_DEPTH=0xa;export function sanitizeYamlKey(_0x237893){const _0x5e783c=a105_0x4b7a;return _0x237893[_0x5e783c(0x13f)]()[_0x5e783c(0x138)](/\s+/g,'_')[_0x5e783c(0x138)](/[^a-z0-9_]/g,'')[_0x5e783c(0x138)](/_+/g,'_')['replace'](/^_|_$/g,'');}export function generateJourneyLocalName(_0x147ba4){const _0x1c54ae=a105_0x4b7a,_0xb6d222=_0x147ba4[_0x1c54ae(0x13a)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0xb6d222){const _0x3c8438=_0xb6d222[0x1][_0x1c54ae(0x13f)](),_0x45d546=_0xb6d222[0x2],_0x56d372=_0x45d546[_0x1c54ae(0x138)](/-/g,'')[_0x1c54ae(0x158)](0x0,0x4)[_0x1c54ae(0x13f)]();return _0x3c8438+'_'+_0x56d372;}const _0x2e894c=_0x147ba4['match'](/^journey_\d+_stage_\d+_step_([0-9a-f-]+)_([a-z_]+)$/i);if(_0x2e894c){const _0xbd80e4=_0x2e894c[0x1],_0x479253=_0x2e894c[0x2][_0x1c54ae(0x13f)](),_0xcc894b=_0xbd80e4[_0x1c54ae(0x138)](/-/g,'')['slice'](0x0,0x4)[_0x1c54ae(0x13f)]();return _0x479253+'_'+_0xcc894b;}return undefined;}function stableStringify(_0x41bfa2){const _0x273d72=a105_0x4b7a;if(Array[_0x273d72(0x15a)](_0x41bfa2))return'['+_0x41bfa2[_0x273d72(0x129)](_0x19f509=>stableStringify(_0x19f509))[_0x273d72(0x121)](',')+']';if(_0x41bfa2&&typeof _0x41bfa2==='object'){const _0x4d2766=_0x41bfa2,_0x396f54=Object[_0x273d72(0x131)](_0x4d2766)['sort'](),_0x4d3305=_0x396f54[_0x273d72(0x129)](_0x4498ed=>'\x22'+_0x4498ed+'\x22:'+stableStringify(_0x4d2766[_0x4498ed]));return'{'+_0x4d3305[_0x273d72(0x121)](',')+'}';}const _0x53cd55=JSON[_0x273d72(0x113)](_0x41bfa2);return _0x53cd55===undefined?_0x273d72(0x112):_0x53cd55;}export function consolidateActivationsByContent(_0x4f1852){const _0x28c355=a105_0x4b7a,_0x58ef7a={},_0x420e89=new Map(),_0x13d362=new Map();for(const _0x570db8 of _0x4f1852){if(!_0x570db8)continue;for(const [_0x26caed,_0x5201c0]of Object[_0x28c355(0x114)](_0x570db8)){const _0x192442={'connection':_0x5201c0[_0x28c355(0x147)],..._0x5201c0['all_columns']!==undefined&&{'all_columns':_0x5201c0[_0x28c355(0x11d)]},..._0x5201c0[_0x28c355(0x141)]!==undefined&&{'columns':_0x5201c0[_0x28c355(0x141)]},..._0x5201c0[_0x28c355(0x120)]!==undefined&&{'behavior':_0x5201c0['behavior']},..._0x5201c0[_0x28c355(0x157)]!==undefined&&{'schedule':_0x5201c0[_0x28c355(0x157)]},..._0x5201c0['notification']!==undefined&&{'notification':_0x5201c0[_0x28c355(0x135)]},..._0x5201c0[_0x28c355(0x117)]!==undefined&&{'connector_config':_0x5201c0[_0x28c355(0x117)]},..._0x5201c0[_0x28c355(0x13c)]!==undefined&&{'activation_template_id':_0x5201c0[_0x28c355(0x13c)]}},_0x4030bb=stableStringify(_0x192442),_0x5af682=_0x13d362[_0x28c355(0x14a)](_0x4030bb);_0x5af682?_0x420e89[_0x28c355(0x139)](_0x26caed,_0x5af682):(_0x58ef7a[_0x26caed]=_0x5201c0,_0x420e89[_0x28c355(0x139)](_0x26caed,_0x26caed),_0x13d362[_0x28c355(0x139)](_0x4030bb,_0x26caed));}}return{'merged':_0x58ef7a,'nameMapping':_0x420e89};}export function updateActivationReferences(_0xbebc87,_0x421581){const _0x24f390=a105_0x4b7a;if(!_0xbebc87)return;for(const _0x3d6589 of _0xbebc87){if(!_0x3d6589[_0x24f390(0x11b)])continue;for(const _0x46de0b of _0x3d6589['steps']){if(_0x46de0b[_0x24f390(0x11c)]===_0x24f390(0x134)&&_0x46de0b[_0x24f390(0x152)]?.[_0x24f390(0x134)]){const _0x267cae=_0x421581[_0x24f390(0x14a)](_0x46de0b[_0x24f390(0x152)][_0x24f390(0x134)]);_0x267cae&&_0x267cae!==_0x46de0b['with'][_0x24f390(0x134)]&&(_0x46de0b[_0x24f390(0x152)][_0x24f390(0x134)]=_0x267cae);}}}}export function consolidateSegmentsByContent(_0x285294,_0x5dc09e){const _0x57e4f1=a105_0x4b7a,_0x201978={},_0x4ccef4=new Map(),_0x160f15=new Map();for(const _0x24997a of _0x285294){if(!_0x24997a)continue;for(const [_0x455b9c,_0x2ad607]of Object[_0x57e4f1(0x114)](_0x24997a)){if(!_0x2ad607[_0x57e4f1(0x132)]){_0x201978[_0x455b9c]=_0x2ad607,_0x4ccef4['set'](_0x455b9c,_0x455b9c);continue;}const _0x907d3b=_0x2ad607[_0x57e4f1(0x124)]&&_0x2ad607[_0x57e4f1(0x124)][_0x57e4f1(0x12a)]()?_0x2ad607[_0x57e4f1(0x124)]:undefined,_0x5646a5=JSON[_0x57e4f1(0x113)]({'description':_0x907d3b,'rule':deepSortObject(_0x2ad607[_0x57e4f1(0x132)])}),_0x461e97=_0x160f15[_0x57e4f1(0x14a)](_0x5646a5);if(_0x461e97){const _0x52ae74={..._0x2ad607[_0x57e4f1(0x124)]!==undefined&&{'description':_0x2ad607[_0x57e4f1(0x124)]},'rule':_0x2ad607['rule']?deepSortObject(_0x2ad607[_0x57e4f1(0x132)]):_0x2ad607[_0x57e4f1(0x132)]};if(_0x455b9c<_0x461e97){_0x201978[_0x455b9c]=_0x52ae74,delete _0x201978[_0x461e97];for(const [_0x3935e5,_0x2c42c8]of _0x4ccef4[_0x57e4f1(0x114)]()){_0x2c42c8===_0x461e97&&_0x4ccef4[_0x57e4f1(0x139)](_0x3935e5,_0x455b9c);}_0x4ccef4[_0x57e4f1(0x139)](_0x455b9c,_0x455b9c),_0x160f15['set'](_0x5646a5,_0x455b9c);}else _0x201978[_0x461e97]=_0x52ae74,_0x4ccef4[_0x57e4f1(0x139)](_0x455b9c,_0x461e97);}else{let _0x36784e=_0x455b9c;if(_0x5dc09e){const _0x32a1bf=_0x5dc09e[_0x57e4f1(0x14a)](_0x5646a5);_0x32a1bf&&_0x32a1bf[_0x57e4f1(0x143)]>0x0&&(_0x36784e=_0x32a1bf[_0x57e4f1(0x158)]()['sort']()[0x0]);}const _0x5c99da={..._0x2ad607[_0x57e4f1(0x124)]!==undefined&&{'description':_0x2ad607['description']},'rule':_0x2ad607[_0x57e4f1(0x132)]?deepSortObject(_0x2ad607[_0x57e4f1(0x132)]):_0x2ad607[_0x57e4f1(0x132)]};_0x201978[_0x36784e]=_0x5c99da,_0x4ccef4[_0x57e4f1(0x139)](_0x455b9c,_0x36784e),_0x160f15[_0x57e4f1(0x139)](_0x5646a5,_0x36784e);}}}return{'merged':_0x201978,'nameMapping':_0x4ccef4};}export function updateSegmentReferences(_0x4e148f,_0x25db53){const _0x35446c=a105_0x4b7a;if(!_0x4e148f)return;for(const _0xeeb7cd of _0x4e148f){if(_0xeeb7cd[_0x35446c(0x116)]?.[_0x35446c(0x128)]){const _0x4a5f34=_0x25db53['get'](_0xeeb7cd['entry_criteria']['segment']);_0x4a5f34&&(_0xeeb7cd[_0x35446c(0x116)][_0x35446c(0x128)]=_0x4a5f34);}if(_0xeeb7cd[_0x35446c(0x11b)])for(const _0x517d53 of _0xeeb7cd[_0x35446c(0x11b)]){if(_0x517d53['type']===_0x35446c(0x13b)&&_0x517d53[_0x35446c(0x152)]?.[_0x35446c(0x12c)])for(const _0x1586da of _0x517d53['with'][_0x35446c(0x12c)]){if(_0x1586da[_0x35446c(0x128)]){const _0x46083e=_0x25db53['get'](_0x1586da[_0x35446c(0x128)]);_0x46083e&&(_0x1586da[_0x35446c(0x128)]=_0x46083e);}}}}}export function updateSegmentRefsInSegments(_0x379cef,_0x5ab37e){const _0x45bb06=a105_0x4b7a;for(const _0x6e567d of Object['values'](_0x379cef)){_0x6e567d[_0x45bb06(0x132)]&&updateSegmentRefsInRule(_0x6e567d[_0x45bb06(0x132)],_0x5ab37e);}}function updateSegmentRefsInRule(_0x95989,_0x17331a){const _0x319b24=a105_0x4b7a;if(_0x95989===null||typeof _0x95989!==_0x319b24(0x146))return;if(Array[_0x319b24(0x15a)](_0x95989)){for(const _0x47daa1 of _0x95989){updateSegmentRefsInRule(_0x47daa1,_0x17331a);}return;}const _0x50b286=_0x95989;if((_0x50b286[_0x319b24(0x11c)]===_0x319b24(0x12d)||_0x50b286[_0x319b24(0x11c)]===_0x319b24(0x11a))&&typeof _0x50b286[_0x319b24(0x128)]===_0x319b24(0x153)){const _0x3eeb3a=_0x17331a['get'](_0x50b286[_0x319b24(0x128)]);_0x3eeb3a&&(_0x50b286[_0x319b24(0x128)]=_0x3eeb3a);}if(_0x50b286[_0x319b24(0x15c)]&&Array[_0x319b24(0x15a)](_0x50b286[_0x319b24(0x15c)]))for(const _0x27048d of _0x50b286[_0x319b24(0x15c)]){updateSegmentRefsInRule(_0x27048d,_0x17331a);}}function a105_0x4b7a(_0x4c01e5,_0x4cadd6){_0x4c01e5=_0x4c01e5-0x10f;const _0x26b6e8=a105_0x26b6();let _0x4b7a41=_0x26b6e8[_0x4c01e5];return _0x4b7a41;}export function buildJourneysArray(_0x319767){const _0x4718f2=a105_0x4b7a,_0x2e060f=Math[_0x4718f2(0x130)](..._0x319767[_0x4718f2(0x129)](_0x3697c3=>_0x3697c3[_0x4718f2(0x12e)][_0x4718f2(0x125)]||0x0));return _0x319767[_0x4718f2(0x129)](_0x3998f3=>{const _0x4a1dc7=_0x4718f2,_0x58ca8f=(_0x3998f3[_0x4a1dc7(0x12e)][_0x4a1dc7(0x125)]||0x0)===_0x2e060f,_0x205083=_0x3998f3[_0x4a1dc7(0x15e)][_0x4a1dc7(0x154)]?.[0x0],_0x486930={'version':_0x205083?.[_0x4a1dc7(0x115)]||_0x3998f3[_0x4a1dc7(0x15e)][_0x4a1dc7(0x115)]||_0x3998f3[_0x4a1dc7(0x12e)][_0x4a1dc7(0x126)],'state':_0x3998f3[_0x4a1dc7(0x12e)][_0x4a1dc7(0x14e)]==='launched'?_0x4a1dc7(0x13d):_0x4a1dc7(0x123),'stages':_0x205083?.[_0x4a1dc7(0x15b)]||_0x3998f3[_0x4a1dc7(0x15e)][_0x4a1dc7(0x15b)]||[],'id':_0x205083?.['id']||_0x3998f3[_0x4a1dc7(0x15e)]['id'],'version_number':_0x205083?.[_0x4a1dc7(0x14f)]||_0x3998f3[_0x4a1dc7(0x15e)][_0x4a1dc7(0x14f)]};return _0x58ca8f&&(_0x486930[_0x4a1dc7(0x118)]=!![]),_0x486930;});}export function buildMergedJourneyDef(_0x2e1d28,_0x571f40){const _0x3ded7e=a105_0x4b7a,_0x10edc9=_0x2e1d28[0x0][_0x3ded7e(0x15e)],_0x1b993b=buildJourneysArray(_0x2e1d28),{merged:_0x5bf539,nameMapping:_0x1428f6}=consolidateSegmentsByContent(_0x2e1d28[_0x3ded7e(0x129)](_0x418030=>_0x418030[_0x3ded7e(0x15e)][_0x3ded7e(0x10f)]),_0x571f40);updateSegmentRefsInSegments(_0x5bf539,_0x1428f6);const _0x16c37e=Array[_0x3ded7e(0x15d)](_0x1428f6['entries']())[_0x3ded7e(0x127)](([_0x27ff06,_0x13eb7d])=>_0x27ff06!==_0x13eb7d&&_0x27ff06['startsWith'](_0x3ded7e(0x116)));let _0xcdd1e6=_0x5bf539,_0x3aad21=new Map();if(_0x16c37e){const _0x8c1201=consolidateSegmentsByContent([_0x5bf539],_0x571f40);_0xcdd1e6=_0x8c1201['merged'],_0x3aad21=_0x8c1201['nameMapping'];}const _0x13b1be=new Map(_0x1428f6);for(const [_0x465d69,_0x162e30]of _0x3aad21['entries']()){_0x13b1be['set'](_0x465d69,_0x162e30);}for(const [_0x4b5a55,_0x2388f5]of _0x13b1be[_0x3ded7e(0x114)]()){let _0x5bb5c2=_0x2388f5,_0x3da217=0x0;while(_0x13b1be[_0x3ded7e(0x11f)](_0x5bb5c2)&&_0x13b1be['get'](_0x5bb5c2)!==_0x5bb5c2&&_0x3da217<MAX_MAPPING_CHAIN_DEPTH){_0x5bb5c2=_0x13b1be[_0x3ded7e(0x14a)](_0x5bb5c2),_0x3da217++;}_0x5bb5c2!==_0x2388f5&&_0x13b1be[_0x3ded7e(0x139)](_0x4b5a55,_0x5bb5c2);}for(const _0x53d7f8 of _0x1b993b){updateSegmentReferences(_0x53d7f8[_0x3ded7e(0x15b)],_0x13b1be);}const {merged:_0x31452f,nameMapping:_0x398af1}=consolidateActivationsByContent(_0x2e1d28[_0x3ded7e(0x129)](_0x38ed51=>_0x38ed51[_0x3ded7e(0x15e)]['activations']));for(const _0x528d77 of _0x1b993b){updateActivationReferences(_0x528d77[_0x3ded7e(0x15b)],_0x398af1);}let _0x4e90d8=_0x10edc9[_0x3ded7e(0x11e)];if(_0x4e90d8?.[_0x3ded7e(0x128)]){const _0xa26e2e=_0x13b1be[_0x3ded7e(0x14a)](_0x4e90d8[_0x3ded7e(0x128)]);_0xa26e2e&&(_0x4e90d8={..._0x4e90d8,'segment':_0xa26e2e});}for(const _0x1e562a of _0x1b993b){if(_0x1e562a[_0x3ded7e(0x11e)]?.[_0x3ded7e(0x128)]){const _0x1d6129=_0x13b1be['get'](_0x1e562a[_0x3ded7e(0x11e)][_0x3ded7e(0x128)]);_0x1d6129&&(_0x1e562a['goal']={..._0x1e562a['goal'],'segment':_0x1d6129});}}return{'type':_0x3ded7e(0x14d),'name':_0x10edc9[_0x3ded7e(0x126)],'description':_0x10edc9[_0x3ded7e(0x124)],'goal':_0x4e90d8,'reentry':_0x10edc9['reentry'],'segments':Object[_0x3ded7e(0x131)](_0xcdd1e6)[_0x3ded7e(0x143)]>0x0?_0xcdd1e6:undefined,'activations':Object[_0x3ded7e(0x131)](_0x31452f)['length']>0x0?_0x31452f:undefined,'journeys':_0x1b993b,'bundle_id':_0x10edc9[_0x3ded7e(0x136)],'bundle_name':_0x10edc9['bundle_name']};}function a105_0x26b6(){const _0x46f395=['from','yaml','segments','index','.yaml','null','stringify','entries','version','entry_criteria','connector_config','latest','53505468KpAogW','exclude','steps','type','all_columns','goal','has','behavior','join','condition','draft','description','versionNumber','name','some','segment','map','trim','attributes','branches','include','item','1512476iZEOJJ','max','keys','rule','58875kxPsNu','activation','notification','bundle_id','504jCvIEx','replace','set','match','decision_point','activation_template_id','launched','4023712jiKaQT','toLowerCase','10453422CcgVHP','columns','1367NpobKw','length','2245335wCEhTL','endsWith','object','connection','journeyBundleName','exit_criteria','get','sort','.yml','journey','state','version_number','push','1468whmJEb','with','string','journeys','wait','milestone','schedule','slice','versions','isArray','stages','conditions'];a105_0x26b6=function(){return _0x46f395;};return a105_0x26b6();}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x374b96,_0x2da5a0,_0xed698f,_0x48cf95){const _0x2f920a=a105_0x4b7a,_0x5a1a65=_0x374b96+':'+_0x2da5a0,_0x4ffe95=_0xed698f[_0x2f920a(0x14a)](_0x5a1a65);if(_0x4ffe95)return _0x4ffe95;const _0xd7c737=await _0x48cf95(_0x374b96),_0x49715e=_0xd7c737[_0x2f920a(0x12b)][_0x2f920a(0x148)]||_0xd7c737['attributes'][_0x2f920a(0x126)],_0x48a4e0=_0xd7c737['attributes']['journeyStages']['find'](_0x480e4a=>String(_0x480e4a['id'])===String(_0x2da5a0)),_0x5b65b1=_0x48a4e0?.[_0x2f920a(0x126)]||_0x2da5a0,_0x26654a={'journeyName':_0x49715e,'stageName':_0x5b65b1};return _0xed698f[_0x2f920a(0x139)](_0x5a1a65,_0x26654a),_0x26654a;}export function formatApiJourneyName(_0x202e52,_0x3cbc29){return _0x3cbc29+'\x20('+_0x202e52+')';}export function isLocalJourneyRef(_0x1b910c){const _0x171b52=a105_0x4b7a;return _0x1b910c[_0x171b52(0x145)](_0x171b52(0x14c))||_0x1b910c[_0x171b52(0x145)](_0x171b52(0x111));}export function buildLocalRuleToNameMapping(_0x57072d){const _0x5b4212=a105_0x4b7a,_0x586e07=new Map();if(!_0x57072d)return _0x586e07;for(const [_0x28c655,_0x3ae5b9]of Object[_0x5b4212(0x114)](_0x57072d)){if(_0x3ae5b9[_0x5b4212(0x132)]){const _0x5cce36=serializeRule(_0x3ae5b9[_0x5b4212(0x132)]),_0x2c7dfb=_0x586e07[_0x5b4212(0x14a)](_0x5cce36)||[];_0x2c7dfb[_0x5b4212(0x150)](_0x28c655),_0x586e07[_0x5b4212(0x139)](_0x5cce36,_0x2c7dfb);}}return _0x586e07;}export function buildLocalRuleToNameMappingFromJourney(_0x3bbb36){const _0x46c369=a105_0x4b7a,_0x371f6f=_0x3bbb36[_0x46c369(0x10f)];if(!_0x371f6f)return new Map();const _0x2f300e=collectSegmentUsageCounts(_0x3bbb36),_0x449393=new Map();let _0x1b256a=0x0;for(const [_0x68bf17,_0x314d9c]of Object['entries'](_0x371f6f)){if(!_0x314d9c[_0x46c369(0x132)]){_0x1b256a++;continue;}const _0x27b874=serializeRule(_0x314d9c[_0x46c369(0x132)]),_0xb5eef2=_0x449393[_0x46c369(0x14a)](_0x27b874)||[];_0xb5eef2['push']({'name':_0x68bf17,'index':_0x1b256a}),_0x449393[_0x46c369(0x139)](_0x27b874,_0xb5eef2),_0x1b256a++;}const _0x5a64e2=new Map();for(const [_0x1106ab,_0x467ccb]of _0x449393){const _0x33b011=_0x467ccb[_0x46c369(0x158)]()[_0x46c369(0x14b)]((_0x230e5c,_0x4244ec)=>{const _0x7f4dd7=_0x46c369,_0x4e347=_0x2f300e[_0x7f4dd7(0x14a)](_0x230e5c[_0x7f4dd7(0x126)])||0x0,_0xa4c89a=_0x2f300e[_0x7f4dd7(0x14a)](_0x4244ec[_0x7f4dd7(0x126)])||0x0;if(_0x4e347!==_0xa4c89a)return _0xa4c89a-_0x4e347;return _0x230e5c[_0x7f4dd7(0x110)]-_0x4244ec['index'];})[_0x46c369(0x129)](_0x1a2007=>_0x1a2007[_0x46c369(0x126)]);_0x5a64e2[_0x46c369(0x139)](_0x1106ab,_0x33b011);}return _0x5a64e2;}export function collectSegmentUsageCounts(_0x2d9e52){const _0x3ac344=a105_0x4b7a,_0x74a4c6=new Map(),_0x4f80d6=_0x27356c=>{const _0x168f95=a105_0x4b7a;if(!_0x27356c)return;_0x74a4c6[_0x168f95(0x139)](_0x27356c,(_0x74a4c6[_0x168f95(0x14a)](_0x27356c)||0x0)+0x1);},_0x211ee6=_0x1d1764=>{const _0x366bdd=a105_0x4b7a;for(const _0x457147 of _0x1d1764){_0x4f80d6(_0x457147[_0x366bdd(0x116)]?.[_0x366bdd(0x128)]);if(_0x457147[_0x366bdd(0x149)])for(const _0x1471e9 of _0x457147[_0x366bdd(0x149)]){_0x4f80d6(_0x1471e9[_0x366bdd(0x128)]);}_0x4f80d6(_0x457147[_0x366bdd(0x156)]?.[_0x366bdd(0x128)]);if(_0x457147['steps'])for(const _0xeb54a1 of _0x457147[_0x366bdd(0x11b)]){if(_0xeb54a1[_0x366bdd(0x11c)]===_0x366bdd(0x13b))for(const _0x1d6e97 of _0xeb54a1[_0x366bdd(0x152)][_0x366bdd(0x12c)]){_0x4f80d6(_0x1d6e97['segment']);}else _0xeb54a1[_0x366bdd(0x11c)]===_0x366bdd(0x155)&&_0x4f80d6(_0xeb54a1['with'][_0x366bdd(0x122)]?.[_0x366bdd(0x128)]);}}};_0x4f80d6(_0x2d9e52[_0x3ac344(0x11e)]?.[_0x3ac344(0x128)]);if(_0x2d9e52[_0x3ac344(0x154)])for(const _0x53b609 of _0x2d9e52[_0x3ac344(0x154)]){_0x4f80d6(_0x53b609[_0x3ac344(0x11e)]?.[_0x3ac344(0x128)]),_0x211ee6(_0x53b609['stages']);}_0x2d9e52['stages']&&_0x211ee6(_0x2d9e52[_0x3ac344(0x15b)]);if(_0x2d9e52[_0x3ac344(0x159)])for(const _0x25a2e9 of _0x2d9e52[_0x3ac344(0x159)]){_0x211ee6(_0x25a2e9[_0x3ac344(0x15b)]);}return _0x74a4c6;}