@treasuredata/tdx 2026.3.35 → 2026.3.37

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_0x42d19c=a131_0x28e5;(function(_0x47cf8f,_0x48cc88){const _0x2a713a=a131_0x28e5,_0x888a00=_0x47cf8f();while(!![]){try{const _0xb391f3=parseInt(_0x2a713a(0x174))/0x1+parseInt(_0x2a713a(0x169))/0x2*(parseInt(_0x2a713a(0x1bf))/0x3)+parseInt(_0x2a713a(0x1c3))/0x4+-parseInt(_0x2a713a(0x1c6))/0x5+-parseInt(_0x2a713a(0x1d6))/0x6+-parseInt(_0x2a713a(0x1d1))/0x7+-parseInt(_0x2a713a(0x1ac))/0x8*(-parseInt(_0x2a713a(0x1c9))/0x9);if(_0xb391f3===_0x48cc88)break;else _0x888a00['push'](_0x888a00['shift']());}catch(_0xba56a6){_0x888a00['push'](_0x888a00['shift']());}}}(a131_0xc1f9,0x64c80));import{CDPApiClient}from'./client/cdp-api-client.js';function a131_0x28e5(_0x113465,_0x48f2fa){_0x113465=_0x113465-0x152;const _0xc1f90c=a131_0xc1f9();let _0x28e539=_0xc1f90c[_0x113465];return _0x28e539;}import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x2908ac){const _0x237a64=a131_0x28e5;return _0x2908ac[_0x237a64(0x18a)]??_0x2908ac[_0x237a64(0x195)]?.[_0x237a64(0x18a)]??undefined;}function getVersionNumber(_0x226834){const _0x5e9138=a131_0x28e5;return _0x226834['versionNumber']??_0x226834[_0x5e9138(0x195)]?.['versionNumber']??0x0;}function getState(_0x20a8bf){const _0x1d80dc=a131_0x28e5;return _0x20a8bf[_0x1d80dc(0x166)]??_0x20a8bf[_0x1d80dc(0x195)]?.[_0x1d80dc(0x166)];}export function deduplicateJourneysByBundle(_0x57562a){const _0x3e4d1b=a131_0x28e5,_0x2ff0e1=new Map();let _0x4c6cee=0x0;for(const _0x315ec2 of _0x57562a){const _0x12db2b=getBundleId(_0x315ec2);if(!_0x12db2b){const _0x4d2442='no-bundle-'+(_0x315ec2['id']??_0x3e4d1b(0x1a6)+_0x4c6cee++);_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x4d2442,_0x315ec2);continue;}const _0xc5eb6a=_0x2ff0e1['get'](_0x12db2b);if(!_0xc5eb6a)_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x12db2b,_0x315ec2);else{const _0x157583=getState(_0xc5eb6a)==='launched',_0x4c9d02=getState(_0x315ec2)===_0x3e4d1b(0x17d);if(_0x4c9d02&&!_0x157583)_0x2ff0e1[_0x3e4d1b(0x1b5)](_0x12db2b,_0x315ec2);else{if(!_0x4c9d02&&_0x157583){}else{const _0x18ab2e=getVersionNumber(_0xc5eb6a),_0x37cc58=getVersionNumber(_0x315ec2);_0x37cc58>_0x18ab2e&&_0x2ff0e1['set'](_0x12db2b,_0x315ec2);}}}}return Array[_0x3e4d1b(0x1d0)](_0x2ff0e1[_0x3e4d1b(0x183)]());}const VALID_JOURNEY_STATES=new Set([a131_0x42d19c(0x19d),a131_0x42d19c(0x16e),a131_0x42d19c(0x17d)]);function a131_0xc1f9(){const _0x198515=['variants','getBundle','listEntitiesByFolder','goalInflux','string','createActivation','exitOrJumpSize','DecisionPoint','idx-','createJourneyVersion','intime_goal','listJourneyActivations','journeyId','goalSize','57464SieBjc','resumeJourney','listJourneysWithDetailsFromParentSegment','fixed','out','Wait','history','pauseJourney','updatedAt','set','_exit_','sort','push','getJourneyBundle','audienceId','outtime_journey','flat','listJourneys','relationships','276XjgMmk','activation','completionRate','Journey\x20not\x20found:\x20','210560aYvbNn','pause','waitCondition','442595ypCDSP','getJourneyActivation','resolveJourneyId','576tNIxQH','milestone','Journey\x20activation\x20step\x20not\x20found:\x20','activationStepsById','cdp_audience_','time','fetchTrafficRaw','from','1001504TTKJIn','createJourney','\x20in\x20journey\x20','name','applyVersionDeduplication','3093516HQHGtv','checkJourneyAppendable','JOURNEY_NOT_FOUND','step','create','conditions','getConversionSankeyChart','journey','listJourneysFromParentSegment','INVALID_ARGUMENT','journeyBundleName','resume','reduce','cdp_customer_id','listJourneysWithDetails','replace','latestJourneyId','createJourneyActivation','has','AbTest','getJourney','steps','lastVersionNumber','entryCriteria','intime_journey','toLowerCase','versionNumber','conditionSegmentId','segmentId','includeHistory','getParentSegmentFull','length','listSegmentFolders','rootFolderId','limit','exitCriteria','isArray','state','listVersions','filter','90suGuWX','update','get','entries','excluded','simulation','outtime_stage_','includeAllVersions','enteredSize','folder-segment','getActivation','643485fGgYOc','getStatistics','paused','conversion','add','getActivationSankeyChart','type','milestoneInflux','exitCriterias','launched','getTrafficData','description','updateJourney','all','journeyStageId','values','journeyStages','parentFolder','intime_stage_','getJourneyStatistics','exit_criteria','createdAt','journeyBundleId','size','exitInflux','segmentFolderId','goal','NOT_FOUND','map','timedOutPath','Excluded\x20profiles','client','WaitStep','attributes','listActivations','entryInflux','branch','variant','data','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','listJourneysWithFolders','draft'];a131_0xc1f9=function(){return _0x198515;};return a131_0xc1f9();}export function parseJourneyState(_0x21cb36){const _0x26d59e=a131_0x42d19c;if(typeof _0x21cb36===_0x26d59e(0x1a2)&&VALID_JOURNEY_STATES[_0x26d59e(0x153)](_0x21cb36))return _0x21cb36;return _0x26d59e(0x19d);}export function entityToJourneyListItem(_0x4facc1,_0xa6c57){const _0xd1742=a131_0x42d19c,_0x54ec34=_0x4facc1['attributes'];return{'id':_0x4facc1['id'],'name':_0x54ec34['name']??'','journeyBundleName':_0x54ec34[_0xd1742(0x1e0)]??_0x54ec34['name']??'','journeyBundleId':_0x54ec34['journeyBundleId']??'','versionNumber':_0x54ec34[_0xd1742(0x15b)],'description':_0x54ec34[_0xd1742(0x17f)]??null,'state':parseJourneyState(_0x54ec34[_0xd1742(0x166)]),'paused':_0x54ec34[_0xd1742(0x176)]??![],'audienceId':_0xa6c57,'folderId':_0x54ec34[_0xd1742(0x18d)]??_0x4facc1[_0xd1742(0x1be)]?.[_0xd1742(0x185)]?.[_0xd1742(0x19a)]?.['id']??null,'createdAt':_0x54ec34['createdAt']??'','updatedAt':_0x54ec34['updatedAt']??''};}function convertToColumnId(_0x3070b9){const _0x55c6f1=a131_0x42d19c;return _0x3070b9[_0x55c6f1(0x1e5)](/-/g,'_');}function getStepEntries(_0x45200f){const _0x554ed1=a131_0x42d19c;if(!_0x45200f)return[];if(Array[_0x554ed1(0x165)](_0x45200f))return _0x45200f['map'](_0x356dbe=>[_0x356dbe['id'],_0x356dbe]);return Object[_0x554ed1(0x16c)](_0x45200f);}export function flattenJourneyActivation(_0x3c2635){const {activationParams:_0x4f6803,activationId:_0x33c5b3,runAfterJourneyRefresh:_0x3e8785}=_0x3c2635['attributes'];return{'id':_0x3c2635['id'],'activationId':_0x33c5b3,'runAfterJourneyRefresh':_0x3e8785,..._0x4f6803};}function col(_0x18ce61,_0x5450c7={}){const _0x21484c=a131_0x42d19c;return{'column':_0x18ce61,'direction':null,'stageIndex':null,'stageName':null,'category':_0x21484c(0x1af),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x5450c7};}export function generateColumnMapping(_0x14b9c0){const _0x220d64=a131_0x42d19c,_0x38f4a8=[];_0x38f4a8['push'](col(_0x220d64(0x1e3))),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x159),{'direction':'in','category':_0x220d64(0x1dd)})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x1bb),{'direction':'out','category':_0x220d64(0x1dd)}));_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x18e)]&&_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x1a8),{'direction':'in','category':'goal','detail':_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x18e)]['name']||null}));const _0x267830=_0x14b9c0[_0x220d64(0x195)][_0x220d64(0x184)]||[];for(let _0x24caa7=0x0;_0x24caa7<_0x267830[_0x220d64(0x160)];_0x24caa7++){const _0x39a48b=_0x267830[_0x24caa7],_0x1cad82=_0x39a48b[_0x220d64(0x1d4)],_0x3c372d={'stageIndex':_0x24caa7,'stageName':_0x1cad82},_0x3d3de3=_0x39a48b[_0x220d64(0x158)]?.[_0x220d64(0x1d4)]||null;_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7,{..._0x3c372d,'direction':'in','category':'stage','detail':_0x3d3de3})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x16f)+_0x24caa7,{..._0x3c372d,'direction':'out','category':'stage','detail':_0x3d3de3}));_0x39a48b[_0x220d64(0x1ca)]&&_0x38f4a8['push'](col('intime_stage_'+_0x24caa7+'_milestone',{..._0x3c372d,'direction':'in','category':_0x220d64(0x1ca),'detail':_0x39a48b['milestone'][_0x220d64(0x1d4)]||null}));const _0x5de34d=_0x39a48b[_0x220d64(0x17c)]||_0x39a48b[_0x220d64(0x164)]||[];for(let _0x5b543c=0x0;_0x5b543c<_0x5de34d[_0x220d64(0x160)];_0x5b543c++){_0x38f4a8[_0x220d64(0x1b8)](col('intime_stage_'+_0x24caa7+_0x220d64(0x1b6)+_0x5b543c,{..._0x3c372d,'direction':'in','category':_0x220d64(0x188),'detail':_0x5de34d[_0x5b543c][_0x220d64(0x1d4)]||null}));}const _0x537eed=getStepEntries(_0x39a48b[_0x220d64(0x156)]);for(const [_0xf1bf64,_0x3ba90b]of _0x537eed){const _0x1d6fde=convertToColumnId(_0xf1bf64),_0x3d93a3=_0x3ba90b['type']||null,_0x4df92f=_0x3ba90b['name']||null,_0x544f7c={..._0x3c372d,'stepType':_0x3d93a3,'stepName':_0x4df92f,'stepId':_0xf1bf64};_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde,{..._0x544f7c,'direction':'in','category':_0x220d64(0x1d9)})),_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x16f)+_0x24caa7+'_'+_0x1d6fde,{..._0x544f7c,'direction':_0x220d64(0x1b0),'category':_0x220d64(0x1d9)}));if(_0x3ba90b['type']===_0x220d64(0x1a5)&&_0x3ba90b['branches'])for(const _0x20896d of _0x3ba90b['branches']){_0x20896d[_0x220d64(0x15d)]&&_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_'+_0x20896d['segmentId'],{..._0x544f7c,'direction':'in','category':_0x220d64(0x198),'detail':_0x20896d[_0x220d64(0x1d4)]||(_0x20896d[_0x220d64(0x16d)]?_0x220d64(0x192):null)}));}if((_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x154)||_0x3ba90b['type']==='ABTest')&&_0x3ba90b[_0x220d64(0x19e)])for(const _0x3a74dc of _0x3ba90b[_0x220d64(0x19e)]){_0x3a74dc['id']&&_0x38f4a8[_0x220d64(0x1b8)](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_variant_'+convertToColumnId(_0x3a74dc['id']),{..._0x544f7c,'direction':'in','category':_0x220d64(0x199),'detail':_0x3a74dc[_0x220d64(0x1d4)]||null}));}if(_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x194)||_0x3ba90b[_0x220d64(0x17a)]===_0x220d64(0x1b1)){const _0xb377fa=[];if(_0x3ba90b[_0x220d64(0x15c)])_0xb377fa[_0x220d64(0x1b8)](_0x3ba90b[_0x220d64(0x15c)]);else{if(Array[_0x220d64(0x165)](_0x3ba90b[_0x220d64(0x1db)]))for(const _0x17c0ea of _0x3ba90b['conditions']){_0x17c0ea[_0x220d64(0x15d)]&&!_0x17c0ea[_0x220d64(0x191)]&&_0xb377fa[_0x220d64(0x1b8)](_0x17c0ea[_0x220d64(0x15d)]);}else _0x3ba90b[_0x220d64(0x1c5)]?.[_0x220d64(0x15d)]&&_0xb377fa[_0x220d64(0x1b8)](_0x3ba90b['waitCondition']['segmentId']);}for(const _0x3654a0 of _0xb377fa){_0x38f4a8['push'](col(_0x220d64(0x186)+_0x24caa7+'_'+_0x1d6fde+'_'+_0x3654a0,{..._0x544f7c,'direction':'in','category':'branch'}));}}}}return _0x38f4a8['push'](col(_0x220d64(0x1ce))),_0x38f4a8;}export function aggregateJourneyHistory(_0x478a8f){const _0x5d2a3e=a131_0x42d19c,_0xa73703=_0x478a8f[_0x5d2a3e(0x1e2)]((_0x2ae3b7,_0x8704cc)=>_0x2ae3b7+(_0x8704cc[_0x5d2a3e(0x197)]??0x0),0x0),_0x2d2151=_0x478a8f['reduce']((_0x42a663,_0x2c371c)=>_0x42a663+(_0x2c371c[_0x5d2a3e(0x1a1)]??0x0),0x0),_0x43cbb1=_0x478a8f[_0x5d2a3e(0x1e2)]((_0x6ecf11,_0x6117ab)=>_0x6ecf11+((_0x6117ab[_0x5d2a3e(0x18c)]??0x0)+(_0x6117ab['jumpInflux']??0x0)),0x0),_0x25446f=_0x478a8f[_0x478a8f['length']-0x1];return{'size':_0x25446f?.['size']??0x0,'entered':_0xa73703,'goal_achieved':_0x2d2151,'completion_rate':_0x2d2151&&_0xa73703?_0x2d2151/_0xa73703*0x64:0x0,'exit_or_jump':_0x43cbb1,'exit_or_jump_rate':_0x43cbb1&&_0xa73703?_0x43cbb1/_0xa73703*0x64:0x0};}export function aggregateStageHistory(_0x3a3694){const _0x1b7ac0=a131_0x42d19c,_0x23c099=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x2eea00,_0x13150c)=>_0x2eea00+(_0x13150c[_0x1b7ac0(0x197)]??0x0),0x0),_0x158ce8=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x4cef17,_0x47f3e3)=>_0x4cef17+(_0x47f3e3[_0x1b7ac0(0x17b)]??0x0),0x0),_0x49abe0=_0x3a3694[_0x1b7ac0(0x1e2)]((_0x14d02c,_0x2ee6fa)=>_0x14d02c+((_0x2ee6fa['exitInflux']??0x0)+(_0x2ee6fa['jumpInflux']??0x0)),0x0),_0x75d4fc=_0x3a3694[_0x3a3694[_0x1b7ac0(0x160)]-0x1];return{'size':_0x75d4fc?.['size']??0x0,'entered':_0x23c099,'milestone':_0x158ce8,'milestone_rate':_0x158ce8&&_0x23c099?_0x158ce8/_0x23c099*0x64:0x0,'exit_or_jump':_0x49abe0,'exit_or_jump_rate':_0x49abe0&&_0x23c099?_0x49abe0/_0x23c099*0x64:0x0};}export function assembleJourneyStats(_0x53d056,_0x3094f5){const _0x313a1c=a131_0x42d19c,_0x31e7d9=!!(_0x3094f5?.[_0x313a1c(0x1d0)]||_0x3094f5?.['to'])&&!!_0x53d056[_0x313a1c(0x1b2)]?.[_0x313a1c(0x160)];if(_0x31e7d9){const _0x7ffb8f=aggregateJourneyHistory(_0x53d056['history']),_0x54669d={'journey_id':_0x53d056[_0x313a1c(0x1aa)],..._0x3094f5?.['from']&&{'from':_0x3094f5[_0x313a1c(0x1d0)]},..._0x3094f5?.['to']&&{'to':_0x3094f5['to']},..._0x7ffb8f};return _0x3094f5?.[_0x313a1c(0x15e)]&&(_0x54669d['history']=_0x53d056[_0x313a1c(0x1b2)]),_0x54669d;}return{'journey_id':_0x53d056[_0x313a1c(0x1aa)],'size':_0x53d056[_0x313a1c(0x18b)],'entered':_0x53d056[_0x313a1c(0x171)],'goal_achieved':_0x53d056[_0x313a1c(0x1ab)],'completion_rate':_0x53d056[_0x313a1c(0x1c1)],'exit_or_jump':_0x53d056[_0x313a1c(0x1a4)],'exit_or_jump_rate':_0x53d056['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x4c9d9c){const _0x403c25=a131_0x42d19c,_0x2ff74a=_0x4c9d9c['journeys']['map'](_0x3633cd=>({'journeyId':_0x3633cd['id'],'versionNumber':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x15b)]??0x0,'name':_0x3633cd[_0x403c25(0x195)]['name'],'state':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x166)],'paused':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x176)],'createdAt':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x189)],'updatedAt':_0x3633cd[_0x403c25(0x195)][_0x403c25(0x1b4)]}));return _0x2ff74a[_0x403c25(0x1b7)]((_0xa8a6ca,_0x389356)=>_0xa8a6ca['versionNumber']-_0x389356['versionNumber']),_0x2ff74a;}export function synthesizePreBundleVersion(_0x18cfa1){const _0x2a4417=a131_0x42d19c;return{'journeyId':_0x18cfa1['id'],'versionNumber':0x1,'name':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x1d4)],'state':_0x18cfa1['attributes']['state'],'paused':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x176)],'createdAt':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x189)],'updatedAt':_0x18cfa1[_0x2a4417(0x195)][_0x2a4417(0x1b4)]};}export function buildStageNameMap(_0x4eb127){const _0x12e473=a131_0x42d19c;return new Map(_0x4eb127[_0x12e473(0x195)][_0x12e473(0x184)]?.[_0x12e473(0x190)](_0x11e158=>[_0x11e158['id'],_0x11e158[_0x12e473(0x1d4)]])??[]);}export class JourneySDK{[a131_0x42d19c(0x193)];constructor(_0x35cbc8){const _0x39298c=a131_0x42d19c;this[_0x39298c(0x193)]=new CDPApiClient(_0x35cbc8);}[a131_0x42d19c(0x1d5)](_0x26ec5e,_0x349cf3){return _0x349cf3?_0x26ec5e:deduplicateJourneysByBundle(_0x26ec5e);}async['listJourneysWithDetails'](_0x15cc3f,_0x46002c){const _0x3d8b72=a131_0x42d19c;try{const _0x5f1040=await this[_0x3d8b72(0x193)][_0x3d8b72(0x1e4)](_0x15cc3f);return{'journeys':this[_0x3d8b72(0x1d5)](_0x5f1040['journeys'],_0x46002c),'activationStepsById':_0x5f1040[_0x3d8b72(0x1cc)]};}catch(_0x490f64){if(isHttp404Error(_0x490f64))return{'journeys':[],'activationStepsById':new Map()};throw _0x490f64;}}async[a131_0x42d19c(0x1de)](_0x4288ae,_0x4e07ba,_0x5c2df8){const _0x3a73da=a131_0x42d19c;let _0x39e9da=_0x4e07ba;if(!_0x39e9da)try{const _0x82c596=await this[_0x3a73da(0x193)][_0x3a73da(0x15f)](_0x4288ae);_0x39e9da=_0x82c596[_0x3a73da(0x162)]??undefined;}catch(_0x14d71f){if(isHttp404Error(_0x14d71f))return[];throw _0x14d71f;}if(!_0x39e9da)return[];let _0x526eca;if(_0x5c2df8?.[_0x3a73da(0x170)]){const _0x528073=await this[_0x3a73da(0x193)][_0x3a73da(0x161)](_0x4288ae),_0x1f3f0b=_0x528073['map'](_0x2e8f0f=>this['client'][_0x3a73da(0x1bd)](_0x2e8f0f['id'])),_0x38c3d8=await Promise[_0x3a73da(0x181)](_0x1f3f0b),_0x3a2843=new Set();_0x526eca=_0x38c3d8[_0x3a73da(0x1bc)]()[_0x3a73da(0x168)](_0x74850b=>{const _0x55af71=_0x3a73da;if(_0x3a2843[_0x55af71(0x153)](_0x74850b['id']))return![];return _0x3a2843[_0x55af71(0x178)](_0x74850b['id']),!![];});}else{const _0x270e9b=await this[_0x3a73da(0x193)]['listEntitiesByFolder'](_0x39e9da,0x20,![]),_0x39e33c=_0x270e9b[_0x3a73da(0x19a)],_0x48c222=_0x39e33c[_0x3a73da(0x168)](_0x2c0625=>_0x2c0625['type']===_0x3a73da(0x1dd));_0x526eca=_0x48c222[_0x3a73da(0x190)](_0x47a5a1=>entityToJourneyListItem(_0x47a5a1,_0x4288ae));}return this['applyVersionDeduplication'](_0x526eca,_0x5c2df8?.['includeAllVersions']);}async[a131_0x42d19c(0x19c)](_0x43b979,_0x4f90c0,_0x5976c2){const _0x5104b5=a131_0x42d19c;if(!_0x4f90c0)return{'journeys':[],'folders':[]};const _0x46d2eb=await this[_0x5104b5(0x193)][_0x5104b5(0x1a0)](_0x4f90c0,0x20,![]),_0x20fd06=_0x46d2eb['data'],_0x59af69=_0x20fd06[_0x5104b5(0x168)](_0x3e31bd=>_0x3e31bd[_0x5104b5(0x17a)]===_0x5104b5(0x172)&&_0x3e31bd['id']!==_0x4f90c0),_0x3c1fa0=_0x59af69[_0x5104b5(0x190)](_0x5348e5=>({'id':_0x5348e5['id'],'name':_0x5348e5['attributes']['name']})),_0x4fd3e4=_0x20fd06[_0x5104b5(0x168)](_0x42b24c=>_0x42b24c[_0x5104b5(0x17a)]===_0x5104b5(0x1dd)),_0x91e3b=_0x4fd3e4[_0x5104b5(0x190)](_0x86d901=>entityToJourneyListItem(_0x86d901,_0x43b979));return{'journeys':this[_0x5104b5(0x1d5)](_0x91e3b,_0x5976c2?.[_0x5104b5(0x170)]),'folders':_0x3c1fa0};}async[a131_0x42d19c(0x1ae)](_0x22c88b,_0x37c009){const _0x22779c=a131_0x42d19c;let _0xc2394b;try{_0xc2394b=await this[_0x22779c(0x193)]['listSegmentFolders'](_0x22c88b);}catch(_0x1d8555){if(isHttp404Error(_0x1d8555))return{'journeys':[],'activationStepsById':new Map()};throw _0x1d8555;}const _0x304962=_0xc2394b[_0x22779c(0x190)](async _0xb0a200=>{const _0x591ef9=_0x22779c;return await this[_0x591ef9(0x1e4)](_0xb0a200['id'],_0x37c009?.[_0x591ef9(0x170)]);}),_0x44e068=await Promise['all'](_0x304962),_0x4be3a8=new Map(),_0x5937cc=[];for(const _0x5b2c7a of _0x44e068){_0x5937cc[_0x22779c(0x1b8)](..._0x5b2c7a['journeys']);for(const [_0x474995,_0x198eed]of _0x5b2c7a[_0x22779c(0x1cc)]){_0x4be3a8[_0x22779c(0x1b5)](_0x474995,_0x198eed);}}const _0x11e4b5=new Set(),_0x19bcc0=_0x5937cc[_0x22779c(0x168)](_0x2b5ec5=>{const _0x4fdf10=_0x22779c;if(_0x11e4b5[_0x4fdf10(0x153)](_0x2b5ec5['id']))return![];return _0x11e4b5[_0x4fdf10(0x178)](_0x2b5ec5['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x19bcc0,_0x37c009?.['includeAllVersions']),'activationStepsById':_0x4be3a8};}async[a131_0x42d19c(0x155)](_0x1266c1){const _0x3b8d10=a131_0x42d19c;try{return await this[_0x3b8d10(0x193)][_0x3b8d10(0x155)](_0x1266c1);}catch(_0x2782b7){if(isHttp404Error(_0x2782b7))throw new SDKError(ErrorCode[_0x3b8d10(0x1d8)],_0x3b8d10(0x1c2)+_0x1266c1,_0x2782b7);throw _0x2782b7;}}async[a131_0x42d19c(0x1c8)](_0x4ffc19,_0x303f96){const _0x1f4aa3=a131_0x42d19c,_0x418e9a=await this[_0x1f4aa3(0x1de)](_0x4ffc19),_0x57c942=_0x418e9a['find'](_0x1b89a2=>_0x1b89a2['journeyBundleName'][_0x1f4aa3(0x15a)]()===_0x303f96['toLowerCase']());if(!_0x57c942)throw new SDKError(ErrorCode[_0x1f4aa3(0x1d8)],_0x1f4aa3(0x1c2)+_0x303f96,undefined,{'helpText':_0x1f4aa3(0x19b)});return _0x57c942['id'];}async[a131_0x42d19c(0x175)](_0x4344cf,_0x2b162c){const _0x2bc145=a131_0x42d19c;try{return await this['client'][_0x2bc145(0x187)](_0x4344cf,_0x2b162c);}catch(_0xa99e8c){if(isHttp404Error(_0xa99e8c))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x2bc145(0x1c2)+_0x4344cf,_0xa99e8c);throw _0xa99e8c;}}async[a131_0x42d19c(0x17e)](_0x582438,_0x5b0f58){const _0x40ae49=a131_0x42d19c,_0x49edc4={'from':_0x5b0f58?.[_0x40ae49(0x1d0)],'to':_0x5b0f58?.['to'],'limit':_0x5b0f58?.[_0x40ae49(0x163)]},_0x234dee=_0x5b0f58?.[_0x40ae49(0x17a)]!==_0x40ae49(0x177);try{const [_0x4bc475,_0x574bae]=await Promise[_0x40ae49(0x181)]([this[_0x40ae49(0x1cf)](_0x582438,_0x5b0f58?.['type'],_0x49edc4),_0x234dee?this[_0x40ae49(0x155)](_0x582438):undefined]);if(_0x4bc475[_0x40ae49(0x1c0)]&&_0x574bae){const _0xb67fc1=buildStageNameMap(_0x574bae);_0x4bc475['activation']=_0x4bc475[_0x40ae49(0x1c0)]['map'](_0x49879d=>({..._0x49879d,'journeyStageName':_0xb67fc1[_0x40ae49(0x16b)](_0x49879d[_0x40ae49(0x182)])??_0x49879d[_0x40ae49(0x182)]}));}return _0x4bc475;}catch(_0x599a19){if(isHttp404Error(_0x599a19))throw new SDKError(ErrorCode[_0x40ae49(0x1d8)],'Journey\x20not\x20found:\x20'+_0x582438,_0x599a19);throw _0x599a19;}}async[a131_0x42d19c(0x1cf)](_0xfd4d64,_0x2e6b0d,_0xa462d7){const _0x3d1a8c=a131_0x42d19c;if(_0x2e6b0d===_0x3d1a8c(0x177)){const _0x25b4cb=await this['client'][_0x3d1a8c(0x1dc)](_0xfd4d64,_0xa462d7);return{'conversion':_0x25b4cb};}if(_0x2e6b0d==='activation'){const _0x407959=await this['client']['getActivationSankeyChart'](_0xfd4d64,_0xa462d7);return{'activation':_0x407959};}const [_0x518b03,_0x255846]=await Promise['all']([this[_0x3d1a8c(0x193)][_0x3d1a8c(0x1dc)](_0xfd4d64,_0xa462d7),this['client'][_0x3d1a8c(0x179)](_0xfd4d64,_0xa462d7)]);return{'conversion':_0x518b03,'activation':_0x255846};}async[a131_0x42d19c(0x1c4)](_0x56dadb){const _0x425c5f=a131_0x42d19c;try{return await this[_0x425c5f(0x193)][_0x425c5f(0x1b3)](_0x56dadb);}catch(_0x1bea49){if(isHttp404Error(_0x1bea49))throw new SDKError(ErrorCode[_0x425c5f(0x1d8)],'Journey\x20not\x20found:\x20'+_0x56dadb,_0x1bea49);throw _0x1bea49;}}async[a131_0x42d19c(0x1e1)](_0x61efb7){const _0x271b00=a131_0x42d19c;try{return await this[_0x271b00(0x193)][_0x271b00(0x1ad)](_0x61efb7);}catch(_0x2bc19f){if(isHttp404Error(_0x2bc19f))throw new SDKError(ErrorCode[_0x271b00(0x1d8)],_0x271b00(0x1c2)+_0x61efb7,_0x2bc19f);throw _0x2bc19f;}}async[a131_0x42d19c(0x1da)](_0x440cdd){const _0x37b40c=a131_0x42d19c;return await this[_0x37b40c(0x193)][_0x37b40c(0x1d2)](_0x440cdd);}async[a131_0x42d19c(0x16a)](_0x3ee353,_0x2e7fbb){const _0x2386d9=a131_0x42d19c;try{return await this[_0x2386d9(0x193)][_0x2386d9(0x180)](_0x3ee353,_0x2e7fbb);}catch(_0x351624){if(isHttp404Error(_0x351624))throw new SDKError(ErrorCode[_0x2386d9(0x1d8)],'Journey\x20not\x20found:\x20'+_0x3ee353,_0x351624);throw _0x351624;}}async[a131_0x42d19c(0x173)](_0x451a4c,_0xa00778){const _0x5dbc9=a131_0x42d19c;try{return await this[_0x5dbc9(0x193)][_0x5dbc9(0x1c7)](_0x451a4c,_0xa00778);}catch(_0x414bff){if(isHttp404Error(_0x414bff))throw new SDKError(ErrorCode[_0x5dbc9(0x18f)],_0x5dbc9(0x1cb)+_0xa00778+_0x5dbc9(0x1d3)+_0x451a4c,_0x414bff);throw _0x414bff;}}async[a131_0x42d19c(0x196)](_0x1f3fbd){const _0x3f3409=a131_0x42d19c;try{return await this[_0x3f3409(0x193)][_0x3f3409(0x1a9)](_0x1f3fbd);}catch(_0x3c3d25){if(isHttp404Error(_0x3c3d25))return[];throw _0x3c3d25;}}async['listActivationsFlat'](_0x190c34){const _0x224b4a=a131_0x42d19c,_0x1bfe0f=await this[_0x224b4a(0x196)](_0x190c34);return _0x1bfe0f[_0x224b4a(0x190)](flattenJourneyActivation);}async[a131_0x42d19c(0x1a3)](_0x5de8e1,_0x12429e){const _0x44e157=a131_0x42d19c;return await this[_0x44e157(0x193)][_0x44e157(0x152)](_0x5de8e1,_0x12429e);}async['getColumnMapping'](_0x1292b9){const _0x3449e9=a131_0x42d19c,_0x3d64b4=await this['getJourney'](_0x1292b9),_0x27dcf6=generateColumnMapping(_0x3d64b4);return{'journeyId':_0x3d64b4['id'],'journeyName':_0x3d64b4[_0x3449e9(0x195)]['name'],'database':_0x3449e9(0x1cd)+_0x3d64b4[_0x3449e9(0x195)][_0x3449e9(0x1ba)],'table':'journey_'+_0x3d64b4['id'],'columns':_0x27dcf6};}async['getBundle'](_0x4f80c7){const _0x18aabb=a131_0x42d19c;return this[_0x18aabb(0x193)]['getJourneyBundle'](_0x4f80c7);}async['getLatestJourneyId'](_0x440873){const _0x453577=a131_0x42d19c;if(!_0x440873)return undefined;try{const _0x566ddd=await this[_0x453577(0x19f)](_0x440873);return _0x566ddd[_0x453577(0x1e6)];}catch{return undefined;}}async[a131_0x42d19c(0x167)](_0x400c18){const _0x21b5c4=a131_0x42d19c,_0x397deb=await this[_0x21b5c4(0x155)](_0x400c18),_0x274685=_0x397deb[_0x21b5c4(0x195)]['journeyBundleId'];if(!_0x274685)return{'bundleId':'','bundleName':_0x397deb['attributes'][_0x21b5c4(0x1d4)],'bundleDescription':_0x397deb[_0x21b5c4(0x195)][_0x21b5c4(0x17f)]??null,'latestJourneyId':_0x397deb['id'],'versions':[synthesizePreBundleVersion(_0x397deb)]};const _0x5ef6df=await this['getBundle'](_0x274685);return{'bundleId':_0x274685,'bundleName':_0x5ef6df[_0x21b5c4(0x1d4)],'bundleDescription':_0x5ef6df['description']??null,'latestJourneyId':_0x5ef6df[_0x21b5c4(0x1e6)],'versions':formatVersionsFromBundle(_0x5ef6df)};}async['createVersion'](_0x1fe5b1){const _0x3202f5=a131_0x42d19c,_0x382599=await this[_0x3202f5(0x155)](_0x1fe5b1),_0x2754d1=_0x382599['attributes'][_0x3202f5(0x18a)];if(!_0x2754d1)throw new SDKError(ErrorCode[_0x3202f5(0x1df)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x3202f5(0x193)][_0x3202f5(0x1d7)](_0x2754d1);const _0x203240=await this['client'][_0x3202f5(0x1b9)](_0x2754d1),_0x33f397=_0x203240['name']+'\x20v'+(_0x203240[_0x3202f5(0x157)]+0x1);return this[_0x3202f5(0x193)][_0x3202f5(0x1a7)](_0x2754d1,{'sourceId':_0x1fe5b1,'attributes':{'name':_0x33f397}});}}
1
+ const a131_0x2d42d2=a131_0x5a21;(function(_0x3eeee9,_0x1f67a5){const _0x16d7d4=a131_0x5a21,_0x26b2f8=_0x3eeee9();while(!![]){try{const _0x566418=parseInt(_0x16d7d4(0x1d7))/0x1+parseInt(_0x16d7d4(0x1d3))/0x2*(-parseInt(_0x16d7d4(0x1ac))/0x3)+parseInt(_0x16d7d4(0x1e7))/0x4+parseInt(_0x16d7d4(0x195))/0x5+-parseInt(_0x16d7d4(0x177))/0x6*(parseInt(_0x16d7d4(0x1ea))/0x7)+-parseInt(_0x16d7d4(0x1d8))/0x8*(parseInt(_0x16d7d4(0x1ec))/0x9)+-parseInt(_0x16d7d4(0x196))/0xa*(-parseInt(_0x16d7d4(0x18b))/0xb);if(_0x566418===_0x1f67a5)break;else _0x26b2f8['push'](_0x26b2f8['shift']());}catch(_0x420e1b){_0x26b2f8['push'](_0x26b2f8['shift']());}}}(a131_0x18cb,0x636cf));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x159bfa){const _0x85ca42=a131_0x5a21;return _0x159bfa[_0x85ca42(0x19a)]??_0x159bfa['attributes']?.[_0x85ca42(0x19a)]??undefined;}function getVersionNumber(_0x388bff){const _0x5d6d21=a131_0x5a21;return _0x388bff[_0x5d6d21(0x1a1)]??_0x388bff['attributes']?.[_0x5d6d21(0x1a1)]??0x0;}function getState(_0x3ec545){const _0x1b2d8e=a131_0x5a21;return _0x3ec545['state']??_0x3ec545[_0x1b2d8e(0x184)]?.[_0x1b2d8e(0x18e)];}export function deduplicateJourneysByBundle(_0x205356){const _0x100678=a131_0x5a21,_0x5b3b07=new Map();let _0xc325d0=0x0;for(const _0x357342 of _0x205356){const _0x5e4738=getBundleId(_0x357342);if(!_0x5e4738){const _0x1b5122=_0x100678(0x1a6)+(_0x357342['id']??_0x100678(0x193)+_0xc325d0++);_0x5b3b07[_0x100678(0x18f)](_0x1b5122,_0x357342);continue;}const _0x36039d=_0x5b3b07[_0x100678(0x1c6)](_0x5e4738);if(!_0x36039d)_0x5b3b07[_0x100678(0x18f)](_0x5e4738,_0x357342);else{const _0x30fa22=getState(_0x36039d)===_0x100678(0x1ba),_0xf89efd=getState(_0x357342)===_0x100678(0x1ba);if(_0xf89efd&&!_0x30fa22)_0x5b3b07[_0x100678(0x18f)](_0x5e4738,_0x357342);else{if(!_0xf89efd&&_0x30fa22){}else{const _0x2c18d0=getVersionNumber(_0x36039d),_0x3c2111=getVersionNumber(_0x357342);_0x3c2111>_0x2c18d0&&_0x5b3b07[_0x100678(0x18f)](_0x5e4738,_0x357342);}}}}return Array[_0x100678(0x188)](_0x5b3b07[_0x100678(0x1ae)]());}const VALID_JOURNEY_STATES=new Set([a131_0x2d42d2(0x19f),a131_0x2d42d2(0x1e2),a131_0x2d42d2(0x1ba)]);export function parseJourneyState(_0x268f8d){const _0xa7682b=a131_0x2d42d2;if(typeof _0x268f8d===_0xa7682b(0x17f)&&VALID_JOURNEY_STATES[_0xa7682b(0x199)](_0x268f8d))return _0x268f8d;return _0xa7682b(0x19f);}export function entityToJourneyListItem(_0x480eb4,_0x4f1329){const _0xdf7860=a131_0x2d42d2,_0x3bd186=_0x480eb4[_0xdf7860(0x184)];return{'id':_0x480eb4['id'],'name':_0x3bd186[_0xdf7860(0x16c)]??'','journeyBundleName':_0x3bd186['journeyBundleName']??_0x3bd186[_0xdf7860(0x16c)]??'','journeyBundleId':_0x3bd186[_0xdf7860(0x19a)]??'','versionNumber':_0x3bd186[_0xdf7860(0x1a1)],'description':_0x3bd186['description']??null,'state':parseJourneyState(_0x3bd186[_0xdf7860(0x18e)]),'paused':_0x3bd186[_0xdf7860(0x1d6)]??![],'audienceId':_0x4f1329,'folderId':_0x3bd186['segmentFolderId']??_0x480eb4[_0xdf7860(0x186)]?.['parentFolder']?.['data']?.['id']??null,'createdAt':_0x3bd186[_0xdf7860(0x181)]??'','updatedAt':_0x3bd186[_0xdf7860(0x1ab)]??''};}function convertToColumnId(_0x4d5d36){return _0x4d5d36['replace'](/-/g,'_');}function getStepEntries(_0x293758){const _0x209bbb=a131_0x2d42d2;if(!_0x293758)return[];if(Array[_0x209bbb(0x1b7)](_0x293758))return _0x293758[_0x209bbb(0x191)](_0x1b9970=>[_0x1b9970['id'],_0x1b9970]);return Object[_0x209bbb(0x1aa)](_0x293758);}export function flattenJourneyActivation(_0x364006){const _0xee1e2c=a131_0x2d42d2,{activationParams:_0x5b3f23,activationId:_0x56349b,runAfterJourneyRefresh:_0x187bbf}=_0x364006[_0xee1e2c(0x184)];return{'id':_0x364006['id'],'activationId':_0x56349b,'runAfterJourneyRefresh':_0x187bbf,..._0x5b3f23};}function col(_0x330447,_0xb51c93={}){const _0x5c541b=a131_0x2d42d2;return{'column':_0x330447,'direction':null,'stageIndex':null,'stageName':null,'category':_0x5c541b(0x1cb),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0xb51c93};}function a131_0x18cb(){const _0x575578=['flat','outtime_journey','goalInflux','exitOrJumpSize','stage','exitCriteria','Journey\x20not\x20found:\x20','JOURNEY_NOT_FOUND','journeyId','DecisionPoint','includeAllVersions','resume','name','activationStepsById','steps','createActivation','getJourney','listActivations','exitOrJumpRate','outtime_stage_','pauseJourney','journeyStageId','journeys','66pXlyUF','length','intime_journey','journeyBundleName','branch','intime_stage_','type','size','string','listActivationsFlat','createdAt','getJourneyBundle','getConversionSankeyChart','attributes','exitInflux','relationships','journeyStages','from','conversion','out','426591fwOcXo','rootFolderId','reduce','state','set','listJourneysWithDetailsFromParentSegment','map','lastVersionNumber','idx-','resumeJourney','2492165SZXnPx','290AWdbKw','folder-segment','listSegmentFolders','has','journeyBundleId','createJourneyVersion','time','all','conditionSegmentId','draft','listJourneysWithDetails','versionNumber','checkJourneyAppendable','client','journey_','variants','no-bundle-','Journey\x20activation\x20step\x20not\x20found:\x20','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','goal','entries','updatedAt','1109574RmWBNP','createVersion','values','cdp_customer_id','data','activation','milestoneInflux','limit','ABTest','getColumnMapping','history','isArray','exitCriterias','find','launched','includeHistory','jumpInflux','fetchTrafficRaw','getBundle','milestone','applyVersionDeduplication','timedOutPath','listVersions','WaitStep','cdp_audience_','listJourneysFromParentSegment','get','create','journey','listEntitiesByFolder','_variant_','fixed','branches','push','createJourneyActivation','conditions','createJourney','getActivationSankeyChart','intime_goal','4ARHBaD','step','audienceId','paused','406901kqRNvx','2138712QbCfKN','getStatistics','variant','segmentId','AbTest','listJourneysWithFolders','entryInflux','getParentSegmentFull','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','latestJourneyId','simulation','getJourneyStatistics','Wait','toLowerCase','_milestone','784520XeyXPT','listJourneyActivations','listJourneys','516607AIVfxJ','getJourneyActivation','9MKnmpJ','\x20in\x20journey\x20','getLatestJourneyId','description','getTrafficData','filter'];a131_0x18cb=function(){return _0x575578;};return a131_0x18cb();}export function generateColumnMapping(_0x10f01f){const _0x80a5f5=a131_0x2d42d2,_0x4c663a=[];_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x1af))),_0x4c663a['push'](col(_0x80a5f5(0x179),{'direction':'in','category':_0x80a5f5(0x1c8)})),_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x161),{'direction':'out','category':_0x80a5f5(0x1c8)}));_0x10f01f[_0x80a5f5(0x184)][_0x80a5f5(0x1a9)]&&_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x1d2),{'direction':'in','category':_0x80a5f5(0x1a9),'detail':_0x10f01f[_0x80a5f5(0x184)][_0x80a5f5(0x1a9)][_0x80a5f5(0x16c)]||null}));const _0x556e8b=_0x10f01f[_0x80a5f5(0x184)][_0x80a5f5(0x187)]||[];for(let _0x2ee0ec=0x0;_0x2ee0ec<_0x556e8b[_0x80a5f5(0x178)];_0x2ee0ec++){const _0x16ee3c=_0x556e8b[_0x2ee0ec],_0x5a60e7=_0x16ee3c[_0x80a5f5(0x16c)],_0x3baba0={'stageIndex':_0x2ee0ec,'stageName':_0x5a60e7},_0x207606=_0x16ee3c['entryCriteria']?.[_0x80a5f5(0x16c)]||null;_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x17c)+_0x2ee0ec,{..._0x3baba0,'direction':'in','category':_0x80a5f5(0x164),'detail':_0x207606})),_0x4c663a[_0x80a5f5(0x1cd)](col('outtime_stage_'+_0x2ee0ec,{..._0x3baba0,'direction':_0x80a5f5(0x18a),'category':'stage','detail':_0x207606}));_0x16ee3c[_0x80a5f5(0x1bf)]&&_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x17c)+_0x2ee0ec+_0x80a5f5(0x1e6),{..._0x3baba0,'direction':'in','category':_0x80a5f5(0x1bf),'detail':_0x16ee3c[_0x80a5f5(0x1bf)][_0x80a5f5(0x16c)]||null}));const _0x33be43=_0x16ee3c[_0x80a5f5(0x1b8)]||_0x16ee3c[_0x80a5f5(0x165)]||[];for(let _0x4cace2=0x0;_0x4cace2<_0x33be43[_0x80a5f5(0x178)];_0x4cace2++){_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x17c)+_0x2ee0ec+'_exit_'+_0x4cace2,{..._0x3baba0,'direction':'in','category':'exit_criteria','detail':_0x33be43[_0x4cace2]['name']||null}));}const _0x2e8b61=getStepEntries(_0x16ee3c[_0x80a5f5(0x16e)]);for(const [_0x3ffe9c,_0x8d3cd1]of _0x2e8b61){const _0x5b8985=convertToColumnId(_0x3ffe9c),_0x30a8d9=_0x8d3cd1[_0x80a5f5(0x17d)]||null,_0x4dbbb9=_0x8d3cd1[_0x80a5f5(0x16c)]||null,_0x737e28={..._0x3baba0,'stepType':_0x30a8d9,'stepName':_0x4dbbb9,'stepId':_0x3ffe9c};_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x17c)+_0x2ee0ec+'_'+_0x5b8985,{..._0x737e28,'direction':'in','category':_0x80a5f5(0x1d4)})),_0x4c663a['push'](col(_0x80a5f5(0x173)+_0x2ee0ec+'_'+_0x5b8985,{..._0x737e28,'direction':_0x80a5f5(0x18a),'category':_0x80a5f5(0x1d4)}));if(_0x8d3cd1[_0x80a5f5(0x17d)]===_0x80a5f5(0x169)&&_0x8d3cd1['branches'])for(const _0x15410e of _0x8d3cd1[_0x80a5f5(0x1cc)]){_0x15410e[_0x80a5f5(0x1db)]&&_0x4c663a[_0x80a5f5(0x1cd)](col('intime_stage_'+_0x2ee0ec+'_'+_0x5b8985+'_'+_0x15410e[_0x80a5f5(0x1db)],{..._0x737e28,'direction':'in','category':'branch','detail':_0x15410e['name']||(_0x15410e['excluded']?'Excluded\x20profiles':null)}));}if((_0x8d3cd1[_0x80a5f5(0x17d)]===_0x80a5f5(0x1dc)||_0x8d3cd1[_0x80a5f5(0x17d)]===_0x80a5f5(0x1b4))&&_0x8d3cd1[_0x80a5f5(0x1a5)])for(const _0x3ecd3f of _0x8d3cd1['variants']){_0x3ecd3f['id']&&_0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x17c)+_0x2ee0ec+'_'+_0x5b8985+_0x80a5f5(0x1ca)+convertToColumnId(_0x3ecd3f['id']),{..._0x737e28,'direction':'in','category':_0x80a5f5(0x1da),'detail':_0x3ecd3f[_0x80a5f5(0x16c)]||null}));}if(_0x8d3cd1['type']===_0x80a5f5(0x1c3)||_0x8d3cd1[_0x80a5f5(0x17d)]===_0x80a5f5(0x1e4)){const _0x55bb68=[];if(_0x8d3cd1[_0x80a5f5(0x19e)])_0x55bb68[_0x80a5f5(0x1cd)](_0x8d3cd1['conditionSegmentId']);else{if(Array[_0x80a5f5(0x1b7)](_0x8d3cd1[_0x80a5f5(0x1cf)]))for(const _0x1f750e of _0x8d3cd1[_0x80a5f5(0x1cf)]){_0x1f750e[_0x80a5f5(0x1db)]&&!_0x1f750e[_0x80a5f5(0x1c1)]&&_0x55bb68[_0x80a5f5(0x1cd)](_0x1f750e[_0x80a5f5(0x1db)]);}else _0x8d3cd1['waitCondition']?.[_0x80a5f5(0x1db)]&&_0x55bb68[_0x80a5f5(0x1cd)](_0x8d3cd1['waitCondition'][_0x80a5f5(0x1db)]);}for(const _0x3e185b of _0x55bb68){_0x4c663a['push'](col(_0x80a5f5(0x17c)+_0x2ee0ec+'_'+_0x5b8985+'_'+_0x3e185b,{..._0x737e28,'direction':'in','category':_0x80a5f5(0x17b)}));}}}}return _0x4c663a[_0x80a5f5(0x1cd)](col(_0x80a5f5(0x19c))),_0x4c663a;}export function aggregateJourneyHistory(_0x3634f8){const _0x323ae2=a131_0x2d42d2,_0x4d4ceb=_0x3634f8[_0x323ae2(0x18d)]((_0x4ce5ac,_0x371cbc)=>_0x4ce5ac+(_0x371cbc[_0x323ae2(0x1de)]??0x0),0x0),_0x4be52d=_0x3634f8[_0x323ae2(0x18d)]((_0x20f554,_0x4a2f8d)=>_0x20f554+(_0x4a2f8d[_0x323ae2(0x162)]??0x0),0x0),_0x27395e=_0x3634f8[_0x323ae2(0x18d)]((_0x4b80da,_0x483c16)=>_0x4b80da+((_0x483c16[_0x323ae2(0x185)]??0x0)+(_0x483c16['jumpInflux']??0x0)),0x0),_0x253c51=_0x3634f8[_0x3634f8[_0x323ae2(0x178)]-0x1];return{'size':_0x253c51?.[_0x323ae2(0x17e)]??0x0,'entered':_0x4d4ceb,'goal_achieved':_0x4be52d,'completion_rate':_0x4be52d&&_0x4d4ceb?_0x4be52d/_0x4d4ceb*0x64:0x0,'exit_or_jump':_0x27395e,'exit_or_jump_rate':_0x27395e&&_0x4d4ceb?_0x27395e/_0x4d4ceb*0x64:0x0};}export function aggregateStageHistory(_0x59a9af){const _0x13c95e=a131_0x2d42d2,_0x569798=_0x59a9af[_0x13c95e(0x18d)]((_0x5232be,_0x5ca404)=>_0x5232be+(_0x5ca404[_0x13c95e(0x1de)]??0x0),0x0),_0x2ab3c3=_0x59a9af[_0x13c95e(0x18d)]((_0x5b940b,_0x424903)=>_0x5b940b+(_0x424903[_0x13c95e(0x1b2)]??0x0),0x0),_0x49cbad=_0x59a9af[_0x13c95e(0x18d)]((_0x4a4cd5,_0x44ce80)=>_0x4a4cd5+((_0x44ce80[_0x13c95e(0x185)]??0x0)+(_0x44ce80[_0x13c95e(0x1bc)]??0x0)),0x0),_0x125582=_0x59a9af[_0x59a9af[_0x13c95e(0x178)]-0x1];return{'size':_0x125582?.[_0x13c95e(0x17e)]??0x0,'entered':_0x569798,'milestone':_0x2ab3c3,'milestone_rate':_0x2ab3c3&&_0x569798?_0x2ab3c3/_0x569798*0x64:0x0,'exit_or_jump':_0x49cbad,'exit_or_jump_rate':_0x49cbad&&_0x569798?_0x49cbad/_0x569798*0x64:0x0};}function a131_0x5a21(_0x366985,_0x1af25b){_0x366985=_0x366985-0x15c;const _0x18cb29=a131_0x18cb();let _0x5a2187=_0x18cb29[_0x366985];return _0x5a2187;}export function assembleJourneyStats(_0x137576,_0x1e265c){const _0x23379a=a131_0x2d42d2,_0x282179=!!(_0x1e265c?.[_0x23379a(0x188)]||_0x1e265c?.['to'])&&!!_0x137576[_0x23379a(0x1b6)]?.[_0x23379a(0x178)];if(_0x282179){const _0x37628a=aggregateJourneyHistory(_0x137576['history']),_0x596983={'journey_id':_0x137576[_0x23379a(0x168)],..._0x1e265c?.[_0x23379a(0x188)]&&{'from':_0x1e265c[_0x23379a(0x188)]},..._0x1e265c?.['to']&&{'to':_0x1e265c['to']},..._0x37628a};return _0x1e265c?.[_0x23379a(0x1bb)]&&(_0x596983[_0x23379a(0x1b6)]=_0x137576[_0x23379a(0x1b6)]),_0x596983;}return{'journey_id':_0x137576[_0x23379a(0x168)],'size':_0x137576[_0x23379a(0x17e)],'entered':_0x137576['enteredSize'],'goal_achieved':_0x137576['goalSize'],'completion_rate':_0x137576['completionRate'],'exit_or_jump':_0x137576[_0x23379a(0x163)],'exit_or_jump_rate':_0x137576[_0x23379a(0x172)]};}export function formatVersionsFromBundle(_0x340bc3){const _0x39d432=a131_0x2d42d2,_0x40791f=_0x340bc3[_0x39d432(0x176)][_0x39d432(0x191)](_0x314bb1=>({'journeyId':_0x314bb1['id'],'versionNumber':_0x314bb1[_0x39d432(0x184)][_0x39d432(0x1a1)]??0x0,'name':_0x314bb1[_0x39d432(0x184)][_0x39d432(0x16c)],'state':_0x314bb1[_0x39d432(0x184)][_0x39d432(0x18e)],'paused':_0x314bb1[_0x39d432(0x184)]['paused'],'createdAt':_0x314bb1[_0x39d432(0x184)][_0x39d432(0x181)],'updatedAt':_0x314bb1[_0x39d432(0x184)][_0x39d432(0x1ab)]}));return _0x40791f['sort']((_0x141a68,_0x153ecf)=>_0x141a68[_0x39d432(0x1a1)]-_0x153ecf[_0x39d432(0x1a1)]),_0x40791f;}export function synthesizePreBundleVersion(_0x259adf){const _0x51fef7=a131_0x2d42d2;return{'journeyId':_0x259adf['id'],'versionNumber':0x1,'name':_0x259adf[_0x51fef7(0x184)][_0x51fef7(0x16c)],'state':_0x259adf['attributes'][_0x51fef7(0x18e)],'paused':_0x259adf[_0x51fef7(0x184)][_0x51fef7(0x1d6)],'createdAt':_0x259adf['attributes'][_0x51fef7(0x181)],'updatedAt':_0x259adf[_0x51fef7(0x184)][_0x51fef7(0x1ab)]};}export function buildStageNameMap(_0x131aef){const _0x541235=a131_0x2d42d2;return new Map(_0x131aef['attributes'][_0x541235(0x187)]?.[_0x541235(0x191)](_0x494d3f=>[_0x494d3f['id'],_0x494d3f[_0x541235(0x16c)]])??[]);}export class JourneySDK{['client'];constructor(_0x4d7f63){const _0x30c608=a131_0x2d42d2;this[_0x30c608(0x1a3)]=new CDPApiClient(_0x4d7f63);}['applyVersionDeduplication'](_0x55545e,_0x377625){return _0x377625?_0x55545e:deduplicateJourneysByBundle(_0x55545e);}async['listJourneysWithDetails'](_0x6b2842,_0x4891df){const _0x458ca9=a131_0x2d42d2;try{const _0x3c533c=await this[_0x458ca9(0x1a3)][_0x458ca9(0x1a0)](_0x6b2842);return{'journeys':this[_0x458ca9(0x1c0)](_0x3c533c[_0x458ca9(0x176)],_0x4891df),'activationStepsById':_0x3c533c[_0x458ca9(0x16d)]};}catch(_0x2739bb){if(isHttp404Error(_0x2739bb))return{'journeys':[],'activationStepsById':new Map()};throw _0x2739bb;}}async[a131_0x2d42d2(0x1c5)](_0x45fb02,_0x5f015a,_0x399a73){const _0xf8ace7=a131_0x2d42d2;let _0x58e0ed=_0x5f015a;if(!_0x58e0ed)try{const _0x5d8931=await this['client'][_0xf8ace7(0x1df)](_0x45fb02);_0x58e0ed=_0x5d8931[_0xf8ace7(0x18c)]??undefined;}catch(_0x259f5b){if(isHttp404Error(_0x259f5b))return[];throw _0x259f5b;}if(!_0x58e0ed)return[];let _0x570899;if(_0x399a73?.[_0xf8ace7(0x16a)]){const _0x4edc53=await this['client']['listSegmentFolders'](_0x45fb02),_0x4c2a60=_0x4edc53[_0xf8ace7(0x191)](_0x3df42e=>this[_0xf8ace7(0x1a3)][_0xf8ace7(0x1e9)](_0x3df42e['id'])),_0x4e926e=await Promise['all'](_0x4c2a60),_0x3ad677=new Set();_0x570899=_0x4e926e[_0xf8ace7(0x160)]()[_0xf8ace7(0x15f)](_0x2f5484=>{const _0x15382b=_0xf8ace7;if(_0x3ad677[_0x15382b(0x199)](_0x2f5484['id']))return![];return _0x3ad677['add'](_0x2f5484['id']),!![];});}else{const _0xc51436=await this[_0xf8ace7(0x1a3)][_0xf8ace7(0x1c9)](_0x58e0ed,0x20,![]),_0x3a68ee=_0xc51436[_0xf8ace7(0x1b0)],_0x47e914=_0x3a68ee[_0xf8ace7(0x15f)](_0x4d7a9f=>_0x4d7a9f[_0xf8ace7(0x17d)]===_0xf8ace7(0x1c8));_0x570899=_0x47e914['map'](_0x100c52=>entityToJourneyListItem(_0x100c52,_0x45fb02));}return this[_0xf8ace7(0x1c0)](_0x570899,_0x399a73?.[_0xf8ace7(0x16a)]);}async[a131_0x2d42d2(0x1dd)](_0x4c7e56,_0x3e1343,_0x1ded06){const _0x4a6f77=a131_0x2d42d2;if(!_0x3e1343)return{'journeys':[],'folders':[]};const _0x22522b=await this[_0x4a6f77(0x1a3)][_0x4a6f77(0x1c9)](_0x3e1343,0x20,![]),_0x300478=_0x22522b['data'],_0x11b254=_0x300478[_0x4a6f77(0x15f)](_0x5d799e=>_0x5d799e[_0x4a6f77(0x17d)]===_0x4a6f77(0x197)&&_0x5d799e['id']!==_0x3e1343),_0x223137=_0x11b254[_0x4a6f77(0x191)](_0x4c3d1c=>({'id':_0x4c3d1c['id'],'name':_0x4c3d1c['attributes'][_0x4a6f77(0x16c)]})),_0x4861a9=_0x300478['filter'](_0x4a7b73=>_0x4a7b73[_0x4a6f77(0x17d)]===_0x4a6f77(0x1c8)),_0x30b289=_0x4861a9['map'](_0x3bdb93=>entityToJourneyListItem(_0x3bdb93,_0x4c7e56));return{'journeys':this[_0x4a6f77(0x1c0)](_0x30b289,_0x1ded06?.['includeAllVersions']),'folders':_0x223137};}async[a131_0x2d42d2(0x190)](_0x4dacc8,_0x11fb46){const _0x2da300=a131_0x2d42d2;let _0x2d90a5;try{_0x2d90a5=await this[_0x2da300(0x1a3)][_0x2da300(0x198)](_0x4dacc8);}catch(_0x9ff8a1){if(isHttp404Error(_0x9ff8a1))return{'journeys':[],'activationStepsById':new Map()};throw _0x9ff8a1;}const _0x3475eb=_0x2d90a5[_0x2da300(0x191)](async _0x5559be=>{const _0x526fef=_0x2da300;return await this['listJourneysWithDetails'](_0x5559be['id'],_0x11fb46?.[_0x526fef(0x16a)]);}),_0x599c95=await Promise[_0x2da300(0x19d)](_0x3475eb),_0x373fbb=new Map(),_0x237eb0=[];for(const _0x5d4878 of _0x599c95){_0x237eb0['push'](..._0x5d4878['journeys']);for(const [_0x12dce3,_0x4c69eb]of _0x5d4878[_0x2da300(0x16d)]){_0x373fbb[_0x2da300(0x18f)](_0x12dce3,_0x4c69eb);}}const _0x1f4f05=new Set(),_0x3f05d7=_0x237eb0['filter'](_0x5df26d=>{const _0x16eede=_0x2da300;if(_0x1f4f05[_0x16eede(0x199)](_0x5df26d['id']))return![];return _0x1f4f05['add'](_0x5df26d['id']),!![];});return{'journeys':this[_0x2da300(0x1c0)](_0x3f05d7,_0x11fb46?.[_0x2da300(0x16a)]),'activationStepsById':_0x373fbb};}async[a131_0x2d42d2(0x170)](_0x2bb00f){const _0x2a67ec=a131_0x2d42d2;try{return await this[_0x2a67ec(0x1a3)][_0x2a67ec(0x170)](_0x2bb00f);}catch(_0xc17a29){if(isHttp404Error(_0xc17a29))throw new SDKError(ErrorCode[_0x2a67ec(0x167)],'Journey\x20not\x20found:\x20'+_0x2bb00f,_0xc17a29);throw _0xc17a29;}}async['resolveJourneyId'](_0x1507a0,_0x19d60d){const _0x9e1b8f=a131_0x2d42d2,_0x309e6f=await this[_0x9e1b8f(0x1c5)](_0x1507a0),_0x3b50f7=_0x309e6f[_0x9e1b8f(0x1b9)](_0x286dfc=>_0x286dfc[_0x9e1b8f(0x17a)][_0x9e1b8f(0x1e5)]()===_0x19d60d[_0x9e1b8f(0x1e5)]());if(!_0x3b50f7)throw new SDKError(ErrorCode[_0x9e1b8f(0x167)],_0x9e1b8f(0x166)+_0x19d60d,undefined,{'helpText':_0x9e1b8f(0x1e0)});return _0x3b50f7['id'];}async[a131_0x2d42d2(0x1d9)](_0x4dbddb,_0x30e0b){const _0x538d55=a131_0x2d42d2;try{return await this[_0x538d55(0x1a3)][_0x538d55(0x1e3)](_0x4dbddb,_0x30e0b);}catch(_0x4d44ab){if(isHttp404Error(_0x4d44ab))throw new SDKError(ErrorCode[_0x538d55(0x167)],_0x538d55(0x166)+_0x4dbddb,_0x4d44ab);throw _0x4d44ab;}}async[a131_0x2d42d2(0x15e)](_0x5c85bb,_0x35c05e){const _0x15f843=a131_0x2d42d2,_0x44ce10={'from':_0x35c05e?.[_0x15f843(0x188)],'to':_0x35c05e?.['to'],'limit':_0x35c05e?.[_0x15f843(0x1b3)]},_0x24a705=_0x35c05e?.[_0x15f843(0x17d)]!==_0x15f843(0x189);try{const [_0x41f408,_0x119946]=await Promise[_0x15f843(0x19d)]([this[_0x15f843(0x1bd)](_0x5c85bb,_0x35c05e?.['type'],_0x44ce10),_0x24a705?this[_0x15f843(0x170)](_0x5c85bb):undefined]);if(_0x41f408['activation']&&_0x119946){const _0x552ba3=buildStageNameMap(_0x119946);_0x41f408['activation']=_0x41f408[_0x15f843(0x1b1)][_0x15f843(0x191)](_0x1253e1=>({..._0x1253e1,'journeyStageName':_0x552ba3['get'](_0x1253e1[_0x15f843(0x175)])??_0x1253e1[_0x15f843(0x175)]}));}return _0x41f408;}catch(_0x3d7bd5){if(isHttp404Error(_0x3d7bd5))throw new SDKError(ErrorCode[_0x15f843(0x167)],_0x15f843(0x166)+_0x5c85bb,_0x3d7bd5);throw _0x3d7bd5;}}async[a131_0x2d42d2(0x1bd)](_0x3d62ff,_0x2b527e,_0x376324){const _0x3ff128=a131_0x2d42d2;if(_0x2b527e===_0x3ff128(0x189)){const _0x2e0e67=await this[_0x3ff128(0x1a3)]['getConversionSankeyChart'](_0x3d62ff,_0x376324);return{'conversion':_0x2e0e67};}if(_0x2b527e===_0x3ff128(0x1b1)){const _0x321703=await this['client'][_0x3ff128(0x1d1)](_0x3d62ff,_0x376324);return{'activation':_0x321703};}const [_0x3bf3e4,_0x25469e]=await Promise[_0x3ff128(0x19d)]([this['client'][_0x3ff128(0x183)](_0x3d62ff,_0x376324),this['client'][_0x3ff128(0x1d1)](_0x3d62ff,_0x376324)]);return{'conversion':_0x3bf3e4,'activation':_0x25469e};}async['pause'](_0x4ea4c1){const _0x9ab225=a131_0x2d42d2;try{return await this[_0x9ab225(0x1a3)][_0x9ab225(0x174)](_0x4ea4c1);}catch(_0x1500c2){if(isHttp404Error(_0x1500c2))throw new SDKError(ErrorCode[_0x9ab225(0x167)],_0x9ab225(0x166)+_0x4ea4c1,_0x1500c2);throw _0x1500c2;}}async[a131_0x2d42d2(0x16b)](_0x254938){const _0x51673a=a131_0x2d42d2;try{return await this[_0x51673a(0x1a3)][_0x51673a(0x194)](_0x254938);}catch(_0x4e1dd3){if(isHttp404Error(_0x4e1dd3))throw new SDKError(ErrorCode[_0x51673a(0x167)],_0x51673a(0x166)+_0x254938,_0x4e1dd3);throw _0x4e1dd3;}}async[a131_0x2d42d2(0x1c7)](_0x4a0453){const _0x33a4c0=a131_0x2d42d2;return await this[_0x33a4c0(0x1a3)][_0x33a4c0(0x1d0)](_0x4a0453);}async['update'](_0x55031c,_0x5b0eae){const _0x987d70=a131_0x2d42d2;try{return await this['client']['updateJourney'](_0x55031c,_0x5b0eae);}catch(_0x226fe8){if(isHttp404Error(_0x226fe8))throw new SDKError(ErrorCode[_0x987d70(0x167)],'Journey\x20not\x20found:\x20'+_0x55031c,_0x226fe8);throw _0x226fe8;}}async['getActivation'](_0x1aee09,_0x3bf337){const _0x43b2a8=a131_0x2d42d2;try{return await this[_0x43b2a8(0x1a3)][_0x43b2a8(0x1eb)](_0x1aee09,_0x3bf337);}catch(_0x32b7c6){if(isHttp404Error(_0x32b7c6))throw new SDKError(ErrorCode['NOT_FOUND'],_0x43b2a8(0x1a7)+_0x3bf337+_0x43b2a8(0x1ed)+_0x1aee09,_0x32b7c6);throw _0x32b7c6;}}async[a131_0x2d42d2(0x171)](_0x55604e){const _0x322390=a131_0x2d42d2;try{return await this['client'][_0x322390(0x1e8)](_0x55604e);}catch(_0x2eda90){if(isHttp404Error(_0x2eda90))return[];throw _0x2eda90;}}async[a131_0x2d42d2(0x180)](_0x18f3e8){const _0x1b08c0=a131_0x2d42d2,_0x4d1859=await this[_0x1b08c0(0x171)](_0x18f3e8);return _0x4d1859[_0x1b08c0(0x191)](flattenJourneyActivation);}async[a131_0x2d42d2(0x16f)](_0x20817d,_0x353e11){const _0x21254a=a131_0x2d42d2;return await this['client'][_0x21254a(0x1ce)](_0x20817d,_0x353e11);}async[a131_0x2d42d2(0x1b5)](_0x4f37ab){const _0x23af05=a131_0x2d42d2,_0x23deb3=await this[_0x23af05(0x170)](_0x4f37ab),_0xb80076=generateColumnMapping(_0x23deb3);return{'journeyId':_0x23deb3['id'],'journeyName':_0x23deb3[_0x23af05(0x184)][_0x23af05(0x16c)],'database':_0x23af05(0x1c4)+_0x23deb3['attributes'][_0x23af05(0x1d5)],'table':_0x23af05(0x1a4)+_0x23deb3['id'],'columns':_0xb80076};}async[a131_0x2d42d2(0x1be)](_0x1f2276){const _0x44a264=a131_0x2d42d2;return this['client'][_0x44a264(0x182)](_0x1f2276);}async[a131_0x2d42d2(0x15c)](_0x22ef7a){const _0x154624=a131_0x2d42d2;if(!_0x22ef7a)return undefined;try{const _0x421429=await this[_0x154624(0x1be)](_0x22ef7a);return _0x421429[_0x154624(0x1e1)];}catch{return undefined;}}async[a131_0x2d42d2(0x1c2)](_0x5bb109){const _0x6d3992=a131_0x2d42d2,_0x55a999=await this[_0x6d3992(0x170)](_0x5bb109),_0xd92cb7=_0x55a999[_0x6d3992(0x184)][_0x6d3992(0x19a)];if(!_0xd92cb7)return{'bundleId':'','bundleName':_0x55a999[_0x6d3992(0x184)]['name'],'bundleDescription':_0x55a999[_0x6d3992(0x184)][_0x6d3992(0x15d)]??null,'latestJourneyId':_0x55a999['id'],'versions':[synthesizePreBundleVersion(_0x55a999)]};const _0x3d7bbe=await this['getBundle'](_0xd92cb7);return{'bundleId':_0xd92cb7,'bundleName':_0x3d7bbe[_0x6d3992(0x16c)],'bundleDescription':_0x3d7bbe[_0x6d3992(0x15d)]??null,'latestJourneyId':_0x3d7bbe['latestJourneyId'],'versions':formatVersionsFromBundle(_0x3d7bbe)};}async[a131_0x2d42d2(0x1ad)](_0x162c4c){const _0x3bfcc0=a131_0x2d42d2,_0xaf5371=await this['getJourney'](_0x162c4c),_0x54ddba=_0xaf5371[_0x3bfcc0(0x184)][_0x3bfcc0(0x19a)];if(!_0x54ddba)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x3bfcc0(0x1a8));await this[_0x3bfcc0(0x1a3)][_0x3bfcc0(0x1a2)](_0x54ddba);const _0x22a5e4=await this[_0x3bfcc0(0x1a3)][_0x3bfcc0(0x182)](_0x54ddba),_0x3f237d=_0x22a5e4[_0x3bfcc0(0x16c)]+'\x20v'+(_0x22a5e4[_0x3bfcc0(0x192)]+0x1);return this[_0x3bfcc0(0x1a3)][_0x3bfcc0(0x19b)](_0x54ddba,{'sourceId':_0x162c4c,'attributes':{'name':_0x3f237d}});}}
@@ -1 +1 @@
1
- function a132_0x4129(_0x56d388,_0x20d74c){_0x56d388=_0x56d388-0x1cd;const _0x393798=a132_0x3937();let _0x412980=_0x393798[_0x56d388];return _0x412980;}const a132_0x4787c6=a132_0x4129;(function(_0x6c5e3b,_0x4a72c3){const _0x2e10a9=a132_0x4129,_0x24887c=_0x6c5e3b();while(!![]){try{const _0x2bb5db=-parseInt(_0x2e10a9(0x1d8))/0x1+-parseInt(_0x2e10a9(0x1d7))/0x2+-parseInt(_0x2e10a9(0x1d0))/0x3*(-parseInt(_0x2e10a9(0x1d1))/0x4)+-parseInt(_0x2e10a9(0x1cf))/0x5+-parseInt(_0x2e10a9(0x1d5))/0x6+-parseInt(_0x2e10a9(0x1d9))/0x7+parseInt(_0x2e10a9(0x1cd))/0x8*(parseInt(_0x2e10a9(0x1ce))/0x9);if(_0x2bb5db===_0x4a72c3)break;else _0x24887c['push'](_0x24887c['shift']());}catch(_0x1c8413){_0x24887c['push'](_0x24887c['shift']());}}}(a132_0x3937,0x3cfed));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x4787c6(0x1d3),a132_0x4787c6(0x1d6));export function saveLastChatId(_0x135590){const _0x1d6c82=a132_0x4787c6;chatIdCache[_0x1d6c82(0x1d2)](_0x135590);}export function loadLastChatId(){return chatIdCache['read']();}function a132_0x3937(){const _0x2f7e66=['822922ejxPHk','217641ozWJlz','3328535mNzGUu','48CHlBwY','3060846bcRrxQ','2014485kBArNM','407457WQYuCu','4xalsoi','write','last_chat_id','clear','2514252lPCXcz','llm/chat'];a132_0x3937=function(){return _0x2f7e66;};return a132_0x3937();}export function clearLastChatId(){const _0x93929b=a132_0x4787c6;chatIdCache[_0x93929b(0x1d4)]();}
1
+ function a132_0x2a0c(_0x3eb565,_0x68c7a){_0x3eb565=_0x3eb565-0x97;const _0x200040=a132_0x2000();let _0x2a0c20=_0x200040[_0x3eb565];return _0x2a0c20;}const a132_0x1937b8=a132_0x2a0c;(function(_0x562ab7,_0x1ab585){const _0x15f117=a132_0x2a0c,_0x210995=_0x562ab7();while(!![]){try{const _0x38d091=-parseInt(_0x15f117(0x9a))/0x1+parseInt(_0x15f117(0x9e))/0x2+parseInt(_0x15f117(0xa2))/0x3*(parseInt(_0x15f117(0xa0))/0x4)+parseInt(_0x15f117(0x9d))/0x5+-parseInt(_0x15f117(0x98))/0x6+parseInt(_0x15f117(0x9b))/0x7+parseInt(_0x15f117(0x99))/0x8*(-parseInt(_0x15f117(0x9f))/0x9);if(_0x38d091===_0x1ab585)break;else _0x210995['push'](_0x210995['shift']());}catch(_0x2c4080){_0x210995['push'](_0x210995['shift']());}}}(a132_0x2000,0x9045f));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x1937b8(0x9c),a132_0x1937b8(0xa1));export function saveLastChatId(_0x56b9ea){const _0x1dd7d5=a132_0x1937b8;chatIdCache[_0x1dd7d5(0x97)](_0x56b9ea);}function a132_0x2000(){const _0x3a8d8b=['7207424ZlsSNN','last_chat_id','3587560eHVcLB','1710490Elnend','7827363RCCgaY','2134136kdLrGY','llm/chat','3OqkoPF','write','7023138SsMfom','8yEMVwD','504750CmbxvG'];a132_0x2000=function(){return _0x3a8d8b;};return a132_0x2000();}export function loadLastChatId(){return chatIdCache['read']();}export function clearLastChatId(){chatIdCache['clear']();}