@treasuredata/tdx 2026.3.39 → 2026.3.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/cas-command.js +1 -1
  12. package/dist/commands/cas-segment-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-statusline-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/delivery-command.js +1 -1
  21. package/dist/commands/describe.js +1 -1
  22. package/dist/commands/engage-campaign-pull-command.js +1 -1
  23. package/dist/commands/engage-campaign-push-command.js +1 -1
  24. package/dist/commands/engage-campaign-validate-command.js +1 -1
  25. package/dist/commands/engage-command.js +1 -1
  26. package/dist/commands/engage-template-pull-command.js +1 -1
  27. package/dist/commands/engage-template-push-command.js +1 -1
  28. package/dist/commands/engage-template-validate-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/mcp-command.js +1 -1
  34. package/dist/commands/parent-segment-command.js +1 -1
  35. package/dist/commands/policy-command.js +1 -1
  36. package/dist/commands/profile-command.js +1 -1
  37. package/dist/commands/profiles-command.js +1 -1
  38. package/dist/commands/query-command.js +1 -1
  39. package/dist/commands/schedule-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/tables.js +1 -1
  52. package/dist/commands/unset-command.js +1 -1
  53. package/dist/commands/upgrade-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/work-command.js +1 -1
  57. package/dist/commands/workflow-command.js +1 -1
  58. package/dist/core/auth.js +1 -1
  59. package/dist/core/command-output.js +1 -1
  60. package/dist/core/config.js +1 -1
  61. package/dist/core/connection-cache.js +1 -1
  62. package/dist/core/constants.js +1 -1
  63. package/dist/core/credential-cache.js +1 -1
  64. package/dist/core/global-context.js +1 -1
  65. package/dist/core/keychain.js +1 -1
  66. package/dist/core/oauth-keychain.js +1 -1
  67. package/dist/core/oauth.js +1 -1
  68. package/dist/core/profile.js +1 -1
  69. package/dist/core/project-config.js +1 -1
  70. package/dist/core/session.js +1 -1
  71. package/dist/core/user-cache.js +1 -1
  72. package/dist/core/version.js +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/mcp/server.js +1 -1
  75. package/dist/mcp/tools/index.js +1 -1
  76. package/dist/mcp/tools/tdx-run.js +1 -1
  77. package/dist/mcp/tools/tdx-search.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/frontmatter.js +1 -1
  182. package/dist/sdk/workspace/git.js +1 -1
  183. package/dist/sdk/workspace/index.js +1 -1
  184. package/dist/sdk/workspace/templates.js +1 -1
  185. package/dist/sdk/workspace/weekly.js +1 -1
  186. package/dist/sdk/workspace/wikilinks.js +1 -1
  187. package/dist/test-utils/command-runner.js +1 -1
  188. package/dist/test-utils/factories.js +1 -1
  189. package/dist/test-utils/fixtures.js +1 -1
  190. package/dist/test-utils/http-mock.js +1 -1
  191. package/dist/test-utils/index.js +1 -1
  192. package/dist/utils/async.js +1 -1
  193. package/dist/utils/colors.js +1 -1
  194. package/dist/utils/diff.js +1 -1
  195. package/dist/utils/file-permissions.js +1 -1
  196. package/dist/utils/file-reader.js +1 -1
  197. package/dist/utils/github-releases.js +1 -1
  198. package/dist/utils/global-cache.js +1 -1
  199. package/dist/utils/json-loader.js +1 -1
  200. package/dist/utils/local-cache.js +1 -1
  201. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  202. package/dist/utils/logger/formatters/index.js +1 -1
  203. package/dist/utils/logger/handlers/console-handler.js +1 -1
  204. package/dist/utils/logger/handlers/file-handler.js +1 -1
  205. package/dist/utils/logger/handlers/index.js +1 -1
  206. package/dist/utils/logger/handlers/null-handler.js +1 -1
  207. package/dist/utils/logger/index.js +1 -1
  208. package/dist/utils/logger/logger.js +1 -1
  209. package/dist/utils/logger/types.js +1 -1
  210. package/dist/utils/option-validation.js +1 -1
  211. package/dist/utils/process.js +1 -1
  212. package/dist/utils/prompt.js +1 -1
  213. package/dist/utils/spinner.js +1 -1
  214. package/dist/utils/sse-parser.js +1 -1
  215. package/dist/utils/string-utils.js +1 -1
  216. package/dist/utils/table-ref-parser.js +1 -1
  217. package/dist/utils/tdx-logger.js +1 -1
  218. package/dist/utils/version-check.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a131_0x799c55=a131_0x1ac8;(function(_0x4a130a,_0x47f773){const _0x591104=a131_0x1ac8,_0x4b2b14=_0x4a130a();while(!![]){try{const _0x57a9c6=-parseInt(_0x591104(0x1de))/0x1*(-parseInt(_0x591104(0x165))/0x2)+-parseInt(_0x591104(0x1b2))/0x3+parseInt(_0x591104(0x1e8))/0x4*(-parseInt(_0x591104(0x1cf))/0x5)+-parseInt(_0x591104(0x1b4))/0x6+-parseInt(_0x591104(0x16c))/0x7*(-parseInt(_0x591104(0x1ef))/0x8)+-parseInt(_0x591104(0x1eb))/0x9+parseInt(_0x591104(0x197))/0xa;if(_0x57a9c6===_0x47f773)break;else _0x4b2b14['push'](_0x4b2b14['shift']());}catch(_0x5eb455){_0x4b2b14['push'](_0x4b2b14['shift']());}}}(a131_0x3b9d,0xf3a69));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x5e20e9){const _0x3535a0=a131_0x1ac8;return _0x5e20e9[_0x3535a0(0x196)]??_0x5e20e9[_0x3535a0(0x1bb)]?.['journeyBundleId']??undefined;}function a131_0x1ac8(_0x40bf36,_0x49156c){_0x40bf36=_0x40bf36-0x165;const _0x3b9df3=a131_0x3b9d();let _0x1ac8fc=_0x3b9df3[_0x40bf36];return _0x1ac8fc;}function getVersionNumber(_0x529612){const _0x91cebf=a131_0x1ac8;return _0x529612[_0x91cebf(0x16b)]??_0x529612[_0x91cebf(0x1bb)]?.[_0x91cebf(0x16b)]??0x0;}function getState(_0x546655){const _0x111a4d=a131_0x1ac8;return _0x546655[_0x111a4d(0x1f6)]??_0x546655['attributes']?.[_0x111a4d(0x1f6)];}export function deduplicateJourneysByBundle(_0x335d44){const _0x4866de=a131_0x1ac8,_0x2f06c2=new Map();let _0x38e127=0x0;for(const _0x6acf0 of _0x335d44){const _0x2cc8c9=getBundleId(_0x6acf0);if(!_0x2cc8c9){const _0x231ec9=_0x4866de(0x19f)+(_0x6acf0['id']??'idx-'+_0x38e127++);_0x2f06c2[_0x4866de(0x18a)](_0x231ec9,_0x6acf0);continue;}const _0x2e6483=_0x2f06c2[_0x4866de(0x1dd)](_0x2cc8c9);if(!_0x2e6483)_0x2f06c2[_0x4866de(0x18a)](_0x2cc8c9,_0x6acf0);else{const _0x2955b1=getState(_0x2e6483)===_0x4866de(0x1af),_0x4273e9=getState(_0x6acf0)===_0x4866de(0x1af);if(_0x4273e9&&!_0x2955b1)_0x2f06c2[_0x4866de(0x18a)](_0x2cc8c9,_0x6acf0);else{if(!_0x4273e9&&_0x2955b1){}else{const _0x774603=getVersionNumber(_0x2e6483),_0x116057=getVersionNumber(_0x6acf0);_0x116057>_0x774603&&_0x2f06c2[_0x4866de(0x18a)](_0x2cc8c9,_0x6acf0);}}}}return Array[_0x4866de(0x1f4)](_0x2f06c2[_0x4866de(0x175)]());}const VALID_JOURNEY_STATES=new Set([a131_0x799c55(0x1f8),a131_0x799c55(0x1e4),'launched']);export function parseJourneyState(_0x421a31){const _0x30249f=a131_0x799c55;if(typeof _0x421a31===_0x30249f(0x180)&&VALID_JOURNEY_STATES['has'](_0x421a31))return _0x421a31;return _0x30249f(0x1f8);}export function entityToJourneyListItem(_0x84dd01,_0x45e375){const _0x37d8fa=a131_0x799c55,_0x9f8eba=_0x84dd01[_0x37d8fa(0x1bb)];return{'id':_0x84dd01['id'],'name':_0x9f8eba[_0x37d8fa(0x1a1)]??'','journeyBundleName':_0x9f8eba['journeyBundleName']??_0x9f8eba['name']??'','journeyBundleId':_0x9f8eba[_0x37d8fa(0x196)]??'','versionNumber':_0x9f8eba[_0x37d8fa(0x16b)],'description':_0x9f8eba[_0x37d8fa(0x1f3)]??null,'state':parseJourneyState(_0x9f8eba[_0x37d8fa(0x1f6)]),'paused':_0x9f8eba['paused']??![],'audienceId':_0x45e375,'folderId':_0x9f8eba[_0x37d8fa(0x1d4)]??_0x84dd01['relationships']?.[_0x37d8fa(0x18b)]?.[_0x37d8fa(0x170)]?.['id']??null,'createdAt':_0x9f8eba['createdAt']??'','updatedAt':_0x9f8eba[_0x37d8fa(0x194)]??''};}function convertToColumnId(_0x5d1e91){const _0x526aec=a131_0x799c55;return _0x5d1e91[_0x526aec(0x1bf)](/-/g,'_');}function getStepEntries(_0x22345b){const _0x243344=a131_0x799c55;if(!_0x22345b)return[];if(Array[_0x243344(0x1bc)](_0x22345b))return _0x22345b['map'](_0x4aeb6a=>[_0x4aeb6a['id'],_0x4aeb6a]);return Object[_0x243344(0x181)](_0x22345b);}export function flattenJourneyActivation(_0x25f90f){const _0x4e8347=a131_0x799c55,{activationParams:_0x58ee43,activationId:_0x38d255,runAfterJourneyRefresh:_0x5d608e}=_0x25f90f[_0x4e8347(0x1bb)];return{'id':_0x25f90f['id'],'activationId':_0x38d255,'runAfterJourneyRefresh':_0x5d608e,..._0x58ee43};}function col(_0x60ebd6,_0x13f2a6={}){const _0x2f20d5=a131_0x799c55;return{'column':_0x60ebd6,'direction':null,'stageIndex':null,'stageName':null,'category':_0x2f20d5(0x19a),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x13f2a6};}export function generateColumnMapping(_0x31c1b4){const _0x23ec7f=a131_0x799c55,_0x5f4421=[];_0x5f4421['push'](col(_0x23ec7f(0x1e6))),_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1c3),{'direction':'in','category':_0x23ec7f(0x1a8)})),_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1e7),{'direction':_0x23ec7f(0x1dc),'category':_0x23ec7f(0x1a8)}));_0x31c1b4[_0x23ec7f(0x1bb)][_0x23ec7f(0x1d6)]&&_0x5f4421['push'](col(_0x23ec7f(0x190),{'direction':'in','category':_0x23ec7f(0x1d6),'detail':_0x31c1b4[_0x23ec7f(0x1bb)][_0x23ec7f(0x1d6)]['name']||null}));const _0x1ab66c=_0x31c1b4[_0x23ec7f(0x1bb)][_0x23ec7f(0x1d5)]||[];for(let _0x4484dd=0x0;_0x4484dd<_0x1ab66c[_0x23ec7f(0x1a7)];_0x4484dd++){const _0x46a767=_0x1ab66c[_0x4484dd],_0x47fb17=_0x46a767[_0x23ec7f(0x1a1)],_0x519c0e={'stageIndex':_0x4484dd,'stageName':_0x47fb17},_0x305cfe=_0x46a767[_0x23ec7f(0x1c5)]?.['name']||null;_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1aa)+_0x4484dd,{..._0x519c0e,'direction':'in','category':_0x23ec7f(0x1a9),'detail':_0x305cfe})),_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x171)+_0x4484dd,{..._0x519c0e,'direction':_0x23ec7f(0x1dc),'category':_0x23ec7f(0x1a9),'detail':_0x305cfe}));_0x46a767[_0x23ec7f(0x1c6)]&&_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1aa)+_0x4484dd+_0x23ec7f(0x1f5),{..._0x519c0e,'direction':'in','category':_0x23ec7f(0x1c6),'detail':_0x46a767['milestone'][_0x23ec7f(0x1a1)]||null}));const _0x220f67=_0x46a767[_0x23ec7f(0x19c)]||_0x46a767[_0x23ec7f(0x1a5)]||[];for(let _0x2bbfd4=0x0;_0x2bbfd4<_0x220f67[_0x23ec7f(0x1a7)];_0x2bbfd4++){_0x5f4421[_0x23ec7f(0x187)](col('intime_stage_'+_0x4484dd+_0x23ec7f(0x199)+_0x2bbfd4,{..._0x519c0e,'direction':'in','category':_0x23ec7f(0x1b1),'detail':_0x220f67[_0x2bbfd4]['name']||null}));}const _0x10e6ce=getStepEntries(_0x46a767[_0x23ec7f(0x1e5)]);for(const [_0x118902,_0x504e6c]of _0x10e6ce){const _0x1277a0=convertToColumnId(_0x118902),_0x2a24dd=_0x504e6c[_0x23ec7f(0x1bd)]||null,_0x1ac47d=_0x504e6c[_0x23ec7f(0x1a1)]||null,_0x291e58={..._0x519c0e,'stepType':_0x2a24dd,'stepName':_0x1ac47d,'stepId':_0x118902};_0x5f4421[_0x23ec7f(0x187)](col('intime_stage_'+_0x4484dd+'_'+_0x1277a0,{..._0x291e58,'direction':'in','category':_0x23ec7f(0x169)})),_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x171)+_0x4484dd+'_'+_0x1277a0,{..._0x291e58,'direction':'out','category':_0x23ec7f(0x169)}));if(_0x504e6c[_0x23ec7f(0x1bd)]===_0x23ec7f(0x1d3)&&_0x504e6c[_0x23ec7f(0x1c8)])for(const _0x2fa321 of _0x504e6c[_0x23ec7f(0x1c8)]){_0x2fa321[_0x23ec7f(0x1ca)]&&_0x5f4421[_0x23ec7f(0x187)](col('intime_stage_'+_0x4484dd+'_'+_0x1277a0+'_'+_0x2fa321[_0x23ec7f(0x1ca)],{..._0x291e58,'direction':'in','category':_0x23ec7f(0x18f),'detail':_0x2fa321[_0x23ec7f(0x1a1)]||(_0x2fa321[_0x23ec7f(0x1cd)]?_0x23ec7f(0x1ba):null)}));}if((_0x504e6c[_0x23ec7f(0x1bd)]===_0x23ec7f(0x17e)||_0x504e6c[_0x23ec7f(0x1bd)]===_0x23ec7f(0x1ed))&&_0x504e6c[_0x23ec7f(0x1c0)])for(const _0x4a83bd of _0x504e6c[_0x23ec7f(0x1c0)]){_0x4a83bd['id']&&_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1aa)+_0x4484dd+'_'+_0x1277a0+_0x23ec7f(0x198)+convertToColumnId(_0x4a83bd['id']),{..._0x291e58,'direction':'in','category':'variant','detail':_0x4a83bd[_0x23ec7f(0x1a1)]||null}));}if(_0x504e6c['type']===_0x23ec7f(0x1d9)||_0x504e6c[_0x23ec7f(0x1bd)]===_0x23ec7f(0x1d1)){const _0xa2a3f5=[];if(_0x504e6c['conditionSegmentId'])_0xa2a3f5['push'](_0x504e6c['conditionSegmentId']);else{if(Array['isArray'](_0x504e6c['conditions']))for(const _0x2cf946 of _0x504e6c[_0x23ec7f(0x1b6)]){_0x2cf946[_0x23ec7f(0x1ca)]&&!_0x2cf946[_0x23ec7f(0x1c4)]&&_0xa2a3f5['push'](_0x2cf946[_0x23ec7f(0x1ca)]);}else _0x504e6c['waitCondition']?.[_0x23ec7f(0x1ca)]&&_0xa2a3f5[_0x23ec7f(0x187)](_0x504e6c[_0x23ec7f(0x16e)][_0x23ec7f(0x1ca)]);}for(const _0x29d19f of _0xa2a3f5){_0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1aa)+_0x4484dd+'_'+_0x1277a0+'_'+_0x29d19f,{..._0x291e58,'direction':'in','category':_0x23ec7f(0x18f)}));}}}}return _0x5f4421[_0x23ec7f(0x187)](col(_0x23ec7f(0x1b9))),_0x5f4421;}export function aggregateJourneyHistory(_0x1a2726){const _0x4fff9d=a131_0x799c55,_0x1efdfb=_0x1a2726['reduce']((_0x3fdb11,_0xfd07c6)=>_0x3fdb11+(_0xfd07c6[_0x4fff9d(0x1ab)]??0x0),0x0),_0x201430=_0x1a2726['reduce']((_0x23c712,_0x4ea8a1)=>_0x23c712+(_0x4ea8a1[_0x4fff9d(0x1c9)]??0x0),0x0),_0x3c3212=_0x1a2726['reduce']((_0x3cea4a,_0x2fc747)=>_0x3cea4a+((_0x2fc747['exitInflux']??0x0)+(_0x2fc747[_0x4fff9d(0x1e3)]??0x0)),0x0),_0xa16a13=_0x1a2726[_0x1a2726[_0x4fff9d(0x1a7)]-0x1];return{'size':_0xa16a13?.['size']??0x0,'entered':_0x1efdfb,'goal_achieved':_0x201430,'completion_rate':_0x201430&&_0x1efdfb?_0x201430/_0x1efdfb*0x64:0x0,'exit_or_jump':_0x3c3212,'exit_or_jump_rate':_0x3c3212&&_0x1efdfb?_0x3c3212/_0x1efdfb*0x64:0x0};}export function aggregateStageHistory(_0x5bec08){const _0x54aae5=a131_0x799c55,_0x4f57f2=_0x5bec08[_0x54aae5(0x18c)]((_0x395209,_0x4dabbe)=>_0x395209+(_0x4dabbe['entryInflux']??0x0),0x0),_0x26c225=_0x5bec08[_0x54aae5(0x18c)]((_0x466067,_0x5b83eb)=>_0x466067+(_0x5b83eb[_0x54aae5(0x192)]??0x0),0x0),_0x32fc30=_0x5bec08[_0x54aae5(0x18c)]((_0x177ae9,_0x57b36a)=>_0x177ae9+((_0x57b36a[_0x54aae5(0x1f0)]??0x0)+(_0x57b36a['jumpInflux']??0x0)),0x0),_0x22e972=_0x5bec08[_0x5bec08['length']-0x1];return{'size':_0x22e972?.[_0x54aae5(0x1cb)]??0x0,'entered':_0x4f57f2,'milestone':_0x26c225,'milestone_rate':_0x26c225&&_0x4f57f2?_0x26c225/_0x4f57f2*0x64:0x0,'exit_or_jump':_0x32fc30,'exit_or_jump_rate':_0x32fc30&&_0x4f57f2?_0x32fc30/_0x4f57f2*0x64:0x0};}export function assembleJourneyStats(_0x2dfba2,_0x39f3e1){const _0xea7737=a131_0x799c55,_0x79bee5=!!(_0x39f3e1?.[_0xea7737(0x1f4)]||_0x39f3e1?.['to'])&&!!_0x2dfba2[_0xea7737(0x16f)]?.['length'];if(_0x79bee5){const _0x434ca6=aggregateJourneyHistory(_0x2dfba2[_0xea7737(0x16f)]),_0x4958b6={'journey_id':_0x2dfba2['journeyId'],..._0x39f3e1?.[_0xea7737(0x1f4)]&&{'from':_0x39f3e1[_0xea7737(0x1f4)]},..._0x39f3e1?.['to']&&{'to':_0x39f3e1['to']},..._0x434ca6};return _0x39f3e1?.[_0xea7737(0x1f9)]&&(_0x4958b6['history']=_0x2dfba2[_0xea7737(0x16f)]),_0x4958b6;}return{'journey_id':_0x2dfba2[_0xea7737(0x1ce)],'size':_0x2dfba2['size'],'entered':_0x2dfba2[_0xea7737(0x172)],'goal_achieved':_0x2dfba2[_0xea7737(0x189)],'completion_rate':_0x2dfba2[_0xea7737(0x166)],'exit_or_jump':_0x2dfba2[_0xea7737(0x1d8)],'exit_or_jump_rate':_0x2dfba2[_0xea7737(0x19b)]};}export function formatVersionsFromBundle(_0x1073f7){const _0x151e20=a131_0x799c55,_0x53ab5f=_0x1073f7[_0x151e20(0x176)][_0x151e20(0x1d0)](_0x4250eb=>({'journeyId':_0x4250eb['id'],'versionNumber':_0x4250eb[_0x151e20(0x1bb)][_0x151e20(0x16b)]??0x0,'name':_0x4250eb[_0x151e20(0x1bb)][_0x151e20(0x1a1)],'state':_0x4250eb[_0x151e20(0x1bb)][_0x151e20(0x1f6)],'paused':_0x4250eb['attributes'][_0x151e20(0x182)],'createdAt':_0x4250eb[_0x151e20(0x1bb)]['createdAt'],'updatedAt':_0x4250eb[_0x151e20(0x1bb)][_0x151e20(0x194)]}));return _0x53ab5f[_0x151e20(0x1ad)]((_0x5a637e,_0x21d29d)=>_0x5a637e[_0x151e20(0x16b)]-_0x21d29d['versionNumber']),_0x53ab5f;}export function synthesizePreBundleVersion(_0x4c9234){const _0x2d49af=a131_0x799c55;return{'journeyId':_0x4c9234['id'],'versionNumber':0x1,'name':_0x4c9234[_0x2d49af(0x1bb)]['name'],'state':_0x4c9234[_0x2d49af(0x1bb)]['state'],'paused':_0x4c9234[_0x2d49af(0x1bb)]['paused'],'createdAt':_0x4c9234[_0x2d49af(0x1bb)]['createdAt'],'updatedAt':_0x4c9234[_0x2d49af(0x1bb)][_0x2d49af(0x194)]};}function a131_0x3b9d(){const _0x4d62ec=['getTrafficData','waitCondition','history','data','outtime_stage_','enteredSize','filter','pauseJourney','values','journeys','listJourneysWithDetailsFromParentSegment','find','all','conversion','getParentSegmentFull','\x20in\x20journey\x20','listJourneysFromParentSegment','AbTest','updateJourney','string','entries','paused','listJourneyActivations','getBundle','INVALID_ARGUMENT','includeAllVersions','push','createJourneyVersion','goalSize','set','parentFolder','reduce','folder-segment','resume','branch','intime_goal','getJourney','milestoneInflux','listEntitiesByFolder','updatedAt','latestJourneyId','journeyBundleId','14197240dVITzX','_variant_','_exit_','fixed','exitOrJumpRate','exitCriterias','getStatistics','listActivationsFlat','no-bundle-','update','name','flat','listJourneysWithDetails','resumeJourney','exitCriteria','client','length','journey','stage','intime_stage_','entryInflux','applyVersionDeduplication','sort','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','launched','Journey\x20not\x20found:\x20','exit_criteria','1423227naGNUG','lastVersionNumber','5463258VoJYBo','activation','conditions','JOURNEY_NOT_FOUND','create','time','Excluded\x20profiles','attributes','isArray','type','listJourneys','replace','variants','toLowerCase','has','intime_journey','timedOutPath','entryCriteria','milestone','createActivation','branches','goalInflux','segmentId','size','listSegmentFolders','excluded','journeyId','24670BERprC','map','Wait','listActivations','DecisionPoint','segmentFolderId','journeyStages','goal','audienceId','exitOrJumpSize','WaitStep','createVersion','activationStepsById','out','get','6FjkzRk','journey_','createJourneyActivation','rootFolderId','getColumnMapping','jumpInflux','simulation','steps','cdp_customer_id','outtime_journey','412xHXpsC','cdp_audience_','checkJourneyAppendable','16776900mBxjpJ','getConversionSankeyChart','ABTest','fetchTrafficRaw','1432eajXZG','exitInflux','getActivationSankeyChart','getLatestJourneyId','description','from','_milestone','state','getJourneyStatistics','draft','includeHistory','getJourneyActivation','619770qQdYSy','completionRate','journeyStageId','getJourneyBundle','step','add','versionNumber','57729mklxVm'];a131_0x3b9d=function(){return _0x4d62ec;};return a131_0x3b9d();}export function buildStageNameMap(_0x50aa28){const _0x56a4b3=a131_0x799c55;return new Map(_0x50aa28['attributes']['journeyStages']?.[_0x56a4b3(0x1d0)](_0x555133=>[_0x555133['id'],_0x555133[_0x56a4b3(0x1a1)]])??[]);}export class JourneySDK{[a131_0x799c55(0x1a6)];constructor(_0x3729b8){const _0x39b67c=a131_0x799c55;this[_0x39b67c(0x1a6)]=new CDPApiClient(_0x3729b8);}['applyVersionDeduplication'](_0x38c82b,_0x3dd5dc){return _0x3dd5dc?_0x38c82b:deduplicateJourneysByBundle(_0x38c82b);}async[a131_0x799c55(0x1a3)](_0x44d356,_0x460f35){const _0x47a36b=a131_0x799c55;try{const _0x558e12=await this[_0x47a36b(0x1a6)][_0x47a36b(0x1a3)](_0x44d356);return{'journeys':this['applyVersionDeduplication'](_0x558e12[_0x47a36b(0x176)],_0x460f35),'activationStepsById':_0x558e12[_0x47a36b(0x1db)]};}catch(_0x5ce586){if(isHttp404Error(_0x5ce586))return{'journeys':[],'activationStepsById':new Map()};throw _0x5ce586;}}async['listJourneysFromParentSegment'](_0x3ca290,_0x325c65,_0x15213e){const _0x4e6d9f=a131_0x799c55;let _0x4d1f29=_0x325c65;if(!_0x4d1f29)try{const _0x1a3251=await this[_0x4e6d9f(0x1a6)][_0x4e6d9f(0x17b)](_0x3ca290);_0x4d1f29=_0x1a3251[_0x4e6d9f(0x1e1)]??undefined;}catch(_0x27792c){if(isHttp404Error(_0x27792c))return[];throw _0x27792c;}if(!_0x4d1f29)return[];let _0x3b71cc;if(_0x15213e?.['includeAllVersions']){const _0x3b3f1b=await this['client'][_0x4e6d9f(0x1cc)](_0x3ca290),_0x464713=_0x3b3f1b[_0x4e6d9f(0x1d0)](_0x43dc59=>this[_0x4e6d9f(0x1a6)][_0x4e6d9f(0x1be)](_0x43dc59['id'])),_0x119317=await Promise[_0x4e6d9f(0x179)](_0x464713),_0x584032=new Set();_0x3b71cc=_0x119317[_0x4e6d9f(0x1a2)]()[_0x4e6d9f(0x173)](_0x44c38d=>{const _0x4c2750=_0x4e6d9f;if(_0x584032[_0x4c2750(0x1c2)](_0x44c38d['id']))return![];return _0x584032[_0x4c2750(0x16a)](_0x44c38d['id']),!![];});}else{const _0x3c4bff=await this[_0x4e6d9f(0x1a6)]['listEntitiesByFolder'](_0x4d1f29,0x20,![]),_0x27ac36=_0x3c4bff[_0x4e6d9f(0x170)],_0x2a8f64=_0x27ac36['filter'](_0xed687c=>_0xed687c[_0x4e6d9f(0x1bd)]===_0x4e6d9f(0x1a8));_0x3b71cc=_0x2a8f64['map'](_0x4fecf6=>entityToJourneyListItem(_0x4fecf6,_0x3ca290));}return this[_0x4e6d9f(0x1ac)](_0x3b71cc,_0x15213e?.[_0x4e6d9f(0x186)]);}async['listJourneysWithFolders'](_0x1c306c,_0xd4ef68,_0x328551){const _0x1d4557=a131_0x799c55;if(!_0xd4ef68)return{'journeys':[],'folders':[]};const _0x12f3fe=await this[_0x1d4557(0x1a6)][_0x1d4557(0x193)](_0xd4ef68,0x20,![]),_0x41802d=_0x12f3fe[_0x1d4557(0x170)],_0x1c5351=_0x41802d['filter'](_0x13b0cd=>_0x13b0cd[_0x1d4557(0x1bd)]===_0x1d4557(0x18d)&&_0x13b0cd['id']!==_0xd4ef68),_0x4adb10=_0x1c5351['map'](_0x79e20d=>({'id':_0x79e20d['id'],'name':_0x79e20d[_0x1d4557(0x1bb)][_0x1d4557(0x1a1)]})),_0x410fc4=_0x41802d[_0x1d4557(0x173)](_0x24d17b=>_0x24d17b['type']===_0x1d4557(0x1a8)),_0x3505af=_0x410fc4[_0x1d4557(0x1d0)](_0x2bc2eb=>entityToJourneyListItem(_0x2bc2eb,_0x1c306c));return{'journeys':this[_0x1d4557(0x1ac)](_0x3505af,_0x328551?.[_0x1d4557(0x186)]),'folders':_0x4adb10};}async[a131_0x799c55(0x177)](_0x4382da,_0x41810c){const _0x183062=a131_0x799c55;let _0x29d266;try{_0x29d266=await this['client'][_0x183062(0x1cc)](_0x4382da);}catch(_0x1754bf){if(isHttp404Error(_0x1754bf))return{'journeys':[],'activationStepsById':new Map()};throw _0x1754bf;}const _0xc55a1d=_0x29d266['map'](async _0x145c59=>{const _0x43186c=_0x183062;return await this[_0x43186c(0x1a3)](_0x145c59['id'],_0x41810c?.[_0x43186c(0x186)]);}),_0x5861ce=await Promise['all'](_0xc55a1d),_0x3b3e5b=new Map(),_0x5ddab5=[];for(const _0x18aa91 of _0x5861ce){_0x5ddab5[_0x183062(0x187)](..._0x18aa91[_0x183062(0x176)]);for(const [_0x5ba135,_0x13992a]of _0x18aa91[_0x183062(0x1db)]){_0x3b3e5b[_0x183062(0x18a)](_0x5ba135,_0x13992a);}}const _0x4b70c4=new Set(),_0x131e7e=_0x5ddab5[_0x183062(0x173)](_0x60b739=>{const _0x442373=_0x183062;if(_0x4b70c4[_0x442373(0x1c2)](_0x60b739['id']))return![];return _0x4b70c4[_0x442373(0x16a)](_0x60b739['id']),!![];});return{'journeys':this[_0x183062(0x1ac)](_0x131e7e,_0x41810c?.[_0x183062(0x186)]),'activationStepsById':_0x3b3e5b};}async['getJourney'](_0x134701){const _0x279ae7=a131_0x799c55;try{return await this[_0x279ae7(0x1a6)][_0x279ae7(0x191)](_0x134701);}catch(_0x20d548){if(isHttp404Error(_0x20d548))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x134701,_0x20d548);throw _0x20d548;}}async['resolveJourneyId'](_0x40a09b,_0x5884cb){const _0x3e7857=a131_0x799c55,_0x5976f5=await this[_0x3e7857(0x17d)](_0x40a09b),_0x443e84=_0x5976f5[_0x3e7857(0x178)](_0x5508ac=>_0x5508ac['journeyBundleName'][_0x3e7857(0x1c1)]()===_0x5884cb[_0x3e7857(0x1c1)]());if(!_0x443e84)throw new SDKError(ErrorCode[_0x3e7857(0x1b7)],_0x3e7857(0x1b0)+_0x5884cb,undefined,{'helpText':_0x3e7857(0x1ae)});return _0x443e84['id'];}async[a131_0x799c55(0x19d)](_0x5b20a9,_0x107200){const _0x25f212=a131_0x799c55;try{return await this['client'][_0x25f212(0x1f7)](_0x5b20a9,_0x107200);}catch(_0x330855){if(isHttp404Error(_0x330855))throw new SDKError(ErrorCode[_0x25f212(0x1b7)],_0x25f212(0x1b0)+_0x5b20a9,_0x330855);throw _0x330855;}}async[a131_0x799c55(0x16d)](_0x423dcd,_0x2e8360){const _0x30127b=a131_0x799c55,_0x37dfea={'from':_0x2e8360?.[_0x30127b(0x1f4)],'to':_0x2e8360?.['to'],'limit':_0x2e8360?.['limit']},_0x170b06=_0x2e8360?.[_0x30127b(0x1bd)]!==_0x30127b(0x17a);try{const [_0x33b52a,_0x1765b8]=await Promise[_0x30127b(0x179)]([this[_0x30127b(0x1ee)](_0x423dcd,_0x2e8360?.[_0x30127b(0x1bd)],_0x37dfea),_0x170b06?this[_0x30127b(0x191)](_0x423dcd):undefined]);if(_0x33b52a[_0x30127b(0x1b5)]&&_0x1765b8){const _0x5c546f=buildStageNameMap(_0x1765b8);_0x33b52a[_0x30127b(0x1b5)]=_0x33b52a[_0x30127b(0x1b5)][_0x30127b(0x1d0)](_0xf6a009=>({..._0xf6a009,'journeyStageName':_0x5c546f[_0x30127b(0x1dd)](_0xf6a009[_0x30127b(0x167)])??_0xf6a009[_0x30127b(0x167)]}));}return _0x33b52a;}catch(_0x5f0bed){if(isHttp404Error(_0x5f0bed))throw new SDKError(ErrorCode[_0x30127b(0x1b7)],_0x30127b(0x1b0)+_0x423dcd,_0x5f0bed);throw _0x5f0bed;}}async[a131_0x799c55(0x1ee)](_0x379f96,_0x4c3347,_0xb1beb4){const _0x2ca7e6=a131_0x799c55;if(_0x4c3347==='conversion'){const _0xfae340=await this[_0x2ca7e6(0x1a6)][_0x2ca7e6(0x1ec)](_0x379f96,_0xb1beb4);return{'conversion':_0xfae340};}if(_0x4c3347===_0x2ca7e6(0x1b5)){const _0x2a521=await this[_0x2ca7e6(0x1a6)]['getActivationSankeyChart'](_0x379f96,_0xb1beb4);return{'activation':_0x2a521};}const [_0x463055,_0x221488]=await Promise[_0x2ca7e6(0x179)]([this[_0x2ca7e6(0x1a6)][_0x2ca7e6(0x1ec)](_0x379f96,_0xb1beb4),this[_0x2ca7e6(0x1a6)][_0x2ca7e6(0x1f1)](_0x379f96,_0xb1beb4)]);return{'conversion':_0x463055,'activation':_0x221488};}async['pause'](_0x198f06){const _0x420718=a131_0x799c55;try{return await this['client'][_0x420718(0x174)](_0x198f06);}catch(_0x34855d){if(isHttp404Error(_0x34855d))throw new SDKError(ErrorCode[_0x420718(0x1b7)],_0x420718(0x1b0)+_0x198f06,_0x34855d);throw _0x34855d;}}async[a131_0x799c55(0x18e)](_0x11cab6){const _0x2c809f=a131_0x799c55;try{return await this[_0x2c809f(0x1a6)][_0x2c809f(0x1a4)](_0x11cab6);}catch(_0x3cd30d){if(isHttp404Error(_0x3cd30d))throw new SDKError(ErrorCode[_0x2c809f(0x1b7)],'Journey\x20not\x20found:\x20'+_0x11cab6,_0x3cd30d);throw _0x3cd30d;}}async[a131_0x799c55(0x1b8)](_0x3c7ecf){const _0x4e30af=a131_0x799c55;return await this[_0x4e30af(0x1a6)]['createJourney'](_0x3c7ecf);}async[a131_0x799c55(0x1a0)](_0xc85eea,_0x4ec129){const _0x46e898=a131_0x799c55;try{return await this[_0x46e898(0x1a6)][_0x46e898(0x17f)](_0xc85eea,_0x4ec129);}catch(_0x5af34d){if(isHttp404Error(_0x5af34d))throw new SDKError(ErrorCode[_0x46e898(0x1b7)],_0x46e898(0x1b0)+_0xc85eea,_0x5af34d);throw _0x5af34d;}}async['getActivation'](_0x5a8207,_0x1ba79d){const _0x3eb983=a131_0x799c55;try{return await this[_0x3eb983(0x1a6)][_0x3eb983(0x1fa)](_0x5a8207,_0x1ba79d);}catch(_0x3a5c95){if(isHttp404Error(_0x3a5c95))throw new SDKError(ErrorCode['NOT_FOUND'],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x1ba79d+_0x3eb983(0x17c)+_0x5a8207,_0x3a5c95);throw _0x3a5c95;}}async[a131_0x799c55(0x1d2)](_0xe15980){const _0x368d69=a131_0x799c55;try{return await this[_0x368d69(0x1a6)][_0x368d69(0x183)](_0xe15980);}catch(_0x1be3f3){if(isHttp404Error(_0x1be3f3))return[];throw _0x1be3f3;}}async[a131_0x799c55(0x19e)](_0x3efecf){const _0x320428=a131_0x799c55,_0x1564f0=await this[_0x320428(0x1d2)](_0x3efecf);return _0x1564f0[_0x320428(0x1d0)](flattenJourneyActivation);}async[a131_0x799c55(0x1c7)](_0x3d2d0f,_0xcc7017){const _0x2e27de=a131_0x799c55;return await this[_0x2e27de(0x1a6)][_0x2e27de(0x1e0)](_0x3d2d0f,_0xcc7017);}async[a131_0x799c55(0x1e2)](_0x3d7274){const _0xd0dfb1=a131_0x799c55,_0x193faf=await this[_0xd0dfb1(0x191)](_0x3d7274),_0x4c61bb=generateColumnMapping(_0x193faf);return{'journeyId':_0x193faf['id'],'journeyName':_0x193faf[_0xd0dfb1(0x1bb)][_0xd0dfb1(0x1a1)],'database':_0xd0dfb1(0x1e9)+_0x193faf[_0xd0dfb1(0x1bb)][_0xd0dfb1(0x1d7)],'table':_0xd0dfb1(0x1df)+_0x193faf['id'],'columns':_0x4c61bb};}async['getBundle'](_0x1d6217){return this['client']['getJourneyBundle'](_0x1d6217);}async[a131_0x799c55(0x1f2)](_0x8f310){const _0x1d895e=a131_0x799c55;if(!_0x8f310)return undefined;try{const _0x53eed6=await this['getBundle'](_0x8f310);return _0x53eed6[_0x1d895e(0x195)];}catch{return undefined;}}async['listVersions'](_0x54fb9a){const _0x21fc0a=a131_0x799c55,_0xd71595=await this[_0x21fc0a(0x191)](_0x54fb9a),_0x44b0d1=_0xd71595[_0x21fc0a(0x1bb)]['journeyBundleId'];if(!_0x44b0d1)return{'bundleId':'','bundleName':_0xd71595[_0x21fc0a(0x1bb)][_0x21fc0a(0x1a1)],'bundleDescription':_0xd71595[_0x21fc0a(0x1bb)]['description']??null,'latestJourneyId':_0xd71595['id'],'versions':[synthesizePreBundleVersion(_0xd71595)]};const _0x374ab4=await this[_0x21fc0a(0x184)](_0x44b0d1);return{'bundleId':_0x44b0d1,'bundleName':_0x374ab4['name'],'bundleDescription':_0x374ab4['description']??null,'latestJourneyId':_0x374ab4[_0x21fc0a(0x195)],'versions':formatVersionsFromBundle(_0x374ab4)};}async[a131_0x799c55(0x1da)](_0x443990){const _0xca41ff=a131_0x799c55,_0x299831=await this[_0xca41ff(0x191)](_0x443990),_0x2d372a=_0x299831['attributes'][_0xca41ff(0x196)];if(!_0x2d372a)throw new SDKError(ErrorCode[_0xca41ff(0x185)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this['client'][_0xca41ff(0x1ea)](_0x2d372a);const _0x2b396c=await this[_0xca41ff(0x1a6)][_0xca41ff(0x168)](_0x2d372a),_0x265c7a=_0x2b396c[_0xca41ff(0x1a1)]+'\x20v'+(_0x2b396c[_0xca41ff(0x1b3)]+0x1);return this['client'][_0xca41ff(0x188)](_0x2d372a,{'sourceId':_0x443990,'attributes':{'name':_0x265c7a}});}}
1
+ const a131_0x19856a=a131_0xa1f6;(function(_0xbecc76,_0x4e8830){const _0x403c94=a131_0xa1f6,_0x5945d2=_0xbecc76();while(!![]){try{const _0x236944=-parseInt(_0x403c94(0x114))/0x1*(parseInt(_0x403c94(0xad))/0x2)+parseInt(_0x403c94(0xb5))/0x3*(-parseInt(_0x403c94(0x11f))/0x4)+-parseInt(_0x403c94(0xb6))/0x5*(parseInt(_0x403c94(0x102))/0x6)+parseInt(_0x403c94(0xd6))/0x7*(parseInt(_0x403c94(0x9b))/0x8)+parseInt(_0x403c94(0xc4))/0x9+parseInt(_0x403c94(0x92))/0xa*(parseInt(_0x403c94(0x10d))/0xb)+-parseInt(_0x403c94(0xfb))/0xc*(-parseInt(_0x403c94(0x106))/0xd);if(_0x236944===_0x4e8830)break;else _0x5945d2['push'](_0x5945d2['shift']());}catch(_0x1db5ff){_0x5945d2['push'](_0x5945d2['shift']());}}}(a131_0x46af,0xa6d26));function a131_0xa1f6(_0x389a7d,_0x48d7e8){_0x389a7d=_0x389a7d-0x92;const _0x46afe7=a131_0x46af();let _0xa1f61e=_0x46afe7[_0x389a7d];return _0xa1f61e;}import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x4d5df8){const _0x45c852=a131_0xa1f6;return _0x4d5df8['journeyBundleId']??_0x4d5df8[_0x45c852(0x98)]?.[_0x45c852(0x123)]??undefined;}function a131_0x46af(){const _0x49100f=['exitOrJumpRate','attributes','versionNumber','resume','8sJwSGd','resumeJourney','entries','journeyBundleName','create','Journey\x20activation\x20step\x20not\x20found:\x20','has','paused','JOURNEY_NOT_FOUND','reduce','state','\x20in\x20journey\x20','from','history','map','NOT_FOUND','getActivation','audienceId','14590AbZpPR','add','listJourneysWithFolders','steps','intime_stage_','createVersion','listActivationsFlat','set','3187518pozGkr','745835ZXeHKl','entryInflux','folder-segment','listSegmentFolders','pause','cdp_customer_id','description','ABTest','replace','step','Journey\x20not\x20found:\x20','includeAllVersions','getJourneyBundle','listJourneysFromParentSegment','1859517dakwwF','getJourney','journeyId','segmentId','journeyStageId','branches','milestone','includeHistory','Wait','conditions','excluded','getTrafficData','getColumnMapping','updatedAt','DecisionPoint','time','INVALID_ARGUMENT','_variant_','7492583IlcqOx','exitOrJumpSize','relationships','out','segmentFolderId','timedOutPath','completionRate','listJourneysWithDetails','stage','filter','find','length','activation','type','latestJourneyId','lastVersionNumber','flat','update','listEntitiesByFolder','getConversionSankeyChart','journey','draft','intime_journey','launched','cdp_audience_','get','toLowerCase','createJourney','waitCondition','Excluded\x20profiles','sort','resolveJourneyId','getLatestJourneyId','pauseJourney','variants','createdAt','push','46896OFkAmk','simulation','exit_criteria','AbTest','exitCriteria','applyVersionDeduplication','getActivationSankeyChart','18hFcagf','jumpInflux','listJourneysWithDetailsFromParentSegment','goalSize','1885GqOxqW','getJourneyActivation','activationStepsById','branch','limit','conditionSegmentId','isArray','14971bmuEsg','exitInflux','string','size','outtime_stage_','data','goal','28BegteB','conversion','all','WaitStep','fixed','journeyStages','checkJourneyAppendable','listActivations','entryCriteria','idx-','_milestone','4KuHTxc','createActivation','journeys','getParentSegmentFull','journeyBundleId','name','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','fetchTrafficRaw','_exit_','values','outtime_journey','intime_goal','4070svqEdO','parentFolder','getBundle','client','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle'];a131_0x46af=function(){return _0x49100f;};return a131_0x46af();}function getVersionNumber(_0x567618){const _0x1cfb2d=a131_0xa1f6;return _0x567618[_0x1cfb2d(0x99)]??_0x567618[_0x1cfb2d(0x98)]?.[_0x1cfb2d(0x99)]??0x0;}function getState(_0x2fac0e){const _0x1bc19f=a131_0xa1f6;return _0x2fac0e['state']??_0x2fac0e['attributes']?.[_0x1bc19f(0xa5)];}export function deduplicateJourneysByBundle(_0x1a18ce){const _0x697aa3=a131_0xa1f6,_0x3e4281=new Map();let _0x1d9387=0x0;for(const _0xb50353 of _0x1a18ce){const _0x5492b3=getBundleId(_0xb50353);if(!_0x5492b3){const _0x4d83ee='no-bundle-'+(_0xb50353['id']??_0x697aa3(0x11d)+_0x1d9387++);_0x3e4281[_0x697aa3(0xb4)](_0x4d83ee,_0xb50353);continue;}const _0x89dd26=_0x3e4281[_0x697aa3(0xef)](_0x5492b3);if(!_0x89dd26)_0x3e4281[_0x697aa3(0xb4)](_0x5492b3,_0xb50353);else{const _0x301068=getState(_0x89dd26)===_0x697aa3(0xed),_0x7ec6d0=getState(_0xb50353)===_0x697aa3(0xed);if(_0x7ec6d0&&!_0x301068)_0x3e4281[_0x697aa3(0xb4)](_0x5492b3,_0xb50353);else{if(!_0x7ec6d0&&_0x301068){}else{const _0x460977=getVersionNumber(_0x89dd26),_0x388781=getVersionNumber(_0xb50353);_0x388781>_0x460977&&_0x3e4281[_0x697aa3(0xb4)](_0x5492b3,_0xb50353);}}}}return Array[_0x697aa3(0xa7)](_0x3e4281[_0x697aa3(0x128)]());}const VALID_JOURNEY_STATES=new Set([a131_0x19856a(0xeb),a131_0x19856a(0xfc),a131_0x19856a(0xed)]);export function parseJourneyState(_0x1a5d11){const _0x564847=a131_0x19856a;if(typeof _0x1a5d11===_0x564847(0x10f)&&VALID_JOURNEY_STATES['has'](_0x1a5d11))return _0x1a5d11;return _0x564847(0xeb);}export function entityToJourneyListItem(_0x78b5cb,_0x40ff72){const _0x426404=a131_0x19856a,_0x483a1b=_0x78b5cb['attributes'];return{'id':_0x78b5cb['id'],'name':_0x483a1b[_0x426404(0x124)]??'','journeyBundleName':_0x483a1b[_0x426404(0x9e)]??_0x483a1b[_0x426404(0x124)]??'','journeyBundleId':_0x483a1b[_0x426404(0x123)]??'','versionNumber':_0x483a1b[_0x426404(0x99)],'description':_0x483a1b['description']??null,'state':parseJourneyState(_0x483a1b[_0x426404(0xa5)]),'paused':_0x483a1b[_0x426404(0xa2)]??![],'audienceId':_0x40ff72,'folderId':_0x483a1b[_0x426404(0xda)]??_0x78b5cb[_0x426404(0xd8)]?.[_0x426404(0x93)]?.['data']?.['id']??null,'createdAt':_0x483a1b[_0x426404(0xf9)]??'','updatedAt':_0x483a1b[_0x426404(0xd1)]??''};}function convertToColumnId(_0x3eb6cc){const _0x51a072=a131_0x19856a;return _0x3eb6cc[_0x51a072(0xbe)](/-/g,'_');}function getStepEntries(_0x507675){const _0x51fab9=a131_0x19856a;if(!_0x507675)return[];if(Array[_0x51fab9(0x10c)](_0x507675))return _0x507675[_0x51fab9(0xa9)](_0x3551ee=>[_0x3551ee['id'],_0x3551ee]);return Object[_0x51fab9(0x9d)](_0x507675);}export function flattenJourneyActivation(_0x55b785){const _0x20c8e9=a131_0x19856a,{activationParams:_0x551345,activationId:_0x488005,runAfterJourneyRefresh:_0x309c83}=_0x55b785[_0x20c8e9(0x98)];return{'id':_0x55b785['id'],'activationId':_0x488005,'runAfterJourneyRefresh':_0x309c83,..._0x551345};}function col(_0xdb7136,_0x448914={}){const _0x45bfcd=a131_0x19856a;return{'column':_0xdb7136,'direction':null,'stageIndex':null,'stageName':null,'category':_0x45bfcd(0x118),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x448914};}export function generateColumnMapping(_0xb3caa5){const _0x48162c=a131_0x19856a,_0x15a72e=[];_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xbb))),_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xec),{'direction':'in','category':_0x48162c(0xea)})),_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0x129),{'direction':_0x48162c(0xd9),'category':_0x48162c(0xea)}));_0xb3caa5['attributes'][_0x48162c(0x113)]&&_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0x12a),{'direction':'in','category':_0x48162c(0x113),'detail':_0xb3caa5['attributes']['goal'][_0x48162c(0x124)]||null}));const _0x596157=_0xb3caa5['attributes']['journeyStages']||[];for(let _0x330a57=0x0;_0x330a57<_0x596157[_0x48162c(0xe1)];_0x330a57++){const _0x2d5541=_0x596157[_0x330a57],_0x1663c6=_0x2d5541[_0x48162c(0x124)],_0x16b6ee={'stageIndex':_0x330a57,'stageName':_0x1663c6},_0x4d537f=_0x2d5541[_0x48162c(0x11c)]?.[_0x48162c(0x124)]||null;_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57,{..._0x16b6ee,'direction':'in','category':_0x48162c(0xde),'detail':_0x4d537f})),_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0x111)+_0x330a57,{..._0x16b6ee,'direction':_0x48162c(0xd9),'category':_0x48162c(0xde),'detail':_0x4d537f}));_0x2d5541[_0x48162c(0xca)]&&_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57+_0x48162c(0x11e),{..._0x16b6ee,'direction':'in','category':_0x48162c(0xca),'detail':_0x2d5541[_0x48162c(0xca)]['name']||null}));const _0x4191c2=_0x2d5541['exitCriterias']||_0x2d5541[_0x48162c(0xff)]||[];for(let _0x20e3cf=0x0;_0x20e3cf<_0x4191c2[_0x48162c(0xe1)];_0x20e3cf++){_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57+_0x48162c(0x127)+_0x20e3cf,{..._0x16b6ee,'direction':'in','category':_0x48162c(0xfd),'detail':_0x4191c2[_0x20e3cf][_0x48162c(0x124)]||null}));}const _0x40933f=getStepEntries(_0x2d5541[_0x48162c(0xb0)]);for(const [_0x4b3a74,_0x542590]of _0x40933f){const _0x58e699=convertToColumnId(_0x4b3a74),_0x385ec7=_0x542590[_0x48162c(0xe3)]||null,_0x10bc76=_0x542590[_0x48162c(0x124)]||null,_0x581dde={..._0x16b6ee,'stepType':_0x385ec7,'stepName':_0x10bc76,'stepId':_0x4b3a74};_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57+'_'+_0x58e699,{..._0x581dde,'direction':'in','category':_0x48162c(0xbf)})),_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0x111)+_0x330a57+'_'+_0x58e699,{..._0x581dde,'direction':_0x48162c(0xd9),'category':_0x48162c(0xbf)}));if(_0x542590['type']===_0x48162c(0xd2)&&_0x542590[_0x48162c(0xc9)])for(const _0x30b821 of _0x542590[_0x48162c(0xc9)]){_0x30b821[_0x48162c(0xc7)]&&_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57+'_'+_0x58e699+'_'+_0x30b821[_0x48162c(0xc7)],{..._0x581dde,'direction':'in','category':_0x48162c(0x109),'detail':_0x30b821[_0x48162c(0x124)]||(_0x30b821[_0x48162c(0xce)]?_0x48162c(0xf3):null)}));}if((_0x542590['type']===_0x48162c(0xfe)||_0x542590[_0x48162c(0xe3)]===_0x48162c(0xbd))&&_0x542590[_0x48162c(0xf8)])for(const _0x5ea550 of _0x542590[_0x48162c(0xf8)]){_0x5ea550['id']&&_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57+'_'+_0x58e699+_0x48162c(0xd5)+convertToColumnId(_0x5ea550['id']),{..._0x581dde,'direction':'in','category':'variant','detail':_0x5ea550[_0x48162c(0x124)]||null}));}if(_0x542590[_0x48162c(0xe3)]===_0x48162c(0x117)||_0x542590[_0x48162c(0xe3)]===_0x48162c(0xcc)){const _0xe04ce6=[];if(_0x542590['conditionSegmentId'])_0xe04ce6[_0x48162c(0xfa)](_0x542590[_0x48162c(0x10b)]);else{if(Array[_0x48162c(0x10c)](_0x542590[_0x48162c(0xcd)]))for(const _0x698f25 of _0x542590[_0x48162c(0xcd)]){_0x698f25[_0x48162c(0xc7)]&&!_0x698f25[_0x48162c(0xdb)]&&_0xe04ce6[_0x48162c(0xfa)](_0x698f25[_0x48162c(0xc7)]);}else _0x542590[_0x48162c(0xf2)]?.['segmentId']&&_0xe04ce6[_0x48162c(0xfa)](_0x542590[_0x48162c(0xf2)]['segmentId']);}for(const _0xc4cd7b of _0xe04ce6){_0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xb1)+_0x330a57+'_'+_0x58e699+'_'+_0xc4cd7b,{..._0x581dde,'direction':'in','category':_0x48162c(0x109)}));}}}}return _0x15a72e[_0x48162c(0xfa)](col(_0x48162c(0xd3))),_0x15a72e;}export function aggregateJourneyHistory(_0x362fa1){const _0x21ef19=a131_0x19856a,_0x168f06=_0x362fa1[_0x21ef19(0xa4)]((_0x2635d7,_0x3cf942)=>_0x2635d7+(_0x3cf942[_0x21ef19(0xb7)]??0x0),0x0),_0x43ec19=_0x362fa1['reduce']((_0x3ad0ce,_0xd44f9)=>_0x3ad0ce+(_0xd44f9['goalInflux']??0x0),0x0),_0x524c95=_0x362fa1[_0x21ef19(0xa4)]((_0x2675e8,_0x96e468)=>_0x2675e8+((_0x96e468['exitInflux']??0x0)+(_0x96e468[_0x21ef19(0x103)]??0x0)),0x0),_0x4ad76a=_0x362fa1[_0x362fa1[_0x21ef19(0xe1)]-0x1];return{'size':_0x4ad76a?.[_0x21ef19(0x110)]??0x0,'entered':_0x168f06,'goal_achieved':_0x43ec19,'completion_rate':_0x43ec19&&_0x168f06?_0x43ec19/_0x168f06*0x64:0x0,'exit_or_jump':_0x524c95,'exit_or_jump_rate':_0x524c95&&_0x168f06?_0x524c95/_0x168f06*0x64:0x0};}export function aggregateStageHistory(_0x15752f){const _0x3ea2a6=a131_0x19856a,_0x580a15=_0x15752f[_0x3ea2a6(0xa4)]((_0x47bdbd,_0x550be2)=>_0x47bdbd+(_0x550be2['entryInflux']??0x0),0x0),_0x30a15f=_0x15752f[_0x3ea2a6(0xa4)]((_0x8d2be4,_0x3274dd)=>_0x8d2be4+(_0x3274dd['milestoneInflux']??0x0),0x0),_0x374d33=_0x15752f[_0x3ea2a6(0xa4)]((_0x4df347,_0x26c21d)=>_0x4df347+((_0x26c21d[_0x3ea2a6(0x10e)]??0x0)+(_0x26c21d['jumpInflux']??0x0)),0x0),_0x2f92a1=_0x15752f[_0x15752f['length']-0x1];return{'size':_0x2f92a1?.['size']??0x0,'entered':_0x580a15,'milestone':_0x30a15f,'milestone_rate':_0x30a15f&&_0x580a15?_0x30a15f/_0x580a15*0x64:0x0,'exit_or_jump':_0x374d33,'exit_or_jump_rate':_0x374d33&&_0x580a15?_0x374d33/_0x580a15*0x64:0x0};}export function assembleJourneyStats(_0x43d565,_0x3e0e04){const _0xa8120d=a131_0x19856a,_0x5b9e6a=!!(_0x3e0e04?.[_0xa8120d(0xa7)]||_0x3e0e04?.['to'])&&!!_0x43d565[_0xa8120d(0xa8)]?.[_0xa8120d(0xe1)];if(_0x5b9e6a){const _0x209b59=aggregateJourneyHistory(_0x43d565['history']),_0x5e325f={'journey_id':_0x43d565['journeyId'],..._0x3e0e04?.[_0xa8120d(0xa7)]&&{'from':_0x3e0e04['from']},..._0x3e0e04?.['to']&&{'to':_0x3e0e04['to']},..._0x209b59};return _0x3e0e04?.[_0xa8120d(0xcb)]&&(_0x5e325f['history']=_0x43d565['history']),_0x5e325f;}return{'journey_id':_0x43d565[_0xa8120d(0xc6)],'size':_0x43d565[_0xa8120d(0x110)],'entered':_0x43d565['enteredSize'],'goal_achieved':_0x43d565[_0xa8120d(0x105)],'completion_rate':_0x43d565[_0xa8120d(0xdc)],'exit_or_jump':_0x43d565[_0xa8120d(0xd7)],'exit_or_jump_rate':_0x43d565[_0xa8120d(0x97)]};}export function formatVersionsFromBundle(_0x1b8ae5){const _0x34357a=a131_0x19856a,_0x23dae9=_0x1b8ae5[_0x34357a(0x121)][_0x34357a(0xa9)](_0x44cc05=>({'journeyId':_0x44cc05['id'],'versionNumber':_0x44cc05[_0x34357a(0x98)][_0x34357a(0x99)]??0x0,'name':_0x44cc05[_0x34357a(0x98)][_0x34357a(0x124)],'state':_0x44cc05['attributes'][_0x34357a(0xa5)],'paused':_0x44cc05[_0x34357a(0x98)][_0x34357a(0xa2)],'createdAt':_0x44cc05[_0x34357a(0x98)]['createdAt'],'updatedAt':_0x44cc05['attributes'][_0x34357a(0xd1)]}));return _0x23dae9[_0x34357a(0xf4)]((_0x183a19,_0x2dc350)=>_0x183a19['versionNumber']-_0x2dc350[_0x34357a(0x99)]),_0x23dae9;}export function synthesizePreBundleVersion(_0x3d0628){const _0x184bb9=a131_0x19856a;return{'journeyId':_0x3d0628['id'],'versionNumber':0x1,'name':_0x3d0628['attributes'][_0x184bb9(0x124)],'state':_0x3d0628[_0x184bb9(0x98)][_0x184bb9(0xa5)],'paused':_0x3d0628[_0x184bb9(0x98)]['paused'],'createdAt':_0x3d0628[_0x184bb9(0x98)][_0x184bb9(0xf9)],'updatedAt':_0x3d0628[_0x184bb9(0x98)][_0x184bb9(0xd1)]};}export function buildStageNameMap(_0xeaf2e){const _0xfe3ca9=a131_0x19856a;return new Map(_0xeaf2e[_0xfe3ca9(0x98)][_0xfe3ca9(0x119)]?.[_0xfe3ca9(0xa9)](_0x402326=>[_0x402326['id'],_0x402326[_0xfe3ca9(0x124)]])??[]);}export class JourneySDK{['client'];constructor(_0x439429){const _0x34b427=a131_0x19856a;this[_0x34b427(0x95)]=new CDPApiClient(_0x439429);}[a131_0x19856a(0x100)](_0x3996f5,_0x3b792d){return _0x3b792d?_0x3996f5:deduplicateJourneysByBundle(_0x3996f5);}async[a131_0x19856a(0xdd)](_0x1ce9fb,_0x444e1d){const _0x27c60a=a131_0x19856a;try{const _0xb2d300=await this[_0x27c60a(0x95)][_0x27c60a(0xdd)](_0x1ce9fb);return{'journeys':this[_0x27c60a(0x100)](_0xb2d300['journeys'],_0x444e1d),'activationStepsById':_0xb2d300[_0x27c60a(0x108)]};}catch(_0xc234b3){if(isHttp404Error(_0xc234b3))return{'journeys':[],'activationStepsById':new Map()};throw _0xc234b3;}}async[a131_0x19856a(0xc3)](_0x3eae09,_0x3d5ff9,_0x485766){const _0x18461e=a131_0x19856a;let _0x393101=_0x3d5ff9;if(!_0x393101)try{const _0xc1a403=await this[_0x18461e(0x95)][_0x18461e(0x122)](_0x3eae09);_0x393101=_0xc1a403['rootFolderId']??undefined;}catch(_0x3f30d4){if(isHttp404Error(_0x3f30d4))return[];throw _0x3f30d4;}if(!_0x393101)return[];let _0x29d5b8;if(_0x485766?.[_0x18461e(0xc1)]){const _0x168990=await this[_0x18461e(0x95)][_0x18461e(0xb9)](_0x3eae09),_0x31ab95=_0x168990['map'](_0x4bc2aa=>this['client']['listJourneys'](_0x4bc2aa['id'])),_0x437aea=await Promise['all'](_0x31ab95),_0x212ae3=new Set();_0x29d5b8=_0x437aea[_0x18461e(0xe6)]()[_0x18461e(0xdf)](_0x482811=>{const _0x39d1e8=_0x18461e;if(_0x212ae3[_0x39d1e8(0xa1)](_0x482811['id']))return![];return _0x212ae3['add'](_0x482811['id']),!![];});}else{const _0x3c6e0b=await this['client'][_0x18461e(0xe8)](_0x393101,0x20,![]),_0x2d17aa=_0x3c6e0b[_0x18461e(0x112)],_0x250ef9=_0x2d17aa[_0x18461e(0xdf)](_0x511bd5=>_0x511bd5[_0x18461e(0xe3)]==='journey');_0x29d5b8=_0x250ef9[_0x18461e(0xa9)](_0x4e2bd1=>entityToJourneyListItem(_0x4e2bd1,_0x3eae09));}return this[_0x18461e(0x100)](_0x29d5b8,_0x485766?.[_0x18461e(0xc1)]);}async[a131_0x19856a(0xaf)](_0x136a09,_0x26b0e9,_0x4e0d48){const _0x3b11e4=a131_0x19856a;if(!_0x26b0e9)return{'journeys':[],'folders':[]};const _0x1bdd6a=await this[_0x3b11e4(0x95)][_0x3b11e4(0xe8)](_0x26b0e9,0x20,![]),_0x115c8a=_0x1bdd6a['data'],_0x110a70=_0x115c8a[_0x3b11e4(0xdf)](_0x3ff550=>_0x3ff550[_0x3b11e4(0xe3)]===_0x3b11e4(0xb8)&&_0x3ff550['id']!==_0x26b0e9),_0x348aeb=_0x110a70['map'](_0x584971=>({'id':_0x584971['id'],'name':_0x584971['attributes'][_0x3b11e4(0x124)]})),_0xf63b0f=_0x115c8a[_0x3b11e4(0xdf)](_0x120b3b=>_0x120b3b['type']===_0x3b11e4(0xea)),_0x37a4bb=_0xf63b0f['map'](_0x33687e=>entityToJourneyListItem(_0x33687e,_0x136a09));return{'journeys':this[_0x3b11e4(0x100)](_0x37a4bb,_0x4e0d48?.[_0x3b11e4(0xc1)]),'folders':_0x348aeb};}async[a131_0x19856a(0x104)](_0x41a37a,_0x2d236a){const _0xc7a22e=a131_0x19856a;let _0x1d88a8;try{_0x1d88a8=await this[_0xc7a22e(0x95)]['listSegmentFolders'](_0x41a37a);}catch(_0x18267b){if(isHttp404Error(_0x18267b))return{'journeys':[],'activationStepsById':new Map()};throw _0x18267b;}const _0x3105e2=_0x1d88a8[_0xc7a22e(0xa9)](async _0x27a354=>{const _0x38681d=_0xc7a22e;return await this[_0x38681d(0xdd)](_0x27a354['id'],_0x2d236a?.[_0x38681d(0xc1)]);}),_0x26690c=await Promise['all'](_0x3105e2),_0xea7ae7=new Map(),_0x230966=[];for(const _0x39dff9 of _0x26690c){_0x230966[_0xc7a22e(0xfa)](..._0x39dff9[_0xc7a22e(0x121)]);for(const [_0x38fa00,_0x4c51cd]of _0x39dff9['activationStepsById']){_0xea7ae7[_0xc7a22e(0xb4)](_0x38fa00,_0x4c51cd);}}const _0x531592=new Set(),_0x354ebb=_0x230966[_0xc7a22e(0xdf)](_0x33170b=>{const _0x3c3be2=_0xc7a22e;if(_0x531592[_0x3c3be2(0xa1)](_0x33170b['id']))return![];return _0x531592[_0x3c3be2(0xae)](_0x33170b['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x354ebb,_0x2d236a?.[_0xc7a22e(0xc1)]),'activationStepsById':_0xea7ae7};}async[a131_0x19856a(0xc5)](_0x4dd246){const _0x29a46f=a131_0x19856a;try{return await this[_0x29a46f(0x95)]['getJourney'](_0x4dd246);}catch(_0x5ed6af){if(isHttp404Error(_0x5ed6af))throw new SDKError(ErrorCode[_0x29a46f(0xa3)],'Journey\x20not\x20found:\x20'+_0x4dd246,_0x5ed6af);throw _0x5ed6af;}}async[a131_0x19856a(0xf5)](_0x106ed3,_0x26bcfb){const _0x5a78f0=a131_0x19856a,_0xcf3c82=await this[_0x5a78f0(0xc3)](_0x106ed3),_0x44c310=_0xcf3c82[_0x5a78f0(0xe0)](_0x41b4cf=>_0x41b4cf['journeyBundleName'][_0x5a78f0(0xf0)]()===_0x26bcfb[_0x5a78f0(0xf0)]());if(!_0x44c310)throw new SDKError(ErrorCode[_0x5a78f0(0xa3)],_0x5a78f0(0xc0)+_0x26bcfb,undefined,{'helpText':_0x5a78f0(0x125)});return _0x44c310['id'];}async['getStatistics'](_0xb073f5,_0x51c640){const _0x4ca83f=a131_0x19856a;try{return await this[_0x4ca83f(0x95)]['getJourneyStatistics'](_0xb073f5,_0x51c640);}catch(_0x14f23c){if(isHttp404Error(_0x14f23c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x4ca83f(0xc0)+_0xb073f5,_0x14f23c);throw _0x14f23c;}}async[a131_0x19856a(0xcf)](_0x247f1b,_0x32325c){const _0x6daf6f=a131_0x19856a,_0x11ca8a={'from':_0x32325c?.[_0x6daf6f(0xa7)],'to':_0x32325c?.['to'],'limit':_0x32325c?.[_0x6daf6f(0x10a)]},_0x40b83e=_0x32325c?.[_0x6daf6f(0xe3)]!==_0x6daf6f(0x115);try{const [_0x55e062,_0x1060a7]=await Promise[_0x6daf6f(0x116)]([this[_0x6daf6f(0x126)](_0x247f1b,_0x32325c?.['type'],_0x11ca8a),_0x40b83e?this[_0x6daf6f(0xc5)](_0x247f1b):undefined]);if(_0x55e062[_0x6daf6f(0xe2)]&&_0x1060a7){const _0x2208fe=buildStageNameMap(_0x1060a7);_0x55e062[_0x6daf6f(0xe2)]=_0x55e062[_0x6daf6f(0xe2)][_0x6daf6f(0xa9)](_0x51f98a=>({..._0x51f98a,'journeyStageName':_0x2208fe['get'](_0x51f98a[_0x6daf6f(0xc8)])??_0x51f98a[_0x6daf6f(0xc8)]}));}return _0x55e062;}catch(_0x2a1790){if(isHttp404Error(_0x2a1790))throw new SDKError(ErrorCode[_0x6daf6f(0xa3)],_0x6daf6f(0xc0)+_0x247f1b,_0x2a1790);throw _0x2a1790;}}async['fetchTrafficRaw'](_0x5c23ae,_0x324176,_0x4150e9){const _0x2bce49=a131_0x19856a;if(_0x324176==='conversion'){const _0x232b4f=await this['client'][_0x2bce49(0xe9)](_0x5c23ae,_0x4150e9);return{'conversion':_0x232b4f};}if(_0x324176===_0x2bce49(0xe2)){const _0x29062d=await this[_0x2bce49(0x95)][_0x2bce49(0x101)](_0x5c23ae,_0x4150e9);return{'activation':_0x29062d};}const [_0x52f262,_0x40e551]=await Promise[_0x2bce49(0x116)]([this[_0x2bce49(0x95)][_0x2bce49(0xe9)](_0x5c23ae,_0x4150e9),this[_0x2bce49(0x95)][_0x2bce49(0x101)](_0x5c23ae,_0x4150e9)]);return{'conversion':_0x52f262,'activation':_0x40e551};}async[a131_0x19856a(0xba)](_0x3f5c00){const _0x1150cf=a131_0x19856a;try{return await this[_0x1150cf(0x95)][_0x1150cf(0xf7)](_0x3f5c00);}catch(_0x564637){if(isHttp404Error(_0x564637))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x3f5c00,_0x564637);throw _0x564637;}}async[a131_0x19856a(0x9a)](_0x270d94){const _0x41dad9=a131_0x19856a;try{return await this[_0x41dad9(0x95)][_0x41dad9(0x9c)](_0x270d94);}catch(_0x28999b){if(isHttp404Error(_0x28999b))throw new SDKError(ErrorCode[_0x41dad9(0xa3)],_0x41dad9(0xc0)+_0x270d94,_0x28999b);throw _0x28999b;}}async[a131_0x19856a(0x9f)](_0x3206b1){const _0x29dde5=a131_0x19856a;return await this['client'][_0x29dde5(0xf1)](_0x3206b1);}async[a131_0x19856a(0xe7)](_0x4e48fd,_0x4fd132){const _0x1dd69b=a131_0x19856a;try{return await this['client']['updateJourney'](_0x4e48fd,_0x4fd132);}catch(_0x1afd63){if(isHttp404Error(_0x1afd63))throw new SDKError(ErrorCode[_0x1dd69b(0xa3)],_0x1dd69b(0xc0)+_0x4e48fd,_0x1afd63);throw _0x1afd63;}}async[a131_0x19856a(0xab)](_0x5962a5,_0x542e27){const _0x141659=a131_0x19856a;try{return await this['client'][_0x141659(0x107)](_0x5962a5,_0x542e27);}catch(_0x13d066){if(isHttp404Error(_0x13d066))throw new SDKError(ErrorCode[_0x141659(0xaa)],_0x141659(0xa0)+_0x542e27+_0x141659(0xa6)+_0x5962a5,_0x13d066);throw _0x13d066;}}async['listActivations'](_0x586a96){try{return await this['client']['listJourneyActivations'](_0x586a96);}catch(_0x2cc15d){if(isHttp404Error(_0x2cc15d))return[];throw _0x2cc15d;}}async[a131_0x19856a(0xb3)](_0x4af693){const _0x594fec=a131_0x19856a,_0x208972=await this[_0x594fec(0x11b)](_0x4af693);return _0x208972['map'](flattenJourneyActivation);}async[a131_0x19856a(0x120)](_0xffdcef,_0x4ea24f){const _0x24aa92=a131_0x19856a;return await this[_0x24aa92(0x95)]['createJourneyActivation'](_0xffdcef,_0x4ea24f);}async[a131_0x19856a(0xd0)](_0x1a16ca){const _0x26d2a4=a131_0x19856a,_0x41874a=await this[_0x26d2a4(0xc5)](_0x1a16ca),_0x472c45=generateColumnMapping(_0x41874a);return{'journeyId':_0x41874a['id'],'journeyName':_0x41874a[_0x26d2a4(0x98)][_0x26d2a4(0x124)],'database':_0x26d2a4(0xee)+_0x41874a[_0x26d2a4(0x98)][_0x26d2a4(0xac)],'table':'journey_'+_0x41874a['id'],'columns':_0x472c45};}async[a131_0x19856a(0x94)](_0x1dc4de){const _0x2e0b76=a131_0x19856a;return this[_0x2e0b76(0x95)][_0x2e0b76(0xc2)](_0x1dc4de);}async[a131_0x19856a(0xf6)](_0x33489f){const _0x4b9b36=a131_0x19856a;if(!_0x33489f)return undefined;try{const _0x3ab5d0=await this[_0x4b9b36(0x94)](_0x33489f);return _0x3ab5d0[_0x4b9b36(0xe4)];}catch{return undefined;}}async['listVersions'](_0xfb447b){const _0x5638bf=a131_0x19856a,_0x3a9588=await this[_0x5638bf(0xc5)](_0xfb447b),_0x50e6e9=_0x3a9588[_0x5638bf(0x98)][_0x5638bf(0x123)];if(!_0x50e6e9)return{'bundleId':'','bundleName':_0x3a9588[_0x5638bf(0x98)][_0x5638bf(0x124)],'bundleDescription':_0x3a9588[_0x5638bf(0x98)]['description']??null,'latestJourneyId':_0x3a9588['id'],'versions':[synthesizePreBundleVersion(_0x3a9588)]};const _0x12d488=await this[_0x5638bf(0x94)](_0x50e6e9);return{'bundleId':_0x50e6e9,'bundleName':_0x12d488[_0x5638bf(0x124)],'bundleDescription':_0x12d488[_0x5638bf(0xbc)]??null,'latestJourneyId':_0x12d488[_0x5638bf(0xe4)],'versions':formatVersionsFromBundle(_0x12d488)};}async[a131_0x19856a(0xb2)](_0x4b5327){const _0x4f0226=a131_0x19856a,_0x871bae=await this['getJourney'](_0x4b5327),_0xf7987e=_0x871bae[_0x4f0226(0x98)]['journeyBundleId'];if(!_0xf7987e)throw new SDKError(ErrorCode[_0x4f0226(0xd4)],_0x4f0226(0x96));await this[_0x4f0226(0x95)][_0x4f0226(0x11a)](_0xf7987e);const _0x349d15=await this[_0x4f0226(0x95)]['getJourneyBundle'](_0xf7987e),_0x3aa454=_0x349d15[_0x4f0226(0x124)]+'\x20v'+(_0x349d15[_0x4f0226(0xe5)]+0x1);return this['client']['createJourneyVersion'](_0xf7987e,{'sourceId':_0x4b5327,'attributes':{'name':_0x3aa454}});}}
@@ -1 +1 @@
1
- const a132_0xf42e9d=a132_0x1484;(function(_0x597fbe,_0x358477){const _0x275e4f=a132_0x1484,_0x1f7924=_0x597fbe();while(!![]){try{const _0x3197fb=parseInt(_0x275e4f(0xac))/0x1*(-parseInt(_0x275e4f(0xa6))/0x2)+parseInt(_0x275e4f(0xa5))/0x3*(-parseInt(_0x275e4f(0xad))/0x4)+-parseInt(_0x275e4f(0xaa))/0x5*(parseInt(_0x275e4f(0xa3))/0x6)+-parseInt(_0x275e4f(0xab))/0x7+-parseInt(_0x275e4f(0xa9))/0x8*(-parseInt(_0x275e4f(0xa4))/0x9)+-parseInt(_0x275e4f(0xa7))/0xa+-parseInt(_0x275e4f(0xa0))/0xb*(-parseInt(_0x275e4f(0xa1))/0xc);if(_0x3197fb===_0x358477)break;else _0x1f7924['push'](_0x1f7924['shift']());}catch(_0xed9485){_0x1f7924['push'](_0x1f7924['shift']());}}}(a132_0xb86d,0x583b5));import{createTextCache}from'../../utils/local-cache.js';function a132_0xb86d(){const _0x5ae0b8=['2983380XFEOnt','llm/chat','8ivByEG','140170HQJyns','1454586vXIDCZ','6271TBlebl','236TVcnSm','11aWuabV','16000308OVEAde','clear','24VHZGyT','4320126wrItda','22941AGXDvg','122EywQEe'];a132_0xb86d=function(){return _0x5ae0b8;};return a132_0xb86d();}const chatIdCache=createTextCache('last_chat_id',a132_0xf42e9d(0xa8));function a132_0x1484(_0x2b9608,_0x4fc70e){_0x2b9608=_0x2b9608-0xa0;const _0xb86dd2=a132_0xb86d();let _0x14846c=_0xb86dd2[_0x2b9608];return _0x14846c;}export function saveLastChatId(_0x4d3adc){chatIdCache['write'](_0x4d3adc);}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){const _0x39ba40=a132_0xf42e9d;chatIdCache[_0x39ba40(0xa2)]();}
1
+ const a132_0x9bd4e3=a132_0x11c7;(function(_0x6b3f36,_0x184396){const _0x34218b=a132_0x11c7,_0x336436=_0x6b3f36();while(!![]){try{const _0x1fe83f=-parseInt(_0x34218b(0x1fa))/0x1*(parseInt(_0x34218b(0x1f6))/0x2)+parseInt(_0x34218b(0x1ef))/0x3+-parseInt(_0x34218b(0x1f9))/0x4*(-parseInt(_0x34218b(0x1f3))/0x5)+-parseInt(_0x34218b(0x1fc))/0x6*(parseInt(_0x34218b(0x1f7))/0x7)+-parseInt(_0x34218b(0x1fd))/0x8+-parseInt(_0x34218b(0x1f5))/0x9+parseInt(_0x34218b(0x1f8))/0xa;if(_0x1fe83f===_0x184396)break;else _0x336436['push'](_0x336436['shift']());}catch(_0x3ac0b7){_0x336436['push'](_0x336436['shift']());}}}(a132_0x155f,0xe3be9));function a132_0x11c7(_0x52b37b,_0x59a043){_0x52b37b=_0x52b37b-0x1ef;const _0x155fd9=a132_0x155f();let _0x11c764=_0x155fd9[_0x52b37b];return _0x11c764;}import{createTextCache}from'../../utils/local-cache.js';function a132_0x155f(){const _0x250221=['4NnmHqp','114316lVgUNg','write','314910tgasgh','3626416cKkcBE','1942110yuHGDa','last_chat_id','read','clear','7693390NjLsNZ','llm/chat','10929339KaTEkr','8bWtEks','14juJpgJ','9767000gpuCHU'];a132_0x155f=function(){return _0x250221;};return a132_0x155f();}const chatIdCache=createTextCache(a132_0x9bd4e3(0x1f0),a132_0x9bd4e3(0x1f4));export function saveLastChatId(_0x583594){const _0x55b5eb=a132_0x9bd4e3;chatIdCache[_0x55b5eb(0x1fb)](_0x583594);}export function loadLastChatId(){const _0x48f788=a132_0x9bd4e3;return chatIdCache[_0x48f788(0x1f1)]();}export function clearLastChatId(){const _0x28eee9=a132_0x9bd4e3;chatIdCache[_0x28eee9(0x1f2)]();}